]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
Merge from V6_main_20120808 08Aug12
authorvsr <vsr@opencascade.com>
Thu, 9 Aug 2012 14:19:30 +0000 (14:19 +0000)
committervsr <vsr@opencascade.com>
Thu, 9 Aug 2012 14:19:30 +0000 (14:19 +0000)
651 files changed:
AUTHORS [new file with mode: 0755]
COPYING [new file with mode: 0755]
ChangeLog [new file with mode: 0755]
Doxyfile [new file with mode: 0755]
HEXABLOCK_version.h.in [new file with mode: 0755]
INSTALL [new file with mode: 0755]
Makefile.am [new file with mode: 0755]
NEWS [new file with mode: 0755]
README [new file with mode: 0755]
adm_local/Makefile.am [new file with mode: 0755]
adm_local/unix/Makefile.am [new file with mode: 0755]
adm_local/unix/config_files/Makefile.am [new file with mode: 0755]
adm_local/unix/config_files/check_HEXABLOCK.m4 [new file with mode: 0755]
adm_local/unix/config_files/check_libxml.m4 [new file with mode: 0755]
adm_local/unix/config_files/check_sphinx.m4 [new file with mode: 0644]
adm_local/unix/config_files/i2_check_qt4.m4 [new file with mode: 0755]
adm_local/unix/make_common_starter.am [new file with mode: 0755]
bin/Makefile.am [new file with mode: 0755]
bin/VERSION.in [new file with mode: 0755]
bin/myrunSalome.py [new file with mode: 0755]
bin/runAppli.in [new file with mode: 0755]
build_configure [new file with mode: 0755]
clean_configure [new file with mode: 0755]
configure.ac [new file with mode: 0755]
cppunit-report.xml [new file with mode: 0755]
doc/Makefile.am [new file with mode: 0755]
doc/_static/EX2.PNG [new file with mode: 0644]
doc/_static/EX3.PNG [new file with mode: 0644]
doc/_static/EX4.PNG [new file with mode: 0644]
doc/_static/EX5.PNG [new file with mode: 0644]
doc/_static/EX6.PNG [new file with mode: 0644]
doc/_static/EX7.PNG [new file with mode: 0644]
doc/_static/HEXAHEDRON.PNG [new file with mode: 0644]
doc/_static/Sans titre.PNG [new file with mode: 0644]
doc/_static/association.PNG [new file with mode: 0644]
doc/_static/association2.PNG [new file with mode: 0644]
doc/_static/before_quadrevolution.png [new file with mode: 0644]
doc/_static/before_replacehexa.png [new file with mode: 0644]
doc/_static/bielle.PNG [new file with mode: 0644]
doc/_static/bielle_mesh.png [new file with mode: 0644]
doc/_static/bride.PNG [new file with mode: 0644]
doc/_static/bride_geom.png [new file with mode: 0644]
doc/_static/bride_model1.png [new file with mode: 0644]
doc/_static/bride_model2.png [new file with mode: 0644]
doc/_static/cad_bielle.PNG [new file with mode: 0644]
doc/_static/cartgrid1.PNG [new file with mode: 0644]
doc/_static/cartgrid2.PNG [new file with mode: 0644]
doc/_static/cartgrid3.png [new file with mode: 0644]
doc/_static/component1.png [new file with mode: 0644]
doc/_static/component2.png [new file with mode: 0644]
doc/_static/component3.png [new file with mode: 0644]
doc/_static/component4.png [new file with mode: 0644]
doc/_static/cut.png [new file with mode: 0644]
doc/_static/cyl_grid1.PNG [new file with mode: 0644]
doc/_static/cyl_grid2.PNG [new file with mode: 0644]
doc/_static/cyl_grid3.PNG [new file with mode: 0644]
doc/_static/cylgrid.PNG [new file with mode: 0644]
doc/_static/cylgrid1.PNG [new file with mode: 0644]
doc/_static/cylgrid1.png [new file with mode: 0644]
doc/_static/cylgrid2.PNG [new file with mode: 0644]
doc/_static/cylgrid2.png [new file with mode: 0644]
doc/_static/cylgrid3.png [new file with mode: 0644]
doc/_static/cylgrid4.png [new file with mode: 0644]
doc/_static/cylgrid5.png [new file with mode: 0644]
doc/_static/cylgrid6.png [new file with mode: 0644]
doc/_static/cylgrids.png [new file with mode: 0644]
doc/_static/cylinder.png [new file with mode: 0644]
doc/_static/db_cylgrid.PNG [new file with mode: 0644]
doc/_static/db_sph_grid.PNG [new file with mode: 0644]
doc/_static/decoupe.png [new file with mode: 0644]
doc/_static/dialogbox.PNG [new file with mode: 0644]
doc/_static/dialogbox2.PNG [new file with mode: 0644]
doc/_static/dialogbox_cartgrid.PNG [new file with mode: 0644]
doc/_static/dialogbox_cylgrid.PNG [new file with mode: 0644]
doc/_static/dialogbox_discreti.PNG [new file with mode: 0644]
doc/_static/dialogbox_law.PNG [new file with mode: 0644]
doc/_static/dialogbox_remove.PNG [new file with mode: 0644]
doc/_static/dialogbox_remove.png [new file with mode: 0644]
doc/_static/disco_quad.png [new file with mode: 0644]
doc/_static/ex1.JPG [new file with mode: 0644]
doc/_static/ex1.PNG [new file with mode: 0644]
doc/_static/gui_add_group.png [new file with mode: 0644]
doc/_static/gui_add_law.png [new file with mode: 0644]
doc/_static/gui_ass_edge.png [new file with mode: 0644]
doc/_static/gui_ass_quad.png [new file with mode: 0644]
doc/_static/gui_cut_hexa.png [new file with mode: 0644]
doc/_static/gui_cylinder.png [new file with mode: 0644]
doc/_static/gui_disco_edge.png [new file with mode: 0644]
doc/_static/gui_disco_quad.png [new file with mode: 0644]
doc/_static/gui_disco_vertex.png [new file with mode: 0644]
doc/_static/gui_edge2.png [new file with mode: 0644]
doc/_static/gui_edge_vertices.png [new file with mode: 0644]
doc/_static/gui_hemispherical.png [new file with mode: 0644]
doc/_static/gui_hexa_quads.png [new file with mode: 0644]
doc/_static/gui_hexa_vertices.png [new file with mode: 0644]
doc/_static/gui_import_document.png [new file with mode: 0644]
doc/_static/gui_join_quads.png [new file with mode: 0644]
doc/_static/gui_make_cart_grid.png [new file with mode: 0644]
doc/_static/gui_make_cyl_grid.png [new file with mode: 0644]
doc/_static/gui_make_cyl_grid_irregular.png [new file with mode: 0644]
doc/_static/gui_make_cylinder.png [new file with mode: 0644]
doc/_static/gui_make_cylinders.png [new file with mode: 0644]
doc/_static/gui_make_line_symmetry.png [new file with mode: 0644]
doc/_static/gui_make_pipe.png [new file with mode: 0644]
doc/_static/gui_make_pipes.png [new file with mode: 0644]
doc/_static/gui_make_plan_symmetry.png [new file with mode: 0644]
doc/_static/gui_make_point_symmetry.png [new file with mode: 0644]
doc/_static/gui_make_spher_grid.png [new file with mode: 0644]
doc/_static/gui_make_sym_line.png [new file with mode: 0644]
doc/_static/gui_make_sym_plan.png [new file with mode: 0644]
doc/_static/gui_make_sym_point.png [new file with mode: 0644]
doc/_static/gui_make_transfo_rotation.png [new file with mode: 0644]
doc/_static/gui_make_transfo_scale.png [new file with mode: 0644]
doc/_static/gui_make_transfo_translation.png [new file with mode: 0644]
doc/_static/gui_merge_edges.png [new file with mode: 0644]
doc/_static/gui_merge_quads.png [new file with mode: 0644]
doc/_static/gui_merge_vertices.png [new file with mode: 0644]
doc/_static/gui_mesh.png [new file with mode: 0644]
doc/_static/gui_modify_line_symmetry.png [new file with mode: 0644]
doc/_static/gui_modify_plan_symmetry.png [new file with mode: 0644]
doc/_static/gui_modify_point_symmetry.png [new file with mode: 0644]
doc/_static/gui_modify_transfo_rotation.png [new file with mode: 0644]
doc/_static/gui_modify_transfo_scale.png [new file with mode: 0644]
doc/_static/gui_modify_transfo_translation.png [new file with mode: 0644]
doc/_static/gui_new_document.png [new file with mode: 0644]
doc/_static/gui_parthemispherical.png [new file with mode: 0644]
doc/_static/gui_partrind.png [new file with mode: 0644]
doc/_static/gui_pipe.png [new file with mode: 0644]
doc/_static/gui_prism_quads.png [new file with mode: 0644]
doc/_static/gui_quad_edges.png [new file with mode: 0644]
doc/_static/gui_quad_vertices.png [new file with mode: 0644]
doc/_static/gui_quadrevolution.png [new file with mode: 0644]
doc/_static/gui_remove_hexa.png [new file with mode: 0644]
doc/_static/gui_replacehexa.png [new file with mode: 0644]
doc/_static/gui_rind.png [new file with mode: 0644]
doc/_static/gui_vector.png [new file with mode: 0644]
doc/_static/gui_vector1.png [new file with mode: 0644]
doc/_static/gui_vector2.png [new file with mode: 0644]
doc/_static/gui_vertex.png [new file with mode: 0644]
doc/_static/hemisphericalgrid.png [new file with mode: 0644]
doc/_static/interactive.PNG [new file with mode: 0644]
doc/_static/interactive.png [new file with mode: 0644]
doc/_static/intersec_cyl.PNG [new file with mode: 0644]
doc/_static/join.png [new file with mode: 0644]
doc/_static/meshing1.PNG [new file with mode: 0644]
doc/_static/meshing2.PNG [new file with mode: 0644]
doc/_static/meshing3.PNG [new file with mode: 0644]
doc/_static/no_cut.png [new file with mode: 0644]
doc/_static/no_decoupe.png [new file with mode: 0644]
doc/_static/parthemisphericalgrid.png [new file with mode: 0644]
doc/_static/partrindgrid.png [new file with mode: 0644]
doc/_static/pipe.png [new file with mode: 0644]
doc/_static/point_sym_before.png [new file with mode: 0644]
doc/_static/prisme.png [new file with mode: 0644]
doc/_static/prisme_gui.png [new file with mode: 0644]
doc/_static/quadrevolution.png [new file with mode: 0644]
doc/_static/remove1.PNG [new file with mode: 0644]
doc/_static/remove2.PNG [new file with mode: 0644]
doc/_static/remove3.PNG [new file with mode: 0644]
doc/_static/remove3.png [new file with mode: 0644]
doc/_static/replacehexa.png [new file with mode: 0644]
doc/_static/rindgrid.png [new file with mode: 0644]
doc/_static/sph_grid.PNG [new file with mode: 0644]
doc/_static/sph_grid.png [new file with mode: 0644]
doc/_static/sph_grid2.PNG [new file with mode: 0644]
doc/_static/transfo0.png [new file with mode: 0644]
doc/_static/transfo_rotation.png [new file with mode: 0644]
doc/_static/transfo_scale.png [new file with mode: 0644]
doc/_static/transfo_translation.png [new file with mode: 0644]
doc/_static/tuyau_courbe.PNG [new file with mode: 0644]
doc/annexe.rst [new file with mode: 0644]
doc/block_method.rst [new file with mode: 0644]
doc/cad.rst [new file with mode: 0644]
doc/cas_test_python/BIELLE.py [new file with mode: 0644]
doc/conf.py.in [new file with mode: 0644]
doc/creategrids.rst [new file with mode: 0644]
doc/full_example_bridle.rst [new file with mode: 0644]
doc/general.rst [new file with mode: 0644]
doc/gui.rst [new file with mode: 0644]
doc/gui_asso_quad_to_geom.rst [new file with mode: 0644]
doc/gui_blocks_for_cyl_pipe.rst [new file with mode: 0644]
doc/gui_component.rst [new file with mode: 0644]
doc/gui_cut_hexa.rst [new file with mode: 0644]
doc/gui_cyl.rst [new file with mode: 0644]
doc/gui_disc_elmts.rst [new file with mode: 0644]
doc/gui_discret_law.rst [new file with mode: 0644]
doc/gui_document.rst [new file with mode: 0644]
doc/gui_edge.rst [new file with mode: 0644]
doc/gui_elements.rst [new file with mode: 0644]
doc/gui_groups.rst [new file with mode: 0644]
doc/gui_hemisphere.rst [new file with mode: 0644]
doc/gui_hexahedron.rst [new file with mode: 0644]
doc/gui_make_elmts.rst [new file with mode: 0644]
doc/gui_make_symmetry.rst [new file with mode: 0644]
doc/gui_merge_elmts.rst [new file with mode: 0644]
doc/gui_mesh.rst [new file with mode: 0644]
doc/gui_modify_elmts.rst [new file with mode: 0644]
doc/gui_modify_symmetry.rst [new file with mode: 0644]
doc/gui_pipe.rst [new file with mode: 0644]
doc/gui_prism_join_quad.rst [new file with mode: 0644]
doc/gui_propag.rst [new file with mode: 0644]
doc/gui_quad_revolution.rst [new file with mode: 0644]
doc/gui_quadrangle.rst [new file with mode: 0644]
doc/gui_remove.rst [new file with mode: 0644]
doc/gui_replace_hexa.rst [new file with mode: 0644]
doc/gui_vector.rst [new file with mode: 0644]
doc/gui_vertex.rst [new file with mode: 0644]
doc/index.rst [new file with mode: 0644]
doc/interactive.rst [new file with mode: 0644]
doc/intro_association.rst [new file with mode: 0644]
doc/intro_groups.rst [new file with mode: 0644]
doc/intro_mesh.rst [new file with mode: 0644]
doc/intro_python.rst [new file with mode: 0644]
doc/mesh.rst [new file with mode: 0644]
doc/pyplots/BIELLE.py [new file with mode: 0644]
doc/pyplots/bielle.py [new file with mode: 0644]
doc/pyplots/bielle_JPL.py [new file with mode: 0644]
doc/pyplots/bride.py [new file with mode: 0644]
doc/pyplots/process_vtk.py [new file with mode: 0755]
doc/pyplots/test_cut.py [new file with mode: 0644]
doc/pyplots/test_disconnect.py [new file with mode: 0644]
doc/pyplots/test_join_quads.py [new file with mode: 0644]
doc/pyplots/test_make_cart_grid.py [new file with mode: 0644]
doc/pyplots/test_make_cyl_grid.py [new file with mode: 0644]
doc/pyplots/test_make_cylinder.py [new file with mode: 0644]
doc/pyplots/test_make_elmts_transform.py [new file with mode: 0644]
doc/pyplots/test_make_pipe.py [new file with mode: 0644]
doc/pyplots/test_make_spher_grid.py [new file with mode: 0644]
doc/pyplots/test_prism_quads.py [new file with mode: 0644]
doc/pyplots/test_propagation.py [new file with mode: 0644]
doc/python.rst [new file with mode: 0644]
doc/tui.rst [new file with mode: 0644]
doc/tui_asso_quad_to_geom.rst [new file with mode: 0644]
doc/tui_blocks_for_cyl_pipe.rst [new file with mode: 0644]
doc/tui_cartgrid.rst [new file with mode: 0644]
doc/tui_component.rst [new file with mode: 0644]
doc/tui_cut_hexa.rst [new file with mode: 0644]
doc/tui_cyl.rst [new file with mode: 0644]
doc/tui_cylgrid.rst [new file with mode: 0644]
doc/tui_disc_elmts.rst [new file with mode: 0644]
doc/tui_discret_law.rst [new file with mode: 0644]
doc/tui_document.rst [new file with mode: 0644]
doc/tui_edge.rst [new file with mode: 0644]
doc/tui_elements.rst [new file with mode: 0644]
doc/tui_groups.rst [new file with mode: 0644]
doc/tui_hexahedron.rst [new file with mode: 0644]
doc/tui_make_elmts.rst [new file with mode: 0644]
doc/tui_merge_elmts.rst [new file with mode: 0644]
doc/tui_mesh.rst [new file with mode: 0644]
doc/tui_modify_elmts.rst [new file with mode: 0644]
doc/tui_pipe.rst [new file with mode: 0644]
doc/tui_prism_join_quad.rst [new file with mode: 0644]
doc/tui_propag.rst [new file with mode: 0644]
doc/tui_quadrangle.rst [new file with mode: 0644]
doc/tui_remove.rst [new file with mode: 0644]
doc/tui_sphergrid.rst [new file with mode: 0644]
doc/tui_vector.rst [new file with mode: 0644]
doc/tui_vertex.rst [new file with mode: 0644]
idl/CrossElements.idl [new file with mode: 0755]
idl/Cylinder.idl [new file with mode: 0755]
idl/Document.idl [new file with mode: 0755]
idl/Edge.idl [new file with mode: 0755]
idl/Element.idl [new file with mode: 0755]
idl/Elements.idl [new file with mode: 0755]
idl/Group.idl [new file with mode: 0755]
idl/HEXABLOCK_Gen.idl [new file with mode: 0755]
idl/Hexa.idl [new file with mode: 0755]
idl/Law.idl [new file with mode: 0755]
idl/Makefile.am [new file with mode: 0755]
idl/Pipe.idl [new file with mode: 0755]
idl/Propagation.idl [new file with mode: 0755]
idl/Quad.idl [new file with mode: 0755]
idl/Vector.idl [new file with mode: 0755]
idl/Vertex.idl [new file with mode: 0755]
internal_doc/AssoLines.gif [new file with mode: 0644]
internal_doc/AssoLines.html [new file with mode: 0755]
internal_doc/Bugs.html [new file with mode: 0755]
internal_doc/HemiSphere.png [new file with mode: 0755]
internal_doc/LastNews.html [new file with mode: 0755]
internal_doc/PartRind.png [new file with mode: 0755]
internal_doc/PartSphere.png [new file with mode: 0755]
internal_doc/QuadRevolution.png [new file with mode: 0755]
internal_doc/QuadRevolution1.png [new file with mode: 0644]
internal_doc/QuadRevolution2.png [new file with mode: 0644]
internal_doc/Quads_5.png [new file with mode: 0755]
internal_doc/Quads_AB.png [new file with mode: 0755]
internal_doc/Quads_ABCD.png [new file with mode: 0755]
internal_doc/Quads_AC.png [new file with mode: 0755]
internal_doc/Quads_ACD.png [new file with mode: 0755]
internal_doc/Quads_ACDE.png [new file with mode: 0755]
internal_doc/Quads_ACE.png [new file with mode: 0755]
internal_doc/Questions.html [new file with mode: 0755]
internal_doc/ReplaceBefore.gif [new file with mode: 0755]
internal_doc/ReplaceResult.gif [new file with mode: 0755]
internal_doc/Rind.png [new file with mode: 0755]
internal_doc/Sphere.gif [new file with mode: 0755]
internal_doc/bad_geom.png [new file with mode: 0755]
internal_doc/blue-ball.gif [new file with mode: 0755]
internal_doc/demi_coque.png [new file with mode: 0755]
internal_doc/green-ball.gif [new file with mode: 0755]
internal_doc/index.html [new file with mode: 0755]
internal_doc/logo-cs.gif [new file with mode: 0755]
internal_doc/macaroni.png [new file with mode: 0644]
internal_doc/prism.png [new file with mode: 0644]
internal_doc/red-ball.gif [new file with mode: 0755]
internal_doc/transfo.png [new file with mode: 0644]
salome_adm/unix/SALOMEconfig.h.in [new file with mode: 0755]
salome_adm/unix/config_files/config.guess [new file with mode: 0755]
salome_adm/unix/config_files/config.sub [new file with mode: 0755]
salome_adm/unix/config_files/depcomp [new file with mode: 0755]
salome_adm/unix/config_files/install-sh [new file with mode: 0755]
salome_adm/unix/config_files/missing [new file with mode: 0755]
src/HEXABLOCK/Hex.cxx [new file with mode: 0755]
src/HEXABLOCK/Hex.hxx [new file with mode: 0755]
src/HEXABLOCK/HexAnaQuads.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCloner.cxx [new file with mode: 0755]
src/HEXABLOCK/HexCloner.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCramer.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCrossElements.cxx [new file with mode: 0755]
src/HEXABLOCK/HexCrossElements.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCrossElements_build.cxx [new file with mode: 0755]
src/HEXABLOCK/HexCylinder.cxx [new file with mode: 0644]
src/HEXABLOCK/HexCylinder.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDiagnostics.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_Xml.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_asso.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_quads.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_trans.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEdge.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEdge.hxx [new file with mode: 0755]
src/HEXABLOCK/HexElements.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements.hxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_asso.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_bis.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_grid.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_piq.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_ter.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEltBase.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEltBase.hxx [new file with mode: 0755]
src/HEXABLOCK/HexGlobale.cxx [new file with mode: 0755]
src/HEXABLOCK/HexGlobale.hxx [new file with mode: 0755]
src/HEXABLOCK/HexGroup.cxx [new file with mode: 0755]
src/HEXABLOCK/HexGroup.hxx [new file with mode: 0755]
src/HEXABLOCK/HexHexa.cxx [new file with mode: 0755]
src/HEXABLOCK/HexHexa.hxx [new file with mode: 0755]
src/HEXABLOCK/HexKasBiCylinder.cxx [new file with mode: 0755]
src/HEXABLOCK/HexKasBiCylinder.hxx [new file with mode: 0755]
src/HEXABLOCK/HexKasLine.cxx [new file with mode: 0755]
src/HEXABLOCK/HexKasLine.hxx [new file with mode: 0755]
src/HEXABLOCK/HexKasPoint.cxx [new file with mode: 0755]
src/HEXABLOCK/HexKasPoint.hxx [new file with mode: 0755]
src/HEXABLOCK/HexKas_functions.cxx [new file with mode: 0755]
src/HEXABLOCK/HexKas_functions.hxx [new file with mode: 0755]
src/HEXABLOCK/HexLaw.cxx [new file with mode: 0644]
src/HEXABLOCK/HexLaw.hxx [new file with mode: 0755]
src/HEXABLOCK/HexMatrix.hxx [new file with mode: 0755]
src/HEXABLOCK/HexPipe.cxx [new file with mode: 0755]
src/HEXABLOCK/HexPipe.hxx [new file with mode: 0755]
src/HEXABLOCK/HexPropagation.hxx [new file with mode: 0755]
src/HEXABLOCK/HexQuad.cxx [new file with mode: 0755]
src/HEXABLOCK/HexQuad.hxx [new file with mode: 0755]
src/HEXABLOCK/HexShape.cxx [new file with mode: 0755]
src/HEXABLOCK/HexShape.hxx [new file with mode: 0755]
src/HEXABLOCK/HexVector.cxx [new file with mode: 0755]
src/HEXABLOCK/HexVector.hxx [new file with mode: 0755]
src/HEXABLOCK/HexVertex.cxx [new file with mode: 0755]
src/HEXABLOCK/HexVertex.hxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlTree.cxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlTree.hxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlWriter.cxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlWriter.hxx [new file with mode: 0755]
src/HEXABLOCK/Makefile.am [new file with mode: 0755]
src/HEXABLOCK/Sauver [new file with mode: 0755]
src/HEXABLOCK/dsave [new file with mode: 0644]
src/HEXABLOCK/hexa_base.hxx [new file with mode: 0755]
src/HEXABLOCK/hexa_utils.cxx [new file with mode: 0755]
src/HEXABLOCK/umake [new file with mode: 0755]
src/HEXABLOCKGUI/CutEdge_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Cylinder_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Disconnect_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/EdgeAssoc_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Edge_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Group_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/HEXABLOCKGUI.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Export.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Model.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Model.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx [new file with mode: 0644]
src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/Hexa_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/JoinQuad_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Law_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeCartesian_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeCylinder_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeCylinders_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeCylindrical_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeGrid_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeHemiSphere_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakePipe_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakePipes_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeRind_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeSpherical_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MakeTranslation_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Makefile.am [new file with mode: 0755]
src/HEXABLOCKGUI/MergeEdges_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MergeVertices_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Merge_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx [new file with mode: 0644]
src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1List1Spin1Btn_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1List_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1Sel_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1List1Check3Btn_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin1View1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1SelExt_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1SpinInt_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2List_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin3Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin2Rb_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel4Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2SelExt_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel2Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel4Spin2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List1Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin2Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin3Check_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_6Sel_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/DlgRef_Skeleton_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/Makefile.am [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/MyGEOMBase_Helper.cxx [new file with mode: 0644]
src/HEXABLOCKGUI/MyGEOMBase_Helper.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/MyGEOMBase_Skeleton.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/MyGEOMBase_Skeleton.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/Pipe_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/PrismQuad_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Propagation_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/QuadAssoc_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/QuadRevolution_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Quad_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/RemoveHexa_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/ReplaceHexa_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Resource.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/Resource.hxx [new file with mode: 0755]
src/HEXABLOCKGUI/Symmetry_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Transformation_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Vector_QTD.ui [new file with mode: 0644]
src/HEXABLOCKGUI/Vertex_QTD.ui [new file with mode: 0755]
src/HEXABLOCKGUI/klinkitemselectionmodel.cxx [new file with mode: 0644]
src/HEXABLOCKGUI/klinkitemselectionmodel.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/kmodelindexproxymapper.cxx [new file with mode: 0644]
src/HEXABLOCKGUI/kmodelindexproxymapper.hxx [new file with mode: 0644]
src/HEXABLOCKGUI/resources/ExecHEXABLOCK.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/HEXABLOCKCatalog.xml.in [new file with mode: 0755]
src/HEXABLOCKGUI/resources/HEXABLOCK_icons.ts [new file with mode: 0755]
src/HEXABLOCKGUI/resources/HEXABLOCK_msg_en.ts [new file with mode: 0755]
src/HEXABLOCKGUI/resources/HEXABLOCK_msg_fr.ts [new file with mode: 0755]
src/HEXABLOCKGUI/resources/ModuleHexablock.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/SalomeApp.xml.in [new file with mode: 0755]
src/HEXABLOCKGUI/resources/add_cylinder.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_edge.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_group.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_hexa.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_law.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_pipe.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_quad.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_vector.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/add_vertex.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/assoc_edge.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/assoc_quad.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/assoc_vertex.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/build_wire.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/compute_mesh.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/cut_edge.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/disconnect.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/join_quad.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/line.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/load_document.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/make_cylinder.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_cylinders.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_grid.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_hemisphere.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_pipe.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_pipes.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_symmetry.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/make_transformation.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/merge.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/new_document.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/perform__transformation.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/perform_symmetry.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/perform_transformation.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/point2.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/point3.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/point_line_intersection.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/pointonedge.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/pointonface.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/prism_quad.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/quad_revolution.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/remove_group.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/remove_hexa.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/remove_law.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/replace_hexa.png [new file with mode: 0644]
src/HEXABLOCKGUI/resources/save_document.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/select1.png [new file with mode: 0755]
src/HEXABLOCKGUI/resources/set_propagation.png [new file with mode: 0644]
src/HEXABLOCK_I/HEXABLOCK.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HEXABLOCK.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HEXABLOCK_1.cxx [new file with mode: 0644]
src/HEXABLOCK_I/HexCrossElements_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCrossElements_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCylinder_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCylinder_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexDocument_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexDocument_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexEdge_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexEdge_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexElements_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexElements_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexGroup_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexGroup_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexHexa_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexHexa_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexLaw_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexLaw_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPipe_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPipe_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPropagation_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPropagation_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexQuad_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexQuad_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVector_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVector_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVertex_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVertex_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/Makefile.am [new file with mode: 0755]
src/HEXABLOCK_I/hexablock.py [new file with mode: 0755]
src/Makefile.am [new file with mode: 0755]
src/TEST_CPP/HexEdgeTest.cxx [new file with mode: 0755]
src/TEST_CPP/HexEdgeTest.hxx [new file with mode: 0755]
src/TEST_CPP/HexVertexTest.cxx [new file with mode: 0755]
src/TEST_CPP/HexVertexTest.hxx [new file with mode: 0755]
src/TEST_CPP/Makefile.am [new file with mode: 0755]
src/TEST_CPP/Makefile.orig.am [new file with mode: 0755]
src/TEST_CPP/ModelTest.cxx [new file with mode: 0755]
src/TEST_CPP/ModelTest.hxx [new file with mode: 0755]
src/TEST_CPP/Test_HEXABLOCK.cxx [new file with mode: 0755]
src/TEST_CPP/test_hexa1.cxx [new file with mode: 0755]
src/TEST_CPP/test_quads.cxx [new file with mode: 0755]
src/TEST_CPP/test_tools.cxx [new file with mode: 0755]
src/TEST_CPP/test_unit.hxx [new file with mode: 0644]
src/TEST_PY/INTER_3_CYLINDRE.py [new file with mode: 0755]
src/TEST_PY/Makefile.am [new file with mode: 0755]
src/TEST_PY/TUYAU_COURBE.py [new file with mode: 0755]
src/TEST_PY/Test_HEXABLOCK.py [new file with mode: 0755]
src/TEST_PY/bielle.py [new file with mode: 0644]
src/TEST_PY/bielle_variante.py [new file with mode: 0644]
src/TEST_PY/bride.py [new file with mode: 0644]
src/TEST_PY/crank.stp [new file with mode: 0755]
src/TEST_PY/recettes/bielle.py [new file with mode: 0644]
src/TEST_PY/recettes/bielle.stp [new file with mode: 0644]
src/TEST_PY/recettes/cuve.brep [new file with mode: 0644]
src/TEST_PY/recettes/cuve.py [new file with mode: 0644]
src/TEST_PY/recettes/troisCylindres.brep [new file with mode: 0644]
src/TEST_PY/recettes/troisCylindres.py [new file with mode: 0644]
src/TEST_PY/recettes/tuyau.brep [new file with mode: 0755]
src/TEST_PY/recettes/tuyau.py [new file with mode: 0644]
src/TEST_PY/recettes/tuyauterie.brep [new file with mode: 0644]
src/TEST_PY/recettes/tuyauterie.py [new file with mode: 0644]
src/TEST_PY/tees.brep [new file with mode: 0755]
src/TEST_PY/test_BIELLE_bad_assoc.py [new file with mode: 0755]
src/TEST_PY/test_BIELLE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_HEXABLOCK.py [new file with mode: 0755]
src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_TUYAU_COURBE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py [new file with mode: 0755]
src/TEST_PY/test_distrib.py [new file with mode: 0755]
src/TEST_PY/test_unit/asso_grid.py [new file with mode: 0644]
src/TEST_PY/test_unit/bielle.py [new file with mode: 0644]
src/TEST_PY/test_unit/hexa_quads.py [new file with mode: 0644]
src/TEST_PY/test_unit/revolution.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_asso_lines.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_bugs.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_carre.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_cross.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_cuve.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_cylinders.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_disco.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_double_t.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_piquage.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_rind.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_sphere.py [new file with mode: 0644]
src/TEST_PY/test_unit/test_transfo.py [new file with mode: 0644]
src/TEST_PY/tuyau.brep [new file with mode: 0755]

diff --git a/AUTHORS b/AUTHORS
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/COPYING b/COPYING
new file mode 100755 (executable)
index 0000000..b1e3f5a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+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 and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, 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 library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete 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 distribute a copy of this License along with the
+Library.
+
+  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.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+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 Library, 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 Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you 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.
+
+  If distribution of 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 satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be 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.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library 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.
+
+  9. 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 Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+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 with
+this License.
+\f
+  11. 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 Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library 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 Library.
+
+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.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library 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.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser 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 Library
+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 Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+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
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "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
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. 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 LIBRARY 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
+LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  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 library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; 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.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/Doxyfile b/Doxyfile
new file mode 100755 (executable)
index 0000000..025a685
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,302 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Doxyfile 1.5.1-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = HEXA
+PROJECT_NUMBER         = [5.1.2]
+OUTPUT_DIRECTORY       = 
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /home/bphetsar/
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = NO
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = /export/home/bphetsar/PR_HEX/HEXA_SRC
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM \
+                         *.PY \
+                         *.C \
+                         *.H \
+                         *.tlh \
+                         *.diff \
+                         *.patch \
+                         *.moc \
+                         *.xpm \
+                         *.dox
+RECURSIVE              = yes
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = YES
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = yes
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = HEXA.tag
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/HEXABLOCK_version.h.in b/HEXABLOCK_version.h.in
new file mode 100755 (executable)
index 0000000..7b33574
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#if !defined(__HEXABLOCK_VERSION_H__)
+#define __HEXABLOCK_VERSION_H__
+
+/*
+  HEXABLOCK_VERSION is (major << 16) + (minor << 8) + patch.
+*/
+
+#define HEXABLOCK_VERSION_STR "@VERSION@"
+#define HEXABLOCK_VERSION     @XVERSION@
+#define HEXABLOCK_DEVELOPMENT @VERSION_DEV@
+
+#endif // __HEXABLOCK_VERSION_H__
diff --git a/INSTALL b/INSTALL
new file mode 100755 (executable)
index 0000000..4bf4d3a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1 @@
+SALOME6 : HEXABLOCK module
diff --git a/Makefile.am b/Makefile.am
new file mode 100755 (executable)
index 0000000..f5c062d
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
+                  -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                  -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+                  -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files 
+
+SUBDIRS = idl adm_local src bin doc
+
+DIST_SUBDIRS= idl adm_local src bin doc
+
+DISTCLEANFILES = a.out aclocal.m4 configure
+
+salomeinclude_DATA = HEXABLOCK_version.h
+
+EXTRA_DIST +=          \
+       build_configure \
+       clean_configure \
+       cppunit-report.xml
+
+dist-hook:
+       rm -rf `find $(distdir) -name CVS`
+
+unittest:
+       ( ./src/TEST_CPP/Test_HEXABLOCK )
diff --git a/NEWS b/NEWS
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100755 (executable)
index 0000000..c884482
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+test again again
diff --git a/adm_local/Makefile.am b/adm_local/Makefile.am
new file mode 100755 (executable)
index 0000000..59ef7d8
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = unix
diff --git a/adm_local/unix/Makefile.am b/adm_local/unix/Makefile.am
new file mode 100755 (executable)
index 0000000..4179c8f
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = config_files
diff --git a/adm_local/unix/config_files/Makefile.am b/adm_local/unix/config_files/Makefile.am
new file mode 100755 (executable)
index 0000000..74229f9
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_admlocalm4_DATA = \
+       check_sphinx.m4 \
+       check_HEXABLOCK.m4
diff --git a/adm_local/unix/config_files/check_HEXABLOCK.m4 b/adm_local/unix/config_files/check_HEXABLOCK.m4
new file mode 100755 (executable)
index 0000000..a7c1bec
--- /dev/null
@@ -0,0 +1,81 @@
+dnl Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+#  Check availability of HEXABLOCK module binary distribution
+#
+#  Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_HEXABLOCK],[
+
+AC_CHECKING(for HEXABLOCK)
+
+HEXABLOCK_ok=no
+
+HEXABLOCK_LDFLAGS=""
+HEXABLOCK_CXXFLAGS=""
+
+AC_ARG_WITH(hexablock,
+           --with-hexablock=DIR root directory path of HEXABLOCK installation,
+           HEXABLOCK_DIR="$withval",HEXABLOCK_DIR="")
+
+if test "x$HEXABLOCK_DIR" = "x" ; then
+
+# no --with-gui-dir option used
+
+  if test "x$HEXABLOCK_ROOT_DIR" != "x" ; then
+
+    # HEXABLOCK_ROOT_DIR environment variable defined
+    HEXABLOCK_DIR=$HEXABLOCK_ROOT_DIR
+
+  else
+
+    # search hexablock binaries in PATH variable
+    AC_PATH_PROG(TEMP, libHEXABLOCK.so)
+    if test "x$TEMP" != "x" ; then
+      HEXABLOCK_BIN_DIR=`dirname $TEMP`
+      HEXABLOCK_DIR=`dirname $HEXABLOCK_BIN_DIR`
+    fi
+
+  fi
+#
+fi
+
+if test -f ${HEXABLOCK_DIR}/lib/salome/libHEXABLOCK.so  ; then
+  HEXABLOCK_ok=yes
+  AC_MSG_RESULT(Using HEXABLOCK distribution in ${HEXABLOCK_DIR})
+
+  if test "x$HEXABLOCK_ROOT_DIR" == "x" ; then
+    HEXABLOCK_ROOT_DIR=${HEXABLOCK_DIR}
+  fi
+  AC_SUBST(HEXABLOCK_ROOT_DIR)
+
+  HEXABLOCK_LDFLAGS=-L${HEXABLOCK_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+  HEXABLOCK_CXXFLAGS=-I${HEXABLOCK_DIR}/include/salome
+    
+  AC_SUBST(HEXABLOCK_LDFLAGS)
+  AC_SUBST(HEXABLOCK_CXXFLAGS)
+
+else
+  AC_MSG_WARN("Cannot find compiled HEXABLOCK distribution")
+fi
+  
+AC_MSG_RESULT(for HEXABLOCK: $HEXABLOCK_ok)
+])dnl
diff --git a/adm_local/unix/config_files/check_libxml.m4 b/adm_local/unix/config_files/check_libxml.m4
new file mode 100755 (executable)
index 0000000..35a9c57
--- /dev/null
@@ -0,0 +1,74 @@
+dnl Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([AC_CHECK_LIBXML],[
+
+AC_CHECKING(for libxml)
+
+CPPFLAGS_old=$CPPFLAGS
+CXXFLAGS_old=$CXXFLAGS
+
+# Custom location of libxml2 package can be specified
+# thorugh LIBXML_DIR variable
+if test "x$LIBXML_DIR" != "x"
+then
+  CPPFLAGS="$CPPFLAGS -I$LIBXML_DIR/include/libxml2"
+  CXXFLAGS="$CXXFLAGS -I$LIBXML_DIR/include/libxml2"
+  if test "x$LIBXML_DIR" = "x/usr"
+  then
+    AC_MSG_NOTICE(Trying native Libxml2...)
+    TMPLIBS="-lxml2 $LIBS"
+  else
+    AC_MSG_NOTICE(Trying Libxml2 from $LIBXML_DIR ...)
+    TMPLIBS="-L$LIBXML_DIR/lib -lxml2 $LIBS"
+  fi
+  LIBXML_INCLUDES="-I$LIBXML_DIR/include/libxml2"
+else
+  CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+  CXXFLAGS="$CXXFLAGS -I/usr/include/libxml2"
+  TMPLIBS="-lxml2 $LIBS"
+  LIBXML_INCLUDES="-I/usr/include/libxml2"
+fi
+
+AC_CHECK_HEADER(libxml/parser.h,libxml_ok="yes",libxml_ok="no")
+
+if  test "x$libxml_ok" = "xyes"
+then
+  LIBS_old=$LIBS
+  LIBS=$TMPLIBS
+  AC_CHECK_LIB(xml2,xmlInitParser,libxml_ok="yes",libxml_ok="no",)
+  LIBS=$LIBS_old
+fi
+
+if test "x$libxml_ok" = "xyes"
+then
+  LIBXML_LIBS=$TMPLIBS
+fi
+
+AC_MSG_RESULT(for libxml: $libxml_ok)
+
+CXXFLAGS=$CXXFLAGS_old
+CPPFLAGS=$CPPFLAGS_old
+
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(LIBXML_INCLUDES)
+
+])dnl
+dnl
+
diff --git a/adm_local/unix/config_files/check_sphinx.m4 b/adm_local/unix/config_files/check_sphinx.m4
new file mode 100644 (file)
index 0000000..9964fda
--- /dev/null
@@ -0,0 +1,55 @@
+dnl Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_SPHINX],[
+
+AC_CHECKING(for sphinx doc generator)
+
+sphinx_ok=yes
+dnl where is sphinx ?
+AC_PATH_PROG(SPHINX,sphinx-build) 
+if test "x$SPHINX" = "x"
+then
+  AC_MSG_WARN(sphinx not found)
+  sphinx_ok=no
+fi
+
+dnl Can I load ths sphinx module ?
+dnl This code comes from the ax_python_module macro.
+if test -z $PYTHON;
+then
+   PYTHON="python"
+fi
+PYTHON_NAME=`basename $PYTHON`
+AC_MSG_CHECKING($PYTHON_NAME module: sphinx)
+   $PYTHON -c "import sphinx" 2>/dev/null
+   if test $? -eq 0;
+   then
+     AC_MSG_RESULT(yes)
+     eval AS_TR_CPP(HAVE_PYMOD_sphinx)=yes
+   else
+     AC_MSG_RESULT(no)
+     eval AS_TR_CPP(HAVE_PYMOD_sphinx)=no
+     sphinx_ok=no
+   fi
+
+AM_CONDITIONAL(SPHINX_IS_OK, [test x"$sphinx_ok" = xyes])
+
+])dnl
+dnl
diff --git a/adm_local/unix/config_files/i2_check_qt4.m4 b/adm_local/unix/config_files/i2_check_qt4.m4
new file mode 100755 (executable)
index 0000000..81bcc06
--- /dev/null
@@ -0,0 +1,446 @@
+dnl Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl the following variables are exported:
+dnl  QT_MOC
+dnl  QT_UIC
+dnl  QT_DIR
+dnl  qt4_cppflags
+dnl  qt4_ldflags
+dnl  qt4_libs
+dnl  WITH_QT4
+dnl qt4 is searched in the following order
+dnl   path given with --with-qt4 options
+dnl   presence of QTDIR variable
+dnl   /usr
+dnl when HAS_GUI is false (no salome gui) and nothing is said for qt4, qt4 is not checked
+dnl usages
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install 
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4=/opt/qt443
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4-includes=/usr/include/qt4
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4-includes=/usr/include/qt4 --with-qt4-libraries=/usr/lib -with-qt4-tools=/usr/bin
+dnl ./configure --prefix=/home/prascle/partage/maquettes/install --without-qt4
+dnl
+AC_DEFUN([I2_CHECK_QT4],
+[
+  AC_REQUIRE([AC_PROG_CXX])
+  AC_REQUIRE([AC_PROG_CPP])
+
+  qt_ok=no
+  qt4_wanted=yes
+  WITH_QT4=0
+
+  # --- check if qt4 standard install directory is defined (with subdirectories bin lib include)
+  qt4_install_path=""
+  AC_ARG_WITH([qt4],
+    AC_HELP_STRING([--with-qt4@<:@=DIR@:>@], [where the Qt4 package with a standard install is: default @<:@$QTDIR@:>@ or @<:@/usr@:>@]),
+                 [qt4_install_path=$withval], [withval=notset])
+
+  # --- if qt4 standard install directory is defined but with no path: QTDIR value if defined, or /usr
+  if test x${withval} = xyes
+  then
+    if test -z $QTDIR
+    then
+      qt4_install_path="/usr"
+    else
+      qt4_install_path=$QTDIR
+    fi
+  fi
+
+  # --- if qt4 standard install directory is not defined
+  #       if HAS_GUI= 0: Qt4 not wanted
+  #       else: QTDIR value if defined, or /usr
+  if test x${withval} = xnotset
+  then
+    if test x${HAS_GUI} = x0
+    then
+      qt4_wanted=no
+      AC_MSG_NOTICE([SALOME GUI not present, Qt4 not specified, skip detection])
+    else
+      if test -z $QTDIR
+      then
+        qt4_install_path="/usr"
+      else
+        if test $QTDIR = /usr/lib/qt3 ; then
+          if test -d /usr/lib/qt4 ; then
+            AC_MSG_RESULT(it is strange for a qt4 installation !)
+            AC_MSG_RESULT(/usr/lib/qt4 is present)
+            AC_MSG_RESULT(replacing QTDIR by /usr/lib/qt4)
+            QTDIR=/usr/lib/qt4
+          fi
+        fi
+        qt4_install_path=$QTDIR
+      fi
+    fi
+  fi
+  
+  # --- if qt4 standard install directory is not wanted: --without-qt4 or --with-qt4=no
+  if test x${withval} = xno
+  then
+    qt4_wanted=no
+    AC_MSG_NOTICE([Qt4 is not wanted, skip detection])
+  fi
+
+  QT_DIR=${qt4_install_path}
+  AC_SUBST(QT_DIR)
+
+  # ----------------------------------------------------------------------
+  # --- only when qt4 wanted (no explicit --without-qt4 nor --with-qt4=no)
+
+  if test x${qt4_wanted} = xyes
+  then
+
+  # --- check if qt4 includes directory is defined
+  qt4_include_path=""
+  AC_ARG_WITH([qt4-includes],
+    AC_HELP_STRING([--with-qt4-includes@<:@=DIR@:>@], [where the Qt4 includes are: default @<:@$QTDIR/include@:>@ or @<:@/usr/include@:>@]),
+                 [qt4_include_path=$withval], [withval=no])
+  if test x${withval} != xno
+  then
+    # --- qt4 includes directory is defined
+    if test x${qt4_include_path} = xyes
+    then
+      qt4_include_path="/usr/include"
+    fi
+  else
+    if test x${qt4_install_path} != x
+    then
+      qt4_include_path="${qt4_install_path}/include"
+    fi
+  fi
+
+
+  # --- check if qt4 libraries directory is defined
+  qt4_library_path=""
+  AC_ARG_WITH([qt4-libraries],
+    AC_HELP_STRING([--with-qt4-libraries@<:@=DIR@:>@], [where the Qt4 libraries are: default @<:@$QTDIR/lib@:>@ or @<:@/usr/lib@:>@]),
+                 [qt4_library_path=$withval], [withval=no])
+  if test x${withval} != xno
+  then
+    # --- qt4 libraries directory is defined
+    if test x${qt4_library_path} = xyes
+    then
+      qt4_library_path="/usr/lib"
+    fi
+  else
+    if test x${qt4_install_path} != x
+    then
+      qt4_library_path="${qt4_install_path}/lib"
+    fi
+  fi
+
+  # --- check if qt4 tools directory is defined
+  qt4_tools_path=""
+  AC_ARG_WITH([qt4-tools],
+    AC_HELP_STRING([--with-qt4-tools@<:@=DIR@:>@], [where the Qt4 executable tools are: default @<:@$QTDIR/bin@:>@ or @<:@/usr/bin@:>@]),
+                 [qt4_tools_path=$withval], [withval=no])
+  if test x${withval} != xno
+  then
+    # --- qt4 tools directory is defined
+    if test x${qt4_tools_path} = xyes
+    then
+      qt4_tools_path="/usr/bin"
+    fi
+  else
+    if test x${qt4_install_path} != x
+    then
+      qt4_tools_path="${qt4_install_path}/bin"
+    fi
+  fi
+
+
+  # test if qt4 is completely defined
+  qt4_defined=yes
+  if test x${qt4_include_path} = x
+  then
+    qt4_defined=no
+    AC_MSG_NOTICE([No Qt4 include path defined])
+  else
+    AC_MSG_NOTICE([Qt4 include path is ${qt4_include_path}])
+  fi
+  if test x${qt4_library_path} = x
+  then
+    qt4_defined=no
+    AC_MSG_NOTICE([No Qt4 library path defined])
+  else
+    AC_MSG_NOTICE([Qt4 library path is ${qt4_library_path}])
+  fi
+  if test x${qt4_tools_path} = x
+  then
+    qt4_defined=no
+    AC_MSG_NOTICE([No Qt4 tools path defined])
+  else
+    AC_MSG_NOTICE([Qt4 tools   path is ${qt4_tools_path}])
+  fi
+
+  # saving values for compilation variables
+  saved_CPPFLAGS=$CPPFLAGS
+  saved_LDFLAGS=$LDFLAGS
+  saved_LIBS=$LIBS
+
+  if ! test x${qt4_defined} = xno
+  then
+    # ask for qt4 support
+    AC_MSG_NOTICE([checking whether qt4 tools and headers are present])
+
+    # --- we test the presence of moc,first under the form moc-qt4, then moc
+    AC_PATH_PROGS(qt4_moc_found, [moc-qt4 moc], no, ${qt4_tools_path})
+    test x${qt4_moc_found} = xno && AC_MSG_ERROR([Qt4 moc command NOT FOUND])
+    QT_MOC=$qt4_moc_found
+    AC_SUBST(QT_MOC)
+
+    # --- we test the presence of uic,first under the form uic-qt4, then uic
+    AC_PATH_PROGS(qt4_uic_found, [uic-qt4 uic], no, ${qt4_tools_path})
+    test x${qt4_uic_found} = xno && AC_MSG_ERROR([Qt4 uic command NOT FOUND])
+    QT_UIC=$qt4_uic_found
+    AC_SUBST(QT_UIC)
+
+    # --- we test the presence of rcc,first under the form rcc-qt4, then rcc
+    AC_PATH_PROGS(qt4_rcc_found, [rcc-qt4 rcc], no, ${qt4_tools_path})
+    test x${qt4_rcc_found} = xno && AC_MSG_ERROR([Qt4 rcc command NOT FOUND])
+    QT_RCC=$qt4_rcc_found
+    AC_SUBST(QT_RCC)
+
+    # --- we test the header file presence and usability
+    QTINC=""
+    AC_CHECK_FILE($qt4_include_path/qt4/QtCore/qglobal.h,QTINC="/qt4",QTINC="")
+    qt4_include_path="$qt4_include_path${QTINC}"
+    qt4_cppflags=""
+    qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/QtCore"
+    qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/QtGui"
+    qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/Qt"
+    qt4_cppflags="${qt4_cppflags} -I$qt4_include_path"
+    CPPFLAGS="${CPPFLAGS} ${qt4_cppflags}"
+    AC_LANG_PUSH(C++)
+    AC_CHECK_HEADERS([qapplication.h],
+                     [qt4_header_found=yes],
+                     [qt4_header_found=no],
+                     [])
+    AC_LANG_POP(C++)
+    test x${qt4_header_found} = xno && AC_MSG_ERROR([Qt4 include file NOT FOUND])
+    AC_SUBST(qt4_cppflags)
+
+    # --- we test the library file presence and usability
+    if test x${qt4_library_path} = x/usr/lib
+    then
+      qt4_ldflags=""
+    else
+      qt4_ldflags="-L$qt4_library_path"
+    fi
+
+    AC_MSG_NOTICE([checking whether link with qt4 is working])
+    qt4_libs="-lQtCore -lQtGui"
+    LDFLAGS="${LDFLAGS} ${qt4_ldflags}"
+    LIBS="${LIBS} ${qt4_libs}"
+    AC_LANG_PUSH(C++)
+
+    AC_LINK_IFELSE([AC_LANG_PROGRAM(
+    [[ #include <QApplication>
+       #include <QPushButton> ]],
+    [[ QApplication app(0, 0);
+       QPushButton hello("Hello world!");
+       hello.resize(100, 30);
+       hello.show(); ]] )],
+    [qt4_lib_found=yes], [qt4_lib_found=no] )
+
+    test x${qt4_lib_found} = xno && AC_MSG_ERROR([Qt4 library NOT FOUND])
+
+    AC_LANG_POP(C++)
+    AC_SUBST(qt4_ldflags)
+    AC_SUBST(qt4_libs)
+
+    # --- after all tests are successful, we support Qt4
+    WITH_QT4=1
+    qt_ok=yes
+    AC_MSG_NOTICE([Qt4 support is OK])
+
+  else
+    # --- no Qt4 support
+    AC_MSG_NOTICE([No Qt4 support])
+  fi
+
+  # restoring saved values
+  CPPFLAGS=$saved_CPPFLAGS
+  LDFLAGS=$saved_LDFLAGS
+  LIBS=$saved_LIBS
+
+  fi
+  # --- end: only when qt4 wanted (no explicit --without-qt4 nor --with-qt4=no)
+  # ----------------------------------------------------------------------
+
+  # Propagate test into atlocal
+  AC_SUBST(WITH_QT4)
+
+  # Propagate test into Makefiles...
+  AM_CONDITIONAL(WITH_QT4, test $WITH_QT4 = 1)
+
+  # ... and into source files
+  AC_DEFINE_UNQUOTED(HAS_QT4, $WITH_QT4, [Qt4 library])
+
+])
+
+
+AC_DEFUN([I2_CHECK_QSCINTILLA],
+[
+  AC_REQUIRE([I2_CHECK_QT4])
+  qscintilla_ok=no
+  WITH_QSCI4=0
+
+  # ----------------------------------------------------------------------
+  # --- check qscintilla only when qt4 OK
+
+  if test x${WITH_QT4} = x1
+  then
+
+  # --- check if qsci4 includes directory is defined
+  qsci4_include_path=""
+  qsci4_cppflags=""
+
+  AC_ARG_WITH([qsci4-includes],
+    AC_HELP_STRING([--with-qsci4-includes@<:@=DIR@:>@], [where the Qsci4 includes are: default @<:@$QTDIR/include/Qsci@:>@ or @<:@/usr/include/Qsci@:>@]),
+              [qsci4_include_path=$withval])
+
+  if test x${qsci4_include_path} = x ; then
+    # --- "" --- try to use QSCINTILLA_DIR/include/Qsci
+    if test "x${QSCINTILLA_DIR}" != "x" ; then
+      qsci4_include_path="${QSCINTILLA_DIR}/include"
+    else
+      qsci4_include_path=no
+    fi
+  fi
+
+  if test x${qsci4_include_path} = xno ; then
+    # --- "no" --- no native installation, try to find in Qt
+    qsci4_include_path="${QT_DIR}/include${QTINC}/Qsci"
+    qsci4_cppflags=" -I$qsci4_include_path"
+    # " -I${QT_DIR}/include${QTINC}" is included in qt4_cppflags
+  else
+    if test x${qsci4_include_path} = xyes ; then
+      # --- "yes" --- try to find in /usr/include/Qsci
+      qsci4_include_path="/usr/include${QTINC}/Qsci"
+      qsci4_cppflags=" -I$qsci4_include_path"
+      # " -I/usr/include${QTINC}" is included in qt4_cppflags or by default (if QTINC is empty)
+    else
+      # --- "other" --- try to find in given dir
+      qsci4_cppflags=" -I$qsci4_include_path/Qsci -I$qsci4_include_path"
+    fi
+  fi
+
+  AC_MSG_NOTICE($qsci4_cppflags)
+
+  # --- check if qsci4 libraries directory is defined
+  qsci4_library_path=""
+
+  AC_ARG_WITH([qsci4-libraries],
+    AC_HELP_STRING([--with-qsci4-libraries@<:@=DIR@:>@], [where the Qsci4 libraries are: default @<:@$QTDIR/lib@:>@ or @<:@/usr/lib@:>@]),
+              [qsci4_library_path=$withval])
+
+  if test x${qsci4_library_path} = x ; then
+    # --- "" --- try to use QSCINTILLA_DIR/lib
+    if test "x${QSCINTILLA_DIR}" != "x" ; then
+      qsci4_library_path="${QSCINTILLA_DIR}/lib"
+    else
+      qsci4_library_path=no
+    fi
+  fi
+
+  if test x${qsci4_library_path} = xno ; then
+    # --- "no" --- no native installation, try to find in Qt
+    qsci4_library_path="${QT_DIR}/lib"
+  else
+    if test x${qsci4_library_path} = xyes ; then
+      # --- "yes" --- try to find in /usr/lib
+      qsci4_library_path="/usr/lib"
+    fi
+  fi
+
+  AC_MSG_NOTICE($qsci4_library_path)
+
+  # saving values for compilation variables
+  saved_CPPFLAGS=$CPPFLAGS
+  saved_LDFLAGS=$LDFLAGS
+  saved_LIBS=$LIBS
+
+  # ask for qsci4 support
+  AC_MSG_NOTICE([checking whether qscintilla for qt4 headers are present])
+
+  # --- we test the header file presence and usability
+  CPPFLAGS="${CPPFLAGS} ${qsci4_cppflags} ${qt4_cppflags}"
+  AC_LANG_PUSH(C++)
+  AC_CHECK_HEADERS([qsciscintilla.h],
+                   [qsci4_header_found=yes],
+                   [qsci4_header_found=no],
+                   [])
+  AC_LANG_POP(C++)
+  if test x${qsci4_header_found} = xyes
+  then
+    AC_SUBST(qsci4_cppflags)
+
+    # --- we test the library file presence and usability
+    if test x${qsci4_library_path} = x/usr/lib/qt4/lib
+    then
+      qsci4_library_path=/usr/lib
+    fi
+    if test x${qsci4_library_path} = x/usr/lib
+    then
+      qsci4_ldflags=""
+    else
+      qsci4_ldflags="-L$qsci4_library_path"
+    fi
+
+    AC_MSG_NOTICE([checking whether qscintilla2 library is present])
+    qsci4_libs=-lqscintilla2
+    AC_CHECK_FILE([${qsci4_library_path}/libqscintilla2.so],
+                   [qsci4_library_found=yes],
+                   [qsci4_library_found=no])
+    if test x${qsci4_library_found} = xyes
+    then
+      AC_MSG_NOTICE([qscintilla for qt4 support])
+      AC_SUBST(qsci4_ldflags)
+      AC_SUBST(qsci4_libs)
+      WITH_QSCI4=1
+      qscintilla_ok=yes
+    fi
+
+  else
+    AC_MSG_NOTICE([no support for qscintilla for qt4])
+  fi
+
+  # restoring saved values
+  CPPFLAGS=$saved_CPPFLAGS
+  LDFLAGS=$saved_LDFLAGS
+  LIBS=$saved_LIBS
+
+  else
+  # --- end: check qscintilla only when qt4 OK
+  # ----------------------------------------------------------------------
+    AC_MSG_NOTICE([qscintilla for qt4 not checked because Qt4 not wanted or not detected])
+  fi
+
+  # Propagate test into atlocal
+  AC_SUBST(WITH_QSCI4)
+  
+  # Propagate test into Makefiles...
+  AM_CONDITIONAL(WITH_QSCI4, test $WITH_QSCI4 = 1)
+
+  # ... and into source files
+  AC_DEFINE_UNQUOTED(HAS_QSCI4, $WITH_QSCI4, [QsciScintilla library])
+
+])
diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am
new file mode 100755 (executable)
index 0000000..c961ae7
--- /dev/null
@@ -0,0 +1,87 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
+
+# Standard directory for installation
+#
+salomeincludedir   = $(includedir)/salome
+libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+bindir             = $(prefix)/bin/salome
+salomescriptdir    = $(bindir)
+salomepythondir    = $(pythondir)/salome
+salomepyexecdir    = $(pyexecdir)/salome
+
+# Directory for installing idl files
+salomeidldir       = $(prefix)/idl/salome
+
+# Directory for installing resource files
+salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir        = $(prefix)/adm_local
+admlocalunixdir    = $(admlocaldir)/unix
+admlocalm4dir      = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(salomepythondir)/shared_modules
+
+# Documentation directory
+docdir             = $(datadir)/doc/salome
+
+# common rules
+
+# meta object implementation files generation (moc)
+%_moc.cxx: %.hxx
+       $(MOC) $< -o $@
+
+# translation (*.qm) files generation (lrelease)
+%.qm: resources/%.ts
+       $(LRELEASE) $< -qm $@
+
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+       $(QRCC) $< -o $@ -name $(*F)
+
+# qt forms files generation (uic)
+ui_%.h: %.ui
+       $(UIC) -o $@ $<
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.hxx) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+             $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=resources/%.ts)
+
+# customize clean operation
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx
+       rm -f @builddir@/*.qm
+       rm -f @builddir@/ui_*.h
+       rm -f @builddir@/qrc_*.cxx
+
+# tests
+tests: unittest
+
+unittest: $(UNIT_TEST_PROG)
+       @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+           $(UNIT_TEST_PROG);                     \
+       fi;
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100755 (executable)
index 0000000..24139cd
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_salomescript_SCRIPTS = \
+       myrunSalome.py
+
+nodist_salomescript_SCRIPTS = \
+        runAppli
+
+nodist_salomescript_DATA = \
+       VERSION
diff --git a/bin/VERSION.in b/bin/VERSION.in
new file mode 100755 (executable)
index 0000000..2fb4f7b
--- /dev/null
@@ -0,0 +1,2 @@
+[SALOME HEXABLOCK] : @VERSION@
+[DEVELOPMENT]      : @VERSION_DEV@
diff --git a/bin/myrunSalome.py b/bin/myrunSalome.py
new file mode 100755 (executable)
index 0000000..ce9b511
--- /dev/null
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+def test(clt):
+   """
+        Test function that creates an instance of HEXABLOCK component
+        usage : hexablock = test(clt)
+   """
+   # create an LifeCycleCORBA instance
+   import LifeCycleCORBA
+   lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+   import HEXABLOCK_ORB
+   hexablock = lcc.FindOrLoadComponent("FactoryServer", "HEXABLOCK")
+   return hexablock
+
+#
+
+if __name__ == "__main__":
+   import user
+   from runSalome import *
+   clt,args = main()
+   
+   #
+   #  Impression arborescence Naming Service
+   #
+   
+   if clt != None:
+     print
+     print " --- registered objects tree in Naming Service ---"
+     clt.showNS()
+     session=clt.waitNS("/Kernel/Session")
+     catalog=clt.waitNS("/Kernel/ModulCatalog")
+     import socket
+     container =  clt.waitNS("/Containers/" + socket.gethostname().split('.')[0] + "/FactoryServer")
diff --git a/bin/runAppli.in b/bin/runAppli.in
new file mode 100755 (executable)
index 0000000..dfc80a5
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+if [ -z "${KERNEL_ROOT_DIR}" ] ; then 
+export KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@
+fi
+if [ -z "${HEXA_ROOT_DIR}" ] ; then 
+export HEXA_ROOT_DIR=@prefix@
+fi
+
+searchFreePort() {
+    echo -n "Searching for a free port for naming service: "
+    export NSPORT=2810
+    local limit=$NSPORT
+    let limit=limit+100
+    while [ 1 ]
+    do
+        aRes=`netstat -ltn | grep -E :${NSPORT}`
+        if [ -z "$aRes" ]; then
+            echo ${NSPORT} - Ok
+            local myhost=`hostname`
+            export OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg
+            local initref="NameService=corbaname::"`hostname`":$NSPORT"
+            if [[ `python -c "import CORBA; print CORBA.ORB_ID"` = "omniORB4" ]]; then
+                echo "InitRef = $initref" > $OMNIORB_CONFIG
+            else
+                echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+            fi
+            break
+        fi
+        echo -n "${NSPORT} "
+        if [[ $NSPORT -eq $limit ]] ; then
+            echo
+            echo "Can't find a free port to launch omniNames"
+            echo "Try to kill the running servers and then launch SALOME again."
+            exit
+        fi
+        let NSPORT=NSPORT+1
+    done
+}
+
+searchFreePort
+
+
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i $HEXA_ROOT_DIR/bin/salome/myrunSalome.py --modules=HEXA --killall
diff --git a/build_configure b/build_configure
new file mode 100755 (executable)
index 0000000..966ed73
--- /dev/null
@@ -0,0 +1,128 @@
+#!/bin/bash
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+ORIG_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+
+########################################################################
+# Test if the KERNEL_ROOT_DIR is set correctly
+
+if test ! -d "${KERNEL_ROOT_DIR}"; then
+    echo "failed : KERNEL_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+    echo "failed : GUI_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the GEOM_ROOT_DIR is set correctly
+if test ! -d "${GEOM_ROOT_DIR}"; then
+    echo "failed : GEOM_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+cd ${CONF_DIR}
+ABS_CONF_DIR=`pwd`
+
+mkdir -p salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
+
+cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+
+#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+
+# remove KERNEL deprecated configure files
+#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
+#  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
+#    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
+#    do
+#      rm -f salome_adm/unix/config_files/${deprecated}
+#      done
+
+
+# ____________________________________________________________________
+# aclocal creates the aclocal.m4 file from the standard macro and the
+# custom macro embedded in the directory salome_adm/unix/config_files
+# and KERNEL config_files directory.
+# output:
+#   aclocal.m4
+#   autom4te.cache (directory)
+echo "====================================================== aclocal"
+
+
+if test -d "${GUI_ROOT_DIR}"; then
+  aclocal -I adm_local/unix/config_files \
+          -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+          -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+          -I ${GUI_ROOT_DIR}/adm_local/unix/config_files || exit 1
+else
+  aclocal -I adm_local/unix/config_files \
+          -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+          -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
+fi
+
+
+# ____________________________________________________________________
+# libtoolize creates some configuration files (ltmain.sh,
+# config.guess and config.sub). It only depends on the libtool
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
+# output:
+#   salome_adm/unix/config_files/config.guess
+#   salome_adm/unix/config_files/config.sub
+#   salome_adm/unix/config_files/ltmain.sh
+#echo "====================================================== libtoolize"
+
+libtoolize --force --copy --automake || exit 1
+
+# ____________________________________________________________________
+# autoconf creates the configure script from the file configure.ac (or
+# configure.in if configure.ac doesn't exist)
+# output:
+#   configure
+echo "====================================================== autoconf"
+
+autoconf
+
+# ____________________________________________________________________
+# automake creates some scripts used in building process
+# (install-sh, missing, ...). It only depends on the automake
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
+# creates the Makefile.in files from the Makefile.am files.
+# output:
+#   salome_adm/unix/config_files/compile
+#   salome_adm/unix/config_files/depcomp
+#   salome_adm/unix/config_files/install-sh
+#   salome_adm/unix/config_files/missing
+#   salome_adm/unix/config_files/py-compile
+#   Makefile.in (from Makefile.am)
+echo "====================================================== automake"
+
+automake --copy --gnu --add-missing
diff --git a/clean_configure b/clean_configure
new file mode 100755 (executable)
index 0000000..a5d9070
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+rm -rf autom4te.cache aclocal.m4 configure make_config
+find . -name "*~" -print -exec rm {} \;
+find . -name "*.pyc" -print -exec rm {} \;
+find . -name Makefile.in | xargs rm -f
+( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh l*.m4 ltmain.sh missing py-compile )
diff --git a/configure.ac b/configure.ac
new file mode 100755 (executable)
index 0000000..e29be5b
--- /dev/null
@@ -0,0 +1,364 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+AC_INIT([Salome6 Project HEXABLOCK module],[6.5.0], [webmaster.salome@opencascade.com], [SalomeHEXABLOCK])
+AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE([-Wno-portability])
+
+SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
+AC_SUBST(SHORT_VERSION)
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+AC_SUBST(XVERSION)
+VERSION_DEV=0
+AC_SUBST(VERSION_DEV)
+
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=hexablock
+AC_SUBST(MODULE_NAME)
+
+dnl
+dnl Initialize source and build root directories
+dnl
+
+ROOT_BUILDDIR=`pwd`
+ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+cd $ROOT_SRCDIR
+ROOT_SRCDIR=`pwd`
+cd $ROOT_BUILDDIR
+
+AC_SUBST(ROOT_SRCDIR)
+AC_SUBST(ROOT_BUILDDIR)
+
+echo
+echo Source root directory : $ROOT_SRCDIR
+echo Build  root directory : $ROOT_BUILDDIR
+echo
+echo
+
+AC_CHECK_PROG(SHELL,sh)
+AC_SUBST(SHELL)
+
+if test -z "$AR"; then
+   AC_CHECK_PROGS(AR,ar xar,:,$PATH)
+fi
+AC_SUBST(AR)
+
+dnl Export the AR macro so that it will be placed in the libtool file
+dnl correctly.
+export AR
+
+echo
+echo ---------------------------------------------
+echo testing make
+echo ---------------------------------------------
+echo
+
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+dnl 
+dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
+
+AC_ENABLE_DEBUG(yes)
+AC_DISABLE_PRODUCTION
+
+echo ---------------------------------------------
+echo testing libtool
+echo ---------------------------------------------
+
+dnl first, we set static to no!
+dnl if we want it, use --enable-static
+AC_ENABLE_STATIC(no)
+
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+dnl Fix up the INSTALL macro if it s a relative path. We want the
+dnl full-path to the binary instead.
+case "$INSTALL" in
+   *install-sh*)
+      INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+      ;;
+esac
+
+echo
+echo ---------------------------------------------
+echo testing C/C++
+echo ---------------------------------------------
+echo
+
+cc_ok=no
+dnl inutil car libtool
+dnl AC_PROG_CC
+AC_PROG_CXX
+AC_CXX_WARNINGS
+AC_CXX_TEMPLATE_OPTIONS
+AC_DEPEND_FLAG
+# AC_CC_WARNINGS([ansi])
+cc_ok=yes
+
+dnl Library libdl :
+AC_CHECK_LIB(dl,dlopen)
+
+dnl Library librt : for alpha/osf
+AC_CHECK_LIB(rt,nanosleep)
+
+dnl add library libm :
+AC_CHECK_LIB(m,ceil)
+
+AC_CXX_USE_STD_IOSTREAM
+AC_CXX_HAVE_SSTREAM
+
+dnl
+dnl ---------------------------------------------
+dnl testing linker
+dnl ---------------------------------------------
+dnl
+
+AC_LINKER_OPTIONS
+
+echo
+echo ---------------------------------------------
+echo testing threads
+echo ---------------------------------------------
+echo
+
+ENABLE_PTHREADS
+
+echo
+echo ---------------------------------------------
+echo testing python
+echo ---------------------------------------------
+echo
+
+CHECK_PYTHON
+
+AM_PATH_PYTHON(2.3)
+
+echo
+echo ---------------------------------------------
+echo testing QT
+echo ---------------------------------------------
+echo
+
+CHECK_QT
+
+
+
+
+
+
+
+echo
+echo ---------------------------------------------
+echo BOOST Library
+echo ---------------------------------------------
+echo
+
+CHECK_BOOST
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+CHECK_CAS
+
+echo
+echo ---------------------------------------------
+echo testing omniORB
+echo ---------------------------------------------
+echo
+
+CHECK_OMNIORB
+
+echo
+echo ---------------------------------------------
+echo default ORB : omniORB
+echo ---------------------------------------------
+echo
+
+DEFAULT_ORB=omniORB
+CHECK_CORBA
+
+AC_SUBST_FILE(CORBA)
+corba=make_$ORB
+CORBA=adm_local/unix/$corba
+
+
+
+echo
+echo ----------------------------------------------
+echo testing CPPUNIT only required for unit testing
+echo ----------------------------------------------
+echo
+CHECK_CPPUNIT
+
+
+
+echo
+echo ----------------------------------------------
+echo testing Sphinx
+echo ----------------------------------------------
+echo
+
+CHECK_SPHINX
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Kernel
+echo ---------------------------------------------
+echo
+
+CHECK_KERNEL
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_SALOME_GUI
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Geom
+echo ---------------------------------------------
+echo
+
+CHECK_GEOM
+
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+CHECK_CORBA_IN_GUI
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+  echo "failed : For configure HEXABLOCK module necessary full GUI !"
+  exit
+fi
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing LIBXML
+echo ---------------------------------------------
+echo
+AC_CHECK_LIBXML
+
+
+echo
+echo ---------------------------------------------
+echo Testing QT4
+echo ---------------------------------------------
+echo
+I2_CHECK_QT4
+
+
+
+echo
+echo ---------------------------------------------
+echo testing VTK
+echo ---------------------------------------------
+echo
+CHECK_VTK
+
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+echo Configure
+variables="cc_ok threads_ok boost_ok python_ok omniORB_ok qt_ok occ_ok sphinx_ok vtk_ok Kernel_ok SalomeGUI_ok Geom_ok"
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
+dnl We don t need to say when we re entering directories if we re using
+dnl GNU make becuase make does it for us.
+if test "X$GMAKE" = "Xyes"; then
+   AC_SUBST(SETX) SETX=":"
+else
+   AC_SUBST(SETX) SETX="set -x"
+fi
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+AC_OUTPUT_COMMANDS([ \
+      chmod +x ./bin/*; \
+])
+
+
+
+AM_CONDITIONAL(WINDOWS, [ test ])
+
+# This list is initiated using autoscan and must be updated manually
+# when adding a new file <filename>.in to manage. When you execute
+# autoscan, the Makefile list is generated in the output file configure.scan.
+#
+# This could be helpfull to update de configuration.
+AC_OUTPUT([ \
+  salome_adm/unix/SALOMEconfig.h \
+  adm_local/Makefile \
+  adm_local/unix/Makefile \
+  adm_local/unix/config_files/Makefile \
+  bin/VERSION \
+  bin/runAppli \
+  bin/Makefile \
+  doc/Makefile \
+  doc/conf.py \
+  HEXABLOCK_version.h \
+  src/Makefile \
+  src/HEXABLOCKGUI/Makefile \
+  src/HEXABLOCKGUI/MyDlgRef/Makefile \
+  src/HEXABLOCKGUI/resources/HEXABLOCKCatalog.xml \
+  src/HEXABLOCKGUI/resources/SalomeApp.xml \
+  src/HEXABLOCK/Makefile \
+  src/HEXABLOCK_I/Makefile \
+  src/TEST_CPP/Makefile \
+  src/TEST_PY/Makefile \
+  idl/Makefile \
+  Makefile \
+])
diff --git a/cppunit-report.xml b/cppunit-report.xml
new file mode 100755 (executable)
index 0000000..3f7a255
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
+<TestRun>
+  <FailedTests></FailedTests>
+  <SuccessfulTests>
+    <Test id="1">
+      <Name>VertexTest::TestGetX</Name>
+    </Test>
+    <Test id="2">
+      <Name>VertexTest::TestGetY</Name>
+    </Test>
+    <Test id="3">
+      <Name>VertexTest::TestGetZ</Name>
+    </Test>
+    <Test id="4">
+      <Name>EdgeTest::TestGetVertex</Name>
+    </Test>
+  </SuccessfulTests>
+  <Statistics>
+    <Tests>4</Tests>
+    <FailuresTotal>0</FailuresTotal>
+    <Errors>0</Errors>
+    <Failures>0</Failures>
+  </Statistics>
+</TestRun>
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100755 (executable)
index 0000000..1510520
--- /dev/null
@@ -0,0 +1,195 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# Makefile.am for Sphinx documentation of HEXABLOCK component
+# Author: Marine Marcilhac From CS
+
+.PHONY : latex
+
+if SPHINX_IS_OK
+
+hexablockdoc_DATA=html/index.html
+
+html/index.html:$(RSTFILES)
+       make htm
+
+endif
+
+dev_docs: build_dev_docs install_dev_docs
+
+build_dev_docs:
+       doxygen
+
+help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html      to make standalone HTML files"
+       @echo "  pickle    to make pickle files"
+       @echo "  json      to make JSON files"
+       @echo "  htmlhelp  to make HTML files and a HTML help project"
+       @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+       @echo "  changes   to make an overview over all changed/added/deprecated items"
+       @echo "  linkcheck to check all external links for integrity"
+
+DOXFILES=
+
+EXTRA_DIST+= $(DOXFILES)
+
+hexablockdocdir=$(docdir)/gui/HEXABLOCK
+hexablockdevdocdir=$(docdir)/gui/HEXABLOCK/dev
+
+SPHINXOPTS      =
+SOURCEDIR       = $(srcdir)
+SPHINXBUILD     = sphinx-build
+PAPEROPT_a4     = -D latex_paper_size=a4
+ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
+
+htm:
+       mkdir -p html doctrees
+       $(SPHINXBUILD) -c $(top_builddir)/doc -b html $(ALLSPHINXOPTS) html
+       @echo
+       @echo "Build finished. The HTML pages are in html."
+
+latex:
+       mkdir -p latex doctrees
+       $(SPHINXBUILD) -c $(top_builddir)/doc -b latex $(ALLSPHINXOPTS) latex
+       @echo
+       @echo "Build finished; the LaTeX files are in latex."
+       @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+             "run these through (pdf)latex."
+
+pdf:
+       $(SPHINXBUILD) -c $(top_builddir)/doc -b pdf $(ALLSPHINXOPTS) pdf
+       @echo
+       @echo "Build finished. The pdf documents are in pdf."
+
+html:
+                mkdir -p $@
+
+htmldev:
+                mkdir -p $@
+
+RSTFILES= \
+       annexe.rst                  \
+       block_method.rst            \
+       cad.rst                     \
+       creategrids.rst             \
+       full_example_bridle.rst     \
+       general.rst                 \
+       gui.rst                     \
+       gui_asso_quad_to_geom.rst   \
+       gui_blocks_for_cyl_pipe.rst \
+       gui_component.rst           \
+       gui_cut_hexa.rst            \
+       gui_cyl.rst                 \
+       gui_disc_elmts.rst          \
+       gui_discret_law.rst         \
+       gui_document.rst            \
+       gui_edge.rst                \
+       gui_elements.rst            \
+       gui_groups.rst              \
+       gui_hexahedron.rst          \
+       gui_make_elmts.rst          \
+       gui_make_symmetry.rst       \
+       gui_merge_elmts.rst         \
+       gui_mesh.rst                \
+       gui_modify_elmts.rst        \
+       gui_modify_symmetry.rst     \
+       gui_pipe.rst                \
+       gui_prism_join_quad.rst     \
+       gui_propag.rst              \
+       gui_quadrangle.rst          \
+       gui_quad_revolution.rst     \
+       gui_remove.rst              \
+       gui_replace_hexa.rst        \
+       gui_hemisphere.rst          \
+       gui_vector.rst              \
+       gui_vertex.rst              \
+       index.rst                   \
+       interactive.rst             \
+       intro_association.rst       \
+       intro_groups.rst            \
+       intro_mesh.rst              \
+       intro_python.rst            \
+       mesh.rst                    \
+       python.rst                  \
+       tui.rst                     \
+       tui_asso_quad_to_geom.rst   \
+       tui_blocks_for_cyl_pipe.rst \
+       tui_cartgrid.rst            \
+       tui_component.rst           \
+       tui_cut_hexa.rst            \
+       tui_cylgrid.rst             \
+       tui_cyl.rst                 \
+       tui_disc_elmts.rst          \
+       tui_discret_law.rst         \
+       tui_document.rst            \
+       tui_edge.rst                \
+       tui_elements.rst            \
+       tui_groups.rst              \
+       tui_hexahedron.rst          \
+       tui_make_elmts.rst          \
+       tui_merge_elmts.rst         \
+       tui_mesh.rst                \
+       tui_modify_elmts.rst        \
+       tui_pipe.rst                \
+       tui_prism_join_quad.rst     \
+       tui_propag.rst              \
+       tui_quadrangle.rst          \
+       tui_remove.rst              \
+       tui_sphergrid.rst           \
+       tui_vector.rst              \
+       tui_vertex.rst
+
+
+
+
+
+
+
+EXTRA_DIST+= $(RSTFILES) _static cas_test_python
+
+install-data-local:
+       $(INSTALL) -d $(DESTDIR)$(hexablockdocdir)
+       if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
+       cp -rf $$b"html"/* $(DESTDIR)$(hexablockdocdir) ; \
+       if test -f $$b"latex"/using.pdf; then cp -f $$b"latex"/using.pdf $(DESTDIR)$(hexablockdocdir) ; fi; \
+       if test -f $$b"latex"/integration.pdf; then cp -f $$b"latex"/integration.pdf $(DESTDIR)$(hexablockdocdir) ; fi;
+
+install_dev_docs:
+       $(INSTALL) -d $(DESTDIR)$(hexablockdevdocdir)
+       if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \
+       find $$b"htmldev" -name "*.*" -exec cp -rf {} $(DESTDIR)$(hexablockdevdocdir) ';' ; \
+       cp -rf $(top_srcdir)/src/hexablockloader/samples $(DESTDIR)$(hexablockdevdocdir); \
+       rm -rf $(DESTDIR)$(hexablockdevdocdir)/samples/CVS;
+
+uninstall-local:
+       chmod -R +w $(DESTDIR)$(hexablockdocdir)
+       rm -rf $(DESTDIR)$(hexablockdocdir)/*
+
+clean-local:
+       -rm -rf html latex doctrees
+       if test -d "html"; then rm -rf html ; fi
+
+dist-hook:
+       if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
+       if test -d $$b"html"; then cp -rf $$b"html" $(distdir) ; fi; \
+       if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \
+       if test -d $$b"htmldev"; then cp -rf $$b"htmldev" $(distdir) ; fi
diff --git a/doc/_static/EX2.PNG b/doc/_static/EX2.PNG
new file mode 100644 (file)
index 0000000..ef5e1c8
Binary files /dev/null and b/doc/_static/EX2.PNG differ
diff --git a/doc/_static/EX3.PNG b/doc/_static/EX3.PNG
new file mode 100644 (file)
index 0000000..27a87bf
Binary files /dev/null and b/doc/_static/EX3.PNG differ
diff --git a/doc/_static/EX4.PNG b/doc/_static/EX4.PNG
new file mode 100644 (file)
index 0000000..7006bf2
Binary files /dev/null and b/doc/_static/EX4.PNG differ
diff --git a/doc/_static/EX5.PNG b/doc/_static/EX5.PNG
new file mode 100644 (file)
index 0000000..8d43543
Binary files /dev/null and b/doc/_static/EX5.PNG differ
diff --git a/doc/_static/EX6.PNG b/doc/_static/EX6.PNG
new file mode 100644 (file)
index 0000000..33370aa
Binary files /dev/null and b/doc/_static/EX6.PNG differ
diff --git a/doc/_static/EX7.PNG b/doc/_static/EX7.PNG
new file mode 100644 (file)
index 0000000..5a904c6
Binary files /dev/null and b/doc/_static/EX7.PNG differ
diff --git a/doc/_static/HEXAHEDRON.PNG b/doc/_static/HEXAHEDRON.PNG
new file mode 100644 (file)
index 0000000..b2e15de
Binary files /dev/null and b/doc/_static/HEXAHEDRON.PNG differ
diff --git a/doc/_static/Sans titre.PNG b/doc/_static/Sans titre.PNG
new file mode 100644 (file)
index 0000000..7bcdf6b
Binary files /dev/null and b/doc/_static/Sans titre.PNG differ
diff --git a/doc/_static/association.PNG b/doc/_static/association.PNG
new file mode 100644 (file)
index 0000000..8a972bf
Binary files /dev/null and b/doc/_static/association.PNG differ
diff --git a/doc/_static/association2.PNG b/doc/_static/association2.PNG
new file mode 100644 (file)
index 0000000..b0ffe5e
Binary files /dev/null and b/doc/_static/association2.PNG differ
diff --git a/doc/_static/before_quadrevolution.png b/doc/_static/before_quadrevolution.png
new file mode 100644 (file)
index 0000000..5a826d1
Binary files /dev/null and b/doc/_static/before_quadrevolution.png differ
diff --git a/doc/_static/before_replacehexa.png b/doc/_static/before_replacehexa.png
new file mode 100644 (file)
index 0000000..8d28465
Binary files /dev/null and b/doc/_static/before_replacehexa.png differ
diff --git a/doc/_static/bielle.PNG b/doc/_static/bielle.PNG
new file mode 100644 (file)
index 0000000..77d5abd
Binary files /dev/null and b/doc/_static/bielle.PNG differ
diff --git a/doc/_static/bielle_mesh.png b/doc/_static/bielle_mesh.png
new file mode 100644 (file)
index 0000000..1add94c
Binary files /dev/null and b/doc/_static/bielle_mesh.png differ
diff --git a/doc/_static/bride.PNG b/doc/_static/bride.PNG
new file mode 100644 (file)
index 0000000..a15e141
Binary files /dev/null and b/doc/_static/bride.PNG differ
diff --git a/doc/_static/bride_geom.png b/doc/_static/bride_geom.png
new file mode 100644 (file)
index 0000000..3226009
Binary files /dev/null and b/doc/_static/bride_geom.png differ
diff --git a/doc/_static/bride_model1.png b/doc/_static/bride_model1.png
new file mode 100644 (file)
index 0000000..fb9d540
Binary files /dev/null and b/doc/_static/bride_model1.png differ
diff --git a/doc/_static/bride_model2.png b/doc/_static/bride_model2.png
new file mode 100644 (file)
index 0000000..6c70938
Binary files /dev/null and b/doc/_static/bride_model2.png differ
diff --git a/doc/_static/cad_bielle.PNG b/doc/_static/cad_bielle.PNG
new file mode 100644 (file)
index 0000000..6a74452
Binary files /dev/null and b/doc/_static/cad_bielle.PNG differ
diff --git a/doc/_static/cartgrid1.PNG b/doc/_static/cartgrid1.PNG
new file mode 100644 (file)
index 0000000..23333c6
Binary files /dev/null and b/doc/_static/cartgrid1.PNG differ
diff --git a/doc/_static/cartgrid2.PNG b/doc/_static/cartgrid2.PNG
new file mode 100644 (file)
index 0000000..cfcabfd
Binary files /dev/null and b/doc/_static/cartgrid2.PNG differ
diff --git a/doc/_static/cartgrid3.png b/doc/_static/cartgrid3.png
new file mode 100644 (file)
index 0000000..6b68bf6
Binary files /dev/null and b/doc/_static/cartgrid3.png differ
diff --git a/doc/_static/component1.png b/doc/_static/component1.png
new file mode 100644 (file)
index 0000000..89d1b74
Binary files /dev/null and b/doc/_static/component1.png differ
diff --git a/doc/_static/component2.png b/doc/_static/component2.png
new file mode 100644 (file)
index 0000000..9790b6b
Binary files /dev/null and b/doc/_static/component2.png differ
diff --git a/doc/_static/component3.png b/doc/_static/component3.png
new file mode 100644 (file)
index 0000000..f22cb5b
Binary files /dev/null and b/doc/_static/component3.png differ
diff --git a/doc/_static/component4.png b/doc/_static/component4.png
new file mode 100644 (file)
index 0000000..6f9bbcc
Binary files /dev/null and b/doc/_static/component4.png differ
diff --git a/doc/_static/cut.png b/doc/_static/cut.png
new file mode 100644 (file)
index 0000000..40abf2b
Binary files /dev/null and b/doc/_static/cut.png differ
diff --git a/doc/_static/cyl_grid1.PNG b/doc/_static/cyl_grid1.PNG
new file mode 100644 (file)
index 0000000..59f4c2f
Binary files /dev/null and b/doc/_static/cyl_grid1.PNG differ
diff --git a/doc/_static/cyl_grid2.PNG b/doc/_static/cyl_grid2.PNG
new file mode 100644 (file)
index 0000000..3acae07
Binary files /dev/null and b/doc/_static/cyl_grid2.PNG differ
diff --git a/doc/_static/cyl_grid3.PNG b/doc/_static/cyl_grid3.PNG
new file mode 100644 (file)
index 0000000..6bcbb9b
Binary files /dev/null and b/doc/_static/cyl_grid3.PNG differ
diff --git a/doc/_static/cylgrid.PNG b/doc/_static/cylgrid.PNG
new file mode 100644 (file)
index 0000000..d5994d1
Binary files /dev/null and b/doc/_static/cylgrid.PNG differ
diff --git a/doc/_static/cylgrid1.PNG b/doc/_static/cylgrid1.PNG
new file mode 100644 (file)
index 0000000..d18191b
Binary files /dev/null and b/doc/_static/cylgrid1.PNG differ
diff --git a/doc/_static/cylgrid1.png b/doc/_static/cylgrid1.png
new file mode 100644 (file)
index 0000000..dea67bc
Binary files /dev/null and b/doc/_static/cylgrid1.png differ
diff --git a/doc/_static/cylgrid2.PNG b/doc/_static/cylgrid2.PNG
new file mode 100644 (file)
index 0000000..63ae08a
Binary files /dev/null and b/doc/_static/cylgrid2.PNG differ
diff --git a/doc/_static/cylgrid2.png b/doc/_static/cylgrid2.png
new file mode 100644 (file)
index 0000000..bd4ffa2
Binary files /dev/null and b/doc/_static/cylgrid2.png differ
diff --git a/doc/_static/cylgrid3.png b/doc/_static/cylgrid3.png
new file mode 100644 (file)
index 0000000..56e284d
Binary files /dev/null and b/doc/_static/cylgrid3.png differ
diff --git a/doc/_static/cylgrid4.png b/doc/_static/cylgrid4.png
new file mode 100644 (file)
index 0000000..afd9d39
Binary files /dev/null and b/doc/_static/cylgrid4.png differ
diff --git a/doc/_static/cylgrid5.png b/doc/_static/cylgrid5.png
new file mode 100644 (file)
index 0000000..7b04914
Binary files /dev/null and b/doc/_static/cylgrid5.png differ
diff --git a/doc/_static/cylgrid6.png b/doc/_static/cylgrid6.png
new file mode 100644 (file)
index 0000000..d9e8b99
Binary files /dev/null and b/doc/_static/cylgrid6.png differ
diff --git a/doc/_static/cylgrids.png b/doc/_static/cylgrids.png
new file mode 100644 (file)
index 0000000..c928af7
Binary files /dev/null and b/doc/_static/cylgrids.png differ
diff --git a/doc/_static/cylinder.png b/doc/_static/cylinder.png
new file mode 100644 (file)
index 0000000..3af88d8
Binary files /dev/null and b/doc/_static/cylinder.png differ
diff --git a/doc/_static/db_cylgrid.PNG b/doc/_static/db_cylgrid.PNG
new file mode 100644 (file)
index 0000000..3b765be
Binary files /dev/null and b/doc/_static/db_cylgrid.PNG differ
diff --git a/doc/_static/db_sph_grid.PNG b/doc/_static/db_sph_grid.PNG
new file mode 100644 (file)
index 0000000..f903f8e
Binary files /dev/null and b/doc/_static/db_sph_grid.PNG differ
diff --git a/doc/_static/decoupe.png b/doc/_static/decoupe.png
new file mode 100644 (file)
index 0000000..5ca74e0
Binary files /dev/null and b/doc/_static/decoupe.png differ
diff --git a/doc/_static/dialogbox.PNG b/doc/_static/dialogbox.PNG
new file mode 100644 (file)
index 0000000..3e7edd5
Binary files /dev/null and b/doc/_static/dialogbox.PNG differ
diff --git a/doc/_static/dialogbox2.PNG b/doc/_static/dialogbox2.PNG
new file mode 100644 (file)
index 0000000..f1f6788
Binary files /dev/null and b/doc/_static/dialogbox2.PNG differ
diff --git a/doc/_static/dialogbox_cartgrid.PNG b/doc/_static/dialogbox_cartgrid.PNG
new file mode 100644 (file)
index 0000000..29e9dfd
Binary files /dev/null and b/doc/_static/dialogbox_cartgrid.PNG differ
diff --git a/doc/_static/dialogbox_cylgrid.PNG b/doc/_static/dialogbox_cylgrid.PNG
new file mode 100644 (file)
index 0000000..2b4524a
Binary files /dev/null and b/doc/_static/dialogbox_cylgrid.PNG differ
diff --git a/doc/_static/dialogbox_discreti.PNG b/doc/_static/dialogbox_discreti.PNG
new file mode 100644 (file)
index 0000000..6324dee
Binary files /dev/null and b/doc/_static/dialogbox_discreti.PNG differ
diff --git a/doc/_static/dialogbox_law.PNG b/doc/_static/dialogbox_law.PNG
new file mode 100644 (file)
index 0000000..887af45
Binary files /dev/null and b/doc/_static/dialogbox_law.PNG differ
diff --git a/doc/_static/dialogbox_remove.PNG b/doc/_static/dialogbox_remove.PNG
new file mode 100644 (file)
index 0000000..7063cfb
Binary files /dev/null and b/doc/_static/dialogbox_remove.PNG differ
diff --git a/doc/_static/dialogbox_remove.png b/doc/_static/dialogbox_remove.png
new file mode 100644 (file)
index 0000000..1da505a
Binary files /dev/null and b/doc/_static/dialogbox_remove.png differ
diff --git a/doc/_static/disco_quad.png b/doc/_static/disco_quad.png
new file mode 100644 (file)
index 0000000..c96851e
Binary files /dev/null and b/doc/_static/disco_quad.png differ
diff --git a/doc/_static/ex1.JPG b/doc/_static/ex1.JPG
new file mode 100644 (file)
index 0000000..aa62a73
Binary files /dev/null and b/doc/_static/ex1.JPG differ
diff --git a/doc/_static/ex1.PNG b/doc/_static/ex1.PNG
new file mode 100644 (file)
index 0000000..b512db5
Binary files /dev/null and b/doc/_static/ex1.PNG differ
diff --git a/doc/_static/gui_add_group.png b/doc/_static/gui_add_group.png
new file mode 100644 (file)
index 0000000..a7896ac
Binary files /dev/null and b/doc/_static/gui_add_group.png differ
diff --git a/doc/_static/gui_add_law.png b/doc/_static/gui_add_law.png
new file mode 100644 (file)
index 0000000..80c9d82
Binary files /dev/null and b/doc/_static/gui_add_law.png differ
diff --git a/doc/_static/gui_ass_edge.png b/doc/_static/gui_ass_edge.png
new file mode 100644 (file)
index 0000000..10fa6e5
Binary files /dev/null and b/doc/_static/gui_ass_edge.png differ
diff --git a/doc/_static/gui_ass_quad.png b/doc/_static/gui_ass_quad.png
new file mode 100644 (file)
index 0000000..dd39c00
Binary files /dev/null and b/doc/_static/gui_ass_quad.png differ
diff --git a/doc/_static/gui_cut_hexa.png b/doc/_static/gui_cut_hexa.png
new file mode 100644 (file)
index 0000000..a47b1d5
Binary files /dev/null and b/doc/_static/gui_cut_hexa.png differ
diff --git a/doc/_static/gui_cylinder.png b/doc/_static/gui_cylinder.png
new file mode 100644 (file)
index 0000000..2d73ec4
Binary files /dev/null and b/doc/_static/gui_cylinder.png differ
diff --git a/doc/_static/gui_disco_edge.png b/doc/_static/gui_disco_edge.png
new file mode 100644 (file)
index 0000000..6368cd7
Binary files /dev/null and b/doc/_static/gui_disco_edge.png differ
diff --git a/doc/_static/gui_disco_quad.png b/doc/_static/gui_disco_quad.png
new file mode 100644 (file)
index 0000000..978f7bb
Binary files /dev/null and b/doc/_static/gui_disco_quad.png differ
diff --git a/doc/_static/gui_disco_vertex.png b/doc/_static/gui_disco_vertex.png
new file mode 100644 (file)
index 0000000..37961f9
Binary files /dev/null and b/doc/_static/gui_disco_vertex.png differ
diff --git a/doc/_static/gui_edge2.png b/doc/_static/gui_edge2.png
new file mode 100644 (file)
index 0000000..727f8d3
Binary files /dev/null and b/doc/_static/gui_edge2.png differ
diff --git a/doc/_static/gui_edge_vertices.png b/doc/_static/gui_edge_vertices.png
new file mode 100644 (file)
index 0000000..e45c58b
Binary files /dev/null and b/doc/_static/gui_edge_vertices.png differ
diff --git a/doc/_static/gui_hemispherical.png b/doc/_static/gui_hemispherical.png
new file mode 100644 (file)
index 0000000..cfa9a52
Binary files /dev/null and b/doc/_static/gui_hemispherical.png differ
diff --git a/doc/_static/gui_hexa_quads.png b/doc/_static/gui_hexa_quads.png
new file mode 100644 (file)
index 0000000..f51d29a
Binary files /dev/null and b/doc/_static/gui_hexa_quads.png differ
diff --git a/doc/_static/gui_hexa_vertices.png b/doc/_static/gui_hexa_vertices.png
new file mode 100644 (file)
index 0000000..6c7fe78
Binary files /dev/null and b/doc/_static/gui_hexa_vertices.png differ
diff --git a/doc/_static/gui_import_document.png b/doc/_static/gui_import_document.png
new file mode 100644 (file)
index 0000000..f09dca2
Binary files /dev/null and b/doc/_static/gui_import_document.png differ
diff --git a/doc/_static/gui_join_quads.png b/doc/_static/gui_join_quads.png
new file mode 100644 (file)
index 0000000..b81cf11
Binary files /dev/null and b/doc/_static/gui_join_quads.png differ
diff --git a/doc/_static/gui_make_cart_grid.png b/doc/_static/gui_make_cart_grid.png
new file mode 100644 (file)
index 0000000..38d04c8
Binary files /dev/null and b/doc/_static/gui_make_cart_grid.png differ
diff --git a/doc/_static/gui_make_cyl_grid.png b/doc/_static/gui_make_cyl_grid.png
new file mode 100644 (file)
index 0000000..01e7111
Binary files /dev/null and b/doc/_static/gui_make_cyl_grid.png differ
diff --git a/doc/_static/gui_make_cyl_grid_irregular.png b/doc/_static/gui_make_cyl_grid_irregular.png
new file mode 100644 (file)
index 0000000..bcc3025
Binary files /dev/null and b/doc/_static/gui_make_cyl_grid_irregular.png differ
diff --git a/doc/_static/gui_make_cylinder.png b/doc/_static/gui_make_cylinder.png
new file mode 100644 (file)
index 0000000..ef5e261
Binary files /dev/null and b/doc/_static/gui_make_cylinder.png differ
diff --git a/doc/_static/gui_make_cylinders.png b/doc/_static/gui_make_cylinders.png
new file mode 100644 (file)
index 0000000..3c573e6
Binary files /dev/null and b/doc/_static/gui_make_cylinders.png differ
diff --git a/doc/_static/gui_make_line_symmetry.png b/doc/_static/gui_make_line_symmetry.png
new file mode 100644 (file)
index 0000000..614d75f
Binary files /dev/null and b/doc/_static/gui_make_line_symmetry.png differ
diff --git a/doc/_static/gui_make_pipe.png b/doc/_static/gui_make_pipe.png
new file mode 100644 (file)
index 0000000..dbcd99a
Binary files /dev/null and b/doc/_static/gui_make_pipe.png differ
diff --git a/doc/_static/gui_make_pipes.png b/doc/_static/gui_make_pipes.png
new file mode 100644 (file)
index 0000000..ea23eae
Binary files /dev/null and b/doc/_static/gui_make_pipes.png differ
diff --git a/doc/_static/gui_make_plan_symmetry.png b/doc/_static/gui_make_plan_symmetry.png
new file mode 100644 (file)
index 0000000..a45eeae
Binary files /dev/null and b/doc/_static/gui_make_plan_symmetry.png differ
diff --git a/doc/_static/gui_make_point_symmetry.png b/doc/_static/gui_make_point_symmetry.png
new file mode 100644 (file)
index 0000000..2082e7c
Binary files /dev/null and b/doc/_static/gui_make_point_symmetry.png differ
diff --git a/doc/_static/gui_make_spher_grid.png b/doc/_static/gui_make_spher_grid.png
new file mode 100644 (file)
index 0000000..b24ba0d
Binary files /dev/null and b/doc/_static/gui_make_spher_grid.png differ
diff --git a/doc/_static/gui_make_sym_line.png b/doc/_static/gui_make_sym_line.png
new file mode 100644 (file)
index 0000000..3606a9d
Binary files /dev/null and b/doc/_static/gui_make_sym_line.png differ
diff --git a/doc/_static/gui_make_sym_plan.png b/doc/_static/gui_make_sym_plan.png
new file mode 100644 (file)
index 0000000..825c7cd
Binary files /dev/null and b/doc/_static/gui_make_sym_plan.png differ
diff --git a/doc/_static/gui_make_sym_point.png b/doc/_static/gui_make_sym_point.png
new file mode 100644 (file)
index 0000000..b76c8d3
Binary files /dev/null and b/doc/_static/gui_make_sym_point.png differ
diff --git a/doc/_static/gui_make_transfo_rotation.png b/doc/_static/gui_make_transfo_rotation.png
new file mode 100644 (file)
index 0000000..b95d522
Binary files /dev/null and b/doc/_static/gui_make_transfo_rotation.png differ
diff --git a/doc/_static/gui_make_transfo_scale.png b/doc/_static/gui_make_transfo_scale.png
new file mode 100644 (file)
index 0000000..22fb949
Binary files /dev/null and b/doc/_static/gui_make_transfo_scale.png differ
diff --git a/doc/_static/gui_make_transfo_translation.png b/doc/_static/gui_make_transfo_translation.png
new file mode 100644 (file)
index 0000000..32d717f
Binary files /dev/null and b/doc/_static/gui_make_transfo_translation.png differ
diff --git a/doc/_static/gui_merge_edges.png b/doc/_static/gui_merge_edges.png
new file mode 100644 (file)
index 0000000..eb0c4f2
Binary files /dev/null and b/doc/_static/gui_merge_edges.png differ
diff --git a/doc/_static/gui_merge_quads.png b/doc/_static/gui_merge_quads.png
new file mode 100644 (file)
index 0000000..caf75e9
Binary files /dev/null and b/doc/_static/gui_merge_quads.png differ
diff --git a/doc/_static/gui_merge_vertices.png b/doc/_static/gui_merge_vertices.png
new file mode 100644 (file)
index 0000000..064af3e
Binary files /dev/null and b/doc/_static/gui_merge_vertices.png differ
diff --git a/doc/_static/gui_mesh.png b/doc/_static/gui_mesh.png
new file mode 100644 (file)
index 0000000..b091a76
Binary files /dev/null and b/doc/_static/gui_mesh.png differ
diff --git a/doc/_static/gui_modify_line_symmetry.png b/doc/_static/gui_modify_line_symmetry.png
new file mode 100644 (file)
index 0000000..c0fe01b
Binary files /dev/null and b/doc/_static/gui_modify_line_symmetry.png differ
diff --git a/doc/_static/gui_modify_plan_symmetry.png b/doc/_static/gui_modify_plan_symmetry.png
new file mode 100644 (file)
index 0000000..06ff5bd
Binary files /dev/null and b/doc/_static/gui_modify_plan_symmetry.png differ
diff --git a/doc/_static/gui_modify_point_symmetry.png b/doc/_static/gui_modify_point_symmetry.png
new file mode 100644 (file)
index 0000000..bfc3a16
Binary files /dev/null and b/doc/_static/gui_modify_point_symmetry.png differ
diff --git a/doc/_static/gui_modify_transfo_rotation.png b/doc/_static/gui_modify_transfo_rotation.png
new file mode 100644 (file)
index 0000000..9a0927c
Binary files /dev/null and b/doc/_static/gui_modify_transfo_rotation.png differ
diff --git a/doc/_static/gui_modify_transfo_scale.png b/doc/_static/gui_modify_transfo_scale.png
new file mode 100644 (file)
index 0000000..3bbdf75
Binary files /dev/null and b/doc/_static/gui_modify_transfo_scale.png differ
diff --git a/doc/_static/gui_modify_transfo_translation.png b/doc/_static/gui_modify_transfo_translation.png
new file mode 100644 (file)
index 0000000..d503cef
Binary files /dev/null and b/doc/_static/gui_modify_transfo_translation.png differ
diff --git a/doc/_static/gui_new_document.png b/doc/_static/gui_new_document.png
new file mode 100644 (file)
index 0000000..a64bfea
Binary files /dev/null and b/doc/_static/gui_new_document.png differ
diff --git a/doc/_static/gui_parthemispherical.png b/doc/_static/gui_parthemispherical.png
new file mode 100644 (file)
index 0000000..3346eb8
Binary files /dev/null and b/doc/_static/gui_parthemispherical.png differ
diff --git a/doc/_static/gui_partrind.png b/doc/_static/gui_partrind.png
new file mode 100644 (file)
index 0000000..b2ec679
Binary files /dev/null and b/doc/_static/gui_partrind.png differ
diff --git a/doc/_static/gui_pipe.png b/doc/_static/gui_pipe.png
new file mode 100644 (file)
index 0000000..77ec2fa
Binary files /dev/null and b/doc/_static/gui_pipe.png differ
diff --git a/doc/_static/gui_prism_quads.png b/doc/_static/gui_prism_quads.png
new file mode 100644 (file)
index 0000000..c355851
Binary files /dev/null and b/doc/_static/gui_prism_quads.png differ
diff --git a/doc/_static/gui_quad_edges.png b/doc/_static/gui_quad_edges.png
new file mode 100644 (file)
index 0000000..473dae7
Binary files /dev/null and b/doc/_static/gui_quad_edges.png differ
diff --git a/doc/_static/gui_quad_vertices.png b/doc/_static/gui_quad_vertices.png
new file mode 100644 (file)
index 0000000..56bc167
Binary files /dev/null and b/doc/_static/gui_quad_vertices.png differ
diff --git a/doc/_static/gui_quadrevolution.png b/doc/_static/gui_quadrevolution.png
new file mode 100644 (file)
index 0000000..bfe4639
Binary files /dev/null and b/doc/_static/gui_quadrevolution.png differ
diff --git a/doc/_static/gui_remove_hexa.png b/doc/_static/gui_remove_hexa.png
new file mode 100644 (file)
index 0000000..8076108
Binary files /dev/null and b/doc/_static/gui_remove_hexa.png differ
diff --git a/doc/_static/gui_replacehexa.png b/doc/_static/gui_replacehexa.png
new file mode 100644 (file)
index 0000000..139cc54
Binary files /dev/null and b/doc/_static/gui_replacehexa.png differ
diff --git a/doc/_static/gui_rind.png b/doc/_static/gui_rind.png
new file mode 100644 (file)
index 0000000..94dee49
Binary files /dev/null and b/doc/_static/gui_rind.png differ
diff --git a/doc/_static/gui_vector.png b/doc/_static/gui_vector.png
new file mode 100644 (file)
index 0000000..821911e
Binary files /dev/null and b/doc/_static/gui_vector.png differ
diff --git a/doc/_static/gui_vector1.png b/doc/_static/gui_vector1.png
new file mode 100644 (file)
index 0000000..827a9d4
Binary files /dev/null and b/doc/_static/gui_vector1.png differ
diff --git a/doc/_static/gui_vector2.png b/doc/_static/gui_vector2.png
new file mode 100644 (file)
index 0000000..6c66550
Binary files /dev/null and b/doc/_static/gui_vector2.png differ
diff --git a/doc/_static/gui_vertex.png b/doc/_static/gui_vertex.png
new file mode 100644 (file)
index 0000000..3846af1
Binary files /dev/null and b/doc/_static/gui_vertex.png differ
diff --git a/doc/_static/hemisphericalgrid.png b/doc/_static/hemisphericalgrid.png
new file mode 100644 (file)
index 0000000..c640993
Binary files /dev/null and b/doc/_static/hemisphericalgrid.png differ
diff --git a/doc/_static/interactive.PNG b/doc/_static/interactive.PNG
new file mode 100644 (file)
index 0000000..fecd3c4
Binary files /dev/null and b/doc/_static/interactive.PNG differ
diff --git a/doc/_static/interactive.png b/doc/_static/interactive.png
new file mode 100644 (file)
index 0000000..0aa0816
Binary files /dev/null and b/doc/_static/interactive.png differ
diff --git a/doc/_static/intersec_cyl.PNG b/doc/_static/intersec_cyl.PNG
new file mode 100644 (file)
index 0000000..b10e085
Binary files /dev/null and b/doc/_static/intersec_cyl.PNG differ
diff --git a/doc/_static/join.png b/doc/_static/join.png
new file mode 100644 (file)
index 0000000..eeb4ba1
Binary files /dev/null and b/doc/_static/join.png differ
diff --git a/doc/_static/meshing1.PNG b/doc/_static/meshing1.PNG
new file mode 100644 (file)
index 0000000..d2ac18d
Binary files /dev/null and b/doc/_static/meshing1.PNG differ
diff --git a/doc/_static/meshing2.PNG b/doc/_static/meshing2.PNG
new file mode 100644 (file)
index 0000000..70fb219
Binary files /dev/null and b/doc/_static/meshing2.PNG differ
diff --git a/doc/_static/meshing3.PNG b/doc/_static/meshing3.PNG
new file mode 100644 (file)
index 0000000..adb149e
Binary files /dev/null and b/doc/_static/meshing3.PNG differ
diff --git a/doc/_static/no_cut.png b/doc/_static/no_cut.png
new file mode 100644 (file)
index 0000000..de2f4b8
Binary files /dev/null and b/doc/_static/no_cut.png differ
diff --git a/doc/_static/no_decoupe.png b/doc/_static/no_decoupe.png
new file mode 100644 (file)
index 0000000..6cfe10e
Binary files /dev/null and b/doc/_static/no_decoupe.png differ
diff --git a/doc/_static/parthemisphericalgrid.png b/doc/_static/parthemisphericalgrid.png
new file mode 100644 (file)
index 0000000..20036ac
Binary files /dev/null and b/doc/_static/parthemisphericalgrid.png differ
diff --git a/doc/_static/partrindgrid.png b/doc/_static/partrindgrid.png
new file mode 100644 (file)
index 0000000..b90c791
Binary files /dev/null and b/doc/_static/partrindgrid.png differ
diff --git a/doc/_static/pipe.png b/doc/_static/pipe.png
new file mode 100644 (file)
index 0000000..c3193f1
Binary files /dev/null and b/doc/_static/pipe.png differ
diff --git a/doc/_static/point_sym_before.png b/doc/_static/point_sym_before.png
new file mode 100644 (file)
index 0000000..dec83d0
Binary files /dev/null and b/doc/_static/point_sym_before.png differ
diff --git a/doc/_static/prisme.png b/doc/_static/prisme.png
new file mode 100644 (file)
index 0000000..3a089ad
Binary files /dev/null and b/doc/_static/prisme.png differ
diff --git a/doc/_static/prisme_gui.png b/doc/_static/prisme_gui.png
new file mode 100644 (file)
index 0000000..68ea36f
Binary files /dev/null and b/doc/_static/prisme_gui.png differ
diff --git a/doc/_static/quadrevolution.png b/doc/_static/quadrevolution.png
new file mode 100644 (file)
index 0000000..d3baf1d
Binary files /dev/null and b/doc/_static/quadrevolution.png differ
diff --git a/doc/_static/remove1.PNG b/doc/_static/remove1.PNG
new file mode 100644 (file)
index 0000000..b1ad51d
Binary files /dev/null and b/doc/_static/remove1.PNG differ
diff --git a/doc/_static/remove2.PNG b/doc/_static/remove2.PNG
new file mode 100644 (file)
index 0000000..eb59e9e
Binary files /dev/null and b/doc/_static/remove2.PNG differ
diff --git a/doc/_static/remove3.PNG b/doc/_static/remove3.PNG
new file mode 100644 (file)
index 0000000..8aa94b3
Binary files /dev/null and b/doc/_static/remove3.PNG differ
diff --git a/doc/_static/remove3.png b/doc/_static/remove3.png
new file mode 100644 (file)
index 0000000..c2e0e0d
Binary files /dev/null and b/doc/_static/remove3.png differ
diff --git a/doc/_static/replacehexa.png b/doc/_static/replacehexa.png
new file mode 100644 (file)
index 0000000..b846b7e
Binary files /dev/null and b/doc/_static/replacehexa.png differ
diff --git a/doc/_static/rindgrid.png b/doc/_static/rindgrid.png
new file mode 100644 (file)
index 0000000..356976e
Binary files /dev/null and b/doc/_static/rindgrid.png differ
diff --git a/doc/_static/sph_grid.PNG b/doc/_static/sph_grid.PNG
new file mode 100644 (file)
index 0000000..de084b2
Binary files /dev/null and b/doc/_static/sph_grid.PNG differ
diff --git a/doc/_static/sph_grid.png b/doc/_static/sph_grid.png
new file mode 100644 (file)
index 0000000..5051da2
Binary files /dev/null and b/doc/_static/sph_grid.png differ
diff --git a/doc/_static/sph_grid2.PNG b/doc/_static/sph_grid2.PNG
new file mode 100644 (file)
index 0000000..5232aad
Binary files /dev/null and b/doc/_static/sph_grid2.PNG differ
diff --git a/doc/_static/transfo0.png b/doc/_static/transfo0.png
new file mode 100644 (file)
index 0000000..b7a7beb
Binary files /dev/null and b/doc/_static/transfo0.png differ
diff --git a/doc/_static/transfo_rotation.png b/doc/_static/transfo_rotation.png
new file mode 100644 (file)
index 0000000..dba5d1c
Binary files /dev/null and b/doc/_static/transfo_rotation.png differ
diff --git a/doc/_static/transfo_scale.png b/doc/_static/transfo_scale.png
new file mode 100644 (file)
index 0000000..0c0182d
Binary files /dev/null and b/doc/_static/transfo_scale.png differ
diff --git a/doc/_static/transfo_translation.png b/doc/_static/transfo_translation.png
new file mode 100644 (file)
index 0000000..5e83959
Binary files /dev/null and b/doc/_static/transfo_translation.png differ
diff --git a/doc/_static/tuyau_courbe.PNG b/doc/_static/tuyau_courbe.PNG
new file mode 100644 (file)
index 0000000..4c17200
Binary files /dev/null and b/doc/_static/tuyau_courbe.PNG differ
diff --git a/doc/annexe.rst b/doc/annexe.rst
new file mode 100644 (file)
index 0000000..646e23a
--- /dev/null
@@ -0,0 +1,71 @@
+:tocdepth: 3
+
+.. _annexe:
+
+======
+Appendix: naming rule to find elements in an hexahedron
+======
+
+
+Definition of an hexahedron
+===========================
+
+.. image:: _static/HEXAHEDRON.PNG
+   :align: center
+
+
+Naming rule for the faces of an hexahedron
+
+| A: plane Z = 0
+| B: plane Z = 1
+| C: plane Y = 0
+| D: plane Y = 1
+| E: plane X = 0
+| F: plane X = 1
+
+Quadrangles in an hexahedron
+''''''''''''''''''''''''''''''
+
+Naming rule for the 6 quadrangles in an hexahedron
+
+| Q_A or 0: plane Z=0
+| Q_B or 1: plane Z=1
+| Q_C or 2: plane Y=0
+| Q_D or 3: plane Y=1
+| Q_E or 4: plane X=0
+| Q_F or 5: plane X=1
+
+Edges in an hexahedron
+''''''''''''''''''''''''
+
+Naming rule for the 12 edges in an hexahedron
+
+| E_AC or 0: planes Z=0 and Y=0
+| E_AD or 1: planes Z=0 and Y=1
+| E_BC or 2: planes Z=1 and Y=0
+| E_BD or 3: planes Z=1 and Y=1
+
+| E_AE or 4: planes Z=0 and X=0
+| E_AF or 5: planes Z=0 and X=1
+| E_BE or 6: planes Z=1 and X=0
+| E_BF or 7: planes Z=1 and X=1
+
+| E_CE or 8: planes Y=0 and X=0
+| E_CF or 9: planes Y=0 and X=1
+| E_DE or 10: planes Y=1 and X=0
+| E_DF or 11: planes Y=1 and X=1
+
+Vertices in an hexahedron
+''''''''''''''''''''''''''''
+
+Naming rule for the 8 vertices in an hexahedron
+
+| V_ACE or 0: planes Z=0 and Y=0 and X=0
+| V_ACF or 1: planes Z=0 and Y=0 and X=1
+| V_ADE or 2: planes Z=0 and Y=1 and X=0
+| V_ADF or 3: planes Z=0 and Y=1 and X=1
+
+| V_BCE or 4: planes Z=1 and Y=0 and X=0
+| V_BCF or 5: planes Z=1 and Y=0 and X=1
+| V_BDE or 6: planes Z=1 and Y=1 and X=0
+| V_BDF or 7: planes Z=1 and Y=1 and X=1
diff --git a/doc/block_method.rst b/doc/block_method.rst
new file mode 100644 (file)
index 0000000..de20512
--- /dev/null
@@ -0,0 +1,74 @@
+:tocdepth: 3
+
+.. _blockmethod:
+
+===============================
+Principle: the method by blocks
+===============================
+
+Principle
+=========
+
+The principle of the method by block is to decompose the geometry to
+be meshed into a set of hexahedra related per face. The initial
+geometry is divided into a new geometry which has the property to be a
+set solids. All these solids are hexahedra with shared faces. Once
+cutting is complete, the mesh is easy to obtain.
+
+The method by blocks consists in:
+
+- finding a compound of blocks,
+- this compound of blocks has to be equivalent to the initial geometry to mesh.
+
+
+A block is a volume defined by:
+
+- 8 vertices
+- 12 edges
+    - *straight line*, *curve*
+- 6 quadrangular faces
+    - *planar face*, *3D face*
+
+A compound of blocks is a volume that for each face is:
+
+- either a free face (in one block)
+- or a face shared between 2 blocks
+
+
+.. _modelbloc:
+
+Create a model of blocks
+========================
+
+A model of block is a compound of blocks based on a topological
+definition. The model of blocks construction can be build by using the
+two following methods:
+
+1. Construct and associate blocks (hexahedra)
+    - the main operations for creating blocks are:
+        - Basics: create, remove,transform
+        - construct hexahedra grids: cartesian, cylindrical, spherical
+        
+    - blocks association operations:
+        - merge, cut, disconnect hexahedra 
+        - prism, join quadrangles
+        - merge two quadrangles of two blocks
+        - merge two edges
+        - merge two vertices
+        - disconnect two vertices
+        - create hexahedra between two existing quadrangles
+
+2. Construct hexahedra via predefined models:
+    - cylinder
+    - pipe
+    - two intersected cylinders
+    - two intersected pipes
+
+Example of simple model of blocks
+=================================
+
+.. image:: _static/ex1.PNG
+   :align: center
+
+.. centered::
+   2 blocks linked by 1 face
diff --git a/doc/cad.rst b/doc/cad.rst
new file mode 100644 (file)
index 0000000..f0390a2
--- /dev/null
@@ -0,0 +1,60 @@
+:tocdepth: 3
+
+.. _cad:
+
+=======
+The CAD
+=======
+
+
+
+The geometry to mesh is defined by a set of independent shapes, these
+shapes are external references to the GEOM module of SALOME. The
+shapes of this set can be faces and/or solids. In HexaBlock module you
+can:
+
+- use a geometry defined in GEOM module
+- import geometrical objects from BREP, IGES, STEP files.
+
+The TUI script to import geometrical objects from a BREP file is::
+
+    import os
+    import GEOM
+    import SALOMEDS
+    import hexablock
+
+    # Example of import from STEP 
+    # get a path of the STEP file containing the CAD
+    STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+The following images depict different CADs for the construction of models:
+
+.. image:: _static/cad_bielle.PNG
+   :align: center
+
+.. centered::
+   Connecting rod 
+
+(see :ref:`intropython`)
+
+
+.. image:: _static/bride.PNG
+   :align: center
+
+.. centered::
+   Bridle
+
+.. image:: _static/intersec_cyl.PNG
+   :align: center
+
+.. centered::
+   Intersection of cylinders
+
+
+.. image:: _static/tuyau_courbe.PNG
+   :align: center
+
+.. centered::
+   Bent (curved) pipe
+
+
diff --git a/doc/cas_test_python/BIELLE.py b/doc/cas_test_python/BIELLE.py
new file mode 100644 (file)
index 0000000..1641d7f
--- /dev/null
@@ -0,0 +1,994 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("Bielle")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 40.0
+
+r_grd = R
+r_grd_t = R/2
+
+r_pte = R
+r_pte_t = R/2
+
+l = 200.0
+h = 0.019999999553*2
+#h = 40.
+
+# Taille du grand cylindre
+dr_grd = R
+da_grd = 360
+dl_grd = h
+
+nr_grd = 1
+na_grd = 6
+nl_grd = 1
+
+# Taille du petit cylindre
+dr_pte = R
+da_pte = 360
+dl_pte = h
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(l, 0, 0)
+dy = doc.addVector(0, l, 0)
+dz = doc.addVector(0, 0, l)
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+c_grd = doc.addVertex(0, 0, 0)
+c_pte = doc.addVertex(2*l, 0, 0)
+dx_prime = doc.addVectorVertices( c_grd, c_pte )
+
+#=================================================
+# Creation de la grande grille cylindrique
+#=================================================
+
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex( 2*R, 0, h )
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )
+x4 = doc.findVertex( 2*R, 0, 0 )
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+
+#=================================================
+# Creation de la petite grille cylindrique
+#=================================================
+
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#=================================================
+# Assemblage des deux grilles cylindriques
+#=================================================
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )
+
+
+#===================================================================
+# Recuperation des vertex du model hexa bielle pour l association
+#===================================================================
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+# Face du haut grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )
+
+
+assert x_mod_h_g
+assert y_mod_h_g
+assert z_mod_h_g
+
+assert u_mod_h_g
+assert v_mod_h_g
+assert w_mod_h_g
+
+assert x_mod_h_g_t
+assert y_mod_h_g_t
+assert z_mod_h_g_t
+
+assert u_mod_h_g_t
+assert v_mod_h_g_t
+assert w_mod_h_g_t #
+
+
+# Face du haut petit trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )
+
+
+assert x_mod_h_p
+assert y_mod_h_p
+assert z_mod_h_p
+
+assert u_mod_h_p
+assert v_mod_h_p
+assert w_mod_h_p
+
+assert x_mod_h_p_t
+assert y_mod_h_p_t
+assert z_mod_h_p_t
+
+assert u_mod_h_p_t
+assert v_mod_h_p_t
+assert w_mod_h_p_t
+#-----------
+
+# Face du bas grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )
+
+assert x_mod_b_g
+assert y_mod_b_g
+assert z_mod_b_g
+
+assert u_mod_b_g
+assert v_mod_b_g
+assert w_mod_b_g
+
+assert x_mod_b_g_t
+assert y_mod_b_g_t
+assert z_mod_b_g_t
+
+assert u_mod_b_g_t
+assert v_mod_b_g_t
+assert w_mod_b_g_t
+
+
+# Face du bas petit trou
+
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )
+
+assert x_mod_b_p
+assert y_mod_b_p
+assert z_mod_b_p
+
+assert u_mod_b_p
+assert v_mod_b_p
+assert w_mod_b_p
+
+assert x_mod_b_p_t
+assert y_mod_b_p_t
+assert z_mod_b_p_t
+
+assert u_mod_b_p_t
+assert v_mod_b_p_t
+assert w_mod_b_p_t
+#-----------
+
+
+
+#===================================================================
+# Recuperation des points de la geometrie bielle pour l association
+#===================================================================
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+Bielle_geom = geompy.Import(STEP_PATH, "STEP")
+
+geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+Pt_A = geompy.MakeVertex(0, 0, h/2.)
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+
+# Paramètre pour:
+# -récupération des points.
+# -et associations.
+u_1 = 0.75#0.8
+u_2 = 0.5
+u_3 = 0.25#0.2
+
+
+
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)
+
+
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)
+
+
+#x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_3)
+x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)
+
+#z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1.)
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_1)
+z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)
+
+#w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_3)
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)
+
+#u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_1)
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)
+
+
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)
+
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)
+
+#w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.40)
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)
+
+
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)
+
+#u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.6)
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)
+
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)
+
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)
+
+#z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.1)
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)
+
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)
+
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)
+
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)
+
+
+
+#x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.9)
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)
+
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)
+
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)
+
+
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)
+
+
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)
+
+
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)
+
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)
+
+
+
+
+
+
+
+
+#=======================
+# CREATION ASSOCIATION
+#=======================
+
+#===========================================
+# association des sommets de la face du haut
+#===========================================
+
+# grand trou
+
+x_mod_h_g.setAssociation( x_h_g )
+y_mod_h_g.setAssociation( y_h_g )
+z_mod_h_g.setAssociation( z_h_g )
+u_mod_h_g.setAssociation( u_h_g )
+v_mod_h_g.setAssociation( v_h_g )
+w_mod_h_g.setAssociation( w_h_g )
+
+x_mod_h_g_t.setAssociation( x_h_g_t )
+y_mod_h_g_t.setAssociation( y_h_g_t )
+z_mod_h_g_t.setAssociation( z_h_g_t )
+u_mod_h_g_t.setAssociation( u_h_g_t )
+v_mod_h_g_t.setAssociation( v_h_g_t )
+w_mod_h_g_t.setAssociation( w_h_g_t )
+
+# petit trou
+
+x_mod_h_p.setAssociation( x_h_p )
+y_mod_h_p.setAssociation( y_h_p )
+z_mod_h_p.setAssociation( z_h_p )
+u_mod_h_p.setAssociation( u_h_p )
+v_mod_h_p.setAssociation( v_h_p )
+w_mod_h_p.setAssociation( w_h_p )
+
+x_mod_h_p_t.setAssociation( x_h_p_t )
+y_mod_h_p_t.setAssociation( y_h_p_t )
+z_mod_h_p_t.setAssociation( z_h_p_t )
+u_mod_h_p_t.setAssociation( u_h_p_t )
+v_mod_h_p_t.setAssociation( v_h_p_t )
+w_mod_h_p_t.setAssociation( w_h_p_t )
+
+
+#===========================================
+# association des sommets de la face du bas
+#===========================================
+
+# grand trou
+
+x_mod_b_g.setAssociation( x_b_g )
+y_mod_b_g.setAssociation( y_b_g )
+z_mod_b_g.setAssociation( z_b_g )
+u_mod_b_g.setAssociation( u_b_g )
+v_mod_b_g.setAssociation( v_b_g )
+w_mod_b_g.setAssociation( w_b_g )
+
+x_mod_b_g_t.setAssociation( x_b_g_t )
+y_mod_b_g_t.setAssociation( y_b_g_t )
+z_mod_b_g_t.setAssociation( z_b_g_t )
+u_mod_b_g_t.setAssociation( u_b_g_t )
+v_mod_b_g_t.setAssociation( v_b_g_t )
+w_mod_b_g_t.setAssociation( w_b_g_t )
+
+# petit trou
+
+x_mod_b_p.setAssociation( x_b_p )
+y_mod_b_p.setAssociation( y_b_p )
+z_mod_b_p.setAssociation( z_b_p )
+u_mod_b_p.setAssociation( u_b_p )
+v_mod_b_p.setAssociation( v_b_p )
+w_mod_b_p.setAssociation( w_b_p )
+
+x_mod_b_p_t.setAssociation( x_b_p_t )
+y_mod_b_p_t.setAssociation( y_b_p_t )
+z_mod_b_p_t.setAssociation( z_b_p_t )
+u_mod_b_p_t.setAssociation( u_b_p_t )
+v_mod_b_p_t.setAssociation( v_b_p_t )
+w_mod_b_p_t.setAssociation( w_b_p_t )
+
+
+
+
+#=================================
+# Creation association des edges
+#=================================
+
+
+All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])
+
+##------------------
+## Arrondies du haut
+##------------------
+
+#geometrie
+Edge_Arr_grd_g_h = All_Edges_Bielle[20]
+Edge_Arr_grd_d_h = All_Edges_Bielle[22]
+Edge_Arr_pte_g_h = All_Edges_Bielle[8]
+Edge_Arr_pte_d_h = All_Edges_Bielle[10]
+
+#model
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )
+Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )
+
+
+
+##------------------
+## Arrondies du bas
+##------------------
+# geometrie
+Edge_Arr_grd_g_b = All_Edges_Bielle[19]
+Edge_Arr_grd_d_b = All_Edges_Bielle[21]
+Edge_Arr_pte_g_b = All_Edges_Bielle[7]
+Edge_Arr_pte_d_b = All_Edges_Bielle[9]
+
+
+#model
+Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )
+Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )
+
+
+
+##------------------
+## Grands rayons
+##------------------
+
+# geometrie
+Edge_Ray_grd_g_b = All_Edges_Bielle[27]
+Edge_Ray_grd_g_h = All_Edges_Bielle[28]
+Edge_Ray_grd_d_b = All_Edges_Bielle[0]
+Edge_Ray_grd_d_h = All_Edges_Bielle[1]
+
+
+#model
+Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )
+Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )
+Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )
+Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )
+Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )
+Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )
+Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )
+Edge_Grd_Ray_7_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )
+
+
+
+
+##------------------
+## ASSOCIATIONS : arrondies du haut, arrondies du bas et grands rayons 
+##------------------
+
+
+#arrondies du haut
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Ray_grd_g_h, u_1, 1. )#Edge_haut_grd
+
+
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Ray_grd_g_h, 0., u_3 )
+
+
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Ray_grd_d_h, 0., u_3 )
+
+
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Ray_grd_d_h, u_1, 1. )
+
+
+#arrondies du bas
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Ray_grd_g_b, u_1, 1. )
+
+
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Ray_grd_g_b, 0., u_3 )
+
+
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Ray_grd_d_b, 0., u_3 )
+
+
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Ray_grd_d_b, u_1, 1. )
+
+
+#grands rayon
+Edge_Grd_Ray_0_mod.addAssociation( Edge_Ray_grd_d_b, u_3, u_2 )
+Edge_Grd_Ray_1_mod.addAssociation( Edge_Ray_grd_d_h, u_3, u_2 )
+Edge_Grd_Ray_2_mod.addAssociation( Edge_Ray_grd_d_b, u_2, u_1 )
+Edge_Grd_Ray_3_mod.addAssociation( Edge_Ray_grd_d_h, u_2, u_1 )
+
+Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b, u_2, u_1 )
+Edge_Grd_Ray_5_mod.addAssociation( Edge_Ray_grd_g_h, u_2, u_1 )
+Edge_Grd_Ray_6_mod.addAssociation( Edge_Ray_grd_g_b, u_3, u_2 )
+Edge_Grd_Ray_7_mod.addAssociation( Edge_Ray_grd_g_h, u_3, u_2 )
+
+
+
+
+# recuperer les rayons des trous de la bielle de la geometrie
+Edge_Trou_grd_h = All_Edges_Bielle[26]
+Edge_Trou_grd_b = All_Edges_Bielle[25]
+Edge_Trou_pte_h = All_Edges_Bielle[3]
+Edge_Trou_pte_b = All_Edges_Bielle[2]
+
+
+Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]
+Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]
+Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]
+Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]
+Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]
+Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]
+
+
+Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )
+
+
+Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )
+Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )
+Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )
+Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )
+Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )
+Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )
+
+
+Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]
+Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]
+Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]
+Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]
+Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]
+Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]
+
+
+Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )
+Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )
+
+
+Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )
+Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )
+Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )
+Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )
+Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )
+Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )
+
+
+
+Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]
+Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]
+Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]
+Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]
+Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]
+Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]
+
+
+Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )
+
+
+Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )
+Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )
+Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )
+Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )
+Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )
+Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )
+
+
+Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])
+
+
+Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]
+Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]
+Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]
+Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]
+Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]
+Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]
+
+
+Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )
+Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )
+
+Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )
+Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )
+Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )
+Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )
+Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )
+Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )
+
+
+
+#====================================
+# CREATION DES FACES DES ARRONDIES
+#====================================
+All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])
+
+Face_Arron_1 = All_Face_Arron_Bielle[2]
+Face_Arron_2 = All_Face_Arron_Bielle[3]
+Face_Arron_3 = All_Face_Arron_Bielle[8]
+Face_Arron_4 = All_Face_Arron_Bielle[9]
+
+Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )
+Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )
+Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )
+Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )
+
+
+
+#=================================================
+# VERTEX, EDGES, FACES DANS L'ARBRE D'ETUDE SALOME
+#=================================================
+
+geompy.addToStudy( y_h_g , "y_h_g" )
+geompy.addToStudy( y_b_g , "y_b_g" )
+geompy.addToStudy( v_h_p , "v_h_p" )
+geompy.addToStudy( v_b_p , "v_b_p" )
+geompy.addToStudy( x_h_g , "x_h_g" )
+geompy.addToStudy( x_b_g , "x_b_g" )
+geompy.addToStudy( z_h_g , "z_h_g" )
+geompy.addToStudy( z_b_g , "z_b_g" )
+geompy.addToStudy( w_h_p , "w_h_p" )
+geompy.addToStudy( w_b_p , "w_b_p" )
+geompy.addToStudy( u_h_p , "u_h_p" )
+geompy.addToStudy( u_b_p , "u_b_p" )
+geompy.addToStudy(y_h_g_t, "y_h_g_t")
+geompy.addToStudy(y_b_g_t, "y_b_g_t")
+geompy.addToStudy(z_h_g_t, "z_h_g_t")
+geompy.addToStudy(z_b_g_t, "z_b_g_t")
+geompy.addToStudy(w_h_g_t, "w_h_g_t")
+geompy.addToStudy(w_b_g_t, "w_b_g_t")
+geompy.addToStudy(v_h_g_t, "v_h_g_t")
+geompy.addToStudy(v_b_g_t, "v_b_g_t")
+geompy.addToStudy(u_h_g_t, "u_h_g_t")
+geompy.addToStudy(u_b_g_t, "u_b_g_t")
+geompy.addToStudy(x_h_g_t, "x_h_g_t")
+geompy.addToStudy(x_b_g_t, "x_b_g_t")
+geompy.addToStudy(y_h_p_t, "y_h_p_t")
+geompy.addToStudy(y_b_p_t, "y_b_p_t")
+geompy.addToStudy(z_h_p_t, "z_h_p_t")
+geompy.addToStudy(z_b_p_t, "z_b_p_t")
+geompy.addToStudy(w_h_p_t, "w_h_p_t")
+geompy.addToStudy(w_b_p_t, "w_b_p_t")
+geompy.addToStudy(v_h_p_t, "v_h_p_t")
+geompy.addToStudy(v_b_p_t, "v_b_p_t")
+geompy.addToStudy(u_h_p_t, "u_h_p_t")
+geompy.addToStudy(u_b_p_t, "u_b_p_t")
+geompy.addToStudy(x_b_p_t, "x_b_p_t")
+geompy.addToStudy(u_h_g, "u_h_g")
+geompy.addToStudy(u_b_g, "u_b_g")
+geompy.addToStudy(x_h_p, "x_h_p")
+geompy.addToStudy(x_b_p, "x_b_p")
+geompy.addToStudy(w_h_g, "w_h_g")
+geompy.addToStudy(w_b_g, "w_b_g")
+geompy.addToStudy(z_h_p, "z_h_p")
+geompy.addToStudy(z_b_p, "z_b_p")
+geompy.addToStudy(v_h_g, "v_h_g")
+geompy.addToStudy(v_b_g, "v_b_g")
+geompy.addToStudy(y_h_p, "y_h_p")
+geompy.addToStudy(y_b_p, "y_b_p")
+
+
+geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )
+geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )
+geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )
+geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )
+geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )
+geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )
+geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )
+geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )
+geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )
+geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )
+geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )
+geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )
+geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )
+geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )
+geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )
+geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )
+geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )
+geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )
+geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )
+geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )
+geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )
+geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )
+geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )
+geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )
+geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )
+geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )
+geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )
+geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )
+
+geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )
+geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )
+geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )
+geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )
+
+geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )
+geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )
+geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )
+geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )
+
+geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )
+geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )
+geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )
+geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )
+
+
+geompy.addToStudy(Face_Arron_1, "Face_Arron_1")
+geompy.addToStudy(Face_Arron_2, "Face_Arron_2")
+geompy.addToStudy(Face_Arron_3, "Face_Arron_3")
+geompy.addToStudy(Face_Arron_4, "Face_Arron_4")
+
+
+geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )
+geompy.addToStudy( Partition_Trou_grd_bas ,  "Partition_Trou_grd_bas" )
+geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )
+geompy.addToStudy( Partition_Trou_pte_bas ,  "Partition_Trou_pte_bas" )
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+#print Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+
+#n = doc.countLaw()
+#print n
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+#====================================
+# Générer des maillages
+#====================================
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh_hexas = hexablock.mesh(doc, "Bielle:hexas")
+
+print "Nombre d hexaedres:"   , mesh_hexas.NbHexas()
+print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()
+print "Nombre de segments:"   , mesh_hexas.NbEdges()
+print "Nombre de noeuds:"     , mesh_hexas.NbNodes()
+
+print  " --- MAILLAGE QUADRANGULAIRE --- "
+mesh_quads = hexablock.mesh(doc, "Bielle:quads", 2)
+
+print "Nombre d hexaedres:"   , mesh_quads.NbHexas()
+print "Nombre de quadrangles:", mesh_quads.NbQuadrangles()
+print "Nombre de segments:"   , mesh_quads.NbEdges()
+print "Nombre de noeuds:"     , mesh_quads.NbNodes()
+
+print  " --- MAILLAGE 1D --- "
+mesh_edges = hexablock.mesh(doc, "Bielle:edges", 1)
+
+print "Nombre d hexaedres:"   , mesh_edges.NbHexas()
+print "Nombre de quadrangles:", mesh_edges.NbQuadrangles()
+print "Nombre de segments:"   , mesh_edges.NbEdges()
+print "Nombre de noeuds:"     , mesh_edges.NbNodes()
+
+print  " --- MAILLAGE des sommets --- "
+mesh_nodes = hexablock.mesh(doc, "Bielle:nodes", 0)
+
+print "Nombre d hexaedres:"   , mesh_nodes.NbHexas()
+print "Nombre de quadrangles:", mesh_nodes.NbQuadrangles()
+print "Nombre de segments:"   , mesh_nodes.NbEdges()
+print "Nombre de noeuds:"     , mesh_nodes.NbNodes()
diff --git a/doc/conf.py.in b/doc/conf.py.in
new file mode 100644 (file)
index 0000000..8cac1dc
--- /dev/null
@@ -0,0 +1,197 @@
+# -*- coding: utf-8 -*-
+#
+# HexaBlock documentation build configuration file, created by
+# sphinx-quickstart on Fri Nov 19 14:09:24 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+sys.path.append(os.path.abspath('.'))
+#sys.path.append(os.path.abspath('sphinxext'))
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
+
+# extensions = ['matplotlib.sphinxext.mathmpl',
+#              'matplotlib.sphinxext.only_directives',
+#              'matplotlib.sphinxext.plot_directive',
+#              'sphinx.ext.autodoc',
+#              'sphinx.ext.doctest',
+#              'ipython_console_highlighting',
+#              'inheritance_diagram',
+#              'numpydoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'HexaBlock'
+copyright = u'2009-2012  CEA/DEN, EDF R&D'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '@SHORT_VERSION@'
+# The full version, including alpha/beta/rc tags.
+release = '@VERSION@'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'HexaBlockdoc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+latex_documents = [
+  ('index', 'HexaBlock.tex', ur'HexaBlock Documentation',
+   ur'CS', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
diff --git a/doc/creategrids.rst b/doc/creategrids.rst
new file mode 100644 (file)
index 0000000..aac43b0
--- /dev/null
@@ -0,0 +1,167 @@
+:tocdepth: 3
+
+.. _creategrids:
+
+============
+Create grids
+============
+
+To create a **Grid** in the **Main Menu** select **Model -> Make Grid**.
+
+Three kinds of grid can be created:
+
+- cartesian grid (see :ref:`guicartgrid`),
+- cylindrical grid (see :ref:`guicylgrid`),
+- spherical grid (see :ref:`guisphergrid`).
+
+.. _guicartgrid:
+
+Cartesian grid
+==============
+
+To create a cartesian grid, select radio button **Cartesian**:
+
+.. image:: _static/gui_make_cart_grid.png
+   :align: center
+
+.. centered::
+      Dialogue Box for a Cartesian grid
+
+
+The following data are required:
+
+- the vertex of the initial hexahedron,
+- the vector corresponding to the diametrically opposite vertex to the initial vertex,
+- the number of repetition of this hexahedra along the three axes
+  (n(x), n(y) and n(z)).
+
+
+The result of this action is:
+
+.. image:: _static/cartgrid3.png
+   :align: center
+
+.. centered::
+   Result Cartesian Grid
+
+TUI command: :ref:`tuicartgrid`
+
+
+.. _guicylgrid:
+
+Cylindrical grid
+================
+
+To create a cylindrical grid, select radio button **Cylindrical**:
+
+.. image:: _static/gui_make_cyl_grid.png
+   :align: center
+
+.. centered::
+   Dialogue Box for a Cylindrical grid (regular size)
+
+
+The following data are required:
+
+- Cylinder
+    - center: coordinates of the cylinder base center (select a vertex).
+    - base: base vector of the cylinder (select a vector).
+    - height: vertical vector of the cylinder (select a vector).
+
+- Grid
+    - radius: size and number of elements from the center.
+    - angle: size and number of elements around the center.
+    - height: size and number of elements on height.
+    - fill: choose this option to fill the central part of the hexhahedra.
+
+
+Elements size of the grid can be irregular (differents sizes). Select the adequate radio button:
+
+.. image:: _static/gui_make_cyl_grid_irregular.png
+   :align: center
+
+.. centered::
+   Dialogue Box for a Cylindrical grid (irregular size)
+
+
+The result is an array of hexahedra which are arranged along the
+radial axis first, then the angular axis, then according to the layers
+and then possibly hexahedra filling the central part.
+
+The filling of the central part of the cylinder is made​ according to the two following cases:
+
+.. image:: _static/cyl_grid2.PNG
+   :align: center
+
+.. centered::
+   Filling of the central part of the cylinder in the case the number of angular elements is odd na = 5.
+
+.. image:: _static/cyl_grid1.PNG
+   :align: center
+
+.. centered::
+   Filling of the central part of the cylinder in the case the number of angular elements is even na = 4.
+
+
+The result:
+
+.. image:: _static/cylgrid1.png
+   :align: center
+
+.. image:: _static/cylgrid2.png
+   :align: center
+
+.. image:: _static/cylgrid3.png
+   :align: center
+
+.. image:: _static/cylgrid4.png
+   :align: center
+
+.. image:: _static/cylgrid5.png
+   :align: center
+
+.. image:: _static/cylgrid6.png
+   :align: center
+
+
+.. centered::
+   Cylindrical grids with different filling cases
+
+TUI command: :ref:`tuicylgrid`
+
+.. _guisphergrid:
+
+Spherical grid
+===============
+
+To create a spherical grid, select radio button **Spherical**:
+
+.. image:: _static/gui_make_spher_grid.png
+   :align: center
+
+.. centered::
+   Dialogue Box for a Spherical grid
+
+
+The following data are required:
+
+- the center (vertex) of the central hexahedron,
+- the vector corresponding to the diametrically opposite vertex to the initial vertex,
+- the number of embedded hexahedra (nb),
+- the coefficient of growth (k).
+
+
+The result is an array of hexahedra starting with the central and
+other hexahedral are arranged layer by layer from the center. Each
+layer contains six hexahedral always in the following order: two along
+the X axis, then two for the Y axis and two for the Z axis.
+
+The result of this action is:
+
+.. image:: _static/sph_grid.png
+   :align: center
+
+.. centered::
+   Resulting Spherical grid
+
+TUI command: :ref:`tuisphergrid`
diff --git a/doc/full_example_bridle.rst b/doc/full_example_bridle.rst
new file mode 100644 (file)
index 0000000..705a3c6
--- /dev/null
@@ -0,0 +1,114 @@
+:tocdepth: 4
+
+.. _fullexample:
+
+#################################
+Example generated from HexaBlock
+#################################
+
+
+.. image:: _static/bride.PNG
+   :align: center
+
+.. centered::
+   Bridle
+
+
+::
+
+
+    # -*- coding: latin-1 -*-
+
+    import os
+    import GEOM
+    import geompy
+    import smesh
+    import hexablock
+    import math
+    import SALOMEDS
+
+    STEP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/crank.stp")
+
+
+    doc = hexablock.addDocument()
+    OPT_QUAD_IK = 1
+    OPT_FIRST   = 2
+
+    # ======================================================== merge_quads
+    def merge_quads (doc, quart, demi, ni1, nj1, ni2, nj2, option=0):
+
+        prems   = option == OPT_QUAD_IK
+        quad_ik = option == OPT_FIRST
+
+        if quad_ik:
+            orig = quart.getQuadIK (ni1, nj1, k1)
+         else:
+            orig = quart.getQuadJK (ni1, nj1, k1)
+
+        dest = demi .getQuadJK (ni2, nj2, k1)
+
+        v1 = dest.getVertex (quad_ik);
+        v3 = dest.getVertex (1-quad_ik);
+
+        v2 = orig.getVertex (0);
+        v4 = orig.getVertex (1);
+
+        doc.mergeQuads (dest, orig, v1, v2, v3, v4)
+
+    #================================================================================= Begin
+    orig1 = doc.addVertex (0,0,0)
+    orig2 = doc.addVertex (6,0,0)
+
+    dz = doc.addVector (0,0,1)
+    dx = doc.addVector (1,0,0)
+
+    dim_z  = 5
+    drd = 0.5
+    drq = 2*drd
+    dl  = 1
+    nrq = 8
+    nrd = 3
+    naq = 4
+    nad = 8
+    k0  = 0
+    k1  = 1
+
+    quart = doc.makeCylindrical (orig1,dx,dz,drq, 45, dl, nrq, naq, dim_z, True)
+    for nk in range(dim_z-2):
+        ##  Elagage du quart (de brie)
+        for nj in range(naq):
+        ideb = 2
+        if nk == dim_z-1:
+            ideb = 1
+        for nj in range(naq):
+              for ni in range(nrq-ideb):
+                doc.removeHexa(quart.getHexaIJK(ni+ideb, nj, nk+2))
+
+    ## La semelle
+    for nj in range(naq):
+        for ni in range(nrq-2):
+            doc.removeHexa(quart.getHexaIJK(ni+2, nj, k0))
+
+    ## Le demi 
+    demi = doc.makeCylindrical(orig2, dx, dz, drd, 180, dl, nrd, nad, dim_z, True)
+
+    for nk in range(dim_z-2):
+        for nj in range(nad):
+            ni0 = max(nrd-nk, 0)
+            for ni in range(nrd-ni0):
+                doc.removeHexa(demi.getHexaIJK(ni+ni0, nj, nk+2))
+
+    jmax = nrq-1
+    for nj in range(2):
+        for ni in range(jmax-3):
+            doc.removeHexa(quart.getHexaIJK (ni+3, nj, k1))
+
+    ###merge_quads (doc, quart, demi, 7, 0,   nrd, 0, OPT_FIRST);
+    ###rge_quads (doc, quart, demi, 7, 1,   nrd, 1);
+
+    #______________________________________________________________
+
+    ###  mesh = smesh.HexaBlocks(doc)
+    mesh = hexablock.mesh("bride:hexas", doc)
+
+
diff --git a/doc/general.rst b/doc/general.rst
new file mode 100644 (file)
index 0000000..6f00cc0
--- /dev/null
@@ -0,0 +1,82 @@
+:tocdepth: 3
+
+.. _generale:
+
+#########################
+Introduction to HEXABLOCK 
+#########################
+
+.. Within the SALOME framework, a CAD module (GEOM) and a meshing
+   module (SMESH) are developed. This tools enable the construction
+   of hexahedrical meshes by means of a CAD cutting in blocks (the
+   method of blocks) topologically equivalent to hexahedra. Once this
+   cutting performed, the mesh construction is easy, but the method of
+   blocks can be touchy if the piece to mesh is complex.
+
+Goals
+=====
+
+The HexaBlock module is designed to help users to build hexahedrical meshes
+via the method by blocks. The two fundamental choices are:
+
+- To execute the method by blocks where the user has to determine the needed blocks.
+- To simplify all other tasks to obtain the mesh (in particular by
+  using directly the geometry to mesh).
+
+Solution
+========
+
+Finding a compound of blocks is in charge of users.
+HexaBlock enables to define a mesh with hexahedra in five stages:
+
+- Load and create a geometry without constraint.
+- Search a compound of blocks (mental working).
+- Create a model of blocks:
+
+  - Logic realization of this division with operations on blocks.
+  - Regardless of the geometry to be meshed in terms of shape and placement.
+
+- Associate this model of blocks to the geometry:
+
+  - Associate all the vertices of the model to the geometry.
+  - If necessary, associate edges of the model to the geometry.
+  - If necessary, associate quads of the model to the geometry.
+
+- Generate the mesh:
+
+  - Create discretization laws.
+  - Discretize the edges.
+  - Define mesh groups.
+  - Setting the mesh generation.
+
+Two ways of working are possible:
+
+- *Graphic User Interface*
+- *Python Scripting*
+
+
+Presentation of the stages
+==========================
+
+- The construction of the real CAD (see :ref:`cad`).
+
+- The creation of a model of blocks (see :ref:`blockmethod`).
+
+- The association of this model of blocks to the geometry (see :ref:`assomodelgeo`).
+
+- The mesh generation (see :ref:`generatemesh`).
+
+
+
+.. toctree::
+   :maxdepth: 3
+
+   cad.rst
+   block_method.rst
+   intro_association.rst
+   intro_groups.rst
+   intro_mesh.rst
+   intro_python.rst
+   annexe.rst
+   
diff --git a/doc/gui.rst b/doc/gui.rst
new file mode 100644 (file)
index 0000000..427ea3c
--- /dev/null
@@ -0,0 +1,7 @@
+:tocdepth: 3
+
+.. _gui:
+
+====
+GUI
+====
diff --git a/doc/gui_asso_quad_to_geom.rst b/doc/gui_asso_quad_to_geom.rst
new file mode 100644 (file)
index 0000000..dab7886
--- /dev/null
@@ -0,0 +1,93 @@
+:tocdepth: 3
+
+.. _guiassoquadtogeom:
+
+=============================================
+Associate the model of blocks to the geometry
+=============================================
+
+The association of the model of blocks to the geometry proceeds in three steps:
+
+- associate all vertices,
+- associate the needed edges,
+- associate the needed quadrangles.
+
+To facilitate the association of the model to the geometry, a more easy way exists:
+the association of lines taken from the model to lines taken from the geometry.
+
+The interaction for an association of an element of the model of blocks to the geometry
+proceeds in three stages:
+
+- select the model element(s) to associate,
+- select the shape(s) of the geometry to associate to,
+- make the association,
+
+.. _guiassovertex:
+
+Associate to a vertex of the geometry
+=====================================
+
+To associate a vertex of the model of blocks to a vertex of the geometry in
+the **Main Menu** select **Model -> Make Vertex association**
+
+**Arguments:**
+
+- vertex of the model of blocks,
+- vertex of the geometry.
+
+The dialogue box to associate to a vertex of the geometry is:
+
+.. image:: _static/gui_ass_vertex.png
+   :align: center
+
+.. centered::
+   Associate to a Vertex of the Geometry
+
+.. _guiassoedge:
+
+Associate to edge or lines of the geometry
+==========================================
+
+To associate edge(s) of the model of blocks to line(s) of the geometry in
+the **Main Menu** select **Model -> Make Edge Association**
+
+**Arguments:**
+
+- starting vertex (only if "closed line" is selected),
+- one or several edges of the model of blocks,
+- one or several lines of the geometry,
+- choose to associate a closed line or an opened line,
+- Start: starting point on the line,
+- End: ending point on the line.
+
+The dialogue box to associate to edges or wires of the geometry is:
+
+.. image:: _static/gui_ass_edge.png
+   :align: center
+
+.. centered::
+   Associate to Edges or Wires of the Geometry
+
+.. _guiassoface:
+
+Associate to a face of the geometry
+===================================
+
+To associate a quadrangle of the model of blocks to a face of the geometry in
+the **Main Menu** select **Model -> Make Quadrangle association**
+
+**Arguments:**
+
+- quadrangle of the model of blocks,
+- list of faces of the geometry.
+
+The dialogue box to associate to a face or a shell of the geometry is:
+
+.. image:: _static/gui_ass_quad.png
+   :align: center
+
+.. centered::
+   Associate to a Face or a Shell of the Geometry
+
+
+TUI command: :ref:`tuiassoquadtogeom`
diff --git a/doc/gui_blocks_for_cyl_pipe.rst b/doc/gui_blocks_for_cyl_pipe.rst
new file mode 100644 (file)
index 0000000..0c767c5
--- /dev/null
@@ -0,0 +1,124 @@
+:tocdepth: 3
+
+
+.. _guiblockscylinderpipe:
+
+=====================================
+Make blocks for a cylinder and a pipe
+=====================================
+
+.. _makecylinder:
+
+Make Cylinder
+=============
+
+To make a **Cylinder** in the **Main Menu** select **Model -> Make Cylinder**.
+
+To make a cylinder, the following data are required:
+
+- Cylinder: a cylinder.
+- Vector: a vector on the base of the cylinder to start hexahedra.
+- nr: the number of blocks on radial.
+- na: the number of angular section.
+- nl: the number of blocks along the axis of the cylinder.
+
+The dialogue box to make a cylinder is:
+
+.. image:: _static/gui_make_cylinder.png
+   :align: center
+
+.. centered::
+   Make a Cylinder
+
+The result is an array of hexahedral ranked first by following the
+radial direction and the angular direction, then according to the
+layers in the cylinder axis.
+
+The result of this action is:
+
+.. image:: _static/cylinder.png
+   :align: center
+
+.. centered::
+   Cylinder
+
+.. _makecylinders:
+
+Make Cylinders
+==============
+
+To make **two cylinders in T shape** in the **Main Menu** select **Model -> Make Cylinders** 
+
+You can make **Cylinders** through **Cylinder1** and **Cylinder2**.
+
+**Arguments:** 2 cylinders.
+
+The dialogue box to make cylinders is:
+
+.. image:: _static/gui_make_cylinders.png
+   :align: center
+
+.. centered::
+   Make Cylinders
+
+The result is an array of hexahedral.
+
+.. _makepipe:
+
+Make Pipe
+=========
+
+To make a **Pipe** in the **Main Menu** select **Model -> Make Pipe**.
+
+To make a pipe, the following data are required:
+
+- Pipe: a pipe.
+- Vector: a vector on the base of the pipe to start hexahedra.
+- nr: the number of blocks on radial.
+- na: the number of angular section.
+- nl: the number of blocks along the axis of the pipe.
+
+The dialogue box to make a pipe is:
+
+.. image:: _static/gui_make_pipe.png
+   :align: center
+
+.. centered::
+   Make a Pipe
+
+The result is an array of hexahedral arranged in layers following the
+first radial and angular layers, and finally the axial layers.
+
+The result of this action is:
+
+.. image:: _static/pipe.png
+   :align: center
+
+.. centered::
+   Pipe
+
+
+.. _makepipes:
+
+Make Pipes
+==========
+
+To make **two intersect pipes** in the **Main Menu** select **Model -> Make Pipes**.
+
+You can make **Pipes** through **Pipe1** and **Pipe2**.
+
+**Arguments:** 2 pipes.
+
+The dialogue box to make pipes is:
+
+.. image:: _static/gui_make_pipes.png
+   :align: center
+
+.. centered::
+   Make Pipes
+
+The result is an array of hexahedra where we first find hexahedra of
+the first pipe and the second pipe. Each pipe range hexahedra following
+first radial layers and angular layers, and finally the axial layers.
+
+TUI command: :ref:`tuiblockscylinderpipe`
diff --git a/doc/gui_component.rst b/doc/gui_component.rst
new file mode 100644 (file)
index 0000000..8b5d73e
--- /dev/null
@@ -0,0 +1,39 @@
+:tocdepth: 3
+
+
+.. _guicomponent:
+
+=========
+Component
+=========
+
+To activate HexaBlock component, in the corresponding area of the screen:
+
+.. image:: _static/component2.png
+   :align: center
+
+Select the HexaBlock component in the list:
+
+.. image:: _static/component1.png
+   :align: center
+
+.. centered::
+   Activate HexaBlock Component (first method)
+
+Or click on the corresponding icon:
+
+.. image:: _static/component3.png
+   :align: center
+
+.. centered::
+   Activate HexaBlock Component (second method)
+
+The result of this action is:
+
+.. image:: _static/component4.png
+   :align: center
+
+.. centered::
+   Result of the Activation of HexaBlock Component
+
+TUI command: :ref:`tuicomponent`
diff --git a/doc/gui_cut_hexa.rst b/doc/gui_cut_hexa.rst
new file mode 100644 (file)
index 0000000..d717ce4
--- /dev/null
@@ -0,0 +1,41 @@
+:tocdepth: 3
+
+
+.. _guicuthexa:
+
+=============
+Cut hexahedra
+=============
+
+This method allows to cut in two (or more) a series of hexahedra
+using a series of edges propagation.
+
+To cut an hexahedra in the **Main Menu** select **Model -> Cut Hexahedra**.
+
+**Arguments:** an edge and the number of cuts (nb).
+
+The dialogue box for the cut of an hexahedra is:
+
+.. image:: _static/gui_cut_hexa.png
+   :align: center
+
+.. centered::
+   Cut Hexahedra
+
+Example:
+
+.. image:: _static/no_cut.png
+   :align: center
+
+.. centered::
+   no cut
+
+
+.. image:: _static/cut.png
+   :align: center
+
+.. centered::
+   cut
+
+
+TUI command: :ref:`tuicuthexa`
diff --git a/doc/gui_cyl.rst b/doc/gui_cyl.rst
new file mode 100644 (file)
index 0000000..777af35
--- /dev/null
@@ -0,0 +1,22 @@
+:tocdepth: 3
+
+
+.. _guicylinder:
+
+========
+Cylinder
+========
+
+To create a **Cylinder** in the **Main Menu** select **Model -> Add Cylinder**.
+
+**Arguments:** a vertex, a vector, a radius and a height.
+
+The dialogue box for the creation of a cylinder is:
+
+.. image:: _static/gui_cylinder.png
+   :align: center
+
+.. centered::
+   Create a Cylinder
+
+TUI command: :ref:`tuicylinder`
diff --git a/doc/gui_disc_elmts.rst b/doc/gui_disc_elmts.rst
new file mode 100644 (file)
index 0000000..6b01583
--- /dev/null
@@ -0,0 +1,80 @@
+:tocdepth: 3
+
+.. _guidisconnectelements:
+
+===================
+Disconnect elements
+===================
+
+To disconnect elements in the **Main Menu** select **Model -> Disconnect**.
+
+.. _guidiscoquad:
+
+Disconnect a quadrangle
+=======================
+
+**Arguments:**
+
+- q: the quadrangle to disconnect.
+- from hexa: the hexahedron to disconnect the quadrangle from.
+
+The dialogue box to disconnect a quadrangle is:
+
+
+.. image:: _static/gui_disco_quad.png
+   :align: center
+
+.. centered::
+   Disconnect a Quadrangle
+
+Example:
+
+.. image:: _static/disco_quad.png
+   :align: center
+
+.. centered::
+   Disconnect a Quadrangle
+
+
+.. _guidiscoedge:
+
+Disconnect an edge
+==================
+
+**Arguments:**
+
+- e: the edge to disconnect.
+- from hexa: the hexahedron to disconnect the edge from.
+
+
+The dialogue box to disconnect an edge is:
+
+
+.. image:: _static/gui_disco_edge.png
+   :align: center
+
+.. centered::
+   Disconnect an Edge
+
+.. _guidiscovertex:
+
+Disconnect a vertex
+===================
+
+**Arguments:**
+
+- v: the vertex to disconnect.
+- from hexa: the hexahedron to disconnect the vertex from.
+
+
+The dialogue box to disconnect a vertex is:
+
+
+.. image:: _static/gui_disco_vertex.png
+   :align: center
+
+.. centered::
+   Disconnect a Vertex
+
+
+TUI command: :ref:`tuidisconnectelements`
diff --git a/doc/gui_discret_law.rst b/doc/gui_discret_law.rst
new file mode 100644 (file)
index 0000000..a708358
--- /dev/null
@@ -0,0 +1,49 @@
+:tocdepth: 3
+
+.. _guidiscretelaw:
+
+==========================
+Manage discretization laws
+==========================
+
+
+.. _guiaddlaw:
+
+Add law
+=======
+
+A discretization law is defined by four properties:
+
+- the name of the law
+- the number of nodes for the discretization law
+- the coefficient for the arithmetic and geometric law
+- the kind of the law:
+    - uniform (default)
+    - arithmetic
+    - geometric
+
+To define a discretization law in the **Main Menu** select **Mesh -> Add Law**.
+
+The dialogue box to create a law is:
+
+.. image:: _static/gui_add_law.png
+   :align: center
+
+.. centered::
+   Add a Discretization Law
+
+Remove law
+==========
+
+To remove a discretization law in the **Main Menu** select **Mesh -> Remove Law**.
+
+
+.. image:: _static/gui_remove_law.png
+   :align: center
+
+.. centered::
+   Remove law
+
+
+
+TUI command: :ref:`tuidiscretelaw`
diff --git a/doc/gui_document.rst b/doc/gui_document.rst
new file mode 100644 (file)
index 0000000..e7b5c66
--- /dev/null
@@ -0,0 +1,39 @@
+:tocdepth: 3
+
+.. _guidocument:
+
+========
+Document
+========
+
+To create a new document in the **Main Menu** select **Document -> New Document**.
+
+To load a document in the **Main Menu** select **Document -> Load Document**.
+
+To save a document in the **Main Menu** select **Document -> Save Document**.
+
+A document contains all the information to generate a hexahedral mesh:
+
+- the model of blocks,
+- all associations,
+- all groups,
+- all laws set on propagations.
+
+The dialogue box to load a document is:
+
+.. image:: _static/gui_import_document.png
+   :align: center
+
+.. centered::
+   Import Document
+
+The result of this action is:
+
+.. image:: _static/gui_new_document.png
+   :align: center
+
+.. centered::
+   New Document
+
+
+TUI command: :ref:`tuidocument`
diff --git a/doc/gui_edge.rst b/doc/gui_edge.rst
new file mode 100644 (file)
index 0000000..fd2d4f8
--- /dev/null
@@ -0,0 +1,40 @@
+:tocdepth: 3
+
+
+.. _guiedge:
+
+====
+Edge
+====
+
+To create an **Edge** in the **Main Menu** select **Model -> Add Edge**.
+
+There are two algorithms to create an **Edge**.
+
+Firstly you can define an **Edge** through **Point1** and **Point2**,
+which ares the points through which the **Edge** passes.
+
+**Arguments:** 2 vertices.
+
+The dialogue box to create an edge from vertices is:
+
+.. image:: _static/gui_edge_vertices.png
+   :align: center
+
+.. centered::
+   Add Edge from vertices
+
+Secondly you can define an **Edge** through **Point** and **Vector**.
+
+**Arguments:** a vertex and a vector.
+
+The dialogue box to create an edge from a vertex and a vector is:
+
+.. image:: _static/gui_edge2.png
+   :align: center
+
+.. centered::
+   Add Edge from vertices
+
+
+TUI command: :ref:`tuiedge`
diff --git a/doc/gui_elements.rst b/doc/gui_elements.rst
new file mode 100644 (file)
index 0000000..42b63d2
--- /dev/null
@@ -0,0 +1,10 @@
+:tocdepth: 3
+
+
+.. _guielements:
+
+========
+Elements
+========
+
+TUI command: :ref:`tuielements`
diff --git a/doc/gui_groups.rst b/doc/gui_groups.rst
new file mode 100644 (file)
index 0000000..f132723
--- /dev/null
@@ -0,0 +1,48 @@
+:tocdepth: 3
+
+.. _guigroups:
+
+==========================
+Manage groups on the model
+==========================
+
+.. _guiaddgroup:
+
+Add group
+=========
+
+A group is characterized by:
+
+- its name,
+- its type:
+      - HexaCell (default)
+      - EdgeCell
+      - QuadCell
+      - HexaNode
+      - QuadNode
+      - EdgeNode
+      - VertexNode
+- its elements.
+
+To define groups on the model in the **Main Menu** select **Groups -> Add Group**.
+
+.. image:: _static/gui_add_group.png
+   :align: center
+
+.. centered::
+   Add group
+
+Remove group
+============
+
+To remove a group from the model in the **Main Menu** select **Groups -> Remove Group**.
+
+
+.. image:: _static/gui_remove_group.png
+   :align: center
+
+.. centered::
+   Remove group
+
+
+TUI command: :ref:`tuigroups`
diff --git a/doc/gui_hemisphere.rst b/doc/gui_hemisphere.rst
new file mode 100644 (file)
index 0000000..373b994
--- /dev/null
@@ -0,0 +1,148 @@
+:tocdepth: 3
+
+.. _guihemisphere:
+
+=========================
+Create HemiSpherical Grid
+=========================
+
+
+To create an **HemiSpherical Grid** in the **Main Menu** select **Model -> Make Hemisphere**.
+
+.. image:: _static/gui_hemispherical.png
+   :align: center
+
+.. centered::
+      Dialog Box for an hemispherical grid
+
+
+The following data are required:
+
+- Result Name
+    - name: name of the grid created (**optional**).
+
+- Sphere
+    - center: center coordinates of the sphere (select a vertex).
+    - external radius: radius size of the sphere.
+    - internal radius: fill this field to create rind (**optional**).
+
+- Hole
+    - axis(z): axes of the hole (select a vector).
+      Note: This parameter also defines the *vector* parameter on *Cross section* and therefore is automatically filled.
+    - radius: radius size of the hole.
+
+- Cross section
+    - point: coordinates of a point on the surface of the cross section (select a vertex).
+    - vector: normal vector to the surface of the cross section (select a vector).
+      Note: This parameter also defines the *axis(z)* parameter on *Hole* and therefore is automatically filled.
+
+- Radial section
+    - start   : a vector defining the start of the radial section (select a vector).
+    - angle   : fill this field to customize the section (value in degree, **optional**).
+
+- Grid
+    - radius: number of hexahedra from the center of the sphere.
+    - angle: number of hexahedra along the perimeter of the sphere.
+    - height: number of hexahedra on the height of the sphere.
+
+From this dialog box, four kinds of grid can be created:
+
+- hemispherical grid (see :ref:`guihemisphericalgrid`),
+- partial hemisphericalgrid (see :ref:`guiparthemisphericalgrid`),
+- rind grid (see :ref:`guirindgrid`),
+- partial rind grid (see :ref:`guipartrindgrid`).
+
+
+
+.. _guihemisphericalgrid:
+
+HemiSpherical Grid
+==================
+
+This is the default kind of grid when no optional values are filled.
+
+.. image:: _static/hemisphericalgrid.png
+   :align: center
+
+.. centered::
+   An hemispherical grid
+
+TUI command: :ref:`tuihemisphericalgrid`
+
+
+.. _guiparthemisphericalgrid:
+
+Partial HemiSpherical Grid
+==========================
+To create a partial hemispherical grid: On *Radial section* check the *partial* check box and fill in the *angle* parameter.
+
+.. image:: _static/gui_parthemispherical.png
+   :align: center
+
+.. centered::
+      Make a partial hemispherical grid
+
+
+The result:
+
+.. image:: _static/parthemisphericalgrid.png
+   :align: center
+
+.. centered::
+   A partial hemispherical grid
+
+TUI command: :ref:`tuiparthemisphericalgrid`
+
+
+
+.. _guirindgrid:
+
+Rind Grid
+==========
+To create a rind grid: On *Sphere* check the *rind* check box and fill in the *internal radius* parameter.
+
+.. image:: _static/gui_rind.png
+   :align: center
+
+.. centered::
+      Make a rind grid
+
+
+The result:
+
+.. image:: _static/rindgrid.png
+   :align: center
+
+.. centered::
+   A rind grid
+
+TUI command: :ref:`tuirindgrid`
+
+
+
+
+.. _guipartrindgrid:
+
+Partial Rind Grid
+=================
+To create a partial rind grid: in addition to the *internal radius* parameter 
+(see :ref:`guirindgrid`), on *Radial section* check the *partial* check box and fill
+in the *angle* parameter.
+
+.. image:: _static/gui_partrind.png
+   :align: center
+
+.. centered::
+      Make a partial rind grid
+
+
+The result:
+
+.. image:: _static/partrindgrid.png
+   :align: center
+
+.. centered::
+   A partial rind grid
+
+TUI command: :ref:`tuipartrindgrid`
+
diff --git a/doc/gui_hexahedron.rst b/doc/gui_hexahedron.rst
new file mode 100644 (file)
index 0000000..381cccf
--- /dev/null
@@ -0,0 +1,44 @@
+:tocdepth: 3
+
+.. _guihexahedron:
+
+==========
+Hexahedron
+==========
+
+To create an **Hexahedron** in the **Main Menu** select **Model -> Add Hexahedron**.
+
+There are two methods to create an **Hexahedron**.
+
+Create from quadrangles
+=======================
+The **Hexahedron** can be defined its faces (quadrangles).
+
+**Arguments:** Select from 2 to 6 quadrangles.
+
+The dialogue box to create an hexahedron from quadrangles is:
+
+.. image:: _static/gui_hexa_quads.png
+   :align: center
+
+.. centered::
+   Create an Hexahedron from quadrangles
+
+Create from vertices
+====================
+The **Hexahedron** can also be defined by its vertices **Vertex 1**,
+**Vertex 2**, ..., **Vertex 8**.
+
+**Arguments:** Select 8 vertices.
+
+The dialogue box to create an hexahedron from vertices is:
+
+.. image:: _static/gui_hexa_vertices.png
+   :align: center
+
+.. centered::
+   Create an Hexahedron from vertices
+
+TUI command: :ref:`tuihexahedron`
+
+About hexahedron: :ref:`annexe`
diff --git a/doc/gui_make_elmts.rst b/doc/gui_make_elmts.rst
new file mode 100644 (file)
index 0000000..4626559
--- /dev/null
@@ -0,0 +1,107 @@
+:tocdepth: 3
+
+.. _guimakeelements:
+
+======================================
+Make elements by transforming elements
+======================================
+
+To make elements by transforming elements in the **Main Menu** select
+**Model -> Make transformation**.
+
+.. _guimaketranslation:
+
+Make elements by translation
+============================
+
+**Arguments:**
+
+- elements to translate,
+- vector.
+
+
+The dialogue box to make elements by translation is:
+
+.. image:: _static/gui_make_transfo_translation.png
+   :align: center
+
+.. centered::
+   Make Elements by Translation
+
+Example:
+
+.. image:: _static/transfo0.png
+   :align: center
+
+.. centered::
+   Before Transforming 
+
+
+
+.. image:: _static/transfo_translation.png
+   :align: center
+
+.. centered::
+   Make Translation
+
+
+.. _guimakescaling:
+
+Make elements by scaling
+========================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- k growing factor.
+
+The dialogue box to make elements by scaling is:
+
+.. image:: _static/gui_make_transfo_scale.png
+   :align: center
+
+.. centered::
+   Make Elements by Scaling
+
+
+Example:
+
+.. image:: _static/transfo_scale.png
+   :align: center
+
+.. centered::
+   Make Elements by Scaling
+
+.. _guimakerotation:
+
+Make elements by rotation
+=========================
+
+**Arguments:**
+
+- elements,
+- vector direction,
+- vertex,
+- angle.
+
+
+The dialogue box to make elements by rotation is:
+
+
+.. image:: _static/gui_make_transfo_rotation.png
+   :align: center
+
+.. centered::
+   Make Elements by Rotation
+
+Example:
+
+.. image:: _static/transfo_rotation.png
+   :align: center
+
+.. centered::
+   Make Rotation
+
+
+TUI command: :ref:`tuimakeelements`
diff --git a/doc/gui_make_symmetry.rst b/doc/gui_make_symmetry.rst
new file mode 100644 (file)
index 0000000..cc36b99
--- /dev/null
@@ -0,0 +1,69 @@
+:tocdepth: 3
+
+.. _guimakesymmetry:
+
+=========================
+Make elements by symmetry
+=========================
+
+To make elements by symmetry elements in the **Main Menu** select
+**Model -> Make symmetry**.
+
+.. _guimakepoint:
+
+Make elements by point symmetry
+===============================
+
+**Arguments:**
+
+- elements,
+- vertex.
+
+
+The dialogue box to make elements by point symmetry is:
+
+
+.. image:: _static/gui_make_point_symmetry.png
+   :align: center
+
+.. centered::
+   Make Elements by point symmetry
+
+.. _guimakeline:
+
+Make elements by line symmetry
+==============================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- vector.
+
+The dialogue box to make elements by line symmetry is:
+
+.. image:: _static/gui_make_line_symmetry.png
+   :align: center
+
+.. centered::
+   Make Elements by Line Symmetry
+
+.. _guimakeplan:
+
+Make elements by plan symmetry
+==============================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- vector.
+
+The dialogue box to make elements by plan symmetry is:
+
+.. image:: _static/gui_make_plan_symmetry.png
+   :align: center
+
+.. centered::
+   Make Elements by Plan Symmetry
+
diff --git a/doc/gui_merge_elmts.rst b/doc/gui_merge_elmts.rst
new file mode 100644 (file)
index 0000000..b3660cc
--- /dev/null
@@ -0,0 +1,72 @@
+:tocdepth: 3
+
+.. _guimergeelements:
+
+============== 
+Merge elements
+==============
+
+To merge elements in the **Main Menu** select **Model -> Merge**.
+
+.. _guimergequads:
+
+Merge two quadrangles
+=====================
+
+**Arguments:**
+
+- 2 quadrangles (q1 and q2),
+- 4 vertices (v1, v2, v3, v4).
+
+v1: vertex of the quadrangle *q1* to merge with the vertex *v2* of the quadrangle *q2*.
+v3: vertex of the quadrangle *q1* to merge with the vertex *v4* of the quadrangle *q2*.
+
+
+The dialogue box to merge two quadrangles is:
+
+
+.. image:: _static/gui_merge_quads.png
+   :align: center
+
+.. centered::
+   Merge two Quadrangles
+
+.. _guimergeedges:
+
+Merge two edges
+===============
+
+**Arguments:**
+
+- 2 edges (e1 and e2),
+- 2 vertices (v1 and v2).
+
+v1: vertex of the edge *e1* to merge with the vertex *v2* of the edge *e2*.
+
+The dialogue box to merge two edges is:
+
+.. image:: _static/gui_merge_edges.png
+   :align: center
+
+.. centered::
+   Merge two Edges
+
+.. _guimergevertices:
+
+Merge two vertices
+==================
+
+**Arguments:** 2 vertices (v1 and v2).
+
+
+The dialogue box to merge two vertices is:
+
+
+.. image:: _static/gui_merge_vertices.png
+   :align: center
+
+.. centered::
+   Merge two Vertices
+
+
+TUI command: :ref:`tuimergeelements`
diff --git a/doc/gui_mesh.rst b/doc/gui_mesh.rst
new file mode 100644 (file)
index 0000000..0a7edbd
--- /dev/null
@@ -0,0 +1,33 @@
+:tocdepth: 3
+
+.. _guimesh:
+
+
+=================
+Generate the mesh
+=================
+
+
+To generate the mesh in the **Main Menu** select **Mesh -> Compute Mesh**.
+
+**Arguments:**
+
+- Name
+- Dimension:
+
+  - 3: to generate nodes, segments, quadrangles and hexahedral
+  - 2: to generate nodes, segments and quadrangles
+  - 1: to generate nodes and segments
+  - 0: to generate only nodes
+- Container
+
+The dialogue box for generate the mesh is:
+
+.. image:: _static/gui_mesh.png
+   :align: center
+
+.. centered::
+   Compute Mesh
+
+
+TUI command: :ref:`tuimesh`
diff --git a/doc/gui_modify_elmts.rst b/doc/gui_modify_elmts.rst
new file mode 100644 (file)
index 0000000..74b645f
--- /dev/null
@@ -0,0 +1,74 @@
+:tocdepth: 3
+
+.. _guimodifyelements:
+
+
+========================================
+Modify elements by transforming elements
+========================================
+
+To modify elements by transforming elements in the **Main Menu** select 
+**Model -> Perform transformation**.
+
+.. _guimodifytranslation:
+
+Modify elements by translation
+==============================
+
+**Arguments:**
+
+- elements to translate,
+- vector.
+
+The dialogue box to modify elements by translation is:
+
+.. image:: _static/gui_modify_transfo_translation.png
+   :align: center
+
+.. centered::
+   Modify Elements by Translation
+
+.. _guimodifyscaling:
+
+Modify elements by scaling
+==========================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- k growing factor.
+
+
+The dialogue box to modify elements by scaling is:
+
+.. image:: _static/gui_modify_transfo_scale.png
+   :align: center
+
+.. centered::
+   Modify Elements by Scaling
+
+.. _guimodifyrotation:
+
+Modify elements by rotation
+===========================
+
+**Arguments:**
+
+- elements,
+- vector direction,
+- vertex,
+- angle.
+
+
+
+The dialogue box to modify elements by rotation is:
+
+.. image:: _static/gui_modify_transfo_rotation.png
+   :align: center
+
+.. centered::
+   Modify Elements by Rotation
+
+
+TUI command: :ref:`tuimodifyelements`
diff --git a/doc/gui_modify_symmetry.rst b/doc/gui_modify_symmetry.rst
new file mode 100644 (file)
index 0000000..08eb543
--- /dev/null
@@ -0,0 +1,68 @@
+:tocdepth: 3
+
+.. _guimodifysymmetry:
+
+
+===========================
+Modify elements by symmetry
+===========================
+
+To modify elements by symmetry elements in the **Main Menu** select **Model -> Perform Symmetry**.
+
+.. _guimodifypoint:
+
+Modify elements by point symmetry
+=================================
+
+**Arguments:**
+
+- elements,
+- vertex.
+
+The dialogue box to modify elements by point symmetry is:
+
+.. image:: _static/gui_modify_point_symmetry.png
+   :align: center
+
+.. centered::
+   Modify Elements by Point Translation
+
+.. _guimodifyline:
+
+Modify elements by line symmetry
+================================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- vector.
+
+The dialogue box to modify elements by line symmetry is:
+
+.. image:: _static/gui_modify_line_symmetry.png
+   :align: center
+
+.. centered::
+   Modify Elements by Line Symmetry
+
+.. _guimodifyplan:
+
+Modify elements by plan symmetry
+================================
+
+**Arguments:**
+
+- elements,
+- vertex,
+- vector.
+
+The dialogue box to modify elements by plan symmetry is:
+
+.. image:: _static/gui_modify_plan_symmetry.png
+   :align: center
+
+.. centered::
+   Modify Elements by Plan Symmetry
+
diff --git a/doc/gui_pipe.rst b/doc/gui_pipe.rst
new file mode 100644 (file)
index 0000000..117dde0
--- /dev/null
@@ -0,0 +1,22 @@
+:tocdepth: 3
+
+
+.. _guipipe:
+
+====
+Pipe
+====
+
+To create a **Pipe** in the **Main Menu** select **Model -> Add Pipe**.
+
+**Arguments:** a vertex (base), a vector (direction), internal and external radius, and a height (h).
+
+The dialogue box for the creation of a pipe is:
+
+.. image:: _static/gui_pipe.png
+   :align: center
+
+.. centered::
+   Create a Pipe
+
+TUI command: :ref:`tuipipe`
diff --git a/doc/gui_prism_join_quad.rst b/doc/gui_prism_join_quad.rst
new file mode 100644 (file)
index 0000000..cbd8112
--- /dev/null
@@ -0,0 +1,73 @@
+:tocdepth: 3
+
+
+.. _guiprismjoinquad:
+
+
+========================== 
+Prism and join quadrangles
+==========================
+
+.. _prismquad:
+
+Prism Quadrangles
+=================
+
+To prism from quadrangles in the **Main Menu** select **Model -> Prism Quadrangles**.
+
+From a list of quadrangles, a set of hexahedra is created.
+
+**Arguments:** list of quadrangles, a vector (direction) and the number of layers.
+
+The dialogue box to prism from quadrangles is:
+
+
+.. image:: _static/gui_prism_quads.png
+   :align: center
+
+.. centered::
+   Prism From Quadrangles
+
+
+
+Example:
+
+.. image:: _static/prisme_gui.png
+   :align: center
+
+.. centered::
+   Prism Quads
+
+
+
+.. _joinquad:
+
+Join Quadrangles
+================
+
+To join quadrangles in the **Main Menu** select **Model -> Join Quadrangles**.
+
+.. image:: _static/gui_join_quads.png
+   :align: center
+
+.. centered::
+   Join Quadrangles Dialog Box
+
+
+The following data are required:
+
+- From
+    - Quadrangles: the set of quadrangles to be joined and from which hexahedra will be created.
+    - Point a: a vertex belonging to the set of quadrangles.
+    - Point b: a vertex belonging to the set of quadrangles.
+
+- To
+    - Quadrangle: a quadrangle from the set of targeted quadrangles.
+    - Point a: the target vertex (in the target quadrangle) for *From.Point a*.
+    - Point b: the target vertex (in the target quadrangle) for *From.Point b*.
+
+- Grid
+    - size: number of layers of hexahedra issued from the operation.
+
+
+TUI command: :ref:`tuiprismjoinquad`
diff --git a/doc/gui_propag.rst b/doc/gui_propag.rst
new file mode 100644 (file)
index 0000000..e09a01f
--- /dev/null
@@ -0,0 +1,21 @@
+:tocdepth: 3
+
+.. _guipropag:
+
+===================================
+Discretize on the propagation edges
+===================================
+
+To define a propagation in the **Main Menu** select **Mesh -> Set Propagation**.
+
+**Arguments:** a law and a direction.
+
+The dialogue box for creating a propagation is:
+
+.. image:: _static/gui_propagation.png
+   :align: center
+
+.. centered::
+   Propagation
+
+TUI command: :ref:`tuipropag`
diff --git a/doc/gui_quad_revolution.rst b/doc/gui_quad_revolution.rst
new file mode 100644 (file)
index 0000000..a762107
--- /dev/null
@@ -0,0 +1,51 @@
+:tocdepth: 3
+
+.. _guiquadrevolution:
+
+===============
+Quad revolution
+===============
+
+
+To make a **Quad revolution** in the **Main Menu** select **Model -> Quad Revolution**.
+
+.. image:: _static/gui_quadrevolution.png
+   :align: center
+
+.. centered::
+      Dialog Box to make a quadrangle revolution
+
+
+
+The following data are required:
+
+- Result Name
+    - name: name of the elements created (**optional**).
+
+- Arguments
+    - Quads: a set of quadrangles from which hexahedrons will be created (select quads).
+    - Center: center of rotation (select a vertex).
+    - Axis: axis of rotation (select a vector).
+    - Angles: a set of angle (in degrees). Specify the rotation's angle at each step of it.
+
+
+Here is an example where the selected quadrangles are highlighted:
+
+.. image:: _static/before_quadrevolution.png
+   :align: center
+
+.. centered::
+   Quad selection
+
+
+The result:
+
+.. image:: _static/quadrevolution.png
+   :align: center
+
+.. centered::
+   Quadrangle revolution
+
+TUI command: :ref:`tuiquadrevolution`
+
+
diff --git a/doc/gui_quadrangle.rst b/doc/gui_quadrangle.rst
new file mode 100644 (file)
index 0000000..db2c6b7
--- /dev/null
@@ -0,0 +1,46 @@
+:tocdepth: 3
+
+
+.. _guiquadrangles:
+
+==========
+Quadrangle
+==========
+
+To create a **Quadrangle** in the **Main Menu** select **Model -> Add Quadrangle**.
+
+There are two algorithms to create a **Quadrangle**.
+
+Create from vertices
+====================
+The **Quadrangle** can be defined by its vertices **Vertex 1**, **Vertex 2**,
+**Vertex 3** and **Vertex 4**.
+
+**Arguments:** 4 vertices.
+
+The dialogue box for to create a quadrangle from vertices is:
+
+.. image:: _static/gui_quad_vertices.png
+   :align: center
+
+.. centered::
+   Add Quadrangle from vertices
+
+Create from edges
+=================
+The **Quadrangle** can also be defined by its edges **Edge 1**,
+**Edge 2**, **Edge 3** and **Edge 4**.
+
+**Arguments:** 4 edges.
+
+The dialogue box to create a quadrangle from edges is:
+
+.. image:: _static/gui_quad_edges.png
+   :align: center
+
+.. centered::
+   Add Quadrangle from edges
+
+
+
+TUI command: :ref:`tuiquadrangles`
diff --git a/doc/gui_remove.rst b/doc/gui_remove.rst
new file mode 100644 (file)
index 0000000..07ad5a7
--- /dev/null
@@ -0,0 +1,31 @@
+:tocdepth: 3
+
+.. _guiremove:
+
+================
+Remove hexahedra
+================
+
+
+To remove an **Hexahedron** in the **Main Menu** select **Model -> Remove hexahedra**.
+
+**Arguments:** 1 hexahedron and a flag to indicate if connected hexahedra should be removed or not.
+
+
+The dialogue box for removing hexahedra:
+
+
+.. image:: _static/dialogbox_remove.png
+   :align: center
+
+.. centered::
+   Remove hexahedra
+
+The selection can be made either in the list of hexahedra or in the graphic zone.
+
+The result of this action is:
+
+.. image:: _static/remove3.png
+   :align: center
+
+TUI command: :ref:`tuiremove`
diff --git a/doc/gui_replace_hexa.rst b/doc/gui_replace_hexa.rst
new file mode 100644 (file)
index 0000000..b5e1c7f
--- /dev/null
@@ -0,0 +1,50 @@
+:tocdepth: 3
+
+.. _guireplacehexa:
+
+==================
+Replace hexahedron
+==================
+
+To **Replace an hexahedron** in the **Main Menu** select **Model -> Replace Hexahedron**.
+
+.. image:: _static/gui_replacehexa.png
+   :align: center
+
+.. centered::
+      Replace Hexahedron Dialog Box
+
+
+The following data are required:
+
+- Result Name
+    - name  : name of the elements created (**optional**).
+
+- Quad(s) source
+    - Quad's source: the set of quads to be extruded (select quads).
+    - s1, s2, s3: vertices from the set of quads. (select vertices).
+
+- Quad destination
+    - d1, d2, d3: vertices which define the target quad.
+      As a result of the operation, each one are replaced: s1->d1, s2->d2, s3->d3 (select vertices).
+
+
+Here is an example where the source quadrangles and vertices are highlighted:
+
+.. image:: _static/before_replacehexa.png
+   :align: center
+
+.. centered::
+   Source selection
+
+The result is:
+
+.. image:: _static/replacehexa.png
+   :align: center
+
+.. centered::
+   Hexa replaced
+
+TUI command: :ref:`tuireplacehexa`
+
+
diff --git a/doc/gui_vector.rst b/doc/gui_vector.rst
new file mode 100644 (file)
index 0000000..d965362
--- /dev/null
@@ -0,0 +1,42 @@
+:tocdepth: 3
+
+.. _guivector:
+
+======
+Vector
+======
+
+To create a **Vector** in the **Main Menu** select **Model -> Add vector**.
+
+There are two methods to create a **Vector**.
+
+Create with dx, dy, dz
+======================
+The **Vector** can be defined by **dx**, **dy** and **dz**.
+
+**Arguments:** 3 reals.
+
+The dialogue box to create a vector with dx, dy, dz is:
+
+.. image:: _static/gui_vector1.png
+   :align: center
+
+.. centered::
+   Add Vector
+
+Create with two vertices
+========================
+The **Vector** can also be defined by two vertices **Point1** and **Point2**.
+
+**Arguments:** 2 vertices.
+
+The dialogue box to create a vector from two vertices is:
+
+.. image:: _static/gui_vector2.png
+   :align: center
+
+.. centered::
+   Add Vector from 2 Vertices
+
+
+TUI command: :ref:`tuivector`
diff --git a/doc/gui_vertex.rst b/doc/gui_vertex.rst
new file mode 100644 (file)
index 0000000..2f66ec4
--- /dev/null
@@ -0,0 +1,25 @@
+:tocdepth: 3
+
+.. _guivertex:
+
+========
+Vertex
+========
+
+To create a **Vertex** in the **Main Menu** select **Model -> Add vertex**.
+
+The vertex is defined by settings its x, y and z **Coordinates**.
+
+**Arguments:** x, y and z coordinates of the vertex.
+
+The dialogue box for the creation of a vertex is:
+
+.. image:: _static/gui_vertex.png
+   :align: center
+
+.. centered::
+   Add Vertex
+
+
+
+TUI command: :ref:`tuivertex`
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644 (file)
index 0000000..d0eb780
--- /dev/null
@@ -0,0 +1,19 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%
+HEXABLOCK's documentation
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+   
+   general.rst
+   interactive.rst
+   python.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/doc/interactive.rst b/doc/interactive.rst
new file mode 100644 (file)
index 0000000..a0fc1fa
--- /dev/null
@@ -0,0 +1,73 @@
+:tocdepth: 3
+
+.. _interactive:
+
+#######################################################
+Using HexaBlock with the Graphical User Interface (GUI)
+#######################################################
+
+
+HexaBlock is a component of SALOME with an interactive part and has:
+
+- its own menus and toolboxes,
+- its document zone to represent all kind of objects (vertices, hexahedral, etc.),
+- its graphic zone to visualize the model and the mesh.
+
+.. image:: _static/interactive.png
+   :align: center
+
+
+It provides the toolset allowing to:
+
+- Build a model of block:
+   - create basic geometrical objects: point, edge, quadrangle, hexahedra,
+   - create grid: cartesian, cylindrical, spherical,
+   - create  a cylinder, a pipe, two intersected cylinders, two intersected pipes, an hemisphere, a rind,
+   - remove an hexahedron,
+   - replace hexahedrons,
+   - disconnect by a point, an edge, a quadrangle,
+   - join quadrangles by hexahedra, merge quadrangles,
+   - transform or modify by translation, rotation and other symmetries,
+   - make quad revolution.
+- Associate a model of block to a geometry:
+   - associate vertices of the model of blocks to vertices of a geometry,
+   - associate edges of the model of blocks to edges of a geometry,
+   - associate quadrangles of the model of blocks to faces of a geometry,
+   - associate lines.
+- Generate a mesh:
+   - define groups,
+   - define laws on propagations,
+   - generate an hexahedral mesh.
+
+
+.. toctree::
+   :maxdepth: 2
+
+   gui_component.rst
+   gui_document.rst
+   gui_vertex.rst
+   gui_edge.rst
+   gui_quadrangle.rst
+   gui_hexahedron.rst
+   gui_vector.rst
+   gui_cyl.rst
+   gui_pipe.rst
+   gui_blocks_for_cyl_pipe.rst
+   creategrids.rst
+   gui_hemisphere.rst
+   gui_remove.rst
+   gui_cut_hexa.rst
+   gui_prism_join_quad.rst
+   gui_quad_revolution.rst
+   gui_replace_hexa.rst
+   gui_merge_elmts.rst
+   gui_disc_elmts.rst
+   gui_make_elmts.rst
+   gui_make_symmetry.rst
+   gui_modify_elmts.rst
+   gui_modify_symmetry.rst
+   gui_asso_quad_to_geom.rst
+   gui_groups.rst
+   gui_discret_law.rst
+   gui_propag.rst
+   gui_mesh.rst
diff --git a/doc/intro_association.rst b/doc/intro_association.rst
new file mode 100644 (file)
index 0000000..f37aecf
--- /dev/null
@@ -0,0 +1,150 @@
+:tocdepth: 3
+
+.. _assomodelgeo:
+
+==========================================
+Associate a model of blocks to a geometry
+==========================================
+
+Associate the model to the geometry means that the geometry to mesh is
+"raw" for this application. In other words, there will be no
+modification of this geometry end no rebuild of a complete new
+geometry. However it is possible to complete this geometry by adding
+new pieces if necessary without any topological operation to link
+these pieces to the initial geometry. Generally, the geometry to mesh
+is defined as a set of faces, if these faces are not given under solid
+form but form logically this solid, it is sufficient for this
+application.
+
+To associate the model to the geometry, three successive steps are to be followed:
+
+1. Mandatory: associate **all the vertices** of the model to the geometry
+2. If necessary: associate **the needed edges** of the model to the geometry
+3. If necessary: associate **the needed faces** of the model to the geometry
+
+The HexaBlock application enables to follow these three steps
+independently (see :ref:`assoelemts`). To facilitate the association
+of the model to the geometry, an alternative way exists: the first two
+steps above can be replaced by a new stage called association by lines
+(see :ref:`assolines`).
+
+.. image:: _static/association2.PNG
+   :align: center
+
+.. centered::
+   Rod connecting
+
+.. _assoelemts:
+
+Elements association
+====================
+
+Associate the vertices 
+----------------------
+
+This step is essential, all the vertices of the model must be associated to the geometry.
+
+There are 4 ways for this association:
+
+- associate one vertex "v" of the model to a "vertex" of the shape "s"
+  of the geometry.
+
+- associate one vertex "v" of the model to a point of curvilinear
+  abscissa "p" of the "edge" included in the shape "s" of the
+  geometry.
+
+- associate one vertex "v" of the model to a point of coordinates
+  "u,v" of the "face" included in the shape "s" of the geometry.
+
+- associate one vertex "v" of the model to a any point.
+
+
+It is possible to examine the association (vertex of the association
+model, x-y-z-coordinates of the point of the association geometry).
+
+For each vertex, the association is made in three steps:
+
+- Choose a vertex of the model to associate.
+- Choose the way of associating among the 4 possibilities described above.
+- Specify the point on the geometry, the process depends on the
+  previous choice:
+    - case of an existing vertex: selection and highlight on the
+      vertices of the geometry solely
+    - case of a point taken on an edge of the geometry: selection
+      and highlight of the edges and of a point on the edge in the
+      process of being selected.
+    - case of a point taken on an face of the geometry: selection
+      and highlight of the faces and of a point on the face in the
+      process of being selected.
+    - case of a new point: ask the coordinates and visualize this
+      new point.
+
+.. _assoedges:
+
+Associate the edges 
+-------------------
+
+This step is optional. An association of every edge is determined
+automatically before generating the mesh. This automatic process
+applies four different algorithms in the following order:
+
+- the first algorithm determines a wire between the two vertices by
+  taking the shortest way.
+- if that wire does not exist, then another wire is build in the
+  following manner:
+    - compute the normals to the two vertices,
+    - compute the mean normal of the two previous normals,
+    - build the plan passing through the two vertices and this
+      mean normal,
+    - the sought-after wire is the intersection of the geometry
+      with the plan,
+- if the intersection with this plan fails, then another wire
+  "iso-type" is determined between the two vertices and going along
+  the faces of the geometry linking these two vertices,
+- if this wire still does not exist, then the vertices are linked by a
+  line segment.
+
+If one of the automatic choices is not appropriate, then the
+association of the edge of the model to the geometry has to be defined
+explicitly.
+
+
+Associate the quadrangles 
+-------------------------
+
+This step is optional. The model quadrangles association is
+automatic. The three cases are processed:
+
+- all the geometric faces exist then the nodes are computed on these
+  faces,
+- the faces do exist but some pieces are missing because of the new
+  edges or vertices, in that case two strategies are deployed:
+    - automatic construction of the missing faces from the contour lines,
+    - or association of new faces build in the geometry,
+- there are no associated faces to the quadrangle of the model:
+    - only the automatic mesh is used,
+    - if this automatic mesh does not work, then it is possible to
+      associate to the model quadrangle a geometric face build in
+      GEOM by the user.
+
+If one of the automatic choices is not appropriate, then the
+association of the quadrangle of the model to the geometry has to be
+defined explicitly.
+
+.. _assolines:
+
+Association by lines
+====================
+
+The description of this step is:
+
+- At the end of this new stage, it is necessary that all points of the
+  model blocks are associated with the vertices of the geometry,
+- The process is to associate the lines of the model of blocks to
+  vertices and edges of geometry until all points of the model of blocks
+  are associated,
+- When all points of the model of blocks are associated, it is still
+  possible to complete with step 2 above (see :ref:`assoedges`) to
+  finish the association of needed edges.
+
+See TUI  scripts and GUI part.
diff --git a/doc/intro_groups.rst b/doc/intro_groups.rst
new file mode 100644 (file)
index 0000000..f523f2f
--- /dev/null
@@ -0,0 +1,24 @@
+:tocdepth: 3
+
+.. _intro_groups:
+
+====================================
+Define groups on the model of blocks
+====================================
+
+A group is characterized by the three following components:
+
+- its type
+- its name
+- its elements
+
+The six following classes define all the kind of group:
+
+- group3d for groups of hexahedra,
+- group2d for groups of facets,
+- group1d for groups of segments,
+- group0dVertices for groups of nodes on the edges,
+- group0dFaces for groups of of nodes on the faces,
+- group0dBlocks for groups of nodes in the blocks,
+
+See TUI  scripts and GUI part.
diff --git a/doc/intro_mesh.rst b/doc/intro_mesh.rst
new file mode 100644 (file)
index 0000000..5c84a8b
--- /dev/null
@@ -0,0 +1,158 @@
+:tocdepth: 3
+
+.. _mesh:
+
+======================
+Meshing with Hexahedra
+======================
+
+The main stages to mesh with HexaBlock are:
+
+- Define all discretization laws, a law is characterized by:
+
+    - A number of nodes
+    - A distribution (uniform, arithmetic, etc.)
+
+- Apply a law on a set of edges
+
+    - This set of edges has the propagation property
+    - This set is defined directly on the model of blocks
+
+- Define all groups directly on the model of blocks:
+
+    - Groups of nodes
+    - Groups of segments, of quadrangles, of hexahedra
+
+- Parametrization of the mesh generation
+
+
+Define a law of discretization
+==============================
+
+A discretization law is defined by four properties:
+
+- the name of the law
+- the number of nodes for the discretization law
+- the kind of the law 
+    - uniform
+    - arithmetic
+    - geometric
+- the coefficient for the arithmetic and geometric law.
+
+Set the propagation laws
+========================
+
+From the model, an edges partition is determined, each part
+characterizes a propagation set. To each propagation is associated a
+discretization law and an application way to this law. By default, the
+law "Default" is applied on every propagation. It is possible to use
+the same law for different propagations.
+
+
+.. _generatemesh:
+
+Generate the mesh
+=================
+
+Once the model and its association to the geometry created, the
+hexahedral mesh can be generated by mentioning:
+
+- the discretization of the edges thanks to discretization laws
+- the potential groups
+
+To discretize, the application proceeds in three steps:
+
+- the application computes a partition of the model edges, where each sub-set of edges corresponds to the edges related to the propagation,
+
+- the user defines the needed discretization laws, a law is characterized by:
+
+    * the name of this law,
+    * the number of nodes to compute
+    * a distribution (uniform, arithmetic, etc.)
+
+- the user (working on the model) apply a discretization law on each sub-set of propagation edges
+
+The groups are defined on the model of blocks and the main types of groups are:
+
+- groups of hexahedra
+- groups of quadrangles
+- groups of edges
+- groups of nodes
+
+.. image:: _static/EX2.PNG
+   :align: center
+
+.. centered::
+   Example of propagation-linked edges sub-set 
+
+
+Mesh Algorithm
+===============
+
+Node generation process follows four steps:
+
+1. generate all the nodes corresponding to the vertices of the model
+2. generate all the nodes corresponding to the edges of the model
+3. generate all the nodes corresponding to the faces of the model
+4. generate all the nodes corresponding to the blocks of the model
+
+The nodes generated by the meshing of the edges are determined by the
+discretization law associate to this edge. The coordinates of these
+nodes are computed on the geometric edges series associate to this
+edge. To do so/ a curvilinear abscissa is calculated and based on
+total length of the 1D geometry associate. The geometric modeler (GEOM
+of SALOME or CasCade) enables to compute this length.
+
+The nodes that are generated by meshing of faces are computed in two stages:
+1. meshing by linear approximation
+2. refining by projection on the geometry if this geometry exists.
+
+The meshing by linear approximation performs the three following calculations:
+
+- computation of node coordinates according to the *i* direction taking into account the discretization law on the *j* direction
+- computation of node coordinates according to the *j* direction taking into account the discretization law on the *i* direction
+- the node coordinates are the coordinates of the midpoint of the segment that is formed from the two previous points
+- if there is a projection step, then the normal at this node is computed 
+
+The computation of the normal at a node (i,j) is performed thanks to the neighbor nodes:
+
+- computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
+- computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
+- the normal passing through the intersection of the two previous plans
+
+If the node belongs to a border, the node itself is taken to build the
+line determining the plan which is perpendicular to it.
+
+If there is a geometric face (or a list of faces) associate to one
+face of the model, then an additional projection step (taking into
+account the normal to the node of the previous step) is computed in
+order to obtain a node on the geometric face. The coordinates of this
+node are computed using the intersection of the normal with this face
+(or this list of faces).
+
+The nodes generated by the meshing of blocks are determined by the
+algorithm << i, j, k >> included in the SMESH module of SALOME.
+
+Examples
+========
+
+Linear approximation of the discretization of faces
+'''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing1.PNG
+   :align: center
+
+
+Geometric face and meshing by approximation
+''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing2.PNG
+   :align: center
+
+
+Geometric face and meshing by approximation and projection
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing3.PNG
+   :align: center
diff --git a/doc/intro_python.rst b/doc/intro_python.rst
new file mode 100644 (file)
index 0000000..259d73d
--- /dev/null
@@ -0,0 +1,390 @@
+:tocdepth: 3
+
+.. _intropython:
+
+===========================================
+Example: Python script for a connecting rod
+===========================================
+
+.. image:: _static/cad_bielle.PNG
+   :align: center
+
+.. centered::
+   Connecting rod 
+
+.. _menu:
+
+Steps
+=====
+    - :ref:`modelcreation`
+    - :ref:`recover`
+    - :ref:`assoc`
+    - :ref:`groupdef`
+    - :ref:`lawdisc`
+    - :ref:`meshgener`
+
+.. _modelcreation:
+
+Model creation
+==============
+
+::
+
+        import os
+        import geompy
+        import hexablock
+        import math
+
+        STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+        #=============================
+        # CREATION DOCUMENT
+        #=============================
+
+        doc = hexablock.addDocument()
+
+        #=============================
+        # MODEL CREATION
+        #=============================
+
+        # For the connecting rod, two cylindrical grids have to be build and
+        # the quadrangles have to be prismed between these wo grids
+
+        #=============================
+        # PARAMETRES
+        #=============================
+
+        R = 0.095168291790720005
+
+        r_pte = R
+        r_pte_t = R/2.0
+
+        xpetit = 0.0
+        xgrand = 1.35739 + 0.1595
+        longueur = (xgrand - xpetit)/2.0
+        hauteur = 0.019999999553*2
+
+        dr_pte = R
+        da_pte = 360
+        dl_pte = hauteur
+
+        nr_pte = 1
+        na_pte = 6
+        nl_pte = 1
+
+        #=============================
+        # Vectors Creation 
+        #=============================
+
+        dx = doc.addVector(longueur, 0, 0)
+        dy = doc.addVector(0, longueur, 0)
+        dz = doc.addVector(0, 0, longueur)
+
+        #=================================================
+        # Creation of cylindrical grid centers
+        #=================================================
+
+        c_pte = doc.addVertex(xpetit, 0, 0)
+        c_grd = doc.addVertex(2*longueur, 0, 0)
+        dx_prime = doc.addVectorVertices(c_pte, c_grd)
+
+        #=================================================
+        # small cylindrical grid creation
+        #=================================================
+
+        grille_cyl_pte = doc.makeCylindrical(c_pte, dx, dz, dr_pte, da_pte, dl_pte, nr_pte, na_pte, nl_pte, False)
+
+        #=================================
+        #  Small cylindrical grid creation
+        #=================================
+
+        grille_cyl_grd = doc.makeTranslation(grille_cyl_pte, dx_prime)
+
+        #==================================
+        # Joining the two cylindrical grids
+        #==================================
+
+        mod_x1 = grille_cyl_pte.getVertexIJK(1, 0, 1)
+        mod_x2 = grille_cyl_pte.getVertexIJK(1, 1, 0)
+        mod_x3 = grille_cyl_pte.getVertexIJK(1, 5, 0)
+        mod_x4 = grille_cyl_pte.getVertexIJK(1, 0, 0)
+        quad_11 = doc.findQuad(mod_x1, mod_x2)
+        quad_12 = doc.findQuad(mod_x1, mod_x3)
+
+        mod_y1 = grille_cyl_grd.getVertexIJK(1, 3, 1)
+        mod_y2 = grille_cyl_grd.getVertexIJK(1, 2, 0)
+        mod_y3 = grille_cyl_grd.getVertexIJK(1, 4, 0)
+        mod_y4 = grille_cyl_grd.getVertexIJK(1, 3, 0)
+
+        quad_21 = doc.findQuad(mod_y1, mod_y2)
+        quad_22 = doc.findQuad(mod_y1, mod_y3)
+
+        model_biell_fin = doc.joinQuads([quad_11, quad_12], quad_21, mod_x1, mod_y1, mod_x4, mod_y4, 1)
+
+
+Go back to :ref:`menu`
+
+.. _recover:
+
+Recovering edges and faces before the association
+=================================================
+
+::
+
+        bielle_geom = geompy.ImportFile(STEP_PATH, "STEP")
+        doc.setShape(bielle_geom)
+        geompy.addToStudy(bielle_geom, "bielle_geom")
+        all_edges_bielle = geompy.SubShapeAllSorted(bielle_geom, geompy.ShapeType["EDGE"])
+
+
+
+        # dictionnaire des edges de la géométrie :
+        # key = nom, value = indice dans all_edges_bielle
+        dic_edge_names = {"edge_ray_pte_b": 0, "edge_ray_pte_h": 1,
+                          "edge_trou_pte_b": 2, "edge_trou_pte_h" :3,
+                          "edge_arr_pte_g_b": 7, "edge_arr_pte_g_h": 8,
+                          "edge_arr_pte_d_b": 9, "edge_arr_pte_d_h": 10,
+                          "edge_arr_grd_g_b": 19, "edge_arr_grd_g_h": 20,
+                          "edge_arr_grd_d_b": 21, "edge_arr_grd_d_h": 22,
+                          "edge_trou_grd_b": 25, "edge_trou_grd_h": 26,
+                          "edge_ray_grd_b": 27, "edge_ray_grd_h": 28,
+                          "edge_long_g_b": 13, "edge_long_g_h": 14,
+                          "edge_long_d_b": 15, "edge_long_d_h": 16
+                          }
+
+
+        all_faces_bielle = geompy.SubShapeAllSorted(bielle_geom, geompy.ShapeType["FACE"])
+        # dictionnaire des faces de la geometrie :
+        # key = nom, value = indice dans all_faces_bielle
+        dic_face_names = {"face_ray_pte": 0, "face_trou_pte": 1, "face_pte_g": 2,
+                          "face_pte_d": 3, "face_long_g": 4, "face_long_d": 5,
+                          "face_bas": 6, "face_haut": 7, "face_grd_g": 8,
+                          "face_grd_d": 9, "face_trou_grd": 10,
+                          "face_ray_grd": 11
+                         }
+
+
+
+
+Go back to :ref:`menu`
+
+.. _assoc:
+
+Association of the model to the geometry
+========================================
+
+::
+
+ dico_haut_bas = {"h": 1, "b": 0}
+
+ # 1. lignes internes (trou) haut/bas du petit cylindre
+ # ====================================================
+ for z in dico_haut_bas.iteritems():
+
+     mod_line = [grille_cyl_pte.getEdgeJ(0, j, z[1]) for j in range(5)]
+     mod_start = grille_cyl_pte.getEdgeJ(0, 5, z[1])
+     mod_first = mod_start.getVertex(1)
+
+     # geometrie : 1 seule ligne
+     edge_hole_in = all_edges_bielle[dic_edge_names["edge_trou_pte_"+z[0]]]
+     geo_start = edge_hole_in
+     par_start = 0.0
+     geo_line  = []
+
+     # association :
+     ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                                   geo_start, par_start, geo_line)
+
+ # 2. lignes internes (trou) haut/bas du grand cylindre
+ # =====================================================
+ for z in dico_haut_bas.iteritems():
+
+     mod_start = grille_cyl_grd.getEdgeJ(0, 5, z[1])
+     mod_first = mod_start.getVertex(1)
+     mod_line = [grille_cyl_grd.getEdgeJ(0, j, z[1]) for j in range (5)]
+
+     # geometrie : 1 seule ligne
+     edge_hole_in = all_edges_bielle[dic_edge_names["edge_trou_grd_"+z[0]]]
+     geo_start = edge_hole_in
+     par_start = 0.0
+     geo_line  = []
+
+     # association :
+     ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                                   geo_start, par_start, geo_line)
+
+
+ # 3. lignes externes haut/bas du petit cylindre
+ # =============================================
+ for z in dico_haut_bas.iteritems():
+
+     # modele de blocs :
+     mod_start = grille_cyl_pte.getEdgeJ(1, 1, z[1])
+     # table des edges :
+     mod_line = [grille_cyl_pte.getEdgeJ(1, j, z[1]) for j in [2, 3, 4]]
+
+     # geometrie :
+     # les edges de la geometrie correspondant sont, dans l'ordre (par
+     # exemple pour le haut) :
+     # edge_arr_pte_d_h, edge_ray_pte_h, edge_arr_pte_g_h
+     geo_start = all_edges_bielle[dic_edge_names["edge_arr_pte_d_"+z[0]]]
+
+     geo_line  = []
+     geo_line.append(all_edges_bielle[dic_edge_names["edge_ray_pte_"+z[0]]])
+     geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_g_"+z[0]]])
+
+     # association :
+     # la première est la dernière ligne sont orientées "dans le
+     # mauvais sens" => on fournit cette info :
+     par_start = 0.0
+     par_end = 1.0
+     ier = doc.associateOpenedLine(mod_start, mod_line,
+                                   geo_start, par_start, geo_line, par_end)
+
+
+ ## # 4. lignes externes haut/bas du grand cylindre
+ ## # =============================================
+ for z in dico_haut_bas.iteritems():
+
+     # modele de blocs :
+     mod_start = grille_cyl_grd.getEdgeJ(1, 4, z[1])
+     # table des edges :
+     mod_line = [grille_cyl_grd.getEdgeJ(1, j, z[1]) for j in [5, 0, 1]]
+
+     # geometrie :
+     # les edges de la geometrie correspondant sont, dans l'ordre (par
+     # exemple pour le haut) :
+     # edge_arr_grd_g_h, edge_ray_grd_h, edge_arr_grd_d_h
+     geo_start = all_edges_bielle[dic_edge_names["edge_arr_grd_g_"+z[0]]]
+
+     geo_line  = []
+     geo_line.append(all_edges_bielle[dic_edge_names["edge_ray_grd_"+z[0]]])
+     geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_grd_d_"+z[0]]])
+
+     # association :
+     # la première est la dernière ligne sont orientées "dans le
+     # mauvais sens" => on fournit cette info :
+     par_start = 0.0
+     par_end = 1.0
+     ier = doc.associateOpenedLine(mod_start, mod_line,
+                                   geo_start, par_start, geo_line, par_end)
+
+ # 6. association des 4 points restants (x1, x4, y1, y4) :
+ # =======================================================
+
+ # NB:
+ # h = top (haut)
+ # b = bottom (bas)
+ # g = big (grand)
+ # p = small (petit)
+ # t = hole (trou)
+
+ face_haut = all_faces_bielle[dic_face_names["face_haut"]]
+
+ edge_haut_droite = geompy.GetEdgesByLength(face_haut, 0.136, 0.137)
+ edge_haut_gauche = geompy.GetEdgesByLength(face_haut, 0.131, 0.132)
+
+ # 1. grand cylindre :
+ y_h_g = geompy.MakeVertexOnSurface(face_haut, 1, 0.5)
+ u_h_g = geompy.MakeVertexOnCurve(edge_haut_droite, 1)
+ w_h_g = geompy.MakeVertexOnCurve(edge_haut_gauche, 0)
+ edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+
+ geo_y1 = geompy.MakeVertexOnCurve(edge_v_grd, 0.5)
+ geo_y4 = geompy.MakeVertexWithRef(geo_y1, 0.0, 0.0, -hauteur)
+
+ # vertex cote grande grille cylindrique :
+ mod_y1.setAssociation(geo_y1)
+ mod_y4.setAssociation(geo_y4)
+
+ # 2. petit cylindre :
+ # REM : le modele grand cylindre a ete cree par translation / au petit
+ # cylindre.
+ v_h_p = geompy.MakeVertexOnSurface(face_haut, 0, 0.5)
+ x_h_p = geompy.MakeVertexOnCurve(edge_haut_droite, 0)
+ z_h_p = geompy.MakeVertexOnCurve(edge_haut_gauche, 1)
+ edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+ geo_x1 = geompy.MakeVertexOnCurve(edge_v_pte, 0.5)
+ geo_x4 = geompy.MakeVertexWithRef(geo_x1, 0.0, 0.0, -hauteur)
+
+ # vertex cote petite grille cylindrique :
+ mod_x1.setAssociation(geo_x1)
+ mod_x4.setAssociation(geo_x4)
+
+ # 7. association des faces :
+ quad1 = grille_cyl_pte.getQuadJK(1, 1, 0)
+ quad1.addAssociation(all_faces_bielle[dic_face_names["face_pte_d"]])
+ quad2 = grille_cyl_pte.getQuadJK(1, 4, 0)
+ quad2.addAssociation(all_faces_bielle[dic_face_names["face_pte_g"]])
+ quad3 = grille_cyl_grd.getQuadJK(1, 1, 0)
+ quad3.addAssociation(all_faces_bielle[dic_face_names["face_grd_d"]])
+ quad4 = grille_cyl_grd.getQuadJK(1, 4, 0)
+ quad4.addAssociation(all_faces_bielle[dic_face_names["face_grd_g"]])
+
+
+Go back to :ref:`menu`
+.. _groupdef:
+
+Definition of elements groups for the mesh
+==========================================
+
+::
+
+ # We define 3 groups 
+
+ # groupe d edges (arretes)
+ edge_grp = doc.addEdgeGroup("Edge_grp")
+ for i in range(doc.countEdge()):
+     edge_grp.addElement(doc.getEdge(i))
+
+ # groupe de quads (faces)
+ quad_grp = doc.addQuadGroup("Quad_grp")
+ for i in range(doc.countQuad()):
+     quad_grp.addElement(doc.getQuad(i))
+
+ # groupe d hexas (solids)
+ hexa_grp = doc.addHexaGroup("Hexa_grp")
+ for i in range(doc.countHexa()):
+     hexa_grp.addElement(doc.getHexa(i))
+
+ # groupe de noeuds de vertex pour tout le modele 
+ vertex_nod_grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+ for i in range(doc.countVertex()):
+     vertex_nod_grp.addElement(doc.getVertex(i))
+
+Go back to :ref:`menu`
+
+.. _lawdisc:
+
+Definition of a law discretization
+==================================
+
+::
+
+ law = doc.addLaw("Uniform", 4)
+
+ for j in range(doc.countPropagation()):
+     propa = doc.getPropagation(j)
+     propa.setLaw(law)  # apply discretization law on the model and generate the mesh
+
+Go back to :ref:`menu`
+
+
+.. _meshgener:
+
+Mesh generation
+===============
+
+::
+
+ print  " --- HEXAHEDRICAL MESH --- "
+ mesh_hexas = hexablock.mesh("Bielle:hexas", doc)
+
+ print "Number of hexahedra:", mesh_hexas.NbHexas()
+ print "Number of quadrangles:", mesh_hexas.NbQuadrangles()
+ print "Number of segments:", mesh_hexas.NbEdges()
+ print "Number of nodes:", mesh_hexas.NbNodes()
+
diff --git a/doc/mesh.rst b/doc/mesh.rst
new file mode 100644 (file)
index 0000000..d6e18bf
--- /dev/null
@@ -0,0 +1,136 @@
+:tocdepth: 3
+
+.. _mesh:
+
+======================
+Meshing with Hexahedra
+======================
+
+The main stages to mesh with HexaBlock are:
+
+- Define all discretization laws, a law is characterized by:
+
+    - A number of nodes
+    - A distribution (uniform, arithmetic, etc.)
+
+- Apply a law on a set of edges
+
+    - This set of edges has the propagation property
+    - This set is defined directly on the model of blocks
+
+- Define all groups directly on the model of blocks:
+
+    - Groups of nodes
+    - Groups of segments, of quadrangles, of hexahedra
+
+- Parametrization of the mesh generation
+
+Generate the mesh
+=================
+Once the model and its association to the geometry created, the hexahedral mesh can be generated by mentioning:
+
+- the discretization of the edges thanks to discretization laws
+- the potential groups
+
+To discretize, the application proceeds in three steps:
+
+- the application computes a partition of the model edges, where each sub-set of edges corresponds to the edges related to the propagation,
+
+- the user defines the needed discretization laws, a law is characterized by:
+
+    * the name of this law,
+    * the number of nodes to compute
+    * a distribution (uniform, arithmetic, etc.)
+
+- the user (working on the model) apply a discretization law on each sub-set of propagation edges
+
+The groups are defined on the model of blocks and the main types of groups are:
+
+- groups of hexahedra
+- groups of quadrangles
+- groups of edges
+- groups of nodes
+
+Functionalities
+===============
+- Build a model of blocks:
+
+    - Build a hexahedron
+    - Build grids: cartesian, cylindrical, spherical
+    - Build standard model of blocks:
+
+        - cylinder, pipe
+        - 2 intersected cylinders and pipes
+
+    - Operations: cut, merge, prism, join
+    - Operations: transform, disconnect, remove
+
+- Associate the model of blocks to the geometry:
+    - Associate all vertices
+    - Associate the needed edges
+    - Associate the needed quadrangles
+
+- Define the mesh:
+    - Define the groups on the model of blocks
+    - Define the laws for discretization
+    - Define the discretization on the model of blocks
+
+
+Mesh Algorithm
+===============
+
+Node generation process follows four steps:
+
+1. generate all the nodes corresponding to the vertices of the model
+2. generate all the nodes corresponding to the edges of the model
+3. generate all the nodes corresponding to the faces of the model
+4. generate all the nodes corresponding to the blocks of the model
+
+The nodes generated by the meshing of the edges are determined by the discretization law associate to this edge. 
+The coordinates of these nodes are computed on the geometric edges series associate to this edge. To do so/ a curvilinear abscissa is calculated and based on total length of the 1D geometry associate. The geometric modeler (GEOM of SALOME or CasCade) enables to compute this length.
+
+The nodes that are generated by meshing of faces are computed in two stages:
+1. meshing by linear approximation
+2. refining by projection on the geometry if this geometry exists.
+
+The meshing by linear approximation performs the three following calculations:
+
+- computation of node coordinates according to the *i* direction taking into account the discretization law on the *j* direction
+- computation of node coordinates according to the *j* direction taking into account the discretization law on the *i* direction
+- the node coordinates are the coordinates of the midpoint of the segment that is formed from the two previous points
+- if there is a projection step, then the normal at this node is computed 
+
+The computation of the normal at a node (i,j) is performed thanks to the neighbor nodes:
+
+- computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
+- computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
+- the normal passing through the intersection of the two previous plans
+
+If the node belongs to a border, the node itself is taken to build the line determining the plan which is perpendicular to it.
+
+If there is a geometric face (or a list of faces) associate to one face of the model, then an additional projection step (taking into account the normal to the node of the previous step) is computed in order to obtain a node on the geometric face. The coordinates of this node are computed using the intersection of the normal with this face (or this list of faces).
+
+The nodes generated by the meshing of blocks are determined by the algorithm << i, j, k >> included in the SMESH module of SALOME.
+
+Examples
+----------
+Linear approximation of the discretization of faces
+'''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing1.PNG
+   :align: center
+
+
+Geometric face and meshing by approximation
+''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing2.PNG
+   :align: center
+
+
+Geometric face and meshing by approximation and projection
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+.. image:: _static/meshing3.PNG
+   :align: center
diff --git a/doc/pyplots/BIELLE.py b/doc/pyplots/BIELLE.py
new file mode 100644 (file)
index 0000000..4a902d2
--- /dev/null
@@ -0,0 +1,997 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("Bielle")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 40.0
+
+r_grd = R
+r_grd_t = R/2
+
+r_pte = R
+r_pte_t = R/2
+
+l = 200.0
+h = 0.019999999553*2
+#h = 40.
+
+# Taille du grand cylindre
+dr_grd = R
+da_grd = 360
+dl_grd = h
+
+nr_grd = 1
+na_grd = 6
+nl_grd = 1
+
+# Taille du petit cylindre
+dr_pte = R
+da_pte = 360
+dl_pte = h
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(l, 0, 0)
+dy = doc.addVector(0, l, 0)
+dz = doc.addVector(0, 0, l)
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+c_grd = doc.addVertex(0, 0, 0)
+c_pte = doc.addVertex(2*l, 0, 0)
+dx_prime = doc.addVectorVertices( c_grd, c_pte )
+
+#=================================================
+# Creation de la grande grille cylindrique
+#=================================================
+
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex( 2*R, 0, h )
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )
+x4 = doc.findVertex( 2*R, 0, 0 )
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+
+#=================================================
+# Creation de la petite grille cylindrique
+#=================================================
+
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#=================================================
+# Assemblage des deux grilles cylindriques
+#=================================================
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )
+
+
+#===================================================================
+# Recuperation des vertex du model hexa bielle pour l association
+#===================================================================
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+# Face du haut grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )
+
+
+assert x_mod_h_g
+assert y_mod_h_g
+assert z_mod_h_g
+
+assert u_mod_h_g
+assert v_mod_h_g
+assert w_mod_h_g
+
+assert x_mod_h_g_t
+assert y_mod_h_g_t
+assert z_mod_h_g_t
+
+assert u_mod_h_g_t
+assert v_mod_h_g_t
+assert w_mod_h_g_t #
+
+
+# Face du haut petit trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )
+
+
+assert x_mod_h_p
+assert y_mod_h_p
+assert z_mod_h_p
+
+assert u_mod_h_p
+assert v_mod_h_p
+assert w_mod_h_p
+
+assert x_mod_h_p_t
+assert y_mod_h_p_t
+assert z_mod_h_p_t
+
+assert u_mod_h_p_t
+assert v_mod_h_p_t
+assert w_mod_h_p_t
+#-----------
+
+# Face du bas grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )
+
+assert x_mod_b_g
+assert y_mod_b_g
+assert z_mod_b_g
+
+assert u_mod_b_g
+assert v_mod_b_g
+assert w_mod_b_g
+
+assert x_mod_b_g_t
+assert y_mod_b_g_t
+assert z_mod_b_g_t
+
+assert u_mod_b_g_t
+assert v_mod_b_g_t
+assert w_mod_b_g_t
+
+
+# Face du bas petit trou
+
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )
+
+assert x_mod_b_p
+assert y_mod_b_p
+assert z_mod_b_p
+
+assert u_mod_b_p
+assert v_mod_b_p
+assert w_mod_b_p
+
+assert x_mod_b_p_t
+assert y_mod_b_p_t
+assert z_mod_b_p_t
+
+assert u_mod_b_p_t
+assert v_mod_b_p_t
+assert w_mod_b_p_t
+#-----------
+
+
+
+#===================================================================
+# Recuperation des points de la geometrie bielle pour l association
+#===================================================================
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+Bielle_geom = geompy.Import(STEP_PATH, "STEP")
+
+geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+Pt_A = geompy.MakeVertex(0, 0, h/2.)
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+
+# Param�tre pour:
+# -r�cup�ration des points.
+# -et associations.
+u_1 = 0.75#0.8
+u_2 = 0.5
+u_3 = 0.25#0.2
+
+
+
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)
+
+
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)
+
+
+#x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_3)
+x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)
+
+#z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1.)
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_1)
+z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)
+
+#w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_3)
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)
+
+#u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_1)
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)
+
+
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)
+
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)
+
+#w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.40)
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)
+
+
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)
+
+#u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.6)
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)
+
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)
+
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)
+
+#z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.1)
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)
+
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)
+
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)
+
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)
+
+
+
+#x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.9)
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)
+
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)
+
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)
+
+
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)
+
+
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)
+
+
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)
+
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)
+
+
+
+
+
+
+
+
+#=======================
+# CREATION ASSOCIATION
+#=======================
+
+#===========================================
+# association des sommets de la face du haut
+#===========================================
+
+# grand trou
+
+x_mod_h_g.setAssociation( x_h_g )
+y_mod_h_g.setAssociation( y_h_g )
+z_mod_h_g.setAssociation( z_h_g )
+u_mod_h_g.setAssociation( u_h_g )
+v_mod_h_g.setAssociation( v_h_g )
+w_mod_h_g.setAssociation( w_h_g )
+
+x_mod_h_g_t.setAssociation( x_h_g_t )
+y_mod_h_g_t.setAssociation( y_h_g_t )
+z_mod_h_g_t.setAssociation( z_h_g_t )
+u_mod_h_g_t.setAssociation( u_h_g_t )
+v_mod_h_g_t.setAssociation( v_h_g_t )
+w_mod_h_g_t.setAssociation( w_h_g_t )
+
+# petit trou
+
+x_mod_h_p.setAssociation( x_h_p )
+y_mod_h_p.setAssociation( y_h_p )
+z_mod_h_p.setAssociation( z_h_p )
+u_mod_h_p.setAssociation( u_h_p )
+v_mod_h_p.setAssociation( v_h_p )
+w_mod_h_p.setAssociation( w_h_p )
+
+x_mod_h_p_t.setAssociation( x_h_p_t )
+y_mod_h_p_t.setAssociation( y_h_p_t )
+z_mod_h_p_t.setAssociation( z_h_p_t )
+u_mod_h_p_t.setAssociation( u_h_p_t )
+v_mod_h_p_t.setAssociation( v_h_p_t )
+w_mod_h_p_t.setAssociation( w_h_p_t )
+
+
+#===========================================
+# association des sommets de la face du bas
+#===========================================
+
+# grand trou
+
+x_mod_b_g.setAssociation( x_b_g )
+y_mod_b_g.setAssociation( y_b_g )
+z_mod_b_g.setAssociation( z_b_g )
+u_mod_b_g.setAssociation( u_b_g )
+v_mod_b_g.setAssociation( v_b_g )
+w_mod_b_g.setAssociation( w_b_g )
+
+x_mod_b_g_t.setAssociation( x_b_g_t )
+y_mod_b_g_t.setAssociation( y_b_g_t )
+z_mod_b_g_t.setAssociation( z_b_g_t )
+u_mod_b_g_t.setAssociation( u_b_g_t )
+v_mod_b_g_t.setAssociation( v_b_g_t )
+w_mod_b_g_t.setAssociation( w_b_g_t )
+
+# petit trou
+
+x_mod_b_p.setAssociation( x_b_p )
+y_mod_b_p.setAssociation( y_b_p )
+z_mod_b_p.setAssociation( z_b_p )
+u_mod_b_p.setAssociation( u_b_p )
+v_mod_b_p.setAssociation( v_b_p )
+w_mod_b_p.setAssociation( w_b_p )
+
+x_mod_b_p_t.setAssociation( x_b_p_t )
+y_mod_b_p_t.setAssociation( y_b_p_t )
+z_mod_b_p_t.setAssociation( z_b_p_t )
+u_mod_b_p_t.setAssociation( u_b_p_t )
+v_mod_b_p_t.setAssociation( v_b_p_t )
+w_mod_b_p_t.setAssociation( w_b_p_t )
+
+
+
+
+#=================================
+# Creation association des edges
+#=================================
+
+
+All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])
+
+##------------------
+## Arrondies du haut
+##------------------
+
+#geometrie
+Edge_Arr_grd_g_h = All_Edges_Bielle[20]
+Edge_Arr_grd_d_h = All_Edges_Bielle[22]
+Edge_Arr_pte_g_h = All_Edges_Bielle[8]
+Edge_Arr_pte_d_h = All_Edges_Bielle[10]
+
+#model
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )
+Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )
+
+
+
+##------------------
+## Arrondies du bas
+##------------------
+# geometrie
+Edge_Arr_grd_g_b = All_Edges_Bielle[19]
+Edge_Arr_grd_d_b = All_Edges_Bielle[21]
+Edge_Arr_pte_g_b = All_Edges_Bielle[7]
+Edge_Arr_pte_d_b = All_Edges_Bielle[9]
+
+
+#model
+Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )
+Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )
+
+
+
+##------------------
+## Grands rayons
+##------------------
+
+# geometrie
+Edge_Ray_grd_g_b = All_Edges_Bielle[27]
+Edge_Ray_grd_g_h = All_Edges_Bielle[28]
+Edge_Ray_grd_d_b = All_Edges_Bielle[0]
+Edge_Ray_grd_d_h = All_Edges_Bielle[1]
+
+
+#model
+Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )
+Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )
+Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )
+Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )
+Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )
+Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )
+Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )
+Edge_Grd_Ray_7_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )
+
+
+
+
+##------------------
+## ASSOCIATIONS : arrondies du haut, arrondies du bas et grands rayons 
+##------------------
+
+
+#arrondies du haut
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Ray_grd_g_h, u_1, 1. )#Edge_haut_grd
+
+
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Ray_grd_g_h, 0., u_3 )
+
+
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Ray_grd_d_h, 0., u_3 )
+
+
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Ray_grd_d_h, u_1, 1. )
+
+
+#arrondies du bas
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Ray_grd_g_b, u_1, 1. )
+
+
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Ray_grd_g_b, 0., u_3 )
+
+
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Ray_grd_d_b, 0., u_3 )
+
+
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Ray_grd_d_b, u_1, 1. )
+
+
+#grands rayon
+Edge_Grd_Ray_0_mod.addAssociation( Edge_Ray_grd_d_b, u_3, u_2 )
+Edge_Grd_Ray_1_mod.addAssociation( Edge_Ray_grd_d_h, u_3, u_2 )
+Edge_Grd_Ray_2_mod.addAssociation( Edge_Ray_grd_d_b, u_2, u_1 )
+Edge_Grd_Ray_3_mod.addAssociation( Edge_Ray_grd_d_h, u_2, u_1 )
+
+Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b, u_2, u_1 )
+Edge_Grd_Ray_5_mod.addAssociation( Edge_Ray_grd_g_h, u_2, u_1 )
+Edge_Grd_Ray_6_mod.addAssociation( Edge_Ray_grd_g_b, u_3, u_2 )
+Edge_Grd_Ray_7_mod.addAssociation( Edge_Ray_grd_g_h, u_3, u_2 )
+
+
+
+
+# recuperer les rayons des trous de la bielle de la geometrie
+Edge_Trou_grd_h = All_Edges_Bielle[26]
+Edge_Trou_grd_b = All_Edges_Bielle[25]
+Edge_Trou_pte_h = All_Edges_Bielle[3]
+Edge_Trou_pte_b = All_Edges_Bielle[2]
+
+
+Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]
+Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]
+Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]
+Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]
+Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]
+Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]
+
+
+Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )
+
+
+Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )
+Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )
+Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )
+Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )
+Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )
+Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )
+
+
+Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]
+Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]
+Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]
+Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]
+Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]
+Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]
+
+
+Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )
+Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )
+
+
+Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )
+Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )
+Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )
+Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )
+Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )
+Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )
+
+
+
+Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]
+Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]
+Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]
+Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]
+Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]
+Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]
+
+
+Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )
+
+
+Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )
+Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )
+Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )
+Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )
+Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )
+Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )
+
+
+Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])
+
+
+Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]
+Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]
+Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]
+Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]
+Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]
+Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]
+
+
+Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )
+Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )
+
+Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )
+Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )
+Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )
+Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )
+Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )
+Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )
+
+
+
+#====================================
+# CREATION DES FACES DES ARRONDIES
+#====================================
+All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])
+
+Face_Arron_1 = All_Face_Arron_Bielle[2]
+Face_Arron_2 = All_Face_Arron_Bielle[3]
+Face_Arron_3 = All_Face_Arron_Bielle[8]
+Face_Arron_4 = All_Face_Arron_Bielle[9]
+
+Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )
+Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )
+Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )
+Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )
+
+
+
+#=================================================
+# VERTEX, EDGES, FACES DANS L'ARBRE D'ETUDE SALOME
+#=================================================
+
+geompy.addToStudy( y_h_g , "y_h_g" )
+geompy.addToStudy( y_b_g , "y_b_g" )
+geompy.addToStudy( v_h_p , "v_h_p" )
+geompy.addToStudy( v_b_p , "v_b_p" )
+geompy.addToStudy( x_h_g , "x_h_g" )
+geompy.addToStudy( x_b_g , "x_b_g" )
+geompy.addToStudy( z_h_g , "z_h_g" )
+geompy.addToStudy( z_b_g , "z_b_g" )
+geompy.addToStudy( w_h_p , "w_h_p" )
+geompy.addToStudy( w_b_p , "w_b_p" )
+geompy.addToStudy( u_h_p , "u_h_p" )
+geompy.addToStudy( u_b_p , "u_b_p" )
+geompy.addToStudy(y_h_g_t, "y_h_g_t")
+geompy.addToStudy(y_b_g_t, "y_b_g_t")
+geompy.addToStudy(z_h_g_t, "z_h_g_t")
+geompy.addToStudy(z_b_g_t, "z_b_g_t")
+geompy.addToStudy(w_h_g_t, "w_h_g_t")
+geompy.addToStudy(w_b_g_t, "w_b_g_t")
+geompy.addToStudy(v_h_g_t, "v_h_g_t")
+geompy.addToStudy(v_b_g_t, "v_b_g_t")
+geompy.addToStudy(u_h_g_t, "u_h_g_t")
+geompy.addToStudy(u_b_g_t, "u_b_g_t")
+geompy.addToStudy(x_h_g_t, "x_h_g_t")
+geompy.addToStudy(x_b_g_t, "x_b_g_t")
+geompy.addToStudy(y_h_p_t, "y_h_p_t")
+geompy.addToStudy(y_b_p_t, "y_b_p_t")
+geompy.addToStudy(z_h_p_t, "z_h_p_t")
+geompy.addToStudy(z_b_p_t, "z_b_p_t")
+geompy.addToStudy(w_h_p_t, "w_h_p_t")
+geompy.addToStudy(w_b_p_t, "w_b_p_t")
+geompy.addToStudy(v_h_p_t, "v_h_p_t")
+geompy.addToStudy(v_b_p_t, "v_b_p_t")
+geompy.addToStudy(u_h_p_t, "u_h_p_t")
+geompy.addToStudy(u_b_p_t, "u_b_p_t")
+geompy.addToStudy(x_b_p_t, "x_b_p_t")
+geompy.addToStudy(u_h_g, "u_h_g")
+geompy.addToStudy(u_b_g, "u_b_g")
+geompy.addToStudy(x_h_p, "x_h_p")
+geompy.addToStudy(x_b_p, "x_b_p")
+geompy.addToStudy(w_h_g, "w_h_g")
+geompy.addToStudy(w_b_g, "w_b_g")
+geompy.addToStudy(z_h_p, "z_h_p")
+geompy.addToStudy(z_b_p, "z_b_p")
+geompy.addToStudy(v_h_g, "v_h_g")
+geompy.addToStudy(v_b_g, "v_b_g")
+geompy.addToStudy(y_h_p, "y_h_p")
+geompy.addToStudy(y_b_p, "y_b_p")
+
+
+geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )
+geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )
+geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )
+geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )
+geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )
+geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )
+geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )
+geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )
+geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )
+geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )
+geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )
+geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )
+geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )
+geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )
+geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )
+geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )
+geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )
+geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )
+geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )
+geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )
+geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )
+geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )
+geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )
+geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )
+geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )
+geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )
+geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )
+geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )
+
+geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )
+geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )
+geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )
+geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )
+
+geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )
+geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )
+geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )
+geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )
+
+geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )
+geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )
+geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )
+geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )
+
+
+geompy.addToStudy(Face_Arron_1, "Face_Arron_1")
+geompy.addToStudy(Face_Arron_2, "Face_Arron_2")
+geompy.addToStudy(Face_Arron_3, "Face_Arron_3")
+geompy.addToStudy(Face_Arron_4, "Face_Arron_4")
+
+
+geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )
+geompy.addToStudy( Partition_Trou_grd_bas ,  "Partition_Trou_grd_bas" )
+geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )
+geompy.addToStudy( Partition_Trou_pte_bas ,  "Partition_Trou_pte_bas" )
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+#print Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+
+#n = doc.countLaw()
+#print n
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+#====================================
+# G�n�rer des maillages
+#====================================
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh_hexas = hexablock.mesh(doc, "Bielle:hexas")
+
+print "Nombre d hexaedres:"   , mesh_hexas.NbHexas()
+print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()
+print "Nombre de segments:"   , mesh_hexas.NbEdges()
+print "Nombre de noeuds:"     , mesh_hexas.NbNodes()
+
+print  " --- MAILLAGE QUADRANGULAIRE --- "
+mesh_quads = hexablock.mesh(doc, "Bielle:quads", 2)
+
+print "Nombre d hexaedres:"   , mesh_quads.NbHexas()
+print "Nombre de quadrangles:", mesh_quads.NbQuadrangles()
+print "Nombre de segments:"   , mesh_quads.NbEdges()
+print "Nombre de noeuds:"     , mesh_quads.NbNodes()
+
+print  " --- MAILLAGE 1D --- "
+mesh_edges = hexablock.mesh(doc, "Bielle:edges", 1)
+
+print "Nombre d hexaedres:"   , mesh_edges.NbHexas()
+print "Nombre de quadrangles:", mesh_edges.NbQuadrangles()
+print "Nombre de segments:"   , mesh_edges.NbEdges()
+print "Nombre de noeuds:"     , mesh_edges.NbNodes()
+
+print  " --- MAILLAGE des sommets --- "
+mesh_nodes = hexablock.mesh(doc, "Bielle:nodes", 0)
+
+print "Nombre d hexaedres:"   , mesh_nodes.NbHexas()
+print "Nombre de quadrangles:", mesh_nodes.NbQuadrangles()
+print "Nombre de segments:"   , mesh_nodes.NbEdges()
+print "Nombre de noeuds:"     , mesh_nodes.NbNodes()
+xaedres:"   , mesh_edges.NbHexas()
+print "Nombre de quadrangles:", mesh_edges.NbQuadrangles()
+print "Nombre de segments:"   
diff --git a/doc/pyplots/bielle.py b/doc/pyplots/bielle.py
new file mode 100644 (file)
index 0000000..6148cbd
--- /dev/null
@@ -0,0 +1,630 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("Bielle:hexas")
+
+#=============================
+# MODEL CREATION
+#=============================
+
+# For the connecting rod, two cylindrical grids have to be build and
+# the quadrangles have to be prismed between these wo grids
+
+#=============================
+# PARAMETRES
+#=============================
+
+#R = 40.0
+R = 0.095168291790720005
+
+r_pte = R
+r_pte_t = R/2.0
+
+xpetit = 0.0
+xgrand = 1.35739 + 0.1595
+longueur = (xgrand - xpetit)/2.0
+hauteur = 0.019999999553*2
+
+dr_pte = R
+da_pte = 360
+dl_pte = hauteur
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Vectors Creation 
+#=============================
+
+dx = doc.addVector(longueur, 0, 0)
+dy = doc.addVector(0, longueur, 0)
+dz = doc.addVector(0, 0, longueur)
+
+#=================================================
+# Creation of cylindrical grid centers
+#=================================================
+
+c_pte = doc.addVertex(xpetit, 0, 0)
+c_grd = doc.addVertex(2*longueur, 0, 0)
+dx_prime = doc.addVectorVertices(c_pte, c_grd)
+
+#=================================================
+# small cylindrical grid creation
+#=================================================
+
+grille_cyl_pte = doc.makeCylindrical(c_pte, dx, dz, dr_pte, da_pte, dl_pte, nr_pte, na_pte, nl_pte, False)
+
+# We obtain a liste containing 6 equal hexaedra
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex(2*R, 0, hauteur)
+x2 = doc.findVertex(alpha_x, alpha_y, 0)
+x3 = doc.findVertex(alpha_x, -alpha_y, 0)
+x4 = doc.findVertex(2*R, 0, 0)
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+#=================================
+#  Small cylindrical grid creation
+#=================================
+
+grille_cyl_grd = doc.makeTranslation(grille_cyl_pte, dx_prime)
+
+# We obtain a liste containing 6 equal hexaedra
+y1 = doc.findVertex(2*longueur - 2*R, 0 , hauteur)
+y2 = doc.findVertex(2*longueur - alpha_x, alpha_y, 0)
+y3 = doc.findVertex(2*longueur - alpha_x, -alpha_y, 0)
+y4 = doc.findVertex(2*longueur - 2*R, 0, 0)
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#==================================
+# Joining the two cylindrical grids
+#==================================
+model_biell_fin = doc.joinQuads([quad_11, quad_12], quad_21, x1, y1, x4, y4, 1)
+
+#=======================================================
+# Recover vertices of the hexa model for the association
+#=======================================================
+
+# NB:
+# h = top (haut)
+# b = bottom (bas)
+# g = big (grand)
+# p = small (petit)
+# t = hole (trou)
+
+bielle_geom = geompy.ImportFile(STEP_PATH, "STEP")
+
+geompy.addToStudy(bielle_geom, "bielle_geom")
+
+pt_a = geompy.MakeVertex(0, 0, hauteur/2.)
+face_haut = geompy.GetFaceNearPoint(bielle_geom, pt_a)
+
+pt_b = geompy.MakeVertex(0, 0, -hauteur/2.)
+face_bas = geompy.GetFaceNearPoint(bielle_geom, pt_b)
+
+edge_haut_droite = geompy.GetEdgesByLength(face_haut, 0.136, 0.137)
+edge_haut_gauche = geompy.GetEdgesByLength(face_haut, 0.131, 0.132)
+
+# Param�tres pour :
+# - r�cup�ration des points.
+# - et associations.
+
+u_1 = 1.0
+u_3 = 0.0
+
+# dictionnaire des vertices de la g�om�trie (grande et petite grilles) :
+# key = nom, value = indice dans geom_vert_grd (resp. geom_vert_pte)
+# on commence par les vertex externes du haut du grand (resp. petit) cylindre,
+# ensuite :
+# 1. vertex internes (trou),
+# 2. puis vertex du bas (externes puis internes)
+dic_vert_names = {}
+ind = 0
+for z in ['h', 'b']:  # haut/bas
+    for x in ['e', 't']:  # externe/interne(trou)
+        for y in ['y', 'x', 'u', 'v', 'w', 'z']:  # 
+            key = '_'.join([y, z, x])
+            dic_vert_names[key] = ind
+            ind += 1
+            pass
+        pass
+    pass
+
+
+# 1. grand cylindre :
+geom_vert_grd = []  # liste des vertex du grand cylindre
+
+# 1.1 face du haut :
+# 1.1.1 sommets externes :
+# la cr�ation des vertex de la geometrie se fait obligatoirement
+# dans cet ordre :
+geom_vert_grd.append(geompy.MakeVertexOnSurface(face_haut, 1, 0.5))  # y_h_e_g
+edge_haut_grd = geompy.GetEdgeNearPoint(bielle_geom, geom_vert_grd[0])
+geom_vert_grd.append(geompy.MakeVertexOnCurve(edge_haut_grd, u_3))  # x_h_e_g
+geom_vert_grd.append(geompy.MakeVertexOnCurve(edge_haut_grd, u_1))  # z_h_e_g
+geom_vert_grd.insert(2, geompy.MakeVertexOnCurve(edge_haut_droite, 1))  # u_h_e_g
+geom_vert_grd.insert(3, geompy.MakeVertexOnCurve(edge_haut_gauche, 0))  # w_h_e_g
+edge_v_grd = geompy.MakeLineTwoPnt(geom_vert_grd[2], geom_vert_grd[3])
+geom_vert_grd.insert(3, geompy.MakeVertexOnCurve(edge_v_grd, 0.5))  # v_h_e_g
+# les vertex sont rang�s dans cet ordre :
+# y_h_e_g, x_h_e_g, u_h_e_g, v_h_e_g, w_h_e_g, z_h_e_g
+
+# 1.1.2 sommets internes (trou) :
+edge_haut_grd_trou = geompy.GetEdgesByLength(face_haut, 0.147, 0.148)
+# y_h_t_g, x_h_t_g, u_h_t_g, v_h_t_g, w_h_t_g, z_h_t_g
+for val in [0, 0.8, 0.6, 0.5, 0.4, 0.2]:
+    geom_vert_grd.append(geompy.MakeVertexOnCurve(edge_haut_grd_trou, val))
+
+# 1.2 face du bas :
+# pour tous les vertex de la face du bas, on les cr�e par r�f�rence � ceux d�j� cr�es (dans le meme ordre :
+# sommets externes puis internes) :
+geom_vert_grd_bas = [geompy.MakeVertexWithRef(vertex, 0.0, 0.0, -hauteur) for vertex in geom_vert_grd]
+geom_vert_grd.extend(geom_vert_grd_bas)
+
+# pour l'utilisation :
+# geom_vert_grd[dic_vert_names["y_h_t"]] # par exemple
+
+# 2. petit cylindre :
+# REM : le modele grand cylindre a ete cree par translation / au petit
+# cylindre. Les vertices de la geometrie sont donc ete cr�es de mani�re
+# similaire
+geom_vert_pte = []
+
+# 2.1 face du haut :
+# 2.1.1 sommets externes :
+
+# la cr�ation des vertex de la geometrie se fait obligatoirement
+# dans cet ordre :
+geom_vert_pte.append(geompy.MakeVertexOnSurface(face_haut, 0, 0.5))  # v_h_e_p
+edge_haut_pte = geompy.GetEdgeNearPoint(bielle_geom, geom_vert_pte[0])
+geom_vert_pte.append(geompy.MakeVertexOnCurve(edge_haut_pte, u_3))  # w_h_e_p
+geom_vert_pte.insert(0, geompy.MakeVertexOnCurve(edge_haut_pte, u_1))  # u_h_e_p
+geom_vert_pte.insert(0, geompy.MakeVertexOnCurve(edge_haut_droite, 0))  # x_h_e_p
+geom_vert_pte.append(geompy.MakeVertexOnCurve(edge_haut_gauche, 1))  # z_h_e_p
+edge_v_pte = geompy.MakeLineTwoPnt(geom_vert_pte[0], geom_vert_pte[4])
+geom_vert_pte.insert(0, geompy.MakeVertexOnCurve(edge_v_pte, 0.5))  # y_h_e_p
+# les vertex sont rang�s dans cet ordre :
+# y_h_e_p, x_h_e_p, u_h_e_p, v_h_e_p, w_h_e_p, z_h_e_p
+
+
+# 2.1.2 sommets internes (trou) :
+edge_haut_pte_trou = geompy.GetEdgesByLength(face_haut, 0.094, 0.095)
+# y_h_t_p, x_h_t_p, u_h_t_p, v_h_t_p, w_h_t_p, z_h_t_p
+for val in [0, 0.9, 0.65, 0.5, 0.35, 0.1]:
+    geom_vert_pte.append(geompy.MakeVertexOnCurve(edge_haut_pte_trou, val))
+
+# 2.2 face du bas :
+# pour tous les vertex de la face du bas, on les cr�e par r�f�rence � ceux d�j� cr�es (dans le meme ordre :
+# sommets externes puis internes) :
+geom_vert_pte_bas = [geompy.MakeVertexWithRef(vertex, 0.0, 0.0, -hauteur) for vertex in geom_vert_pte]
+geom_vert_pte.extend(geom_vert_pte_bas)
+
+
+#=======================
+# CREATION ASSOCIATION
+#=======================
+
+# pour l'association, il suffit de faire 6 appels � la m�thode
+# associateClosedLine() :
+# 1 pour la ligne du trou haut du grand cylindre
+# 1 pour la ligne du trou bas du grand cylindre
+# 1 pour la ligne du trou haut du petit cylindre
+# 1 pour la ligne du trou bas du petit cylindre
+# 1 pour la ligne "externe" de la bielle, en haut
+# 1 pour la ligne "externe" de la bielle, en bas
+
+all_edges_bielle = geompy.SubShapeAllSorted(bielle_geom, geompy.ShapeType["EDGE"])
+
+# dictionnaire des edges de la g�om�trie :
+# key = nom, value = indice dans all_edges_bielle
+dic_edge_names = {"edge_ray_pte_b": 0, "edge_ray_pte_h": 1,
+                  "edge_trou_pte_b": 2, "edge_trou_pte_h" :3,
+                  "edge_arr_pte_g_b": 7, "edge_arr_pte_g_h": 8,
+                  "edge_arr_pte_d_b": 9, "edge_arr_pte_d_h": 10,
+                  "edge_arr_grd_g_b": 19, "edge_arr_grd_g_h": 20,
+                  "edge_arr_grd_d_b": 21, "edge_arr_grd_d_h": 22,              
+                  "edge_trou_grd_b": 25, "edge_trou_grd_h": 26,
+                  "edge_ray_grd_b": 27, "edge_ray_grd_h": 28,
+                  "edge_long_g_b": 13, "edge_long_g_h": 14,
+                  "edge_long_d_b": 15, "edge_long_d_h": 16
+                  }
+
+# 1. ligne du trou haut du petit cylindre
+# =======================================
+
+# modele de blocs :
+mod_start = grille_cyl_pte.getEdgeJ(0, 0, 1)
+mod_first = mod_start.getVertex(1)
+# table des edges :
+mod_line = [grille_cyl_pte.getEdgeJ(0, j, 1) for j in range(1, 6)]
+
+# geometrie :
+e_t_p_h = all_edges_bielle[dic_edge_names["edge_trou_pte_h"]]
+li_vert = geom_vert_pte[dic_vert_names['x_h_t']:dic_vert_names['z_h_t']+1]
+li_vert.reverse()  # z_h_t_p, w_h_t_p, v_h_t_p, u_h_t_p, x_h_t_p
+part_trou_pte_haut = geompy.MakePartition([e_t_p_h],
+                                          li_vert,
+                                          [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_trou_pte_haut = geompy.SubShapeAllSorted(part_trou_pte_haut, geompy.ShapeType["EDGE"])
+
+geo_start = all_edge_part_trou_pte_haut[5]  # [y_h_t_p; x_h_t_p]
+par_start = 0.0
+geo_line  = [all_edge_part_trou_pte_haut[i] for i in [3, 1, 0, 2, 4]]
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+# 2. ligne du trou bas du petit cylindre
+# =======================================
+
+# modele de blocs :
+mod_start = grille_cyl_pte.getEdgeJ(0, 0, 0)
+mod_first = mod_start.getVertex(1)
+del(mod_line[:])
+# table des edges :
+mod_line = [grille_cyl_pte.getEdgeJ(0, j, 0) for j in range(1, 6)]
+
+# geometrie :
+e_t_p_b = all_edges_bielle[dic_edge_names["edge_trou_pte_b"]]
+del(li_vert[:])
+li_vert = geom_vert_pte[dic_vert_names['x_b_t']:dic_vert_names['z_b_t']+1]
+li_vert.reverse()  # z_b_t_p, w_b_t_p, v_b_t_p, u_b_t_p, x_b_t_p
+part_trou_pte_bas = geompy.MakePartition([e_t_p_b],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_trou_pte_bas = geompy.SubShapeAllSorted(part_trou_pte_bas, geompy.ShapeType["EDGE"])
+
+geo_start = all_edge_part_trou_pte_bas[5]
+par_start = 0.0
+del(geo_line[:])
+geo_line = [all_edge_part_trou_pte_bas[i] for i in [3, 1, 0, 2, 4]]
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+# 3. ligne du trou haut du grand cylindre
+# =======================================
+
+# modele de blocs :
+mod_start = grille_cyl_grd.getEdgeJ(0, 0, 1)  # 1er edge
+mod_first = mod_start.getVertex(1)  # 1er vertex
+# table des edges :
+del(mod_line[:])
+mod_line = [grille_cyl_grd.getEdgeJ(0, j, 1) for j in range(1, 6)]
+
+# geometrie :
+e_t_g_h = all_edges_bielle[dic_edge_names["edge_trou_grd_h"]]
+del(li_vert[:])
+li_vert = geom_vert_grd[dic_vert_names['x_h_t']:dic_vert_names['z_h_t']+1]
+li_vert.reverse()  # z_h_t_g, w_h_t_g, v_h_t_g, u_h_t_g, x_h_t_g
+part_trou_grd_haut = geompy.MakePartition([e_t_g_h],
+                                          li_vert,
+                                          [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_trou_grd_haut = geompy.SubShapeAllSorted(part_trou_grd_haut, geompy.ShapeType["EDGE"])
+
+geo_start = all_edge_part_trou_grd_haut[5]  # [y_h_t_g; x_h_t_g]
+par_start = 0.0  # param 1ere ligne
+del(geo_line[:])
+geo_line = [all_edge_part_trou_grd_haut[i] for i in [3, 1, 0, 2, 4]]
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+# 4. ligne du trou bas du grand cylindre
+# =======================================
+
+# modele de blocs :
+mod_start = grille_cyl_grd.getEdgeJ(0, 0, 0)
+mod_first = mod_start.getVertex(1)
+del(mod_line[:])
+# table des edges :
+mod_line = [grille_cyl_grd.getEdgeJ(0, j, 0) for j in range(1, 6)]
+
+# geometrie :
+e_t_g_b = all_edges_bielle[dic_edge_names["edge_trou_grd_b"]]
+del(li_vert[:])
+li_vert = geom_vert_grd[dic_vert_names['x_b_t']:dic_vert_names['z_b_t']+1]
+li_vert.reverse()  # z_b_t_g, w_b_t_g, v_b_t_g, u_b_t_g, x_b_t_g
+part_trou_grd_bas = geompy.MakePartition([e_t_g_b],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_trou_grd_bas = geompy.SubShapeAllSorted(part_trou_grd_bas, geompy.ShapeType["EDGE"])
+
+geo_start = all_edge_part_trou_grd_bas[5]
+par_start = 0.0  # entre 0 et 1 (abscisse curviligne)
+del(geo_line[:])
+geo_line = [all_edge_part_trou_grd_bas[i] for i in [3, 1, 0, 2, 4]]
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+# 5    : Les lignes "externes" de la bielle
+# 5. ligne "externe" de la bielle, en haut
+# ========================================
+
+mod_start = grille_cyl_grd.getEdgeJ(1, 1, 1)
+mod_first = mod_start.getVertex(1)
+del(mod_line[:])
+mod_line = [grille_cyl_grd.getEdgeJ(1, j, 1) for j in [4, 5, 0]]
+mod_line.extend([grille_cyl_pte.getEdgeJ(1, j, 1) for j in [1, 2, 3, 4]])
+v1 = grille_cyl_grd.getVertexIJK(1, 2, 1)
+v2 = grille_cyl_pte.getVertexIJK(1, 1, 1)
+mod_line.append(doc.findEdge(v1, v2))
+v1 = grille_cyl_grd.getVertexIJK(1, 4, 1)
+v2 = grille_cyl_pte.getVertexIJK(1, 5, 1)
+mod_line.append(doc.findEdge(v1, v2))
+
+# geometrie :
+# les edges de la geometrie a prendre en compte sont :
+# (en partant du grand cylindre)
+# edge_arr_grd_d_h, edge_ray_grd_h, edge_arr_grd_g_h, edge_long_g_h,
+# edge_arr_pte_g_h, edge_ray_pte_h, edge_arr_pte_d_h, edge_long_d_h
+
+geo_start = all_edges_bielle[dic_edge_names["edge_arr_grd_d_h"]]
+par_start = 0.0
+
+e_r_g_h = all_edges_bielle[dic_edge_names["edge_ray_grd_h"]]
+# x_h_e_g, y_h_e_g, z_h_e_g :
+del(li_vert[:])
+li_vert.append(geom_vert_grd[dic_vert_names['x_h_e']])
+li_vert.append(geom_vert_grd[dic_vert_names['y_h_e']])
+li_vert.append(geom_vert_grd[dic_vert_names['z_h_e']])
+part_ray_grd_haut = geompy.MakePartition([e_r_g_h],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_ray_grd_haut = geompy.SubShapeAllSorted(part_ray_grd_haut, geompy.ShapeType["EDGE"])
+
+del(geo_line[:])
+all_edge_part_ray_grd_haut.reverse()
+geo_line = all_edge_part_ray_grd_haut[:]
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_grd_g_h"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_long_g_h"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_g_h"]])
+
+e_r_p_h = all_edges_bielle[dic_edge_names["edge_ray_pte_h"]]
+# w_h_e_p, v_h_e_p, u_h_e_p :
+del(li_vert[:])
+li_vert.append(geom_vert_pte[dic_vert_names['w_h_e']])
+# JPL (le 09/05/2011) :
+# normalement, on devrait pouvoir utiliser ici le vertex v_h_e_p pour
+# faire la partition de l'edge, mais ca ne fonctionne pas...
+# on cree donc un vertex supplementaire :
+## li_vert.append(geom_vert_pte[dic_vert_names['v_h_e']])
+v_h_e_p_bis = geompy.MakeVertexOnCurve(e_r_p_h, 0.5)
+li_vert.append(v_h_e_p_bis)
+li_vert.append(geom_vert_pte[dic_vert_names['u_h_e']])
+part_ray_pte_haut = geompy.MakePartition([e_r_p_h],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_ray_pte_haut = geompy.SubShapeAllSorted(part_ray_pte_haut, geompy.ShapeType["EDGE"])
+
+all_edge_part_ray_pte_haut.reverse()
+geo_line.extend(all_edge_part_ray_pte_haut[:])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_d_h"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_long_d_h"]])
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+# 6. ligne "externe" de la bielle, en bas
+# ========================================
+
+mod_start = grille_cyl_grd.getEdgeJ(1, 1, 0)
+mod_first = mod_start.getVertex(1)
+del(mod_line[:])
+mod_line = [grille_cyl_grd.getEdgeJ(1, j, 0) for j in [4, 5, 0]]
+mod_line.extend([grille_cyl_pte.getEdgeJ(1, j, 0) for j in [1, 2, 3, 4]])
+v1 = grille_cyl_grd.getVertexIJK(1, 2, 0)
+v2 = grille_cyl_pte.getVertexIJK(1, 1, 0)
+mod_line.append(doc.findEdge(v1, v2))
+v1 = grille_cyl_grd.getVertexIJK(1, 4, 0)
+v2 = grille_cyl_pte.getVertexIJK(1, 5, 0)
+mod_line.append(doc.findEdge(v1, v2))
+
+# geometrie :
+# les edges de la geometrie a prendre en compte sont :
+# (en partant du grand cylindre)
+# edge_arr_grd_d_h, edge_ray_grd_h, edge_arr_grd_g_h, edge_long_g_h,
+# edge_arr_pte_g_h, edge_ray_pte_h, edge_arr_pte_d_h, edge_long_d_h
+
+geo_start = all_edges_bielle[dic_edge_names["edge_arr_grd_d_b"]]
+par_start = 0.0
+
+e_r_g_b = all_edges_bielle[dic_edge_names["edge_ray_grd_b"]]
+# x_b_e_g, y_b_e_g, z_b_e_g :
+del(li_vert[:])
+li_vert.append(geom_vert_grd[dic_vert_names['x_b_e']])
+li_vert.append(geom_vert_grd[dic_vert_names['y_b_e']])
+li_vert.append(geom_vert_grd[dic_vert_names['z_b_e']])
+part_ray_grd_bas = geompy.MakePartition([e_r_g_b],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_ray_grd_bas = geompy.SubShapeAllSorted(part_ray_grd_bas, geompy.ShapeType["EDGE"])
+
+del(geo_line[:])
+all_edge_part_ray_grd_bas.reverse()
+geo_line = all_edge_part_ray_grd_bas[:]
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_grd_g_b"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_long_g_b"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_g_b"]])
+
+e_r_p_b = all_edges_bielle[dic_edge_names["edge_ray_pte_b"]]
+# w_h_e_p, v_h_e_p, u_h_e_p :
+del(li_vert[:])
+li_vert.append(geom_vert_pte[dic_vert_names['w_b_e']])
+# JPL (le 09/05/2011) :
+# normalement, on devrait pouvoir utiliser ici le vertex v_h_e_p pour
+# faire la partition de l'edge, mais ca ne fonctionne pas...
+# on cree donc un vertex supplementaire :
+## li_vert.append(geom_vert_pte[dic_vert_names['v_b_e']])
+v_b_e_p_bis = geompy.MakeVertexOnCurve(e_r_p_b, 0.5)
+li_vert.append(v_b_e_p_bis)
+li_vert.append(geom_vert_pte[dic_vert_names['u_b_e']])
+part_ray_pte_bas = geompy.MakePartition([e_r_p_b],
+                                         li_vert,
+                                         [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+all_edge_part_ray_pte_bas = geompy.SubShapeAllSorted(part_ray_pte_bas, geompy.ShapeType["EDGE"])
+
+all_edge_part_ray_pte_bas.reverse()
+geo_line.extend(all_edge_part_ray_pte_bas[:])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_d_b"]])
+geo_line.append(all_edges_bielle[dic_edge_names["edge_long_d_b"]])
+
+# association :
+ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                              geo_start, par_start, geo_line)
+
+for nz in range (2):
+    v1 = grille_cyl_grd.getVertexIJK(1, 3, nz)
+    v2 = grille_cyl_grd.getVertexIJK(0, 3, nz)
+    v3 = grille_cyl_grd.getVertexIJK(0, 0, nz)
+    v4 = grille_cyl_grd.getVertexIJK(1, 0, nz)
+
+    v1.setX(v2.getX() + v3.getX() - v4.getX())
+    v1.setY(v4.getY())
+    v1.setZ(v4.getZ())
+    v1.setScalar(7)
+
+##     print "Coord en x (grd) : ", v1.getX(), v2.getX(), v3.getX(), v4.getX() 
+##     print "Coord en y (grd) : ", v1.getY(), v2.getY(), v3.getY(), v4.getY() 
+##     print "Coord en z (grd) : ", v1.getZ(), v2.getZ(), v3.getZ(), v4.getZ() 
+##     print 
+
+    v1 = grille_cyl_pte.getVertexIJK(1, 3, nz)
+    v2 = grille_cyl_pte.getVertexIJK(0, 3, nz)
+    v3 = grille_cyl_pte.getVertexIJK(0, 0, nz)
+    v4 = grille_cyl_pte.getVertexIJK(1, 0, nz)
+
+    v4.setX(v3.getX() + v2.getX() - v1.getX())
+    v4.setY(v1.getY())
+    v4.setZ(v1.getZ())
+
+##     print "Coord en x (pte) : ", v1.getX(), v2.getX(), v3.getX(), v4.getX()
+##     print "Coord en y (pte) : ", v1.getY(), v2.getY(), v3.getY(), v4.getY()
+##     print "Coord en z (pte) : ", v1.getZ(), v2.getZ(), v3.getZ(), v4.getZ()
+##     print 
+
+# TEST :
+file_name = os.path.join(os.environ['TMP'], 'bielle2.vtk')
+doc.saveVtk(file_name)
+
+## #=================================================
+## # VERTEX, EDGES, FACES DANS L'ARBRE D'ETUDE SALOME
+## #=================================================
+
+# vertices :
+for key, value in dic_vert_names.iteritems():
+    geompy.addToStudy(geom_vert_grd[value], key + '_g')
+    geompy.addToStudy(geom_vert_pte[value], key + '_p')
+
+# edges :
+for key, value in dic_edge_names.iteritems():
+    geompy.addToStudy(all_edges_bielle[value], key)
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# JPL (le 09/05/2011) :
+# @todo a revoir : apres correction des bugs "countXXX()" dans le moteur
+
+# groupe d edges (arretes)
+edge_grp = doc.addEdgeGroup("Edge_grp")
+for i in range(doc.countEdge()):
+    edge_grp.addElement(doc.getEdge(i))
+
+# groupe de quads (faces)
+quad_grp = doc.addQuadGroup("Quad_grp")
+for i in range(doc.countQuad()):
+    quad_grp.addElement(doc.getQuad(i))
+
+# groupe d hexas (solids)
+hexa_grp = doc.addHexaGroup("Hexa_grp")
+for i in range(doc.countHexa()):
+    hexa_grp.addElement(doc.getHexa(i))
+
+# groupe de noeuds de vertex pour tout le modele 
+vertex_nod_grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+for i in range(doc.countVertex()):
+    vertex_nod_grp.addElement(doc.getVertex(i))
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+law = doc.addLaw("Uniform", 4)
+
+# chercher les propagations du modele
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law)  # appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+#====================================
+# G�n�rer des maillages
+#====================================
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh_hexas = hexablock.mesh(doc)
+
+## print "Nombre d hexaedres:", mesh_hexas.NbHexas()
+## print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()
+## print "Nombre de segments:", mesh_hexas.NbEdges()
+## print "Nombre de noeuds:", mesh_hexas.NbNodes()
diff --git a/doc/pyplots/bielle_JPL.py b/doc/pyplots/bielle_JPL.py
new file mode 100644 (file)
index 0000000..1b0e541
--- /dev/null
@@ -0,0 +1,364 @@
+#!/usr/bin/python
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+# modifié par JPL le 19 avril 2010
+# (reprise de BIELLE.last.test.py)
+#===============================================
+
+# @todo idée à terme : ne pas avoir à faire "a la mano" l'association de TOUS les vertex du modèle, mais faire
+# en sorte qu'un certain nombre d'associations soient faites automatiquement.
+# typiquement, pour une grille cylindrique (ex de 12 vertex comme celles du script) :
+# 4 points doivent etre obligatoirement associés à la main
+# les 8 autres devraient pouvoir l'etre automatiquement
+#
+# pour cela, il serait utile de pouvoir récupérer les propriétés de la grille cylindrique (qui ne sont pour le moment
+# pas conservées toutes conservées dans le moteur HEXA, ou en tout cas pas toutes accessibles avec l'API python)
+
+import GEOM
+import geompy
+import smesh
+import HexaBlocks
+import math
+import SALOMEDS
+
+def get_vertices_from_cylindrical(grille_cyl, nr, na, nl=1):
+    """
+    fonction qui prend en entrée une liste d'hexaèdres renvoyés par makeCylindrical, dans le cas FALSE uniquement
+    (ie : pas de remplissage de la partie centrale)
+    => du type grid_type
+    
+    renvoie une liste de sommets, dans cet ordre :
+
+    pour la grande grille cylindrique, la liste est constituée, dans l'ordre :
+    1) des vertex de la face du haut (k = 1) => na * 2
+    a) vertex externes (i = 1) => na
+    b) vertex internes (i = 0) => na
+    2) des vertex de la face du bas (k = 0) => na * 2
+    a) vertex externes (i = 1) => na
+    b) vertex internes (i = 0) => na
+    
+    @todo makeCylindrical renvoie une grille cylindrique
+    ie : une liste d'hexaèdres
+    pbmes :
+    1) une fois la grille cylindrique crée, elle est renvoyée sous forme d'un tableau d'hexaèdres
+    dans un certain ordre (cf. SPECS 2.3.6), mais pas sous forme d'objet "grille cylindrique"
+    => cette fonction ne pourra pas à terme etre intégrée sous forme de méthode.
+    2) impossible de faire des tests sur le cylindre (vide ou pas, récupération directe de nr, na, nl, ...)
+    """
+
+    # dans cette première version, on considère une grille cylindrique avec nr = 1 et nl = 1
+    if (nr !=1) or (nl != 1):
+        print "nr ou nl invalide(s) !!"
+        return None
+    
+    vertices = []
+    li_z = [nl, 0] # indice nl => face du haut, indice 0 => face du bas
+    li_x = [nr, 0] # indice nr => externe, indice 0 => interne
+    li_y = range(na) # indices de 0 à (na-1)
+    for k in li_z: # suivant z
+        for i in li_x: # suivant x
+            for j in li_y: # suivant y 
+                vertices.append(grille_cyl.getVertexIJK(i , j , k))
+                
+    return vertices
+    
+def set_association_from_cylindrical(model_vertices, geom_vertices):
+    """
+    réalise l'association entre :
+    1) les sommets issus d'une grille cylindrique (résultat de l'appel à get_vertices_from_cylindrical())
+    2) les sommets de la geometrie
+
+    l'association est faite dans l'ordre des vertex de la liste du modèle ie :
+    1) les sommets externes de la face du haut
+    2) les sommets internes de la face du haut
+    3) les sommets externes de la face du bas
+    4) les sommets internes de la face du bas
+    """
+    
+    for num, vertex in enumerate(model_vertices):
+        vertex.setAssociation(geom_vertices[num])
+        
+    pass
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = HexaBlocks.addDocument()
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 40.0
+
+r_grd = R
+r_grd_t = R/2
+
+r_pte = R
+r_pte_t = R/2
+
+l = 200.0
+h = 0.019999999553*2
+#h = 40.
+
+# Taille du grand cylindre
+dr_grd = R
+da_grd = 360
+dl_grd = h
+
+nr_grd = 1
+na_grd = 6
+nl_grd = 1
+
+# Taille du petit cylindre
+dr_pte = R
+da_pte = 360
+dl_pte = h
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(l, 0, 0)
+dy = doc.addVector(0, l, 0)
+dz = doc.addVector(0, 0, l)
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+c_grd = doc.addVertex(0, 0, 0)
+c_pte = doc.addVertex(2*l, 0, 0)
+dx_prime = doc.addVectorVertices( c_grd, c_pte )
+
+#=================================================
+# Creation de la grande grille cylindrique
+#=================================================
+
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex( 2*R, 0, h )
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )
+x4 = doc.findVertex( 2*R, 0, 0 )
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+
+#=================================================
+# Creation de la petite grille cylindrique
+#=================================================
+
+grille_cyl_pte = doc.makeTranslation(grille_cyl_grd, dx_prime )
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+y1 = doc.findVertex(2*l - 2*R , 0 , h)
+y2 = doc.findVertex(2*l - alpha_x , alpha_y , 0)
+y3 = doc.findVertex(2*l - alpha_x , -alpha_y , 0)
+y4 = doc.findVertex(2*l - 2*R , 0 , 0)
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#=================================================
+# Assemblage des deux grilles cylindriques
+#=================================================
+
+# a priori ne sert que pour créer bielle.vtk : normal ??
+model_biell_fin = doc.joinQuads(quad_list, quad_21, x1, y1, x4, y4, 1)
+
+
+model_biell_fin.saveVtk("/tmp/bielle.vtk")
+grille_cyl_pte.saveVtk("/tmp/grille_cyl_pte.vtk")
+grille_cyl_grd.saveVtk("/tmp/grille_cyl_grd.vtk")
+
+
+#===================================================================
+# Recuperation des vertex du modele hexa bielle pour l association
+#===================================================================
+
+# pour la grande grille cylindrique, la liste est constituée, dans l'ordre :
+# 1) des vertex de la face du haut (k = 1) => 12
+#    a) vertex externes (i = 1) => 6
+#    b) vertex internes (i = 0) => 6
+# 2) des vertex de la face du bas (k = 0) => 12
+#    a) vertex externes (i = 1) => 6
+#    b) vertex internes (i = 0) => 6
+
+mod_grd = get_vertices_from_cylindrical(grille_cyl_grd, nr_grd, na_grd, nl_grd)
+
+# pour la petite grille cylindrique, la liste est constituée, dans l'ordre :
+# 1) des vertex de la face du haut (k = 1) => 12
+#    a) vertex externes (i = 1) => 6
+#    b) vertex internes (i = 0) => 6
+# 2) des vertex de la face du bas (k = 0) => 12
+#    a) vertex externes (i = 1) => 6
+#    b) vertex internes (i = 0) => 6
+
+mod_pte = get_vertices_from_cylindrical(grille_cyl_pte, nr_pte, na_pte, nl_pte)
+
+#===================================================================
+# Recuperation des points de la geometrie bielle pour l association
+#===================================================================
+
+Bielle_geom = geompy.Import("/home/plumecoq/Karima/karima/hexa/cao_cea/crank.stp", "STEP")
+
+geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+Pt_A = geompy.MakeVertex(0, 0, h/2.)
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)
+
+# 1. grand cylindre :
+geom_vert_grd = []
+# 1.1 face du haut :
+# 1.1.1 sommets externes :
+
+# pour l'instant, la création des vertex de la geometrie se fait obligatoirement
+# dans cet ordre :
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+
+geom_vert_grd.extend([y_h_g, x_h_g, z_h_g, u_h_g, w_h_g, v_h_g])
+
+# 1.1.2 sommets internes :
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+
+geom_vert_grd.extend([y_h_g_t, x_h_g_t, z_h_g_t, u_h_g_t, w_h_g_t, v_h_g_t])
+
+# 1.2 face du bas :
+# pour tous les vertex de la face du bas, on les crée par référence à ceux déjà crées (dans le meme ordre :
+# sommets externes puis internes) :
+geom_vert_grd_bas = [geompy.MakeVertexWithRef(vertex, 0.0, 0.0, -h) for vertex in geom_vert_grd]
+geom_vert_grd.extend(geom_vert_grd_bas)
+
+
+print "nombre vertex grand cylindre geom = ", len(geom_vert_grd)
+
+# ajout des vertex de la géométrie à l'étude :
+for num, vertex in enumerate(geom_vert_grd):
+#    print "ajout de v_grd"+str(num)
+    geompy.addToStudy(vertex, "v_grd"+str(num))
+
+# association :
+set_association_from_cylindrical(mod_grd, geom_vert_grd)
+
+# 2. petit cylindre :
+geom_vert_pte = []
+# 2.1 face du haut :
+# 2.1.1 sommets externes :
+
+# pour l'instant, la création des vertex de la geometrie se fait obligatoirement
+# dans cet ordre :
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)
+
+geom_vert_pte.extend([y_h_p, x_h_p, z_h_p, u_h_p, w_h_p, v_h_p])
+
+# 2.1.2 sommets internes :
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)
+
+geom_vert_pte.extend([y_h_p_t, x_h_p_t, z_h_p_t, u_h_p_t, w_h_p_t, v_h_p_t])
+
+# 2.2 face du bas :
+# pour tous les vertex de la face du bas, on les crée par référence à ceux déjà crées (dans le meme ordre :
+# sommets externes puis internes) :
+geom_vert_pte_bas = [geompy.MakeVertexWithRef(vertex, 0.0, 0.0, -h) for vertex in geom_vert_pte]
+geom_vert_pte.extend(geom_vert_pte_bas)
+
+print "nombre vertex petit cylindre geom = ", len(geom_vert_pte)
+
+# ajout des vertex de la géométrie à l'étude :
+for num, vertex in enumerate(geom_vert_pte):
+#    print "ajout de v_pte"+str(num)
+    geompy.addToStudy(vertex, "v_pte"+str(num))
+
+# association :
+set_association_from_cylindrical(mod_pte, geom_vert_pte)
+
+le meme ordre :
+# sommets externes puis internes) :
+geom_vert_pte_bas = [geompy.MakeVertexWithRef(vertex, 0.0, 0.0, -h) for vertex in geom_vert_pte]
+geom_vert_pte.extend(geom_vert_pte_bas)
+
+print "nombre vertex petit cylindre geom = ", len(geom_vert_pte)
+
+# ajout des vertex
\ No newline at end of file
diff --git a/doc/pyplots/bride.py b/doc/pyplots/bride.py
new file mode 100644 (file)
index 0000000..a8a1c17
--- /dev/null
@@ -0,0 +1,410 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+k1 = 1
+
+OPT_QUAD_IK = 1
+OPT_FIRST = 2
+
+count = 1
+def save_schema(doc):
+    """
+    sauvegarde vtk du modele de bloc
+    """
+    global count
+    file_name = os.path.join(os.environ['TMP'], 'bride' + str(count) + '.vtk')
+    doc.saveVtk(file_name)
+    count += 1
+    pass
+
+def merge_quads(doc, quart, demi, ni1, nj1, ni2, nj2, option=0) :
+    """
+    fusion des quadrangles entre les 2 grilles cylindriques :
+    """
+
+    prems = False
+    if option == OPT_FIRST:
+        prems = True
+
+    quad_ik = False
+    if option == OPT_QUAD_IK:
+        quad_ik = True
+
+    orig = None
+    if quad_ik:
+        orig = grille_cyl_quart.getQuadIK(ni1, nj1, k1)
+    else:
+        orig = grille_cyl_quart.getQuadJK(ni1, nj1, k1)
+
+    dest = grille_cyl_demi.getQuadJK(ni2, nj2, k1)
+
+
+# JPL le 10/05/2011 :
+# closeQuads() n'est pas accessible en python
+# a priori fonctionne avec mergeQuads()
+##     if prems:
+    if True:
+        iq1 = 0
+        if quad_ik:
+            iq1 = 1
+        iq3 = 1 - iq1
+        v1 = dest.getVertex(iq1)
+        v3 = dest.getVertex(iq3)
+        
+        v2 = orig.getVertex(0)
+        v4 = orig.getVertex(1)
+
+        doc.mergeQuads(dest, orig, v1, v2, v3, v4)
+        pass
+    else:
+##         doc.closeQuads(dest, orig)
+        print "closeQuads() : not yet implemented"
+        pass
+
+    return None
+
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/bride.brep")
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument()
+
+#=============================
+# PARAMETRES
+#=============================
+
+height = 1.0
+
+# cylinder grid 1 :
+nr1 = 8
+na1 = 4
+nl1 = 5
+dr1 = 1.0
+da1 = 45.0  # angle
+dl1 = height
+
+# cylinder grid 2 :
+nr2 = 3
+na2 = 8
+nl2 = nl1
+dr2 = 0.5
+da2 = 180.0  # angle
+dl2 = dl1
+
+#=============================
+# Creation du modele de blocs
+#=============================
+
+# JPL (le 09/05/2011)
+# repris de test_bride_abu.cxx (version la plus a jour dans ~/IHMHEXA/Alain/models):
+# et de BRIDE.py (Karima) pour les "vraies" coordonn�es :
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+center1 = doc.addVertex(0, 0, height)
+center2 = doc.addVertex(6, 0, height)
+
+dx = doc.addVector(height, 0, 0)
+dz = doc.addVector(0, 0, height)
+
+# Creation des grilles cylindriques initiales
+#============================================
+
+# 1. 1 ere grille (quart) :
+#==========================
+
+# JPL (le 10/05/2011) : vu la geometrie, on ne remplit pas le centre :
+## grille_cyl_quart = doc.makeCylindrical(orig1, dx, dz, dr_q, 45.0, dl,
+##                                        nr_q, na_q, dim_z, True)
+grille_cyl_quart = doc.makeCylindrical(center1, dx, dz, dr1, da1, dl1,
+                                       nr1, na1, nl1, False)
+
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# Elagage  :
+for nk in range(2, nl1):
+    for nj in range(na1):
+        ideb = 2
+        if nk == nl1 - 1:
+            ideb = 1
+        for ni in range(ideb, nr1):
+            doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, nk))
+            pass
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# Semelle :
+k0 = 0
+for nj in range(na1):
+    for ni in range(2, nr1):
+        doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, k0))
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# @todo JPL : peut-on fusionner les edges du haut des hexaedres du haut du deuxieme
+# rang ? (cf. GEOM). Si oui revoir aussi l'association
+
+# 2. 2�me grille (demi) :
+#========================
+grille_cyl_demi = doc.makeCylindrical(center2, dx, dz, dr2, da2, dl2,
+                                      nr2, na2, nl2, True)
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+ni0 = [0, nr2, 2, 1, 0]  # en fonction de z (ie : nk) 
+for nk in range(0, nl2):
+    for nj in range(na2):  # elagage suivant toute la demi-circonference
+        for ni in range(ni0[nk], nr2):
+            doc.removeHexa(grille_cyl_demi.getHexaIJK(ni, nj, nk))            
+            pass
+        pass
+    pass
+
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# 3. creusement des fondations de demi dans quart :
+#==================================================
+for nj in range(2):
+    for ni in range(3, nr1 - 1):
+        doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, k1))
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# 4. Fusion des bords :
+#======================
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 7, 0, nr2, 0, OPT_FIRST)
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 7, 1, nr2, 1)
+for ni1 in range(2, 6):
+    merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 8 - ni1, 2, nr2, ni1, OPT_QUAD_IK)
+    pass
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 3, 1, nr2, 6)
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 3, 0, nr2, 7)
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+###########
+# Geometry
+###########
+
+bride_geom = geompy.ImportFile(BREP_PATH, "BREP")
+
+geompy.addToStudy(bride_geom, "bride_geom")
+
+
+# parametres de la geometrie :
+
+r1 = 12.0
+r1_t = 7.88
+r2 = 20.0
+r2_t = 2.0
+
+##############
+# Association
+##############
+
+# association vertex/points de la grille 1
+# (tous les vertex qui ne sont pas fusionnes avec ceux de la grille #
+# 2)
+
+dz_geom = geompy.MakeVectorDXDYDZ(0., 0., 1.)
+
+# les vertex du cylindre 1 sont crees de bas en haut, en tournant dans
+# le sens trigonometrique :
+
+# 6 vertex sont necessaires / axe z (pour associer aux 6 vertices du
+# modele) :
+
+z_val = [-1, 1.5, 21.5, 34, 46.5]  # nl1 + 1 valeurs
+for ni in range(nr1 + 1):
+    # suivant ni, valeurs des x pour les (nl1 + 1) points (selon l'axe z)
+    x = []
+    z = []
+    nb_z = 0  # nombre de points suivant l'axe z
+    if ni == 0:
+        z = z_val
+        x = [r1_t] * len(z)
+        pass
+    elif ni == 1:
+        z = z_val
+        x = [r1_t + 2.77] * len(z)
+        pass
+    elif ni == 2:
+        z = z_val[0:-1]  # tout sauf le dernier
+        x_last = r1_t + 2.77
+        x = [24.0, 24.0, 19.0, (19.0 - x_last)/2 + x_last, x_last]  # pour le 4 eme point, moyenne
+        # entre le 3 eme et le 5 eme
+        pass
+    elif ni == 3:
+        z = z_val[1:3]
+        x = [24.0, 19.0]
+        pass
+    elif ni == 4:
+        z = z_val[1:3]
+        x = [26.5, 21.0]  # a revoir pour le premier point ??
+        pass
+    elif ni == 8:
+        z = z_val[1:3]
+        x = [47.5] * 2
+        pass
+    else:  # ni = 5, 6, 7
+        z = z_val[1:3]
+        x = [26.5 + (47.5 - 26.5)/4*(ni - 4)] * 2
+        pass
+    pass
+
+    nb_z = len(z)
+
+    # creation des points pour y = 0 :
+    vert_grid1_xi = [geompy.MakeVertex(xi, 0, zi) for (xi, zi) in \
+                     zip(x, z)]
+
+    # les points suivants sont crees par rotation de PI/16 suivant
+    # l'axe z / aux precedents :
+    angle = math.pi/4.0/na1  # PI/4 (45 degres), divise par 4
+    for j in range(na1):
+        li = [geompy.MakeRotation(v, dz_geom, angle) for v in vert_grid1_xi[-nb_z:]]
+        vert_grid1_xi.extend(li)
+        pass
+
+    # ajout des points a l'etude et association :
+    # les vertex fusionnes ou correspondant a des hexaedres effaces ne
+    # sont pas pris en compte.
+    for nj in range(na1 + 1):
+        for nk in range(nb_z):
+            if (ni <= 2) or (3 <= ni <= 7 and nj >= na1 - 1) or \
+                   (ni == 8 and (nj == 0  or nj >= na1 - 1)):
+                v_mod = grille_cyl_quart.getVertexIJK(ni, nj, nk)
+                v_geo = vert_grid1_xi[nk + nj*nb_z]
+                geompy.addToStudy(v_geo, "vert_grid1_x" + str(ni) + "_y" + \
+                                  str(nj) + "_z" + str(nk))
+                v_mod.setAssociation(v_geo)
+                pass
+            pass
+        pass
+    
+    pass
+
+# association vertex/points de la grille 2
+# (tous les vertex qui ne sont pas fusionnes avec ceux de la grille #
+# 1)
+## dz_geom2 = geompy.MakeVectorDXDYDZ(33.5, 0., 1.)
+pt_a = geompy.MakeVertex(33.5, 0, 0)
+pt_b = geompy.MakeVertex(33.5, 0, 1.)
+dz_geom2 = geompy.MakeVector(pt_a, pt_b)
+
+# les vertex du cylindre 2 sont crees de bas en haut, en tournant dans
+# le sens trigonometrique :
+
+# REM : pour l'instant on met de cote la partie centrale du cylindre
+# (6 vertex selon z) => a faire a la fin. Ils sont d'ailleurs ranges
+# apres les autres dans le modele
+
+
+# 6 vertex sont necessaires / axe z (pour associer aux 6 vertices du
+# modele) :
+
+z_val = [-1, 1.5, 21.5, 24, 36, 41.5]  # nl2 + 1 valeurs
+for ni in range(nr2 + 1):
+    # suivant ni, valeurs des x pour les (nl1 + 1) points (selon l'axe z)
+    x = []
+    z = []
+    nb_z = 0  # nombre de points suivant l'axe z
+    if ni == 0:
+        z = z_val
+        x = [39.5] * len(z)
+        pass
+    elif ni == 1:
+        z = z_val[1:-1]  # tout sauf le dernier et le premier
+        x = [42.5] * len(z)
+        pass
+    elif ni == 2:
+        z = z_val[1:-2]  # tout sauf les 2 derniers et le premier
+        x = [46.] * len(z)
+        pass
+    elif ni == 3:
+        z = z_val[1:3]
+        x = [46.7] * len(z)  # valeur a revoir ??
+        pass
+    pass
+
+    nb_z = len(z)
+
+    # creation des points pour y = 0 :
+    vert_grid2_xi = [geompy.MakeVertex(xi, 0, zi) for (xi, zi) in \
+                     zip(x, z)]
+
+    # les points suivants sont crees par rotation de PI/16 suivant
+    # l'axe z / aux precedents :
+    angle = math.pi/na2  # PI (180 degres), divise par 8
+    for j in range(na2):
+        li = [geompy.MakeRotation(v, dz_geom2, angle) for v in vert_grid2_xi[-nb_z:]]
+        vert_grid2_xi.extend(li)
+        pass
+
+    # ajout des points a l'etude et association :
+    for nj in range(na2 + 1):
+        for nk in range(nb_z):
+            v_mod = grille_cyl_demi.getVertexIJK(ni, nj, nk)
+            v_geo = vert_grid2_xi[nk + nj*nb_z]
+            geompy.addToStudy(v_geo, "vert_grid2_x" + str(ni) + "_y" + \
+                              str(nj) + "_z" + str(nk))
+            v_mod.setAssociation(v_geo)
+            pass
+        pass
+
+    pass
+
+# association des vertex communs grille1/grille2
+# REM : cette etape n'est pas necessaire ? En effet, les vertex ayant
+# ete fusionnes, l'association a ete faite avec la grille 2
diff --git a/doc/pyplots/process_vtk.py b/doc/pyplots/process_vtk.py
new file mode 100755 (executable)
index 0000000..42265cc
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+import sys
+import os
+from optparse import OptionParser
+
+def process (file_name):
+    """
+    cette methode prend en entree le nom d'un fichier vtk cree par le
+    module HEXABLOCK de Salome, et remplace les "," par des "."
+    """
+
+    wr_data = ""
+    with open(file_name, 'r') as f:
+        read_data = f.read()
+        wr_data = read_data.replace(',', '.')
+        pass
+
+    with open(file_name, 'w') as f:
+        f.write(wr_data)
+        pass
+
+    pass
+
+if __name__ == '__main__':
+
+    usage = "usage: %prog file_name"
+    parser = OptionParser(usage=usage)
+    (options, args) = parser.parse_args()
+
+    if len(args) != 1:
+        print usage
+        sys.exit(1)
+    
+    file_name = os.path.join(os.environ['TMP'], args[0])
+
+    print file_name
+    process(file_name)
+    
+    sys.exit() 
diff --git a/doc/pyplots/test_cut.py b/doc/pyplots/test_cut.py
new file mode 100644 (file)
index 0000000..412ab00
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test cut hexaedra..."
+doc = hexablock.addDocument()
+
+size_x = 2
+size_y = 1
+size_z = 1
+
+orig = doc.addVertex(0, 0, 0)
+dirVr = doc.addVector(1, 1, 1)
+
+grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+arete = grid.getEdgeK(0, 0, 0)
+
+## doc.dump()
+
+file_name = os.path.join(os.environ['TMP'], 'no_decoupe.vtk')
+doc.saveVtk(file_name)
+
+doc.cut(arete, 1)
+
+# doc.dump()
+file_name = os.path.join(os.environ['TMP'], 'decoupe.vtk')
+doc.saveVtk(file_name)
+
+
+print "...test cut hexaedra OK"
+
+
diff --git a/doc/pyplots/test_disconnect.py b/doc/pyplots/test_disconnect.py
new file mode 100644 (file)
index 0000000..172cd6a
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+# differents cas possibles de remplissage possibles :
+
+
+print "test disconnect elements..."
+doc = hexablock.addDocument()
+
+size_x = 2;
+size_y = 2;
+size_z = 1;
+
+orig1 = doc.addVertex(0, 0, 0);
+orig2 = doc.addVertex(4, 0, 0);
+orig3 = doc.addVertex(8, 0, 0);
+
+
+dirVr = doc.addVector(1, 1, 1);
+
+grid1 = doc.makeCartesian1(orig1, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+grid2 = doc.makeCartesian1(orig2, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+grid3 = doc.makeCartesian1(orig3, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+
+
+nvtk = 0
+#doc.setLevel(1)
+
+# matrice =  ???
+# ecart = doc.addVector(0.5, 0.5, 0)
+
+hexa1 = grid1.getHexaIJK(1, 1, 0)
+hexa2 = grid2.getHexaIJK(1, 1, 0)
+hexa3 = grid3.getHexaIJK(1, 1, 0)
+
+quad = grid1.getQuadJK(1, 1, 0)
+edge = grid2.getEdgeK(1, 2, 0)
+vertex = grid3.getVertexIJK(1, 1, 1)
+
+quad.setScalar(5)
+edge.setScalar(5)
+vertex.setScalar(5)
+
+file_name = os.path.join(os.environ['TMP'], 'disconnect1.vtk')
+doc.saveVtk(file_name)
+
+doc.disconnectQuad(hexa1, quad)
+
+file_name = os.path.join(os.environ['TMP'], 'disconnect2.vtk')
+doc.saveVtk(file_name)
+
+
+print "...test disconnect elements OK"
+
+
diff --git a/doc/pyplots/test_join_quads.py b/doc/pyplots/test_join_quads.py
new file mode 100644 (file)
index 0000000..3e397f1
--- /dev/null
@@ -0,0 +1,79 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_hexa1.cxx (test_joint())
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test join..."
+doc = hexablock.addDocument()
+
+orig1 = doc.addVertex(0, 0, 0)
+dx = doc.addVector(1, 0, 0)
+dy = doc.addVector(0, 1, 0)
+dz = doc.addVector(0, 0, 1)
+
+dimx = 11
+dimy = 11
+dimz = 2
+grid1 = doc.makeCartesian(orig1, dx, dy, dz, dimx, dimy, dimz)
+
+orig2 = doc.addVertex(dimx/2.0, 0, 8)
+grid2 = doc.makeCylindrical(orig2, dx, dy, 1, 180, 1, dimz, dimy,
+                            dimx, False)
+
+mx = dimx/2
+my = dimy/2
+prems = grid1.getQuadIJ(mx, my, dimz)
+cible = grid2.getQuadJK(dimz, mx, my)
+
+# @todo reference = test_hexa1.cxx ou ModelTest.cxx ?
+v1 = prems.getVertex(0)
+v2 = cible.getVertex(0)
+v3 = prems.getVertex(1)
+v4 = cible.getVertex(3)
+
+liste = [prems]
+liste.extend([grid1.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
+liste.extend([grid1.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
+
+height = 5
+
+elts = doc.joinQuads(liste, cible, v1, v2, v3, v4, height) 
+
+## indispensable ???
+nbr_joint_vertex = elts.countVertex()
+nbr_surf_vertex = nbr_joint_vertex/(height + 1)
+
+ind0 = elts.findVertex(v1)
+for nh in range(nbr_surf_vertex):
+    elts.getVertex(nh).setScalar(5)
+for nh in range(height):
+    elts.getVertex(nh*nbr_surf_vertex).setScalar(3)
+
+
+file_name = os.path.join(os.environ['TMP'], 'joint.vtk')
+elts.saveVtk(file_name)
+
+print "...test join OK"
diff --git a/doc/pyplots/test_make_cart_grid.py b/doc/pyplots/test_make_cart_grid.py
new file mode 100644 (file)
index 0000000..b0bfb3f
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_HEXABLOCK.py
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+
+print "test grille cartesienne..."
+doc = hexablock.addDocument()
+
+orig = doc.addVertex(0, 0, 0)
+
+#direction = doc.addVector(1, 1, 1)
+
+dx = doc.addVector(1, 0, 0)
+dy = doc.addVector(0, 1, 0)
+dz = doc.addVector(0, 0, 1)
+
+ni = 15
+nj = 12
+nk = 8
+
+grid = doc.makeCartesian(orig, dx, dy, dz, ni, nj, nk)
+
+file_name = os.path.join(os.environ['TMP'], 'grille_cartesienne.vtk')
+grid.saveVtk(file_name)
+
+print "...test grille cartesienne OK"
diff --git a/doc/pyplots/test_make_cyl_grid.py b/doc/pyplots/test_make_cyl_grid.py
new file mode 100644 (file)
index 0000000..942efeb
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+# differents cas possibles de remplissage possibles :
+
+
+print "test grille cylindrique..."
+doc = hexablock.addDocument()
+
+orig1 = doc.addVertex(0, 0, 0)
+orig2 = doc.addVertex(10, 0, 0)
+orig3 = doc.addVertex(0, 10, 0)
+orig4 = doc.addVertex(10, 10, 0)
+orig5 = doc.addVertex(0, 20, 0)
+orig6 = doc.addVertex(10, 20, 0)
+
+vz = doc.addVector(0, 0, 1)
+vx = doc.addVector(1, 0, 0)
+
+dr = 1
+dl = 1
+nr = 2
+nl = 3
+
+c1 = doc.makeCylindrical(orig1, vx, vz, dr, 360, dl, nr, 4, nl, True)
+c2 = doc.makeCylindrical(orig2, vx, vz, dr, 360, dl, nr, 8, nl, True)
+c3 = doc.makeCylindrical(orig3, vx, vz, dr, 270, dl, nr, 8, nl, True)
+c4 = doc.makeCylindrical(orig4, vx, vz, dr, 270, dl, nr, 7, nl, True)
+c5 = doc.makeCylindrical(orig5, vx, vz, dr, 360, dl, nr, 5, nl, True)
+c6 = doc.makeCylindrical(orig6, vx, vz, dr, 360, dl, nr, 6, nl, True)
+
+base2 = nr * nl * 8
+for i in range(2):
+    c2.getHexa(base2 + i).setScalar(5)
+
+file_name = os.path.join(os.environ['TMP'], 'grilles_cylindriques.vtk')
+doc.saveVtk(file_name)
+
+print "...test grille cylindrique OK"
+
+
diff --git a/doc/pyplots/test_make_cylinder.py b/doc/pyplots/test_make_cylinder.py
new file mode 100644 (file)
index 0000000..ed7e86b
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_HEXABLOCK.py
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test cylindre..."
+doc = hexablock.addDocument()
+
+base = doc.addVertex(0, 0, 0)
+
+direction = doc.addVector(0, 0, 1)
+
+radius = 4
+height = 5
+
+cyl = doc.addCylinder(base, direction, radius, height)
+
+vb = doc.addVector(1, 0, 0)
+nr = radius
+na = 9
+nl = height
+elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+
+file_name = os.path.join(os.environ['TMP'], 'cylindre.vtk')
+elts.saveVtk(file_name)
+
+print "...test cylindre OK"
diff --git a/doc/pyplots/test_make_elmts_transform.py b/doc/pyplots/test_make_elmts_transform.py
new file mode 100644 (file)
index 0000000..3b18eff
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test make elements by transforming elements..."
+doc = hexablock.addDocument()
+
+size_x = 1
+size_y = 1
+size_z = 2
+
+orig = doc.addVertex(0, 0, 0)
+dirVr = doc.addVector(1, 1, 1)
+
+grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+orig.setScalar(2)
+
+file_name = os.path.join(os.environ['TMP'], 'transfo0.vtk')
+doc.saveVtk(file_name)
+
+devant = doc.addVector(5, 0, 0)
+grid2 = doc.makeTranslation(grid, devant)
+
+file_name = os.path.join(os.environ['TMP'], 'transfo_translation.vtk')
+doc.saveVtk(file_name)
+
+grid4 = doc.makeRotation(grid2, orig, dirVr, 45)
+
+file_name = os.path.join(os.environ['TMP'], 'transfo_rotation.vtk')
+doc.saveVtk(file_name)
+
+
+print "...test make elements by transforming elements OK"
+
+
diff --git a/doc/pyplots/test_make_pipe.py b/doc/pyplots/test_make_pipe.py
new file mode 100644 (file)
index 0000000..7679546
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_hexa1.cxx
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test pipe..."
+doc = hexablock.addDocument()
+
+orig = doc.addVertex(50, 0, 0)
+
+vz = doc.addVector(0, 0, 1)
+
+int_radius = 3
+ext_radius = 4
+height = 5
+
+pi = doc.addPipe(orig, vz, int_radius, ext_radius, height)
+
+vb = doc.addVector(1, 0, 0)
+nr = 4
+na = 9
+nl = 5
+elts = doc.makePipe(pi, vb, nr, na, nl)
+
+file_name = os.path.join(os.environ['TMP'], 'pipe.vtk')
+elts.saveVtk(file_name)
+
+print "...test pipe OK"
diff --git a/doc/pyplots/test_make_spher_grid.py b/doc/pyplots/test_make_spher_grid.py
new file mode 100644 (file)
index 0000000..da5f256
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_HEXABLOCK.py
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+
+print "test grille spherique..."
+doc = hexablock.addDocument()
+
+orig = doc.addVertex(0, 0, 0)
+
+direction = doc.addVector(1, 1, 1)
+
+#n = 2
+n = 2
+# k = 0.8  # amincit les couches (ou epaissit : si < 1 ou > 1)
+
+k = 0.8  # amincit les couches (ou epaissit : si < 1 ou > 1)
+
+grid = doc.makeSpherical(orig, direction, n, k)
+
+
+
+file_name = os.path.join(os.environ['TMP'], 'grille_spherique.vtk')
+grid.saveVtk(file_name)
+
+print "...test grille spherique OK"
diff --git a/doc/pyplots/test_prism_quads.py b/doc/pyplots/test_prism_quads.py
new file mode 100644 (file)
index 0000000..4366fea
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+# exemple repris de test_hexa1.cxx
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test prism..."
+doc = hexablock.addDocument()
+
+orig = doc.addVertex(0, 0, 0)
+dx = doc.addVector(1, 0, 0)
+dy = doc.addVector(0, 1, 0)
+dz = doc.addVector(0, 0, 1)
+
+dimx = 11
+dimy = 11
+dimz = 2
+grid = doc.makeCartesian(orig, dx, dy, dz, dimx, dimy, dimz)
+
+mx = dimx/2
+my = dimy/2
+prems = grid.getQuadIJ(mx, my, dimz)
+
+liste = [prems]
+liste.extend([grid.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
+liste.extend([grid.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
+
+vec = doc.addVector(1, 1, 1)
+elts = doc.prismQuads(liste, vec, 5) 
+
+file_name = os.path.join(os.environ['TMP'], 'prisme.vtk')
+elts.saveVtk(file_name)
+
+print "...test prism OK"
diff --git a/doc/pyplots/test_propagation.py b/doc/pyplots/test_propagation.py
new file mode 100644 (file)
index 0000000..0e6cb33
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#
+
+import os
+import GEOM
+import SALOMEDS
+import hexablock
+
+print "test propagation..."
+doc = hexablock.addDocument()
+
+size_x = 2
+size_y = 1
+size_z = 1
+
+orig = doc.addVertex(0, 0, 0)
+dirVr = doc.addVector(1, 1, 1)
+
+grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0,
+                           0)
+
+for nro in range(doc.countPropagation()):
+    prop = doc.getPropagation(nro)
+    edges = prop.getEdges()
+
+    print("____________________________________ Prop nro %d" % (nro))
+    for edge in edges:
+# test impossible en python car impossible de recuperer le nom des vertex
+        if edge.getWay():
+            print "( ", edge.getVertex(0).name, ",", edge.getVertex(1).name, " )"
+        else:
+            print "( ", edge.getVertex(1).getName(), ",", edge.getVertex(0).getName(), " )"
+        pass
+    pass
+
+
+
+file_name = os.path.join(os.environ['TMP'], 'propagation.vtk')
+doc.saveVtk(file_name)
+
+print "...test propagation OK"
+
+
diff --git a/doc/python.rst b/doc/python.rst
new file mode 100644 (file)
index 0000000..c7c6fd2
--- /dev/null
@@ -0,0 +1,49 @@
+:tocdepth: 4
+
+.. _python:
+
+###############################################
+Using HexaBlock with the Python interface (TUI)
+###############################################
+
+By the links below you can find sample scripts for all operations provided by HexaBlock module
+
+.. toctree::
+   :maxdepth: 2
+   tui_component.rst
+   tui_document.rst
+   tui_vertex.rst
+   tui_edge.rst
+   tui_quadrangle.rst
+   tui_hexahedron.rst
+   tui_vector.rst
+   tui_cyl.rst
+   tui_pipe.rst
+   tui_blocks_for_cyl_pipe.rst
+   tui_cartgrid.rst
+   tui_cylgrid.rst
+   tui_sphergrid.rst
+   tui_remove.rst
+   tui_cut_hexa.rst
+   tui_prism_join_quad.rst
+   tui_merge_elmts.rst
+   tui_disc_elmts.rst
+   tui_make_elmts.rst
+   tui_modify_elmts.rst
+   tui_asso_quad_to_geom.rst
+   tui_groups.rst
+   tui_discret_law.rst
+   tui_propag.rst
+   tui_mesh.rst
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/tui.rst b/doc/tui.rst
new file mode 100644 (file)
index 0000000..aace739
--- /dev/null
@@ -0,0 +1,7 @@
+:tocdepth: 3
+
+.. _tui:
+
+====
+TUI
+====
diff --git a/doc/tui_asso_quad_to_geom.rst b/doc/tui_asso_quad_to_geom.rst
new file mode 100644 (file)
index 0000000..1473ed9
--- /dev/null
@@ -0,0 +1,77 @@
+:tocdepth: 3
+
+.. _tuiassoquadtogeom:
+
+=============================================
+Associate the model of blocks to the geometry
+=============================================
+
+.. _tuiassoelemts:
+
+Elements association
+====================
+
+Associate to a vertex of the geometry::
+
+    vx.setAssociation(geom_object_vertex)
+
+Get the association::
+
+    gov = vx.getAssociation()
+
+Associate to an edge or a wire of the geometry::
+
+    l = edg.addAssociation(geom_object_1D, debut, val)
+
+Get the associations::
+
+    edge_associations = edg.getAssociations()
+
+Associate to a face or a shell of the geometry::
+
+    l = quad.addAssociation(geom_object_2D)
+
+Give the association::
+
+    go2d = quad.getAssociations()
+
+.. _tuiassolines:
+
+Associate by lines
+==================
+
+To associate an opened line to the geometry, the following data have
+to be mentioned:
+
+- the starting edge of the model of blocks: *mstart*
+- the list of edges of the model of blocks: *mline*
+- the starting edge of the geometry: *gstart*
+- the curvilinear abscissa on the starting edge of the geometry: *pstart* (double)
+- the list of edges of the geometry: *gline*
+- the curvilinear abscissa on the last edge of the geometry: *pend*
+
+The number of edges of the model of blocks to associate may be
+different from the number of edges of the geometry. 
+
+Associate an opened line::
+
+        l = doc.associateOpenedLine(mstart, mline, gstart, pstart, gline, pend) 
+
+To associate a closed line to the geometry, the following data have
+to be mentioned:
+
+- the starting vertex of the model of blocks: *mfirst*
+- the starting edge of the model of blocks: *mstart*
+- the list of edges of the model of blocks: *mline*
+- the starting edge of the geometry: *gstart*
+- the curvilinear abscissa on the starting edge of the geometry: *pstart* (double)
+- the list of edges of the geometry: *gline*
+
+The number of edges of the model of blocks to associate may be
+different from the number of edges of the geometry. 
+
+Associate a closed line::
+
+    l = doc.associateClosedLine(mfirst, mstart, mline, gstart, pstart, gline)
+
+GUI command: :ref:`guiassoquadtogeom`
diff --git a/doc/tui_blocks_for_cyl_pipe.rst b/doc/tui_blocks_for_cyl_pipe.rst
new file mode 100644 (file)
index 0000000..3df400b
--- /dev/null
@@ -0,0 +1,118 @@
+:tocdepth: 3
+
+
+.. _tuiblockscylinderpipe:
+
+=====================================
+Make blocks for a cylinder and a pipe
+=====================================
+
+Make blocks for a cylinder
+==========================
+
+::
+
+    elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+
+cyl: cylinder
+
+vb: vector on the base of the cylinder to start hexahedra.
+
+nr: number of blocks on radial.
+
+na: number of angular section.
+
+nl: number of blocks along the axis of the cylinder.
+
+The result is an array of hexahedra ranked first by following the
+radial direction and the angular direction, then according to the
+layers in the cylinder axis.
+
+
+Example
+-------
+
+::
+
+        import hexablock
+        doc = hexablock.addDocument()
+
+        base = doc.addVertex(0, 0, 0)
+        direction = doc.addVector(0, 0, 1)
+        radius = 4
+        height = 5
+
+        cyl = doc.addCylinder(base, direction, radius, height)
+
+        vb = doc.addVector(1, 0, 0)
+        nr = radius
+        na = 9  
+        nl = height
+        elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+
+.. image:: _static/cylinder.png
+   :align: center
+
+.. centered::
+   Cylinder
+
+Make blocks for cylinders
+=========================
+
+::
+
+     elts = doc.makeCylinders(cyl1, cyl2)
+
+The result is an array of hexahedral.
+
+
+Make blocks for a pipe
+======================
+
+::
+
+    elts = doc.makePipe(pi, vb, nr, na, nl)
+
+The result is an array of hexahedral arranged in layers following the
+first radial and angular layers, and finally the axial layers.
+
+Example
+-------
+
+::
+
+        import hexablock
+        doc = hexablock.addDocument()
+
+        orig = doc.addVertex(50, 0, 0)
+        vz = doc.addVector(0, 0, 1)
+        int_radius = 3
+        ext_radius = 4
+        height = 5
+        pi = doc.addPipe(orig, vz, int_radius, ext_radius, height)
+
+        vb = doc.addVector(1, 0, 0)
+        nr = 4
+        na = 9
+        nl = 5
+        elts = doc.makePipe(pi, vb, nr, na, nl)
+
+.. image:: _static/pipe.png
+   :align: center
+
+.. centered::
+   Pipe
+
+Make blocks for pipes
+=====================
+
+::
+
+    elts = doc.makePipes(p1, p2)
+
+The result is an array of hexahedra where we first find hexahedra of
+the first pipe and the second pipe. Each pipe range hexahedra following
+first radial layers and angular layers, and finally the axial layers.
+
+
+GUI command: :ref:`guiblockscylinderpipe`
diff --git a/doc/tui_cartgrid.rst b/doc/tui_cartgrid.rst
new file mode 100644 (file)
index 0000000..3e7e4fa
--- /dev/null
@@ -0,0 +1,139 @@
+:tocdepth: 3
+
+
+.. _tuicartgrid:
+
+====================
+Make cartesian grids
+====================
+
+To add a cartesian grid to the model, the following data are required:
+
+- the vertex of the initial hexahedron: *pt*
+- the vectors corresponding to the diametrically opposite vertices to the initial vertex: *vx, vy, vz*
+- the number of repetition of this hexahedra along the three axes: *ni, nj, nk*
+
+Make a Cartesian grid::
+
+    elts = doc.makeCartesian(pt, vx, vy, vz, ni, nj, nk)
+
+or::
+
+    elts = doc.makeCartesian1(pt, vec1, px, py, pz, mx, my, mz)
+
+
+Access to the number of elements of the grid::
+
+    vn = elts.countVertex()
+    en = elts.countEdge()
+    qn = elts.countQuad()
+    hn = elts.countHexa()
+
+Access to all elements of the grid::
+
+    vi = elts.getVertex(i)
+    ej = elts.getEdge(j)
+    qk = elts.getQuad(k)
+    hl = elts.getHexa(l)
+
+Specialized access to all vertices of the grid::
+
+    ve_xyz = elts.getVertexIJK(i, j, k)
+    
+    with:
+        0 <= i < ni+1
+        0 <= j < nj+1
+        0 <= k < nk+1
+
+Specialized access to all edges // vx axis of the grid::
+
+    ed_a = elts.getEdgeI(i, j, k)
+    
+    with:
+        0 <= i < ni
+        0 <= j < nj+1
+        0 <= k < nk+1
+
+Specialized access to all edges // vy axis of the grid::
+
+    ed_b = elts.getEdgeJ(i, j, k)
+    
+    with:
+        0 <= i < ni+1
+        0 <= j < nj
+        0 <= k < nk+1
+
+Specialized access to all edges // vz axis of the grid::
+
+    ed_c = elts.getEdgeK(i, j, k)
+    
+    with:
+        0 <= i < ni+1
+        0 <= j < nj+1
+        0 <= k < nk
+
+Specialized access to all quadrangles // on plane vx, vy::
+
+    qu_a = elts.getQuadIJ(i, j, k)
+
+    with:
+        0 <= i < ni
+        0 <= j < nj
+        0 <= k < nk+1
+
+Specialized access to all quadrangles // on plane vx, vz::
+
+    qu_b = elts.getQuadIK(i, j, k)
+    
+    with:
+        0 <= i < ni
+        0 <= j < nj+1
+        0 <= k < nk
+
+Specialized access to all quadrangles // on plane vy, vz::
+
+    qu_c = elts.getQuadJK(i, j, k)
+    
+    with:
+        0 <= i < ni+1
+        0 <= j < nj
+        0 <= k < nk
+
+Specialized access to all hexahedra of the grid::
+
+    he_xyz = elts.getHexaIJK(i, j, k)
+    
+    with:
+        0 <= i < ni
+        0 <= j < nj
+        0 <= k < nk
+
+Example
+-------
+
+::
+    
+    import hexablock
+    doc = hexablock.addDocument()
+
+    orig = doc.addVertex(0, 0, 0)
+
+    dx = doc.addVector(1, 0, 0)
+    dy = doc.addVector(0, 1, 0)
+    dz = doc.addVector(0, 0, 1)
+
+    ni = 15 
+    nj = 12
+    nk = 8
+
+    grid = doc.makeCartesian(orig, dx, dy, dz, ni, nj, nk)
+
+
+.. image:: _static/cartgrid3.png
+   :align: center
+
+.. centered::
+   Cartesian Grid
+
+
+GUI command: :ref:`guicartgrid`
diff --git a/doc/tui_component.rst b/doc/tui_component.rst
new file mode 100644 (file)
index 0000000..2e14385
--- /dev/null
@@ -0,0 +1,47 @@
+:tocdepth: 3
+
+
+.. _tuicomponent:
+
+=========
+Component
+=========
+
+Acces to HexaBlock component in python language::
+
+  import hexablock
+
+Add a new empty document in the session::
+
+    doc = hexablock.addDocument(name)
+
+
+Add a new document loaded from a "xml" file::
+
+    doc2 = hexablock.loadDocument(filename)
+
+Get the number of opened document in the session::
+
+    nd = hexablock.countDocument()
+
+Get the document number "i"::
+
+    doc_i = hexablock.getDocument(i)
+
+Remove a document in the session::
+
+    hexablock.removeDocument(doc_i)
+
+A tool to dump a model of block::
+
+    hexablock.dump(doc, [mesh, [full]])
+
+- doc: the document to dump
+- mesh: an optional mesh of this document
+- full:
+
+  - False: to have a short dump (by default)
+  - True: to have a full dump
+
+
+GUI command: :ref:`guicomponent`
diff --git a/doc/tui_cut_hexa.rst b/doc/tui_cut_hexa.rst
new file mode 100644 (file)
index 0000000..508a0f3
--- /dev/null
@@ -0,0 +1,37 @@
+:tocdepth: 3
+
+
+.. _tuicuthexa:
+
+=============
+Cut hexahedra
+=============
+
+Cut hexahedra from the model of blocks::
+
+    elts = doc.cut(an_edge, nb_of_cuts)
+
+This method enables to cut in two (or more) a series of hexahedra using a series of edges propagation.
+
+
+Example
+-------
+
+::
+
+    import hexablock 
+    doc = hexablock.addDocument()
+
+    size_x = 2
+    size_y = 1
+    size_z = 1
+
+    orig = doc.addVertex(0, 0, 0)
+    dirVr = doc.addVector(1, 1, 1)
+
+    grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0, 0) 
+    arete = grid.getEdgeK(0, 0, 0)
+
+    doc.cut(arete, 1)
+
+GUI command: :ref:`guicuthexa`
diff --git a/doc/tui_cyl.rst b/doc/tui_cyl.rst
new file mode 100644 (file)
index 0000000..245777d
--- /dev/null
@@ -0,0 +1,34 @@
+:tocdepth: 3
+
+
+.. _tuicylinder:
+
+========
+Cylinder
+========
+
+To add a cylinder, the following data have to be mentioned:
+
+- the coordinates of the cylinder base
+- the direction of the cylinder
+- height and radius of the cylinder
+
+
+Add a cylinder in the document::
+
+    cyl = doc.addCylinder(base, direction, radius, height)
+
+Get the values of a cylinder::
+
+    ver = cyl.getBase()
+    vec = cyl.getDirection()
+    r = cyl.getRadius()
+    h = cyl.getHeigth()
+
+Access to the cylinders of the document::
+
+    nc = doc.countCylinder()
+    cylk = doc.getCylinder(ind)
+
+
+GUI command: :ref:`guicylinder`
diff --git a/doc/tui_cylgrid.rst b/doc/tui_cylgrid.rst
new file mode 100644 (file)
index 0000000..0b68dc8
--- /dev/null
@@ -0,0 +1,81 @@
+:tocdepth: 3
+
+
+.. _tuicylgrid:
+
+======================
+Make cylindrical grids
+======================
+
+To add a cylindrical grid, the following data are required:
+
+- the coordinates (vertex) of the cylinder base center: *pt*
+- the vectors defining the axis and the direction of the cylinder: *vex, vez*
+- the radial, angular and axial sizes: *dr, da, dl*
+- the radial, angular and axial elements number: *nr, na, nl*
+- to fill or not the central part of hexahedra: *fill*
+
+Make a cylindrical grid::
+
+    elts = doc.makeCylindrical(pt, vex, vez, dr, da, dl, nr, na, nl, fill)
+
+
+The result is an array of hexahedra which are arranged along the
+radial axis first, then the angular axis, then according to the layers
+and then possibly hexahedra filling the central part.
+
+
+The filling the central part of the cylinder is made ​accordingly to the two following cases:
+
+.. image:: _static/cyl_grid2.PNG
+   :align: center
+
+.. centered::
+   Filling of the central part of the cylinder in the case the number of angular elements is odd na = 5.
+
+.. image:: _static/cyl_grid1.PNG
+   :align: center
+
+.. centered::
+   Filling of the central part of the cylinder in the case the number of angular elements is even na = 4.
+
+Example
+-------
+
+Filling rule is illustrated by different case-tests::
+
+        import hexablock
+        doc = hexablock.addDocument()
+
+        orig1 = doc.addVertex(0, 0, 0)
+        orig2 = doc.addVertex(10, 0, 0)
+        orig3 = doc.addVertex(0, 10, 0)
+        orig4 = doc.addVertex(10, 10, 0)
+        orig5 = doc.addVertex(0, 20, 0)
+        orig6 = doc.addVertex(10, 20, 0)
+
+        vz = doc.addVector(0, 0, 1)
+        vx = doc.addVector(1, 0, 0)
+
+        dr = 1
+        dl = 1
+        nr = 2
+        nl = 3
+
+        c1 = doc.makeCylindrical(orig1, vx, vz, dr, 360, dl, nr, 4, nl, True)
+        c2 = doc.makeCylindrical(orig2, vx, vz, dr, 360, dl, nr, 8, nl, True)
+        c3 = doc.makeCylindrical(orig3, vx, vz, dr, 270, dl, nr, 8, nl, True)
+        c4 = doc.makeCylindrical(orig4, vx, vz, dr, 270, dl, nr, 7, nl, True)
+        c5 = doc.makeCylindrical(orig5, vx, vz, dr, 360, dl, nr, 5, nl, True)
+        c6 = doc.makeCylindrical(orig6, vx, vz, dr, 360, dl, nr, 6, nl, True)
+
+
+
+.. image:: _static/cylgrids.png
+   :align: center
+
+.. centered::
+   Cylindrical Grids
+
+
+GUI command: :ref:`guicylgrid`
diff --git a/doc/tui_disc_elmts.rst b/doc/tui_disc_elmts.rst
new file mode 100644 (file)
index 0000000..f66c40a
--- /dev/null
@@ -0,0 +1,21 @@
+:tocdepth: 3
+
+.. _tuidisconnectelements:
+
+===================
+Disconnect elements
+===================
+
+Disconnect a quadrangle::
+
+    elts = doc.disconnectQuad(hexa, qua)
+
+Disconnect an edge::
+
+    elts = doc.disconnectEdge(hexa, edg)
+Disconnect a vertex::
+
+    elts = doc.disconnectVertex(hexa, ver)
+
+GUI command: :ref:`guidisconnectelements`
diff --git a/doc/tui_discret_law.rst b/doc/tui_discret_law.rst
new file mode 100644 (file)
index 0000000..71393e7
--- /dev/null
@@ -0,0 +1,72 @@
+:tocdepth: 3
+
+.. _tuidiscretelaw:
+
+==============================
+Define a law of discretization
+==============================
+
+Add a new law of discretization in the document::
+
+    law_1 = doc.addLaw(name, nb_nodes)
+
+Get the number of the law in the document::
+
+    nl = doc.countLaw()
+
+Get a law of the document::
+
+    law_i = doc.getLaw(i)
+
+Remove a law from the document::
+
+    doc.removeLaw(law_1)
+
+Find a law of discretization in the document::
+
+    law_1 = doc.findLaw(name)
+
+Get the name of the law::
+
+    name = law_1.getName()
+
+Change the name of the law::
+
+    law_1.setName(name)
+
+Get the number of nodes for the law of discretization::
+
+    nb = law_1.getNodes()
+
+Set the number of nodes for the law of discretization::
+
+    law_1.setNodes(nb)
+
+Get the kind of the law (uniform, arithmetic, geometric)::
+
+    kd = law_1.getKind()
+
+Set the kind of law of discretization::
+
+    law_1.setKind(kind)
+
+Get the coefficient of the law::
+
+    coef = law_1.getCoefficient()
+
+Set the coefficient of the law::
+
+    law_1.setCoefficent(coef)
+
+
+Get the default law. This law is applied when there is no law on a propagation::
+
+    default_law = doc.getLaw(0)
+
+It is possible to change the default law::
+
+    default_law.setNodes(10)
+
+And the default law is not removable
+
+GUI command: :ref:`guidiscretelaw`
diff --git a/doc/tui_document.rst b/doc/tui_document.rst
new file mode 100644 (file)
index 0000000..493772f
--- /dev/null
@@ -0,0 +1,34 @@
+:tocdepth: 3
+
+.. _tuidocument:
+
+========
+Document
+========
+
+Give the name of a document::
+
+    name = doc.getName()
+
+Set the name of a document::
+
+    doc.setName(name)
+
+Save a document in a "XML" file::
+
+    doc.save(filename)
+
+Save the model of blocks of a document in a "VTK" file::
+
+    doc.saveVtk(filename)
+
+Set the tolerance need to find element::
+
+    doc.setTolerance(0.0001)
+
+Get the tolerance::
+
+    tol = doc.getTolerance()
+
+
+GUI command: :ref:`guidocument`
diff --git a/doc/tui_edge.rst b/doc/tui_edge.rst
new file mode 100644 (file)
index 0000000..bf6193e
--- /dev/null
@@ -0,0 +1,38 @@
+:tocdepth: 3
+
+
+.. _tuiedge:
+
+=====
+Edges
+=====
+
+Manage the edges of the document.
+
+Add an edge in the document::
+
+    edge_12 = doc.addEdge(vertex_1, vertex_2)
+
+Get the number of all edges in the document::
+
+    sum_a = doc.countEdge()
+
+Get the number of edges used only in the model of blocks::
+
+    sum_u = doc.countUsedEdge()
+
+Get an edge of the document::
+
+    edge_i = doc.getEdge(i)
+
+Get the vertices of an edge::
+
+    vertex_a = edge_i.getVertex(0)
+    vertex_b = edge_i.getVertex(1)
+
+Find an edge in the document::
+
+    edge_f = doc.findEdge(vertex_1, vertex_2)
+
+
+GUI command: :ref:`guiedge`
diff --git a/doc/tui_elements.rst b/doc/tui_elements.rst
new file mode 100644 (file)
index 0000000..c05b111
--- /dev/null
@@ -0,0 +1,32 @@
+:tocdepth: 3
+
+
+.. _tuielements:
+
+========
+Elements
+========
+
+Add an empty set of elements::
+
+    elts = doc.addElements()
+
+Add an element in a set of elements::
+
+    elts.addElement(element)
+
+Remove an element in a set of elements::
+
+    elts.removeElement(element)
+
+Remove all elements in a set of elements::
+
+    elts.clearElement()
+
+Access to the elements of the document::
+    
+    nel = doc.countElements()
+    elts = doc.getElements(index)
+
+GUI command: :ref:`guielements`
+
diff --git a/doc/tui_groups.rst b/doc/tui_groups.rst
new file mode 100644 (file)
index 0000000..5c8ef24
--- /dev/null
@@ -0,0 +1,104 @@
+:tocdepth: 3
+
+.. _tuigroups:
+
+====================================
+Define groups on the model of blocks
+====================================
+
+Three kinds of group of meshing elements:
+
+- group of hexahedra:
+
+    HexaBlocks.HexaCell 
+
+- group of quadrangles:
+
+    HexaBlocks.QuadCell
+
+- group of edges: 
+
+    HexaBlocks.EdgeCell 
+
+Four kinds of group of nodes:
+
+- group of nodes in hexahedra:
+
+    HexaBlocks.HexaNode
+
+- group of nodes in quadrangles:
+
+    HexaBlocks.QuadNode
+
+- group of nodes in edges:
+
+    HexaBlocks.EdgeNode
+
+- group of nodes on vertices:
+
+    HexaBlocks.VertexNode
+
+
+
+Add a new group in the document::
+
+    grp = doc.addHexaGroup(name)
+    grp = doc.addQuadGroup(name)
+    grp = doc.addEdgeGroup(name)
+    grp = doc.addQuadNodeGroup(name)
+    grp = doc.addHexaNodeGroup(name)
+    grp = doc.addEdgeNodeGroup(name)
+    grp = doc.addVertexNodeGroup(name)
+
+Remove a group from the document::
+
+    doc.removeGroup(grp)
+
+Get the number of groups of the document::
+
+    ng = doc.countGroup()
+
+Get a group of the document::
+
+    grp = doc.getGroup(index)
+
+
+Find a group by his name in the document::
+
+    g = doc.findGroup(name)
+
+Get the name of a group::
+
+    name = grp.getName()
+
+Set the name of a group::
+
+    grp.setName(name)
+
+Get the kind of group among the 7 possibilities::
+
+    kind = grp.getKind()
+
+
+Add an element in a group::
+
+    grp.addElement(element)
+
+Get the number of elements of a group::
+
+    nb = grp.countElement()
+
+Get an element of a group::
+
+    el = grp.getElement(index)
+
+Remove an element of a group::
+
+    grp.removeElement(index)
+
+Clear all elements of a group::
+
+    grp.clearElement()
+
+
+GUI command: :ref:`guigroups`
diff --git a/doc/tui_hexahedron.rst b/doc/tui_hexahedron.rst
new file mode 100644 (file)
index 0000000..e9e4210
--- /dev/null
@@ -0,0 +1,28 @@
+:tocdepth: 3
+
+.. _tuihexahedron:
+
+==========
+Hexahedron
+==========
+
+Manage the hexahedral of the document.
+
+
+Add an hexahedron in the document::
+
+    hexa_1 = doc.addHexa(q_A, q_B, q_C, q_D, q_E, q_F)
+
+    hexa_2 = doc.addHexaVertices(ACE, ACF, ADE, ADF, BCE, BCF, BDE, DBF)
+
+Notice: the arguments follow the convention explain in :ref:`annexe`
+
+Get the number of all hexahedra of the document::
+
+    sum_a = doc.countHexa()
+
+Get an hexahedron of the document::
+
+    hexa_i = doc.getHexa(i)
+
+GUI command: :ref:`guihexahedron`
diff --git a/doc/tui_make_elmts.rst b/doc/tui_make_elmts.rst
new file mode 100644 (file)
index 0000000..d12c812
--- /dev/null
@@ -0,0 +1,42 @@
+:tocdepth: 3
+
+.. _tuimakeelements:
+
+======================================
+Make elements by transforming elements
+======================================
+
+Rotate and translate for any kind of elements::
+
+    elts = doc.makeTranslation(element, vec)
+    elts = doc.makeRotation(element, ver, vec, angle)
+
+and "element" could be Vertex, Edge, Quadrangle, Hexahedeon, Vector, Cylinder,
+Pipe and Elements and the result "elts" is always an object of type
+"Elements".
+
+Example
+-------
+
+::
+
+  import hexablock
+  doc = hexablock.addDocument()
+
+  size_x = 1
+  size_y = 1
+  size_z = 2
+
+  orig = doc.addVertex(0, 0, 0)
+  dirVr = doc.addVector(1, 1, 1)
+
+  grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0, 0)
+  orig.setScalar(2)
+
+  devant = doc.addVector(5, 0, 0)
+  grid2 = doc.makeTranslation(grid, devant)
+
+  grid4 = doc.makeRotation(grid2, orig, dirVr, 45)
+
+
+GUI command: :ref:`guimakeelements`
diff --git a/doc/tui_merge_elmts.rst b/doc/tui_merge_elmts.rst
new file mode 100644 (file)
index 0000000..673df23
--- /dev/null
@@ -0,0 +1,42 @@
+:tocdepth: 3
+
+.. _tuimergeelements:
+
+============== 
+Merge elements
+==============
+
+
+Merge 2 quadrangles::
+
+    l = doc.mergeQuads(qa, qb, va1, vb1, va2, vb2)
+where:
+
+- qa and qb are quadrangles. qa is the target quadrangle.
+- va1, vb1, va2, vb2 are vertices
+
+va1 : vertex of the quadrangle qa to merge with the vertex vb1 of the
+quadrangle qb.
+va2 : vertex of the quadrangle qa to merge with the vertex vb2 of the
+quadrangle qb.
+
+va1, vb1, va2, vb2 can be set to `None` if the quadrangles are contiguous.
+
+Merge 2 edges::
+
+    l = doc.mergeEdges(e1, e2, v1, v2)
+
+where:
+
+- e1 and e2 are edges
+- v1 is the vertex of the edge e1 to merge with the vertex v2 of the edge e2
+
+
+Merge 2 vertices::
+
+    l = doc.mergeVertices(v1, v2)
+
+where v1 and v2 are vertices.
+
+GUI command: :ref:`guimergeelements`
diff --git a/doc/tui_mesh.rst b/doc/tui_mesh.rst
new file mode 100644 (file)
index 0000000..b4fbf5b
--- /dev/null
@@ -0,0 +1,26 @@
+:tocdepth: 3
+
+.. _tuimesh:
+
+
+=================
+Generate the mesh
+=================
+
+Use the SMESH component of SALOME::
+
+    import smesh
+    m = hexablock.mesh(name, doc)
+
+Export to a MED file::
+
+    m.ExportMED("/tmp/mesh.med")
+
+Get some information about the mesh::
+
+    print "Number of hexahedra: ", m.NbHexas()
+    print "Number of quadrangles: ", m.NbQuadrangles()
+    print "Number of segments: ", m.NbEdges()
+    print "Number of nodes: ", m.NbNodes()
+
+GUI command: :ref:`guimesh`
diff --git a/doc/tui_modify_elmts.rst b/doc/tui_modify_elmts.rst
new file mode 100644 (file)
index 0000000..8092cd9
--- /dev/null
@@ -0,0 +1,15 @@
+:tocdepth: 3
+
+.. _tuimodifyelements:
+
+
+========================================
+Modify elements by transforming elements
+========================================
+
+Translate and Rotate for any kind of elements::
+
+    doc.performTranslation(elements, vec)
+    doc.performRotation(elements, ver, vec, angle)
+
+GUI command: :ref:`guimodifyelements`
diff --git a/doc/tui_pipe.rst b/doc/tui_pipe.rst
new file mode 100644 (file)
index 0000000..30b231b
--- /dev/null
@@ -0,0 +1,36 @@
+:tocdepth: 3
+
+
+.. _tuipipe:
+
+====
+Pipe
+====
+To add a pipe, the following data have to be mentioned:
+
+- the coordinates of the pipe base
+- the direction of the pipe
+- height and radius of the pipe
+- the inner radius
+- the outer radius
+
+Add a pipe in the document::
+
+    p = doc.addPipe(base, direction, int_radius, ext_radius, height)
+
+Get the values of a pipe::
+
+    ver = p.getBase()
+    vec = p.getDirection()
+    int_r = p.getInternal_radius()
+    ext_r = p.getRadius()
+    h = p.getHeight()
+
+Access to the pipes of the document::
+
+    np = doc.countPipe()
+    pik = doc.getPipe(index)
+
+
+GUI command: :ref:`guipipe`
+
diff --git a/doc/tui_prism_join_quad.rst b/doc/tui_prism_join_quad.rst
new file mode 100644 (file)
index 0000000..07b3e24
--- /dev/null
@@ -0,0 +1,124 @@
+:tocdepth: 3
+
+
+.. _tuiprismjoinquad:
+
+
+========================== 
+Prism and join quadrangles
+==========================
+
+There are two different methods to build hexahedra from quadrangles:
+
+- prism from quadrangles
+- join two sets of quadrangles
+
+Prism from a quadrangle or quadrangles
+======================================
+
+::
+
+    elts = doc.prismQuad(quad, vec, nb)
+
+    elts = doc.prismQuads([ q1, q2, q3 ], vec, nb)
+
+From a list of quadrangles, a set of hexahedra is created. Given the
+arbitrary nature of the start list, we can not provide additional
+information on the order of the intermediate elements (vertices,
+edges, quads) that contains the container-like Elements.
+
+Example
+-------
+
+::
+
+ import hexablock
+ doc = hexablock.addDocument()
+
+ orig = doc.addVertex(0, 0, 0)
+ dx = doc.addVector(1, 0, 0)
+ dy = doc.addVector(0, 1, 0)
+ dz = doc.addVector(0, 0, 1)
+
+ dimx = 11
+ dimy = 11
+ dimz = 2
+ grid = doc.makeCartesian(orig, dx, dy, dz, dimx, dimy, dimz)
+
+ mx = dimx/2
+ my = dimy/2
+ prems = grid.getQuadIJ(mx, my, dimz)
+
+ liste = [prems]
+ liste.extend([grid.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
+ liste.extend([grid.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
+
+ vec = doc.addVector(1, 1, 1)
+ elts = doc.prismQuads(liste, vec, 5) 
+
+.. image:: _static/prisme.png
+   :align: center
+
+.. centered::
+   Prism Quads
+
+
+
+Join 2 sets of quadrangles
+==========================
+
+::
+
+    elts = doc.joinQuad(qa, qb, va1, vb1, va2, vb2, nb)
+
+    elts = doc.joinQuads([ qa1, qa2 ], qb, va1, vb1, va2, vb2, nb)
+
+Example
+-------
+
+::
+
+ import hexablock
+ doc = hexablock.addDocument()
+
+ orig1 = doc.addVertex(0, 0, 0)
+ dx = doc.addVector(1, 0, 0)
+ dy = doc.addVector(0, 1, 0)
+ dz = doc.addVector(0, 0, 1)
+
+ dimx = 11
+ dimy = 11
+ dimz = 2
+ grid1 = doc.makeCartesian(orig1, dx, dy, dz, dimx, dimy, dimz)
+
+ orig2 = doc.addVertex(dimx/2.0, 0, 8)
+ grid2 = doc.makeCylindrical(orig2, dx, dy, 1, 180, 1, dimz, dimy,
+                             dimx, False)
+
+ mx = dimx/2
+ my = dimy/2
+ prems = grid1.getQuadIJ(mx, my, dimz)
+ cible = grid2.getQuadJK(dimz, mx, my)
+
+ v1 = prems.getVertex(0)
+ v3 = prems.getVertex(1)
+ v2 = cible.getVertex(1)
+ v4 = cible.getVertex(2)
+
+ liste = [prems]
+ liste.extend([grid1.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
+ liste.extend([grid1.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
+
+ height = 5
+
+ elts = doc.joinQuads(liste, cible, v1, v2, v3, v4, height) 
+
+
+.. image:: _static/join.png
+   :align: center
+
+.. centered::
+   Join Quads
+
+
+GUI command: :ref:`guiprismjoinquad`
diff --git a/doc/tui_propag.rst b/doc/tui_propag.rst
new file mode 100644 (file)
index 0000000..effc2ac
--- /dev/null
@@ -0,0 +1,47 @@
+:tocdepth: 3
+
+.. _tuipropag:
+
+=============================================
+Discretization defined on the model of blocks
+=============================================
+
+Get the number of propagation existing on the model of blocks::
+
+    np = doc.countPropagation()
+
+Get a propagation of the model of blocks::
+
+    propa = doc.getPropagation(index)
+
+Find a propagation by an edge of the model of blocks::
+
+    propa = doc.findPropagation(edge)
+
+Get all edges of the propagation and the way in the propagation::
+
+    edges = propa.getEdges()
+    bo = propa.getWay()
+
+Set a law of discretization for a propagation::
+
+    propa.setLaw(law)
+
+Get the law of the propagation for a propagation::
+
+    law = propa.getLaw()
+
+Set the way where the law is applied on the propagation::
+
+    propa.setWay(bo)
+
+
+Example
+-------
+
+::
+
+  import hexablock
+  doc = hexablock.addDocument()
+
+GUI command: :ref:`guipropag`
diff --git a/doc/tui_quadrangle.rst b/doc/tui_quadrangle.rst
new file mode 100644 (file)
index 0000000..bf802eb
--- /dev/null
@@ -0,0 +1,43 @@
+:tocdepth: 3
+
+
+.. _tuiquadrangles:
+
+===========
+Quadrangles
+===========
+
+Manage the quadrangles of the document.
+
+Add a quadrangle in the document::
+
+    quad_1 = doc.addQuad(edge_1, edge_2, edge_3, edge_4)
+    quad_2 = doc.addQuadVertices(vertex_1, vertex_2, vertex_3, vertex_4)
+
+Notice: the vertices and edges follow the outline of the quadrangle.
+
+Get the number of all quadrangles of the document::
+
+    sum_a = doc.countQuad()
+
+Get the number of used quadrangles in the model of blocks::
+
+    sum_u = doc.countUsedQuad()
+
+Get a quadrangle of the document::
+
+    quad_i = doc.getQuad(i)
+
+Get an edge of a quadrangle::
+
+    edge_e = quad_i.getEdge(0 or 1 or 2 or 3)
+
+Get a vertex of a quadrangle::
+    vertex_v = quad_i.getVertex(0 or 1 or 2 or 3)
+Find a quadrangle in the document::
+    quad_f = doc.findQuad(vertex_1, vertex_2)
+
+GUI command: :ref:`guiquadrangles`
diff --git a/doc/tui_remove.rst b/doc/tui_remove.rst
new file mode 100644 (file)
index 0000000..fd4c7dd
--- /dev/null
@@ -0,0 +1,24 @@
+:tocdepth: 3
+
+
+.. _tuiremove:
+
+================
+Remove hexahedra
+================
+
+Remove one hexahedra of the model of blocks::
+
+    doc.removeHexa(hexa)
+
+Remove all hexahedra connected of the model of blocks::
+
+    doc.removeConnectedHexa(hexa)
+
+
+.. image:: _static/remove3.PNG
+   :align: center
+
+
+GUI command: :ref:`guiremove`
+
diff --git a/doc/tui_sphergrid.rst b/doc/tui_sphergrid.rst
new file mode 100644 (file)
index 0000000..93b02f6
--- /dev/null
@@ -0,0 +1,52 @@
+:tocdepth: 3
+
+
+.. _tuisphergrid:
+
+====================
+Make spherical grids
+====================
+
+
+To add a spherical grid, the following data are required:
+
+- the center (vertex) of the central hexahedron: *pt*
+- the vector corresponding to the diametrically opposite vertex to the
+  initial vertex: *dv*
+- the number of embedded hexahedra: *n*
+- the coefficient of growth:*k*
+
+
+Make a spherical grid::
+
+    elts = doc.makeSpherical(pt, dv, n, k)
+
+The result is an array of hexahedra starting with the central and
+other hexahedral are arranged layer by layer from the center. Each
+layer contains six hexahedral always in the following order: two along
+the X axis, then 2 for the Y axis and 2 for the Z axis.
+
+
+Example
+-------
+
+::
+
+ import hexablock
+ doc = hexablock.addDocument()
+
+ orig = doc.addVertex(0, 0, 0)
+
+ direction = doc.addVector(1, 1, 1)
+
+ dx = doc.addVector(1, 0, 0)
+ dy = doc.addVector(0, 1, 0)
+ dz = doc.addVector(0, 0, 1)
+
+ n = 2
+ k = 0.8
+
+ grid = doc.makeSpherical(orig, direction, n, k)
+
+
+GUI command: :ref:`guisphergrid`
diff --git a/doc/tui_vector.rst b/doc/tui_vector.rst
new file mode 100644 (file)
index 0000000..100df94
--- /dev/null
@@ -0,0 +1,28 @@
+:tocdepth: 3
+
+.. _tuivector:
+
+======
+Vector
+======
+
+Add a vector in the document::
+
+     vector_1 = doc.addVector(dx, dy, dz)
+     vector_2 = doc.addVectorVertices(vertex_1, vertex_2)
+
+Get the values of a vector::
+
+    dx = vector_1.getDX()
+    dy = vector_1.getDY()
+    dz = vector_1.getDZ()
+
+Get the number of vector in the document::
+
+     sum = doc.countVector()
+
+Get a vector of the document::
+
+     vector_i = doc.getVector(i)
+
+GUI command: :ref:`guivector`
diff --git a/doc/tui_vertex.rst b/doc/tui_vertex.rst
new file mode 100644 (file)
index 0000000..ad4a3ef
--- /dev/null
@@ -0,0 +1,45 @@
+:tocdepth: 3
+
+.. _tuivertex:
+
+========
+Vertices
+========
+
+Manage the vertices of the model of blocks of a document.
+
+
+Add a new vertex of the model of blocks in the document::
+
+    vertex_1 = doc.addVertex(x, y, z)
+
+Get the number of all vertices of the document::
+
+    sum_a = doc.countVertex()
+
+Get the number of vertices used only by the model of blocks::
+
+    sum_u = doc.countUsedVertex()
+
+Get a vertex of the document::
+
+    vertex_i = doc.getVertex(i)
+
+Get the coordinates of a vertex::
+
+    x = vertex_i.getX()
+    y = vertex_i.getY()
+    z = vertex_i.getZ()
+
+Set the coordinates of a vertex::
+
+    vertex_i.setX(x1)
+    vertex_i.setY(y1)
+    vertex_i.setZ(z1)
+
+Find a vertex in the document (with a tolerance)::
+
+    vertex_f = doc.findVertex(x, y, z)
+
+
+GUI command: :ref:`guivertex`
diff --git a/idl/CrossElements.idl b/idl/CrossElements.idl
new file mode 100755 (executable)
index 0000000..e9a17bc
--- /dev/null
@@ -0,0 +1,59 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __CrossElements_idl__
+#define __CrossElements_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+#include "Hexa.idl"
+#include "Cylinder.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+
+//   interface CrossElements : Elements
+  interface CrossElements: Element
+  {
+      Hexa getHexaIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadIJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadIK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeI(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Vertex getVertexIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+
+      // Tutaux en T (like castles in scotland)
+      long crossCylinders (in Cylinder cyl1, in Cylinder cyl2) raises (SALOME::SALOME_Exception);
+
+      long saveVtk( in string fname );//CS_NOT_SPEC
+  };
+
+};
+
+#endif
diff --git a/idl/Cylinder.idl b/idl/Cylinder.idl
new file mode 100755 (executable)
index 0000000..ea5943b
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Cylinder_idl__
+#define __Cylinder_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Vector.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Cylinder : Element
+    {
+        Vertex getBase() raises (SALOME::SALOME_Exception);
+        Vector getDirection() raises (SALOME::SALOME_Exception);
+        double getRadius() raises (SALOME::SALOME_Exception);
+        double getHeight() raises (SALOME::SALOME_Exception);
+
+//         long saveVtk( in string fname );//CS_NOT_SPEC
+    };
+};
+
+#endif
+
diff --git a/idl/Document.idl b/idl/Document.idl
new file mode 100755 (executable)
index 0000000..39de1e2
--- /dev/null
@@ -0,0 +1,585 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Document_idl__
+#define __Document_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Edge.idl"
+#include "Hexa.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+
+  interface Element;
+  interface Vertex;
+  interface Edge;
+  interface Quad;
+  interface Hexa;
+  interface Vector;
+  interface Cylinder;
+  interface Pipe;
+  interface Elements;
+  interface CrossElements;
+  interface Law;
+  interface Group;
+  interface Propagation;
+
+  typedef sequence<Quad>    Quads;
+  typedef sequence<double>  RealVector;
+  typedef GEOM::GEOM_Object  Shape;
+  typedef sequence<GEOM::GEOM_Object>  Shapes;
+
+  interface Document : SALOME::GenericObj
+  {
+    void purge()
+      raises (SALOME::SALOME_Exception);
+
+    void dump()
+      raises (SALOME::SALOME_Exception);
+    /*!
+    */
+    string getName()
+      raises (SALOME::SALOME_Exception);
+
+    long setName (in string name )
+      raises (SALOME::SALOME_Exception);
+
+    long save( in string fileName )
+      raises (SALOME::SALOME_Exception);
+
+    long saveVtk( in string fname );
+
+    void setLevel (in long debug_level )
+      raises (SALOME::SALOME_Exception);
+
+
+    /*!
+    */
+    void setTolerance( in double tol ) raises (SALOME::SALOME_Exception);
+    double getTolerance() raises (SALOME::SALOME_Exception);
+
+    /*!
+        Sommets
+    */
+    Vertex addVertex( in double x, in double y, in double z )
+        raises (SALOME::SALOME_Exception);
+
+    long countVertex()
+        raises (SALOME::SALOME_Exception);
+
+    Vertex getVertex( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Vertex findVertex( in double x, in double y, in double z )
+        raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Arêtes
+    */
+    Edge addEdge( in Vertex v0, in Vertex v1 )
+        raises (SALOME::SALOME_Exception);
+
+    long countEdge()
+        raises (SALOME::SALOME_Exception);
+
+    Edge getEdge( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Edge findEdge( in Vertex p1, in Vertex p2 )
+        raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Quadrangles
+    */
+    Quad addQuad( in Edge e0, in Edge e1, in Edge e2, in Edge e3 )
+        raises (SALOME::SALOME_Exception);
+
+    Quad addQuadVertices( in Vertex v0, in Vertex v1, in Vertex v2, in Vertex v3 )
+        raises (SALOME::SALOME_Exception);
+
+    long countQuad()
+        raises (SALOME::SALOME_Exception);
+
+    Quad getQuad( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Quad findQuad( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Hexaèdre
+    */
+    Hexa addHexa( in Quad q0, in Quad q1, in Quad q2, in Quad q3, in Quad q4, in Quad q5 )
+        raises (SALOME::SALOME_Exception);
+
+    Hexa addHexaVertices( in Vertex v1, in Vertex v2, in Vertex v3, in Vertex v4,
+                  in Vertex v5, in Vertex v6, in Vertex v7, in Vertex v8 )
+        raises (SALOME::SALOME_Exception);
+
+    long countHexa()
+        raises (SALOME::SALOME_Exception);
+
+    Hexa getHexa( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Hexa findHexa( in Vertex p1, in Vertex p2 )
+        raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Vecteurs
+    */
+    Vector addVector( in double dx, in double dy, in double dz )
+        raises (SALOME::SALOME_Exception);
+
+    Vector addVectorVertices( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);
+
+//     long countVector()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Vector getVector( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Cylindre
+    */
+    Cylinder addCylinder( in Vertex base, in Vector direction, in double radius, in double height )
+        raises (SALOME::SALOME_Exception);
+
+//     long countCylinder()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Cylinder getCylinder( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Pipe
+    */
+    Pipe addPipe( in Vertex base, in Vector direction,
+                  in double int_radius, in double ext_radius, 
+                  in double height )
+        raises (SALOME::SALOME_Exception);
+
+//     long countPipe()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Pipe getPipe( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Remove block
+    */
+    boolean removeHexa( in Hexa h )
+        raises (SALOME::SALOME_Exception);
+
+    boolean removeConnectedHexa( in Hexa h )
+        raises (SALOME::SALOME_Exception);
+
+   /*!
+       Grille cartésiennes
+   */
+    Elements makeCartesian( in Vertex pt, 
+            in Vector vx, in Vector vy, in Vector vz,
+            in long nx, in long ny, in long nz)
+        raises (SALOME::SALOME_Exception);
+
+    Elements makeCartesian1( in Vertex v, 
+            in Vector v1,
+            in long px, in long py, in long pz,
+            in long mx, in long my, in long mz )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Grille cylindrique
+    */
+    Elements makeCylindrical( in Vertex pt,
+          in Vector vex, in Vector vez,
+          in double dr, in double da, in double dl,
+          in long nr, in long na, in long nl,
+          in boolean fill )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Grille cylindrique (variante)
+    */
+    Elements makeCylindricals( in Vertex pt,
+          in Vector vex, in Vector vez,
+          in RealVector tdr, in RealVector tda, in RealVector tdl,
+          in boolean fill )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Grille sphérique
+    */
+
+    Elements makeSpherical( in Vertex pt,
+        in double rayon,
+        in long n,
+        in double k )
+        raises (SALOME::SALOME_Exception); //CS_TO_DEL
+
+
+    /*!
+        Cylindre découpé en blocs
+    */
+//     Elements makeCylinder( in Cylinder cyl, in long nr, in long na, in long nl )
+//         raises (SALOME::SALOME_Exception);//CS_TODO
+    Elements makeCylinder( in Cylinder cyl, in Vector vr, in long nr, in long na, in long nl )
+        raises (SALOME::SALOME_Exception);//CS_NEW CS_NOT_SPEC
+   
+
+    /*!
+        Tuyau decoupe en blocs
+    */
+    Elements makePipe( in Pipe p, in Vector v, in long nr, in long na, in long nl )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        2 Cylindres en T decoupes en blocs
+    */
+    CrossElements makeCylinders( in Cylinder c1, in Cylinder c2 )
+      raises (SALOME::SALOME_Exception);//CS_NEW CS_NOT_SPEC
+
+    /*!
+        2 Tuyau decoupe en intersection decoupees en blocs
+    */
+    Elements makePipes( in Pipe p1, in Pipe p2 )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Prismer des quadrangles
+    */
+    Elements prismQuad( in Quad qd, in Vector v, in long nb )
+        raises (SALOME::SALOME_Exception);
+
+    Elements prismQuads( in Quads qds, in Vector v, in long nb )
+        raises (SALOME::SALOME_Exception);
+
+    Elements prismQuadsVec (in Quads qds, in Vector v, in RealVector thaut, 
+                            in long opt )
+        raises (SALOME::SALOME_Exception);
+
+    Elements joinQuad( in Quad qa, in Quad qb,
+                       in Vertex va1, in Vertex vb1,
+                       in Vertex va2, in Vertex vb2,
+                       in long nb )
+        raises (SALOME::SALOME_Exception);
+
+    Elements joinQuads( in Quads qds,
+                        in Quad qb,
+                        in Vertex va1, in Vertex vb1,
+                        in Vertex va2, in Vertex vb2,
+                        in long nb )
+        raises (SALOME::SALOME_Exception);
+
+                // HexaBlock V3
+    Elements revolutionQuads( in Quads qds, in Vertex ori, in Vector dir, 
+                              in RealVector angles)
+        raises (SALOME::SALOME_Exception); 
+
+    Elements replace( in Quads qds, in Vertex p1, in Vertex c1,
+                      in Vertex p2, in Vertex c2, in Vertex p3, in Vertex c3)
+        raises (SALOME::SALOME_Exception); 
+
+    Elements makeSphere (in Vertex center, in Vector vx, in Vector vz, 
+                         in double radius, in double radhole,
+                         in Vertex plorig, 
+                         in long nrad, in long nang, in long nhaut)
+        raises (SALOME::SALOME_Exception); 
+
+    Elements makePartSphere (in Vertex center, in Vector vx, in Vector vz, 
+                             in double  radius, in double radhole,
+                             in Vertex plorig, in double angle,
+                             in long nrad, in long nang, in long nhaut)
+        raises (SALOME::SALOME_Exception); 
+
+    Elements makeRind (in Vertex center, in Vector vx, in Vector vz, 
+                       in double  radext, in double radint, in double radhole,
+                       in Vertex plorig, 
+                       in long nrad, in long nang, in long nhaut)
+        raises (SALOME::SALOME_Exception); 
+
+    Elements makePartRind (in Vertex center, in Vector vx, in Vector vz, 
+                         in double  radext, in double radint, in double radhole,
+                         in Vertex plorig, in double angle,
+                         in long nrad, in long nang, in long nhaut)
+        raises (SALOME::SALOME_Exception); 
+// 
+// 
+//     /*!
+//         Fusionner 2 Ã©léments de même nature //CS_NOT_SPEC
+//     */
+
+//     Elements mergeQuads( in Quad qa, in Quad qb,
+//                         in Vertex va1, in Vertex vb1,
+//                         in Vertex va2, in Vertex vb2 )
+//         raises (SALOME::SALOME_Exception);
+
+    long mergeQuads( in Quad qa, in Quad qb,
+                        in Vertex va1, in Vertex vb1,
+                        in Vertex va2, in Vertex vb2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+// 
+//     Elements mergeEdges( in Edge e1, in Edge e2,
+//                         in Vertex v1, in Vertex v2 )
+//         raises (SALOME::SALOME_Exception);
+
+    long mergeEdges( in Edge e1, in Edge e2,
+                        in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+//     Elements mergeVertices( in Vertex v1, in Vertex v2 )
+//         raises (SALOME::SALOME_Exception);
+    long mergeVertices( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+
+    /*!
+        Deconnecter des elements du modele
+    */
+    Elements disconnectQuad( in Hexa h, in Quad q ) 
+        raises (SALOME::SALOME_Exception);
+
+    Elements disconnectEdge( in Hexa h, in Edge e )
+       raises (SALOME::SALOME_Exception);
+
+    Elements disconnectVertex( in Hexa h,  in Vertex v )
+        raises (SALOME::SALOME_Exception);
+
+    Elements disconnectEdges( in Hexas th, in Edges te )
+       raises (SALOME::SALOME_Exception);
+
+    /*!
+        Couper des hexaèdres du modèle
+    */
+    Elements cut( in Edge e, in long nb_of_cuts )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Make elements by transforming elements
+    */
+//     Elements makeTranslation( in Elements e, in Vector vec )
+//         raises (SALOME::SALOME_Exception);
+    Elements makeTranslation( in Elements l, in Vector vec )
+        raises (SALOME::SALOME_Exception);
+// 
+// 
+    Elements makeRotation (in Elements l, in Vertex ver, in Vector vec, in double angle)
+        raises (SALOME::SALOME_Exception);
+    Elements makeScale (in Elements e, in Vertex ver, in double k )
+        raises (SALOME::SALOME_Exception);
+
+    Elements makeSymmetryPoint (in Elements e, in Vertex ver)
+        raises (SALOME::SALOME_Exception);
+
+    Elements makeSymmetryLine (in Elements e, in Vertex ver, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+    Elements makeSymmetryPlane (in Elements e, in Vertex ver, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+    Modify elements by transforming elements
+    */
+//     void performTranslation(in Elements e, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+
+    void performTranslation(in Elements l, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+// 
+    void performRotation(in Elements l, in Vertex ver, in Vector vec, in double angle)
+        raises (SALOME::SALOME_Exception);
+// 
+    void performScale(in Elements e, in Vertex ver, in double k)
+        raises (SALOME::SALOME_Exception);
+
+    void performSymmetryPoint(in Elements e, in Vertex ver)
+        raises (SALOME::SALOME_Exception);
+
+    void performSymmetryLine(in Elements e, in Vertex ver, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+
+    void performSymmetryPlane(in Elements e, in Vertex ver, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+// 
+//     /*!
+//                     --------
+//                     MAILLAGE
+//                     --------
+//     */
+// 
+//     /*!
+//         Créer, Ã©diter et supprimer un groupe
+//     */
+//     HexaGroup addHexaGroup( in string name )
+    Group addHexaGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     QuadGroup addQuadGroup( in string name )
+    Group addQuadGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     EdgeGroup addEdgeGroup( in string name )
+    Group addEdgeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     HexaNodeGroup addHexaNodeGroup( in string name )
+    Group addHexaNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     QuadNodeGroup addQuadNodeGroup( in string name )
+    Group addQuadNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     EdgeNodeGroup addEdgeNodeGroup( in string name )
+    Group addEdgeNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     VertexNodeGroup addVertexNodeGroup( in string name )
+    Group addVertexNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+    long removeGroup( in Group g)
+        raises (SALOME::SALOME_Exception);
+
+    long countGroup()
+      raises (SALOME::SALOME_Exception);
+
+    Group getGroup( in long i )
+      raises (SALOME::SALOME_Exception);
+
+    Group findGroup( in string name )
+      raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Définir une loi de discrétisation
+    */
+    Law addLaw( in string name, in long nb_nodes )
+        raises (SALOME::SALOME_Exception);
+
+    long countLaw()
+        raises (SALOME::SALOME_Exception);
+
+    Law getLaw( in long i )
+      raises (SALOME::SALOME_Exception);
+
+    void removeLaw( in Law l )
+        raises (SALOME::SALOME_Exception);
+
+    Law findLaw( in string name )
+      raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Discretization defined on the model of blocks 
+    */
+    long countPropagation()
+        raises (SALOME::SALOME_Exception);
+
+    Propagation getPropagation( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Propagation findPropagation( in Edge e )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Association on lines
+    */
+   long associateOpenedLine (in Edge mstart, in Edges mline, in Shape gstart, 
+                             in double pstart, in Shapes gline, in double pend)
+        raises (SALOME::SALOME_Exception);
+
+   long associateClosedLine (in Vertex mfirst, in Edge mstart, in Edges  mline, 
+                            in Shape  gstart, in double pstart, in boolean inv,
+                            in Shapes gline)
+        raises (SALOME::SALOME_Exception);
+
+   void setShape (in GEOM::GEOM_Object geom_object_vertex )
+            raises (SALOME::SALOME_Exception);
+
+   GEOM::GEOM_Object getShape ()
+            raises (SALOME::SALOME_Exception);
+   string getBrep ()
+            raises (SALOME::SALOME_Exception);
+
+//       Ajouts 05/09/20011
+
+    long countUsedVertex()
+        raises (SALOME::SALOME_Exception);
+    long countUsedEdge()
+        raises (SALOME::SALOME_Exception);
+    long countUsedQuad()
+        raises (SALOME::SALOME_Exception);
+    long countUsedHexa()
+        raises (SALOME::SALOME_Exception);
+
+    Vertex getUsedVertex( in long i )
+        raises (SALOME::SALOME_Exception);
+    Edge getUsedEdge( in long i )
+        raises (SALOME::SALOME_Exception);
+    Quad getUsedQuad( in long i )
+        raises (SALOME::SALOME_Exception);
+    Hexa getUsedHexa( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Hexa addHexa5Quads (in Quad q1, in Quad q2, in Quad q3, in Quad q4, 
+                        in Quad q5) raises (SALOME::SALOME_Exception);
+    Hexa addHexa4Quads ( in Quad q1, in Quad q2, in Quad q3, in Quad q4)
+         raises (SALOME::SALOME_Exception);
+    Hexa addHexa3Quads ( in Quad q1, in Quad q2, in Quad q3)
+         raises (SALOME::SALOME_Exception);
+    Hexa addHexa2Quads ( in Quad q1, in Quad q2)
+         raises (SALOME::SALOME_Exception);
+
+    boolean removeQuad( in Quad q )
+        raises (SALOME::SALOME_Exception);
+    boolean removeElements( in Elements b )
+        raises (SALOME::SALOME_Exception);
+
+    void clearAssociation ()
+      raises (SALOME::SALOME_Exception);
+  };
+};
+
+
+#endif
+
diff --git a/idl/Edge.idl b/idl/Edge.idl
new file mode 100755 (executable)
index 0000000..292d4ed
--- /dev/null
@@ -0,0 +1,85 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Edge_idl__
+#define __Edge_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+
+  struct EdgeAssociation
+  {
+    GEOM::GEOM_Object geomObj;
+    double debut;
+    double fin;
+  };
+
+  typedef sequence<EdgeAssociation>  EdgeAssociations;
+
+  interface Edge : Element
+  {
+    Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception);
+    boolean getWay() raises (SALOME::SALOME_Exception);
+
+    long addAssociation (in GEOM::GEOM_Object geom_object_1D, in double debut, in double val ) //CS_NOT_SPEC
+      raises (SALOME::SALOME_Exception);
+
+      void clearAssociation ( ) 
+          raises (SALOME::SALOME_Exception);
+
+//     sequence<EdgeAssociation> getAssociations() //CS_NOT_SPEC
+    EdgeAssociations getAssociations() //CS_NOT_SPEC CS_WARNING: not working when reloading a document
+      raises (SALOME::SALOME_Exception);
+
+//     void addAssociation( in GEOM::GEOM_Object geom_object_1D, in double debut, in double val )
+//       raises (SALOME::SALOME_Exception);
+//     GEOM_Objects getAssociations() raises (SALOME::SALOME_Exception);
+
+//     GEOM_Objects GEOM::GEOM_Object getAssociation()
+//             raises (SALOME::SALOME_Exception);
+
+//     void removeAssociation()
+//             raises (SALOME::SALOME_Exception);
+
+     void setScalar( in double val ) //CS_NOT_SPEC
+       raises (SALOME::SALOME_Exception);
+
+  };
+
+  typedef sequence<Edge>  Edges;
+
+
+};
+
+#endif
diff --git a/idl/Element.idl b/idl/Element.idl
new file mode 100755 (executable)
index 0000000..beeba4d
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Element_idl__
+#define __Element_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+  interface Element : SALOME::GenericObj
+  {
+      void dump ()                    raises (SALOME::SALOME_Exception);
+      void printName ()               raises (SALOME::SALOME_Exception);
+      string getName ()               raises (SALOME::SALOME_Exception);
+      void   setName (in string name) raises (SALOME::SALOME_Exception);
+  };
+
+
+
+};
+
+#endif
diff --git a/idl/Elements.idl b/idl/Elements.idl
new file mode 100755 (executable)
index 0000000..94e1078
--- /dev/null
@@ -0,0 +1,171 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Elements_idl__
+#define __Elements_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+#include "Hexa.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+
+//   enum EnumCoord { dir_x, dir_y, dir_z, DIM3 };
+  // enum EnumVertex { V_AMONT, V_AVAL, V_TWO };
+  // enum EnumQuad   { E_A, E_B, E_C, E_D, QUAD4 };
+
+            //      z=0   z=1   y=0   y=1   x=0  x=1
+  // enum EnumHQuad   {Q_A,  Q_B,  Q_C,  Q_D,  Q_E, Q_F,  HQ_MAXI};
+  // enum EnumHEdge   {E_AC, E_AD, E_BC, E_BD, 
+  //                E_AE, E_AF, E_BE, E_BF,
+  //                E_CE, E_CF, E_DE, E_DF,  HE_MAXI };
+  // enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, 
+  //                HV_MAXI };
+  // enum EnumVCyl    { V_E, V_NE, V_N, V_NW, V_W, V_SW, V_S, V_SE, CV_MAXI };
+  // enum EnumCyl     { CYL_BIG,  CYL_SMALL };
+  // enum EnumCyl     { CYL_BIG,  CYL_SMALL };
+
+                              // EnumCoord  
+  const long DIR_X = 0;
+  const long DIR_Y = 1;
+  const long DIR_Z = 2;
+  const long DIM3  = 3;
+                              // EnumVertex
+  const long V_AMONT = 0;
+  const long V_AVAL  = 1;
+  const long V_TWO   = 2;
+                              // EnumQuad 
+  const long E_A = 0;
+  const long E_B = 1;
+  const long E_C = 2;
+  const long E_D = 3;
+  const long QUAD4 = 4;
+
+                              // EnumHQuad  
+  const long Q_A = 0;   //      z=0
+  const long Q_B = 1;   //      z=1
+  const long Q_C = 2;   //      y=0
+  const long Q_D = 3;   //      y=1
+  const long Q_E = 4;   //      x=0
+  const long Q_F = 5;   //      x=1
+  const long HQ_MAXI = 6;
+                              // EnumHEdge 
+  const long E_AC = 0;
+  const long E_AD = 1;
+  const long E_BC = 2;
+  const long E_BD = 3;
+  const long E_AE = 4;
+  const long E_AF = 5;
+  const long E_BE = 6;
+  const long E_BF = 7;
+  const long E_CE = 8;
+  const long E_CF = 9;
+  const long E_DE = 10;
+  const long E_DF = 11;
+  const long HE_MAXI  = 12;
+                              // EnumHVertex
+  const long V_ACE = 0;
+  const long V_ACF = 1;
+  const long V_ADE = 2;
+  const long V_ADF = 3;
+  const long V_BCE = 4;
+  const long V_BCF = 5;
+  const long V_BDE = 6;
+  const long V_BDF = 7;
+  const long HV_MAXI = 8;
+                              // EnumVCyl
+  const long V_E  = 0;
+  const long V_NE = 1;
+  const long V_N  = 2;
+  const long V_NW = 3;
+  const long V_W  = 4;
+  const long V_SW = 5;
+  const long V_S  = 6;
+  const long V_SE = 7;
+  const long CV_MAXI = 8;
+  const long CV_MAXI_EXT = 8;
+  const long CV_MAXI_INT = 4;
+
+  const long CYL_SMALL = 0;
+  const long CYL_BIG   = 1;
+
+  const long  CYL_BIG_SLICES   = 4;
+  const long  CYL_SMALL_SLICES = 6;
+  const long  CYL_LAYERS       = 2;
+
+  interface Elements : Element
+  {
+      long countVertex() raises (SALOME::SALOME_Exception);
+      long countEdge() raises (SALOME::SALOME_Exception);
+      long countQuad() raises (SALOME::SALOME_Exception);
+      long countHexa() raises (SALOME::SALOME_Exception);
+
+      Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception);
+      Edge getEdge( in long n ) raises (SALOME::SALOME_Exception);
+      Quad getQuad( in long n ) raises (SALOME::SALOME_Exception);
+      Hexa getHexa( in long n ) raises (SALOME::SALOME_Exception);
+
+      long findVertex( in Vertex p ) raises (SALOME::SALOME_Exception);
+
+      Vertex  getVertexIJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Edge getEdgeI( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Edge getEdgeJ( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Edge getEdgeK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Quad getQuadIJ( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Quad getQuadIK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Quad getQuadJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Hexa getHexaIJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+
+//       Quad  getQuad1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC
+// 
+//       Edge  getEdge1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC
+
+      long saveVtk( in string fname )
+           raises (SALOME::SALOME_Exception);
+
+      void clearAssociation ()
+           raises (SALOME::SALOME_Exception);
+
+  };
+
+
+};
+
+#endif
diff --git a/idl/Group.idl b/idl/Group.idl
new file mode 100755 (executable)
index 0000000..b71cfa0
--- /dev/null
@@ -0,0 +1,75 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Group_idl__
+#define __Group_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+    enum GroupKind {  HEXA_GROUP,
+                      QUAD_GROUP,
+                      EDGE_GROUP,
+                      HEXANODE_GROUP,
+                      QUADNODE_GROUP,
+                      EDGENODE_GROUP,
+                      VERTEXNODE_GROUP };
+
+    interface Group : SALOME::GenericObj
+    {
+        /*!
+        comment
+        */
+        string getName()
+          raises (SALOME::SALOME_Exception);
+        void setName( in string name )
+          raises (SALOME::SALOME_Exception);
+        GroupKind getKind()
+          raises (SALOME::SALOME_Exception);
+        long addElement( in Element e)
+          raises (SALOME::SALOME_Exception);
+        long countElement()
+          raises (SALOME::SALOME_Exception);
+        Element getElement( in long index )
+          raises (SALOME::SALOME_Exception);
+        long removeElement( in Element elt )
+            raises (SALOME::SALOME_Exception);
+        void clearElement()
+            raises (SALOME::SALOME_Exception);
+    };
+
+//     interface HexaGroup : Group {};
+//     interface QuadGroup : Group {};
+//     interface EdgeGroup : Group {};
+// 
+//     interface HexaNodeGroup : Group {};
+//     interface QuadNodeGroup : Group {};
+//     interface EdgeNodeGroup : Group {};
+//     interface VertexNodeGroup : Group {};
+};
+
+#endif
diff --git a/idl/HEXABLOCK_Gen.idl b/idl/HEXABLOCK_Gen.idl
new file mode 100755 (executable)
index 0000000..d3b4789
--- /dev/null
@@ -0,0 +1,70 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __HEXABLOCK_GEN__
+#define __HEXABLOCK_GEN__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Component.idl"
+#include "SALOME_Exception.idl"
+#include "Document.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  /*! \brief Interface of the %HEXABLOCK component
+                                            03/07/2012 : ajout de SALOMEDS::Driver (Abu)
+   */
+  interface HEXABLOCK_Gen : Engines::EngineComponent, SALOMEDS::Driver
+  {
+     /*!
+         Donne le nombre de documents ouverts en session.
+      */
+    void test() raises (SALOME::SALOME_Exception);
+    long countDocument()
+        raises (SALOME::SALOME_Exception);
+
+    Document getDocument(in long i)
+        raises (SALOME::SALOME_Exception);
+
+    void removeDocument( in Document d)
+        raises (SALOME::SALOME_Exception);
+
+    Document addDocument(in string name)
+        raises (SALOME::SALOME_Exception);
+
+    Document loadDocument(in string xmlFilename)
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+      Set the current study
+     */
+    void SetCurrentStudy( in SALOMEDS::Study theStudy );
+
+  };
+};
+
+
+#endif
diff --git a/idl/Hexa.idl b/idl/Hexa.idl
new file mode 100755 (executable)
index 0000000..a50704c
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Hexa_idl__
+#define __Hexa_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Hexa : Element
+    {
+        Quad getQuad( in long n ) raises(SALOME::SALOME_Exception);
+        Edge getEdge( in long n ) raises(SALOME::SALOME_Exception);
+        Vertex getVertex( in long n ) raises(SALOME::SALOME_Exception);
+
+       void setScalar( in double val ) //CS_NOT_SPEC
+               raises (SALOME::SALOME_Exception);
+    };
+
+    typedef sequence<Hexa>  Hexas;
+};
+#endif
+
diff --git a/idl/Law.idl b/idl/Law.idl
new file mode 100755 (executable)
index 0000000..cfce95b
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Law_idl__
+#define __Law_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Vertex.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+    enum KindLaw { UNIFORM, ARITHMETIC, GEOMETRIC };
+
+    interface Law : SALOME::GenericObj
+    {
+        void setName( in string name ) raises (SALOME::SALOME_Exception);
+        string getName() raises (SALOME::SALOME_Exception);
+
+        void setNodes( in long n ) raises (SALOME::SALOME_Exception);
+        long getNodes() raises (SALOME::SALOME_Exception);
+
+        void setKind( in KindLaw k ) raises (SALOME::SALOME_Exception);
+        KindLaw getKind() raises (SALOME::SALOME_Exception);
+
+        void setCoefficient( in double c ) raises (SALOME::SALOME_Exception);
+        double getCoefficient() raises (SALOME::SALOME_Exception);
+    };
+};
+
+#endif
diff --git a/idl/Makefile.am b/idl/Makefile.am
new file mode 100755 (executable)
index 0000000..b12ae93
--- /dev/null
@@ -0,0 +1,194 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# This Makefile is responsible of generating the client and server
+# implementation of IDL interfaces for both C++ and python usage.
+# The building process of the C++ files is in charge of each source
+# package and then is not manage here.
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+BASEIDL_FILES = \
+       Element.idl\
+       Vertex.idl\
+       Edge.idl\
+       Quad.idl\
+       Hexa.idl\
+       Vector.idl\
+       Elements.idl\
+       Cylinder.idl\
+       CrossElements.idl\
+       Pipe.idl\
+       Law.idl\
+       Propagation.idl\
+       Group.idl\
+       Document.idl\
+       HEXABLOCK_Gen.idl
+
+BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py)
+
+# This variable defines the files to be installed
+dist_salomeidl_DATA = $(BASEIDL_FILES)
+
+# GUI idl common library
+lib_LTLIBRARIES = libSalomeIDLHEXABLOCK.la
+
+
+
+
+# Sources built from idl files
+nodist_libSalomeIDLHEXABLOCK_la_SOURCES = \
+       ElementSK.cc\
+       ElementDynSK.cc\
+       VertexSK.cc\
+       VertexDynSK.cc\
+       EdgeSK.cc\
+       EdgeDynSK.cc\
+       QuadSK.cc\
+       QuadDynSK.cc\
+       HexaSK.cc\
+       HexaDynSK.cc\
+       VectorSK.cc\
+       VectorDynSK.cc\
+       ElementsSK.cc\
+       ElementsDynSK.cc\
+       CylinderSK.cc\
+       CylinderDynSK.cc\
+       CrossElementsSK.cc\
+       CrossElementsDynSK.cc\
+       PipeSK.cc\
+       PipeDynSK.cc\
+       LawSK.cc\
+       LawDynSK.cc\
+       PropagationSK.cc\
+       PropagationDynSK.cc\
+       GroupSK.cc\
+       GroupDynSK.cc\
+       DocumentSK.cc\
+       DocumentDynSK.cc\
+       HEXABLOCK_GenSK.cc\
+       HEXABLOCK_GenDynSK.cc
+
+ElementDynSK.cc: ElementSK.cc
+VertexDynSK.cc: VertexSK.cc
+EdgeDynSK.cc: EdgeSK.cc
+PropagationDynSK.cc: PropagationSK.cc
+LawDynSK.cc: LawSK.cc
+ElementsDynSK.cc: ElementsSK.cc
+CrossElementsDynSK.cc: CrossElementsSK.cc
+QuadDynSK.cc: QuadSK.cc
+VectorDynSK.cc: VectorSK.cc
+CylinderDynSK.cc: CylinderSK.cc
+GroupDynSK.cc: GroupSK.cc
+HexaDynSK.cc: HexaSK.cc
+PipeDynSK.cc: PipeSK.cc
+DocumentDynSK.cc: DocumentSK.cc
+HEXABLOCK_GenDynSK.cc: HEXABLOCK_GenSK.cc
+
+
+# header files must be exported: other modules have to use this library
+nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
+
+libSalomeIDLHEXABLOCK_la_CPPFLAGS =\
+       @CORBA_CXXFLAGS@        \
+       @CORBA_INCLUDES@        \
+       $(KERNEL_CXXFLAGS)      \
+       $(GEOM_CXXFLAGS)        \
+       -I$(top_builddir)/salome_adm/unix \
+       -I$(top_builddir)/idl
+
+
+libSalomeIDLHEXABLOCK_la_LDFLAGS = -no-undefined -version-info=0:0:0
+
+libSalomeIDLHEXABLOCK_la_LIBADD  =                     \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel     \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM         \
+       @CORBA_LIBS@
+
+# These variables defines the building process of CORBA files
+OMNIORB_IDL         = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS  = \
+       @OMNIORB_IDLPYFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome
+
+
+IDLCXXFLAGS = \
+       -bcxx \
+       @IDLCXXFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome \
+       -I$(top_builddir)/salome_adm/unix \
+       -I$(srcdir)
+#      -I$(srcdir)/SD/Vertex
+#      -I$(srcdir)/SD/Edge
+
+IDLPYFLAGS  = \
+       @IDLPYFLAGS@ \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome
+       
+
+
+# potential problem on parallel make on the following - multiple outputs
+SUFFIXES = .idl .hh SK.cc
+.idlSK.cc:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+.idl.hh:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
+       $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
+       ls $^ | while read file; do \
+         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
+       done
+
+# we want to remove only staff generated for IDL files and nothing more
+uninstall-local:
+       @for modulen in HEXABLOCK_ORB ; do \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
+       done ; \
+       for filen in $(BASEIDL_FILES_PY) ; do \
+         echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
+       done
+
+mostlyclean-local:
+       -rm -f *.hh *.cc .depidl
+
+# we use cpp to generate dependencies between idl files.
+# option x c tells the preprocessor to consider idl as a c file.
+# if an idl is modified, all idl dependencies are rebuilt
+
+.depidl: $(BASEIDL_FILES)
+       @echo "" > $@
+       @for dep in $^ dummy; do \
+         if [ $$dep != "dummy" ]; then \
+           echo Building dependencies for $$dep; \
+           $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome $$dep 2>/dev/null \ | \
+           sed 's/\.o/\SK.cc/' >>$@; \
+         fi; \
+       done ;
+
+-include .depidl
+
+# -I$(GEOM_ROOT_DIR)/include/salome
\ No newline at end of file
diff --git a/idl/Pipe.idl b/idl/Pipe.idl
new file mode 100755 (executable)
index 0000000..8c2f896
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Pipe_idl__
+#define __Pipe_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Vector.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Pipe : Element
+    {
+        Vertex getBase() raises (SALOME::SALOME_Exception);
+        Vector getDirection() raises (SALOME::SALOME_Exception);
+        double getInternal_radius() raises (SALOME::SALOME_Exception);
+        double getRadius() raises (SALOME::SALOME_Exception);
+        double getHeight() raises (SALOME::SALOME_Exception);
+    };
+};
+
+#endif
+
diff --git a/idl/Propagation.idl b/idl/Propagation.idl
new file mode 100755 (executable)
index 0000000..41212a0
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Propagation_idl__
+#define __Propagation_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+#include "Edge.idl"
+#include "Law.idl"
+
+
+
+/*!  \ingroup EXAMPLES
+
+*/
+module HEXABLOCK_ORB
+{
+  typedef sequence<boolean>  Ways;
+
+  interface Propagation : SALOME::GenericObj
+  {
+    Edges getEdges() raises (SALOME::SALOME_Exception);
+//     Ways getWays() raises (SALOME::SALOME_Exception);
+    void setLaw(in Law l) raises (SALOME::SALOME_Exception);
+    Law getLaw() raises (SALOME::SALOME_Exception);
+    void setWay(in boolean w) raises (SALOME::SALOME_Exception);
+    boolean getWay() raises (SALOME::SALOME_Exception);
+  };
+
+};
+
+#endif
diff --git a/idl/Quad.idl b/idl/Quad.idl
new file mode 100755 (executable)
index 0000000..1248023
--- /dev/null
@@ -0,0 +1,72 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Quad_idl__
+#define __Quad_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  interface Quad : Element
+  {
+      Edge getEdge( in long n )
+          raises (SALOME::SALOME_Exception);
+
+      Vertex getVertex( in long n )
+          raises (SALOME::SALOME_Exception);
+
+//       void addAssociation( in GEOM::GEOM_Object geom_object_2D )
+//           raises (SALOME::SALOME_Exception);
+// 
+//       GEOM_Objects getAssociations()
+//           raises (SALOME::SALOME_Exception);
+
+      void clearAssociation ( ) 
+          raises (SALOME::SALOME_Exception);
+
+      long addAssociation( in GEOM::GEOM_Object geom_object_2D ) //CS_NOT_SPEC
+          raises (SALOME::SALOME_Exception);
+
+      GEOM::ListOfGO getAssociations() //CS_NOT_SPEC CS_WARNING: not working when reloading a document
+          raises (SALOME::SALOME_Exception);
+// 
+//       void removeAssociation()
+//           raises (SALOME::SALOME_Exception);
+
+      void setScalar( in double val ) //CS_NOT_SPEC
+       raises (SALOME::SALOME_Exception);
+
+  };
+};
+
+#endif
diff --git a/idl/Vector.idl b/idl/Vector.idl
new file mode 100755 (executable)
index 0000000..c6fea39
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Vector_idl__
+#define __Vector_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  interface Vector : Element
+  {
+    double getDX() raises (SALOME::SALOME_Exception);
+    double getDY() raises (SALOME::SALOME_Exception);
+    double getDZ() raises (SALOME::SALOME_Exception);
+
+    double getAngleX () raises (SALOME::SALOME_Exception);
+    double getNorm   () raises (SALOME::SALOME_Exception);
+  };
+};
+
+#endif
diff --git a/idl/Vertex.idl b/idl/Vertex.idl
new file mode 100755 (executable)
index 0000000..e10c993
--- /dev/null
@@ -0,0 +1,68 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Vertex_idl__
+#define __Vertex_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component 
+*/
+module HEXABLOCK_ORB
+{
+
+    interface Vertex : Element
+    {
+        double getX() raises (SALOME::SALOME_Exception);
+        double getY() raises (SALOME::SALOME_Exception);
+        double getZ() raises (SALOME::SALOME_Exception);
+
+        void setX( in double x ) raises (SALOME::SALOME_Exception);
+        void setY( in double y ) raises (SALOME::SALOME_Exception);
+        void setZ( in double z ) raises (SALOME::SALOME_Exception);
+
+        void setAssociation( in GEOM::GEOM_Object geom_object_vertex )
+            raises (SALOME::SALOME_Exception);
+
+        GEOM::GEOM_Object getAssociation()
+            raises (SALOME::SALOME_Exception);
+
+        void clearAssociation()
+            raises (SALOME::SALOME_Exception);
+
+       void setScalar( in double val ) //CS_NOT_SPEC
+               raises (SALOME::SALOME_Exception);
+
+    };
+
+
+};
+
+#endif
+
diff --git a/internal_doc/AssoLines.gif b/internal_doc/AssoLines.gif
new file mode 100644 (file)
index 0000000..ab702ce
Binary files /dev/null and b/internal_doc/AssoLines.gif differ
diff --git a/internal_doc/AssoLines.html b/internal_doc/AssoLines.html
new file mode 100755 (executable)
index 0000000..eac8397
--- /dev/null
@@ -0,0 +1,169 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html><head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Generator" content="Microsoft Word 97">
+   <meta name="GENERATOR" content="Mozilla/4.75 [fr] (Win98; U) [Netscape]">
+   <title>Associations par lignes</title></head>
+<body>
+&nbsp;
+<table cols="2" width="100%">
+<tbody><tr>
+<td><img src="logo-cs.gif" height="84" width="145"></td>
+
+<td>&nbsp;</td>
+</tr>
+</tbody></table>
+
+<center><a name="YaccDebut"></a>
+<br><br><big><big><b><font size="+3"><big><big>HexaBlock<br><br></big></big></font></b></big></big><b><font size="+3">Associations par lignes : précisions</font></b></center>
+
+<blockquote><i><b><br></b></i></blockquote><p><a href="index.html">Retour</a>
+&nbsp;&nbsp;</p><p><br>
+</p><hr width="100%">
+<p><br><b><big><big></big></big></b></p><p class="western" align="justify">Ce document établit les limitations actuelles des associations par lignes.<br>
+</p>
+<p class="western" align="justify"><font size="3">L'utilisateur peut
+définir des associations multiples au moyen de deux fonctions&nbsp;:</font></p>
+<pre class="western"><br></pre><table style="width: 771px; height: 31px; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td><p class="western" align="justify">
+   <font size="3">int  associateOpenedLine (Edge*  mstart, Edges&amp; 
+mline, Shape* gstart, </font>
+</p>
+<p class="western" align="justify">                             <font size="3">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double
+pstart, Shapes&amp; gline, double pend);</font></p>
+<p class="western" align="justify">   <font size="3">int 
+associateClosedLine (Vertex* mfirst, Edge*  mstart, Edges&amp; 
+mline, </font>
+</p>
+<p class="western" align="justify">                             <font size="3">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Shape*
+ gstart, double pstart, Shapes&amp; gline);</font></p></td></tr></tbody></table><pre class="western"></pre>
+
+<p class="western" align="justify"><font size="3"><br>Ces deux fonctions
+appellent la même fonction interne :&nbsp;</font></p>
+
+<table style="width: 771px; height: 31px; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td><p class="western" align="justify">
+   <font size="3">int associateLine
+(Vertex* vfirst, Edge*  mstart, Edges&amp; mline,</font></p><p class="western" align="justify"><font size="3">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Shape*
+ gstart, double pstart, Shapes&amp; gline, double pend);</font></p></td></tr></tbody></table><pre class="western"></pre>
+<p class="western" align="justify">Cette fonction effectue
+les contrôles généraux réalisables par le modèle, trie les edges puis passe la
+main à une fonction d'interface avec Cascade : </p><table style="width: 771px; height: 31px; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td><p class="western" align="justify">
+   <font size="3">int&nbsp;</font><font size="3">associateCascade (Edges&amp; mline, int msens[], Shape* gstart, </font>
+
+</p><p class="western" align="justify"><font size="3">                   Shapes&amp;
+gline, double pstart, double pend, bool clos);</font></p></td></tr></tbody></table><pre class="western"></pre><p class="western" align="justify"><font size="3">Les arguments sont : </font>
+</p>
+<ul><li><p class="western" align="justify"><font size="3">Edges&amp; mline :
+       liste triée des edges </font>
+       </p>
+       </li><li><p class="western" align="justify"><font size="3">int msens[]   :
+       indicateur (V_AMON ou V_AVAL) donnant le sens de chaque edge.</font></p>
+       </li><li><p class="western" align="justify"><font size="3">Shape* gstart : 
+       Forme associée au premier edge. </font>
+       </p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Shapes&amp;
+       gline : Formes associées aux autres edges (peut être vide).</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">double
+       pstart :  Paramètre indiquant le point de départ de la première
+       forme. Si la ligne est ouverte, pstart est compris entre 0 et 1. Si
+       la ligne est fermée, seules les valeurs 0 ou 1 sont acceptées. </span></font></font>
+       </p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">double
+       pend : Paramètre indiquant le point de départ de la dernière
+       forme. Vaut 1 si la ligne est fermée.</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">bool
+       clos        : indique si la ligne est ouverte ou fermée.</span></font></font></p>
+</li></ul>
+<p class="western" style="margin-left: 1.27cm; text-indent: -0.64cm;" align="justify">
+<br>
+</p>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Fonctionnement
+du programme </span></font></font><font color="#000000"><font size="3"><span lang="fr-FR"><b>associateCascade</b></span></font></font><font color="#000000"><font size="3"><span lang="fr-FR">
+: </span></font></font>
+</p>
+<ul><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Ordonner
+       les edges  (fait dans associateLine)</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Transformer
+       les Hexa::Shapes en lignes (TopoDS_Edge) : elles sont rangées dans
+       tabg_line [nblines].</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Créer
+       des courbes (type  BrepAdaptor_Curve*) à partir des lignes, c'est
+       le moyen de calculer le point situé à une certaine abscisse
+       curviligne. Les courbes sont rangées dans tabg_curve[nblines].</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Mémoriser
+       le longueur réelle de chaque courbe et la mémoriser dans
+       tabg_length[nblines]. </span></font></font>
+       </p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Définir
+       les points extrêmes de chaque courbe (type gp_Pnt) et l'enregistrer
+       dans tabg_point [2*nblines].</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Ordonner
+       (et contrôler) les lignes/coubes au moyen de la fonction
+       vertexInLine, laquelle met à jour les tableaux tabg_orig (donne le
+       sens de chaque ligne) et shape_posit (donne le classement des
+       lignes).</span></font></font></p>
+</li></ul>
+<p class="western" style="margin-left: 1.27cm; text-indent: -0.64cm;" align="justify">
+<br>
+</p>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR"></span></font></font></p><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Si
+la ligne globale est continue (les courbes sont jointives deux à
+deux), on peut procéder à l'association ligne/eddge.</span></font></font></p>
+
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Le
+premier point (défini par tab_gcurve[0] et pstart est associé au
+premier vertex (défini par mline[0]-&gt;getVertex (msens[0]).</span></font></font></p>
+<p class="western" align="justify"><br><font color="#000000"><font size="3"><span lang="fr-FR">Il
+       faut ensuite définir la (les) portion(s) de courbe associée(s) à
+       chaque edge.<br>Chaque
+       portion de courbe est définie par la représentation brep de la
+       ligne associée et les paramètres de début et fin. </span></font></font>
+       </p>
+
+<p class="western" align="justify"><br><font color="#000000"><font size="3"><span lang="fr-FR">Une
+       première tentative fut d'utiliser les <span style="font-weight: bold;">abscisses curvilignes</span>
+relatives de chaque type de ligne. Cette tentative fut rejetée d'une
+part car elle ne convenait pas à la bielle (voir dessin en annexe) et
+d'autre part l'idée d'établir une abscisse curviligne sur le modèle de
+bloc contredisait l'idée selon laquelle les coordonnées du modele de
+bloc n'ont pas d'importance.</span></font></font></p>
+
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">On
+se contente d'établir une relation entre les <span style="font-weight: bold;">n  lignes (de la CAO)
+et les m edges (du modèle) </span>(voir figure 1) : </span></font></font>
+</p>
+<ul><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">soit
+       sm1 la position relative du premier vertex du ième edge : on prend
+       sm1 = i/nbedges</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">soit
+       sm2 la position relative du second vertex du ième edge. On a donc 
+       : sm2 = (i+1) /nbedges;</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">soit
+       sg1 la position relative du premier vertex de la jème ligne. On
+       prend :  sg1 = j/nblignes</span></font></font></p>
+       </li><li><p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">soit
+       sg2 la position relative du second vertex de la jème ligne : sg2 =
+       (j+1)/nblignes.</span></font></font></p>
+</li></ul>
+<p class="western" align="justify"><br>
+</p>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Le
+ième edge et la jème ligne s'intersectent si : sg1 &lt; sm2 et sg2
+&gt; sm1.</span></font></font></p>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">On
+doit alors déclarer qu'une portion de la ligne est associée à
+l'edge.</span></font></font></p>
+<p class="western" align="justify"><br>
+</p>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">La
+portion de la ligne est délimitée par les paramètres &nbsp;normalisés (compris entre 0 et 1) :</span></font></font></p><table style="width: 771px; height: 31px; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td><p class="western" align="justify">
+   <font color="#000000"><font size="3"><span lang="fr-FR">para_deb = sg1 &lt; sm1 ?
+(sm1-sg1)/(sg2-sg1) : 0.0;</span></font></font></p>
+<p class="western" align="justify"><font color="#000000">       
+<font size="3"><span lang="fr-FR">para_fin   = sg2 &gt; sm2 ?
+(sm2-sg1)/(sg2-sg1) : 1.0;</span></font></font></p></td></tr></tbody></table><pre class="western"></pre>
+<p class="western" align="justify"><font color="#000000"><font size="3"><span lang="fr-FR">Le
+second vertex de l'edge est associé si :  sg1 &lt;= sm2 &lt;= sg2</span></font></font></p>
+<p class="western" align="justify"><br>
+</p>
+<div style="text-align: center;"><img style="width: 607px; height: 566px;" alt="Asso ligne" src="AssoLines.gif"><br></div><br><p><a href="#YaccDebut">Retour au début</a>&nbsp;</p><p></p><hr style="width: 100%; height: 2px;"><br><hr width="100%">
+</body></html>
\ No newline at end of file
diff --git a/internal_doc/Bugs.html b/internal_doc/Bugs.html
new file mode 100755 (executable)
index 0000000..392ec3c
--- /dev/null
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html><head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Generator" content="Microsoft Word 97">
+   <meta name="GENERATOR" content="Mozilla/4.75 [fr] (Win98; U) [Netscape]">
+   <title>Quelques bugs</title><meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
+p, li { white-space: pre-wrap; }</style></head>
+<body>
+&nbsp;
+<table cols="2" width="100%">
+<tbody><tr>
+<td><img src="logo-cs.gif" height="84" width="145"></td>
+
+<td>&nbsp;</td>
+</tr>
+</tbody></table>
+
+<center><a name="YaccDebut"></a>
+<br><br><big><big><b><font size="+3"><big><big>HexaBlock<br><br></big></big></font></b></big></big><b><font size="+3">Quelques Bugs</font></b></center>
+
+<blockquote><i><b><br></b></i></blockquote><p><a href="index.html">Retour</a>
+&nbsp;&nbsp;</p><p><br></p><p>oooooo<br>
+</p><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 016 (Corrigé)</big></big></b></small></p>La fonction cut sur une ligne associée ne gère pas l'association.<br><br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 015 (Corrigé ?)</big></big></b></small></p><span style="font-style: italic;">Salomé crashe une fois sur deux.</span><br><br>Ilsemble que la fonction getBtrep() soit à l'origine de ce dysfonctionnement.<br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 014</big></big></b></small></p><br style="font-style: italic;"><span style="font-style: italic;">
+Une grille créée par makeSpherical ne fournit pas le bon nombre d'hexaèdre maillés</span>.<br><br>...<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 013 (Evolution)</big></big></b></small></p>Association ligne fermée (bielle) <br>Problème de cohérence entre le sens de parcours d'une ligne (un cercle)&nbsp; et les edges associés.<br>Le sens étant différent, les mailles sont "croisées"<br><br>Solution
+retenue : modifier le vertex et l'edge de départ, de façon à "inverser"
+le sens de parcours des edges du modèle de blocs.<br><br><span style="font-weight: bold;">TODO</span> : <br><br>Modifier la spécification de la fonction <span style="font-weight: bold;">associateClosedLine</span> ()<br>&nbsp;L'argument "paramètre" de type réel indique bien un point de départ sur la ligne, mais pas le sens de parcours.<br><br>On décide :&nbsp;<b><big><big></big></big></b><ul><li>de choisir une des deux extrémités de la ligne (on abandonne l'idées des points interrmédiaires)</li><li>de définir l'extrémité au moyen d'un point.</li></ul><br><span style="font-weight: bold;">TODO</span> (2) : <br><br>Cette
+méthode convient pour un contour ferrmé constitué de plusieurs lignes,
+mais pour une courbe fermée unique, l'ambiguité persiste : <span style="font-weight: bold;">A suivre</span> ...<br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><p>
+</p><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><small><b>&nbsp;<big><big>Bug 012 (Corrigé et validé)</big></big></b></small></p><br><span style="font-style: italic;">Erreur intempestive : </span><br style="font-style: italic;"><span style="font-style: italic;">Message : "associateLine : Le contour n'est pas ferm</span>e"<br><br><br>Programme HexDocument_asso.cxx&nbsp; corrigé.<br>(indice modifié suite à une impression de mise au point)<br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><p>
+</p><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><small><b>&nbsp;<big><big>Bug 011 (Corrigé et validé)</big></big></b></small></p><span style="font-style: italic;">Les associations par ligne ouverte provoquent une erreur (détectée par pa partie&nbsp;PLUGIN).<br>Il y a incohérence entre les éléments associés à un edge : les lignes doivent être jointives et limitées entree les deux vertex.<br><br></span>Correction du fichier <span style="font-weight: bold;">HexUseCascade.cxx</span>.Le sens des lignes de Cascade : la paramètre varie parfois de 1 vers 0. <br>Le programme tient désormais compte de cette particularité.<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><p>
+</p><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><small><b>&nbsp;<big><big>Bug 010</big></big></b></small></p><span style="font-style: italic;">Un message résiduel lors du maillage de la bride sans associations.</span><br><br>
+<br>"Bielle:hexas" has not been computed.<br><br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 009 (Corrigé et validé)</big></big></b></small></p><ul style="font-style: italic;"><li>Le fichier &nbsp;BREP associé à la bride est incorrect. </li><li>Il&nbsp;fait sortir de Salome.</li></ul><br>Le fichier bride.brep est corrompu, on ne doit plus s'en servir, il a été supprimé de la base CVS.<br><br>Il est remplacé par une construction directe avec GEOM, cette construction est incluse dans le fichier en attachement.<br><br>La constuction directe de la bride est effective.<br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 008 (Corrigé et validé)</big></big></b></small></p>Cas de la bielle.py. Tous les groupes de maillage affichés par SALOME sont vides.&nbsp;<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><small><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Bug 007 (Corrigé et validé)</big></big></b></small></p>Le maillage hexaedrique de fonctionne pas. <br>Pris en charge par F. Kloss.<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big>Bug 006 (En cours)</big></b></p><br style="font-style: italic;"><span style="font-style: italic;">Il
+semble que les éléments donnés en résultat de la méthode
+«disconnectEdge» du document ne sont pas des éléments du modèle de
+blocs en cours d'élaboration</span><br style="font-style: italic;"><ul style="font-style: italic;"><li>ce problème intervient dans le cas de la recette de l'enceinte simplifiée</li><li>&nbsp;il
+serait souhaitable que les nouveaux sommets, créés par les méthodes
+pour déconnecter, ne soient pas&nbsp;exactement les mêmes que leurs
+originaux afin d'avoir un visuel immédiat</li></ul><br>Bug non reproduit.<br>Testé en C++ direct puis en python. Voir pièce jointe.<br>Ce script génère deux fichiers vtk corrects.<br>A voir ensemble Jeudi.<br><br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><small><b>&nbsp;<big><big>Bug 005 (Corrigé &amp; validé)</big></big></b></small></p><br style="font-style: italic;"><span style="font-style: italic;">Les
+points de construction (centre de cylindre, etc.) sont aussi maillés ce
+qui donne un maillage incorrect, il y a &nbsp; solutions possible à
+valider avant la correction:</span><br style="font-style: italic;"><span style="font-style: italic;">on distingue 2 notions: </span><br style="font-style: italic;"><ul style="font-style: italic;"><li>points et vertex sont deux entités distinctes comme dans CasCade</li><li>point = vertex comme dans GEOM et HEXABLOCK actuellement, et le mailleur traite uniquement les sommets connexes aux hexaèdres</li></ul>On
+choisit la solution 2. 8 fonctions ajoutées : countUsedVertex () .....
+countUsedHexa(), getUsedVertex (nro), .... getUsedHexa (nro)<br>Ces fonctions devront remplacer les appels à countVertex() .... &nbsp; getVertex(n)&nbsp; dans le mailleur.<br>Les fonctions sont codées et testées unitairement. Le mailleur n'est&nbsp; &nbsp;pas encore modifié.<br><br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big>Bug 004 (Corrigé &amp; validé)</big></b></p><ul style="font-style: italic;"><li>Il y a une incohérence entre la documentation et la fonction doc.addHexaVertices</li></ul><br><br>&nbsp;Le source a été modifié pour être cohérent&nbsp;avec la documentation<br><br><br><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;<br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big>Bug 003 (Corrigé &amp; validé)</big></b></p><br><ul style="font-style: italic;"><li>En Python, il manque toutes les variables, qui sont documentées, telles que Q_A, E_AC, V_ACE, ...</li></ul>Ces informations ont été ajoutées au fichier Elements.idl<br><br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big>Bug 002 (Corrigé &amp; validé)</big></b></p><ul style="font-style: italic;"><li>la méthode «mergeQuads» du document échoue</li><li>cette correction est nécessaire pour le cas de la bride</li></ul><br>1) Sur le cas proposé, l'ordre des deux premiers arguments de la&nbsp; fonction mergeQuads était inversé.<br>L'ordre est mergeQuads (q_cible, q_ancien, v1, v2, v3, v4)<br>Action : Modification du script utilisateur + mise à jour de la &nbsp;documentation.<br><br>2)
+Après correction, il s'avère que les arguments de type
+Vertex&nbsp;&nbsp;v1 ...b4 étaient invalides, lors du second appel à
+mergeQuads, à cause&nbsp; des éléments détruits lors du premier appel.
+Ces éléments sont difficiles à localiser sur le modèle python et
+inutiles dans la mesure ou les deux quadrangles à fusionner sont&nbsp;
+jointifs ; il suffirait d'appeler la fonction closeQuads non
+encore&nbsp; accessible à l'utilisateur python ou IHM<br>On convient de
+modifier l'ordre des tests : On teste d'abord si les&nbsp; quadrangles
+sont jointifs avant de s'intéresser aux vertex passés en&nbsp;
+argument. On pourra alors remplacer les vertex de positionnement par la
+valeur None.<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;<b><big><big></big></big></b></p><br><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big>Bug 001 (Corrigé &amp; validé)</big></b></p><ul style="font-style: italic;"><li>La méthode «getShape» du document fait sortir de SALOME.</li><li>après la correction, il faudra mettre à jour le fichier&nbsp; «hexablock.py»</li></ul><br>L'objet "shape" associé au document est fourni par la procédure utilisateur : <br><br><span style="font-family: monospace;">bride = geompy.ImportBREP("bride.brep")</span><br style="font-family: monospace;"><span style="font-family: monospace;">doc.setShape(bride)</span><br><br>La méthode setShape, de HexDocument_impl.cxx fonctionne en deux étapes :<br><ol><li>l'argument transmis par le python est un objet <span style="font-weight: bold;">Corba</span> de type GEOM_Object.</li><li>Il est traduit en objet Cascade shape de type TopoDS_Shape (Cascade) via la fonction geomObjectToShape()</li><li>Il est traduit en chaine de cartactères de &nbsp;format BREP par shape2string</li><li>La chaine de caractères, entité portable est associée au document.</li></ol><br>L'objet "shape était relu dans la procédure python systeme "hexablock.py" : <br>shape = doc.getShape(). <br>Or,
+&nbsp;si la méthode setSchape est capable de transformer un GEOM_Object
+en TopoDS_Shape, la réciproque n'est pas présente actuellement dans GEOM<br><br>La
+procédure hexablock.py va donc utiliser une nouvelle procédure
+doc.getBrep(), qui nous permet de transmettre via Corba un objet de
+type standard (chaine de caractères). <br><br> En conséquence, la mise à jour de hexablock.py a été faite et validée.<br><br><p><a href="Bugs.html#YaccDebut">Retour au début</a>&nbsp;</p><p><br></p><hr style="width: 100%; height: 2px;"><br><hr width="100%">
+</body></html>
\ No newline at end of file
diff --git a/internal_doc/HemiSphere.png b/internal_doc/HemiSphere.png
new file mode 100755 (executable)
index 0000000..9d5c11d
Binary files /dev/null and b/internal_doc/HemiSphere.png differ
diff --git a/internal_doc/LastNews.html b/internal_doc/LastNews.html
new file mode 100755 (executable)
index 0000000..573baf8
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html><head>\r
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
+   <meta name="Generator" content="Microsoft Word 97">\r
+   <meta name="GENERATOR" content="Mozilla/4.75 [fr] (Win98; U) [Netscape]">\r
+   <title>Last news of the front</title></head>\r
+<body>\r
+&nbsp;\r
+<table cols="2" width="100%">\r
+<tbody><tr>\r
+<td><img src="logo-cs.gif" height="84" width="145"></td>\r
+\r
+<td>&nbsp;</td>\r
+</tr>\r
+</tbody></table>\r
+\r
+<center><a name="YaccDebut"></a>\r
+<br><br><big><big><b><font size="+3"><big><big>HexaBlock<br><br></big></big></font></b></big></big><b><font size="+3">LAST NEWS</font></b></center>\r
+\r
+<blockquote><i><b><br></b></i></blockquote><p><a href="index.html">Retour</a>\r
+&nbsp;&nbsp;</p><p>oooooo<br>\r
+</p><hr width="100%">\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b> <big><big>15 Septembre 2011</big></big></b></p><br><br><p><a href="LastNews.html#YaccDebut">Retour au début</a>&nbsp;</p><p></p><hr width="100%">\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b> <big><big>14 Septembre 2011</big></big></b></p><big><span style="font-weight: bold;">Hexa2 :</span></big> Ajout de la fonction doc.getBrep() qui remplace doc.getShape()<br><br><big><span style="font-weight: bold;">Hexa3 </span></big>: Ajout de la fonction doc.revolutionQuad<br>&nbsp; Ajout des tests unitaires : src/TEST_PY/test_unit/hexa_quads.py et revolution.py.<br>&nbsp; Cest tests créent des fichiers vtk à visualiser sous ParaView.<br><p><a href="#YaccDebut">Retour au début</a>&nbsp;</p><p></p><hr style="width: 100%; height: 2px;"><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;</b><b><big><big>Aout 2011</big></big></b><br><br>Première\r
+version ...<br><hr width="100%">\r
+</body></html>
\ No newline at end of file
diff --git a/internal_doc/PartRind.png b/internal_doc/PartRind.png
new file mode 100755 (executable)
index 0000000..09fa90a
Binary files /dev/null and b/internal_doc/PartRind.png differ
diff --git a/internal_doc/PartSphere.png b/internal_doc/PartSphere.png
new file mode 100755 (executable)
index 0000000..33dfeae
Binary files /dev/null and b/internal_doc/PartSphere.png differ
diff --git a/internal_doc/QuadRevolution.png b/internal_doc/QuadRevolution.png
new file mode 100755 (executable)
index 0000000..f0100e3
Binary files /dev/null and b/internal_doc/QuadRevolution.png differ
diff --git a/internal_doc/QuadRevolution1.png b/internal_doc/QuadRevolution1.png
new file mode 100644 (file)
index 0000000..c7867c3
Binary files /dev/null and b/internal_doc/QuadRevolution1.png differ
diff --git a/internal_doc/QuadRevolution2.png b/internal_doc/QuadRevolution2.png
new file mode 100644 (file)
index 0000000..c5ef405
Binary files /dev/null and b/internal_doc/QuadRevolution2.png differ
diff --git a/internal_doc/Quads_5.png b/internal_doc/Quads_5.png
new file mode 100755 (executable)
index 0000000..6bc6e8b
Binary files /dev/null and b/internal_doc/Quads_5.png differ
diff --git a/internal_doc/Quads_AB.png b/internal_doc/Quads_AB.png
new file mode 100755 (executable)
index 0000000..a37df49
Binary files /dev/null and b/internal_doc/Quads_AB.png differ
diff --git a/internal_doc/Quads_ABCD.png b/internal_doc/Quads_ABCD.png
new file mode 100755 (executable)
index 0000000..bb21c12
Binary files /dev/null and b/internal_doc/Quads_ABCD.png differ
diff --git a/internal_doc/Quads_AC.png b/internal_doc/Quads_AC.png
new file mode 100755 (executable)
index 0000000..30c0b64
Binary files /dev/null and b/internal_doc/Quads_AC.png differ
diff --git a/internal_doc/Quads_ACD.png b/internal_doc/Quads_ACD.png
new file mode 100755 (executable)
index 0000000..d1439bb
Binary files /dev/null and b/internal_doc/Quads_ACD.png differ
diff --git a/internal_doc/Quads_ACDE.png b/internal_doc/Quads_ACDE.png
new file mode 100755 (executable)
index 0000000..67fdb79
Binary files /dev/null and b/internal_doc/Quads_ACDE.png differ
diff --git a/internal_doc/Quads_ACE.png b/internal_doc/Quads_ACE.png
new file mode 100755 (executable)
index 0000000..a2b9faa
Binary files /dev/null and b/internal_doc/Quads_ACE.png differ
diff --git a/internal_doc/Questions.html b/internal_doc/Questions.html
new file mode 100755 (executable)
index 0000000..7e85ad1
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html><head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Generator" content="Microsoft Word 97">
+   <meta name="GENERATOR" content="Mozilla/4.75 [fr] (Win98; U) [Netscape]">
+   <title>Last news of the front</title></head>
+<body>
+&nbsp;
+<table cols="2" width="100%">
+<tbody><tr>
+<td><img src="logo-cs.gif" height="84" width="145"></td>
+
+<td>&nbsp;</td>
+</tr>
+</tbody></table>
+
+<center><a name="YaccDebut"></a>
+<br><br><big><big><b><font size="+3"><big><big>HexaBlock<br><br></big></big></font></b></big></big><b><font size="+3">Asked and probably future Questions</font></b></center>
+
+<blockquote><i><b><br></b></i></blockquote><p><a href="index.html">Retour</a>
+&nbsp;&nbsp;</p><p><br>
+</p><hr width="100%">
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;<big><big>Septembre 2011</big></big></b></p>Quelques évolutions<br><br><p><a href="#YaccDebut">Retour au début</a>&nbsp;</p><p></p><hr style="width: 100%; height: 2px;"><img src="blue-ball.gif" alt="o" height="12" width="12"><b>&nbsp;</b><b><big><big>Aout 2011</big></big></b><br><br>Première
+version ...<br><hr width="100%">
+</body></html>
\ No newline at end of file
diff --git a/internal_doc/ReplaceBefore.gif b/internal_doc/ReplaceBefore.gif
new file mode 100755 (executable)
index 0000000..35ce413
Binary files /dev/null and b/internal_doc/ReplaceBefore.gif differ
diff --git a/internal_doc/ReplaceResult.gif b/internal_doc/ReplaceResult.gif
new file mode 100755 (executable)
index 0000000..552c725
Binary files /dev/null and b/internal_doc/ReplaceResult.gif differ
diff --git a/internal_doc/Rind.png b/internal_doc/Rind.png
new file mode 100755 (executable)
index 0000000..ccfb21f
Binary files /dev/null and b/internal_doc/Rind.png differ
diff --git a/internal_doc/Sphere.gif b/internal_doc/Sphere.gif
new file mode 100755 (executable)
index 0000000..0dae85f
Binary files /dev/null and b/internal_doc/Sphere.gif differ
diff --git a/internal_doc/bad_geom.png b/internal_doc/bad_geom.png
new file mode 100755 (executable)
index 0000000..b1925de
Binary files /dev/null and b/internal_doc/bad_geom.png differ
diff --git a/internal_doc/blue-ball.gif b/internal_doc/blue-ball.gif
new file mode 100755 (executable)
index 0000000..edc29b7
Binary files /dev/null and b/internal_doc/blue-ball.gif differ
diff --git a/internal_doc/demi_coque.png b/internal_doc/demi_coque.png
new file mode 100755 (executable)
index 0000000..174580f
Binary files /dev/null and b/internal_doc/demi_coque.png differ
diff --git a/internal_doc/green-ball.gif b/internal_doc/green-ball.gif
new file mode 100755 (executable)
index 0000000..71e1b2e
Binary files /dev/null and b/internal_doc/green-ball.gif differ
diff --git a/internal_doc/index.html b/internal_doc/index.html
new file mode 100755 (executable)
index 0000000..90be523
--- /dev/null
@@ -0,0 +1,448 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html><head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
+<meta name="Generator" content="Microsoft Word 97">\r
+<meta name="GENERATOR" content="Mozilla/4.7 [fr] (WinNT; I) [Netscape]">\r
+<meta name="Author" content="Alain Buhsing">\r
+<meta name="Classification" content="Logiciel scientifique.">\r
+<meta name="Description" content="Description du logiciel Moïra">\r
+<meta name="KeyWords" content="Environnement de développement, Logiciel scientifique"><title>Projet HEXABLOCK</title></head>\r
+<body>\r
+&nbsp;\r
+<table cols="2" width="100%">\r
+<tbody>\r
+<tr>\r
+<td><img src="logo-cs.gif" alt="Simply Moira" style="width: 145px; height: 84px;"></td>\r
+<td>&nbsp;</td>\r
+</tr>\r
+</tbody>\r
+</table>\r
+<center><a name="DebutPage"></a>\r
+<br>\r
+<big><big><b><font size="+3"><big><big>HexaBlock</big></big></font></b></big></big><b><font size="+3"><br>\r
+<br>\r
+<small>Bibliothèque de formes</small><br><small><small><br>Documentation interne du moteur</small></small><br>\r
+</font></b></center>\r
+<blockquote><i><span style="font-weight: bold;"></span><br>\r
+Ce document constitue la documentation interne du composant HEXABLOCK.<br>Ce\r
+document fait partie des sources du projet et&nbsp;est géré en\r
+configuration Pour le mettre à jour, utiliser kompozer, disponible sur\r
+Linux<br>\r
+<br>\r
+</i></blockquote>\r
+<hr width="100%">\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b> Table of contents :</b>\r
+<br>\r
+&nbsp;\r
+</p>\r
+<center>\r
+<table style="width: 677px; height: 108px;">\r
+<tbody>\r
+<tr>\r
+<td>\r
+<dt><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp; <a href="#Partie_1">Partie&nbsp;1 : Prévisualisation des éléments créés</a></dt>\r
+</td>\r
+</tr>\r
+<tr>\r
+<td>\r
+<dt><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp;&nbsp;<a href="#Partie_2">Partie 2 : Nouvelles fonctions de construction</a></dt><ul><li><a href="#Partie_2">Création d'hexaèdres</a></li><li><a href="#Partie_2.2">Génération d'hexaèdres par révolution</a></li><li><a href="#Partie_2.3">Substitution d'hexaèdres</a></li></ul>\r
+</td>\r
+</tr>\r
+<tr>\r
+<td><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp; <a href="#Partie_3">Partie 3 : Bibliothèques de formes</a></td>\r
+</tr>\r
+\r
+\r
+<tr><td><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp; <a href="#Partie_4">Partie 4 : Evolution des associations</a></td></tr></tbody>\r
+</table>\r
+</center>\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b> See also :</b></p><center>\r
+<table style="width: 677px; height: 60px;">\r
+<tbody>\r
+<tr>\r
+<td>\r
+<dt><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp;&nbsp;<a href="LastNews.html"><span style="text-decoration: underline;">Last news</span></a></dt>\r
+</td>\r
+</tr>\r
+<tr><td><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp; Last last News : Voir les <a href="#Partie_3">nouvelles formes </a><br> </td></tr><tr><td><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp; Précisions sur las <a href="AssoLines.html">associations par lignes</a></td></tr><tr>\r
+<td>\r
+<dt><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp;&nbsp;<a href="Questions.html"><span style="text-decoration: underline;">Frequently asked questions</span></a></dt>\r
+</td>\r
+</tr><tr><td><img src="green-ball.gif" alt="o" height="12" width="12"> &nbsp;&nbsp;<a href="Bugs.html">Maintenance</a></td></tr>\r
+\r
+\r
+\r
+</tbody>\r
+</table>\r
+</center>\r
+<p></p>\r
+<hr width="100%">\r
+<p><a name="Partie_1"></a></p>\r
+<p><big><img src="blue-ball.gif" alt="o" height="12" width="12"><b><font size="+1"><big> Partie 1 : prévisualisation des éléments créés</big></font></b></big></p>Pour\r
+que SALOME puisse prévisualiser le "document" en cours de modivication,\r
+il est nécessaire&nbsp;de créer une copie de l'original. L'évolution\r
+majeure du moteur &nbsp;consiste à implémenter une fonction de\r
+copie.&nbsp; <br><br>Ce qui revient à ajouter dans la classe Document la méthode suivante :<br><br>\r
+<table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>Document* copyDocument ();\r
+</td>\r
+</tr>\r
+</tbody>\r
+</table>\r
+<br>La valeur rendue est le document copié.<br>Les éléments copiés sont les éléments\r
+intrinsèques du document : vertices, edges, quadrangles, hexaèdres,\r
+lois. Qui sont aussi ceux sauvegardés dans un texte XML. On ne stocke\r
+pas les éléments intermédiaires de construction (grilles, vecteurs,\r
+etc...).<br><br>Cette règle pourra être remise en cause si l'application interactive a besoin d'autres informations.<br><br>La copie se déroule ainsi :<br><ul><li>Chaque élément dispose d'un champ (nommé <span style="font-weight: bold;">clone</span>) qui permet de mémoriser l'adresse du dernier élément copié à partir de cet élément dans le cadre de la copie de document.</li><li>Copier&nbsp;les\r
+éléments de bas niveau (les vertices) : méthode&nbsp;<span style="font-weight: bold;">Vertex::duplicate(Document* cible)</span>. Cette méthode ne rend pas de pointeur ; elle crée un clone du sommet courant et le mémorise sur le champ <span style="font-weight: bold;">clone</span> de la classe <span style="font-weight: bold;">Vertex</span>.</li><li>Copier&nbsp; les éléments présents de plus haut niveau dans l'ordre (edges, quads, hexas) : méthode virtuelle <span style="font-weight: bold;">EltBase::duplicate ()</span></li><ul><li>Si\r
+un élément utilise n éléments de plus bas niveau, sa copie utilise les\r
+copies des éléments utilisés. Il est aisé de retrouver la copie car on\r
+en a stocké l'adresse.</li><li>Détail\r
+: la méthode duplicate n'a pas besoin d'argument de type Document* elle\r
+reprend le document cible des éléments de plus bas niveau..</li></ul><li>Copier les lois</li></ul>Les associations sont copiées lors de la copie de chaque élément.<br><br><br>\r
+<a href="#DebutPage">Retour au début</a>\r
+<hr width="100%">\r
+<p><a name="Partie_2"></a></p>\r
+<p><big><img src="blue-ball.gif" alt="o" height="12" width="12"></big><b><font size="+1"><big>\r
+&nbsp;Partie 2 : Nouvelles fonctions de construction</big></font></b></p><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 2.1 Création d'Hexaèdres</big></font></b></p>\r
+<p class="MsoNormal" style="text-align: left;" align="left">Il s'agit de construire un hexaèdre à partir de quadrangles déjà créés dans le\r
+modèle de blocs. Cet hexaèdre est produit à partir des 4 cas suivants :</p>\r
+\r
+<ul style="margin-top: 0cm;" type="disc"><li class="MsoNormal" style="text-align: left;">à partir de 2 quadrangles reliés ou pas,</li><li class="MsoNormal" style="text-align: left;">à partir de 3 quadrangles tous reliés,</li><li class="MsoNormal" style="text-align: left;">à partir de 4 quadrangles tous reliés,</li><li class="MsoNormal" style="text-align: left;">à partir de 5 quadrangles tous reliés.</li></ul>Les points d'entrée sont naturellement :<br><br>\r
+\r
+<span style="font-size: 11pt; font-family: Garamond;"></span>\r
+<table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>Hexa* <a href="#addHexa2Quads">addHexa2Quads</a> (Quad* q1,&nbsp;Quad* q2);<br>Hexa* <a href="#addHexa3Quads">addHexa3Quads</a> (Quad* q1,&nbsp;Quad* q2, Quad* q3);<br>Hexa* <a href="#addHexa4Quads">addHexa4Quads</a> (Quad* q1,&nbsp;Quad* q2, Quad* q3,&nbsp;Quad* q4);<br>Hexa* <a href="#addHexa5Quads">addHexa5Quads</a> (Quad* q1,&nbsp;Quad* q2, Quad* q3,&nbsp;Quad* q4,&nbsp;Quad* q5);</td>\r
+</tr>\r
+</tbody>\r
+</table><p>Chacun des cas amène une discussion. La démarche est la suivante :&nbsp;</p><ul><li>Les quadrangles passés en argument dans un ordre quelconque.</li><li>Un\r
+analyseur d'intersections (classe&nbsp;<span style="font-weight: bold;">AnaQuads</span>,\r
+définie dans\r
+HexAnaQuads.hxx) détermine les arêtes communes aux n quadrangles passés\r
+en argument. et mémorise ces informations qui seront transmises aux\r
+fonctions internes, afin de ne pas répêter ces calculs d'intersection.</li><li>En fonction du nombre d'arêtes communes à chaque quadrangle, on se ramène à 7 cas.&nbsp;</li><li>Si le nombre d'arêtes communes est insuffisant, le cas est rejeté.</li><li>On nomme ces cas en se servant de la nomenclature des faces dans le projet : (A, B, C, D, E,F)</li></ul>Remarques :<br><ul><li>Les quadrangles passés en arguments sont considérés comme planaires, il n'y a pas de contrôle d'arguments en entrée à ce niveau</li><li>Ils\r
+sont sensés générer des quadrangles planaires et non croisés. Par\r
+exemple pour addHexaQuadsACD() : il n'y a pas de contrôle de planéité\r
+de la face B.&nbsp;</li></ul><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Rappel&nbsp; :&nbsp; formalisation des Hexaèdres/Quadrangles/Vertex</span><br><br><a name="RappelNotations"></a><br>Pour rappel :<br><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; z=0&nbsp;&nbsp; z=1&nbsp;&nbsp;\r
+y=0&nbsp;&nbsp; y=1&nbsp;&nbsp; x=0&nbsp; x=1<br>enum EnumHQuad&nbsp;&nbsp; {Q_A,&nbsp; Q_B,&nbsp; Q_C,&nbsp; Q_D,&nbsp; Q_E, Q_F,&nbsp; HQ_MAXI};<br></td>\r
+</tr>\r
+</tbody>\r
+</table><br>La face A est opposée à B, C est opposée à D, E à F. La\r
+position des faces&nbsp; A, C, E normales à Oz, Oy, Ox est purement\r
+théorique. Elle améliore la visualisation. Les orientations sont en\r
+fait&nbsp; interchangeables. On peut intervertir les couples (C,D) et\r
+(E,F), on peut intervertir A et B, C et D, E et F, l'essentiel est\r
+d'avoir une cohérence&nbsp; avec les autres dénominations d'edges (ac,\r
+af, ad ...) ou de&nbsp;sommets (ace, acf, adf ...) &nbsp;et les\r
+conventions de départ.<br><br>L'arête située entre la face X et la face Y est notée xy. Un sommet situé entre les 3 faces X, Y Z est noté xyz :<br><br><table style="font-family: monospace; width: 500px; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 50%;"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6=bde&nbsp; +----bd-----+ bdf=7<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+/|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /|<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; be |&nbsp;&nbsp; <big><span style="font-weight: bold;">B</span></big>&nbsp;&nbsp;&nbsp; bf |<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp; |<br>&nbsp;&nbsp;&nbsp; 4=bce +----bc-----+...|...bcf=5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; de&nbsp;&nbsp;&nbsp;&nbsp; <big><big style="font-weight: bold;">D</big></big> |&nbsp;&nbsp; df<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+| <big><span style="font-weight: bold;">E</span></big> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <big style="font-weight: bold;">F</big>\r
+|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+z<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ce&nbsp;&nbsp; |\r
+<span style="font-weight: bold;"><big>C</big>&nbsp;</span>&nbsp;&nbsp;&nbsp; cf&nbsp;\r
+|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+^<br>&nbsp; 2=ade...|...+----ad-|---+ adf=3&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; y<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+|&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;\r
+/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+|&nbsp; /<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |\r
+ae&nbsp;&nbsp;&nbsp; <big><span style="font-weight: bold;">A</span></big>&nbsp;&nbsp; |\r
+af&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+| /<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+|/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+|/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+|/<br>&nbsp;&nbsp;&nbsp; 0=ace +----ac-----+ acf=1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-----&gt;&nbsp;x<br>&nbsp;&nbsp; <br><br></td>\r
+</tr>\r
+</tbody>\r
+</table><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">La classe AnaQuads</span><br><br>Cette\r
+classe analyse les relations topologiques existant entre plusieurs\r
+quandrangles. Un objet de ce type est créé au début de chaque fonction\r
+addHexaXQuads.<br><br>Le constructeur est :<br><br>\r
+\r
+<span style="font-size: 11pt; font-family: Garamond;"></span>\r
+<table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>AnaQuads (Quad* q1, Quad* q2, Quad* q3=NULL, Quad* q4=NULL, Quad* q5=NULL);<br></td>\r
+</tr>\r
+</tbody>\r
+</table><br>Les champs affectés lors de la construction de l'objet :<br><br><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td>MawQuads </td><td>Constante égale à 5 5</td></tr><tr><td>int&nbsp;&nbsp;&nbsp; nbr_quads;</td><td>Nombre de quadrangles</td></tr><tr><td>int&nbsp;&nbsp;&nbsp; nbr_aretes;</td><td>Nombre total d'arêtes</td></tr><tr><td>Quad*&nbsp; tab_quads&nbsp; [i];</td><td>Le ième quadrangle passé en argument </td></tr><tr><td>int&nbsp;&nbsp;&nbsp; inter_nbre [i];</td><td>Nombre d'intersections du ième quadrangle</td></tr><tr><td>int&nbsp;&nbsp;&nbsp; inter_edge [i][j];</td><td>Nro d'arête de i intersectant le jème quadrangle</td></tr><tr><td>int&nbsp;&nbsp;&nbsp; inter_quad [i][j];</td><td>Nro de quadrangle présent sur la jème arete du iéme quad</td></tr></tbody></table><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">La classe Cramer</span><br><br>Cette\r
+classe résout un système linéaire de n équations &nbsp;à n inconnues.\r
+Quand n est "petit", n&lt;10. Peut être réutilisée sur un autre projet.\r
+<br>Implémentation : HexCramer.hxx.<br>Test unitaire : test_cramer dans test_hexa1.cxx<br><br><br>\r
+\r
+<span style="font-size: 11pt; font-family: Garamond;"></span>\r
+<table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>int test_cramer (int nbargs, cpchar tabargs[])<br>{<br>&nbsp;&nbsp; double matrice [] = { 2, 7, 1,&nbsp; &nbsp; 0, 3, 0,&nbsp; &nbsp; 1, 9, 5 };<br>&nbsp;&nbsp; double second_membre&nbsp; [] = { 1, 1, 1 };<br>&nbsp;&nbsp; Hex::Real3&nbsp; solution;<br>&nbsp;&nbsp; <span style="font-weight: bold;">Hex::Cramer system(3)</span>; &nbsp; // On dimensionne le système de Cramer à la construction<br><br>&nbsp;&nbsp; int ier = <span style="font-weight: bold;">system.resoudre</span> (matrice, second_membre, solution);<br><br>&nbsp;&nbsp;\r
+cout &lt;&lt; " Solution&nbsp; = (" &lt;&lt; solution[0] &lt;&lt; ", "\r
+&lt;&lt; solution[1] &lt;&lt; ", " &lt;&lt; solution[2] <br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;&lt; "), ier = " &lt;&lt; ier &lt;&lt; endl;<br>&nbsp;\r
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\r
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Pour vérifier : <br>&nbsp;&nbsp; Hex::Real3 produit;<br>&nbsp;&nbsp; <span style="font-weight: bold;">system.multiply</span> (solution, produit);<br>&nbsp;&nbsp;\r
+cout &lt;&lt; " Produit&nbsp;= (" &lt;&lt; produit[0] &lt;&lt; ", "\r
+&lt;&lt; produit[1] &lt;&lt; ", " &lt;&lt; produit[2] <br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;&lt; ")" &nbsp;&lt;&lt; endl;<br>&nbsp;&nbsp; return HOK;<br>}<br></td>\r
+</tr>\r
+</tbody>\r
+</table><br><br><br><a name="addHexa2Quads"></a><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Création d'un hexaèdre avec deux quadrangles :&nbsp;</span>&nbsp;<ul><li>La classe AnaQuads ne détecte aucune arête commune : appel à addHexaQuadsAB</li><li>La classe AnaQuads&nbsp; détecte&nbsp;une arête commune : appel à addHexaQuadsAC</li></ul><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="Quads_AB.png" style="width: 282px; height: 226px;" alt="En diedre"></p></td><td style="vertical-align: middle; text-align: center;"><img src="Quads_AC.png" style="width: 278px; height: 223px;" alt="Vis a vis"></td></tr><tr><td style="vertical-align: middle;">addHexa2Quads avec 2 quadrangles&nbsp; non reliés. <br>Fonction : addHexaQuadsAB</td><td style="vertical-align: middle;">addHexa2Quads avec 2 quadrangles&nbsp;&nbsp; reliés. <br>Fonction : addHexaQuadsAC</td></tr></tbody></table><p><span style="font-weight: bold;"></span></p><p><span style="font-weight: bold;">addHexaQuadAB</span> :</p>Les huits sommets sont présents, il manque quatre arêtes verticales ce, cf, df, de.<br>La\r
+difficuté consiste à faire correspondre deux à deux les quatre sommets\r
+de chaque quadrangle sans que les arêtes ne se croisent. La situation\r
+est analogue à <span style="font-weight: bold;">mergeQuads</span> ou <span style="font-weight: bold;">joinQuads</span>, sauf que dans ces cas, on passe\r
+en argument quatre vertex pour déterminer dans ambiguité les sommets\r
+correspondants deux à deux. On a choisi ici\r
+d'automatiser l'association :<br><ul><li>il\r
+existe huit combinaisons permettant d'associer deux à deux les 4\r
+sommets de 2 quadrangles : décalage de 0 à 3 dans un sens puis dans\r
+l'autre. </li><li>Pour chaque combinaison, on calcule la longueur totale des 4 arêtes créées.</li><li>On retient la combinaison qui mène à une longueur minimale.</li></ul>Une fois la combinaison optimale établie :<br><ul><li>Création\r
+des 4 arêtes verticales en fonction des combinaisons, stockées dans un\r
+tableau tedge[4]. Le premier vertex fourni est celui de la face A. </li><li>Création des 4 quadrangles verticaux.</li><li>Création de l'hexaèdre.</li></ul>Pour créer le&nbsp;i-ème quadrangle vertical : <br><ul><li>l'arête verticale de gauche e_left = tedge[i]</li><li>l'arête verticale de droite e_left = tedge[(i+1) modulo 4]</li><li>l'arête\r
+horizontale basse s'obtient grâce à la fonction Quad::findEdge (v1,\r
+v2). On recherche dans le quadrangle A l'arête dont les 2 sommets sont\r
+les extrémités amont des arêtes e_left et e_right, qui par construction\r
+appartiennent au quadrangle A.</li><li>idem pour&nbsp; l'arête haute ; sauf que ce sont les extrémités aval.</li></ul> <p><span style="font-weight: bold;">addHexaQuadAC</span> :</p><p>Deux\r
+faces présentes A et C, une arête commune ac. Il manque deux sommets\r
+bde et bdf à partir desquels on construit les arêtes manquantes bd,\r
+be, de, bf, df.&nbsp;<br>On doit s'assurer de la planéité des quadrangles créés. </p><p>La\r
+solution n'est pas unique. Il existe une infinité de sommets pouvant\r
+définir un hexaèdre &nbsp;conforme. On se contente ici d'en choisir une\r
+et de démontrer que l'objet créé est conforme.&nbsp;</p><p>Le point bde (resp bdf) est construit en\r
+sommant les vecteurs ac et ce (resp&nbsp;af et cf), ce qui revient à\r
+définir un parallélogramme. On assure ainsi sa présence dans le plan E\r
+(resp. F). Les faces créées E et F sont donc planaires.</p><p>Pour démontrer la planéité de la face B :<br></p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td><ol><li>(ae , af)&nbsp; coplanaires (donnée)</li><li>be = ae (construction d'un parallèlogramme)</li><li>df = af &nbsp;(idem)</li><li>(1), (2), (3) =&gt; (be, bf) coplanaires </li></ol></td>\r
+</tr>\r
+</tbody>\r
+</table><br>On procéderait de la même manière pour établir que la face D est plane.<br><br>La fonction s'écrit ainsi :<br><ul><li>q_a est le premier quadrangle fourni, q_c le second</li><li>L'edge e_ac est défini qrâce à la strucrure AnaQuads</li><li>On effectue un calcul analogue aux deux extrémités s (amont et aval) de e_ac :</li><ul><li>vx1 = extrémité étudiée de e_ac, vx2 l'autre</li><li>vxa\r
+= sommet adjacent de vx1 sur&nbsp; la face A, différent de vx2. Il est\r
+obtenu en prenant le sommet opposé à vx2 sur la face A. L'indice de vxa\r
+dans qa vaut vx2+2 modulo 4.</li><li>de même, vxc = sommet adjacent de vx1 sur la face&nbsp; C.</li><li>Calcul des coordonnées&nbsp;et&nbsp; création du vertex tv_bdx[s] (x représente la choix entre e et f).</li><li>Création des deux arêtes manquantes&nbsp;te_bx[s] et te_dx[s]</li><li>Création&nbsp;du quadrangle latéral tq_ef [s]</li></ul><li>Création de l'arête e_bd à partir des deux vertices de&nbsp; tv_bdx</li><li>Création\r
+du quadrangle D à partir de te_dx[], e_ef, te_dx[1] et de l'arête\r
+opposée à e_ac dans A (fonction Quad::getOpposedEdge(e,n)</li><li>Création du quadrangle B à partir de te_bx[], e_ef, te_bx[1] et de\r
+l'arête opposée à e_ac dans C (fonction Quad::getOpposedEdge(e,n)</li><li>Création de l'hexaèdre</li></ul><p><a name="addHexa3Quads"></a></p><p><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Création d'un hexaèdre avec trois quadrangles :&nbsp;</span>&nbsp;</p><ul><li>La\r
+classe AnaQuads&nbsp; détecte deux arêtes communes : appel à\r
+addHexaQuadsACD. La face A sera celle qui possède deux arêtes communes,\r
+la face C la suivante, D la derniére.</li><li>La classe AnaQuads&nbsp;\r
+détecte trois arêtes communes : appel à addHexaQuadsACE. Ce cas est\r
+symétrique, la face A sera la première de la liste, C la seconde.</li></ul><p></p><br><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="Quads_ACD.png" style="width: 282px; height: 226px;" alt="En diedre"></p></td><td style="vertical-align: middle; text-align: center;"><img src="Quads_ACE.png" style="width: 278px; height: 223px;" alt="Trièdre"></td></tr><tr><td style="vertical-align: middle;">addHexa2Quads avec 3 quadrangles&nbsp;disposés en U. <br>Fonction : addHexaQuadsACD</td><td style="vertical-align: middle;">addHexa2Quads avec&nbsp; quadrangles disposés&nbsp; en trièdre<br>Fonction : addHexaQuadsACE</td></tr></tbody></table><p><br></p><p><span style="font-weight: bold;">addHexaQuadACD</span> :</p><p>Tous les sommets sont présents. Il reste à créer :</p><ul><li>Les arêtes be et bf&nbsp;</li><li>Les quadrangles E, B, F en déterminant les arêtes qui les constituent. </li></ul><p>La difficulté est d'identifier clairement les arêtes et les sommets à partir des quadrangles existant :&nbsp;</p><ul><li>q_a est le quadrangle qui possède deux arêtes communes, q_b et q_c les suivants.</li><li>On exploite les indices d'edges communs fournis par <span style="font-weight: bold;">AnaQuads</span>. Rappelons que dans un quadrangle le ième edge est adjacent aux edges i-1 et i+1 et opposé à l'edge i+2.</li><li>e_ac et e_ad sont les intersections de q_a avec q_c et q_d. (nommés ici mais non utilisés dans le programme)</li><li>e_bc est l'arête opposée à e_ac dans q_c,&nbsp;&nbsp;e_bd est l'arête opposée à e_ad dans q_d.</li><li>e_ae\r
+est l'arête suivante de e_ac dans q_a, e_af &nbsp;l'arête précédente.\r
+Ce choix arbitraire&nbsp; détermine les autres dénominations.</li><li>e_ce est l'arête adjacente de e_ac dans q_c qui a un sommet commun (v_ace) avec e_ae.</li><li>e_de est l'arête adjacente de e_ac dans q_d qui a un sommet commun (v_ade) avec e_ae.</li><li>v_acf est le sommet commun à e_af et e_cf</li><li>v_adf est le sommet commun à e_af et e_df</li><li>Création de l'arete e_be &nbsp;à paertir de e_bce et v_bde, puis de l'arête e_bf,</li><li>Créations des quadrangles q_b, q_e, q_f</li><li>Création de l'hexaèdre.</li></ul><p></p><p><span style="font-weight: bold;">addHexaQuadACE</span> :</p><p>Il\r
+est nécessaire de créer le sommet v_bdf. Il est l'intersection des\r
+plans (B, D, F). Chaque plan est défini par trois points présents sur\r
+les autres quadrangles :</p><ul><li>Le plan B est défini par les sommets bcd, bce, bcf . Son vecteur normal norm_b est le produit vectoriel&nbsp;de bc par be.</li><li>Le plan D est défini par les sommets adf, ade, adb. Son vecteur normal norm_d&nbsp; est le produit vectoriel&nbsp;de ac par ae.</li><li>Le\r
+plan F est défini par les sommets adf, acf, bcf.&nbsp; Son vecteur\r
+normal norm_f&nbsp; est le produit vectoriel&nbsp;de ae par ec.</li></ul><p>Soit un plan P défini par un point A et un vecteur normal N. Un point M appartient à P si le produit scalaire N.AM est nul</p><p>On obtient le système d'équations <br></p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td><ol><li>(bdf,bce) . norm_b = 0</li><li>(bdf,ade) . norm_d = 0</li><li>(bdf,acf) . norm_f = 0</li></ol></td>\r
+</tr>\r
+</tbody>\r
+</table>Equivalent à :&nbsp;<br><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td><ol><li>&nbsp; &nbsp;norme_b[0]*X + norme_b[1]*Y + norme_b[2]*Z = prod_scalaire (v_bce, norm_b)</li><li>&nbsp;&nbsp; norme_d[0]*X + norme_d[1]*Y + norme_d[2]*Z =&nbsp;prod_scalaire (v_ade, norm_d)</li><li>&nbsp;&nbsp; norme_f[0]*X + norme_f[1]*Y + norme_f[2]*Z =&nbsp;prod_scalaire (v_acf, norm_f)</li></ol></td>\r
+</tr>\r
+</tbody>\r
+</table><br>Ce système de 3 équations à trois inconnues est résolu par la méthode de <span style="font-weight: bold;">Cramer</span> au moyen d'une classe du même nom défini dans le nouveau fichier <span style="font-weight: bold;">HexCramer.hxx.</span> Notons qu'un test unitaire de la classe Cramer existe dans le fichier test_quads.cxx<br style="font-weight: bold;"><p>Une fois le système résolu ; s'il n'est pas régulier on retourne un vecteur nul, la suite est aisée :</p><ul><li>Création du vertex s_bdf à partir des coordonnées calculées</li><li>Détermination\r
+des sommets opposés s_be, s_bcf, s_adf en utilisant la méthode\r
+Edge::commonVertex (edge) sur les arêtes dèja déterminées.</li><li>Création des 3 arêtes manquantes e_bd, e_bf, e_df</li><li>Création des quadrangles manquants q_b, q_d, q_f.</li><li>Création de l'hexaèdre.</li></ul><p><a name="addHexa4Quads"></a></p><p><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Création d'un hexaèdre avec quatre quadrangles :&nbsp;</span>&nbsp;</p><ul><li>La classe AnaQuads&nbsp;\r
+détecte trois arêtes communes : appel à addHexaQuadsACDE.&nbsp;La face A sera la première trouvée qui en possède trois,\r
+la face E la suivante à trois arêtes,C et D lles deux autres faces à deux arêtes communes.</li><li>La classe AnaQuads&nbsp; détecte quatre arêtes communes : appel à\r
+addHexaQuadsABCD.&nbsp;Ce\r
+cas est\r
+symétrique chaque face possède deux arêtes. La face A sera la première\r
+de la liste, C et D&nbsp;les deux faces sécantes à A, B la dernière.</li></ul><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="Quads_ABCD.png" style="width: 282px; height: 226px;" alt="En tunnel"></p></td><td style="vertical-align: middle; text-align: center;"><img src="Quads_ACDE.png" style="width: 278px; height: 223px;" alt="En but"></td></tr><tr><td style="vertical-align: middle;">addHexa2Quads avec 4 quadrangles&nbsp; disposés en tunnel. <br>Fonction : addHexaQuadsABCD</td><td style="vertical-align: middle;">addHexa2Quads avec 4 quadrangles&nbsp;disposés en fauteuil. <br>Fonction : addHexaQuadsACDE</td></tr></tbody></table><p><span style="font-weight: bold;">addHexaQuadABCD</span> :</p><p>Le\r
+rôle des quadrangles passés en&nbsp;arguments est symétrique On nommera q_a\r
+le premier trouvé, q_c le premier qui intersecte q_a, q_c le second et\r
+q_d celui qui n'intersecte pas q_a.</p><p>Tous les sommets et arêtes sont présents. Il suffit de créer les deux quadrangles E et F:</p><p>Les problèmes de détermination des variables se traitent comme dans <span style="font-weight: bold;">addHexaQuadABC</span></p><p><span style="font-weight: bold;">addHexaQuadACDE</span> :</p><p>Le rôle de q_a et qc est symétrique. Ils ont chacun trois arêtes communes avec les autres. q_e et q_f n'en ont que 2.</p><p>Tous les sommets sont présents. Il suffit de créer l'arête e_bf et les deux quadrangles B et F:</p><p>Les edges se déterminent aisément grâce aux indices d'intersection fournis par <span style="font-weight: bold;">AnaQuads</span>. Il suffit<small><small><small><small> </small></small></small></small>de prendre l'opposé. On utilise la propriété de la classe Quad : l'indice d'une arête opposée à l'arête i vaut i+2.</p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td>&nbsp;&nbsp; int&nbsp;&nbsp; nc_ac = strquads.inter_edge[pos_c][pos_a]; // Nro dans&nbsp; q_c de e_ac<br>&nbsp;&nbsp; int&nbsp;&nbsp; nc_ce = strquads.inter_edge[pos_c][pos_e]; // Nro dans&nbsp; q_c de e_ce<br>&nbsp;&nbsp; int&nbsp;&nbsp; nd_ad = strquads.inter_edge[pos_d][pos_a]; // Nro dans&nbsp; q_d de e_ad<br>&nbsp;&nbsp; int&nbsp;&nbsp; nd_de = strquads.inter_edge[pos_d][pos_e]; // Nro dans&nbsp; q_d de e_de<br>&nbsp;&nbsp; int&nbsp;&nbsp; ne_ae = strquads.inter_edge[pos_e][pos_a]; // Nro dans&nbsp; q_e de e_ae<br><br>&nbsp;&nbsp; Edge* e_af&nbsp; = q_a-&gt;getEdge ((na_ac + 3) MODULO QUAD4);<br>&nbsp;&nbsp; Edge* e_bc&nbsp; = q_c-&gt;getEdge ((nc_ac + 2) MODULO QUAD4);<br>&nbsp;&nbsp; Edge* e_cf&nbsp; = q_c-&gt;getEdge ((nc_ce + 2) MODULO QUAD4);<br>&nbsp;&nbsp; Edge* e_bd&nbsp; = q_d-&gt;getEdge ((nd_ad + 2) MODULO QUAD4);<br>&nbsp;&nbsp; Edge* e_df&nbsp; = q_d-&gt;getEdge ((nd_de + 2) MODULO QUAD4);<br>&nbsp;&nbsp; Edge* e_be&nbsp; = q_e-&gt;getEdge ((ne_ae + 2) MODULO QUAD4);<br><br>&nbsp;&nbsp; Vertex* v_bcf = e_cf-&gt;opposedVertex (e_cf-&gt;commonVertex (e_af));<br>&nbsp;&nbsp; Vertex* v_bdf = e_df-&gt;opposedVertex (e_df-&gt;commonVertex (e_af));</td>\r
+</tr>\r
+</tbody>\r
+</table><p><a name="addHexa5Quads"></a></p><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Création d'un hexaèdre avec cinq quadrangles :&nbsp;</span> <br><br>Il n'y a pas besoin de dissocier plusieurs cas, le travail est réalisé directement dans la méthode <span style="font-weight: bold;">addHexa5Quads</span>().<br><p style="text-align: center;"><img src="Quads_5.png" style="width: 278px; height: 223px;" alt="En but"></p>Ce cas est assez simple : c'est un hexaèdre auquel il manque la face que l'on convient de nommer B.<br><ul><li>La face q_a est celle qui possède 4 intersections.</li><li>Une\r
+fois son indice qbase déterminé dans AnaQuads, on boucle sur les 4\r
+quadrangles sécants à q_a et on obtient l'arête opposée t_edge[i] et le\r
+quadrangle associé tquad[i]. Les quadrangles q_c, g_d, q_e, q_f se\r
+retrouvent dans le tableau tquad dans un ordre exploitable, le problème\r
+étant symétrique.</li><li>On construit qb à partir des t_edge[i] donnés dans\r
+cet odre :&nbsp; q_b&nbsp; = new Quad (tedge[0], tedge[1], tedge[2],\r
+tedge[3]);</li><li>Enfin l'hexaèdre : hexa = new Hexa (q_a, q_b, tquad[0], tquad[2], tquad[1], tquad[3])</li></ul><p><a href="index.html#DebutPage">Retour au début</a></p><a name="Partie_2.2"></a><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 2.2 Génération d'Hexaèdres par révolution</big></font></b></p><p>Le pont d'entrée dans la classe Document est :<br>\r
+\r
+<span style="font-size: 11pt; font-family: Garamond;"></span>\r
+</p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>Elements* revolutionQuads (Quads&amp; start, Vertex* center, Vector* axis, vector&lt;double&gt;&amp; angles);<br></td>\r
+</tr>\r
+</tbody>\r
+</table><br>Avec :<br><ul><li><span style="font-weight: bold;">start</span> est la liste des quadrangles de départ. Ils doivent constituer une surface libre. Rappelons que le type <span style="font-weight: bold;">Quads</span> est équivalent à <span style="font-weight: bold;">vector&lt;Quad*&gt;</span></li><li><span style="font-weight: bold;">center</span> et <span style="font-weight: bold;">axis</span> sont respectivement le centre et l'axe de la rotation</li><li>le vecteur <span style="font-weight: bold;">angles</span> définit pour chaque incrément l'angle de la rotation.</li></ul><br><br><br><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="QuadRevolution1.png" style="width: 282px; height: 226px;" alt="En diedre"></p></td><td style="vertical-align: middle; text-align: center;"><img src="QuadRevolution2.png" style="width: 278px; height: 223px;" alt="Trièdre"></td></tr><tr><td style="vertical-align: middle;">Avant la revolution : on a coloré les quadrangles à déplacer, ainsi que l'axe de rotation.</td><td style="vertical-align: middle;">Résultat de&nbsp; la revolution.</td><td style="vertical-align: middle;"></td></tr></tbody></table><br><p><a href="index.html#DebutPage">Retour au début</a></p><a name="Partie_2.3"></a><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 2.3 Substitution d'Hexaèdres</big></font></b></p><p>Il\r
+s'agit de remplacer un hexaèdre ou des hexaèdres par une autre série\r
+d'hexaaaèdres. Pour pouvoir effectuer ce remplacement, cette autre\r
+série d'hexaèdres doit vérifier des conditions de collage de faces.<br>\r
+\r
+<span style="font-size: 11pt; font-family: Garamond;"></span>\r
+</p><br><br><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="ReplaceBefore.gif" style="width: 282px; height: 226px;" alt="En diedre"></p></td><td style="vertical-align: middle; text-align: center;"><img src="ReplaceResult.gif" style="width: 278px; height: 223px;" alt="Trièdre"></td></tr><tr><td style="vertical-align: middle; text-align: center;">Exemple\r
+: remplacement des 3 hexaèdres jaunes centraux par 3 fois 5 nouveaux\r
+hexaèdres qui sont construits par extrusion des 5 quadrangles marrons\r
+(le motif).</td><td style="vertical-align: middle; text-align: center;">Résultat du remplacement.&nbsp;</td></tr></tbody></table><br><br>La signature de la fonction est la suivante :<br><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td>Elements* Document::revolutionQuads (Hexas&amp; pattern, Vertex* p1,&nbsp;Vertex* c1, <br>&nbsp;\r
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\r
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Vertex*\r
+p2,&nbsp;Vertex* c2,&nbsp;Vertex* p3,&nbsp;Vertex* c3);<br></td>\r
+</tr>\r
+</tbody>\r
+</table><br>Avec :<br><ul><li><span style="font-weight: bold;">pattern </span>est la liste des hexaèdres&nbsp; à extruder.<span style="font-weight: bold;"></span></li><li><span style="font-weight: bold;">c1, c2 </span>et&nbsp;<span style="font-weight: bold;">c3</span>\r
+définissent le quadrangle "cible" QB. Soit QA la face opposée à QB. A\r
+partir de cette face, on définit l'ensemble des n hexaèdres liés par\r
+les faces "opposées" &nbsp;(QAi, QBi).&nbsp;</li><li><span style="font-weight: bold;">p1, p2 </span>et <span style="font-weight: bold;">p3</span> sont les vertices du pattern qui seront associés resperctivement à c1, c2 et c3.&nbsp;&nbsp;</li></ul><p></p><p style="font-weight: bold;"><big>Conditions :&nbsp;</big></p><ul><li>Le pattern doit avoir exactement&nbsp;4 faces latérales externes, que l'on appellera pqc, pqd, pqe, pqf. </li><li>Les\r
+faces"transversales" inférieure et supérieure doivent être\r
+superposables : le motif des quadrangles qui constituent ces faces doit\r
+être identique.</li><li>c1,c2 et c3 sont sur une face externe.</li></ul><p></p><p>Pour désigner les faces d'un hexaèdres, on utilise les&nbsp; <a href="#RappelNotations">notations habituelles</a> définies plus haut.</p><p><big><span style="font-weight: bold;">Conventions et orientations</span></big> : </p><ul><li>Les\r
+3 vertices de départ du pattern définissent deux edges : pe_ac (sens\r
+Ox) et pe_ae (sens oy) et 3 vertices pv_aed, pv_ace, pv_acf.&nbsp;\r
+pv_ace est celui des 3 vertices qui est commun aux deux edges, pv_ade\r
+la première des extrémités. </li><li>Les&nbsp;4 faces latérales externes du pattern sont notées pq_c, pq_d, pq_e, pq_f.</li><li>Les\r
+3 vertices cibles définissent un quadrangle cq_b , deux edges&nbsp;\r
+&nbsp;ce_bc (Ox) et ce_be (Oy) et 3 vertices cv_bed, cv_bce et cv_bcf.&nbsp; Comme pour le pattern.</li></ul><br><p><a href="index.html#DebutPage">Retour au début</a>\r
+</p><hr width="100%">\r
+<p><a name="Partie_3"></a></p>\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b><font size="+1">\r
+&nbsp;<big>Partie 3 : Bibliothèque de formes</big></font></b></p><p>Cette biblothèque est constituée de quatre nouvelles formes :<br></p><ul><li>La demi-sphère trouée&nbsp;</li><li>Le huitième de sphère trouée</li><li>La demi-écorce trouée</li><li>Le huitième d'écorce trouée&nbsp;</li></ul><p>Ces formes sont implémentées (et traduites ....) de la façon suivante :</p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+<tr>\r
+<td><span style="font-family: monospace;">Elements* makeSphere (Vertex* center, </span><span style="font-family: monospace;">Vector* vx, Vector* vz,</span><span style="font-family: monospace;"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double radius,&nbsp;</span><span style="font-family: monospace;">double radhole, </span><span style="font-family: monospace;"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vertex*\r
+plorig,&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int\r
+nrad, int nang, int nhaut);</span><span style="font-family: monospace;"></span><span style="font-family: monospace;"></span><br></td>\r
+</tr>\r
+<tr><td><span style="font-family: monospace;">Elements* makePartSphere (Vertex* center, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">Vector* vx, Vector* vz,</span><span style="font-family: monospace;"> </span><span style="font-family: monospace;"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;double&nbsp; radius, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">double radhole</span><span style="font-family: monospace;">,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex*\r
+plorig,&nbsp;</span><span style="font-family: monospace;">double angle,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int\r
+nrad, int nang, int nhaut);</span></td></tr><tr><td><span style="font-family: monospace;">Elements* makeRind (Vertex* center, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">Vector* vx, Vector* vz,</span><span style="font-family: monospace;"> </span><span style="font-family: monospace;"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;double&nbsp; radius, double radint, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">double radhole</span><span style="font-family: monospace;">,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex*\r
+plorig,&nbsp;</span><span style="font-family: monospace;"></span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int\r
+nrad, int nang, int nhaut);</span></td></tr><tr><td><span style="font-family: monospace;">Elements* makePartRind (Vertex* center, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">Vector* vx, Vector* vz,</span><span style="font-family: monospace;"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: monospace;">double&nbsp; radius, double radint, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">double radhole</span><span style="font-family: monospace;">,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex*\r
+plorig, </span><span style="font-family: monospace;">double angle,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int\r
+nrad, int nang, int nhaut);</span></td></tr></tbody>\r
+</table><br>Remarques :<br><ul><li>Le plan sécant ne passe pas\r
+forcément par le centre de la sphère. Il définit le demi-espace dans\r
+lequel se situe l'objet à dessiner. Il peut même être disjoint de la\r
+sphère. S'il est "en dessous", la sphère est entièrement dessinée, s'il\r
+est "au dessus", l'objet sera vide.&nbsp;&nbsp;</li></ul><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big>&nbsp;3.1&nbsp; <span style="font-family: Terminal;"></span> Aspect visuel (exemples)</big></font></b></p><br>Conditions<br><table style="text-align: left; width: 90%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="vertical-align: middle; text-align: center;"><p><img src="HemiSphere.png" style="width: 282px; height: 226px;" alt="Demi Sphere trouee"></p></td><td style="vertical-align: middle; text-align: center;"><img src="PartSphere.png" style="width: 278px; height: 223px;" alt="Huitième de sphère"></td></tr><tr><td style="vertical-align: middle; text-align: center;">Demi-Sphère trouée (makeSphere ())</td><td style="vertical-align: middle; text-align: center;">Huitième de sphère trouée (makePartSphere ())</td></tr><tr><td style="vertical-align: middle; text-align: center;"><p><img src="Rind.png" style="width: 282px; height: 226px;" alt="Ecorce trouée">&nbsp;&nbsp; &nbsp;</p></td><td style="vertical-align: middle; text-align: center;"><p><img src="PartRind.png" style="width: 282px; height: 226px;" alt="Huitième d'ecorce"> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</p></td></tr><tr><td style="text-align: center;" valign="middle">Demi écorce trouée (makeRind ())</td><td style="text-align: center;" valign="middle">Huitième d'écorce trouée (makePartRind ())</td></tr></tbody></table><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big>&nbsp;3.1&nbsp; <span style="font-family: Terminal;"></span> Im</big></font></b><b><font size="+1"><big>plémentation</big></font></b></p><p>Toutes ces fonctions publiques appellent une seule fonction&nbsp; de la classe <span style="font-weight: bold;">Elements :</span></p><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+\r
+<tr><td><span style="font-family: monospace;">int makeRind (EnumGrid type, Vertex* center, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">Vector* vx, Vector* vz,</span><span style="font-family: monospace;"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-family: monospace;">double&nbsp; radius, double radint, </span><span style="font-family: monospace;"></span><span style="font-family: monospace;">double radhole</span><span style="font-family: monospace;">,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex*\r
+plorig, </span><span style="font-family: monospace;">double angle,</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int\r
+nrad, int nang, int nhaut);</span></td></tr></tbody>\r
+</table><br>Une fonction <span style="font-weight: bold;">controlRind() </span>vérifie\r
+la cohérence des arguments passés en entrée et calcule les deux extrema\r
+de l'angle d'élévation phi (voir chapitre suivant).<br>Une boucle à triple indice sur (nrad, nang, nhaut) calcule les coordonnées des sommets par appel de la fonction <span style="font-weight: bold;">getCylPoint (nx,ny,nz, px,py,pz)</span>.<br>Ce\r
+calcul se fait sur une sphère de centre O et d'axe Oz, dont les\r
+hexaedres sont comptés à partir de l'axe Ox de façon à remplir le\r
+secteur angulaire theta.. Les coordonnées sont ensuite replacées dans\r
+les coordonnes utilisateur grâce à la fonction <span style="font-weight: bold;">transfoVertices</span>(). Edges, quadrangles et hexaèdres sont ensuites assemblés grâce à &nbsp;la fonction <span style="font-weight: bold;">fillGrid</span>().<br><br><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big>&nbsp;3.2 Détermination de l'angle d'élévation (phi) <span style="font-family: Terminal;"></span>&nbsp;</big></font></b></p>L'angle\r
+d'azimuth theta (longitude) est défini explicitement par l'utilisateur.\r
+L'angle d'élévation phi est délimité par la position du&nbsp; plan\r
+horizontal et par le diamètre du trou. &nbsp;Soit :<br><ul><li>Une sphère de centre O et de rayon R.</li><li>La phère est traversée par un trou cylindrique de rayon r.</li><li>Un plan défini par son vecteur normal n (vertical sur la figure qui suit) et un point A</li></ul><p style="text-align: center;"><img src="Sphere.gif" style="width: 373px; height: 311px;" alt="Sphere"></p>A partir de ces éléments de base, on&nbsp; définit<small><small><small><small><small><small> </small></small></small></small></small></small>:<br><ul><li>Le point H, projection orhogonale du centre O de la sphere sur le plan (A,n)</li><li>L'angle alpha défini par le centre O et le cylindre : sin (alpha) = &nbsp;r/R</li><li>L'angle beta délimité&nbsp; par l'horizontale et l'intersection du plan (A,n) et de la sphère.&nbsp;</li><ul><li>sin (beta) = OH/R</li><li>et OH = OA.n/|n| &nbsp;(produit scalaire de OA par le vecteur unitaire associé à n).</li></ul></ul>L'angle d'élévation&nbsp; phi &nbsp;est encadré par les valeurs suivantes : <ul><li>max (alpha-pi/2, beta) &lt;= phi &lt;= pi/2 - alpha</li></ul><br><p><a href="index.html#DebutPage">Retour au début</a>\r
+</p><hr width="100%">\r
+<p><a name="Partie_4"></a></p>\r
+<p><img src="blue-ball.gif" alt="o" height="12" width="12"><b><font size="+1">\r
+&nbsp;<big>Partie 4 : Evolution des associations</big></font></b></p><p class="MsoNormal">Cette tâche est composée de 3 évolutions, au sujet de\r
+l'association, qui sont décrites ci-après.</p><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 4.1 Nouveaux objets <span style="font-family: Terminal;"></span>&nbsp;</big></font></b></p>\r
+\r
+<p class="MsoNormal">Il s'agissait d'ajouter de nouveaux objets\r
+intermédiaires de travail, comme le vecteur ou le cylindre :</p>\r
+\r
+<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="">le\r
+     cercle défini par&nbsp;un\r
+      centre, un\r
+      rayon et une\r
+      normale,</li><li class="MsoNormal" style="">la\r
+     sphère définie par&nbsp;un\r
+      centre et&nbsp;un\r
+      rayon.<br></li></ul>Il était p aussi&nbsp;associer&nbsp;\r
+les objets intermédiaires aux objets géométriques venant du\r
+composant GEOM de SALOME :<br><ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="">un\r
+     cercle,</li><li class="MsoNormal" style="">une\r
+     sphère,</li><li class="MsoNormal" style="">un\r
+     cylindre.</li></ul> <p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 4.2 Associations prédéfinies <span style="font-family: Terminal;"></span>&nbsp;</big></font></b></p><p class="MsoNormal">La deuxième évolution consiste à améliorer les associations\r
+des modèles de blocs prédéfinis en calculant automatiquement des associations\r
+implicites, les fonctions concernées sont les suivantes:</p>\r
+\r
+<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="">ajouter\r
+     une grille cylindrique .</li><li class="MsoNormal" style="">ajouter\r
+     une grille sphérique.</li><li class="MsoNormal" style="">ajouter\r
+     un cylindre, un tuyau.</li><li class="MsoNormal" style="">ajouter\r
+     l&#8217;intersection de 2 cylindres ou de 2 tuyaux.</li><li class="MsoNormal" style="">faire\r
+     de même pour toutes les nouvelles fonctions : ecorces et portions de sphères.</li></ul>\r
+\r
+<p class="MsoNormal">Pour chaque arête (sphérique) concernée, on associera un arc de cercle.</p><p class="MsoNormal">Il est inutile d'associer les faces, SMESH est capable de mailler si les arêtes sont associées.</p><p class="MsoNormal"><big><span style="font-weight: bold;">Implémentation</span></big>&nbsp;</p><p class="MsoNormal">Rappelons que l'objet&nbsp;Shape de HexaBlock est constitué :</p><ul><li>D'une chaine de caractère (b_rep) qui permet de décrire toute forme de GEOM</li><li>De deux paramètres <span style="font-style: italic;">debut</span> et <span style="font-style: italic;">fin</span> compris entre 0 et 1 permettant de délimiter la ligne décrite par la b-rep quand c'en est une</li></ul><p class="MsoNormal">Deux opérations sont nécessaires&nbsp; :</p><ol><li>&nbsp;créer un cercle au moyen de GEOM,</li><li>découper ce cercle en arcs de cercle qui seront associés aux arêtes concernées.</li></ol><p class="MsoNormal"><span style="font-weight: bold;">Opération 1 </span>:\r
+Le cercle à créer est en fait un arc de cercle orienté de 360\r
+degrés.&nbsp; Il est en effet nécessaire de définir une origine. GEOM\r
+permet de&nbsp;générer finir un tel\r
+cercle, à partir duquel HexaBlock définira des arcs au moyen des\r
+paramètres <span style="font-style: italic;">debut</span> et <span style="font-style: italic;">fin</span> des shapes :</p><p class="MsoNormal">Cette action est assurée par la fonction <span style="font-weight: bold;">geom_create_circle</span>\r
+qui génère la brep du cercle à partir de son&nbsp;centre, de son rayon,\r
+de son vecteur normal, du&nbsp; vecteur Ox qui permet de définir son\r
+origine.</p><br><span style="font-weight: bold;"></span><table style="width: 80%; text-align: left; margin-left: auto; margin-right: auto; font-family: monospace;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+\r
+<tr><td><span style="font-family: monospace;"></span><span style="font-family: monospace;"></span><span style="font-family: monospace;">void <span style="font-weight: bold;">geom_create_circle</span> (double* centre, double rayon, Vector* normale,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+double* ox, string&amp; brep)<br>{<br>&nbsp;&nbsp; gp_Pnt gp_center (centre [dir_x], centre [dir_y], centre [dir_z]);<br>&nbsp;&nbsp;\r
+gp_Vec gp_ox&nbsp;&nbsp;&nbsp;&nbsp; (ox&nbsp;&nbsp;&nbsp;&nbsp;\r
+[dir_x], ox&nbsp;&nbsp;&nbsp;&nbsp; [dir_y], ox&nbsp;&nbsp;&nbsp;&nbsp;\r
+[dir_z]);<br>&nbsp;&nbsp; gp_Vec gp_norm&nbsp;&nbsp; (normale-&gt;getDx(), normale-&gt;getDy(), normale-&gt;getDz());<br><br>&nbsp;&nbsp; <span style="font-weight: bold;">gp_Ax2</span>&nbsp; gp_axes (gp_center, gp_norm, gp_ox);<br>&nbsp;&nbsp; <span style="font-weight: bold;">gp_Circ</span> gp_circ (gp_axes,&nbsp;&nbsp; rayon);<br><br>&nbsp;&nbsp; TopoDS_Edge&nbsp;&nbsp;&nbsp; geom_circ = <span style="font-weight: bold;">BRepBuilderAPI_MakeEdge</span>(gp_circ).Edge();<br>&nbsp;&nbsp; ostringstream&nbsp; stream_shape;<br>&nbsp;&nbsp; <span style="font-weight: bold;">BRepTools::Write</span>(geom_circ, stream_shape);<br><br>&nbsp;&nbsp; brep = stream_shape.str();<br>}</span><span style="font-family: monospace;"></span></td></tr></tbody>\r
+</table><br>GEOM permet de définir un tel cercle (calsse <span style="font-style: italic;">gp_Circ</span>)&nbsp; à partir d'un systemes d'axes 2D (classe <span style="font-style: italic;">gp_Ax2</span> ) &nbsp;et d'un rayon. Ce cercle esr ensuite transformé en forme&nbsp;<span style="font-style: italic;">TopoDS_Shape</span> qui est l'objet GEOM que l'on maniplule habituellement losque l'on procède aux associations. Plus précisément en <span style="font-style: italic;">TopoDS_Edge</span> &nbsp;au moyen de&nbsp;<span style="font-style: italic;">BRepBuilderAPI_MakeEdge</span><span style="font-family: monospace;"></span>. Enfin l'objet est&nbsp; transformé en chaine de caractères de format Brep via <span style="font-style: italic;">ostringstream</span>.<br><br><span style="font-weight: bold;">Opération 2 </span>:\r
+On dispose d'une b-rep&nbsp; décrivant un arc de cercle de 360 degrés.\r
+Il est aisé de définir proportionnellement pour chacun des edges\r
+constituant la ligne associée à la portion de cercle les paramètres\r
+début et fin par rapport aux angles de départ et d'arrivée de chaque\r
+arc. Cette opération fut d'ailleurs réalisée lors de la préservarion\r
+des associations lors d'un "cut". On réutilisera donc la fonction <span style="font-style: italic;">Elements::cutAssociation(...) </span>moyennant quelques aménagements.<br><p class="MsoNormal"></p><p><big><img src="green-ball.gif" style="width: 12px; height: 12px;" alt="o"></big><b><font size="+1"><big> 4.3&nbsp;Propagation des associations <span style="font-family: Terminal;"></span>&nbsp;</big></font></b></p><p class="MsoNormal"><br>La troisième évolution consiste à améliorer la propagation\r
+automatique des associations, les fonctions concernées sont les suivantes:</p>\r
+\r
+<ul style="margin-top: 0cm;" type="disc"><li class="MsoNormal" style="">fusionner\r
+     ou déconnecter des sommets, des arêtes, des quadrangles :</li><ul style="margin-top: 0cm;" type="circle"><li class="MsoNormal" style="">s&#8217;il\r
+      y a des associations, ne pas les perdre,</li></ul><li class="MsoNormal" style="">prismer\r
+     un ou des quadrangles :</li><ul style="margin-top: 0cm;" type="circle"><li class="MsoNormal" style="">s&#8217;il\r
+      y a des associations dans la direction de l&#8217;extrusion, les propager,</li></ul><li class="MsoNormal" style="">ajouter\r
+     des hexaèdres par translation, par rotation, par homothétie ou par\r
+     symétries :</li><ul style="margin-top: 0cm;" type="circle"><li class="MsoNormal" style="">si\r
+      les hexaèdres sources ont une association, alors les propager,</li></ul><li class="MsoNormal" style="">faire\r
+     de même pour la fonction «révolution» du lot 2.</li></ul>\r
+\r
+<p class="MsoNormal"><o:p></o:p></p>\r
+\r
+<p class="MsoNormal">Ces trois évolutions seront implémentées dans le moteur.\r
+Seule le première évolution (création de sphères ou cercles) sera implémentée\r
+dans la partie interactive. </p><br><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold;">Implémentation :</span><br><br><br>En\r
+ce qui concerne les associations propagées par les transformations, la\r
+fonction de base de l'implémentation est transfo_brep. <br>Cette fonction reprend la matrice du modèle de blocs et l'applique à la shape décrite par la brep.<br><br><table style="text-align: left; margin-left: auto; margin-right: auto; width: 859px; height: 65px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><span style="font-family: monospace;">// ====================================================== transfo_brep<br>void transfo_brep (string&amp; brep, Matrix* matrice, string&amp; trep)<br>{<br>&nbsp;&nbsp; BRep_Builder&nbsp; builder;<br>&nbsp;&nbsp; TopoDS_Shape&nbsp; shape_orig;<br>&nbsp;&nbsp; ostringstream stream_shape;<br>&nbsp;&nbsp; gp_Trsf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transfo;<br><br>&nbsp;&nbsp;\r
+double&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34;<br>&nbsp;&nbsp; matrice-&gt;getCoeff (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34);<br>&nbsp;&nbsp; transfo.SetValues (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+Epsil2, Epsil2);<br><br>&nbsp;&nbsp; istringstream stream_brep (brep);<br>&nbsp;&nbsp; BRepTools::Read&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (shape_orig, stream_brep, builder);<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; BRepBuilderAPI_Transform brep_transfo (shape_orig, transfo, Standard_True);<br>&nbsp;&nbsp; TopoDS_Shape result = brep_transfo.Shape();<br><br>&nbsp;&nbsp; BRepTools::Write (result, stream_shape);<br>&nbsp;&nbsp; trep = stream_shape.str();<br>}<br></span><span style="font-family: monospace;"></span></td></tr></tbody></table><br><br>Pour la fonction de prismQuads, on utilise une variante simplifiée : <br><br><table style="text-align: left; margin-left: auto; margin-right: auto; width: 859px; height: 65px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><span style="font-family: monospace;">// ====================================================== translate_brep<br>void translate_brep (string&amp; brep, double dir[], string&amp; trep)<br>{<br>&nbsp;&nbsp; gp_Trsf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transfo;<br>&nbsp;&nbsp; BRep_Builder&nbsp; builder;<br>&nbsp;&nbsp; TopoDS_Shape&nbsp; orig;<br>&nbsp;&nbsp; ostringstream stream_shape;<br><br>&nbsp;&nbsp;\r
+gp_Vec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+vecteur&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (dir [dir_x], dir [dir_y],\r
+dir [dir_z]);<br>&nbsp;&nbsp; transfo.SetTranslation&nbsp;&nbsp;&nbsp; (vecteur);<br>&nbsp;&nbsp; istringstream stream_brep (brep);<br>&nbsp;&nbsp; BRepTools::Read&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (orig, stream_brep, builder);<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; TopLoc_Location&nbsp; loc_orig&nbsp;&nbsp; = orig.Location();<br>&nbsp;&nbsp; gp_Trsf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trans_orig = loc_orig.Transformation();<br>&nbsp;&nbsp; TopLoc_Location&nbsp; loc_result (transfo * trans_orig);<br>&nbsp;&nbsp; TopoDS_Shape&nbsp;&nbsp;&nbsp;&nbsp; result = orig.Located (loc_result);<br><br>&nbsp;&nbsp; BRepTools::Write (result, stream_shape);<br>&nbsp;&nbsp; trep = stream_shape.str();<br>}<br></span><span style="font-family: monospace;"></span></td></tr></tbody></table><br><br>Pour la fonction de prismQuads, on utilise une variante simplifiée : <br><br><br><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold;">Propagation des associations pour les transformations :</span><span style="font-weight: bold;"></span><br><br><br>L'exemple donné est makeScale <br><br><table style="text-align: left; margin-left: auto; margin-right: auto; width: 859px; height: 65px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><span style="font-family: monospace;"># ======================================================= make_grid</span><br style="font-family: monospace;"><span style="font-family: monospace;">def make_grid (doc) :</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; ori&nbsp; = doc.addVertex ( 0, 0, 0)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; vz&nbsp;&nbsp; = doc.addVector ( 0, 0, 1)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; vx&nbsp;&nbsp; = doc.addVector ( 1 ,0, 0)</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; dr = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; da = 360</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; dl = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; nr = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; na = 6</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; nl = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; return grid</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"># ======================================================= test_scale</span><br style="font-family: monospace;"><span style="font-family: monospace;">def test_scale () :</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; doc&nbsp; = hexablock.addDocument()</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; grid = make_grid (doc)</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; dest&nbsp;&nbsp; = doc.addVertex (15, 0, 0)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; grid2&nbsp; = doc.makeScale (grid, dest, 0.5)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; return doc</span></td></tr></tbody></table><br><br><table style="width: 859px; height: 65px; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><img style="width: 701px; height: 568px;" alt="transfo" src="transfo.png"></td></tr></tbody></table><br><br><br><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold;">Propagation des associations pour la fonction prism</span><span style="font-weight: bold;">Quads</span><br><br>Pour la fonction prismQuads :<br><br><br><table style="text-align: left; margin-left: auto; margin-right: auto; width: 737px; height: 297px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><span style="font-family: monospace;"># ========================================================== test_prism</span><br style="font-family: monospace;"><span style="font-family: monospace;">def test_prism () :</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; doc&nbsp; = hexablock.addDocument()</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; nr = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; na = 6</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; nl = 1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; grid = make_grid (doc, nr, na, nl)</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; liste = [ ]</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; for nx in range (nr) :</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ny in range (na) :</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell = grid.getQuadIJ (nx, ny, nl)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liste.append (cell);</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; axis = doc.addVector (1, 1, 1);</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; bloc = doc.prismQuads&nbsp; (liste, axis, 3)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; return doc</span></td></tr></tbody></table><br><br><span style="font-weight: bold;"></span><table style="text-align: left; margin-left: auto; margin-right: auto; font-family: monospace; width: 909px; height: 535px;" border="1" cellpadding="2" cellspacing="2">\r
+<tbody>\r
+\r
+<tr><td><span style="font-family: monospace;"></span><span style="font-family: monospace;"></span><span style="font-family: monospace;"><br><br><br><br><br></span><div style="text-align: center;"><span style="font-family: monospace;"><img style="width: 498px; height: 403px;" alt="Prisme" src="prism.png"></span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br><br><br></span><span style="font-family: monospace;"></span></td></tr></tbody>\r
+</table><br><br><img src="red-ball.gif" style="width: 12px; height: 12px;" alt="o">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">Propagation des associations pour la fonction revolutionQuads</span><br><br>Pour la fonction revolutionQuads <br><br><br><table style="text-align: left; margin-left: auto; margin-right: auto; width: 737px; height: 297px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><span style="font-family: monospace;"># ========================================================== test_revolution<br>def test_revolution () :<br>&nbsp;&nbsp;&nbsp; doc&nbsp; = hexablock.addDocument()<br>&nbsp;&nbsp;&nbsp; nr = 1<br>&nbsp;&nbsp;&nbsp; na = 6<br>&nbsp;&nbsp;&nbsp; nl = 1<br>&nbsp;&nbsp;&nbsp; grid = make_grid (doc, nr, na, nl)<br><br>&nbsp;&nbsp;&nbsp; liste = [ ]<br>&nbsp;&nbsp;&nbsp; for nx in range (nr) :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ny in range (na) :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell = grid.getQuadIJ (nx, ny, nl)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print " ... cell = ", cell<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liste.append (cell);<br></span>ss<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; center = doc.addVertex (0, -10, 0);<br>&nbsp;&nbsp;&nbsp; axis&nbsp;&nbsp; = doc.addVector (1, 0, 0);<br>&nbsp;&nbsp;&nbsp; angles = [5, 10, 15, 20, 30, 20, 15, 10, 5 ]<br></span>ss<br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; bloc = doc.revolutionQuads&nbsp; (liste, center, axis, angles);<br>&nbsp;&nbsp;&nbsp; return doc<br></span><span style="font-family: monospace;"></span></td></tr></tbody></table><br><br><table style="width: 734px; height: 484px; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td style="width: 80%;"><img style="width: 474px; height: 383px;" alt="Macaroni" src="macaroni.png" align="middle"></td></tr></tbody></table><br><p><a href="index.html#DebutPage">Retour au début</a></p>\r
+<hr width="100%">\r
+<p><br></p><br><p><br>\r
+&nbsp;\r
+<br>\r
+&nbsp;\r
+<br>\r
+&nbsp;\r
+<br>\r
+&nbsp;\r
+<br>\r
+&nbsp;\r
+</p>\r
+</body></html>
\ No newline at end of file
diff --git a/internal_doc/logo-cs.gif b/internal_doc/logo-cs.gif
new file mode 100755 (executable)
index 0000000..4724b0a
Binary files /dev/null and b/internal_doc/logo-cs.gif differ
diff --git a/internal_doc/macaroni.png b/internal_doc/macaroni.png
new file mode 100644 (file)
index 0000000..28d83d7
Binary files /dev/null and b/internal_doc/macaroni.png differ
diff --git a/internal_doc/prism.png b/internal_doc/prism.png
new file mode 100644 (file)
index 0000000..17e6b2c
Binary files /dev/null and b/internal_doc/prism.png differ
diff --git a/internal_doc/red-ball.gif b/internal_doc/red-ball.gif
new file mode 100755 (executable)
index 0000000..dca9296
Binary files /dev/null and b/internal_doc/red-ball.gif differ
diff --git a/internal_doc/transfo.png b/internal_doc/transfo.png
new file mode 100644 (file)
index 0000000..1fe6c45
Binary files /dev/null and b/internal_doc/transfo.png differ
diff --git a/salome_adm/unix/SALOMEconfig.h.in b/salome_adm/unix/SALOMEconfig.h.in
new file mode 100755 (executable)
index 0000000..8db6100
--- /dev/null
@@ -0,0 +1,65 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/* Debug mode ??? */
+#ifndef DEBUG
+# define DEBUG
+#endif
+
+/* CORBA headers include rules */
+#ifndef CORBA_CLIENT_HEADER
+# define QUOTE(x)  #x
+# define CORBA_CLIENT_HEADER(x)  QUOTE(x@IDL_CLN_H@)
+# define CORBA_SERVER_HEADER(x)  QUOTE(x@IDL_SRV_H@)
+#endif
+
+/* Platform definition */
+#ifndef @MACHINE@
+  #define @MACHINE@
+#endif
+
+// This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names)
+#ifdef PACKAGE
+#undef PACKAGE
+#endif
+#ifdef PACKAGE_BUGREPORT
+#undef PACKAGE_BUGREPORT
+#endif
+#ifdef PACKAGE_NAME
+#undef PACKAGE_NAME
+#endif
+#ifdef PACKAGE_STRING
+#undef PACKAGE_STRING
+#endif
+#ifdef PACKAGE_TARNAME
+#undef PACKAGE_TARNAME
+#endif
+#ifdef PACKAGE_VERSION
+#undef PACKAGE_VERSION
+#endif
+#ifdef VERSION
+#undef VERSION
+#endif
+
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
diff --git a/salome_adm/unix/config_files/config.guess b/salome_adm/unix/config_files/config.guess
new file mode 100755 (executable)
index 0000000..e3ef63f
--- /dev/null
@@ -0,0 +1,1471 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-13'
+
+# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    x86:Interix*:[345]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #if defined(__INTEL_COMPILER) || defined(__PGI)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/salome_adm/unix/config_files/config.sub b/salome_adm/unix/config_files/config.sub
new file mode 100755 (executable)
index 0000000..c0ada46
--- /dev/null
@@ -0,0 +1,1602 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | mt \
+       | msp430 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m32c)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       m32c-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/salome_adm/unix/config_files/depcomp b/salome_adm/unix/config_files/depcomp
new file mode 100755 (executable)
index 0000000..ca5ea4e
--- /dev/null
@@ -0,0 +1,584 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2006-10-15.18
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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.
+
+# 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/salome_adm/unix/config_files/install-sh b/salome_adm/unix/config_files/install-sh
new file mode 100755 (executable)
index 0000000..4fbbae7
--- /dev/null
@@ -0,0 +1,507 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-10-14.15
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# 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, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# 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.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+        shift
+        shift
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+       shift
+       shift
+       continue;;
+
+    -T) no_target_directory=true
+       shift
+       continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dstarg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dstarg"
+      shift # fnord
+    fi
+    shift # arg
+    dstarg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dstarg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix=/ ;;
+       -*) prefix=./ ;;
+       *)  prefix= ;;
+      esac
+
+      case $posix_glob in
+        '')
+         if (set -f) 2>/dev/null; then
+           posix_glob=true
+         else
+           posix_glob=false
+         fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob && set -f
+      set fnord $dstdir
+      shift
+      $posix_glob && set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dst"; then
+              $doit $rmcmd -f "$dst" 2>/dev/null \
+              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+              || {
+                echo "$0: cannot unlink or rename $dst" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dst"
+        }
+    } || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/salome_adm/unix/config_files/missing b/salome_adm/unix/config_files/missing
new file mode 100755 (executable)
index 0000000..1c8ff70
--- /dev/null
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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.
+
+# 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/HEXABLOCK/Hex.cxx b/src/HEXABLOCK/Hex.cxx
new file mode 100755 (executable)
index 0000000..08a672d
--- /dev/null
@@ -0,0 +1,86 @@
+
+// C++ : La clase principale de Hexa
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "Hex.hxx"
+
+#include "HexDocument.hxx"
+#include <clocale>
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Hex::Hex ()
+{
+   setlocale (LC_NUMERIC, "C");
+}
+// ======================================================== Destructeur
+Hex::~Hex ()
+{
+#ifndef NO_CASCADE
+   int nbre = liste_documents.size();
+   for (int nd=0 ; nd<nbre ; nd++) 
+       delete liste_documents [nd];
+#endif
+}
+// ======================================================== countDocument
+int Hex::countDocument ()
+{
+   return liste_documents.size();
+}
+// ======================================================== getDocument
+Document* Hex::getDocument (int nro)
+{
+   if (nro<0 || nro>=(int)liste_documents.size())
+      return NULL;
+   
+   return liste_documents [nro];
+}
+// ======================================================== removeDocument
+void Hex::removeDocument (Document* doc)
+{
+   int nbre = liste_documents.size();
+   for (int nd=0 ; nd<nbre ; nd++) 
+       {
+       if (doc == liste_documents [nd])
+          {
+          liste_documents.erase (liste_documents.begin()+nd);
+          delete doc;
+          return;
+          }
+       }
+                      // Pas trouve dans la liste. On detruit quand meme
+    delete doc;
+}
+// ======================================================== addDocument
+Document* Hex::addDocument (cpchar nomdoc)
+{
+   Document* doc = new Document (nomdoc);
+   liste_documents.push_back (doc);
+   return doc;
+}
+// ======================================================== loadDocument
+Document* Hex::loadDocument (const char* filename)
+{
+   Document* doc = addDocument ("xxxx");
+   doc->loadXml (filename);
+   return doc;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/Hex.hxx b/src/HEXABLOCK/Hex.hxx
new file mode 100755 (executable)
index 0000000..2035a03
--- /dev/null
@@ -0,0 +1,49 @@
+
+// class : La clase principale de Hexa
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __HEX_H
+#define __HEX_H
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Hex
+{
+public:
+   int       countDocument ();
+   Document* getDocument (int nro);
+   void      removeDocument (Document* doc);
+
+   Document* addDocument  (const char* name="default");
+   Document* loadDocument (const char* name);
+
+             //  Constructeur + destructeur
+    Hex ();
+   ~Hex ();
+
+private:
+   vector <Document*> liste_documents;
+};
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexAnaQuads.hxx b/src/HEXABLOCK/HexAnaQuads.hxx
new file mode 100755 (executable)
index 0000000..26f79a0
--- /dev/null
@@ -0,0 +1,115 @@
+
+// class : Analyse des quadrangles avant construction
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __ANA_QUADS_H
+#define __ANA_QUADS_H
+
+#include "HexQuad.hxx"
+// #include "HexEdge.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class AnaQuads
+{
+public:
+    AnaQuads (Quad* q1, Quad* q2, Quad* q3=NULL, Quad* q4=NULL, Quad* q5=NULL);
+
+public:
+    enum {MaxQuads=5};
+    int    status;
+    int    nbr_quads;
+    int    nbr_aretes;
+    Quad*  tab_quads  [MaxQuads];
+    int    inter_nbre [MaxQuads];
+    int    inter_edge [MaxQuads][MaxQuads]; // L'arete commune des 2 quads
+    int    inter_quad [MaxQuads][QUAD4];    // Le quad touchant la ieme arete
+};
+// ----------------------------------------------- Inlining
+// ========================================================== Constructeur
+inline AnaQuads::AnaQuads (Quad* q0, Quad* q1, Quad* q2, Quad* q3, Quad* q4)
+{
+   nbr_quads  = 2;
+   nbr_aretes = 0;
+   status     = HOK;
+
+   for (int nquad=0 ; nquad < MaxQuads ; nquad++)
+       {
+       tab_quads  [nquad] = NULL;
+       inter_nbre [nquad] = 0;
+       for (int nro=0 ; nro < QUAD4 ; nro++)
+           inter_quad [nquad][nro] = NOTHING;
+       for (int nro=0 ; nro < MaxQuads ; nro++)
+           inter_edge [nquad][nro] = NOTHING;
+       }
+
+   tab_quads [0] = q0;
+   tab_quads [1] = q1;
+   tab_quads [2] = q2;
+   tab_quads [3] = q3;
+   tab_quads [4] = q4;
+
+   if      (q4 != NULL) nbr_quads = 5;
+   else if (q3 != NULL) nbr_quads = 4;
+   else if (q2 != NULL) nbr_quads = 3;
+   else                 nbr_quads = 2;
+
+   for (int nquad1=0 ; nquad1 < nbr_quads ; nquad1++)
+       {
+       if (tab_quads[nquad1]==NULL || tab_quads[nquad1]->isDeleted())
+          {
+          status = HERR;
+          return;
+          }
+       for (int nquad2=0 ; nquad2 < nquad1 ; nquad2++)
+           {
+           if (tab_quads[nquad1]==tab_quads[nquad2]) 
+              {
+              status = HERR;
+              return;
+              }
+           int nedge2 = 0;
+           int nedge1 = tab_quads[nquad1]->inter (tab_quads[nquad2], nedge2) ;
+           if (nedge1 != NOTHING)
+              {
+              inter_edge [nquad1] [nquad2] = nedge1;
+              inter_quad [nquad1] [nedge1] = nquad2;
+
+              inter_edge [nquad2] [nquad1] = nedge2;
+              inter_quad [nquad2] [nedge2] = nquad1;
+
+              inter_nbre [nquad1]++;
+              inter_nbre [nquad2]++;
+              nbr_aretes++;
+              }
+           }
+       }
+}
+// ============================================================== distance
+inline double distance (Vertex* v1, Vertex* v2)
+{
+   double vx   = v1->getX () - v2->getX ();
+   double vy   = v1->getY () - v2->getY ();
+   double vz   = v1->getZ () - v2->getZ ();
+   double dist = sqrt (vx*vx + vy*vy + vz*vz);
+   return dist;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCloner.cxx b/src/HEXABLOCK/HexCloner.cxx
new file mode 100755 (executable)
index 0000000..31edc5a
--- /dev/null
@@ -0,0 +1,242 @@
+
+// C++ : Copiteur d'hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexCloner.hxx"
+#include "HexMatrix.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexElements.hxx"
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+void transfo_brep (string& brep, Matrix* matrice, string& trep);
+void geom_dump_asso (Edge* edge);
+static bool db = false;
+
+// ============================================================= Constructeur
+Cloner::Cloner  (Matrix* mat)
+{
+   matrice = mat;
+}
+// ============================================================== clonerVertex
+Vertex* Cloner::clonerVertex (Vertex* orig)
+{
+    if (orig == NULL)
+        return orig;
+
+    Vertex* copie = clone_vertex [orig];
+    if (copie != NULL)
+        return copie;
+
+    copie = new Vertex (orig);
+    matrice -> perform (copie);
+    clone_vertex [orig] = copie;
+
+   Shape* tshape = copie->getAssociation ();
+   Shape* shape  = orig ->getAssociation ();
+   if (tshape != NULL || shape == NULL)
+      return copie;
+
+   string brep  = shape->getBrep();
+   string trep;
+   transfo_brep (brep, matrice, trep);
+   tshape = new Shape (trep);
+   copie ->setAssociation (tshape);
+   if (db)
+      {
+      printf ( " --- Cloner::Asso (%s) -> asso (%s)\n", orig ->getName  (), 
+                                                        copie->getName ());
+      }
+   return copie;
+}
+// ============================================================== clonerEdge
+Edge* Cloner::clonerEdge (Edge* orig)
+{
+   if (orig == NULL)
+        return orig;
+
+   Edge* copie = clone_edge [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Edge (orig);
+
+   copie->e_vertex [V_AMONT] = clonerVertex (orig->e_vertex [V_AMONT]);
+   copie->e_vertex [V_AVAL]  = clonerVertex (orig->e_vertex [V_AVAL]);
+
+   copie->majReferences ();
+   clone_edge [orig] = copie;
+
+   if (orig->debug())
+      {
+      copie->printName (" est la copie de ");
+      orig ->printName ("\n");
+      }
+
+   const  Shapes & new_asso = copie->getAssociations ();
+   int    nbass             = new_asso.size();
+   if (nbass!=0) 
+      return copie;
+
+   const Shapes & tab_asso = orig->getAssociations ();
+   nbass             = tab_asso.size();
+   for (int nro=0 ; nro < nbass ; nro++)
+       {
+       Shape* shape = tab_asso [nro];
+       string brep  = shape->getBrep();
+       string trep;
+       transfo_brep (brep, matrice, trep);
+       Shape* tshape = new Shape (trep);
+       tshape->setBounds (shape->debut, shape->fin);
+       copie ->addAssociation (tshape);
+       if (db)
+          {
+          printf ( " --- Cloner::Asso (%s) -> asso (%s)\n", orig ->getName (), 
+                                                            copie->getName ());
+          geom_dump_asso (orig );
+          geom_dump_asso (copie);
+          }
+       }
+
+   return copie;
+}
+// ============================================================== clonerQuad
+Quad* Cloner::clonerQuad (Quad* orig)
+{
+   if (orig == NULL)
+       return orig;
+
+   Quad* copie = clone_quad [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Quad (orig);
+
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       copie->q_edge [nro] = clonerEdge (orig->q_edge [nro]);
+
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       copie->q_vertex [nro] = clonerVertex (orig->q_vertex [nro]);
+
+   copie->majReferences ();
+   clone_quad [orig] = copie;
+
+   const  Shapes & new_asso = copie->getAssociations ();
+   int    nbass             = new_asso.size();
+   if (nbass!=0) 
+      return copie;
+
+   const Shapes & tab_asso = orig->getAssociations ();
+   nbass             = tab_asso.size();
+   for (int nro=0 ; nro < nbass ; nro++)
+       {
+       Shape* shape = tab_asso [nro];
+       string brep  = shape->getBrep();
+       string trep;
+       transfo_brep (brep, matrice, trep);
+       Shape* tshape = new Shape (trep);
+       copie ->addAssociation (tshape);
+       if (db)
+          printf ( " --- Asso (%s) -> asso (%s)\n", orig ->getName (), 
+                                                    copie->getName ());
+       }
+
+   return copie;
+}
+// ============================================================== clonerHexa
+Hexa* Cloner::clonerHexa (Hexa* orig)
+{
+   if (orig == NULL)
+       return orig;
+
+   Hexa* copie = clone_hexa [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Hexa (orig);
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       copie->h_quad [nro] = clonerQuad (orig->h_quad [nro]);
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) 
+       copie->h_edge [nro] = clonerEdge (orig->h_edge [nro]);
+
+   for (int nro=0 ; nro<HV_MAXI ; nro++) 
+       copie->h_vertex [nro] = clonerVertex (orig->h_vertex [nro]);
+
+   copie->majReferences ();
+   clone_hexa [orig] = copie;
+   return copie;
+}
+// ============================================================== clonerElements
+Elements* Cloner::clonerElements (Elements* orig)
+{
+   Elements* copie = new Elements (orig);
+   if (db)
+      {
+      double             a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34;
+      matrice->getCoeff (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34);
+      printf ( "\n");
+      printf ( " --- Matrice = (%g, %g, %g) (%g) \n", a11,a12,a13,a14 );
+      printf ( "               (%g, %g, %g) (%g) \n", a21,a22,a23,a24 );
+      printf ( "               (%g, %g, %g) (%g) \n", a31,a32,a33,a34 );
+      }
+
+   int nombre = orig->countHexa ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Hexa* elt  = orig->getHexa (nro);
+       Hexa* elt2 = clonerHexa (elt);
+       copie->setHexa (elt2, nro);
+       }
+
+   nombre = orig->countQuad ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Quad* elt  = orig->getQuad (nro);
+       Quad* elt2 = clonerQuad (elt);
+       copie->setQuad (elt2, nro);
+       }
+
+   nombre = orig->countEdge ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Edge* elt  = orig->getEdge (nro);
+       Edge* elt2 = clonerEdge (elt);
+       copie->setEdge (elt2, nro);
+       }
+
+   nombre = orig->countVertex ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Vertex* elt  = orig->getVertex (nro);
+       Vertex* elt2 = clonerVertex (elt);
+       copie->setVertex (elt2, nro);
+       }
+
+
+   return copie;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexCloner.hxx b/src/HEXABLOCK/HexCloner.hxx
new file mode 100755 (executable)
index 0000000..432833a
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// class : Le Reproducteur de blocks
+
+#ifndef __CLONER_H
+#define __CLONER_H
+
+#include "hexa_base.hxx"
+
+#include <map>
+
+BEGIN_NAMESPACE_HEXA
+
+class Cloner 
+{
+public:
+    Cloner (Matrix* mat);
+
+    void erase ();
+
+    Hexa*     clonerHexa     (Hexa*     orig);
+    Quad*     clonerQuad     (Quad*     orig);
+    Edge*     clonerEdge     (Edge*     orig);
+    Vertex*   clonerVertex   (Vertex*   orig);
+    Elements* clonerElements (Elements* orig);
+
+private:
+    Matrix* matrice;
+    std::map <Hexa*,   Hexa*>   clone_hexa;
+    std::map <Quad*,   Quad*>   clone_quad;
+    std::map <Edge*,   Edge*>   clone_edge;
+    std::map <Vertex*, Vertex*> clone_vertex;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCramer.hxx b/src/HEXABLOCK/HexCramer.hxx
new file mode 100755 (executable)
index 0000000..24bad26
--- /dev/null
@@ -0,0 +1,161 @@
+
+// class : Resolution d'un systeme de Cramer
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __CRAMER_H_
+#define __CRAMER_H_
+
+#include "hexa_base.hxx"
+// #include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+class Cramer 
+{
+public:
+    Cramer (int size);
+   ~Cramer ();
+
+    void defMatrix (double matuser[]);
+    int  resoudre  (double matr[], double second[],  double sol[]);
+    void multiply  (double vect[], double result[]);
+
+private:
+    int  resoudre  (double msecond[], double solution[]);
+    double determinant ();
+    void   defCofacteur (Cramer* orig, int lig, int col);
+    bool   cestNul (double x) { return x > -1e-10 &&  x < 1e-10 ; }
+private:
+    const int mat_size;
+    double** matrix;
+    double*  col_saved;
+    Cramer*  co_facteur;
+};
+// ========================================================= Constructeur
+inline Cramer::Cramer (int size)
+             : mat_size(size)
+{
+   matrix     = new double* [mat_size];
+   col_saved  = new double  [mat_size];
+   co_facteur = NULL;
+   if (mat_size > 2)
+      co_facteur =  new Cramer (mat_size-1);
+
+   for (int nl=0 ; nl<mat_size ; nl++)
+       {
+       matrix[nl] = new double [mat_size];
+       for (int nc=0 ; nc<mat_size ; nc++)
+           matrix [nl][nc] = 0;
+       }
+}
+// ========================================================= Destructeur
+inline Cramer::~Cramer ()
+{
+   for (int nl=0 ; nl<mat_size ; nl++)
+       delete [] matrix[nl];
+
+   delete [] matrix;
+   delete [] col_saved;
+   delete    co_facteur;
+}
+// ========================================================= defMatrix
+inline void Cramer::defMatrix (double matuser[])
+{
+   for (int nl=0 ; nl<mat_size ; nl++)
+       for (int nc=0 ; nc<mat_size ; nc++)
+           matrix [nl][nc] = matuser [nl*mat_size + nc];
+}
+// ========================================================= determinant
+inline double Cramer::determinant ()
+{
+   double det = 0;
+   if (mat_size <= 1)
+      return matrix[0][0];
+
+   else if (mat_size == 2)
+      {
+      det =matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
+      return det;
+      }
+
+   for (int ni=0 ; ni<mat_size ; ni++)
+       {
+       if (NOT cestNul (matrix[ni][0]))
+          {
+          co_facteur->defCofacteur (this, ni, 0);
+          double signe = (ni MODULO 2) ? -1.0 : 1.0;
+          det += signe*matrix[ni][0] * co_facteur->determinant ();
+          }
+       }
+   return det;
+}
+// ========================================================= defCofacteur
+inline void Cramer::defCofacteur (Cramer* orig, int lig, int col)
+{
+   for (int nl=0 ; nl<mat_size ; nl++)
+       {
+       int ni = nl < lig ? nl : nl+1;
+       for (int nc=0 ; nc<mat_size ; nc++)
+           {
+           int nj = nc < col ? nc : nc+1;
+           matrix[nl][nc]  = orig->matrix[ni][nj];
+           }
+       }
+}
+// ========================================================= resoudre
+inline int Cramer::resoudre (double mat[], double second[],  double sol[])
+{
+   defMatrix (mat);
+   int ier = resoudre (second, sol);
+   return ier;
+}
+// ========================================================= multiply
+inline void Cramer::multiply (double facteur[],  double produit[])
+{
+   for (int ni=0 ; ni<mat_size ; ni++)
+       {
+       produit [ni] = 0;
+       for (int nj=0 ; nj<mat_size ; nj++)
+           produit [ni] += matrix  [ni][nj] * facteur [nj]; 
+       }
+}
+// ========================================================= resoudre
+inline int Cramer::resoudre (double msecond[],  double solution[])
+{
+   double det = determinant();
+   if (cestNul (det))
+      return HERR;
+   
+   for (int nj=0 ; nj<mat_size ; nj++)
+       {
+       for (int ni=0 ; ni<mat_size ; ni++)
+           {
+           col_saved [ni]  = matrix  [ni][nj];
+           matrix [ni][nj] = msecond [ni];
+           }
+       solution [nj] = determinant() / det;
+
+       for (int ni=0 ; ni<mat_size ; ni++)
+           matrix [ni][nj] = col_saved [ni];
+       }
+   return HOK;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCrossElements.cxx b/src/HEXABLOCK/HexCrossElements.cxx
new file mode 100755 (executable)
index 0000000..e1b8204
--- /dev/null
@@ -0,0 +1,809 @@
+
+// C++ : Gestion des cylindres croises
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexCrossElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexCylinder.hxx"
+#include "HexShape.hxx"
+
+#include <stdlib.h>
+
+static bool   db  = false;
+
+static const double UnSur2pi = DEMI/M_PI;
+
+BEGIN_NAMESPACE_HEXA
+
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep);
+
+void geom_define_line (string& brep);
+void geom_asso_point  (double angle, Vertex* node);
+
+// ====================================================== Constructeur
+CrossElements::CrossElements (Document* doc, EnumGrid type) 
+             : Elements (doc)
+{
+   cross_cyl1   = NULL;
+   cross_cyl1   = NULL;
+   cross_cyl2   = NULL;
+   cross_center = NULL;
+   grid_type    = type;
+   angle_inter [CylSmall] = angle_inter [CylBig] =  0;
+   at_right  = at_left = true;
+   is_filled = false;
+}
+// ====================================================== resize
+void CrossElements::resize ()
+{
+   size_hx  = 2;
+   size_hy  = S_MAXI;
+   size_hz [CylSmall] = size_h1z;
+   size_hz [CylBig]   = size_h2z;
+
+   size_vx  = size_hx + 1;
+   size_vy  = size_hy;
+   size_vz[CylSmall] = size_v1z;
+   size_vz[CylBig]   = size_v2z;
+
+   nbr_vertex1 = size_vx*size_vy* size_v1z;
+   nbr_quads1  = nbr_vertex1*DIM3;
+   nbr_edges1  = nbr_quads1;
+   nbr_hexas1  = size_hx * size_hy * size_h1z; 
+
+   nbr_vertex  = nbr_vertex1 + size_vx * size_vy * size_v1z;
+   nbr_quads   = nbr_vertex*DIM3;
+   nbr_edges   = nbr_quads;
+   nbr_hexas   = nbr_hexas1 + size_hx * size_hy * size_h2z;
+
+   tab_hexa  .resize (nbr_hexas*2);
+   tab_quad  .resize (nbr_quads*2);
+   tab_edge  .resize (nbr_edges*2);
+   tab_vertex.resize (nbr_vertex*2);
+
+   for (int nc=0 ; nc< nbr_hexas  ; nc++) tab_hexa   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_quads  ; nc++) tab_quad   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_edges  ; nc++) tab_edge   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_vertex ; nc++) tab_vertex [nc] = NULL;
+}
+// ====================================================== indHexa
+int CrossElements::indHexa (int cyl, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1) 
+       return NOTHING;
+   if (   nx < 0 || nx >= size_hx || ny < 0 || ny >= size_hy 
+       || nz < 0 || nz >= size_hz[cyl]) return NOTHING; 
+
+   int nro = cyl*nbr_hexas1 + nx + size_hx*ny + size_hx*size_hy*nz;
+   return nro;
+}
+// ====================================================== indQuad
+int CrossElements::indQuad (int cyl, int dd, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1 || dd <0 || dd >= DIM3) 
+       return NOTHING;
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz[cyl]) return NOTHING; 
+
+   int nro = cyl*nbr_quads1 + nx + size_vx*ny + size_vx*size_vy*nz 
+                                 + size_vx*size_vy*size_vz[cyl]*dd;
+   return nro;
+}
+// ====================================================== indEdge
+int CrossElements::indEdge (int cyl, int dd, int nx, int ny, int nz)
+{
+   return indQuad (cyl, dd, nx, ny, nz);
+}
+// ====================================================== indVertex
+int CrossElements::indVertex (int cyl, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1) 
+      return NOTHING;
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz[cyl]) 
+      return NOTHING;
+
+   int nro = cyl*nbr_vertex1 + nx + size_vx*ny + size_vx*size_vy*nz;
+   return nro;
+}
+// ------------------------------------------------------------------------
+// ====================================================== getHexaIJK
+Hexa* CrossElements::getHexaIJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indHexa (cyl, nx, ny, nz);
+
+   if (nro >= 0 && tab_hexa[nro]!= NULL &&  tab_hexa[nro]->isHere ())
+      return tab_hexa [nro]; 
+   else
+      return NULL;
+}
+// ====================================================== getQuadIJ
+Quad* CrossElements::getQuadIJ (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_z, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadJK
+Quad* CrossElements::getQuadJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_x, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadIK
+Quad* CrossElements::getQuadIK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_y, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_quad [nro]; 
+}
+// ====================================================== getEdgeI
+Edge* CrossElements::getEdgeI (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_x, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeJ
+Edge* CrossElements::getEdgeJ (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_y, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeK
+Edge* CrossElements::getEdgeK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_z, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getVertexIJK
+Vertex* CrossElements::getVertexIJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_vertex [nro]; 
+}
+// ------------------------------------------------------------------------
+// ====================================================== setHexa
+void CrossElements::setHexa (Hexa* elt, int cyl, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_hexa [%d, %d,%d,%d] = ", cyl, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indHexa (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_hexa [nro] = elt;
+}
+// ====================================================== setQuad
+void CrossElements::setQuad (Quad* elt, int cyl, int dd, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_quad [%d,%d, %d,%d,%d] = ", cyl, dd, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indQuad (cyl, dd, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_quad [nro] = elt;
+}
+// ====================================================== setEdge
+void CrossElements::setEdge (Edge* elt, int cyl, int dd, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_edge [%d,%d, %d,%d,%d] = ", cyl, dd, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indEdge (cyl, dd, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_edge [nro] = elt;
+}
+// ====================================================== setVertex
+void CrossElements::setVertex (Vertex* elt, int cyl, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_vertex [%d, %d,%d,%d] = ", cyl, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_vertex [nro] = elt;
+}
+// ====================================================== setVertex (2)
+inline bool isequals (double v1, double v2)
+{
+   const double eps    = 0.01;
+   bool         equals = v1 <= v2 + eps && v1 >= v2 - eps; 
+   return equals;
+}
+// ====================================================== setVertex (2)
+void CrossElements::setVertex (int cyl, int nx, int ny, int nz, double px, 
+                                                     double py, double pz)
+{
+   if (isequals (px, 0) && isequals (py, -1.5)  && isequals (pz, 5))
+      printf (" Vertex trouve : Cyl%d [%d,%d,%d] = (%g,%g,%g)\n",
+                                          cyl, nx,ny,nz, px,py,pz);
+
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   else if (tab_vertex[nro] != NULL)
+      {
+      Vertex* node = tab_vertex[nro];
+      if (node->definedBy (px, py, pz))
+         return;
+
+      printf (" ************ ATTENTION ****************\n");
+      printf (" Creation d'un vertex : Cyl%d [%d,%d,%d] = (%g,%g,%g)\n",
+                                          cyl, nx,ny,nz, px,py,pz);
+      printf (" Indice %d deja occupe par le vertex (%g,%g,%g)\n", nro, 
+              node->getX(), node->getY(), node->getZ());
+
+      return;
+      }
+   
+   int trouve = findVertex (px, py, pz);
+   if (trouve>=0)
+      {
+      printf (" Creation d'un vertex : Cyl%d [%d,%d,%d] = (%g,%g,%g)\n",
+                                          cyl, nx,ny,nz, px,py,pz);
+      printf (" Vertex %d present a l'indice %d\n", nro, trouve);
+      tab_vertex [nro] = tab_vertex [trouve];
+      return;
+      }
+   Vertex*    node = el_root->addVertex (px, py, pz);
+   setVertex (node, cyl, nx, ny, nz);
+}
+// ====================================================== copyEdge
+void CrossElements::copyEdge (int d1, int i1, int j1, int k1, int d2, int i2, 
+                                      int j2, int k2)
+{
+   Edge* edge = NULL;
+   switch (d1) 
+          {
+          case dir_x : edge = getEdgeI (CylSmall, i1, j1, k1);
+                       break;
+          case dir_y : edge = getEdgeJ (CylSmall, i1, j1, k1);
+                       break;
+          case dir_z : edge = getEdgeK (CylSmall, i1, j1, k1);
+                       break;
+          }
+
+   setEdge (edge, CylBig, d2, i2, j2, k2);
+}
+// ====================================================== copyQuad
+void CrossElements::copyQuad (int d1, int i1, int j1, int k1, int d2, int i2, 
+                                              int j2, int k2)
+{
+   Quad* quad = NULL;
+   switch (d1) 
+          {
+          case dir_x : quad = getQuadJK (CylSmall, i1, j1, k1);
+                       break;
+          case dir_y : quad = getQuadIK (CylSmall, i1, j1, k1);
+                       break;
+          case dir_z : quad = getQuadIJ (CylSmall, i1, j1, k1);
+                       break;
+          }
+
+   setQuad (quad, CylBig, d2, i2, j2, k2);
+}
+// ====================================================== addEdge
+Edge* CrossElements::addEdge (Vertex* v1, Vertex* v2, int cyl, int dir, 
+                             int nx, int ny, int nz)
+{
+   Edge* edge = NULL;
+   if (v1==NULL || v2==NULL)
+      return NULL;
+
+   else if (cyl==CylBig) 
+      {
+      edge = findEdge1 (v1, v2);
+      /* ************************************************
+      if (edge != NULL) 
+         {
+         printf (" Edge (%d, %d,%d,%d) trouve = ", dir, nx, ny, nz);
+         edge->printName ("\n");
+         }
+         ************************************************ */
+      }
+
+   if (edge == NULL) 
+      edge = newEdge (v1, v2);
+
+   setEdge (edge, cyl, dir, nx, ny, nz);
+   return edge;
+}
+// ====================================================== addHexa
+Hexa* CrossElements::addHexa (Quad* q1, Quad* q2, Quad* q3, Quad* q4, Quad* q5,
+                            Quad* q6, int cyl, int nx, int ny, int nz)
+{
+/* **************************
+   if (cyl==CylSmall)
+      {
+      if (nx == 0)  return NULL;
+      if (nz != 1)  return NULL;
+      if (ny != 4)  return NULL;
+      return NULL;
+      }
+
+   if (cyl==CylBig)
+      {
+      if (nz >  2)  return NULL;
+      if (nz <  1)  return NULL;
+      // if (nx == 0)  return NULL;
+      // if (ny != 4)  return NULL;
+      }
+   ************************** */
+
+   Hexa* hexa = NULL;
+   if (cyl==CylBig) 
+      hexa = findHexa1 (q1, q2);
+
+   if (hexa == NULL) 
+       hexa = newHexa (q1, q2, q3, q4, q5, q6);
+   else if (db)
+      {
+      printf (" Hexa (%d,%d,%d) trouve = ", nx, ny, nz);
+      hexa->printName ("\n");
+      }
+
+   setHexa (hexa, cyl, nx, ny, nz);
+   return   hexa;
+}
+// ====================================================== addQuad
+Quad* CrossElements::addQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4, int cyl, 
+                             int dir, int nx, int ny, int nz)
+{
+   Quad* quad = NULL;
+   if (cyl==CylBig) 
+      quad = findQuad1 (e1, e3);
+
+   if (quad == NULL) 
+       quad = newQuad (e1, e2, e3, e4);
+   else if (db)
+      {
+      printf (" Quad (%d, %d,%d,%d) trouve = ", dir, nx, ny, nz);
+      quad->printName ("\n");
+      }
+
+   setQuad (quad, cyl, dir, nx, ny, nz);
+   return quad;
+}
+// ====================================================== findEdge1
+Edge* CrossElements::findEdge1 (Vertex* v1, Vertex* v2)
+{
+   for (int nc=0; nc < nbr_edges1 ; nc++)
+       if (tab_edge[nc] != NULL && tab_edge[nc]->definedBy (v1, v2))
+          return tab_edge[nc];
+
+   return NULL;
+}
+// ====================================================== findHexa1
+Hexa* CrossElements::findHexa1 (Quad* e1, Quad* e2)
+{
+   for (int nc=0; nc < nbr_hexas1 ; nc++)
+       if (tab_hexa[nc] != NULL && tab_hexa[nc]->definedBy (e1, e2))
+          return tab_hexa[nc];
+
+   return NULL;
+}
+// ====================================================== findQuad1
+Quad* CrossElements::findQuad1 (Edge* e1, Edge* e2)
+{
+   for (int nc=0; nc < nbr_quads1 ; nc++)
+       if (tab_quad[nc] != NULL && tab_quad[nc]->definedBy (e1, e2))
+          return tab_quad[nc];
+
+   return NULL;
+}
+// ====================================================== fillGrid
+void CrossElements::fillGrid (int cyl, int deb, int fin)
+{
+   int nz0 = deb >= 0 ? deb : 0;
+   int nzn = fin >  0 ? fin : size_vz [cyl];
+
+   fillCenter (cyl, nz0, nzn);
+
+   for (int nz=nz0 ; nz<nzn ; nz++)
+       {
+       for (int nx=1 ; nx<size_hx ; nx++)
+           {
+                                 //   Edges horizontaux radiaux
+                                 //   Edges horizontaux // cloisons ext
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               int ny1  = (ny + 1) MODULO size_vy;
+               Vertex* vc = getVertexIJK (cyl, nx,   ny, nz);
+               Vertex* v1 = getVertexIJK (cyl, nx+1, ny, nz);
+               Vertex* v2 = getVertexIJK (cyl, nx+1, ny1,nz);
+
+               addEdge (vc, v1, cyl, dir_x, nx,   ny, nz);
+               addEdge (v1, v2, cyl, dir_y, nx+1, ny, nz);
+               }
+                                 //   Quads horizontaux
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               int ny1  = (ny + 1) MODULO size_vy;
+               Edge* e1 = getEdgeI (cyl, nx,   ny,  nz);
+               Edge* e2 = getEdgeJ (cyl, nx+1, ny,  nz);
+               Edge* e3 = getEdgeI (cyl, nx,   ny1, nz);
+               Edge* e4 = getEdgeJ (cyl, nx,   ny,  nz);
+
+               addQuad (e1, e2, e3, e4, cyl, dir_z, nx, ny, nz);  
+               }
+
+           if (nz>0)
+              {
+                                 //   Edges verticaux + cloisons interieures
+              for (int ny=0 ; ny<size_vy ; ny++)
+                  {
+                  Vertex* vp = getVertexIJK (cyl, nx+1, ny, nz-1);
+                  Vertex* vv = getVertexIJK (cyl, nx+1, ny, nz);
+
+                  Edge* edge = addEdge (vp, vv, cyl, dir_z, nx+1, ny, nz-1);
+
+                  Edge* e0 = getEdgeI (cyl, nx, ny,  nz-1);
+                  Edge* e2 = getEdgeI (cyl, nx, ny,  nz);
+                  Edge* e3 = getEdgeK (cyl, nx, ny,  nz-1);
+
+                  addQuad (e0, edge, e2, e3, cyl, dir_y, nx, ny, nz-1);  
+                  }
+                                 //   Cloisons exterieures ***
+              for (int ny=0 ; ny<size_vy ; ny++)
+                  {
+                  int ny1  = (ny + 1) MODULO size_vy;
+                  Edge* e0 = getEdgeJ (cyl, nx+1, ny,  nz-1);
+                  Edge* e2 = getEdgeJ (cyl, nx+1, ny,  nz);
+
+                  Edge* e1 = getEdgeK (cyl, nx+1, ny,  nz-1);
+                  Edge* e3 = getEdgeK (cyl, nx+1, ny1, nz-1);
+                  addQuad (e0, e1, e2, e3, cyl, dir_x, nx+1, ny, nz-1);  
+                  }
+                                 //   Hexas (8) 
+              if (is_filled || cyl==CylBig || (nz!=3 && nz != 4))
+                  {
+                  for (int ny=0 ; ny<size_hy ; ny++)
+                      {
+                      int ny1  = (ny + 1) MODULO size_vy;
+                      // printf (" ---------- Hexa : nz=%d, ny=%d\n", ny, nz);
+                      Quad* qa = getQuadIJ (cyl, nx, ny, nz-1);
+                      Quad* qb = getQuadIJ (cyl, nx, ny, nz);
+
+                      Quad* qc = getQuadJK (cyl, nx+1, ny,  nz-1);
+                      Quad* qd = getQuadJK (cyl, nx,   ny,  nz-1);
+
+                      Quad* qe = getQuadIK (cyl, nx,   ny1, nz-1);
+                      Quad* qf = getQuadIK (cyl, nx,   ny,  nz-1);
+
+                      // Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+                      // setHexa (cell, cyl, nx, ny, nz-1);  
+                      addHexa (qa, qb, qc, qd, qe, qf, cyl, nx, ny, nz-1);  
+                      }
+                  }
+              }
+          }
+       }
+}
+// ====================================================== fillCenter
+void CrossElements::fillCenter (int cyl, int nz0, int nzn)
+{
+   int nx = 0;
+
+   for (int nz=nz0 ; nz<nzn ; nz++)
+       {
+       Vertex* center = getVertexIJK (cyl, 0, 0, nz);
+                                 //   Edges horizontaux // cloisons ext
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               Vertex* v1 = getVertexIJK (cyl, 1, ny, nz);
+               Vertex* v2 = getVertexIJK (cyl, 1, (ny+1) MODULO size_vy, nz);
+               addEdge (v1, v2, cyl, dir_y, nx+1, ny, nz);
+               }
+       if (is_filled)
+          {
+                                 //   Edges horizontaux radiaux
+           for (int nc=0 ; nc<NbrIntCotes ; nc++)
+               {
+               Vertex* vv = getVertexIJK (cyl, 1, 2*nc, nz);
+               addEdge (center, vv, cyl, dir_x, nx, nc, nz);
+               }
+                                 //   Quads horizontaux
+           for (int nc=0; nc<NbrIntCotes ; nc++)
+               {
+               int nc1  = (nc + 1) MODULO NbrIntCotes;
+               Edge* e1 = getEdgeI (cyl, nx, nc,    nz);
+               Edge* e2 = getEdgeJ (cyl, nx+1, 2*nc,  nz);
+               Edge* e3 = getEdgeJ (cyl, nx+1, 2*nc+1, nz);
+               Edge* e4 = getEdgeI (cyl, nx, nc1,    nz);
+
+               addQuad (e1, e2, e3, e4, cyl, dir_z, nx, nc, nz);  
+               }
+          }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          Vertex* vhaut  = getVertexIJK (cyl,nx,0, nz-1);
+          Edge*   pilier = addEdge (center, vhaut, cyl, dir_z, nx, 0, nz-1);
+
+          for (int ny=0 ; ny<size_vy ; ny++)
+              {
+              Vertex* vp = getVertexIJK (cyl, 1, ny, nz-1);
+              Vertex* vv = getVertexIJK (cyl, 1, ny, nz);
+              Edge* edge = addEdge (vp, vv, cyl, dir_z, 1, ny, nz-1);
+              if (is_filled && (ny MODULO 2) == 0)
+                 {
+                 Edge* e0 = getEdgeI (cyl, nx, ny/2,  nz-1);
+                 Edge* e2 = getEdgeI (cyl, nx, ny/2,  nz);
+                 addQuad (e0,edge, e2,pilier, cyl, dir_y, nx, ny/2, nz-1);
+                 }
+              }
+                                 //   Cloisons exterieures
+          for (int ny=0 ; ny<size_vy ; ny++)
+              {
+              int ny1  = (ny + 1) MODULO size_vy;
+              Edge* e0 = getEdgeJ (cyl, 1, ny,  nz-1);
+              Edge* e2 = getEdgeJ (cyl, 1, ny,  nz);
+              Edge* e1 = getEdgeK (cyl, 1, ny,  nz-1);
+              Edge* e3 = getEdgeK (cyl, 1, ny1, nz-1);
+
+              addQuad (e0, e1, e2, e3, cyl, dir_x, 1, ny, nz-1);  
+              }
+                                 //   Hexas (4) 
+          if (is_filled)
+             {
+             for (int nc=0 ; nc < NbrIntCotes ; nc++)
+                 {
+                  // printf (" --------------- Hexa : nz=%d, nc=%d\n", nc, nz);
+                 int nc1  = (nc + 1) MODULO NbrIntCotes;
+                 Quad* qa = getQuadIJ (cyl, 0, nc, nz-1);
+                 Quad* qb = getQuadIJ (cyl, 0, nc, nz);
+
+                 Quad* qc = getQuadJK (cyl, 1, 2*nc,   nz-1);
+                 Quad* qe = getQuadJK (cyl, 1, 2*nc+1, nz-1);
+
+                 Quad* qd = getQuadIK (cyl, 0, nc1, nz-1);
+                 Quad* qf = getQuadIK (cyl, 0, nc,  nz-1);
+
+                  // Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+                  // setHexa (cell, cyl, 0, nc, nz-1);  
+                 addHexa (qa, qb, qc, qd, qe, qf, cyl, nx, nc, nz-1);  
+                 }
+              }
+          }
+       }
+}
+// ====================================================== dump
+void CrossElements::dump ()
+{
+   int sizey [2] = { 4, S_MAXI };
+   for (int cyl=CylSmall ; cyl<=CylBig ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Hexas du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_hz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_hx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Hexa* cell = getHexaIJK (cyl,nx,ny,nz);
+                   int nro = indHexa (cyl, nx, ny, nz);
+                   printf ("tab_hexa[%03d] (%d, %d,%d,%d) = ", 
+                           nro, cyl,nx,ny,nz);
+                   if (cell!=NULL) cell->printName("\n");
+                      else         printf ("NULL\n");
+                   }
+               }
+           }
+       }
+}
+// ====================================================== dumpVertex
+void CrossElements::dumpVertex ()
+{
+   int sizey [3] = { 1, S_MAXI, S_MAXI };
+
+   for (int cyl=CylSmall ; cyl<=CylBig ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Vertex du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_vz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_vx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Vertex* node = getVertexIJK (cyl,nx,ny,nz);
+                   int nro = indVertex (cyl, nx, ny, nz);
+                   printf ("tab_vertex[%03d] (%d, %d,%d,%d) = ", 
+                           nro, cyl,nx,ny,nz);
+                   if (node!=NULL) node->printName("\n");
+                      else         printf ("NULL\n");
+                   }
+               }
+           }
+       }
+}
+// ====================================================== dumpHexas
+void CrossElements::dumpHexas ()
+{
+   int sizey [3] = { 1, 4, S_MAXI };
+
+   for (int cyl=CylSmall ; cyl<=CylBig ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Hexaedres du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_hz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_hx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Hexa* elt = getHexaIJK (cyl,nx,ny,nz);
+                   if (elt!=NULL)
+                      {
+                      int nro = indHexa (cyl, nx, ny, nz);
+                      printf ("tab_hexa[%03d] (%d, %d,%d,%d) = ", 
+                              nro, cyl,nx,ny,nz);
+                      elt->printName("\n");
+                      }
+                   }
+               }
+           }
+       }
+}
+// ====================================================== calcul_centre
+double calcul_centre (Vertex* orig, Vertex* inter)
+{
+   double dx = inter->getX () - orig->getX ();
+   double dy = inter->getY () - orig->getY ();
+   double dz = inter->getZ () - orig->getZ ();
+   double dd = sqrt (dx*dx + dy*dy + dz*dz);
+   return dd;
+}
+// ===================================================== assoSlice 
+void CrossElements::assoSlice (int cyl, double* base, double* normal, int nx, 
+                                                                      int nzs)
+{
+   Real3  center, pnt1, pnt2;
+   string brep;
+
+   Vertex* v_n  = getVertexIJK (cyl, nx, S_N , nzs);
+   Vertex* v_s  = getVertexIJK (cyl, nx, S_S , nzs);
+
+   v_s->getPoint (pnt1); 
+   v_n->getPoint (pnt2); 
+
+   double rayon  = calc_distance (pnt1, pnt2)/2;
+   for (int nro=0 ; nro<DIM3 ; nro++) 
+       center[nro] = (pnt1[nro] + pnt2[nro])/2; 
+
+   geom_create_circle (center, rayon, normal, base, brep);
+   geom_define_line   (brep);   // pour geom_asso_point
+
+   for (int ny=0 ; ny<S_MAXI ; ny++)
+       {
+       assoArc (cyl, nx, ny, nzs, brep, rayon);
+       }
+}
+// ===================================================== assoArc 
+void CrossElements::assoArc (int cyl, int nx, int ny, int nz, string& brep, 
+                             double rayon)
+{
+    double angle1 = getAngle (cyl, ny);
+    double angle2 = getAngle (cyl, ny+1);
+    Edge*   edge  = getEdgeJ     (cyl, nx, ny, nz);
+    if (edge==NULL)
+       return;
+
+    Shape* shape = new Shape (brep);
+    shape->setBounds (angle1*UnSur2pi, angle2*UnSur2pi);
+    edge ->addAssociation (shape);
+
+    Vertex* node  = getVertexIJK (cyl, nx, ny, nz);
+    geom_asso_point  (angle1*rayon,    node);
+
+    int ny1 = ny+1;
+    if (ny1>=S_MAXI)
+        ny1 = 0;
+
+    node = getVertexIJK (cyl, nx, ny1, nz);
+    geom_asso_point (angle2*rayon, node);
+}
+// ====================================================== getAngle
+double CrossElements::getAngle (int cyl, int nj)
+{
+   switch (nj)
+      {
+      case S_E    : return 0;
+      case S_NE   : return angle_inter[cyl];
+      case S_N    : return M_PI/2;
+      case S_NW   : return M_PI - angle_inter[cyl];
+      case S_W    : return M_PI;
+      case S_SW   : return M_PI + angle_inter[cyl];
+      case S_S    : return 3*M_PI/2;
+      case S_SE   : return 2*M_PI - angle_inter[cyl];
+      case S_MAXI : return 2*M_PI;
+      default     : break;
+      }
+   return 0;
+}
+// ====================================================== addVertex
+void CrossElements::addVertex (int cyl, int ni, int nj, int nk, double px,
+                               double rayon)
+{
+   if (rayon<0.0)
+       rayon = cross_rayon [cyl][ni];
+   double theta = getAngle (cyl, nj);
+
+   if (cyl==CylSmall) 
+       setVertex (cyl, ni, nj, nk,  px, rayon*cos(theta), rayon*sin(theta));
+   else
+       setVertex (cyl, ni, nj, nk,  rayon*cos(theta), rayon*sin(theta), px);
+}
+// ====================================================== addSlice
+void CrossElements::addSlice (int cyl, int ni, int nk, double px, double rayon)
+{
+   for (int nj=0 ; nj < S_MAXI ; nj++)
+       addVertex (cyl, ni, nj, nk, px, rayon);
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexCrossElements.hxx b/src/HEXABLOCK/HexCrossElements.hxx
new file mode 100755 (executable)
index 0000000..07d31ea
--- /dev/null
@@ -0,0 +1,134 @@
+
+// Class : Gestion des tutaux en T (like castles in scotland)
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __CROSS_ELEMENTS_H
+#define __CROSS_ELEMENTS_H
+
+#include "HexElements.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum { NbrSlices1=6, NbrSlices2=4 };
+enum { SizeRay=3, BiCyl=2};
+enum { NbrVSlices1=NbrSlices1+1, NbrVSlices2=NbrSlices2+1};
+enum { MiddleSlice1=NbrSlices1/2};
+enum { Cyl1=CylSmall, Cyl2=CylBig };
+enum { NO_CYL=-1, NO_PIPE=0, IS_HERE=1 };
+
+class CrossElements : public Elements 
+{
+public:
+   virtual int countHexa   () { return nbr_hexas ; }
+   virtual int countQuad   () { return nbr_quads ; }
+   virtual int countEdge   () { return nbr_edges ; }
+   virtual int countVertex () { return nbr_vertex ; }
+
+public:
+   CrossElements (Document* doc, EnumGrid type=GR_BICYL);
+
+   virtual ~CrossElements () {}
+
+   Hexa*   getHexaIJK   (int part, int nx, int ny, int nz);
+   Quad*   getQuadIJ    (int part, int nx, int ny, int nz);
+   Quad*   getQuadJK    (int part, int nx, int ny, int nz);
+   Quad*   getQuadIK    (int part, int nx, int ny, int nz);
+   Edge*   getEdgeI     (int part, int nx, int ny, int nz);
+   Edge*   getEdgeJ     (int part, int nx, int ny, int nz);
+   Edge*   getEdgeK     (int part, int nx, int ny, int nz);
+   Vertex* getVertexIJK (int part, int nx, int ny, int nz);
+
+                     // Tutaux en T (like castles in scotland)
+   int  crossCylinders (Cylinder* cyl1, Cylinder* cyl2, bool fill=true);
+   void dump ();
+   void dumpVertex ();
+   void dumpHexas  ();
+
+private :
+   void resize ();
+   void fillGrid   (int cyl, int deb=-1, int fin=-1);
+   void fillCenter (int cyl, int deb, int fin);
+   void createLittleCyl ();
+   void createBigCyl    ();
+
+   void copyVertex (int i1, int j1, int k1, int i2, int j2, int k2);
+   void copyEdge (int d1, int i, int j, int k, int d2, int i2, int j2, int k2);
+   void copyQuad (int d1, int i, int j, int k, int d2, int i2, int j2, int k2);
+
+   void setVertex (int cyl, int nx, int ny, int nz, double px, double py, 
+                                                               double pz);
+
+   void setVertex (Vertex* vv, int cyl, int nx, int ny, int nz);
+   void setEdge   (Edge* edge, int cyl, int dir, int nx, int ny, int nz);
+   void setQuad   (Quad* quad, int cyl, int dir, int nx, int ny, int nz);
+   void setHexa   (Hexa* cell, int cyl, int nx, int ny, int nz);
+
+   Edge* addEdge   (Vertex* v1, Vertex* v2, int cyl, int dir, int nx, 
+                                                    int ny, int nz);
+   Quad* addQuad   (Edge* e1, Edge* e2, Edge* e3, Edge* e4, int cyl, int dir, 
+                   int nx, int ny, int nz);
+   Hexa* addHexa   (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf,
+                   int cyl, int nx, int ny, int nz);
+
+   int  indVertex (int cyl, int nx, int ny, int nz);
+   int  indHexa   (int cyl, int nx, int ny, int nz);
+   int  indQuad   (int cyl, int dir, int nx, int ny, int nz);
+   int  indEdge   (int cyl, int dir, int nx, int ny, int nz);
+
+   Hexa* findHexa1 (Quad*   q1, Quad*   q2);
+   Edge* findEdge1 (Vertex* v1, Vertex* v2);
+   Quad* findQuad1 (Edge*   e1, Edge*   e2);
+
+   void assoCylinder  (int cyl, double* normal);
+   void assoSlice     (int cyl, double* base, double* norm, int nx, int zlice);
+   void assoArc    (int cyl, int nx, int ny, int nz, string& brep, double ray);
+   void assoBigMiddle (double* base, double* normal, int nzlice);
+   int  assoIntersection (int nx, int nzlice, double* snorm, double* bnorm);
+
+
+   double getAngle  (int cyl, int ny);
+   void   addSlice  (int cyl, int ni, int nk, double px, double rayon=-1);
+   void   addVertex (int cyl, int ni, int nj, int nk, double px, double rayon);
+   void   majIntersection ();
+   void   adjustLittleSlice (int nx, int nk, int nxbig);
+
+private :
+    enum {NbrIntCotes = 4 };
+    enum {size_hiy = NbrIntCotes, size_h1z = 6,    size_h2z=4};
+    enum {size_v1z = size_h1z+1,  size_v2z = size_h2z+1};
+
+    bool      is_filled;
+    Cylinder* cross_cyl1;
+    Cylinder* cross_cyl2;
+    Vertex*   cross_center;
+
+    int  size_vz[BiCyl], size_hz[BiCyl];
+    int  nbr_hexas1, nbr_quads1, nbr_edges1, nbr_vertex1;
+
+    double angle_inter [BiCyl];
+    double cross_rayon [BiCyl][SizeRay];
+    double big_hauteur [size_v2z];
+
+    bool  at_right,  at_left;
+    int   cyl_right, cyl_left;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCrossElements_build.cxx b/src/HEXABLOCK/HexCrossElements_build.cxx
new file mode 100755 (executable)
index 0000000..709ec72
--- /dev/null
@@ -0,0 +1,564 @@
+
+// C++ : Gestion des cylindres croises : construction
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexCrossElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexCylinder.hxx"
+#include "HexShape.hxx"
+
+static bool   db  = false;
+
+BEGIN_NAMESPACE_HEXA
+
+static const int    MaxLevel    = 7;
+static const double epaiss2 = 0.5;
+static const double UnSur2pi = DEMI/M_PI;       
+
+double calcul_centre (Vertex* orig, Vertex* inter); 
+
+void geom_define_line (string& brep);
+void geom_asso_point  (double angle, Vertex* node);
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep);
+int  geom_create_cylcyl (double* borig, double* bnorm, double* bbase, 
+                         double  bray,  double  bhaut, 
+                         double* sorig, double* snorm, double* sbase, 
+                         double  sray,  double  shaut);
+int  geom_asso_cylcyl   (Edge* edge);
+
+// ====================================================== createBigCyl
+void CrossElements::createBigCyl ()
+{
+   const int iv0   = 0;
+   const int kv_mil = cyl_left != NO_PIPE ? 2 : 3 ;
+
+   enum { k0, k1, k2, k3, k4 };
+   double z0, z1, z2, z3, z4;
+
+   z0 = big_hauteur[0] = - calcul_centre (cross_cyl2->getBase(), cross_center);
+   z4 = big_hauteur[4] = z0 + cross_cyl2->getHeight ();
+
+   z1 = big_hauteur[1] = getVertexIJK (CylSmall, NxExt, S_SE, kv_mil)->getZ();
+   z2 = big_hauteur[2] = getVertexIJK (CylSmall, NxExt, S_E,  kv_mil)->getZ();
+   z3 = big_hauteur[3] = getVertexIJK (CylSmall, NxExt, S_NE, kv_mil)->getZ();
+
+
+   setVertex (CylBig, iv0, 0, k0,    0, 0, z0);
+   addSlice  (CylBig, NxInt, k0, z0);
+   addSlice  (CylBig, NxExt, k0, z0);
+
+   setVertex (CylBig, iv0, 0, k4,    0, 0, z4);
+   addSlice  (CylBig, NxInt, k4, z4);
+   addSlice  (CylBig, NxExt, k4, z4);
+
+   //------------------------------- Points intermediaires :
+
+   double xe1 = getVertexIJK (CylBig, NxExt, S_N, k0)->getX();
+   double ye1 = getVertexIJK (CylBig, NxExt, S_N, k0)->getY();
+
+   double xe2 = getVertexIJK (CylBig, NxExt, S_S, k0)->getX();
+   double ye2 = getVertexIJK (CylBig, NxExt, S_S, k0)->getY();
+
+   double xi1 = getVertexIJK (CylBig, NxInt, S_N, k0)->getX();
+   double yi1 = getVertexIJK (CylBig, NxInt, S_N, k0)->getY();
+
+   double xi2 = getVertexIJK (CylBig, NxInt, S_S, k0)->getX();
+   double yi2 = getVertexIJK (CylBig, NxInt, S_S, k0)->getY();
+
+   //------------------------------- Reprise des vertex du cylindre 1
+
+   //------------------------------- Centre
+   if (grid_type != GR_BIPIPE) 
+       copyVertex (NxExt, S_S,  3, iv0,   0,    k1);
+
+   //------------------------------- Creation Vertex Nord-Sud
+   for (int nk=k1 ; nk<k4 ; nk++)
+       {
+       setVertex  (CylBig, NxExt, S_N, nk,   xe1, ye1, big_hauteur[nk]);
+       setVertex  (CylBig, NxExt, S_S, nk,   xe2, ye2, big_hauteur[nk]);
+       setVertex  (CylBig, NxInt, S_N, nk,   xi1, yi1, big_hauteur[nk]);
+       setVertex  (CylBig, NxInt, S_S, nk,   xi2, yi2, big_hauteur[nk]);
+       }
+   //------------------------------- Face k1 externe :
+
+   copyVertex (NxExt, S_S,  5,   NxExt, S_E,  k1);
+   copyVertex (NxExt, S_SE, 5,   NxExt, S_NE, k1);
+   copyVertex (NxExt, S_SW, 5,   NxExt, S_SE, k1);
+
+   copyVertex (NxExt, S_S,  1,   NxExt, S_W,  k1);
+   copyVertex (NxExt, S_SE, 1,   NxExt, S_NW, k1);
+   copyVertex (NxExt, S_SW, 1,   NxExt, S_SW, k1);
+
+   //------------------------------- Face k1 interne :
+
+   copyVertex (NxExt, S_S,  2,   NxInt, S_W,  k1);
+   copyVertex (NxExt, S_SE, 2,   NxInt, S_NW, k1);
+   copyVertex (NxExt, S_SW, 2,   NxInt, S_SW, k1);
+
+   copyVertex (NxExt, S_SE, 3,   NxInt, S_N,  k1);  // 16/02/2012
+   copyVertex (NxExt, S_SW, 3,   NxInt, S_S,  k1);  // 16/02/2012
+
+   copyVertex (NxExt, S_S,  4,   NxInt, S_E,  k1);
+   copyVertex (NxExt, S_SE, 4,   NxInt, S_NE, k1);
+   copyVertex (NxExt, S_SW, 4,   NxInt, S_SE, k1);
+
+   // ------------------------------------------------------------ K2
+   //------------------------------- Centre
+   // copyVertex (iv0, 0,      3,   iv0,   0,    k2);
+   // ------------------------------ Face k2 externe :
+
+
+   copyVertex (NxExt, S_E,  5,   NxExt, S_NE, k2);
+   copyVertex (NxExt, S_W,  5,   NxExt, S_SE, k2);
+
+   copyVertex (NxExt, S_E,  1,   NxExt, S_NW, k2);
+   copyVertex (NxExt, S_W,  1,   NxExt, S_SW, k2);
+
+   //------------------------------- Face k2 interne :
+
+   copyVertex (NxExt, S_E,  2,   NxInt, S_NW, k2);
+   copyVertex (NxExt, S_W,  2,   NxInt, S_SW, k2);
+
+   copyVertex (NxExt, S_E,  4,   NxInt, S_NE, k2);
+   copyVertex (NxExt, S_W,  4,   NxInt, S_SE, k2);
+
+   if (cyl_left == NO_PIPE)
+      {
+      addVertex (CylBig, NxExt, S_W, k2, z2, cross_rayon [CylBig][NxExt]);
+      addVertex (CylBig, NxInt, S_W, k2, z2, cross_rayon [CylBig][NxInt]);
+      }
+
+   if (cyl_right == NO_PIPE)
+      {
+      addVertex (CylBig, NxExt, S_E, k2, z2, cross_rayon [CylBig][NxExt]);
+      addVertex (CylBig, NxInt, S_E, k2, z2, cross_rayon [CylBig][NxInt]);
+      }
+
+   // ------------------------------------------------------------
+
+   //------------------------------- Centre
+   if (grid_type != GR_BIPIPE) 
+       copyVertex (NxExt, S_N,  3,   iv0,   0,    k3);
+
+   //------------------------------- Face k3 externe :
+   copyVertex (NxExt, S_N,  5,   NxExt, S_E,  k3);
+   copyVertex (NxExt, S_NE, 5,   NxExt, S_NE, k3);
+   copyVertex (NxExt, S_NW, 5,   NxExt, S_SE, k3);
+
+   copyVertex (NxExt, S_N,  1,   NxExt, S_W,  k3);
+   copyVertex (NxExt, S_NE, 1,   NxExt, S_NW, k3);
+   copyVertex (NxExt, S_NW, 1,   NxExt, S_SW, k3);
+
+   //------------------------------- Face k3 interne :
+
+   copyVertex (NxExt, S_N,  2,   NxInt, S_W,  k3);
+   copyVertex (NxExt, S_NE, 2,   NxInt, S_NW, k3);
+   copyVertex (NxExt, S_NW, 2,   NxInt, S_SW, k3);
+
+   copyVertex (NxExt, S_NE, 3,   NxInt, S_N,  k3);  // 16/02/2012
+   copyVertex (NxExt, S_NW, 3,   NxInt, S_S,  k3);  // 16/02/2012
+
+   copyVertex (NxExt, S_N,  4,   NxInt, S_E,  k3);
+   copyVertex (NxExt, S_NE, 4,   NxInt, S_NE, k3);
+   copyVertex (NxExt, S_NW, 4,   NxInt, S_SE, k3);
+
+   //------------------------------- Remplissage
+
+   if (grid_type == GR_BIPIPE) 
+      {
+      for (int nj=0; nj<S_MAXI ; nj++)
+          {
+          Vertex* node = getVertexIJK (CylBig, NxInt, nj, 0);
+          double  px = node->getX();
+          double  py = node->getY();
+          for (int nk=1; nk<4 ; nk++)
+              {
+              node = getVertexIJK (CylBig, NxInt, nj, nk);
+              if (node != NULL)
+                 {
+                 node -> setX (px);
+                 node -> setY (py);
+                 }
+              }
+          }
+      }
+   fillGrid (CylBig); 
+}
+// ====================================================== createLittleCyl
+void CrossElements::createLittleCyl ()
+{
+   double c1 = calcul_centre (cross_cyl1->getBase(), cross_center);
+   // double cosalpha = cos (angle_inter[CylBig]);
+   double prayext  = cross_rayon [CylBig][NxExt]; // * cosalpha;
+   double prayint  = cross_rayon [CylBig][NxInt]; // * cosalpha;
+
+   double t_haut [MaxLevel] = { -c1,  -prayext,  -prayint,  
+                                 0,    prayint,  prayext, 
+                                 cross_cyl1->getHeight () -c1 };
+
+   double rm = (  cross_rayon [CylSmall][NxExt] 
+                + cross_rayon [CylSmall][NxInt]) / 2; 
+   double rc =    cross_rayon [CylBig]  [NxInt];
+
+   double t_rayext [MaxLevel] = { -1,  -1, rm, rc, rm, -1, -1 }; 
+
+/* *******************************************************************
+   int nkdeb = at_left  ? 0        : size_v1z/2;
+   int nkfin = at_right ? size_v1z : size_v1z/2;
+   ******************************************************************* */
+
+   int nkdeb, nkfin;
+   switch (cyl_left)
+          {
+          case IS_HERE : nkdeb = 0;
+               break;
+          case NO_PIPE : nkdeb = size_v1z/2;
+               break;
+          case NO_CYL  : nkdeb = 1;
+               break;
+          }
+   switch (cyl_right)
+          {
+          case IS_HERE : nkfin = size_v1z;
+               break;
+          case NO_PIPE : nkfin = size_v1z/2;
+               break;
+          case NO_CYL  : nkfin = size_v1z-1;
+               break;
+          }
+
+   for (int nk = nkdeb ; nk<nkfin ; nk++)
+       {
+       double px = t_haut [nk]; 
+       if (grid_type != GR_BIPIPE) 
+          addVertex (CylSmall, 0, 0, nk, px, 0);
+
+       addSlice (CylSmall, NxInt, nk, px);
+       addSlice (CylSmall, NxExt, nk, px, t_rayext[nk]);
+       }
+
+
+   fillGrid (CylSmall);
+}
+// ====================================================== crossCylinders
+int CrossElements::crossCylinders (Cylinder* lun, Cylinder* lautre, bool fill)
+{
+   is_filled = fill;
+   resize ();
+
+   if (lun->getRadius() < lautre->getRadius())
+      {
+      cross_cyl1 = lun;
+      cross_cyl2 = lautre;
+      }
+   else
+      {
+      cross_cyl1 = lautre;
+      cross_cyl2 = lun;
+      }
+
+   cross_center = cross_cyl2->interCylinder (cross_cyl1, at_left, at_right);
+   if (cross_center==NULL)
+      return HERR;
+
+   if (at_left)                     cyl_left = IS_HERE;
+   else if (grid_type == GR_BIPIPE) cyl_left = NO_PIPE;
+   else                             cyl_left = NO_CYL;
+
+   if (at_right)                    cyl_right = IS_HERE;
+   else if (grid_type == GR_BIPIPE) cyl_right = NO_PIPE;
+   else                             cyl_right = NO_CYL;
+
+   double cross_gray1  = cross_cyl1->getRadius ();
+   double cross_gray2  = cross_cyl2->getRadius ();
+   double cross_igray1 = cross_gray1 * epaiss2;
+   double cross_igray2 = cross_gray2 * epaiss2;
+
+   if (db) 
+      {
+      HexDisplay (cross_gray1);
+      HexDisplay (cross_gray2);
+      HexDisplay (cross_igray2);
+      HexDisplay (cross_igray1);
+      }
+
+   angle_inter [CylSmall] = M_PI/6;
+   angle_inter [CylBig] = asin (cross_gray1/cross_gray2);
+
+   cross_rayon [CylSmall] [0] = cross_rayon [CylBig] [0] = 0;
+
+   cross_rayon [CylSmall] [NxInt] = cross_igray1;
+   cross_rayon [CylSmall] [NxExt] = cross_gray1;
+   cross_rayon [CylBig]   [NxInt] = cross_igray2;
+   cross_rayon [CylBig]   [NxExt] = cross_gray2;
+
+   createLittleCyl ();
+   createBigCyl    ();
+
+   if (cyl_left!=NO_PIPE)
+      {
+      adjustLittleSlice (NxExt, 1, NxExt);
+      adjustLittleSlice (NxInt, 1, NxExt);
+      if (grid_type == GR_BIPIPE) 
+         adjustLittleSlice (NxInt, 2, NxInt);
+      }
+
+   if (cyl_right!=NO_PIPE)
+      {
+      adjustLittleSlice (NxExt, 5, NxExt);
+      adjustLittleSlice (NxInt, 5, NxExt);
+      if (grid_type == GR_BIPIPE) 
+         adjustLittleSlice (NxInt, 4, NxInt);
+      }
+
+   Vector* iprim = new Vector (cross_cyl1->getDirection());
+   Vector* kprim = new Vector (cross_cyl2->getDirection());
+   Vector* jprim = new Vector (kprim);
+
+   iprim->renormer ();
+   kprim->renormer ();
+   jprim->vectoriel (kprim, iprim);
+
+   transfoVertices (cross_center, iprim, jprim, kprim);
+
+   Real3 snorm, bnorm;
+   iprim->getCoord (snorm);
+   kprim->getCoord (bnorm);
+   assoCylinder (CylSmall, snorm);
+   assoCylinder (CylBig,   bnorm);
+
+   if (cyl_left == IS_HERE)
+      { 
+      assoIntersection (NxExt, 1, snorm, bnorm);
+      if (grid_type == GR_BIPIPE) 
+         { 
+         assoIntersection (NxInt, 2, snorm, bnorm);
+         }
+      }
+
+   if (cyl_right == IS_HERE)
+      { 
+      assoIntersection (NxExt, NbrSlices1-1, snorm, bnorm);
+      if (grid_type == GR_BIPIPE) 
+         { 
+         assoIntersection (NxInt, NbrSlices1-2, snorm, bnorm);
+         }
+      }
+
+   assoResiduelle ();
+   return HOK;
+}
+// ====================================================== copyVertex
+void CrossElements::copyVertex (int i1, int j1, int k1, int i2, int j2, int k2)
+{
+   Vertex*  node = getVertexIJK (CylSmall, i1, j1, k1);
+   if (node!=NULL)
+      {
+      setVertex (node, CylBig, i2, j2, k2);
+      return;
+      }
+
+   double rayon   = cross_rayon [CylBig][i2];
+   double hauteur = big_hauteur [k2];
+
+   addVertex (CylBig, i2, j2, k2, hauteur, rayon);
+}
+// ===================================================== assoCylinder 
+void CrossElements::assoCylinder (int cyl, double* normal)
+{
+   Real3   base, vec1, center, east, west, nordest;
+   int nk = 0;
+   if (cyl==CylSmall && cyl_left == NO_PIPE) 
+      nk  = size_hz[cyl];
+
+   Vertex* v_e  = getVertexIJK (cyl, NxExt, S_E , nk);
+   Vertex* v_ne = getVertexIJK (cyl, NxExt, S_NE, nk);
+   Vertex* v_w  = getVertexIJK (cyl, NxExt, S_W , nk);
+
+   v_e->getPoint (east); 
+   v_w->getPoint (west); 
+   calc_vecteur  (west, east, base);
+
+   for (int nro=0 ; nro<DIM3 ; nro++) 
+       center[nro] = (east[nro] + west[nro])/2;
+
+   v_ne->getPoint (nordest); 
+   calc_vecteur (center, nordest, vec1);
+
+   double ps    = prod_scalaire (base, vec1);
+   double pnorm = calc_norme(base) * calc_norme(vec1);
+
+   angle_inter [cyl] = acos (ps/pnorm);
+
+   if (cyl==CylBig || at_left)
+      {
+      assoSlice (cyl, base, normal, NxExt, 0);
+      if (grid_type == GR_BIPIPE) 
+         {
+         assoSlice (cyl, base, normal, NxInt, 0);
+         assoSlice (cyl, base, normal, NxInt, 1);
+         }
+      }
+
+   if (cyl==CylBig || cyl_right == IS_HERE)
+      {
+      assoSlice (cyl, base, normal, NxExt, size_hz[cyl]);
+      if (grid_type == GR_BIPIPE) 
+         {
+         assoSlice (cyl, base, normal, NxInt, size_hz[cyl]);
+         assoSlice (cyl, base, normal, NxInt, size_hz[cyl]-1);
+         }
+      }
+
+   if (cyl==CylBig)
+      for (int nz=1 ; nz<=3 ; nz++)
+          assoBigMiddle (base, normal, nz);
+}
+// ===================================================== assoBigMiddle 
+void CrossElements::assoBigMiddle (double* base, double* normal, int nzs)
+{
+   Real3  center, pnt1, pnt2;
+   string brep;
+   int nx = NxExt;
+
+   Vertex* v_n  = getVertexIJK (CylBig, nx, S_N , nzs);
+   Vertex* v_s  = getVertexIJK (CylBig, nx, S_S , nzs);
+
+   v_s->getPoint (pnt1); 
+   v_n->getPoint (pnt2); 
+
+   double rayon = calc_distance (pnt1, pnt2)/2;
+   double alpha = angle_inter [CylBig];
+   if (nzs != 2)
+      {
+      double h1  = cross_rayon[CylSmall][NxExt] * cos (angle_inter[CylSmall]);
+      alpha = asin (h1/cross_rayon[CylBig][NxExt]);
+      }
+
+   for (int nro=0 ; nro<DIM3 ; nro++) 
+       center[nro] = (pnt1[nro] + pnt2[nro])/2; 
+
+   geom_create_circle (center, rayon, normal, base, brep);
+   geom_define_line   (brep);   // pour geom_asso_point
+
+   if (cyl_right == NO_PIPE)
+      {
+      assoArc (CylBig, NxExt, S_SE, nzs, brep, rayon);
+      assoArc (CylBig, NxExt, S_E,  nzs, brep, rayon);
+      }
+
+   assoArc (CylBig, NxExt, S_NE, nzs, brep, rayon);
+   assoArc (CylBig, NxExt, S_N , nzs, brep, rayon);
+
+   if (cyl_left == NO_PIPE)
+      {
+      assoArc (CylBig, NxExt, S_NW, nzs, brep, rayon);
+      assoArc (CylBig, NxExt, S_W , nzs, brep, rayon);
+      }
+
+   assoArc (CylBig, NxExt, S_SW, nzs, brep, rayon);
+   assoArc (CylBig, NxExt, S_S , nzs, brep, rayon);
+}
+// ====================================================== adjustLittleSlice
+void CrossElements::adjustLittleSlice (int ni, int nk, int nibig)
+{
+   Vertex* node = getVertexIJK (CylSmall, ni, S_N, nk);
+   if (node==NULL)
+      return;
+
+   double grayon2 = cross_rayon[CylBig][nibig] * cross_rayon[CylBig][nibig];
+   double prayon  = cross_rayon[CylSmall][ni];
+   for (int nj=0;  nj<S_MAXI ; nj++)
+       {
+       node  = getVertexIJK (CylSmall, ni, nj, nk);
+       double angle = getAngle (CylSmall, nj);
+       double py = prayon * cos (angle);
+       double pz = prayon * sin (angle);
+       double px = sqrt (grayon2-py*py);
+
+       double qx = node->getX();
+       if (qx>=0) node->setX ( px);
+       else       node->setX (-px);
+       node->setY (py);
+       node->setZ (pz);
+       }
+}
+// ===================================================== assoIntersection 
+int CrossElements::assoIntersection (int nxs, int nzs, double* snorm, 
+                                                       double* bnorm)
+{
+   Real3  center;
+   Real3  pse, psw, sorig, sbase;
+   Real3  pbe, pbw, borig, bbase;
+   string brep;
+
+   cross_center->getPoint (center);
+   int nz = nzs < MiddleSlice1 ? 0 : NbrSlices1;
+
+   getVertexIJK (CylSmall, nxs, S_E , nz)->getPoint (pse);
+   getVertexIJK (CylSmall, nxs, S_W , nz)->getPoint (psw);
+   getVertexIJK (CylBig,   nxs, S_E , 0) ->getPoint (pbe);
+   getVertexIJK (CylBig,   nxs, S_W , 0) ->getPoint (pbw);
+
+   double srayon = calc_distance (pse, psw)/2;
+   double brayon = calc_distance (pbe, pbw)/2;
+
+   calc_milieu  (psw, pse, sorig);
+   calc_milieu  (pbw, pbe, borig);
+   calc_vecteur (psw, pse, sbase);
+   calc_vecteur (pbw, pbe, bbase);
+
+   double shaut = calc_distance (center, sorig);
+   double bhaut = calc_distance (center, borig)*2;
+   double* orig = nzs < MiddleSlice1 ? sorig : center;    // Pb orientation
+
+   int ier = geom_create_cylcyl (borig, bnorm, bbase, brayon, bhaut, 
+                                  orig, snorm, sbase, srayon, shaut);
+   if (ier != HOK)
+      return ier;
+
+   for (int ny=S_E ; ny<=S_SE ; ny++)
+       {
+       Vertex* node = getVertexIJK (CylSmall, nxs, ny, nzs);
+       if (node!=NULL)
+           node->clearAssociation (); 
+       }
+
+   for (int ny=S_E ; ny<=S_SE ; ny++)
+       {
+       Edge* edge = getEdgeJ (CylSmall, nxs, ny, nzs);
+       geom_asso_cylcyl (edge);
+       }
+
+   return HOK;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexCylinder.cxx b/src/HEXABLOCK/HexCylinder.cxx
new file mode 100644 (file)
index 0000000..9851c12
--- /dev/null
@@ -0,0 +1,278 @@
+
+// C++ : Gestion des cylindres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexCylinder.hxx"
+#include "HexVertex.hxx"
+#include "HexVector.hxx"
+#include "HexXmlWriter.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+bool is_out (double val, double orig, double lg);
+
+// ======================================================== Constructeur
+Cylinder::Cylinder(Vertex* b, Vector* v, double r, double h)
+        : EltBase (b->dad())
+{
+    c_base   = b;
+    c_dir    = v;
+    c_radius = r;
+    c_height = h;
+
+    if (el_root->debug ())
+       {
+       Echo ("---------------------------------- AddCylinder");
+       HexDisplay (c_radius);
+       HexDisplay (c_height);
+       HexDump (c_base);
+       HexDump (c_dir);
+       cout << endl;
+       }
+}
+// ======================================================== rdiffers
+bool rdiffers (double v1, double v2)
+{
+   double dd = v1-v2;
+   return dd*dd > 1e-12;
+}
+// ======================================================== norme
+double norme (double px, double py, double pz)
+{
+   double res = sqrt (px*px + py*py + pz*pz);
+   return res;
+}
+// ======================================================== interCylinder
+///  Intersection de 2 droites (c1,v1) et (c2,v2)
+///  Le point M(x,yz) est solutions de 2 equations :
+///            (c1,m) = k * v1 
+///            (c2,m) vectoriel v2 = 0
+///            
+///  x = xc1 + k * xv1                  (1)
+///  y = yc1 + k * yv1                  (2)
+///  z = zc1 + k * zv1                  (3)
+///  (x-xc2) * yv2 - (y-yc2) * xv2 = 0  (4)
+///  (z-zc2) * yv2 - (y-yc2) * zv2 = 0  (5)
+///  (x-xc2) * zv2 - (z-zc2) * xv2 = 0  (6)
+///             
+///  En substituant les (x,y,z)
+///             
+///  (k*xv1+xc1-xc2) * yv2 - (k*yv1+yc1-yc2) * xv2 = 0  (4)
+///  (k*zv1+zc1-zc2) * yv2 - (k*yv1+yc1-yc2) * zv2 = 0  (5)
+///  (k*xv1+xc1-xc2) * zv2 - (k*zv1+zc1-zc2) * xv2 = 0  (6)
+///             
+///  k * (xv1*yv2 - yv1*xv2) + (xc1-xc2) * yv2 - (yc1-yc2) * xv2 = 0 (4)
+///  k * dxy - nxy = 0      (4)
+///  k * dzy - nzy = 0      (5)
+///  k * dxz - nxz = 0      (6)
+///
+///  nxy = (xc2-xc1) * yv2 - (yc2-yc1) * xv2
+///  dxy =  xv1*yv2 - yv1*xv2
+///             
+// ======================================================== interCylinder
+Vertex* Cylinder::interCylinder (Cylinder* small, bool& left, bool& right)
+{
+   Real3 orig;
+   int ier = interCylinder (small, left, right, orig);
+   if (ier!=HOK)
+       return NULL;
+
+    Vertex* sol = new Vertex (c_base->dad(), orig[0],  orig[1],  orig[2]);
+    return sol;
+}
+///             
+// ======================================================== interCylinder
+int Cylinder::interCylinder (Cylinder* small, bool& left, bool& right, 
+                             double* orig)
+{
+    left = right = true;
+    if (el_root->debug ())
+       {
+       Echo ("---------------------------------- interCylinders");
+       PutData (this->c_radius);
+       PutData (small->c_radius);
+       PutData (this->c_height);
+       PutData (small->c_height);
+       HexDump (this->c_base);
+       HexDump (small->c_base);
+       HexDump (this->c_dir);
+       HexDump (small->c_dir);
+       }
+
+    double norm1 = c_dir->getNorm(); 
+    double norm2 = small->c_dir->getNorm(); 
+
+    double xc1 = c_base->getX(); 
+    double yc1 = c_base->getY(); 
+    double zc1 = c_base->getZ(); 
+
+    double xc2 = small->c_base->getX(); 
+    double yc2 = small->c_base->getY(); 
+    double zc2 = small->c_base->getZ(); 
+
+    double xv1 = c_dir->getDx()/norm1; 
+    double yv1 = c_dir->getDy()/norm1; 
+    double zv1 = c_dir->getDz()/norm1; 
+
+    double xv2 = small->c_dir->getDx()/norm2; 
+    double yv2 = small->c_dir->getDy()/norm2; 
+    double zv2 = small->c_dir->getDz()/norm2; 
+
+    double nxyz [DIM3] = { (xc2-xc1) * yv2 - (yc2-yc1) * xv2,
+                           (zc2-zc1) * yv2 - (yc2-yc1) * zv2,
+                           (xc2-xc1) * zv2 - (zc2-zc1) * xv2 };
+
+    double dxyz [DIM3] = { xv1*yv2 - yv1*xv2, 
+                           zv1*yv2 - yv1*zv2,
+                           xv1*zv2 - zv1*xv2 };
+    double lambda = 0;
+    bool   prems  = true;
+    for (int dd=0 ; dd<DIM3 ; dd++)
+        {
+                                      // dxyz!=0 : calcul de lambda
+        if (rdiffers (dxyz [dd], ZEROR)) 
+           {
+           double kk = nxyz [dd] / dxyz[dd];
+                                      // 1er lambda trouve 
+           if (prems)
+              {
+              prems  = false;
+              lambda = kk;
+              }
+                                      // Solutions incompatibles 
+          else if (rdiffers (kk, lambda))
+              {
+              cout << "*** InterCylinders : Solutions incompatibles " << endl;
+              return HERR;
+              }
+                                      // equation O*lamda = 0 : ignoree
+       // else ....
+           }
+                                      // dxyz=0 et nxyz!=0 : Pas de solution
+       else if (rdiffers (nxyz [dd], ZEROR)) 
+           {
+           cout << "*** InterCylinders : intersection vide " << endl;
+           return HERR;
+           }
+        }
+
+                                      // Aucune solution trouvee
+    if (prems)
+       {
+       HexDisplay (prems);
+       cout << "*** InterCylinders : intersection non trouvee " << endl;
+       return HERR;
+       }
+                                    // Intersection des droites
+    orig [dir_x] = xc1 + lambda*xv1;
+    orig [dir_y] = yc1 + lambda*yv1;
+    orig [dir_z] = zc1 + lambda*zv1;
+
+    Real3 base1, dir1, extr1;
+    Real3 base2, dir2, extr2;
+
+    this ->c_base->getPoint (base1);
+    small->c_base->getPoint (base2);
+
+    this ->c_dir->getCoord (dir1);
+    small->c_dir->getCoord (dir2);
+
+    for (int dd=dir_x ; dd<=dir_z ; dd++)
+        {
+        extr1 [dd] = base1[dd] + dir1[dd]*this ->c_height/norm1;
+        extr2 [dd] = base2[dd] + dir2[dd]*small->c_height/norm2;
+        }
+
+    double dbase1 = calc_distance (orig, base1);
+    double dbase2 = calc_distance (orig, base2);
+    double dextr1 = calc_distance (orig, extr1);
+    double dextr2 = calc_distance (orig, extr2);
+
+    double dmin2  = std::min (dbase2, dextr2);
+    double dmax2  = std::max (dbase2, dextr2);
+    double dmax1  = std::max (dbase1, dextr1);
+    double coeff  = 1.1;
+                                    // Appartenance axe petit cylindre
+    if (dmax2 > small->c_height + c_radius)
+       {
+       cout << "*** InterCylinders : Petit cylindre trop court" << endl;
+       cout << "*** Intersection = (" << orig[0] << ", "  << orig[1] 
+                             << ", "  << orig[2] << " )" << endl;
+       cout << "*** distance = "  << dmin2 
+            << " > gros rayon + longueur " 
+            << small->c_height + c_radius << endl;
+       cout << endl;
+       PutCoord (base2);
+       PutCoord (extr2);
+       PutData(dbase2);
+       PutData(dextr2);
+       PutData(dextr2);
+       return HERR;
+       }
+
+    left  = dbase2 > c_radius*coeff;
+    right = dextr2 > c_radius*coeff;
+                                    // Le gros cylindre doit depasser le petit
+    if (dmax1 > c_height-coeff*small->c_radius)
+       {
+       cout << "*** InterCylinders : Gros cylindre trop court" << endl;
+       cout << "*** Intersection = (" << orig[0] << ", "  << orig[1] 
+                             << ", "  << orig[2] << " )" << endl;
+       cout << "*** distance maximale = " << dmax1 << endl;
+       cout << endl;
+       return HERR;
+       }
+
+    if (el_root->debug ())
+       {
+       PutCoord   (orig);
+       HexDisplay (left);
+       HexDisplay (right);
+       }
+    return  HOK;
+}
+// ======================================================== is_out
+bool is_out (double val, double v1, double v2)
+{
+   if (v1 < v2)
+      return (val < v1-Epsil || val > v2+Epsil) ;
+
+   else if (v1 > v2) 
+      return (val < v2-Epsil || val > v1+Epsil) ;
+
+   else 
+      return fabs (val - v1)>Epsil;
+}
+// ========================================================= saveXml 
+void Cylinder::saveXml  (XmlWriter* xml)
+{
+   char buffer[12];
+
+   xml->openMark     ("Cylinder");
+   xml->addAttribute ("c_base", c_base->getName (buffer));
+   xml->addAttribute ("c_dir",  c_dir->getName  (buffer));
+   xml->addAttribute ("c_radius", c_radius);
+   xml->addAttribute ("c_height", c_height);
+   xml->closeMark ();
+}
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexCylinder.hxx b/src/HEXABLOCK/HexCylinder.hxx
new file mode 100755 (executable)
index 0000000..f58deac
--- /dev/null
@@ -0,0 +1,58 @@
+
+// class : Les cylindres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __CYLINDER_H_
+#define __CYLINDER_H_
+
+#include "HexEltBase.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Cylinder : public EltBase
+{
+public :
+    Vertex* getBase ()      { return c_base;   }
+    Vector* getDirection () { return c_dir;    }
+    double  getRadius ()    { return c_radius; }
+    double  getHeight ()    { return c_height; }
+
+public :
+    Cylinder (Vertex* b, Vector* v, double r, double h);
+    virtual ~Cylinder () {}
+
+    int interCylinder (Cylinder* small, bool& left, bool& right, double* sol);
+    Vertex* interCylinder (Cylinder* other, bool& left, bool& right);
+    void saveXml (XmlWriter* xml);
+    virtual double  getInternalRadius () { return 0; }
+
+protected:
+    Vertex* c_base;
+    Vector* c_dir;
+
+    double c_radius;
+    double c_height;
+};
+
+// ------------------------------------------- Inlining
+
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexDiagnostics.hxx b/src/HEXABLOCK/HexDiagnostics.hxx
new file mode 100755 (executable)
index 0000000..8a210da
--- /dev/null
@@ -0,0 +1,50 @@
+
+// Incl : Diagnostics
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef _HEX_DIAGNOSTICS_H
+#define _HEX_DIAGNOSTICS_H
+
+#define W_H_NULL_QUAD "new Hexa : La face %s est nulle"
+#define W_H_EQ_QUAD "new Hexa : Les faces %s et %s sont confondues"
+#define W_H_BAD_EDGE "new Hexa : L'arete commune %s n'existe pas"
+#define W_H_BAD_VERTEX "new Hexa : Le sommet commun %s n'existe pas"
+
+#define W_H_NULL_VERTEX "addHexa : Le sommet %s est nul"
+#define W_H_EQ_VERTEX   "addHexa : Les sommets %s et %s sont confondus"
+#define W_REPL_ASSOC "mergeXXXX : Les elements fusionnes %s et %s sont associes"
+#define W_DISCO_ASSOC "disconnextXXXX : L'element deconnecte %s etait associe"
+
+#define W_ASSO_LINE  "associateLine : l'edge de depart (%s) est isole"
+#define W_ASSO_LINE2 "associateLine : l'edge nro %s (%s) est isole"
+#define W_ASSO_LINE1 "associateLine : le vertex de depart (%s) est isole"
+
+#define W_ASSO_LINE3 "associateLine : le vertex de depart est incorrect"
+#define W_ASSO_LINE4 "associateLine : l'edge de depart est incorrect"
+#define W_ASSO_LINE5 "associateLine : l'edge nro %s est incorrect"
+#define W_ASSO_LINE6 "associateLine : Le contour n'est pas ferme"
+
+#define W_ASSO_CUT1 "cut 1 : ancienne association incoherente (pnt1=%s)"
+#define W_ASSO_CUT2 "cut 2 : ancienne association incoherente (dernier=%s)"
+#define W_ASSO_CUT3 "cut 3 : ancienne association incoherente (vertex=%s)"
+#define W_ASSO_CUT4 "cut 4 : ancienne association incoherente (%s)"
+
+
+#endif
diff --git a/src/HEXABLOCK/HexDocument.cxx b/src/HEXABLOCK/HexDocument.cxx
new file mode 100755 (executable)
index 0000000..ee4514e
--- /dev/null
@@ -0,0 +1,1061 @@
+
+// C++ : La clase principale de Hexa
+
+//  Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library 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
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ 
+//  or email : webmaster.salome@opencascade.com
+
+#include "HexDocument.hxx"
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+#include "HexGlobale.hxx"
+#include "HexGroup.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Document::Document (cpchar name)
+{
+   glob = Globale::getInstance ();
+
+   doc_db        = 0;
+   nbr_errors    = 0;
+   doc_modified  = true;
+   doc_saved     = false;
+   doc_name      = name;
+   doc_tolerance = 1e-6;
+   nbr_laws      = 0;
+   nbr_propagations = 0;
+   maj_propagation  = true;
+   doc_xml          = NULL;
+   doc_shape        = NULL;
+
+   defaultLaw = addLaw ("DefaultLaw", 0);
+   
+   nbr_used_hexas = nbr_used_quads = nbr_used_edges = nbr_used_vertex = 0;
+
+   for (EnumElt type = EL_NONE ; type < EL_MAXI ; type=(EnumElt) (type+1))
+       {
+       doc_first_elt [type] = doc_last_elt [type] = new EltBase (); 
+       doc_nbr_elt   [type] = 0;
+       }
+}
+// ======================================================== Destructeur
+Document::~Document ()
+{
+   delete doc_xml;
+
+   for (EnumElt type = EL_NONE ; type < EL_MAXI ; type=(EnumElt) (type+1))
+       {
+       //  printf ("____________________________ Type=%d\n", type);
+       EltBase* next = NULL;
+       for (EltBase* elt=doc_first_elt [type] ; elt != NULL ; elt=next) 
+           {
+           next = elt->next();
+           delete elt;
+           }
+       }
+}
+// ======================================================== addVector
+Vector* Document::addVector (double dx, double dy, double dz)
+{
+   Vector* pv = new Vector (this, dx, dy, dz); 
+   doc_vector.push_back (pv);
+   return  pv;
+}
+// ======================================================== addVectorVertices
+Vector* Document::addVectorVertices (Vertex* va, Vertex* vb)
+{
+   Vector* pv = addVector (vb->getX () - va->getX (),
+                           vb->getY () - va->getY (),
+                           vb->getZ () - va->getZ ());
+   return  pv;
+}
+// ======================================================== addVertex
+Vertex* Document::addVertex (double x, double y, double z)
+{
+   Vertex* pv   = new Vertex (this, x, y, z);
+   return pv;
+}
+// ======================================================== addEdge
+Edge* Document::addEdge (Vertex* va, Vertex* vb)
+{
+   if (va==NULL || vb==NULL) 
+      return NULL;
+
+   Edge* arete  = new Edge (va, vb);
+   return arete;
+}
+// ======================================================== addEdge (bis)
+Edge* Document::addEdge (Vertex* va, Vector* vec)
+{
+   Vertex* vb   = addVertex (va->getX () + vec->getDx(), 
+                             va->getY () + vec->getDy(), 
+                             va->getZ () + vec->getDz());
+
+   Edge*  arete = addEdge (va, vb);
+   return arete;
+}
+// ======================================================== addQuadVertices
+Quad* Document::addQuadVertices (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd)
+{
+   Quad*  face   = new Quad (va, vb, vc, vd);
+   return face;
+}
+// ======================================================== addQuad
+Quad* Document::addQuad (Edge* ea, Edge* eb, Edge* ec, Edge* ed)
+{
+   Quad*  face   = new Quad (ea, eb, ec, ed);
+   return face;
+}
+// ======================================================== addHexaVertices
+Hexa* Document::addHexaVertices (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd,
+                                 Vertex* ve, Vertex* vf, Vertex* vg, Vertex* vh)
+{
+   Hexa*  pave   = new Hexa (va, vb, vc, vd, ve, vf, vg, vh);
+   return pave;
+}
+// ======================================================== addHexa
+Hexa* Document::addHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, 
+                         Quad* qf)
+{
+   Hexa*  pave   = new Hexa (qa, qb, qc, qd, qe, qf);
+   return pave;
+}
+// ======================================================== addCylinder
+Cylinder* Document::addCylinder (Vertex* b, Vector* d, double r,  double h)
+{
+   Cylinder* cyl = new  Cylinder (b, d, r, h);
+   doc_cylinder.push_back (cyl);
+   return    cyl;
+}
+// ======================================================== addPipe
+Pipe* Document::addPipe (Vertex* b, Vector* d, double ri, double re, double h)
+{
+   Pipe*  tuyau = new  Pipe (b, d, ri, re, h);
+   doc_pipe.push_back (tuyau);
+   return tuyau;
+}
+// ======================================================== makeCartesian
+Elements* Document::makeCartesian (Vertex* v, Vector* dir, 
+                            int px, int py, int pz, int mx, int my, int mz)
+{
+   Vector* v1 = new Vector (this, dir->getDx(), 0, 0); 
+   Vector* v2 = new Vector (this, 0, dir->getDy(), 0); 
+   Vector* v3 = new Vector (this, 0,0,  dir->getDz()); 
+   Elements*  grille = new Elements (this);
+   grille->makeCartesianGrid (v, v1, v2, v3, px, py, pz, mx, my, mz);
+   return grille;
+}
+// ======================================================== makeCartesian
+Elements* Document::makeCartesian (Vertex* v, Vector* v1, Vector* v2, 
+                    Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCartesianGrid (v, v1, v2, v3, px, py, pz, mx, my, mz);
+   return grille;
+}
+// ======================================================== makeSpherical
+Elements* Document::makeSpherical (Vertex* c, double rayon, int nb, double k)
+{
+   Elements* grille = new Elements (this);
+   grille->makeSphericalGrid (c, rayon, nb, k);
+   return grille;
+}
+// ======================================================== makeCylindrical
+Elements* Document::makeCylindrical (Vertex* c, Vector* b, Vector* h, 
+        double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCylindricalGrid (c, b, h, dr, da, dl, nr, na, nl, fill);
+   return grille;
+}
+// ======================================================== makeSphere
+Elements* Document::makeSphere (Vertex* center, Vector* vx, Vector* vz, 
+                                double radius, double radhole, Vertex* plorig, 
+                                int nrad, int nang, int nhaut)
+{
+   Elements* grille = new Elements (this);
+   double radint = (radhole + radius)*DEMI;
+   grille->makeRind (GR_HEMISPHERIC, center, vx, vz, radius, radint, radhole, 
+                     plorig, 360.0, nrad, nang, nhaut);
+   return grille;
+}
+// ======================================================== makePartSphere
+Elements* Document::makePartSphere (Vertex* center, Vector* vx, Vector* vz, 
+                                 double  radius, double radhole,
+                                 Vertex* plorig, double angle,
+                                 int nrad, int nang, int nhaut)
+{
+   Elements* grille = new Elements (this);
+   double radint = (radhole + radius)*DEMI;
+   grille->makeRind (GR_PART_SPHERIC, center, vx, vz, radius, radint, radhole, 
+                     plorig, angle, nrad, nang, nhaut);
+   return grille;
+}
+// ======================================================== makeRind 
+Elements* Document::makeRind (Vertex* center, Vector* vx, Vector* vz, 
+                              double  radext, double radint, double radhole,
+                              Vertex* plorig, int nrad, int nang, int nhaut)
+{
+   Elements* grille = new Elements (this);
+   grille->makeRind (GR_RIND, center, vx, vz, radext, radint, radhole, 
+                     plorig, 360.0, nrad, nang, nhaut);
+   return grille;
+}
+// ======================================================== makePartRind
+Elements* Document::makePartRind (Vertex* center, Vector* vx, Vector* vz, 
+                           double  radext, double radint, double radhole,
+                           Vertex* plorig, double angle,
+                               int nrad, int nang, int nhaut)
+{
+   Elements* grille = new Elements (this);
+   grille->makeRind (GR_PART_RIND, center, vx, vz, radext, radint, radhole, 
+                     plorig, angle, nrad, nang, nhaut);
+   return grille;
+}
+// ======================================================== findVertex
+Vertex* Document::findVertex (double vx, double vy, double vz)
+{
+   double xmin = vx - doc_tolerance;
+   double xmax = vx + doc_tolerance;
+   double ymin = vy - doc_tolerance;
+   double ymax = vy + doc_tolerance;
+   double zmin = vz - doc_tolerance;
+   double zmax = vz + doc_tolerance;
+
+   for (EltBase* elt = doc_first_elt[EL_VERTEX]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt->isHere())
+          { 
+          Vertex* node = static_cast <Vertex*> (elt); 
+          if (node->isin (xmin, xmax, ymin, ymax, zmin, zmax))
+             return node;
+          }
+       }
+   return NULL;
+}
+// ======================================================== findEdge
+Edge* Document::findEdge (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Edge* candidat  = static_cast <Edge*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+// ======================================================== findQuad
+Quad* Document::findQuad (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_QUAD]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Quad* candidat  = static_cast <Quad*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+// ======================================================== findHexa
+Hexa* Document::findHexa (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* candidat  = static_cast <Hexa*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+
+// ======================================================== findElement
+EltBase* Document::findElement (EnumElt type, int ident)
+{
+   for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt->isHere() && elt->getId()==ident)
+          return elt;
+       }
+   return NULL;
+}
+// ======================================================== findVertex
+Vertex* Document::findVertex (int ident)
+{
+   Vertex* node = static_cast <Vertex*> (findElement (EL_VERTEX, ident)); 
+   return  node;
+
+}
+// ======================================================== index_tv
+int index_tv (Vertex* table[], Vertex* elt)
+{
+   for (int nro=0; nro<QUAD4; nro++)
+        if (elt == table[nro])
+           return nro;
+
+   return NOTHING;
+}
+// ======================================================== mergeQuads
+int Document::mergeQuads (Quad* dest, Quad* orig, Vertex* v1, Vertex* v2, 
+                                                Vertex* v3, Vertex* v4)
+{
+   update ();
+
+   if (dest==orig)
+      {
+      printf (" *** Quads identiques dans mergeQuads\n");
+      return HERR;
+      }
+   else if (dest==NULL || dest->isDeleted())
+      {
+      printf (" *** Quad nro 1 incorrect dans mergeQuads \n");
+      return HERR;
+      }
+   else if (orig==NULL || orig->isDeleted() )
+      {
+      printf (" *** Quad nro 2 incorrect dans mergeQuads \n");
+      return HERR;
+      }
+
+   int nbcomm = 0;
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       {
+       int norig = orig->indexVertex (dest->getVertex(nro));
+       if (norig != NOTHING)
+          {
+          Vertex* uv = dest->getVertex(nro);
+          char nom[12];
+          nbcomm ++;
+          if (nbcomm==1)
+             {
+             printf ("  +++ Sommets communs dans mergeQuads");
+             printf (" (%s,",  dest->getName (nom));
+             printf (" %s)\n", orig->getName (nom));
+             }
+          printf ("  +++ quad1[%d] = quad2[%d] = %s\n", nro,  norig, 
+                                                        uv->getName (nom));
+          }
+       }
+
+   if (nbcomm == 2)
+      {
+      printf ("  +++ Les vertex passes en arguments sont ignores\n");
+      int ier = closeQuads (dest, orig);
+      return ier;
+      }
+   else if (nbcomm != 0)
+      {
+      printf ("  *** _____________________ mergeQuads refuse: \n");
+      printf (" il y a %d sommet(s) sont commun(s)\n", nbcomm);
+      return HERR;
+      }
+
+   if (   v1 ==NULL || v1 ->isDeleted() || v2 ==NULL || v2 ->isDeleted() 
+       || v3 ==NULL || v3 ->isDeleted() || v4 ==NULL || v4 ->isDeleted()) 
+      {
+      printf ("  *** _____________________ mergeQuads refuse: \n");
+      printf (" un sommet est incorrect\n");
+      return HERR;
+      }
+
+
+   if (debug())
+      {
+      printf ("  ----------------- mergeQuads : \n");
+      HexDump (orig);
+      HexDump (dest);
+      HexDump (v1);
+      HexDump (v2);
+      HexDump (v3);
+      HexDump (v4);
+      }
+
+   Vertex *tv1 [QUAD4], *tv2 [QUAD4];
+   Edge   *te1 [QUAD4], *te2 [QUAD4];
+
+   int ier1 = dest->ordoVertex (v1, v3, tv1);
+   int ier2 = orig->ordoVertex (v2, v4, tv2);
+   if (ier1 != HOK)      return ier1;
+   else if (ier2 != HOK) return ier2;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       te1 [nro] = dest->getEdge(nro);
+       Vertex* va1 = te1[nro]->getVertex(V_AMONT);
+       Vertex* vb1 = te1[nro]->getVertex(V_AVAL);
+       int na = index_tv  (tv1, va1);
+       int nb = index_tv  (tv1, vb1);
+       if (na==NOTHING || nb==NOTHING)
+          return HERR;
+
+       te2 [nro] = orig->findEdge (tv2[na], tv2[nb]);
+       if (te2[nro]==NULL)
+          return HERR;
+       }
+
+   if (debug())
+      {
+      printf ("  ----------------- Correspondances mergeQuads : \n");
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          tv2 [nro]->printName(" -> ");
+          tv1 [nro]->printName("\n");
+          }
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          te2 [nro]->printName(" (");
+          te2 [nro]->getVertex(0)->printName(", ");
+          te2 [nro]->getVertex(1)->printName(") -> ");
+          te1 [nro]->printName(" (");
+          te1 [nro]->getVertex(0)->printName(", ");
+          te1 [nro]->getVertex(1)->printName(")\n");
+          }
+      }
+
+   replaceQuad (orig, dest);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceEdge   (te2[nro], te1[nro]);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceVertex (tv2[nro], tv1[nro]);
+
+   maj_connection = false;
+   purge_elements = false;
+   return HOK;
+}
+// ======================================================== closeQuads
+int Document::closeQuads (Quad* dest, Quad* orig)
+{
+   update ();
+   char nom[12];
+
+   if (dest==orig)
+      {
+      printf (" *** Quads identiques dans closeQuads : %s\n", 
+                 dest->getName(nom));
+      return HERR;
+      }
+   else if (dest==NULL || dest->isDeleted())
+      {
+      printf (" *** Quad nro 1 incorrect dans closeQuads \n");
+      return HERR;
+      }
+   else if (orig==NULL || orig->isDeleted() )
+      {
+      printf (" *** Quad nro 2 incorrect dans closeQuads \n");
+      return HERR;
+      }
+
+   Edge* edc = NULL;
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       {
+       int norig = orig->indexEdge (dest->getEdge(nro));
+       if (norig != NOTHING)
+          {
+          if (edc != NULL) 
+             {
+             printf ("  *** Plus d'une arete commune dans closeQuads");
+             printf (" (%s,",  dest->getName (nom));
+             printf (" %s)\n", orig->getName (nom));
+             return HERR;
+             }
+          edc = dest->getEdge (nro);
+          printf ("  +++ quad1[%d] = quad2[%d] = %s\n", nro,  norig, 
+                                                        edc->getName (nom));
+          }
+       }
+
+   Vertex* va = edc->getVertex (V_AMONT);
+   Vertex* vb = edc->getVertex (V_AVAL);
+   Vertex *tv1 [QUAD4], *tv2 [QUAD4];
+   Edge   *te1 [QUAD4], *te2 [QUAD4];
+
+   int ier1 = dest->ordoVertex (va, vb, tv1);
+   int ier2 = orig->ordoVertex (va, vb, tv2);
+
+   if (ier1 != HOK)      return ier1;
+   else if (ier2 != HOK) return ier2;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       te1 [nro] = dest->getEdge(nro);
+       Vertex* va1 = te1[nro]->getVertex(V_AMONT);
+       Vertex* vb1 = te1[nro]->getVertex(V_AVAL);
+       int na = index_tv  (tv1, va1);
+       int nb = index_tv  (tv1, vb1);
+       if (na==NOTHING || nb==NOTHING)
+          return HERR;
+
+       te2 [nro] = orig->findEdge (tv2[na], tv2[nb]);
+       if (te2[nro]==NULL)
+          return HERR;
+       }
+
+   if (debug())
+      {
+      printf ("  ----------------- Correspondances mergeQuads : \n");
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          tv2 [nro]->printName(" -> ");
+          tv1 [nro]->printName("\n");
+          }
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          te2 [nro]->printName(" (");
+          te2 [nro]->getVertex(0)->printName(", ");
+          te2 [nro]->getVertex(1)->printName(") -> ");
+          te1 [nro]->printName(" (");
+          te1 [nro]->getVertex(0)->printName(", ");
+          te1 [nro]->getVertex(1)->printName(")\n");
+          }
+      }
+
+   replaceQuad (orig, dest);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceEdge   (te2[nro], te1[nro]);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceVertex (tv2[nro], tv1[nro]);
+
+   maj_connection = false;
+   purge_elements = false;
+   return HOK;
+}
+// ======================================================== mergeEdges
+int Document::mergeEdges (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2)
+{
+   if (e1==NULL || e1->isDeleted() || e2==NULL || e2->isDeleted()) 
+      return HERR;
+
+   for (int nro=0 ; nro<V_TWO ; nro++) 
+       if (e1->index (e2->getVertex(nro))!= NOTHING)
+          return HERR+nro+1;
+
+   Vertex *tv1 [V_TWO], *tv2 [V_TWO];
+
+   int ier1 = e1->anaMerge (v1, tv1);
+   int ier2 = e2->anaMerge (v2, tv2);
+
+   if (ier1 != HOK)      return ier1;
+   else if (ier2 != HOK) return ier2;
+
+   replaceEdge (e2, e1);
+   for (int nro=0 ; nro<V_TWO ; nro++) 
+       replaceVertex (tv2[nro], tv1[nro]);
+
+   maj_connection = false;
+   return HOK;
+}
+// ======================================================== mergeVertices
+int Document::mergeVertices (Vertex* v1, Vertex* v2)
+{
+   if (v1==v2 || v1==NULL || v1->isDeleted() 
+              || v2==NULL || v2->isDeleted())
+      return HERR;
+
+   replaceVertex (v2, v1);
+
+   maj_connection = false;
+   return HOK;
+}
+// ======================================================== replaceVertex
+void Document::replaceVertex (Vertex* old, Vertex* par)
+{
+   if (old==par)
+      return;
+
+   par->replaceAssociation (old);
+
+   for (int type=EL_EDGE ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           if (elt->isHere ())
+               elt->replaceVertex (old, par);
+       }
+   old->suppress ();
+}
+// ======================================================== replaceEdge
+void Document::replaceEdge (Edge* old, Edge* par)
+{
+   if (old==par)
+      return;
+
+   par->replaceAssociation (old);
+
+   for (int type=EL_QUAD ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           if (elt->isHere ())
+               elt->replaceEdge (old, par);
+       }
+   old->suppress ();
+}
+// ======================================================== replaceQuad
+void Document::replaceQuad (Quad* old, Quad* par)
+{
+   if (old==par)
+      return;
+
+   par->replaceAssociation (old);
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere ())
+          {
+          Hexa* cell = static_cast <Hexa*> (elt);
+          cell->replaceQuad (old, par);
+          }
+   old->suppress ();
+}
+// ======================================================== prismQuad
+Elements* Document::prismQuad  (Quad* start, Vector* dir, int nb)
+{
+   Quads  tstart;
+   tstart.push_back (start);
+
+   update ();
+   Elements* prisme = prismQuads (tstart, dir, nb);
+   return    prisme;
+}
+// ======================================================== prismQuads
+Elements* Document::prismQuads (Quads& tstart, Vector* dir, int nb)
+{
+   Elements*  prisme = new Elements (this);
+   if (nb<=0) return prisme;
+
+   prisme->prismQuads (tstart, dir, nb);
+   return prisme;
+}
+// ======================================================== prismQuadsVec
+Elements* Document::prismQuadsVec (Quads& tstart, Vector* dir, RealVector& tlen,
+                                   int crit)
+{
+   Elements*  prisme = new Elements (this);
+   if (tlen.size()<=0) return prisme;
+
+   prisme->prismQuadsVec (tstart, dir, tlen, crit);
+   return prisme;
+}
+// ======================================================== joinQuads
+Elements* Document::joinQuads (Quads& start, Quad* dest, Vertex* v1, 
+                              Vertex* v2, Vertex* v3, Vertex* v4, int nb)
+{
+   update ();
+   Elements*  joint = new Elements (this);
+   if (nb<=0)      return joint;
+
+   int ier = joint->joinQuads (start, nb, v1, v2, v3, v4, dest);
+   if (ier !=HOK)
+      printf ("\n ****\n **** Error in joinQuad(s)\n ****\n");
+   return joint;
+}
+// ======================================================== joinQuad
+Elements* Document::joinQuad (Quad* start, Quad* dest, Vertex* v1, 
+                              Vertex* v2,  Vertex* v3, Vertex* v4, int nb)
+{
+   Quads  tstart;
+   tstart.push_back (start);
+
+   Elements* joint = joinQuads (tstart, dest, v1, v2, v3, v4, nb);
+   return    joint;
+}
+// ========================================================== getHexa
+Hexa* Document::getHexa (int nro) 
+{
+   return static_cast <Hexa*> (getElement (EL_HEXA, nro));
+}
+// ========================================================== getQuad
+Quad* Document::getQuad (int nro) 
+{
+   return static_cast <Quad*> (getElement (EL_QUAD, nro));
+}
+// ========================================================== getEdge
+Edge* Document::getEdge (int nro) 
+{ 
+   return static_cast <Edge*> (getElement (EL_EDGE, nro));
+}
+// ========================================================== getVertex
+Vertex* Document::getVertex (int nro) 
+{ 
+   return static_cast <Vertex*> (getElement (EL_VERTEX, nro)); 
+}
+// ========================================================== countElement
+int Document::countElement (EnumElt type)
+{ 
+   int compteur = 0;
+   for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere())
+          compteur ++;
+
+   return compteur;
+}
+// ========================================================== getElement
+EltBase* Document::getElement (EnumElt type, int nro) 
+{ 
+   int compteur = 0;
+   for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt->isHere())
+          {
+          if (compteur>=nro)
+             return elt;
+          compteur ++;
+          }
+       }
+   return NULL;
+}
+// ========================================================= addLaw
+Law* Document::addLaw (const char* name, int nbnodes)
+{ 
+   Law* loi = new Law (name, nbnodes);
+   return addLaw (loi);
+}
+// ========================================================= addLaw
+Law* Document::addLaw (Law* loi)
+{ 
+   doc_laws.push_back (loi);
+   nbr_laws ++;
+   return loi;
+}
+// ========================================================= GetLaw
+Law* Document::getLaw (int nro)
+{ 
+   if (nro <0 || nro>= nbr_laws)
+      return NULL;
+
+   return doc_laws [nro];
+}
+// ========================================================= FindLaw
+Law* Document::findLaw (const char* name)
+{ 
+   std::string nom = name;
+   for (int nro=0 ; nro<nbr_laws; nro++)
+       if (doc_laws [nro]->getName() == nom)
+          return doc_laws [nro];
+
+   return NULL;
+}
+// ========================================================= removeLaw
+int Document::removeLaw (Law* loi)
+{ 
+   for (int nro=1 ; nro<nbr_laws; nro++)
+       if (doc_laws [nro] == loi)
+          {
+          //All propagations having this law should now have the default law.
+
+          for (int nl=0 ; nl<nbr_propagations ; nl++)
+              {
+             if ( doc_propagation [nl]->getLaw() == loi )
+                  doc_propagation [nl]->setLaw(defaultLaw);
+             }
+
+          delete doc_laws [nro];
+          doc_laws.erase (doc_laws.begin()+nro);
+          nbr_laws= doc_laws.size();
+          return HOK;
+          }
+
+   return HERR;
+}
+// ========================================================= majPropagation
+void Document::majPropagation ()
+{ 
+   majReferences ();
+   update ();
+   // if (purge_elements)
+       // purge ();
+
+   for (int nro=0 ; nro<nbr_propagations ; nro++)
+       {
+       delete doc_propagation [nro];
+       }
+
+   doc_propagation.clear ();
+   nbr_propagations = 0;
+   maj_propagation  = false;
+
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Edge* arete = static_cast <Edge*> (elt);
+       if (arete!=NULL)
+           arete->setPropag (NOTHING, true);
+       }
+
+   //  markAll (NO_COUNTED, EL_EDGE);
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          {
+          for (int ne=0 ; ne<HE_MAXI ; ne++)
+              {
+              Edge* arete = cell->getEdge(ne);
+              if (arete->getPropag()<0)
+                 {
+                 Propagation* prop = new Propagation (); 
+                 doc_propagation.push_back (prop);
+                 arete->propager (prop, nbr_propagations);
+                 nbr_propagations ++;
+                prop->majLaw();
+                 }
+              }
+          }
+       }
+}
+// ======================================================== countPropagation
+int Document::countPropagation ()
+{
+   if (maj_propagation)
+       majPropagation ();
+
+   return nbr_propagations;
+}
+// ======================================================== getPropagation
+Propagation* Document::getPropagation (int nro)
+{
+   if (maj_propagation)
+       majPropagation ();
+
+   if (nro < 0 || nro >= nbr_propagations)
+       return NULL;
+
+   return doc_propagation [nro];
+}
+// ======================================================== findPropagation
+Propagation* Document::findPropagation (Edge* arete)
+{
+   if (arete==NULL) 
+       return NULL;
+
+   if (maj_propagation)
+       majPropagation ();
+
+   return getPropagation (arete->getPropag ());
+}
+// ======================================================== disconnectQuad
+Elements* Document::disconnectQuad (Hexa* cell, Quad* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectQuad (element);
+
+   if (crees!=NULL) 
+       majReferences ();
+
+   return crees;
+}
+// ======================================================== disconnectEdge
+Elements* Document::disconnectEdge (Hexa* cell, Edge* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectEdge (element);
+
+   if (crees!=NULL)
+       majReferences ();
+   return crees;
+}
+// ======================================================== disconnectVertex
+Elements* Document::disconnectVertex (Hexa* cell, Vertex* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectVertex (element);
+
+   if (crees!=NULL) 
+       majReferences ();
+   return crees;
+}
+// ======================================================== cut
+Elements* Document::cut (Edge* edge, int nbcuts)
+{
+   Elements* t_hexas = new Elements (this);
+
+   if (edge==NULL || nbcuts<=0)
+      return t_hexas;
+
+   Propagation* prop    = findPropagation (edge);
+   const Edges& t_edges = prop->getEdges ();
+
+   t_hexas->cutHexas (t_edges, nbcuts);
+
+   majPropagation ();
+   return t_hexas;
+}
+// ======================================================== addGroup
+Group* Document::addGroup    (cpchar name, EnumGroup kind)
+{
+   Group* grp = new Group (name, kind);
+   doc_group.push_back (grp);
+   return grp;
+}
+// ======================================================== findGroup
+Group* Document::findGroup   (cpchar name)
+{
+   int nbre = doc_group.size();
+
+   for (int ng=0 ; ng<nbre ; ng++) 
+       if (Cestegal (doc_group [ng]->getName(), name))
+          return doc_group [ng];
+
+   return NULL;
+}
+// ======================================================== removeGroup
+int Document::removeGroup (Group* grp)
+{
+   int nbre = doc_group.size();
+   for (int ng=0 ; ng<nbre ; ng++) 
+       {
+       if (grp == doc_group [ng])
+          {
+          doc_group.erase (doc_group.begin() + ng);
+          delete grp;
+          return HOK;
+          }
+       }
+                      // Pas trouve dans la liste. On detruit quand meme
+   delete grp;
+   return HERR;
+}// ======================================================== makeCylinder
+Elements* Document::makeCylinder (Cylinder* cyl, Vector* base, int nr, int na, 
+                                                                       int nl)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCylinder (cyl, base, nr, na, nl);
+   return grille;
+}
+// ======================================================== makeCylinders
+CrossElements* Document::makeCylinders (Cylinder* cyl1, Cylinder* cyl2)
+{
+   CrossElements* grille = new CrossElements (this, GR_BICYL);
+   grille->crossCylinders (cyl1, cyl2, true);
+   return grille;
+}
+
+// ======================================================== makePipe
+Elements* Document::makePipe (Pipe* pipe, Vector* bx, int nr, int na, int nl)
+{
+   Elements* grille = new Elements (this);
+   grille->makePipe (pipe, bx, nr, na, nr);
+   return grille;
+}
+// ======================================================== makePipes
+CrossElements* Document::makePipes (Pipe* pipe1, Pipe* pipe2)
+{
+   CrossElements* grille = new CrossElements (this, GR_BIPIPE);
+   grille->crossCylinders (pipe1, pipe2, false);
+   return grille;
+}
+// ======================================================== setName
+int Document::setName (const char* name)
+{
+   doc_name = name ;
+   return HOK ;
+}
+
+// ======================================================== setLevel
+
+#ifdef  NO_CASCADE
+#define _TEST_BIC
+#endif
+
+class BiCylinder;
+
+BiCylinder* test_bicylinder (Document* docu, int option);
+void        set_debug_asso  (bool boule);
+
+void Document::setLevel (int niv)
+{
+   if (niv == 747)
+      clearAssociation ();
+   else if (niv == 777)
+      set_special_option (true);
+   else if (niv == 778)
+      set_special_option (false);
+#ifdef _TEST_BICYL
+   else if (niv >=90 && niv <=99)
+      test_bicylinder (this, niv-90);
+#endif
+   else
+      {
+      doc_db = niv;
+      set_debug_asso (niv>0);
+      }
+}
+// ======================================================== getAssoVertices
+void Document::getAssoVertices (Vertices& tabelt)
+{
+   tabelt.clear ();
+   for (EltBase* elt = doc_first_elt[EL_VERTEX]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere() && elt->getAssociation()!=NULL)
+          tabelt.push_back (static_cast <Vertex*> (elt)); 
+}
+// ======================================================== getAssoEdges
+void Document::getAssoEdges (Edges& tabelt)
+{
+   tabelt.clear ();
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere())
+          { 
+          Edge* edge = static_cast <Edge*> (elt); 
+          int nbass  = edge->getAssociations().size();
+          if (nbass>0)
+              tabelt.push_back (edge);
+          }
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument.hxx b/src/HEXABLOCK/HexDocument.hxx
new file mode 100755 (executable)
index 0000000..5ec47bd
--- /dev/null
@@ -0,0 +1,377 @@
+
+// class : Document
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __DOCUMENT_H_
+#define __DOCUMENT_H_
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Document
+{
+                                   // Fonctions utilisateur
+public :
+                                   // Fonctions globales
+   const char* getName ()              { return doc_name.c_str() ; }
+   bool        isSaved ()              { return doc_saved ; } 
+   int setName (const char* name);
+   int save    (const char* ficxml);
+
+   int  getLevel ()                    { return doc_db ; }
+   void setLevel (int niv);
+
+   Hexa*   getHexa   (int nro);
+   Quad*   getQuad   (int nro);
+   Edge*   getEdge   (int nro);
+   Vertex* getVertex (int nro);
+
+   int countHexa   ()   { return countElement (EL_HEXA); }
+   int countQuad   ()   { return countElement (EL_QUAD); }
+   int countEdge   ()   { return countElement (EL_EDGE); }
+   int countVertex ()   { return countElement (EL_VERTEX); }
+
+                                   // Creation d'elements
+   Vertex* addVertex (double x=0.0, double y=0.0, double z=0.0);
+   Edge*   addEdge   (Vertex* va, Vertex* vb);
+   Edge*   addEdge   (Vertex* va, Vector* vec);
+
+   Quad*   addQuadVertices   (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4);
+   Quad*   addQuad   (Edge* v1, Edge* v2, Edge* v3, Edge* v4);
+
+   Hexa*   addHexaVertices   (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, 
+                             Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
+   Hexa*   addHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf);
+
+   Vector* addVector (double dx=0.0, double dy=0.0, double dz=0.0);
+   Vector* addVectorVertices (Vertex* va, Vertex* vb);
+
+   Elements* makeCartesian   (Vertex* v, Vector* v1, 
+                       int px, int py, int pz, int mx=0, int my=0, int mz=0);
+   Elements* makeCartesian   (Vertex* v, Vector* v1, Vector* v2, Vector* v3, 
+                       int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   Elements* makeCylindrical (Vertex* c, Vector* b, Vector* h, double dr, 
+             double da, double dl, int nr, int na, int nl, bool fill=false);
+
+                                                      // Obsolete
+   Elements* makeSpherical (Vertex* v, Vector* dv, int nb, double k=1) {return NULL;}
+   Elements* makeSpherical (Vertex* center, double rayon, int nb, double k=1);
+
+   Elements* prismQuad  (Quad*  start, Vector* dv, int nb);
+   Elements* prismQuads (Quads& start, Vector* dv, int nb);
+   Elements* prismQuadsVec (Quads& start, Vector* dv, RealVector& th, int k=0);
+
+   Elements* joinQuad  (Quad*  start, Quad* dest, Vertex* v1, Vertex* v2,  
+                                      Vertex* v3, Vertex* v4, int nb);
+   Elements* joinQuads (Quads& start, Quad* dest, Vertex* v1, Vertex* v2, 
+                                      Vertex* v3, Vertex* v4, int nb);
+
+   Cylinder* addCylinder   (Vertex* b, Vector* d, double r,  double h);
+   Elements* makeCylinder  (Cylinder* cyl, Vector* vx, int nr, int na, int nl);
+   CrossElements* makeCylinders (Cylinder* cyl1, Cylinder* cyl2);
+
+   Pipe*     addPipe   (Vertex* b, Vector* d, double ri, double re, double h);
+   Elements* makePipe  (Pipe* pip, Vector* vx, int nr, int na, int nl);
+   CrossElements* makePipes (Pipe* pipe1, Pipe* pipe2);
+
+   int     removeHexa (Hexa* maille);
+   int     removeQuad (Quad* maille);
+   int     removeConnectedHexa (Hexa* maille);
+   int     removeElements  (Elements* bloc);
+
+   Vertex* findVertex (double  vx, double  vy, double vz);
+   Edge*   findEdge   (Vertex* va, Vertex* vb);
+   Quad*   findQuad   (Vertex* va, Vertex* vb);
+   Hexa*   findHexa   (Vertex* va, Vertex* vb);
+
+   Vertex* findVertex (int id);
+
+   int     mergeVertices (Vertex* v1, Vertex* v2);
+   int     mergeEdges    (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2);
+   int     mergeQuads    (Quad* q1, Quad* q2, Vertex* v1, Vertex* v2, 
+                                              Vertex* v3, Vertex* v4);
+   int     closeQuads    (Quad* q1, Quad* q2);
+
+   Elements* makeTranslation   (Elements* elts, Vector* trans);
+   Elements* makeScale         (Elements* elts, Vertex* ver, double k);
+   Elements* makeRotation      (Elements* elts, Vertex* ver, Vector* vec, 
+                                double angle);
+   Elements* makeSymmetryPoint (Elements* elts, Vertex* ver);
+   Elements* makeSymmetryLine  (Elements* elts, Vertex* ver, Vector* vec);
+   Elements* makeSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec);
+
+   int performTranslation (Elements* elts, Vector* trans);
+   int performScale    (Elements* elts, Vertex* ver, double k);
+   int performRotation (Elements* elts, Vertex* ver, Vector* vec, double angle);
+   int performSymmetryPoint (Elements* elts, Vertex* ver);
+   int performSymmetryLine  (Elements* elts, Vertex* ver, Vector* vec);
+   int performSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec);
+
+   void   setTolerance (double tol) { doc_tolerance = std::max (tol, 0.0); }
+   double getTolerance ()           { return doc_tolerance; }
+
+   Elements* disconnectQuad   (Hexa*  maille, Quad*   face);
+   Elements* disconnectEdge   (Hexa*  maille, Edge*   arete);
+   Elements* disconnectVertex (Hexa*  maille, Vertex* noeud);
+   Elements* disconnectEdges  (Hexas& thexas, Edges&  edges);
+
+   Elements* cut (Edge* edge, int nbcuts);
+
+   Group* addGroup    (cpchar name, EnumGroup kind);
+   Group* getGroup    (int nro)        { return doc_group [nro];  }
+   Group* findGroup   (cpchar name);
+   int    removeGroup (Group* grp);
+   int    countGroup  ()               { return (int) doc_group.size(); }
+
+   // ---------------------------------------------------
+
+   Law* addLaw    (const char* name, int nbnodes);
+   Law* addLaw    (Law* law); // lo-add-lololo
+   int  countLaw  ()                            { return nbr_laws ; }
+   Law* getLaw    (int nro);
+   Law* findLaw   (const char* name);
+   int  removeLaw (Law* loi);
+
+   // ---------------------------------------------------
+   int          countPropagation ();
+   Propagation* getPropagation   (int nro);
+   Propagation* findPropagation  (Edge* arete);
+   void         dumpPropagation  ();
+
+   int countVector ()              { return doc_vector.size(); }
+   int countCylinder ()            { return doc_cylinder.size(); }
+   int countPipe ()                { return doc_pipe.size(); }
+
+   Vector*   getVector   (int nro)   { return doc_vector [nro]; }
+   Cylinder* getCylinder (int nro)   { return doc_cylinder [nro]; }
+   Pipe*     getPipe     (int nro)   { return doc_pipe [nro]; }
+
+   void purge ();
+   int  associateOpenedLine (Edge*  mstart, Edges&  mline, Shape* gstart, 
+                             double pstart, Shapes& gline, double pend);
+   int  associateClosedLine (Vertex* mfirst, Edge*  mstart, Edges&  mline, 
+                             Shape*  gstart, double pstart, bool inv, 
+                             Shapes& gline);
+
+   void   setShape (Shape* forme)           { doc_shape = forme ; }
+   Shape* getShape ()                       { return doc_shape  ; }
+
+   // --------------------------------------------------- Evols Hexa3
+
+   Document* copyDocument ();
+
+   int countUsedHexa   ();
+   int countUsedQuad   ();
+   int countUsedEdge   ();
+   int countUsedVertex ();
+
+   Hexa*   getUsedHexa   (int nro);
+   Quad*   getUsedQuad   (int nro);
+   Edge*   getUsedEdge   (int nro);
+   Vertex* getUsedVertex (int nro);
+
+   Hexa* addHexa2Quads (Quad* q1, Quad* q2);
+   Hexa* addHexa3Quads (Quad* q1, Quad* q2, Quad* q3);
+   Hexa* addHexa4Quads (Quad* q1, Quad* q2, Quad* q3, Quad* q4);
+   Hexa* addHexa5Quads (Quad* q1, Quad* q2, Quad* q3, Quad* q4, Quad* q5);
+
+   Elements* revolutionQuads (Quads& start, Vertex* center, Vector* axis, 
+                              RealVector &angles);
+
+   Elements* makeSphere (Vertex* center, Vector* vx, Vector* vz, 
+                         double radius, double radhole,
+                         Vertex* plorig, 
+                         int nrad, int nang, int nhaut);
+
+   Elements* makePartSphere (Vertex* center, Vector* vx, Vector* vz, 
+                             double  radius, double radhole,
+                             Vertex* plorig, double angle,
+                             int nrad, int nang, int nhaut);
+
+   Elements* makeRind (Vertex* center, Vector* vx, Vector* vz, 
+                       double  radext, double radint, double radhole,
+                       Vertex* plorig, 
+                       int nrad, int nang, int nhaut);
+
+   Elements* makePartRind (Vertex* center, Vector* vx, Vector* vz, 
+                           double  radext, double radint, double radhole,
+                           Vertex* plorig, double angle,
+                           int nrad, int nang, int nhaut);
+
+   Elements* replace (Quads& pattern, Vertex* p1, Vertex* c1, 
+                      Vertex* p2, Vertex* c2,  Vertex* p3, Vertex* c3);
+
+   Elements* makeCylindricals (Vertex* c, Vector* b, Vector* h, 
+             RealVector& tdr, RealVector& tda, RealVector& tdh, 
+             bool fill=false);
+
+   // --------------------------------------------------- Evols Hexa4'
+
+   void clearAssociation ();
+
+   typedef std::vector <Vertex*> Vertices;
+   void getAssoEdges    (Edges&    tabelt);
+   void getAssoVertices (Vertices& tabelt);
+
+public:
+    Document (cpchar name);
+   ~Document ();
+
+    int    loadXml (cpchar name);
+    int    setXml  (cpchar flux);
+    cpchar getXml  ();
+
+    EltBase* getFirstEltBase (EnumElt type) { return doc_first_elt [type]; }
+    EltBase* getLastEltBase  (EnumElt type) { return doc_last_elt  [type]; }
+    void     setDeprecated (int level=1);
+
+    void dump ();
+    void markAll (int marque, int type=-1);
+    int  saveVtk  (cpchar nomfic); 
+    int  saveVtk  (cpchar radical, int &nro); 
+
+    void  putError  (cpchar mess, cpchar info1=NULL, cpchar info2=NULL);
+    void  nputError (cpchar mess, int info1,  cpchar info2=NULL);
+    void  hputError (cpchar mess, EltBase* e1, EltBase* e2=NULL);
+
+    void  majReferences  ();                  // M.A.J relation "utilise par"
+    void  update ()            { if (maj_connection) majReferences (); }
+    bool  debug (int niv=0)    { return doc_db > niv ; }
+
+    void  reorderFaces ();
+    void  reorderQuads ();
+
+public:
+   Globale* glob;
+
+private :
+   int   genXml   (cpchar filename);
+   int   parseXml (XmlTree& xml);
+
+   void  replaceVertex (Vertex* v1, Vertex* v2);
+   void  replaceEdge   (Edge*   e1, Edge* e2);
+   void  replaceQuad   (Quad*   q1, Quad* q2);
+
+   int   countElement  (EnumElt type);
+   EltBase* getElement (EnumElt type, int nro);
+
+   void  majPropagation ();
+   void  renumeroter ();
+
+   Elements* clonerElements (Elements* table, Matrix* matrice);
+   int associateCascade (Edges& mline, int msens[], Shape* gstart, 
+                         Shapes& gline, double pstart, double pend, bool clos,
+                         bool inv);
+   int associateLine (Vertex* mfirst, Edge*  mstart, Edges& mline, 
+                      Shape* gstart, double pstart, Shapes& gline, double pend, 
+                      bool inv=false);
+
+   // --------------------------------------------------- Evols Hexa3
+   Hexa* addHexaQuadsAB   (AnaQuads& strquads);
+   Hexa* addHexaQuadsAC   (AnaQuads& strquads);
+   Hexa* addHexaQuadsACE  (AnaQuads& strquads);
+   Hexa* addHexaQuadsACD  (AnaQuads& strquads);
+   Hexa* addHexaQuadsABCD (AnaQuads& strquads);
+   Hexa* addHexaQuadsACDE (AnaQuads& strquads);
+
+   Shape*   parseShape  (XmlTree* node);
+
+   EltBase* findElement (EnumElt type, int ident);
+
+private :
+   friend class EltBase;
+
+   bool doc_modified; 
+   bool count_modified; 
+   bool doc_saved; 
+   bool maj_connection;
+   bool purge_elements;
+   int  doc_db;
+   int  nbr_errors;
+
+   std::string doc_name; 
+   EltBase* doc_first_elt [EL_MAXI];
+   EltBase* doc_last_elt  [EL_MAXI];
+   int      doc_nbr_elt   [EL_MAXI];
+   double   doc_tolerance;
+
+   std::vector <Law*> doc_laws;
+   int                nbr_laws;
+   Law* defaultLaw;
+
+   int  nbr_propagations;
+   bool maj_propagation;
+
+   std::vector <Propagation*> doc_propagation;
+   std::vector <Group*>       doc_group;
+
+   std::vector <Vector*>      doc_vector;
+   std::vector <Cylinder*>    doc_cylinder;
+   std::vector <Pipe*>        doc_pipe;
+   XmlWriter*                 doc_xml; 
+
+   // --------------------------------------------------- HexaBlock v3
+
+   Shape*                     doc_shape;
+
+   std::vector <Hexa*>   doc_used_hexas;
+   std::vector <Quad*>   doc_used_quads;
+   std::vector <Edge*>   doc_used_edges;
+   std::vector <Vertex*> doc_used_vertex;
+
+   int nbr_used_hexas;
+   int nbr_used_quads;
+   int nbr_used_edges;
+   int nbr_used_vertex;
+};
+// ========================================================= saveVtk (avec nro)
+inline int Document::saveVtk  (cpchar radical, int &nro)
+{
+   char num[8];
+   sprintf (num, "%d", nro);
+   nro ++;
+
+   string filename = radical;
+   filename += num;
+   filename += ".vtk";
+   int ier = saveVtk (filename.c_str());
+   return ier;
+}
+// ========================================================= setDeprecated
+inline void Document::setDeprecated (int level)
+{
+   switch (level)
+          {                             
+                         // En cas de destruction  : parents invalides
+          case 2 : maj_connection  = true;
+                   purge_elements  = true;
+                         // creation + destruction : propagations a revoir
+          case 1 : maj_propagation = true;
+                         // Par defaut : 
+          default: doc_modified    = true;
+                   count_modified  = true;
+          }
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexDocument_Xml.cxx b/src/HEXABLOCK/HexDocument_Xml.cxx
new file mode 100755 (executable)
index 0000000..30442c8
--- /dev/null
@@ -0,0 +1,685 @@
+
+// C++ : Classe Document : methodes internes
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexDocument.hxx"
+#include <libgen.h>               // Pour basename
+#include <cstdlib>               // Pour atoi et atof
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+#include "HexShape.hxx"
+
+#include "HexElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+#include "HexGroup.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== get_coords
+int get_coords (const string& chaine, double& x, double& y, double& z)
+{
+   // int nv = sscanf (chaine.c_str (), "%lg %lg %lg", &x, &y, &z);
+   cpchar buffer = chaine.c_str ();
+   int nv = sscanf (buffer, "%lg %lg %lg", &x, &y, &z);
+   if (nv!=3) return HERR;
+   return HOK;
+}
+// ======================================================== get_coords
+int get_coords (const string& chaine, double& x, double& y)
+{
+   cpchar buffer = chaine.c_str ();
+   int nv = sscanf (buffer, "%lg %lg", &x, &y);
+   if (nv!=2) return HERR;
+   return HOK;
+}
+// ======================================================== parseName
+int parseName (XmlTree* node, EltBase* elt)
+{
+   const  string& name = node->findValue ("name");
+   if (name=="")
+      return HERR;
+
+   elt->setName (name);
+   return HOK;
+}
+// ======================================================== get_names
+void get_names (const string& chaine, int size, vector<string>& table)
+{
+   table.clear ();
+   int    lg    = chaine.size();
+   string mot   = "";
+   bool encours = false;
+
+   for (int nc=0 ; nc<lg ; nc++)
+       {
+       char car  = chaine[nc];
+       if (isalnum (car))
+          {
+          mot += car;
+          encours = true;
+          }
+       else if (encours)
+          {
+          table.push_back (mot);
+          encours = false;
+          mot     = "";
+          }
+       }
+
+   if (encours)
+      table.push_back (mot);
+}
+// ======================================================== loadXml
+int Document::loadXml (cpchar ficname)
+{
+   XmlTree xml("");
+   string filename = ficname;
+   doc_name     = basename ((pchar)ficname);
+
+   static const int NbExt = 3;
+   static cpchar t_ext [NbExt] = { ".xml", ".XML", ".Xml" };
+   size_t ici   = 0;
+   bool   noext = true;
+   for (int nx = 0; nx < NbExt && noext ; nx++)
+       {
+       ici   = doc_name.rfind (t_ext[nx]);
+       noext = ici < 0 || ici > doc_name.size();
+       }
+
+   if (noext)
+      filename += ".xml"; 
+   else
+      doc_name.erase (ici, 4);
+
+   int ier = xml.parseFile (filename);
+   if (ier!=HOK) 
+      return ier;
+
+   ier = parseXml (xml);
+   return ier;
+}
+// ======================================================== setXml
+int Document::setXml (cpchar flux)
+{
+   XmlTree xml("");
+   xml.parseFlow (flux);
+
+   int    ier = parseXml (xml);
+   if (ier==HOK) 
+      doc_saved = true;
+   return ier;
+}
+// ======================================================== parseShape
+Shape* Document::parseShape (XmlTree* node)
+{
+   const  string& ident = node->findValue ("ident");
+   const  string& inter = node->findValue ("interval");
+   const  string& brep  = node->findValue ("brep");
+
+   double pdeb, pfin;
+   get_coords (inter, pdeb, pfin);
+   
+   Shape* shape = new Shape (brep);
+   shape->setBounds (pdeb, pfin);
+   shape->setName   (ident);
+
+   return shape;
+}
+// ======================================================== parseXml
+int Document::parseXml (XmlTree& xml)
+{
+   // xml.dump ();
+
+   map <std::string, Vertex*> t_vertex;
+   map <std::string, Edge*>   t_edge;
+   map <std::string, Quad*>   t_quad;
+   map <std::string, Hexa*>   t_hexa;
+   map <std::string, Vector*> t_vector;
+   vector <string> tname;
+
+   const  string& name = xml.findValue ("name");
+   if (name != "")
+       doc_name = name;
+
+   XmlTree* rubrique = xml.findChild ("ListVertices");
+   int nbrelts       = rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       double px, py, pz;
+       const  string& nom    = node->findValue ("id");
+       const  string& coords = node->findValue ("coord");
+       const  string& brep   = node->findValue ("shape");
+       get_coords (coords, px, py, pz);
+
+       Vertex*  vertex = addVertex (px, py, pz);
+       parseName (node, vertex);
+       Shape*   shape  = NULL;
+       if (brep != "" ) 
+          {
+          shape = new Shape (brep);
+          vertex->setAssociation (shape); 
+          }
+       t_vertex [nom] = vertex;
+       }
+
+   rubrique = xml.findChild ("ListEdges");
+   nbrelts  = rubrique->getNbrChildren ();
+   Edge* edge = NULL;
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree*      node = rubrique->getChild (nro);
+       const string& type = node->getName();
+       if (type=="Edge")
+          {
+          const  string& nom      = node->findValue ("id");
+          const  string& vertices = node->findValue ("vertices");
+          get_names (vertices, V_TWO, tname);
+          edge = new Edge (t_vertex [tname[0]], t_vertex [tname[1]]);
+          t_edge [nom] = edge;
+          parseName (node, edge);
+          }
+       else if (type=="Shape" && edge!=NULL)
+          {
+          Shape* shape = parseShape (node);
+          edge->addAssociation (shape);
+          }
+       }
+
+   rubrique = xml.findChild ("ListQuads");
+   nbrelts  = rubrique->getNbrChildren ();
+   Quad* quad = NULL;
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree*      node = rubrique->getChild (nro);
+       const string& type = node->getName();
+       if (type=="Quad")
+          {
+          const string& nom   = node->findValue ("id");
+          const string& edges = node->findValue ("edges");
+          get_names (edges, V_TWO, tname);
+
+          quad = new Quad (t_edge [tname[0]], t_edge [tname[1]],
+                           t_edge [tname[2]], t_edge [tname[3]]);
+          t_quad [nom] = quad;
+          parseName (node, quad);
+          }
+       else if (type=="Shape" && quad!=NULL)
+          {
+          Shape* shape = parseShape (node);
+          quad->addAssociation (shape);
+          }
+       }
+
+   rubrique = xml.findChild ("ListHexas");
+   nbrelts  = rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const  string& nom   = node->findValue ("id");
+       const  string& quads = node->findValue ("quads");
+       get_names (quads, V_TWO, tname);
+
+       Hexa* hexa =  new Hexa (t_quad [tname[0]], t_quad [tname[1]],
+                                t_quad [tname[2]], t_quad [tname[3]],
+                                t_quad [tname[4]], t_quad [tname[5]]);
+       t_hexa [nom] = hexa;
+       parseName (node, hexa);
+       }
+
+   rubrique = xml.findChild ("ListVectors");
+   nbrelts  = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       double px, py, pz;
+       const  string& nom    = node->findValue ("id");
+       const  string& coords = node->findValue ("coord");
+       get_coords (coords, px, py, pz);
+
+       Vector* vector = addVector (px, py, pz);
+       t_vector [nom] = vector;
+       parseName (node, vector);
+       }
+
+   rubrique = xml.findChild ("ListDicretizationLaws");
+   nbrelts  = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const  string& id    = node->findValue ("id");
+       const  string& kind  = node->findValue ("kind");
+       const  string& nodes = node->findValue ("nodes");
+       const  string& coeff = node->findValue ("coeff");
+
+       int    nbnodes = atoi (nodes.c_str());
+       double koeff   = atof (coeff.c_str());
+       if (id != "DefaultLaw")
+          {
+          Law*   law  = addLaw (id.c_str(), nbnodes);
+          law->setCoefficient (koeff);
+          law->setKind (kind.c_str());
+          }
+       }
+
+   rubrique = xml.findChild ("ListPropagations");
+   nbrelts  = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const  string& nmedge  = node->findValue ("edge");
+       const  string& nmlaw   = node->findValue ("law");
+       //  const  string& nmway   = node->findValue ("way");
+       
+       edge     = t_edge [nmedge];
+       Law* law = findLaw (nmlaw.c_str());
+       //  bool way = nmway == "true";
+
+       if (edge != NULL)
+           edge->setLaw (law);
+       }
+
+   for (int pipe=0 ; pipe<2 ; pipe++)
+       {
+       rubrique = pipe ? xml.findChild ("ListPipes")
+                       : xml.findChild ("ListCylinders");
+                 
+       nbrelts  = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
+
+       for (int nro=0 ; nro < nbrelts ; nro++)
+           {
+           XmlTree* node = rubrique->getChild (nro);
+           const  string& cbase   = node->findValue ("c_base"  );
+           const  string& cdir    = node->findValue ("c_dir"   );
+           const  string& cradius = node->findValue ("c_radius");
+           const  string& cheight = node->findValue ("c_height");
+       
+           Vertex* base    = t_vertex [cbase];
+           Vector* dir     = t_vector [cdir];
+           double radius  = atof (cradius.c_str());
+           double height  = atof (cheight.c_str());
+
+           if (pipe)
+              {
+              const string& cradius1  = node->findValue ("c_int_radius");
+              double radius1  = atof (cradius1.c_str());
+              addPipe (base, dir, radius1, radius, height);
+              }
+           else
+              {
+              addCylinder (base, dir, radius, height);
+              }
+           }
+       }
+
+   rubrique = xml.findChild ("ListGroups");
+   int nbrgroups  = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
+
+   for (int nro=0 ; nro < nbrgroups ; nro++)
+       {
+       XmlTree*  ndgroup = rubrique->getChild (nro);
+       XmlTree*  node    = ndgroup ->getChild (0);
+       const  string& nom   = node->findValue ("name");
+       const  string& ckind = node->findValue ("kind");
+
+       EnumGroup kind   = Group::getKind (ckind);
+       Group*    groupe = addGroup (nom.c_str(), kind);
+       EnumElt   type   = groupe->getTypeElt ();
+
+       nbrelts = ndgroup->getNbrChildren ();
+       for (int nelt=1 ; nelt < nbrelts ; nelt++)
+           {
+           node = ndgroup ->getChild (nelt);
+           const string& id = node->findValue ("id");
+           switch (type) 
+              {
+              case EL_HEXA : groupe->addElement (t_hexa [id]);
+                   break;
+              case EL_QUAD : groupe->addElement (t_quad [id]);
+                   break;
+              case EL_EDGE : groupe->addElement (t_edge [id]);
+                   break;
+              case EL_VERTEX :
+              default      : groupe->addElement (t_vertex [id]);
+                   break;
+              } 
+           } 
+       }
+
+
+   return HOK;
+}
+// ======================================================== save
+int Document::save (const char* ficxml)
+{
+   int    ier = genXml (ficxml);
+   return ier;
+}
+// ======================================================== getXml
+cpchar Document::getXml ()
+{
+   int ier = genXml (NULL);
+   if (ier!=HOK)
+      return NULL;
+
+   return doc_xml->getXml ();
+}
+// ======================================================== genXml
+int Document::genXml (cpchar filename)
+{
+                                       // -- 1) Raz numerotation precedente
+   markAll (NO_COUNTED);
+   if (maj_propagation)
+       majPropagation ();
+
+   if (doc_xml==NULL)
+       doc_xml = new XmlWriter ();
+
+   doc_xml->openXml  (filename);
+   doc_xml->openMark ("Document");
+   doc_xml->addAttribute ("name", doc_name);
+   doc_xml->endMark ();
+
+   cpchar balise [] = {"ListXXXX", 
+          "ListVertices", "ListEdges", "ListQuads", "ListHexas", "ListVectors",
+          "ListXXXX" };
+
+   for (int type=EL_VERTEX ; type <= EL_VECTOR ; type++)
+       {
+       doc_xml->addMark (balise [type]);
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt !=NULL && elt->isHere())
+              elt->saveXml (doc_xml);
+           }
+       doc_xml->closeMark (true);
+       }
+
+   doc_xml->addMark ("ListDicretizationLaws");
+   for (int nro=0 ; nro<nbr_laws ; nro++)
+       doc_laws [nro]->saveXml (doc_xml);
+   doc_xml->closeMark (true);
+
+   doc_xml->addMark ("ListPropagations");
+   for (int nro=0 ; nro<nbr_propagations ; nro++)
+       doc_propagation[nro]->saveXml (doc_xml);
+   doc_xml->closeMark (true);
+
+   int nombre = countCylinder();
+   doc_xml->addMark ("ListCylinders");
+   for (int nro=0 ; nro<nombre ; nro++)
+       doc_cylinder[nro]->saveXml (doc_xml);
+   doc_xml->closeMark (true);
+
+   nombre = countPipe();
+   doc_xml->addMark ("ListPipes");
+   for (int nro=0 ; nro<nombre ; nro++)
+       doc_pipe[nro]->saveXml (doc_xml);
+   doc_xml->closeMark (true);
+
+   nombre = countGroup();
+   doc_xml->addMark ("ListGroups");
+   for (int nro=0 ; nro<nombre ; nro++)
+       doc_group[nro]->saveXml (doc_xml);
+   doc_xml->closeMark ();
+
+   doc_xml->closeMark ();
+   doc_xml->closeXml  ();
+   doc_saved = true;
+   return  HOK;
+}
+// ======================================================== markAll
+void Document::markAll (int marque, int type)
+{
+   int debut = EL_VERTEX;
+   int fin   = EL_HEXA;
+   if (type>=0 && type<EL_MAXI)
+      debut = fin = type;
+
+   for (int type=debut ; type <= fin ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           elt->setMark (marque);
+       }
+}
+// ====================================================== saveVtk
+int Document::saveVtk (cpchar nomfic)
+{
+                                           // -- 1) Raz numerotation precedente
+   markAll (NO_COUNTED, EL_VERTEX);
+
+   int nbnodes = 0;
+   int nbcells = 0;
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          {
+          nbcells ++;
+          nbnodes += cell->countNodes ();
+          }
+       }
+
+   pfile vtk = fopen (nomfic, "w");
+   if (vtk==NULL)
+      {
+      cout << " ****" << endl;
+      cout << " **** Document::saveVtk : " << endl;
+      cout << " **** Can't open file "     << endl;
+      cout << " ****" << endl;
+
+      }
+   fprintf (vtk, "# vtk DataFile Version 3.1\n");
+   fprintf (vtk, "%s \n", nomfic);
+   fprintf (vtk, "ASCII\n");
+   fprintf (vtk, "DATASET UNSTRUCTURED_GRID\n");
+   fprintf (vtk, "POINTS %d float\n", nbnodes);
+
+                                           // -- 2) Les noeuds
+   int nronode = 0;
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->printNodes (vtk, nronode);
+       }
+                                           // -- 2) Les hexas
+
+   fprintf (vtk, "CELLS %d %d\n", nbcells, nbcells*(HV_MAXI+1));
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->printHexa (vtk);
+       }
+
+   fprintf (vtk, "CELL_TYPES %d\n", nbcells);
+   for (int nro=0 ; nro<nbcells ; nro++)
+       fprintf (vtk, "%d\n", HE_MAXI);
+
+   fprintf (vtk, "POINT_DATA %d \n", nbnodes);
+   fprintf (vtk, "SCALARS A float\n");
+   fprintf (vtk, "LOOKUP_TABLE default\n");
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->colorNodes (vtk);
+       }
+
+   fclose (vtk);
+   return HOK;
+}
+// ====================================================== purge
+void Document::purge ()
+{
+   purge_elements = false;
+                       // ------------------- Raz marques
+   markAll (NO_USED);
+
+                       // ------------------- Marquage elements utilises
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->markElements (IS_USED);
+       }
+                       // ------------------- Elimination elements inutilises
+   for (int type=EL_VERTEX ; type <= EL_QUAD ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt->getMark  () == NO_USED)
+               elt->suppress ();
+           }
+       }
+                       // ------------------- Sortie elements inutilises
+
+/* ****************************************************************
+   EltBase* trash = doc_last_elt [EL_REMOVED];
+
+   for (int type=EL_VERTEX ; type <= EL_HEXA ; type++)
+       {
+       doc_nbr_elt [type] = 0;
+       EltBase* last = doc_first_elt [type];
+       for (EltBase* elt = last->next (); elt!=NULL; elt = last->next())
+           {
+           if (elt->isHere  ())
+               {
+               doc_nbr_elt  [type] ++;
+               last = elt;
+               }
+           else
+               {
+               last  -> setNext (elt -> next());
+               trash -> setNext (elt);
+               trash = elt;
+               trash -> setNext (NULL);
+               }
+           }
+       doc_last_elt [type] = last;
+       }
+
+   doc_last_elt [EL_REMOVED] = trash;
+   **************************************************************** */
+   update ();
+}
+// ======================================================== majReferences
+void Document::majReferences ()
+{
+   maj_connection = false;
+
+   for (int type=EL_VERTEX ; type <= EL_QUAD ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           elt->razReferences ();
+           }
+       }
+
+   for (int type=EL_EDGE ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt->isHere ())
+               elt->majReferences ();
+           }
+       }
+}
+// ======================================================== dump
+void Document::dump ()
+{
+   cpchar nom_type [] = { "Elments non classes", 
+          "Sommets", "Aretes", "Faces", "Hexaedres", "Elements detruits" };
+
+   for (int type=EL_VERTEX ; type <= EL_HEXA ; type++)
+       {
+       printf ("\n");
+       printf (" ++++ Liste des %s\n", nom_type[type]);
+       printf ("\n");
+
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt->isHere())
+               elt->dump ();
+           }
+       }
+
+   printf (" ++++ End od dump\n");
+}
+// ======================================================== putError
+void Document::putError (cpchar mess, cpchar info1, cpchar info2)
+{
+     nbr_errors ++;
+     printf (" ********************************************************** \n");
+     printf (" ****  HexaBlocks Error nro %d :\n", nbr_errors);
+     printf (" **** ");
+     printf (mess, info1, info2);
+     printf ("\n");
+     printf (" **** \n");
+     printf (" ********************************************************** \n");
+}
+// ======================================================== hputError
+void Document::hputError (cpchar mess, EltBase* e1, EltBase* e2)
+{
+   char name1 [32] = { 0 };
+   char name2 [32] = { 0 };
+
+   if (e1!=NULL) e1->getName (name1);
+   if (e2!=NULL) e2->getName (name2);
+
+   putError (mess, name1, name2);
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument_asso.cxx b/src/HEXABLOCK/HexDocument_asso.cxx
new file mode 100755 (executable)
index 0000000..23acae5
--- /dev/null
@@ -0,0 +1,241 @@
+
+// C++ : Associatiosn dans le document
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexDocument.hxx"
+#include "HexEdge.hxx"
+#include "HexDiagnostics.hxx"
+
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+int vertexInLine (Vertex* mfirst, Edges& mline, vector<int> &tsens);
+int associateShapes (Edges& mline, int msens[], Shape* gstart, Shapes& gline, 
+                    double pstart, double pend, bool closed, bool inv=false);
+
+// ====================================================== associateOpenedLine
+int Document::associateOpenedLine (Edge*  mstart, Edges&  mline, Shape* gstart, 
+                                   double pstart, Shapes& gline, double pend)
+{
+   int ier = associateLine (NULL, mstart, mline, gstart, pstart, gline, pend);
+   return ier;
+}
+// ====================================================== associateClosedLine
+int Document::associateClosedLine (Vertex* vfirst, Edge*  mstart, Edges& mline, 
+                         Shape*  gstart, double pstart, bool inv, Shapes& gline)
+{
+   if (vfirst == NULL)
+      {
+      putError (W_ASSO_LINE3);
+      return HERR;
+      }
+
+   int ier = associateLine (vfirst, mstart, mline, gstart, pstart, gline, 
+                            1.0, inv);
+   return ier;
+}
+// ====================================================== associateClosedLine
+int Document::associateLine (Vertex* vfirst, Edge*  mstart, Edges& mline, 
+                    Shape*  gstart, double pstart, Shapes& gline, double pend,
+                    bool inv)
+{
+   db = on_debug ();
+   char buffer [16], cnum [8];
+   int  nbseg  = mline.size ();
+   bool closed = vfirst != NULL;
+
+   if (mstart == NULL)
+      {
+      putError (W_ASSO_LINE4);
+      return HERR;
+      }
+                // Contour ferme : 
+                // Le vertex de depart n'appartient pas a l'edge de depart
+   int istart = mstart->index (vfirst);
+   if (closed && istart == NOTHING) 
+      {
+      putError (W_ASSO_LINE2, vfirst->getName (buffer));
+      return HERR;
+      }
+
+   if (db)
+      {
+      PutName (vfirst);
+      printf ("  . : ");
+      mstart->printName (" = (");
+      mstart->getVertex(V_AMONT)->printName (", ");
+      mstart->getVertex(V_AVAL) ->printName (")\n");
+
+      for (int nro=0 ; nro<nbseg ; nro++)
+          {
+          printf (" %2d : ", nro);
+          mline[nro]->printName(" = (");
+          mline[nro]->getVertex(V_AMONT)->printName(", ");
+          mline[nro]->getVertex(V_AVAL )->printName(")\n");
+          }
+      }
+
+
+   for (int ns = 0 ; ns < nbseg ; ns++)
+       {
+       if (mline[ns] == NULL)
+          {
+          sprintf (cnum, "%d", ns);
+          putError (W_ASSO_LINE5, cnum);
+          return HERR;
+          }
+       }
+
+   vector <int> tab_sens (nbseg, V_TWO);
+   int     sens  = V_AMONT;
+   int     nedge = NOTHING;
+   Vertex* pnode = mstart->getVertex (sens);
+
+   if (nbseg==0)
+      {
+      nedge = 0;
+      }
+   else if (NOT closed)
+      {
+      pnode = mstart->getVertex (sens);
+      nedge = vertexInLine (pnode, mline, tab_sens);
+      if (nedge == NOTHING) 
+         {
+         sens  = V_AVAL;
+         pnode = mstart->getVertex (sens);
+         nedge = vertexInLine (pnode, mline, tab_sens);
+         }
+      }
+        // Closed : on recherche ou se trouve le 2e vertex de mstart
+   else
+      {
+      sens  = 1-istart;
+      pnode = mstart->getVertex (sens);
+      nedge = vertexInLine (pnode, mline, tab_sens);
+      }
+
+   HexDisplay (nbseg);
+
+   if (nedge == NOTHING) 
+      {
+      putError (W_ASSO_LINE, mstart->getName (buffer));
+      return HERR;
+      }
+
+   Edges        les_edges;
+   vector <int> les_orig; 
+   les_edges.push_back (mstart);
+   les_orig .push_back (1-sens);
+   HexDisplay (nedge);
+   cout << " ........................................ Marque 1" << endl;
+   if (nbseg>0) 
+      {
+      les_edges.push_back (mline[nedge]);
+      les_orig. push_back (tab_sens[nedge]);
+      }
+
+   cout << " ........................................ Marque 2" << endl;
+   if (db) 
+      printf (" mstart  [%d] = mline[%d][%d] = %s\n", sens, nedge, 
+                                  tab_sens [nedge], pnode->getName(buffer));
+
+   cout << " ........................................ Marque 3" << endl;
+   for (int ns = 1 ; ns < nbseg ; ns++)
+       {
+       Vertex* pnode = mline[nedge]->getVertex (1-tab_sens [nedge]);
+       int nro = vertexInLine (pnode, mline, tab_sens);
+       if (nro == NOTHING) 
+          {
+          sprintf (cnum, "%d", nedge);
+          putError (W_ASSO_LINE2, cnum, mline[nedge]->getName (buffer));
+          return HERR;
+          }
+       if (db) 
+          printf (" mline[%d][%d] = mline[%d][%d] = %s\n", nedge, 
+               1-tab_sens [nedge], nro, tab_sens [nro], pnode->getName(buffer));
+       nedge = nro;
+       les_edges.push_back (mline    [nedge]);
+       les_orig. push_back (tab_sens [nedge]);
+       }
+
+   /********************
+   if (db)
+      {
+      printf (" ... gstart = 0x%x, pstart=%g\n", gstart, pstart);
+      for (int ns = 0 ; ns < gline.size() ; ns++)
+          {
+          printf (" ... gline[%d] = 0x%x\n", ns, gline[ns]);
+          }
+       }
+   **************************/
+    
+   if (closed)
+      {
+      Vertex* tete  = les_edges [0]    ->getVertex (les_orig[0]);
+      Vertex* queue = les_edges [nbseg]->getVertex (1-les_orig[nbseg]);
+      if (tete != queue)
+         {
+         HexDump (tete);
+         HexDump (queue);
+         HexDump (les_edges [0]);
+         HexDump (les_edges [nbseg]);
+         putError (W_ASSO_LINE6);
+         return HERR;
+         }
+      }
+   
+   int ier = associateShapes (les_edges, &les_orig[0], gstart, gline, pstart, 
+                              pend, closed, inv);
+   return ier;
+}
+// ====================================================== vertexInLine
+int vertexInLine (Vertex* mfirst, Edges& mline, vector<int> &tsens)
+{
+   int nbseg = mline.size ();
+
+   for (int ned = 0 ; ned<nbseg ; ned++)
+       {
+       if (tsens [ned] == V_TWO)
+          for (int ns=V_AMONT; ns<=V_AVAL ; ns++)
+              {
+              if (mline[ned]->getVertex (ns) == mfirst)
+                 {
+                 tsens [ned] = ns;
+                 return ned; 
+                 }
+              }
+       }
+   return NOTHING;
+}
+// ====================================================== vertexInLine
+void Document::clearAssociation ()
+{
+   for (int nat=EL_VERTEX ; nat<=EL_QUAD ; nat++)
+       {
+       for (EltBase* elt = doc_first_elt[nat]->next (); elt!=NULL;
+                     elt = elt->next())
+           clear_association (elt);
+       }
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument_quads.cxx b/src/HEXABLOCK/HexDocument_quads.cxx
new file mode 100755 (executable)
index 0000000..18a4caf
--- /dev/null
@@ -0,0 +1,1117 @@
+
+// C++ : Classe Document : Methodes internes 2011
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexDocument.hxx"
+
+#include <cmath>
+#include <map>
+
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexLaw.hxx"
+
+#include "HexAnaQuads.hxx"
+#include "HexElements.hxx"
+#include "HexCramer.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+#define PermuterEdges(e1,e2) permuter_edges (e1, e2, #e1, #e2)
+void    permuter_edges  (Edge* &e1, Edge* &e2, cpchar n1=NULL, cpchar n2=NULL);
+double* prod_vectoriel (Edge* e1, Edge* e2, double result[]);
+
+static bool db = false;
+
+// ======================================================== copyDocument
+Document* Document::copyDocument ()
+{
+   string nom = "CopyOf_";
+   nom += doc_name;
+   Document* clone = new Document (nom.c_str());
+
+   for (EltBase* elt = doc_first_elt[EL_VERTEX]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt !=NULL && elt->isHere())
+          {
+          Vertex* node = static_cast <Vertex*> (elt);
+          node->duplicate (clone);
+          }
+       }
+
+   for (int type=EL_EDGE ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt !=NULL && elt->isHere())
+              elt->duplicate ();
+           }
+       }
+
+   for (int nro=0 ; nro<nbr_laws ; nro++)
+       {
+       Law* law = new Law (doc_laws [nro]);
+       clone->doc_laws.push_back (law);
+       }
+
+   return clone;
+}
+// ----------------------------------------------------------------------------
+// ======================================================== countUsedHexa
+int Document::countUsedHexa ()
+{
+   if (count_modified)
+       renumeroter ();
+
+   return nbr_used_hexas;
+}
+// ======================================================== countUsedQuad
+int Document::countUsedQuad ()
+{
+   if (count_modified)
+       renumeroter ();
+
+   return nbr_used_quads;
+}
+// ======================================================== countUsedEdge
+int Document::countUsedEdge ()
+{
+   if (count_modified)
+       renumeroter ();
+
+   return nbr_used_edges;
+}
+// ======================================================== countUsedVertex
+int Document::countUsedVertex ()
+{
+   if (count_modified)
+       renumeroter ();
+
+   return nbr_used_vertex;
+}
+
+// ======================================================== getUsedHexa
+Hexa* Document::getUsedHexa (int nro)
+{
+   if (count_modified)
+       renumeroter ();
+
+   if (nro<0 || nro >= nbr_used_hexas)
+      return NULL;
+
+   return doc_used_hexas [nro];
+}
+// ======================================================== getUsedQuad
+Quad* Document::getUsedQuad (int nro)
+{
+   if (count_modified)
+       renumeroter ();
+
+   if (nro<0 || nro >= nbr_used_quads)
+      return NULL;
+
+   return doc_used_quads [nro];
+}
+// ======================================================== getUsedEdge
+Edge* Document::getUsedEdge (int nro)
+{
+   if (count_modified)
+       renumeroter ();
+
+   if (nro<0 || nro >= nbr_used_edges)
+      return NULL;
+
+   return doc_used_edges [nro];
+}
+// ======================================================== getUsedVertex
+Vertex* Document::getUsedVertex (int nro)
+{
+   if (count_modified)
+       renumeroter ();
+
+   if (nro<0 || nro >= nbr_used_vertex)
+      return NULL;
+
+   return doc_used_vertex [nro];
+}
+// ======================================================== renumeroter
+void Document::renumeroter ()
+{
+   count_modified = false;
+                                       // -- 1) Raz numerotation precedente
+   markAll (NO_COUNTED);
+
+   doc_used_hexas .clear ();
+   doc_used_quads .clear ();
+   doc_used_edges .clear ();
+   doc_used_vertex.clear ();
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt!=NULL && elt->isHere())
+          {
+          Hexa* cell = static_cast <Hexa*> (elt);
+          doc_used_hexas.push_back (cell);
+          for (int nb=0 ; nb<HQ_MAXI ; nb++)
+              cell->getQuad (nb)->setMark (IS_USED);
+
+          for (int nb=0 ; nb<HE_MAXI ; nb++)
+              cell->getEdge (nb)->setMark (IS_USED);
+
+          for (int nb=0 ; nb<HV_MAXI ; nb++)
+              cell->getVertex (nb)->setMark (IS_USED);
+          }
+       }
+
+   for (EltBase* elt = doc_first_elt[EL_QUAD]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt!=NULL && elt->isHere() && elt->getMark()==IS_USED)
+          {
+          Quad* cell = static_cast <Quad*> (elt);
+          doc_used_quads.push_back (cell);
+          }
+       }
+
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt!=NULL && elt->isHere() && elt->getMark()==IS_USED)
+          {
+          Edge* cell = static_cast <Edge*> (elt);
+          doc_used_edges.push_back (cell);
+          }
+       }
+
+   for (EltBase* elt = doc_first_elt[EL_VERTEX]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt!=NULL && elt->isHere() && elt->getMark()==IS_USED)
+          {
+          Vertex* cell = static_cast <Vertex*> (elt);
+          doc_used_vertex.push_back (cell);
+          }
+       }
+
+   nbr_used_hexas  = doc_used_hexas .size ();
+   nbr_used_quads  = doc_used_quads .size ();
+   nbr_used_edges  = doc_used_edges .size ();
+   nbr_used_vertex = doc_used_vertex .size ();
+}
+// ---------------------------------------------------------------
+// ============================================================== addHexa2quads
+Hexa* Document::addHexa2Quads (Quad* q1, Quad* q2)
+{
+   AnaQuads ana_quads (q1, q2);
+
+   Hexa* hexa = NULL;
+   if (ana_quads.status != HOK)
+      hexa = NULL;
+
+   else if (ana_quads.nbr_aretes == 0)
+      hexa = addHexaQuadsAB (ana_quads);
+
+   else if (ana_quads.nbr_aretes == 1)
+      hexa = addHexaQuadsAC (ana_quads);
+
+   return hexa;
+}
+// ============================================================= addHexa3quads
+Hexa* Document::addHexa3Quads (Quad* q1, Quad* q2, Quad* q3)
+{
+   AnaQuads ana_quads (q1, q2, q3);
+
+   Hexa* hexa = NULL;
+   if (ana_quads.status != HOK)
+      hexa = NULL;
+
+   else if (ana_quads.nbr_aretes == 2)
+      hexa = addHexaQuadsACD (ana_quads);
+
+   else if (ana_quads.nbr_aretes == 3)
+      hexa = addHexaQuadsACE (ana_quads);
+
+   return hexa;
+}
+// ============================================================= addHexa4quads
+Hexa* Document::addHexa4Quads (Quad* q1, Quad* q2, Quad* q3, Quad* q4)
+{
+   AnaQuads ana_quads (q1, q2, q3, q4);
+
+   Hexa* hexa = NULL;
+   if (ana_quads.status != HOK)
+      hexa = NULL;
+
+   else if (ana_quads.nbr_aretes == 4)
+      hexa = addHexaQuadsABCD (ana_quads);
+
+   else if (ana_quads.nbr_aretes == 5)
+      hexa = addHexaQuadsACDE (ana_quads);
+
+   return hexa;
+}
+// ============================================================== addHexa5quads
+Hexa* Document::addHexa5Quads (Quad* q1, Quad* q2, Quad* q3, Quad* q4, Quad* q5)
+{
+   AnaQuads ana_quads (q1, q2, q3, q4, q5);
+   if (ana_quads.status != HOK)
+      return NULL;
+   else if (ana_quads.nbr_aretes != 8)
+      return NULL;
+        
+   int qbase = NOTHING;
+   for (int nquad=0 ; nquad < ana_quads.nbr_quads ; nquad++)
+       if (ana_quads.inter_nbre [nquad] == 4) 
+          qbase = nquad;
+
+   if (qbase == NOTHING)
+      return NULL;
+
+   Edge* tedge [QUAD4];
+   Quad* tquad [QUAD4];
+   for (int nedge=0 ; nedge < QUAD4 ; nedge++)
+       {
+       int nq    = ana_quads.inter_quad [qbase] [nedge];
+       int ned1  = ana_quads.inter_edge [nq]    [qbase];
+       int ned2  = (ned1 + 2) MODULO QUAD4;
+       Quad* mur = ana_quads.tab_quads[nq];
+       tedge [nedge] = mur->getEdge (ned2);
+       tquad [nedge] = mur;
+       }
+
+   Quad*  q_a  = ana_quads.tab_quads[qbase];
+   Quad*  q_b  = new Quad (tedge[0], tedge[1], tedge[2], tedge[3]);
+   Hexa*  hexa = new Hexa (q_a, q_b, tquad[0], tquad[2], tquad[1], tquad[3]);
+   return hexa;
+}
+// ---------------------------------------------------------------
+// ========================================================== addHexaquadsAB
+Hexa* Document::addHexaQuadsAB (AnaQuads& strquads)
+{
+   Quad* q_a = strquads.tab_quads[0];
+   Quad* q_b = strquads.tab_quads[1];
+
+   double dmin  = 0;
+   int    sens  = 1;
+   int    decal = 0;
+   for (int is = 0 ; is<2 ; is++)
+       {
+       int ns = 1-2*is;
+       for (int ndec = 0 ; ndec<QUAD4 ; ndec++)
+           {
+           double dist = 0;
+           for (int na = 0 ; na<QUAD4 ; na++)
+               {
+               int nb = (ndec + QUAD4 + ns*na) MODULO QUAD4; 
+               dist += distance (q_a->getVertex (na),
+                                 q_b->getVertex (nb));
+               }
+           if (ndec==0 && is==0)
+              {
+              decal = ndec;
+              dmin  = dist;
+              sens  = ns;
+              }
+           else if (dist<dmin) 
+              {
+              dmin  = dist;
+              decal = ndec;
+              sens  = ns;
+              }
+           }
+       }
+
+   Edge* tedge [QUAD4];
+   Quad* tquad [QUAD4];
+   for (int na = 0 ; na<QUAD4 ; na++)
+       {
+       int nb = (decal + QUAD4 + sens*na) MODULO QUAD4; 
+       tedge [na] = new Edge (q_a->getVertex (na), q_b->getVertex (nb));
+       }
+
+   for (int nal = 0 ; nal<QUAD4 ; nal++)
+       {
+       int nar = (nal+1) MODULO QUAD4;
+       Edge* e_left  = tedge [nal];
+       Edge* e_right = tedge [nar];
+       Edge* e_ax  = q_a->findEdge (e_left ->getVertex (V_AMONT), 
+                                    e_right->getVertex (V_AMONT));
+       Edge* e_bx  = q_b->findEdge (e_left ->getVertex (V_AVAL), 
+                                    e_right->getVertex (V_AVAL));
+       tquad [nal] = new Quad (e_ax, tedge [nal], e_bx, tedge [nar]);
+       }
+
+   Hexa* hexa = new Hexa (q_a, q_b, tquad[0], tquad[2], tquad[1], tquad[3]);
+   return hexa;
+}
+// ========================================================== addHexaquadsAC
+Hexa* Document::addHexaQuadsAC (AnaQuads& strquads)
+{
+   Quad* q_a = strquads.tab_quads[0];
+   Quad* q_c = strquads.tab_quads[1];
+
+   Vertex* tv_bdx [V_TWO];   // x = e ou f
+   Edge*   te_dX  [V_TWO];
+   Edge*   te_bX  [V_TWO];
+   Quad*   tq_ef  [V_TWO];
+
+   int neda0  = strquads.inter_edge [0] [1];
+
+   Edge* e_ac = q_a->getEdge (neda0);
+
+   for (int ns=V_AMONT; ns<=V_AVAL ; ns++)
+       {
+       Vertex* vx1 = e_ac->getVertex (ns);
+       Vertex* vx2 = e_ac->getVertex (1-ns);
+
+       int nda2 = q_a->indexVertex (vx2); 
+       nda2 = (nda2 +2) MODULO QUAD4;
+
+       int ndc2 = q_c->indexVertex (vx2); 
+       ndc2 = (ndc2 +2) MODULO QUAD4;
+
+       Vertex* vxa = q_a->getVertex (nda2);
+       Vertex* vxc = q_c->getVertex (ndc2);
+
+       double dx  = (vxa->getX() - vx1->getX()) + (vxc->getX() - vx1->getX());
+       double dy  = (vxa->getY() - vx1->getY()) + (vxc->getY() - vx1->getY());
+       double dz  = (vxa->getZ() - vx1->getZ()) + (vxc->getZ() - vx1->getZ());
+       tv_bdx [ns] = new Vertex (this, vx1->getX()+dx, vx1->getY()+dy,  
+                                                      vx1->getZ()+dz);
+       Edge* edga = q_a->findEdge (vx1, vxa);
+       Edge* edgc = q_c->findEdge (vx1, vxc);
+
+       te_dX [ns] = new Edge (vxa, tv_bdx[ns]);
+       te_bX [ns] = new Edge (vxc, tv_bdx[ns]);
+       tq_ef [ns] = new Quad (edga, te_dX[ns], te_bX[ns], edgc); 
+       }
+
+   int ff = 0;
+   Edge* e_bd = new Edge (tv_bdx[V_AMONT], tv_bdx[V_AVAL]);
+   Edge* e_ad = q_a->getOpposEdge (e_ac, ff); 
+   Edge* e_bc = q_c->getOpposEdge (e_ac, ff); 
+   
+   Quad* q_d = new Quad (e_bd, te_dX[V_AMONT], e_ad, te_dX[V_AVAL]);
+   Quad* q_b = new Quad (e_bd, te_bX[V_AMONT], e_bc, te_bX[V_AVAL]);
+
+   Hexa*  hexa  = new Hexa (q_a, q_b, q_c, q_d, tq_ef[V_AMONT], tq_ef[V_AVAL]);
+   return hexa;
+}
+// ========================================================= addHexaquadsACE
+// ==== Construction d'un hexaedre a partir d'un triedre
+/*
+       6=bed  +----bd-----+ bdf=7
+             /|          /|
+           be |   B    bf |
+           /  |        /  |
+    4=bce +----bc-----+...|...bcf=5
+          |  de     D |   df
+          | E |       | F |             z
+         ce   | C     cf  |             ^
+  2=ade...|...+----ad-|---+ adf=3       |   y
+          |  /        |  /              |  /
+          | ae    A   | af              | /
+          |/          |/                |/
+    0=ace +----ac-----+ acf=1           +----->  x
+                
+On connait les faces A, C, E
+Il faut determiner le point bdf, intersection des faces B, D, F
+
+bdf in B : Scalaire ((bdf-bce), Vectoriel (be, bc)) = 0
+bdf in D : Scalaire ((bdf-ade), Vectoriel (ad, de)) = 0
+bdf in F : Scalaire ((bdf-acf), Vectoriel (af, cf)) = 0
+
+Soit 3 inconnues (Xbdf, Ybdf, Zbdf) et 3 equations
+Un merci a Francois Mougery qui m'a rappele quelques notions de geometrie 3D
+
+Le systeme s'ecrit :
+
+  Scalaire ((M-bce), norm_b) = 0
+  Scalaire ((M-ade), morm_d) = 0
+  Scalaire ((M-acf), morm_f) = 0
+
+<=>
+
+  Scalaire (M, norm_b) = Scalaire (bce, norm_b)
+  scalaire (M, norm_d) = Scalaire (ade, norm_b)
+  scalaire (M, norm_f) = Scalaire (acf, norm_b)
+
+<=>
+   norme_b.x*X + norme_b.y*Y + norme_b.z*Z = K1
+   norme_d.x*X + norme_d.y*Y + norme_d.z*Z = K2
+   norme_f.x*X + norme_f.y*Y + norme_f.z*Z = K3
+
+ * ----------------------------------------------------- */
+Hexa* Document::addHexaQuadsACE (AnaQuads& strquads)
+{
+   Real3 v_bce,  v_ade,  v_acf, v_bdf;    // Sommets
+   Real3 norm_b, norm_d, norm_f;   // Normales aux faces
+   int   ff = 0;
+
+   Quad* q_a = strquads.tab_quads[0];
+   Quad* q_c = strquads.tab_quads[1];
+   Quad* q_e = strquads.tab_quads[2];
+
+   Edge* e_ac = q_a->commonEdge (q_c);
+   Edge* e_ae = q_a->commonEdge (q_e);
+   Edge* e_ce = q_c->commonEdge (q_e);
+
+   Edge* e_ad = q_a->getOpposEdge (e_ac, ff);
+   Edge* e_af = q_a->getOpposEdge (e_ae, ff);
+   Edge* e_cf = q_c->getOpposEdge (e_ce, ff);
+
+   Edge* e_bc = q_c->getOpposEdge (e_ac, ff);
+   Edge* e_be = q_e->getOpposEdge (e_ae, ff);
+   Edge* e_de = q_e->getOpposEdge (e_ce, ff);
+
+   e_ce->commonPoint (e_bc, v_bce);
+   e_ae->commonPoint (e_ad, v_ade);
+   e_ac->commonPoint (e_af, v_acf);
+
+   prod_vectoriel (e_be, e_bc, norm_b);  // Calcul normale a la face B
+   prod_vectoriel (e_ad, e_de, norm_d);  // Calcul normale a la face D
+   prod_vectoriel (e_af, e_cf, norm_f);  // Calcul normale a la face F
+
+   Real3 membre2 = { prod_scalaire (v_bce, norm_b), 
+                     prod_scalaire (v_ade, norm_d), 
+                     prod_scalaire (v_acf, norm_f) };
+
+   double matrix [] = { norm_b[dir_x],  norm_b[dir_y],  norm_b[dir_z],  
+                        norm_d[dir_x],  norm_d[dir_y],  norm_d[dir_z],  
+                        norm_f[dir_x],  norm_f[dir_y],  norm_f[dir_z] };
+   Cramer systeme (DIM3);
+   int ier = systeme.resoudre (matrix, membre2, v_bdf);
+   if (ier != HOK)
+      {
+      printf (" addHexaQuadsACE : systeme impossible\n");
+      return NULL;
+      }
+
+   Vertex* s_bdf = new Vertex (this, v_bdf[dir_x], v_bdf[dir_y], v_bdf[dir_z]);
+   Vertex* s_bde = e_be -> commonVertex (e_de);
+   Vertex* s_bcf = e_bc -> commonVertex (e_cf);
+   Vertex* s_adf = e_af -> commonVertex (e_ad);
+   
+   Edge* e_bd = new Edge (s_bdf, s_bde);
+   Edge* e_bf = new Edge (s_bdf, s_bcf);
+   Edge* e_df = new Edge (s_bdf, s_adf);
+
+   Quad* q_b = new Quad (e_bc, e_be, e_bd, e_bf);
+   Quad* q_d = new Quad (e_de, e_ad, e_df, e_bd);
+   Quad* q_f = new Quad (e_af, e_cf, e_bf, e_df);
+
+   Hexa*  hexa = new Hexa (q_a, q_b, q_c, q_d, q_e, q_f);
+   return hexa;
+}
+// ========================================================= addHexaquadsACD
+// ==== Construction d'un hexaedre a partir d'un U
+Hexa* Document::addHexaQuadsACD (AnaQuads& strquads)
+{
+   int pos_a = NOTHING;
+   for (int np=0 ; np<3 && pos_a==NOTHING ; np++)
+       if (strquads.inter_nbre[np]==2) 
+          pos_a = np;
+
+   if (pos_a==NOTHING) 
+      return NULL;
+
+   int pos_c = (pos_a+1) MODULO 3;
+   int pos_d = (pos_a+2) MODULO 3;
+   Quad* q_a = strquads.tab_quads[pos_a];
+   Quad* q_c = strquads.tab_quads[pos_c];
+   Quad* q_d = strquads.tab_quads[pos_d];
+
+   int   na_ac = strquads.inter_edge[pos_a][pos_c]; // Nro dans  q_a de e_ac
+   int   nc_ac = strquads.inter_edge[pos_c][pos_a]; // Nro dans  q_c de e_ac
+   int   nd_ad = strquads.inter_edge[pos_d][pos_a]; // Nro dans  q_d de e_ad
+
+   Edge* e_ae  = q_a->getEdge ((na_ac + 1) MODULO QUAD4); // Arbitraire
+   Edge* e_af  = q_a->getEdge ((na_ac + 3) MODULO QUAD4); // Arbitraire
+
+   Edge* e_bc  = q_c->getEdge ((nc_ac + 2) MODULO QUAD4); 
+   Edge* e_bd  = q_d->getEdge ((nd_ad + 2) MODULO QUAD4);
+
+   Edge* e_ce  = q_c->getEdge ((nc_ac + 1) MODULO QUAD4);
+   Edge* e_cf  = q_c->getEdge ((nc_ac + 3) MODULO QUAD4);
+
+   Edge* e_de  = q_d->getEdge ((nd_ad + 1) MODULO QUAD4);
+   Edge* e_df  = q_d->getEdge ((nd_ad + 3) MODULO QUAD4);
+
+   Vertex* v_ace = e_ae->commonVertex (e_ce);
+   Vertex* v_ade = e_ae->commonVertex (e_de);
+   if (v_ace==NULL)
+      {
+      permuter_edges (e_ce, e_cf);
+      v_ace = e_ae->commonVertex (e_ce);
+      }
+
+   if (v_ade==NULL)
+      {
+      permuter_edges (e_de, e_df);
+      v_ade = e_ae->commonVertex (e_de);
+      }
+
+   Vertex* v_acf = e_af->commonVertex (e_cf);
+   Vertex* v_adf = e_af->commonVertex (e_df);
+
+   Vertex* v_bce = e_ce->opposedVertex (v_ace);
+   Vertex* v_bde = e_de->opposedVertex (v_ade);
+   Vertex* v_bcf = e_cf->opposedVertex (v_acf);
+   Vertex* v_bdf = e_df->opposedVertex (v_adf);
+
+   Edge*  e_be = new Edge (v_bce, v_bde);
+   Edge*  e_bf = new Edge (v_bcf, v_bdf);
+
+   Quad* q_b = new Quad  (e_be, e_bc, e_bf, e_bd);
+   Quad* q_e = new Quad  (e_ae, e_ce, e_be, e_de);
+   Quad* q_f = new Quad  (e_af, e_cf, e_bf, e_df);
+
+   Hexa*  hexa = new Hexa (q_a, q_b, q_c, q_d, q_e, q_f);
+   return hexa;
+}
+// ========================================================= addHexaquadsABCD
+Hexa* Document::addHexaQuadsABCD (AnaQuads& strquads)
+{
+   int pos_a = 0;
+   int pos_b = NOTHING;
+   int pos_c = NOTHING;
+   int pos_d = NOTHING;
+
+   for (int np=1 ; np<4 ; np++)
+       {
+       if (strquads.inter_edge [pos_a] [np] == NOTHING )
+          pos_b = np; 
+       else if (pos_c==NOTHING)
+          pos_c = np; 
+       else 
+          pos_d = np; 
+       }
+     
+   if (pos_b==NOTHING || pos_c==NOTHING || pos_d==NOTHING) 
+      return NULL;
+
+   Quad* q_a = strquads.tab_quads [pos_a];
+   Quad* q_b = strquads.tab_quads [pos_b];
+   Quad* q_c = strquads.tab_quads [pos_c];
+   Quad* q_d = strquads.tab_quads [pos_d];
+   
+   int   na_ac = strquads.inter_edge[pos_a][pos_c]; // Nro dans  q_a de e_ac
+   int   nc_ac = strquads.inter_edge[pos_c][pos_a]; // Nro dans  q_c de e_ac
+   int   nd_ad = strquads.inter_edge[pos_d][pos_a]; // Nro dans  q_d de e_ad
+   int   nb_bc = strquads.inter_edge[pos_b][pos_c]; // Nro dans  q_b de e_bc
+
+   Edge* e_ae  = q_a->getEdge ((na_ac + 1) MODULO QUAD4);
+   Edge* e_af  = q_a->getEdge ((na_ac + 3) MODULO QUAD4);
+
+   Edge* e_ce  = q_c->getEdge ((nc_ac + 1) MODULO QUAD4);
+   Edge* e_cf  = q_c->getEdge ((nc_ac + 3) MODULO QUAD4);
+
+   Edge* e_de  = q_d->getEdge ((nd_ad + 1) MODULO QUAD4);
+   Edge* e_df  = q_d->getEdge ((nd_ad + 3) MODULO QUAD4);
+
+   Edge*  e_be = q_b->getEdge ((nb_bc + 1) MODULO QUAD4); 
+   Edge*  e_bf = q_b->getEdge ((nb_bc + 3) MODULO QUAD4); 
+
+   if (db)
+      {
+      HexDump (q_a);
+      HexDump (q_b);
+      HexDump (q_c);
+      HexDump (q_d);
+
+      HexDump (e_ae);
+      HexDump (e_af);
+      HexDump (e_ce);
+      HexDump (e_cf);
+      HexDump (e_de);
+      HexDump (e_df);
+      HexDump (e_be);
+      HexDump (e_bf);
+      }
+
+   if (e_ae->commonVertex (e_ce) == NULL)
+      PermuterEdges (e_ce, e_cf);
+
+   if (e_ae->commonVertex (e_de) == NULL)
+      PermuterEdges (e_de, e_df);
+
+   if (e_ce->commonVertex (e_be) == NULL)
+      PermuterEdges (e_be, e_bf);
+
+   Quad* q_e = new Quad  (e_ae, e_ce, e_be, e_de);
+   Quad* q_f = new Quad  (e_af, e_cf, e_bf, e_df);
+
+   Hexa*  hexa = new Hexa (q_a, q_b, q_c, q_d, q_e, q_f);
+   return hexa;
+}
+// ========================================================= addHexaquadsACDE
+Hexa* Document::addHexaQuadsACDE (AnaQuads& strquads)
+{
+   int pos_a = NOTHING;
+   int pos_c = NOTHING;
+   int pos_d = NOTHING;
+   int pos_e = NOTHING;
+
+   for (int np=0 ; np<4  ; np++)
+       if (strquads.inter_nbre[np]==3) 
+          {
+          if (pos_a == NOTHING) pos_a = np;
+             else               pos_e = np;
+          }
+       else if (strquads.inter_nbre[np]==2) 
+          {
+          if (pos_c == NOTHING) pos_c = np;
+             else               pos_d = np;
+          }
+
+   if (pos_a==NOTHING || pos_c==NOTHING  || pos_d==NOTHING || pos_e==NOTHING)
+      return NULL;
+
+   Quad* q_a = strquads.tab_quads[pos_a];
+   Quad* q_c = strquads.tab_quads[pos_c];
+   Quad* q_d = strquads.tab_quads[pos_d];
+   Quad* q_e = strquads.tab_quads[pos_e];
+
+   int   na_ac = strquads.inter_edge[pos_a][pos_c]; // Nro dans  q_a de e_ac
+
+   int   nc_ac = strquads.inter_edge[pos_c][pos_a]; // Nro dans  q_c de e_ac
+   int   nc_ce = strquads.inter_edge[pos_c][pos_e]; // Nro dans  q_c de e_ce
+
+   int   nd_ad = strquads.inter_edge[pos_d][pos_a]; // Nro dans  q_d de e_ad
+   int   nd_de = strquads.inter_edge[pos_d][pos_e]; // Nro dans  q_d de e_de
+
+   int   ne_ae = strquads.inter_edge[pos_e][pos_a]; // Nro dans  q_e de e_ae
+
+   Edge* e_af  = q_a->getEdge ((na_ac + 3) MODULO QUAD4);
+   Edge* e_bc  = q_c->getEdge ((nc_ac + 2) MODULO QUAD4);
+   Edge* e_cf  = q_c->getEdge ((nc_ce + 2) MODULO QUAD4);
+   Edge* e_bd  = q_d->getEdge ((nd_ad + 2) MODULO QUAD4);
+   Edge* e_df  = q_d->getEdge ((nd_de + 2) MODULO QUAD4);
+   Edge* e_be  = q_e->getEdge ((ne_ae + 2) MODULO QUAD4);
+
+   Vertex* v_bcf = e_cf->opposedVertex (e_cf->commonVertex (e_af));
+   Vertex* v_bdf = e_df->opposedVertex (e_df->commonVertex (e_af));
+
+   Edge*   e_bf = new Edge (v_bcf, v_bdf);
+   Quad*   q_b  = new Quad (e_be, e_bc, e_bf, e_bd);
+   Quad*   q_f  = new Quad (e_af, e_cf, e_bf, e_df);
+
+   Hexa*  hexa = new Hexa (q_a, q_b, q_c, q_d, q_e, q_f);
+   return hexa;
+}
+// ======================================================== revolutionQuads
+Elements* Document::revolutionQuads (Quads& start, Vertex* center, Vector* axis,
+                                     RealVector &angles)
+{
+   if (center==NULL)     return NULL;
+   if (axis  ==NULL)     return NULL;
+   if (angles.size()==0) return NULL;
+   if (start .size()==0) return NULL;
+
+   Elements*  prisme = new Elements (this);
+   prisme->revolutionQuads (start, center, axis, angles);
+   return prisme;
+}
+// ======================================================== makeCylindricals
+Elements* Document::makeCylindricals (Vertex* c, Vector* b, Vector* h, 
+                 RealVector& tdr, RealVector& tda, RealVector& tdl, bool fill)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCylindricalGrid (c, b, h, tdr, tda, tdl, fill);
+   return grille;
+}
+// ========================================================= replace
+Elements* Document::replace (Quads& pattern, Vertex* p1, Vertex* c1, 
+                             Vertex* p2, Vertex* c2, Vertex* p3, Vertex* c3)
+{
+   Elements* t_hexas = new Elements (this);
+   int ier = t_hexas->replaceHexas (pattern, p1, c1, p2, c2, p3, c3);
+   if (ier!=HOK)
+      {
+      cout << " **** Error in Document::replace\n" << endl;
+      t_hexas->setError (ier);
+      }
+   return    t_hexas;
+}
+// ========================================================= print_replace
+void print_replace (Edge* zig, Edge*  zag)
+{
+   cout << zig->getName() << " = (" << zig->getVertex(0)->getName() 
+        << ", " << zig->getVertex(1)->getName() << ") est clone en ";
+
+   cout << zag->getName() << " = (" << zag->getVertex(0)->getName() 
+        << ", " << zag->getVertex(1)->getName() << ")" << endl;
+}
+// ========================================================= only_in_hexas
+bool only_in_hexas (Hexas& thexas, Quad* quad)
+{
+   int nbhexas = thexas.size();
+   int nbp     = quad->getNbrParents();
+   for (int nh=0 ; nh <nbp ; nh++)
+       {
+       bool pasla = true;
+       Hexa* hexa = quad->getParent (nh); 
+       for (int nc=0 ; pasla && nc < nbhexas ; nc++)
+           pasla = hexa != thexas [nc];
+       if (pasla) 
+           return false;
+       }
+   return true;
+}
+// ========================================================= only_in_hexas
+bool only_in_hexas (Hexas& thexas, Edge*  edge)
+{
+   int nbp = edge->getNbrParents();
+   for (int nq=0 ; nq <nbp ; nq++)
+       {
+       Quad* quad = edge->getParent   (nq); 
+       if (NOT only_in_hexas (thexas, quad))
+          {
+          cout << " ... inMoreHexas " << edge->getName() << endl; 
+          return false;
+          }
+       }
+   cout << " ... only_in_hexas " << edge->getName() << endl; 
+   return true;
+}
+// ========================================================= only_in_hexas
+void replace_vertex (Hexas& thexas, Vertex* node,  Vertex* par)
+{
+   int nbh = thexas.size();
+   for (int nh=0 ; nh <nbh ; nh++)
+       thexas[nh]->replaceVertex (node, par);
+}
+// ========================================================= disconnectEdges
+Elements* Document::disconnectEdges (Hexas& thexas, Edges&  tedges)
+{
+   int nbedges = tedges.size();
+   int nbhexas = thexas.size();
+
+   if (db)
+      cout << " +++ Disconnect Edges" << endl;
+
+   if (nbhexas != nbedges) 
+      {
+      cout << " **** Error in Document::disconnectEdges\n" << endl;
+      cout << " **** Number of Edges and number of Hexas are different\n" 
+           << endl;
+      return NULL;
+      }
+   else if (nbhexas==1)
+      {
+      Elements* grille = disconnectEdge (thexas[0], tedges[0]);
+      return    grille;
+      }
+
+   for (int nro=0 ; nro<nbedges ; nro++)
+       {
+       if (BadElement (tedges[nro]))
+          {
+          cout << " **** Eddge number " << nro+1 << " is incorrect"
+               << endl;
+          return NULL;
+          }
+       if (BadElement (thexas[nro]))
+          {
+          cout << " **** Hexa number " << nro+1 << " is incorrect"
+               << endl;
+          return NULL;
+          }
+       if (db)
+          cout << nro+1 << " hexa = " << thexas[nro]->getName () 
+                        << ", edge = " << tedges[nro]->getName () 
+                        << " = (" << tedges[nro]->getVertex(0)->getName () 
+                        << ", "   << tedges[nro]->getVertex(1)->getName () 
+                        << ")" << endl;
+       }
+
+   for (int nro=0 ; nro<nbhexas ; nro++)
+       {
+       int ned = thexas[nro]->findEdge (tedges[nro]);
+       if (ned==NOTHING)
+          {
+          cout << " **** Edge number " << nro+1 
+               << " doesnt belong to correspondant hexa" << endl;
+          return NULL;
+          }
+       }
+
+   vector <Vertex*> tvertex (nbedges+1);
+
+   for (int nro=1 ; nro<nbedges ; nro++)
+       {
+       tvertex[nro] = tedges[nro]->commonVertex (tedges[nro-1]);
+       if (tvertex[nro]==NULL)
+          {
+          cout << " **** Edge number " << nro 
+               << " doesnt intesect next edge" << endl;
+          return NULL;
+          }
+       }
+
+   int nv0 = tedges[0]        ->inter (tedges[1]);
+   int nvn = tedges[nbedges-1]->inter (tedges[nbedges-2]);
+   tvertex [0]       = tedges[0]        ->getVertex (1-nv0); 
+   tvertex [nbedges] = tedges[nbedges-1]->getVertex (1-nvn); 
+
+   for (int nro=0 ; nro<nbhexas ; nro++)
+       {
+       int ned = thexas[nro]->findEdge (tedges[nro]);
+       if (ned==NOTHING)
+          {
+          cout << " **** Edge number " << nro+1 
+               << " doesnt belong to correspondant hexa" << endl;
+          return NULL;
+          }
+       }
+                      // Fin des controles, on peut y aller ...
+
+   map <Edge*, int> state_edge;
+   map <Quad*, int> state_quad;
+   enum { UNDEFINED, REPLACED, AS_IS };
+
+   map <Vertex*, Vertex*> new_vertex;
+   map <Edge*,   Edge*>   new_edge;
+   map <Quad*,   Quad*>   new_quad;
+
+   map <Vertex*, Vertex*> :: iterator it_vertex;
+   map <Edge*,   Edge*>   :: iterator it_edge;
+   map <Quad*,   Quad*>   :: iterator it_quad;
+
+#define VertexIsNew(v) (it_vertex=new_vertex.find(v))!=new_vertex.end()
+
+   Elements* nouveaux  = new Elements (this);
+   Vertex*   node1     = NULL;
+
+   for (int nro=0 ; nro<=nbedges ; nro++)
+       {
+       Vertex* node0 = node1;
+       node1 = new Vertex (tvertex[nro]);
+       nouveaux->addVertex  (node1);
+       new_vertex [tvertex[nro]] = node1;
+       if (db)
+          {
+          cout << nro << " : "         << tvertex[nro]->getName() 
+               << " est clone en " << node1->getName() << endl;
+          }
+
+       if (nro>0)
+          {
+          Edge* edge = new Edge (node0, node1);
+          nouveaux->addEdge  (edge);
+          new_edge   [tedges[nro-1]] = edge;
+          state_edge [tedges[nro-1]] = REPLACED;
+          if (db)
+             print_replace (tedges[nro-1], edge);
+          }
+       }
+
+   if (db)
+      cout << "_____________________________ Autres substitutions" << endl;
+
+   // Un edge non remplace, qui contient un vertex remplace
+   //         commun a plus de 2 faces (donc appartenant a un autre hexa)
+   //         doit etre duplique
+
+   for (int nro=0 ; nro<nbhexas ; nro++)
+       {
+       Hexa* hexa = thexas [nro]; 
+       for (int nro=0 ; nro<HE_MAXI ; nro++)
+           {
+           Edge* edge = hexa->getEdge (nro);
+           if (state_edge[edge]==UNDEFINED)
+              {
+              Vertex* v1 = edge->getVertex (V_AMONT);
+              Vertex* v2 = edge->getVertex (V_AVAL);
+              int etat = REPLACED;
+              if (VertexIsNew (v1))
+                 {
+                 if (only_in_hexas (thexas, edge))
+                    {
+                    replace_vertex (thexas, v1, new_vertex[v1]);
+                    etat = AS_IS;
+                    }
+                 else
+                    v1 = new_vertex [v1];
+                 }
+              else if (VertexIsNew (v2))
+                 {
+                 if (only_in_hexas (thexas, edge))
+                    {
+                    replace_vertex (thexas, v2, new_vertex[v2]);
+                    etat = AS_IS;
+                    }
+                 else
+                    v2 = new_vertex [v2];
+                 }
+              else 
+                 etat = AS_IS;
+
+              if (etat==REPLACED)
+                 {
+                 Edge* arete = new Edge (v1, v2);
+                 new_edge   [edge] = arete;
+                 nouveaux->addEdge  (arete);
+                 if (db)
+                    print_replace (edge, arete);
+                 }
+              state_edge [edge] = etat;
+              }
+           }
+       }
+
+   // Un quad non remplace, qui contient un edge remplace 
+   //         commun a plus de 2 Hexas
+   //         doit etre duplique
+
+   for (int nro=0 ; nro<nbhexas ; nro++)
+       {
+       Hexa* hexa = thexas [nro]; 
+       for (int nro=0 ; nro<HQ_MAXI ; nro++)
+           {
+           Quad* quad = hexa->getQuad (nro);
+           if (state_quad[quad]==UNDEFINED)
+              {
+              Edge* ted [QUAD4];
+              int etat = AS_IS;
+              for (int ned=0 ; ned < QUAD4 ; ned++)
+                  {
+                  Edge* edge = quad->getEdge (ned);
+                  if (state_edge [edge]==AS_IS)
+                      ted[ned] = edge;
+                  else 
+                      {
+                      ted[ned] = new_edge[edge];
+                      etat = REPLACED;
+                      }
+                  }
+              if (etat==REPLACED)
+                 {
+                 Quad* face = new Quad (ted[0], ted[1], ted[2], ted[3]);
+                 new_quad   [quad] = face;
+                 nouveaux->addQuad  (face);
+                 }
+              state_quad [quad] = etat;
+              }
+           }
+       }
+
+   for (int nro=0 ; nro<nbhexas ; nro++)
+       {
+       Hexa* hexa = thexas [nro]; 
+       for (it_quad=new_quad.begin(); it_quad != new_quad.end() ; ++it_quad)
+           {
+           Quad* pile = it_quad->first;
+           Quad* face = it_quad->second;
+           hexa->replaceQuad (pile, face);
+           }
+
+       for (it_edge=new_edge.begin(); it_edge != new_edge.end() ; ++it_edge)
+           {
+           Edge* zig = it_edge->first;
+           Edge* zag = it_edge->second;
+           hexa->replaceEdge (zig, zag);
+           }
+
+       for (it_vertex=new_vertex.begin(); 
+            it_vertex != new_vertex.end() ; ++it_vertex)
+           {
+           Vertex* flip = it_vertex->first;
+           Vertex* flop = it_vertex->second;
+           hexa->replaceVertex (flip, flop);
+           }
+       }
+         
+   Real3  center0, center1; 
+   Matrix matrix;
+   Hexa*  hexa0 = NULL;
+   Hexa*  hexa1 = NULL;
+   for (int nro=0 ; nro<=nbhexas ; nro++)
+       {
+       hexa0 = hexa1;
+       if (nro==0)
+          {
+          hexa1 = thexas [nro]; 
+          hexa1->getCenter (center1);
+          }
+       else if (nro==nbhexas)
+          {
+          hexa1->getCenter (center1);
+          }
+       else 
+          {
+          hexa1 = thexas [nro]; 
+          hexa0->getCenter (center0);
+          hexa1->getCenter (center1);
+          for (int nc=0 ; nc<DIM3 ; nc++)
+              center1[nc] = (center0[nc] + center1[nc])/2;
+          }
+
+       Vertex* node  = nouveaux->getVertex (nro);
+       matrix.defScale (center1, 0.55);
+       matrix.perform  (node);
+       }
+
+   return nouveaux;
+}
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+// ========================================================= prod_vectoriel
+double*  prod_vectoriel (Edge* e1, Edge* e2, double prod[])
+{
+   prod [dir_x] = prod [dir_y] = prod [dir_z] = 0;
+   if (e1==NULL || e2==NULL) 
+      return prod;
+
+   Real3 v1, v2;
+   e1->getVector (v1);
+   e2->getVector (v2);
+
+   prod [dir_x] = v1[dir_y] * v2[dir_z] - v2[dir_y] * v1[dir_z];
+   prod [dir_y] = v1[dir_z] * v2[dir_x] - v2[dir_z] * v1[dir_x];
+   prod [dir_z] = v1[dir_x] * v2[dir_y] - v2[dir_x] * v1[dir_y];
+
+   return prod;
+}
+// ========================================================= permuter_edges
+void permuter_edges (Edge* &e1, Edge* &e2, cpchar nm1, cpchar nm2)
+{
+   if (db && nm1!=NULL)
+      {
+      printf (" ... permuter_edges %s = %s et %s = %s\n", 
+                    nm1, e1->getName(), nm2, e2->getName() );
+      }
+
+   Edge* foo = e1;
+   e1  = e2;
+   e2  = foo;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument_trans.cxx b/src/HEXABLOCK/HexDocument_trans.cxx
new file mode 100755 (executable)
index 0000000..f63b5f1
--- /dev/null
@@ -0,0 +1,257 @@
+
+// C++ : La clase principale de Hexa
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexDocument.hxx"
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+#include "HexGlobale.hxx"
+
+BEGIN_NAMESPACE_HEXA
+// ========================================================= performTranslation
+int Document::performTranslation (Elements* elts, Vector* trans)
+{ 
+   Matrix matrice;
+   matrice.defTranslation (trans);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performScale
+int Document::performScale (Elements* elts, Vertex* ver, double k)
+{ 
+   Matrix matrice;
+   matrice.defScale (ver, k);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performRotation
+int Document::performRotation (Elements* elts, Vertex* ver, Vector* vec, double angle)
+{ 
+   Matrix matrice;
+   matrice.defRotation (ver, vec, angle);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryPoint
+int Document::performSymmetryPoint (Elements* elts, Vertex* ver)
+{ 
+   Matrix matrice;
+   matrice.defSymmetryPoint (ver);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryPlane
+int Document::performSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec)    
+{ 
+   Matrix matrice;
+   matrice.defSymmetryPlane (ver, vec);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryLine
+int Document::performSymmetryLine (Elements* elts, Vertex* ver, Vector* vec)
+{ 
+   Matrix matrice;
+   matrice.defSymmetryLine (ver, vec);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// ========================================================= clonerElements
+Elements* Document::clonerElements (Elements* table, Matrix* matrice)
+{
+   Cloner    copieur (matrice);
+   Elements* grille = copieur.clonerElements (table);
+   return    grille;
+}
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// ========================================================= makeTranslation
+Elements* Document::makeTranslation (Elements* table, Vector* trans)
+{
+   Matrix  matrice;
+   matrice.defTranslation (trans);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeScale
+Elements* Document::makeScale (Elements* table, Vertex* ver, double k)
+{
+   Matrix  matrice;
+   matrice.defScale (ver, k);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeRotation
+Elements* Document::makeRotation (Elements* table, Vertex* ver, Vector* vec, 
+                                double angle)
+{
+   Matrix  matrice;
+   matrice.defRotation (ver, vec, angle);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryPoint
+Elements* Document::makeSymmetryPoint (Elements* table, Vertex* ver)
+{
+   Matrix  matrice;
+   matrice.defSymmetryPoint (ver);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryLine
+Elements* Document::makeSymmetryLine (Elements* table, Vertex* ver, Vector* vec)
+{
+   Matrix  matrice;
+   matrice.defSymmetryLine (ver, vec);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryPlane
+Elements* Document::makeSymmetryPlane (Elements* table, Vertex* ver, Vector* vec)
+{
+   Matrix  matrice;
+   matrice.defSymmetryPlane (ver, vec);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ----------------------------------------------------------------------
+// ------------ Destroy
+// ----------------------------------------------------------------------
+// ========================================================= removeHexa
+int Document::removeHexa (Hexa* cell)
+{
+   if (cell==NULL)
+      return HERR;
+
+   cell->remove ();
+   return  HOK;
+}
+// ========================================================= removeQuad
+int Document::removeQuad (Quad* cell)
+{
+   if (cell==NULL)
+      return HERR;
+
+   cell->remove ();
+   return  HOK;
+}
+// ========================================================= removeElements
+int Document::removeElements (Elements* bloc)
+{
+   if (bloc==NULL)
+      return HERR;
+
+   bloc->remove ();
+   return  HOK;
+}
+// ====================================================== removeConnectedHexa
+int Document::removeConnectedHexa (Hexa* cell)
+{
+   if (cell==NULL)
+      return HERR;
+
+   update ();
+   cell->removeConnected ();
+   return  HOK;
+}
+// ========================================================= dumpPropagation
+void Document::dumpPropagation ()
+{
+   int nb = countPropagation ();
+
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Propagation*  prop  = getPropagation (nro);
+       const Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           table [ned]->printName (" = ");
+           if (way)
+              {
+              printf (" +(");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf (" -(");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+}
+// ----------------------------------------------------------------------
+// ------------ reorderFaces
+// ----------------------------------------------------------------------
+// ========================================================= reorderFaces
+// ==== Ordonner les faces externes
+void Document::reorderFaces ()
+{
+   majReferences ();
+   Real3 cg, orig, pi, pj, vi, vj, vk;
+
+   for (EltBase* elt = doc_first_elt[EL_QUAD]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Quad* quad = static_cast <Quad*> (elt);
+       if (quad!=NULL && quad->isHere())
+           quad->setOrientation ();
+       }
+
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexEdge.cxx b/src/HEXABLOCK/HexEdge.cxx
new file mode 100755 (executable)
index 0000000..896b0b2
--- /dev/null
@@ -0,0 +1,229 @@
+
+// C++ : Gestion des aretes
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+#include "HexQuad.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+static int niveau = 0;
+
+BEGIN_NAMESPACE_HEXA
+
+void geom_dump_asso (Edge* edge);
+
+// ======================================================== Constructeur
+Edge::Edge (Vertex* va, Vertex* vb)
+    : EltBase (va->dad(), EL_EDGE)
+{
+   e_vertex [V_AMONT] = va; 
+   e_vertex [V_AVAL ] = vb;
+
+   e_propag = NOTHING;
+   e_way    = true;
+   e_law    = NULL;
+   e_clone  = NULL;
+
+   majReferences ();
+}
+// ======================================================== Constructeur 2
+Edge::Edge (Edge* other)
+    : EltBase (other->dad(), EL_EDGE)
+{
+   e_vertex [V_AMONT] = e_vertex [V_AVAL ] = NULL;
+
+   e_propag = NOTHING;
+   e_way    = true;
+   e_law    = NULL;
+   e_clone  = NULL;
+}
+// ======================================================== majReferences
+void Edge::majReferences ()
+{
+   e_vertex [V_AMONT]->addParent (this);
+   e_vertex [V_AVAL ]->addParent (this);
+}
+// ======================================================== anaMerge
+int Edge::anaMerge (Vertex* orig, Vertex* tv1[])
+{
+   tv1 [0] = orig;
+
+   if (orig == e_vertex [V_AMONT])
+      tv1 [1] = e_vertex[V_AVAL];
+   else if (orig == e_vertex [V_AVAL])
+      tv1 [1] = e_vertex[V_AMONT];
+   else 
+      return HERR;
+
+   return HOK;
+}
+// ========================================================= propager 
+void Edge::propager (Propagation* prop, int groupe, int sens)
+{
+   setPropag (groupe, sens>0);
+   prop->addEdge (this);
+
+   niveau ++;
+   int nbquads = getNbrParents ();
+   for (int nq=0 ; nq<nbquads ; nq++)
+       {
+       Quad* quad = getParent (nq);
+       if (quad!=NULL && quad->hasParents())
+          {
+          if (debug (6))
+             {
+             printf ("Prop : niv=%d edge=", niveau);
+             printName ();
+             printf ("parent=%d quad=", nq);
+             quad->printName ("\n");
+            fflush(stdout);
+             }
+
+          int meme = 1;
+          Edge* arete = quad->getOpposEdge (this, meme);
+          if (arete != NULL && arete->getPropag () < 0)
+              arete->propager (prop, groupe, meme*sens);
+          }
+       }
+   niveau --;
+}
+// ========================================================= getParent 
+Quad* Edge::getParent  (int nro)
+{
+   return static_cast <Quad*> (getFather (nro));
+}
+// ========================================================= saveXml 
+void Edge::saveXml (XmlWriter* xml)
+{
+   char buffer[12];
+   string vertices = e_vertex [V_AMONT]->getName(buffer);
+   vertices += " ";
+   vertices       += e_vertex [V_AVAL ]->getName(buffer);
+
+   xml->openMark     ("Edge");
+   xml->addAttribute ("id",       getName (buffer));
+   xml->addAttribute ("vertices", vertices);
+   if (el_name!=buffer) 
+       xml->addAttribute ("name", el_name);
+   xml->closeMark ();
+
+   int nbass = tab_assoc.size();
+   for (int nro=0 ; nro<nbass ; nro++)
+       if (tab_assoc[nro] != NULL)
+           tab_assoc[nro]->saveXml (xml); 
+}
+// ======================================================== replaceVertex
+void Edge::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (e_vertex[nro]==old) 
+           {
+           e_vertex[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== dump
+void Edge::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   e_vertex[V_AMONT]->printName(", ");
+   e_vertex[V_AVAL] ->printName(")");
+   if (e_propag>=0)
+      {
+      char signe = e_way ? '+' : '-';
+      printf (", Prop= %c%d", signe, e_propag);
+      }
+
+   dumpRef ();
+}
+// ======================================================== dumpAsso
+void Edge::dumpAsso ()
+{
+   if (NOT isHere ())
+      {
+      printName(" = *** deleted **\n");
+      return;
+      }
+
+   geom_dump_asso (this);
+}
+// ======================================================== dumpPlus
+void Edge::dumpPlus ()
+{
+   dump ();
+   for (int nro=0 ; nro < V_TWO ; nro++)
+       {
+       Vertex* pv = e_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ();
+          printf (" (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf (" NULL\n");
+          }
+       }
+}
+// ========================================================== addAssociation
+int Edge::addAssociation (Shape* forme)
+{
+   if (forme == NULL)
+      {
+      if (el_root->debug ())
+          cout << "  Edge " << el_name << " addAssociation of NULL ignored"
+               << endl;
+      return HERR;
+      }
+
+   tab_assoc.push_back (forme);
+   if (el_root->debug (2))
+      cout << "  Edge " << el_name << " addAssociation" << endl;
+
+   return HOK;
+}
+// ========================================================== setAssociation
+void Edge::setAssociation (Shape* forme)
+{
+   clearAssociation ();
+   addAssociation (forme);
+}
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexEdge.hxx b/src/HEXABLOCK/HexEdge.hxx
new file mode 100755 (executable)
index 0000000..5fdfe91
--- /dev/null
@@ -0,0 +1,195 @@
+
+// class : Gestion des aretes
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __EDGE_H
+#define __EDGE_H
+
+#include "HexVertex.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Edge : public EltBase
+{
+public:
+    virtual int     countVertex () { return V_TWO; }
+    virtual Vertex* getVertex (int  nro);
+    bool    getWay ()              { return e_way ; }
+
+public:
+    virtual void saveXml (XmlWriter* xml);
+    virtual void replaceVertex (Vertex* old, Vertex* nouveau);
+    virtual void clearAssociation  ()      { tab_assoc.clear() ; }
+    virtual void setAssociation (Shape* forme);
+    int    addAssociation (Shape* forme);
+
+    Edge (Vertex* va, Vertex* vb);
+    Edge (Edge* other);
+    int  anaMerge  (Vertex* orig, Vertex* couple[]);
+    bool definedBy (Vertex* v1,   Vertex* v2);
+
+    void  propager (Propagation* prop, int nro, int sens=1);
+
+    void  setPropag (int nro, bool sens) { e_propag = nro; e_way=sens; }
+    int   getPropag ()                   { return e_propag ; }
+
+    Quad* getParent (int nro);
+    virtual void dump ();
+    void         dumpPlus ();
+    void         dumpAsso ();
+
+    virtual void majReferences();
+
+    int  inter (Edge* other, int& nother);
+    int  inter (Edge* other);
+    int  index (Vertex* node);
+    Vertex* commonVertex  (Edge* other);
+    Vertex* opposedVertex (Vertex* sommet);
+    double* commonPoint   (Edge* other, double point[]);
+
+    Vertex* getAmont ()       { return e_vertex [NOT e_way] ; }
+    Vertex* getAval  ()       { return e_vertex [e_way] ; }
+
+    Law* getLaw ()            { return e_law ; }
+    void setLaw (Law* law)    { e_law =  law ; }
+
+    void setScalar (double valeur);
+    void setColor  (double valeur)          { setScalar (valeur) ; }
+
+    const Shapes & getAssociations ()       { return tab_assoc ;  }
+
+    virtual void duplicate ();
+    Edge*   getClone ()                     {  return e_clone ;   }
+    double* getVector (double vecteur[]);
+
+private:
+    friend class Cloner;
+    Vertex* e_vertex [V_TWO];
+    Edge*   e_clone;
+    int     e_propag;
+    bool    e_way;     // Sens de propagation
+    Law*    e_law;     // Le soleil brille, brille, brille
+
+    Shapes tab_assoc;
+};
+
+// ----------------------------------------------- Inlining
+// =============================================================== getVertex
+inline Vertex* Edge::getVertex(int nro)
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro < V_TWO  && el_status == HOK
+               && e_vertex [nro]->isValid())
+      elt = e_vertex [nro];
+
+   return elt;
+}
+// =============================================================== index
+inline int Edge::index (Vertex* node)
+{
+   return  node == NULL ? NOTHING
+         : node == e_vertex[V_AMONT] ? V_AMONT
+         : node == e_vertex[V_AVAL ] ? V_AVAL : NOTHING;
+}
+// ============================================================= opposedVertex
+inline Vertex* Edge::opposedVertex (Vertex* sommet)
+{
+   int nro = index (sommet);
+   return nro<0 ? NULL : e_vertex[1-nro];
+}
+// ============================================================= commonVertex
+inline Vertex* Edge::commonVertex (Edge* other)
+{
+   int nro = inter (other);
+   return nro<0 ? NULL : e_vertex[nro];
+}
+// ============================================================= commonPoint
+inline double* Edge::commonPoint (Edge* other, double point[])
+{
+   Vertex* commun = commonVertex (other);
+   if (commun==NULL)
+      {
+      point[dir_x] = point[dir_y] = point[dir_z] =  0;
+      return NULL;
+      }
+
+   commun->getPoint (point);
+   return point;
+}
+// =============================================================== inter
+inline int Edge::inter (Edge* other)
+{
+   int nro;
+   return inter (other, nro);
+}
+// =============================================================== inter
+inline int Edge::inter (Edge* other, int& nother)
+{
+   for (int ni=0 ; ni<V_TWO ; ni++)
+        for (int nj=0 ; nj<V_TWO ; nj++)
+            if (e_vertex[ni] == other->e_vertex[nj])
+               {
+               nother =  nj;
+               return ni;
+               }
+
+   nother = NOTHING;
+   return   NOTHING;
+}
+// =============================================================== definedBy
+inline bool Edge::definedBy  (Vertex* v1, Vertex* v2)
+{
+   bool   rep =    (v1 == e_vertex[V_AMONT] && v2 == e_vertex[V_AVAL ])
+                || (v1 == e_vertex[V_AVAL ] && v2 == e_vertex[V_AMONT]);
+   return rep;
+}
+// =============================================================== setScalar
+inline void Edge::setScalar  (double val)
+{
+   e_vertex [V_AMONT]->setScalar (val);
+   e_vertex [V_AVAL ]->setScalar (val);
+}
+// =============================================================== duplicate
+inline void Edge::duplicate  ()
+{
+   e_clone = new Edge (GetClone (e_vertex [V_AMONT]),
+                       GetClone (e_vertex [V_AVAL ]));
+
+   e_clone->tab_assoc = tab_assoc;
+}
+// =============================================================== getVector
+inline double* Edge::getVector (double vecteur[])
+{
+
+   if (e_vertex[V_AMONT]==NULL ||  e_vertex[V_AVAL]==NULL)
+      {
+      vecteur [dir_x] = vecteur [dir_y] = vecteur [dir_z] = 0;
+      return NULL;
+      }
+
+   vecteur[dir_x] = e_vertex[V_AVAL]->getX() - e_vertex[V_AMONT]->getX();
+   vecteur[dir_y] = e_vertex[V_AVAL]->getY() - e_vertex[V_AMONT]->getY();
+   vecteur[dir_z] = e_vertex[V_AVAL]->getZ() - e_vertex[V_AMONT]->getZ();
+
+   return vecteur;
+}
+END_NAMESPACE_HEXA
+#endif
+
diff --git a/src/HEXABLOCK/HexElements.cxx b/src/HEXABLOCK/HexElements.cxx
new file mode 100755 (executable)
index 0000000..9f8a682
--- /dev/null
@@ -0,0 +1,1057 @@
+
+// C++ : Grilles
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexElements.hxx"
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+#include "HexGlobale.hxx"
+
+#include <cmath>
+#include <map>
+
+static bool db=false;
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== Constructeur
+Elements::Elements (Document* doc) : EltBase (doc)
+{
+   glob  = Globale::getInstance ();
+
+   grid_type  = GR_NONE;
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
+
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+   ker_vertex = 0;
+   cyl_closed = false;
+   cyl_fill   = false;
+   grid_nocart = true;
+   cyl_dispo  = CYL_NOFILL;
+   revo_lution = false;
+   prism_vec   = false;
+}
+// ====================================================== Constructeur
+Elements::Elements (Document* doc, int nx, int ny, int nz) : EltBase (doc)
+{
+   glob  = Globale::getInstance ();
+
+   grid_type  = GR_NONE;
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
+
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+   cyl_closed = true;
+   cyl_fill   = false;
+   cyl_dispo  = CYL_NOFILL;
+
+   resize (GR_CYLINDRIC, nx, ny, nz);
+   cyl_closed = true;
+}
+// ====================================================== Constructeur (clonage)
+Elements::Elements (Elements* orig) : EltBase (orig->el_root)
+{
+   glob = Globale::getInstance ();
+
+   grid_type  = orig->grid_type;
+   cyl_closed = orig->cyl_closed;
+   cyl_fill   = orig->cyl_fill;
+   cyl_dispo  = orig->cyl_dispo;
+
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+
+   resize (orig->grid_type, orig->size_hx, orig->size_hy, orig->size_hz);
+   cyl_closed = orig->cyl_closed;
+}
+// ====================================================== resize
+void Elements::resize (EnumGrid type, int nx, int ny, int nz, int nplus)
+{
+   grid_type   = type;
+   grid_nocart = true;
+
+   switch (grid_type)
+      {
+      case GR_CARTESIAN :
+      case GR_CYLINDRIC :
+      default :
+           grid_nocart = false;
+           size_hx = std::max (nx, 1);
+           size_hy = std::max (ny, 1);
+           size_hz = std::max (nz, 1);
+
+           size_qx = size_ex = size_vx = size_hx + 1;
+           size_qy = size_ey = size_vy = size_hy + 1;
+           size_qz = size_ez = size_vz = size_hz + 1;
+
+           nbr_hexas  = size_hx * size_hy * size_hz;
+           nbr_quads  = size_qx * size_qy * size_qz * DIM3;
+           nbr_edges  = size_ex * size_ey * size_ez * DIM3;
+           nbr_vertex = size_vx * size_vy * size_vz;
+           break;
+
+      case GR_SPHERIC :
+           size_qx = size_ex = size_vx = size_hx = 0;
+           size_qy = size_ey = size_vy = size_hy = 0;
+           size_qz = size_ez = size_vz = size_hz = 0;
+           nbr_quads  = nbr_edges  = nbr_vertex = 0;
+           gr_rayon = std::max (nx, 1);
+
+           nbr_hexas = 1 +  gr_rayon*HQ_MAXI;
+           tab_hexa.clear ();
+           ker_vertex = nbr_vertex;
+           return;
+
+      case GR_JOINT :
+           nbr_orig = std::max (nx, 1); 
+           gr_hauteur  = std::max (ny, 1);
+           size_hx  = nbr_orig;
+           size_hy  = 1;
+           size_hz  = gr_hauteur;
+
+           nbr_hexas  = nbr_orig * gr_hauteur;
+           nbr_vertex = nbr_hexas * QUAD4;
+           nbr_vertex = nbr_orig * (gr_hauteur+1)*QUAD4;
+           nbr_quads  = nbr_vertex;
+           nbr_edges  = 2*nbr_vertex;
+           break;
+
+      case GR_REPLACE :
+           nbr_orig    = std::max (nx, 1);    // nb quads du pattern
+           gr_hauteur  = ny + 1;              // Hauteur des hexas 
+           pat_nbvertex  = std::max (nz, 1);    // nb vertex du pattern
+           pat_nbedges   = std::max (nplus, 1); // nb edges du pattern
+           size_hx  = nbr_orig;
+           size_hy  = 1;
+           size_hz  = gr_hauteur;
+
+           nbr_hexas  = nbr_orig  * gr_hauteur;
+           nbr_vertex = pat_nbvertex * (gr_hauteur+1);
+           nbr_edges  = pat_nbedges * (gr_hauteur+1) + pat_nbvertex*gr_hauteur;
+           nbr_quads  = nbr_orig    * (gr_hauteur+1) + pat_nbedges *gr_hauteur;
+           break;
+
+      case GR_BICYL :
+           cyl_closed = true;
+           size_hx = 1;
+           size_hy = 8;
+           size_hz = 4;
+
+           size_qx = size_ex = size_vx = size_hx + 1;
+           size_qy = size_ey = size_vy = size_hy + 1;
+           size_qz = size_ez = size_vz = size_hz + 1;
+
+           nbr_hexas  = size_hx * size_hy * size_hz;
+           nbr_quads  = size_qx * size_qy * size_qz * DIM3;
+           nbr_edges  = size_ex * size_ey * size_ez * DIM3;
+           nbr_vertex = size_vx * size_vy * size_vz;
+           break;
+      }
+
+   tab_hexa  .resize (nbr_hexas);
+   tab_quad  .resize (nbr_quads);
+   tab_edge  .resize (nbr_edges);
+   tab_vertex.resize (nbr_vertex);
+
+   ker_vertex = nbr_vertex;
+
+   for (int nc=0 ; nc< nbr_hexas  ; nc++) tab_hexa   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_quads  ; nc++) tab_quad   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_edges  ; nc++) tab_edge   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_vertex ; nc++) tab_vertex [nc] = NULL;
+}
+
+// ====================================================== makeCartesianGrid
+int Elements::makeCartesianGrid (Vertex* orig, Vector* v1, Vector* v2, 
+                   Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   resize (GR_CARTESIAN, px+mx, py+my, pz+mz);
+
+   makeCartesianNodes (orig, v1, v2, v3, px, py, pz, mx, my, mz);
+
+   fillGrid ();
+   return HOK;
+}
+// ====================================================== makeCylindricalGrid
+int Elements::makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = da >= 360.0;
+   makeCylindricalNodes (c, b, h, dr, da, dl, nr, na, nl, fill);
+   fillGrid ();
+   assoCylinder (c, h, da);
+   return HOK;
+}
+// ====================================================== makeSphericalGrid
+int Elements::makeSphericalGrid (Vertex* c, Vector* dv, int nb, double  k)
+{
+   resize (GR_SPHERIC, nb);
+
+   if (nb<0) 
+      return HERR;
+   else if (dv->getDx()<=ZEROR || dv->getDy()<=ZEROR || dv->getDz()<=ZEROR)
+      return HERR;
+
+   Vertex* i_node [HV_MAXI];    // Les noeuds de l'hexa englobant
+   Edge*   i_edge [HE_MAXI];    // Les noeuds de l'hexa englobant
+   Quad*   i_quad [HQ_MAXI];    // Les noeuds de l'hexa englobant
+
+   for (int nro=0 ; nro<HV_MAXI; nro++)
+       {
+       double dx = glob->CoordVertex (nro, dir_x) * dv->getDx();
+       double dy = glob->CoordVertex (nro, dir_y) * dv->getDy();
+       double dz = glob->CoordVertex (nro, dir_z) * dv->getDz();
+
+       i_node [nro] = el_root->addVertex (c->getX ()+dx, c->getY ()+dy, 
+                                          c->getZ ()+dz);
+       }
+
+   for (int nro=0 ; nro<HE_MAXI; nro++)
+       {
+       int v1 = glob->EdgeVertex (nro, V_AMONT);
+       int v2 = glob->EdgeVertex (nro, V_AVAL);
+       i_edge[nro] = newEdge (i_node[v1], i_node[v2]);
+
+       if (db)
+          {
+          char nm0[8], nm1 [8], nm2 [8];
+          printf (" %2d : %s = %s = [%s, %s] = [%d,%d] = [%s,%s]\n", nro, 
+                 glob->namofHexaEdge(nro), i_edge[nro]->getName(nm0), 
+                 glob->namofHexaVertex(v1), glob->namofHexaVertex(v2), v1, v2,
+                 i_node[v1]->getName(nm1), i_node[v2]->getName(nm2));
+          }
+       }
+        
+   for (int nro=0 ; nro<HQ_MAXI; nro++)
+       i_quad[nro] = newQuad (i_edge[glob->QuadEdge (nro, E_A)], 
+                              i_edge[glob->QuadEdge (nro, E_B)], 
+                              i_edge[glob->QuadEdge (nro, E_C)], 
+                              i_edge[glob->QuadEdge (nro, E_D)]);
+
+   tab_hexa.push_back (newHexa (i_quad[Q_A], i_quad[Q_B], i_quad[Q_C], 
+                                i_quad[Q_D], i_quad[Q_E], i_quad[Q_F]));
+   double lambda  = 1;
+   double dcell   = 1;
+   for (int niv=0; niv<gr_rayon ; niv++)
+       {
+       double lambda0 = lambda;
+       dcell  *= k;
+       lambda += dcell;
+       addStrate (i_quad, i_edge, i_node, c,  lambda/lambda0);
+       }
+       
+   return HOK;
+}
+// ====================================================== addStrate
+int Elements::addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], 
+                        Vertex* center,  double lambda)
+{
+   Vertex* e_node [HV_MAXI];    // Les noeuds de l'hexa englobant
+   Edge*   e_edge [HE_MAXI];    // Les noeuds de l'hexa englobant
+   Quad*   e_quad [HQ_MAXI];    // Les noeuds de l'hexa englobant
+
+   Edge*   d_edge [HV_MAXI];    // Les aretes diagonales (1 par sommet)
+   Quad*   d_quad [HE_MAXI];    // Les faces  diagonales (1 par arete)
+
+                                          // Les sommets
+                                          //  + les aretes diagonales
+   for (int nv=0 ; nv<HV_MAXI ; nv++)
+       {
+       double px0 = center->getX ();
+       double py0 = center->getY ();
+       double pz0 = center->getZ ();
+       e_node[nv] = el_root->addVertex (px0+lambda*(i_node[nv]->getX()-px0),
+                                        py0+lambda*(i_node[nv]->getY()-py0),
+                                        pz0+lambda*(i_node[nv]->getZ()-pz0));
+
+       d_edge[nv] = newEdge (i_node[nv], e_node[nv]);
+       }
+                                          // Les aretes exterieures
+                                          //  + les faces diagonales
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       int nv0  = glob->EdgeVertex (nro, V_AMONT);
+       int nv1  = glob->EdgeVertex (nro, V_AVAL );
+       e_edge[nro] = newEdge (e_node [nv0], e_node [nv1]);
+       d_quad[nro] = newQuad (i_edge [nro], d_edge [nv0], 
+                              e_edge [nro], d_edge [nv1]);
+       }
+                                          // Les faces exterieures
+                                          //  + les hexas
+   Hexa* strate = NULL;
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       int ne0 = glob->QuadEdge (nro, E_A);
+       int ne1 = glob->QuadEdge (nro, E_B);
+       int ne2 = glob->QuadEdge (nro, E_C);
+       int ne3 = glob->QuadEdge (nro, E_D);
+
+       e_quad[nro] = newQuad (e_edge[ne0], e_edge[ne1], 
+                              e_edge[ne2], e_edge[ne3]);
+       strate  = newHexa (i_quad[nro], e_quad[nro], d_quad[ne0], 
+                          d_quad[ne2], d_quad[ne1], d_quad[ne3]);
+       tab_hexa.push_back (strate);
+       }
+
+   for (int nv=0 ; nv<HV_MAXI ; nv++) i_node  [nv] = e_node [nv];
+   for (int ns=0 ; ns<HE_MAXI ; ns++) i_edge  [ns] = e_edge [ns];
+   for (int nq=0 ; nq<HQ_MAXI ; nq++) i_quad  [nq] = e_quad [nq];
+
+   return HOK;
+}
+// ====================================================== saveVtk
+int Elements::saveVtk (cpchar nomfic)
+{
+                                           // -- 1) Raz numerotation precedente
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->razNodes ();
+       }
+
+   int nbnodes = 0;
+   int nbcells = 0;
+                                           // -- 2) Comptage
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          {
+          nbcells ++;
+          nbnodes += cell->countNodes ();
+          }
+       }
+
+   pfile    vtk = fopen (nomfic, "w");
+   fprintf (vtk, "# vtk DataFile Version 3.1\n");
+   fprintf (vtk, "%s \n", nomfic);
+   fprintf (vtk, "ASCII\n");
+   fprintf (vtk, "DATASET UNSTRUCTURED_GRID\n");
+   fprintf (vtk, "POINTS %d float\n", nbnodes);
+
+                                           // -- 2) Les noeuds
+   int nronode = 0;
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          cell->printNodes (vtk, nronode);
+       }
+                                           // -- 2) Les hexas
+
+   fprintf (vtk, "CELLS %d %d\n", nbcells, nbcells*(HV_MAXI+1));
+
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          cell->printHexa (vtk);
+       }
+
+   fprintf (vtk, "CELL_TYPES %d\n", nbcells);
+   for (int nro=0 ; nro<nbcells ; nro++)
+       fprintf (vtk, "%d\n", HE_MAXI);
+
+   fclose (vtk);
+   return HOK;
+}
+// ============ = = = = = = = = = Vertices ..........
+// ====================================================== newEdge
+Edge* Elements::newEdge (Vertex* v1, Vertex* v2)
+{
+   if (v1==NULL || v2==NULL) 
+      return NULL;
+
+   Edge* elt = new Edge (v1, v2);
+   return elt;
+}
+// ====================================================== newQuad
+Quad* Elements::newQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4)
+{
+   if (e1==NULL || e2==NULL || e3==NULL|| e4==NULL)
+      return NULL;
+
+   Quad* elt = new Quad (e1, e2, e3, e4);
+   return elt;
+}
+// ====================================================== newHexa
+Hexa* Elements::newHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, 
+                                             Quad* qe, Quad* qf)
+{
+   if (qa==NULL || qb==NULL || qc==NULL|| qd==NULL || qe==NULL|| qf==NULL)
+      return NULL;
+
+   Hexa*  elt = new Hexa (qa, qb, qc, qd, qe, qf);
+   return elt;
+}
+// ====================================================== joinQuads
+int Elements::joinQuads (Quads& orig, int nb, Vertex* v1, Vertex* v2, 
+                  Vertex* v3, Vertex* v4, Quad* cible)
+{
+   resize (GR_JOINT, orig.size(), nb);
+
+   el_root->markAll (IS_NONE);
+   db = on_debug();
+   // db = el_root->debug ();
+   
+   gr_hauteur  = nb;
+   nbr_orig = orig.size();
+
+   for (int nro=0 ; nro<nbr_orig ; nro++)
+       {
+       Quad* face = orig[nro];
+       if (face==NULL)
+          {
+          printf ("\n");
+          printf (" *** joinQuads : donnees incorrectes\n");
+          printf (" *** le %deme quadrangle de depart est NULL\n", nro);
+          return HERR;
+          }
+       else if (face->getNbrParents()>1)
+          {
+          printf ("\n");
+          printf (" *** joinQuads : donnees incorrectes\n");
+          printf (" *** le %deme quadrangle de depart n'est pas une " 
+                  "face externe\n", nro);
+          face->dump ();        
+          return HERR;
+          }
+       orig [nro]->setMark (nro);
+       tab_orig.push_back (orig[nro]);
+       }
+
+   Edge* e_orig = tab_orig[0] -> findEdge (v1, v3);
+   Edge* e_dest = cible       -> findEdge (v2, v4);
+
+   if (e_orig==NULL)
+      {
+      printf ("\n");
+      printf (" *** joinQuads : donnees incorrectes\n");
+      printf (" *** Les vertex v1 et v3 passes en argument ne definissent\n");
+      printf (" *** pas une arete du 1er quadrangle de depart\n");
+      printf ("\n");
+      HexDump (v1);
+      HexDump (v3);
+      HexDump (orig[0]);
+      }
+
+   if (e_dest==NULL)
+      {
+      printf ("\n");
+      printf (" *** joinQuads : donnees incorrectes\n");
+      printf (" *** Les vertex v2 et v4 passes en argument ne definissent\n");
+      printf (" *** pas une arete du quadrangle cible\n");
+      printf ("\n");
+      HexDump (v2);
+      HexDump (v4);
+      HexDump (cible);
+      }
+
+   if (e_orig==NULL || e_dest==NULL)
+      return HERR;
+
+   StrOrient orient (v1, v3, v2, v4);
+   int ier =  this   ->coupler (0, cible, &orient);
+   if (ier!=HOK)
+       return HERR;
+   ier = orig[0]->coupler (cible, &orient, this);
+   return ier;
+}
+// ======================================================== coupler
+int Elements::coupler (int nquad, Quad* dest, StrOrient* orient)
+{
+   Quad* orig = tab_orig [nquad];
+
+   setQuad (orig, dir_z, 0, 0, 0);
+   setQuad (dest, dir_z, nquad, 0, 0);
+
+   int n11 = orig->indexVertex (orient->v11);
+   int n12 = orig->indexVertex (orient->v12);
+   int n21 = dest->indexVertex (orient->v21);
+   int n22 = dest->indexVertex (orient->v22);
+   
+               // ---------------- Les 4 sommets initiaux
+   Vertex* vorig[QUAD4] = { orient->v11, orient->v12, 
+                            orig->getVertex((n11+2) MODULO QUAD4),
+                            orig->getVertex((n12+2) MODULO QUAD4) };
+
+   Vertex* vdest[QUAD4] = { orient->v21, orient->v22, 
+                            dest->getVertex((n21+2) MODULO QUAD4),
+                            dest->getVertex((n22+2) MODULO QUAD4) };
+   if (db)
+      {
+      printf ("Quad nro %d : ", nquad);
+      orig->printName (" est couple avec "); 
+      dest->printName ("\n"); 
+      printf ("Orientation : (");
+      for (int ii=0 ; ii<QUAD4 ; ii++) printf("%s ", vorig[ii]->getName());
+      printf (")\n");
+      printf ("           -> (");
+      for (int ii=0 ; ii<QUAD4 ; ii++) printf("%s ", vdest[ii]->getName());
+      printf (")\n");
+      }
+
+               // ---------------- Les sommets + les aretes verticales
+   for (int ns=0 ; ns< QUAD4 ; ns++)
+       {
+       Vertex* nd1 = vorig[ns];
+       Vertex* nd2 = vdest[ns];
+       int nref0   = nd1->getMark();
+       tab_vertex [nroVertex (nquad,ns,0)] = nd1;
+
+       if (nref0==IS_NONE)
+          {
+          double px0 = nd1->getX();
+          double py0 = nd1->getY();
+          double pz0 = nd1->getZ();
+
+          double dx = (nd2->getX() - nd1->getX()) / gr_hauteur;
+          double dy = (nd2->getY() - nd1->getY()) / gr_hauteur;
+          double dz = (nd2->getZ() - nd1->getZ()) / gr_hauteur;
+
+          nd1->setMark (indVertex (nquad, ns, 0));
+
+          Vertex* nd = nd1;
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nh1 = nh + 1;
+              Vertex* ndp = nd;
+              if (nh == gr_hauteur-1)
+                 nd = nd2 ;
+              else 
+                 nd = el_root->addVertex (px0 + nh1*dx, py0 + nh1*dy,  
+                                          pz0 + nh1*dz);
+              int nv  = indVertex (nquad, ns, nh);
+              tab_vertex [nv] = nd;
+              tab_edge   [nv] = el_root->addEdge (ndp, nd);
+              if (db)
+                 printf (" Edge vertical nro %d = %s = (%s, %s)\n", nv, 
+                         tab_edge[nv]->getName(), 
+                         ndp->getName(), nd->getName());
+              }
+          }
+       else
+          {
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nv  = indVertex (nquad, ns, nh);
+              int nv0 = indVertex (nref0, nh);
+              tab_vertex [nv] = tab_vertex [nv0];
+              tab_edge   [nv] = tab_edge   [nv0];
+              }
+          }
+       }
+               // ---------------- Les quads verticaux + aretes horiz
+   for (int ns=0 ; ns< QUAD4 ; ns++)
+       {
+       int next = (ns+1) MODULO QUAD4;
+       Edge*   arete = orig->findEdge (vorig[ns], vorig[next]);
+       int     nref0 = arete->getMark();
+       int     nref  = indVertex (nquad, ns, 0);
+                                  // Construction des faces & aretes H
+       if (nref0==IS_NONE)
+          {
+          arete->setMark (nref);
+          Edge* ea = arete;
+          Edge *eb, *ec, *ed;
+          int  nva, nvb, nha;
+
+          for (int nh=0 ; nh< gr_hauteur ; nh++)
+              {
+              nva = indVertex (nquad, ns,   nh);
+              nvb = indVertex (nquad, next, nh);
+              nha = nroEdgeH  (nva);
+
+              ed  = tab_edge [nva];
+              ec  = ea;
+              eb  = tab_edge [nvb];
+              if (nh==gr_hauteur-1)
+                 ea = dest->findEdge (vdest[ns], vdest[next]);
+              else 
+                 ea = el_root->addEdge (tab_vertex [nva], tab_vertex [nvb]);
+
+              propagateAssociation (ec, ea, eb);
+              tab_quad [nva] = newQuad (ea, eb, ec, ed);
+              if (BadElement (tab_quad [nva]))
+                  return HERR;
+              tab_edge [nha] = ea;
+              }
+          }
+                                  // L'arete a deja ete traitee
+       else
+          {
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nva = indVertex (nquad, ns, nh);
+              int nha = nroEdgeH  (nva);
+
+              int nvb = indVertex (nref0, nh);
+              int nhb = nroEdgeH  (nvb);
+
+              tab_quad [nva] = tab_quad [nvb];
+              tab_edge [nha] = tab_edge [nhb];
+              }
+          }
+       }
+               // -------------------------------- Les Hexas
+   Quad *fb = orig;
+   Quad *fa, *fc, *fd, *fe, *ff;
+   for (int nh=0 ; nh< gr_hauteur ; nh++)
+       {
+       fa = fb;
+       if (nh == gr_hauteur-1)
+          fb = dest;
+       else
+          fb = newQuad (tab_edge [nroEdgeH (nquad, E_A, nh)], 
+                        tab_edge [nroEdgeH (nquad, E_B, nh)],
+                        tab_edge [nroEdgeH (nquad, E_C, nh)],
+                        tab_edge [nroEdgeH (nquad, E_D, nh)]);
+
+       fc = tab_quad [indVertex (nquad, E_A, nh)];
+       fd = tab_quad [indVertex (nquad, E_C, nh)];
+       fe = tab_quad [indVertex (nquad, E_B, nh)];
+       ff = tab_quad [indVertex (nquad, E_D, nh)];
+
+       tab_hexa [nroHexa(nquad,nh)] = newHexa (fa,fb,fc,fd,fe,ff);
+       if (BadElement (tab_hexa [nroHexa(nquad,nh)]))
+           return HERR;
+       }
+   return HOK;
+}
+// ====================================================== makeCartesianNodes
+int Elements::makeCartesianNodes (Vertex* orig, Vector* v1, Vector* v2, 
+                   Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   double dx  = v1->getDx() + v2->getDx() + v3->getDx();
+   double dy  = v1->getDy() + v2->getDy() + v3->getDy();
+   double dz  = v1->getDz() + v2->getDz() + v3->getDz();
+
+   double px0 = orig->getX () - mx * dx;
+   double py0 = orig->getY () - my * dy;
+   double pz0 = orig->getZ () - mz * dz;
+
+   int nbre= 0;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Vertex* node = orig;
+               if (nx!=mx || ny!=my || nz!=mz)
+                  node = el_root->addVertex (px0 + nx*dx,  py0 + ny*dy,  
+                                                          pz0 + nz*dz);
+               setVertex (node, nx, ny, nz);
+               nbre++;
+               }
+   return HOK;
+}
+// ====================================================== makeCylindricalNodes
+int Elements::makeCylindricalNodes (Vertex* orig, Vector* base, Vector* haut, 
+            double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   int ier = makeBasicCylinder (dr, da, dl, nr, na, nl, fill);
+   if (ier!=HOK) 
+       return ier;
+
+   transfoVertices  (orig,  base, haut);
+   return HOK;
+}
+// ====================================================== transfoVertices
+void Elements::transfoVertices (Vertex* orig, Vector* base, Vector* haut)
+{
+   Vector* iprim = new Vector (base);
+   Vector* jprim = new Vector (base);
+   Vector* kprim = new Vector (haut);
+
+   int ier = kprim->renormer ();
+   if (ier!=HOK) 
+       return;
+
+   jprim->vectoriel (kprim, base);
+   ier = jprim->renormer ();
+   if (ier!=HOK) 
+       return;
+
+   iprim->vectoriel (jprim, kprim);
+   transfoVertices  (orig,  iprim, jprim, kprim);
+}
+// ====================================================== transfoVertices
+void Elements::transfoVertices (Vertex* orig, Vector* iprim, Vector* jprim, 
+                                Vector* kprim)
+{
+   double matrice[DIM3][DIM3]={{iprim->getDx(),jprim->getDx(),kprim->getDx()},
+                               {iprim->getDy(),jprim->getDy(),kprim->getDy()},
+                               {iprim->getDz(),jprim->getDz(),kprim->getDz()}};
+
+   double matkx = orig->getX();
+   double matky = orig->getY();
+   double matkz = orig->getZ();
+
+   int nbre = tab_vertex.size ();
+   for (int nro=0 ; nro<nbre ; nro++)
+       {
+       if (tab_vertex[nro] != NULL) 
+           tab_vertex[nro]->setMark (NO_USED);
+       }
+
+   for (int nro=0 ; nro<nbre ; nro++)
+       {
+       Vertex* node =  tab_vertex[nro];
+       if (node != NULL  && node->getMark() == NO_USED)
+          {
+          double point [DIM3] = {node->getX(), node->getY(), node->getZ()};
+          double result[DIM3] = {matkx, matky, matkz};
+
+          for (int ni=0 ; ni<DIM3; ni++)
+              for (int nj=0 ; nj<DIM3; nj++)
+                  result [ni] += matrice[ni][nj] * point[nj];
+               
+          node->setCoord (result[dir_x], result[dir_y], result[dir_z]);
+          node->setMark (IS_USED);
+          }
+       }
+}
+// ====================================================== transform
+int Elements::transform (Matrix* matrice)
+{
+                                           // -- 1) Raz Marques
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->razNodes ();
+       }
+                                           // -- 2) Move Nodes
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->moveNodes (matrice);
+       }
+
+   if (nbr_hexas!=0 )
+      return HOK;
+                    // -- Cas pathologique : il n'y avait pas d'hexas
+                    // -- On se rabat sur les sommets
+
+   for (int nro=0 ; nro<nbr_vertex ; nro++)
+       {
+       Vertex* node = tab_vertex[nro];
+       if (node!=NULL && node->isHere())
+           matrice->perform (node);
+       }
+
+   return HOK;
+}
+// ====================================================== cutHexas
+int Elements::cutHexas  (const Edges& t_edges, int nbcuts)
+{
+                                       // 1) marquage des hexas
+   el_root->markAll (NO_USED);
+                                       // 2) Memo noeuds
+   vector <Quad*> q_amont;
+   vector <Quad*> q_aval;
+   map    <Vertex*, Vertex*> vis_a_vis;
+
+   int nbnodes = t_edges.size();
+   vector <Vertex*> v_amont (nbnodes);
+   vector <Vertex*> v_aval  (nbnodes);
+
+   int nbfaces = 0;
+   for (int nro=0; nro<nbnodes ; nro++)
+       {
+       Edge* arete   = t_edges [nro];
+       v_amont [nro] = arete->getAmont ();
+       v_aval  [nro] = arete->getAval  ();
+       if (db) 
+          {
+          printf (" %3d : Edge = (", nro);
+          v_amont[nro]->printName (", ");
+          v_aval [nro]->printName (")\n");
+          }
+
+       vis_a_vis [v_amont[nro]] = v_aval[nro];
+       vis_a_vis [v_aval[nro]] = v_amont[nro];
+       int nbcells   = arete->getNbrParents ();
+
+       for (int nq=0 ; nq<nbcells ; nq++)
+           {
+           Quad* quad = arete->getParent (nq);
+           if (quad->getMark () != IS_USED)
+              {
+              quad->setMark (IS_USED);
+              int nbcubes = quad->getNbrParents ();
+              for (int nh=0 ; nh<nbcubes ; nh++)
+                  {
+                  Hexa* hexa = quad->getParent (nh);
+                  if (hexa->getMark () != IS_USED)  
+                     {
+                     hexa->setMark (IS_USED);
+                     int namont = hexa->getBase (v_amont[nro], arete);
+                     int naval  = glob->getOpposedQuad (namont);
+                     q_amont.push_back (hexa->getQuad  (namont));
+                     q_aval .push_back (hexa->getQuad  (naval ));
+                     if (db)
+                        {
+                        printf (" %3d : Quad = ", nbfaces);
+                        hexa->printName (", ");
+                        printf (" Faces = (");
+                        hexa->getQuad (namont)->printName (", ");
+                        hexa->getQuad (naval )->printName (")\n");
+                        nbfaces ++;
+                        }
+                     }
+                  }
+              }
+           }
+       }
+                   // ------------------- Dimensionnement
+   int nbcells   = q_amont.size ();
+   nbr_vertex    = nbnodes*(nbcuts+2);
+   int nbpiliers = nbnodes*(nbcuts+1);            // aretes verticales
+   int nbpoutres = nbcells*(nbcuts+2)*QUAD4;      // aretes horizontales
+   nbr_edges     = nbpoutres; 
+   nbr_quads     = nbcells*(nbcuts+1)*QUAD4;      // faces Verticales
+   nbr_hexas     = nbcells*(nbcuts+1);
+
+                   // ------------------- Les noeuds et les aretes verticales
+   tab_quad.resize   (nbr_quads);
+   tab_edge.resize   (nbr_edges);
+   tab_hexa.resize   (nbr_hexas);
+   tab_vertex.resize (nbr_vertex);
+   vector <Edge*>    tab_pilier (nbpiliers);
+
+   int nbinter = nbcuts + 1;
+   for (int ned=0; ned<nbnodes ; ned++)
+       {
+       Shapes ass_shapes = t_edges[ned] -> getAssociations ();
+       Edges  ass_edges;
+       t_edges [ned]->remove ();
+       Vertex* ndamont = v_amont [ned];
+       Vertex* ndaval  = v_aval  [ned];
+
+       double dx = (ndaval->getX() - ndamont->getX()) / nbinter;
+       double dy = (ndaval->getY() - ndamont->getY()) / nbinter;
+       double dz = (ndaval->getZ() - ndamont->getZ()) / nbinter;
+
+       Vertex* nd0 = tab_vertex [ned] = ndamont;
+       for (int nc=0; nc<nbcuts ; nc++)
+           {
+           int nc1 = nc+1;
+           Vertex* nd1 = el_root->addVertex (ndamont->getX() + nc1*dx, 
+                                             ndamont->getY() + nc1*dy, 
+                                             ndamont->getZ() + nc1*dz);
+           tab_vertex [nc1*nbnodes + ned] = nd1;
+           tab_pilier [nc *nbnodes + ned] = newEdge (nd0, nd1);
+           ass_edges.push_back (tab_pilier [nc *nbnodes + ned]);
+           nd0 =  nd1;
+           }
+       tab_vertex [nbinter*nbnodes + ned] = ndaval;
+       tab_pilier [nbcuts *nbnodes + ned] = newEdge (nd0, ndaval);
+       ass_edges.push_back (tab_pilier[nbcuts *nbnodes + ned]);
+       ndamont->setMark (ned);
+       cutAssociation (ass_shapes, ass_edges);
+       }
+                   // ------------------- Les aretes horizontales
+                   // ------------------- Les faces verticales
+   HexDisplay (nbcells);
+   int sizelig = nbcells*QUAD4;
+   for (int nro=0; nro<nbcells ; nro++)
+       {
+       Quad* sol  = q_amont [nro];
+       Quad* toit = q_aval  [nro];
+       for (int ns=0; ns<QUAD4 ; ns++)
+           {
+           Edge* plinthe = sol->getEdge (ns);
+           int   nmur  = nro*QUAD4 + ns;
+           int   nmur0 = plinthe->getMark();
+           if (nmur0 >= 0)
+              {
+              for (int nc=0 ; nc<nbinter ; nc++)
+                  {
+                  tab_edge [nc*sizelig + nmur] = tab_edge [nc*sizelig + nmur0];
+                  tab_quad [nc*sizelig + nmur] = tab_quad [nc *sizelig + nmur0];
+                  if (db) 
+                     {
+                     printf (" %2d : %d quad_vertical [%02d] =", nro, ns, 
+                                                        nc*sizelig + nmur);
+                     printf (" quad_vertical [%02d]\n",  nc*sizelig + nmur0);
+                     }
+                  }
+              tab_edge [nbinter*sizelig+nmur] = tab_edge[nbinter*sizelig+nmur0];
+              }
+           else
+              {
+              plinthe->setMark (nmur);
+              Vertex* vs1 = sol->getVertex (ns);
+              Vertex* vs2 = sol->getVertex ((ns+1) MODULO QUAD4);
+              int     nd1 = vs1->getMark ();
+              int     nd2 = vs2->getMark ();
+              Edge*   ed0 = tab_edge [nmur] = plinthe;
+              Edge*   ed2 = NULL;
+              Vertex* v1  = NULL;
+              Vertex* v2  = NULL;
+              for (int nc=0 ; nc<nbinter ; nc++)
+                  {
+                  int   nc1 = nc + 1;
+                  if (nc<nbcuts)
+                     {
+                     v1 = tab_vertex [nc1*nbnodes + nd1];
+                     v2 = tab_vertex [nc1*nbnodes + nd2];
+                     ed2 = newEdge (v1, v2);
+                     }
+                  else
+                     {
+                     v1 = vis_a_vis [vs1];
+                     v2 = vis_a_vis [vs2];
+                     ed2 = toit->findEdge (v1, v2); 
+                     }
+
+                  tab_edge [nc1*sizelig + nmur] = ed2;
+                  tab_quad [nc *sizelig + nmur] = newQuad (ed0,
+                            tab_pilier [nc*nbnodes + nd1], ed2,
+                            tab_pilier [nc*nbnodes + nd2]);
+                  ed0 = ed2;
+                  if (db) 
+                     {
+                     printf (" %2d : %d quad_vertical [%02d] = ", nro, ns, 
+                                                         nc*sizelig + nmur);
+                     PrintName (tab_quad [nc *sizelig + nmur]);
+                     printf ("\n");
+                     }
+                  }
+              }
+           }
+       }
+                   // ------------------- Les faces horizontales
+                   // ------------------- Les hexas
+   // Rappel : sizelig = nbcells*QUAD4 
+   for (int nro=0; nro<nbcells ; nro++)
+       {
+       Quad* qa = q_amont [nro];
+       for (int nc=0 ; nc<nbinter ; nc++)
+           {
+           int  quadv =  nc*nbcells*QUAD4 + nro*QUAD4;
+           Quad* qb = q_aval[nro];
+           if (nc<nbcuts)
+              {
+              int  edh   = (nc+1)*nbcells*QUAD4 + nro*QUAD4;
+              qb = newQuad (tab_edge[edh],   tab_edge[edh+1], 
+                            tab_edge[edh+2], tab_edge[edh+3]);
+              if (BadElement(qb))
+                  return HERR;
+              }
+           Quad* qc = tab_quad [quadv];
+           Quad* qd = tab_quad [quadv + 2];
+           Quad* qe = tab_quad [quadv + 1];
+           Quad* qf = tab_quad [quadv + 3];
+           Hexa* hexa = newHexa (qa, qb, qc, qd, qe, qf);
+           if (BadElement(hexa))
+               return HERR;
+           tab_hexa [nc*nbcells + nro] = hexa;
+           qa = qb;
+           }
+       }
+   return HOK;
+}
+// ====================================================== clear_associations
+void clear_associations (std::vector<Quad*>& table)
+{
+   int nbelts = table.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       clear_association (table[nro]);
+}
+// ====================================================== clear_associations
+void clear_associations (std::vector<Edge*>& table)
+{
+   int nbelts = table.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       clear_association (table[nro]);
+}
+// ====================================================== clear_associations
+void clear_associations (std::vector<Vertex*>& table)
+{
+   int nbelts = table.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       clear_association (table[nro]);
+}
+// ====================================================== clearAssociation
+void Elements::clearAssociation  ()
+{
+// clear_associations (tab_hexa);
+   clear_associations (tab_quad);
+   clear_associations (tab_edge);
+   clear_associations (tab_vertex);
+
+   //  clear_associations (tab_orig);
+
+   clear_associations (ker_hquad);
+   clear_associations (ker_vquad);
+   clear_associations (ker_hedge);
+   clear_associations (ker_vedge);
+
+/* ***********************************************
+   nbelts = tab_hexa.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       {
+       Hexa* elt = tab_hexa[nro];
+       if (elt != NULL && elt->isValid())
+           elt->clearAssociation ();
+       }
+   *********************************************** */
+}
+// ============================================================ findVertex
+int Elements::findVertex (double vx, double vy, double vz)
+{
+   double tol = el_root->getTolerance ();
+   double xmin = vx - tol;
+   double xmax = vx + tol;
+   double ymin = vy - tol;
+   double ymax = vy + tol;
+   double zmin = vz - tol;
+   double zmax = vz + tol;
+
+   int nbre = tab_vertex.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       {
+       Vertex* node = tab_vertex [nro];
+       if (node != NULL && node->isHere ()
+                        && node->isin   (xmin, xmax, ymin, ymax, zmin, zmax))
+              return nro;
+       }
+   return NOTHING;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexElements.hxx b/src/HEXABLOCK/HexElements.hxx
new file mode 100755 (executable)
index 0000000..e34d88d
--- /dev/null
@@ -0,0 +1,480 @@
+
+// Class : Gestion des tableaux d'hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __ELEMENTS_H
+#define __ELEMENTS_H
+
+#include "HexEltBase.hxx"
+#include "HexHexa.hxx"
+#include "HexMatrix.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Elements : public EltBase 
+{
+public:
+   virtual Hexa*   getHexa   (int nro);
+   virtual Quad*   getQuad   (int nro);
+   virtual Edge*   getEdge   (int nro);
+   virtual Vertex* getVertex (int nro);
+
+   virtual int countHexa   () { return nbr_hexas ; }
+   virtual int countQuad   () { return nbr_quads ; }
+   virtual int countEdge   () { return nbr_edges ; }
+   virtual int countVertex () { return nbr_vertex ; }
+
+   int findHexa   (Hexa*   elt);
+   int findQuad   (Quad*   elt);
+   int findEdge   (Edge*   elt);
+   int findVertex (Vertex* elt);
+
+   int findVertex (double vx, double vy, double vz);
+
+
+public:
+   Elements (Document* doc);
+   Elements (Document* doc, int nx, int ny, int nz);
+   Elements (Elements* orig);
+
+   virtual ~Elements () {}
+   virtual void remove ();
+   virtual void clearAssociation ();
+
+   Hexa*   getStrate (int couche, EnumHQuad face);
+
+   Hexa*   getHexaIJK   (int nx, int ny, int nz);
+   Quad*   getQuadIJ    (int nx, int ny, int nz);
+   Quad*   getQuadJK    (int nx, int ny, int nz);
+   Quad*   getQuadIK    (int nx, int ny, int nz);
+   Edge*   getEdgeI     (int nx, int ny, int nz);
+   Edge*   getEdgeJ     (int nx, int ny, int nz);
+   Edge*   getEdgeK     (int nx, int ny, int nz);
+   Vertex* getVertexIJK (int nx, int ny, int nz);
+
+   int     getHexas (Hexas& liste);
+
+   void   addHexa (Hexa* element);
+   void   addQuad (Quad* element);
+   void   addEdge (Edge* element);
+   void   addVertex (Vertex* element);
+   int    transform (Matrix* matrice);
+
+   int saveVtk  (cpchar nomfic); 
+   int saveVtk  (cpchar nomfic, int& nro); 
+
+   int makeCartesianGrid (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, 
+                      int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   int makeCylinder (Cylinder* cyl, Vector* base, int nr, int na, int nl);
+   int makePipe     (Cylinder* cyl, Vector* base, int nr, int na, int nl);
+
+   int makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill);
+
+   int makeSphericalGrid (Vertex* v, Vector* dv, int nb, double k=1); // perime
+   int makeSphericalGrid (Vertex* v, double rayon, int nb, double k=1);
+
+   int  joinQuads (Quads& q0, int nb, Vertex* v1, Vertex* v2, Vertex* v3, 
+                   Vertex* v4, Quad* dest);
+   int coupler  (int nro, Quad* other, StrOrient* orient);
+
+   int  prismQuads (Quads& start, Vector* dv, int nb);
+   int  prismQuadsVec (Quads& start, Vector* dv, RealVector& tlen, int crit);
+
+   int  cutHexas   (const Edges& edges, int nbcuts);
+
+   void setVertex (Vertex* node, int nx, int ny, int nz);
+
+   void transfoVertices (Vertex* orig, Vector* vi, Vector* vj, Vector* vk);
+   void transfoVertices (Vertex* orig, Vector* base, Vector* haut);
+
+
+   void setVertex (Vertex* node, int nro);
+   void setEdge   (Edge*   edge, int nro);
+   void setQuad   (Quad*   quad, int nro);
+   void setHexa   (Hexa*   cell, int nro);
+
+   int nroVertex (int nsommet,  int nquad, int nh);
+
+              // Evols Hexa3 
+
+   int getCylPoint (int nr, int na, int nh, double& px, double& py, double& pz);
+   int revolutionQuads (Quads& start, Vertex* center, Vector* axis, 
+                        RealVector &angles);
+
+   int makeRind (EnumGrid type, Vertex* center, Vector* vx, Vector* vz, 
+                 double rext, double rint,  double radhole,
+                 Vertex* plorig, double angle, int nrad, int nang, int nhaut);
+
+   static int controlRind (EnumGrid type, Vertex* cx, Vector* vx, Vector* vz, 
+                           double rext, double rint, double radhole,
+                           Vertex* plorig, double angle, 
+                           int nrad, int nang, int nhaut, 
+                           double &phi0, double &phi1);
+
+   int makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, 
+                            RealVector& tdr, RealVector& tda, RealVector& tdh, 
+                            bool fill=false);
+
+   int replaceHexas (Quads& pattern, Vertex* p1, Vertex* c1, 
+                     Vertex* p2, Vertex* c2,  Vertex* p3, Vertex* c3);
+
+   int replaceHexa  (int nh, Pattern* pat, Hexa* hexa);
+   int replaceQuad  (int nh, Pattern* pat, Quad* quad, Vertex* tvert[]);
+   int extrudeQuad  (Pattern* pat);
+
+   void repVertex (int nh, int nro, Vertex* node); 
+   void repEdgeH  (int nh, int nro, Edge* node); 
+   void repEdgeV  (int nh, int nro, Edge* node); 
+   void repQuadH  (int nh, int nro, Quad* node); 
+   void repQuadV  (int nh, int nro, Quad* node); 
+
+   Vertex* repVertex (int nh, int nro, double px, double py, double pz);
+   Edge*   repEdgeV  (int nh, int nro, Vertex* v1, Vertex*v2);
+   Edge*   repEdgeH  (int nh, int nro, Vertex* v1, Vertex*v2);
+   Quad*   repQuadH  (int nh, int nro, Edge* ea, Edge* eb, Edge* ec, Edge* ed);
+   Quad*   repQuadV  (int nh, int nro, Edge* ea, Edge* eb, Edge* ec, Edge* ed);
+   Hexa*   repHexa   (int nh, int nro, Quad* qa, Quad* qb, Quad* qc, 
+                                       Quad* qd, Quad* qe, Quad* qf);
+
+   Vertex* repVertex (int nh, int nro);
+   Edge*   repEdgeV  (int nh, int nro);
+   Edge*   repEdgeH  (int nh, int nro);
+   Quad*   repQuadH  (int nh, int nro);
+   Quad*   repQuadV  (int nh, int nro);
+
+   virtual Hexa*   getKerHexa   (int nro) { return ker_hexa  [nro] ; }
+   virtual Quad*   getKerHQuad  (int nro) { return ker_hquad [nro] ; }
+   virtual Quad*   getKerVQuad  (int nro) { return ker_vquad [nro] ; }
+   virtual Edge*   getKerHEdge  (int nro) { return ker_hedge [nro] ; }
+   virtual Edge*   getKerVEdge  (int nro) { return ker_vedge [nro] ; }
+
+   void moveDisco (Hexa* hexa);
+
+protected :
+                                        // Evols Hexa3 
+   void cutAssociation (Shapes& tshapes, Edges& tedges, bool exist=true);
+   void assoCylinder   (Vertex* center, Vector* vz, double rayon);
+   void assoCylinders  (Vertex* center, Vector* vz, double ray, RealVector& ta);
+   void assoRind       (double* center, double* vx, int nx);
+   void assoSphere     (Vertex* center, Edge* t_edge[], Quad* t_quad[]);
+   void assoCircle     (double* center, Edge* ed1, Edge* ed2);
+   void assoResiduelle ();
+
+   int makeBasicCylinder (RealVector& tdr, RealVector& tda, RealVector& tdh, 
+                          bool fill=false);
+
+   int  propagateAssociation (Edge* orig, Edge* dest, Edge* dir1);
+   int  prismAssociation     (Edge* orig, Edge* dest, int nh, Edge* dir);
+
+                                        // Evols Hexa4 
+   void  updateMatrix (int hauteur);
+   void  endPrism ();
+
+protected :
+   int   fillGrid ();
+   void  fillCenter    ();
+   void  fillCenter4   ();
+   void  fillCenter6   ();
+   void  fillCenterOdd ();
+
+   int  prismHexas (int nro, Quad* sol, int hauteur);
+
+   void setVertex (int nx, int ny, int nz, double px, double py, double pz);
+   void setEdge   (Edge*   edge, EnumCoord dir, int nx, int ny, int nz);
+   void setQuad   (Quad*   quad, EnumCoord dir, int nx, int ny, int nz);
+   void setHexa   (Hexa*   cell, int nx, int ny, int nz);
+
+   Edge* newEdge (Vertex* v1, Vertex* v2);
+   Quad* newQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4);
+   Hexa* newHexa (Quad* e1, Quad* e2, Quad* e3, Quad* e4, Quad* e5, Quad* e6);
+
+   void resize (EnumGrid type, int nx, int ny=0, int nz=0, int nplus=0);
+
+   int makeCartesianNodes (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, 
+                      int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   int makeCylindricalNodes (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill);
+
+   int makeBasicCylinder (double dr, double da, double dl, int nr, int na, 
+                                                           int nl, bool fill);
+
+   int addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], 
+                  Vertex* center,  double lambda);
+
+   int indVertex (int nsommet,  int nquad, int nh);
+   int indVertex (int ref_vert, int nh);
+   int nroEdgeH  (int nvertex);
+   int nroEdgeH  (int nsommet,  int nquad, int nh);
+   int nroHexa   (int nquad, int nh);
+
+   void copyVertex (Elements* other, int px, int py, int pz,  
+                                     int nx, int ny, int nz);
+   void completerGrille  (double hauteur);
+
+protected :
+    Globale* glob;
+    EnumGrid grid_type;
+
+    std::vector<Hexa*>   tab_hexa;
+    std::vector<Quad*>   tab_quad;
+    std::vector<Edge*>   tab_edge;
+    std::vector<Edge*>   tab_pilier;
+    std::vector<Vertex*> tab_vertex;
+
+    std::vector<Quad*>   tab_orig;
+
+    int size_hx, size_hy, size_hz, size_hplus;
+    int size_qx, size_qy, size_qz, size_qhplus, size_qvplus;
+    int size_ex, size_ey, size_ez, size_ehplus, size_evplus;
+    int size_vx, size_vy, size_vz;
+
+    int nbr_hexas, nbr_quads, nbr_edges, nbr_vertex;
+    int nbr_orig, nbr_piliers, ker_vertex;
+
+    int   gr_rayon;              // Spheric
+    int   gr_hauteur;            // Joint
+    int   nbr_secteurs;          // Cyl
+
+    bool     cyl_closed;         // Angle = 180 degres
+    bool     cyl_fill;           // Interieur rempli
+    EnumCyl  cyl_dispo;          // Type de remplissage
+
+                                 // Evols Hexa3
+    bool       revo_lution;  // Number 9 ...
+    Vertex*    revo_center;
+    Vector*    revo_axis;
+
+    RealVector gen_values;    // Angle pour la revolution
+    Matrix     gen_matrix;
+                                 // Evols Hexa4
+    bool       prism_vec ; 
+    Real3      prism_dir;
+
+//  EnumGrid grid_type;   // deja la
+    bool    grid_nocart;   // Grille non cartesienne : no acces aux getTrucIJK
+    double  cyl_length;
+    double  cyl_radhole, cyl_radext, cyl_radint;
+    double  cyl_dtheta;              // angle = na*dtheta
+    double  cyl_phi0,    cyl_dphi;   // angle = phi0 + nh*dphi; 
+
+    int pat_nbedges;
+    int pat_nbvertex;
+
+    std::vector<Hexa*>   ker_hexa;
+    std::vector<Quad*>   ker_hquad, ker_vquad;
+    std::vector<Edge*>   ker_hedge, ker_vedge;
+};
+// =================================================== getStrate
+inline Hexa* Elements::getStrate (int couche, EnumHQuad nroface)
+{ 
+   Hexa* cell = NULL;
+   int   nro  = couche <= 0 ? 0 : (couche-1)*HQ_MAXI + nroface + 1;
+
+   if (nbr_hexas==0 || nro >= nbr_hexas)
+      cell = NULL;
+   else
+      cell = tab_hexa [nro];
+
+   return cell; 
+}
+// ============================================================  setHexa
+inline void Elements::setHexa (Hexa* elt, int nro) 
+{
+   if (nro >=0 && nro < nbr_hexas)
+       tab_hexa [nro] = elt;
+}
+// ============================================================  setQuad
+inline void Elements::setQuad (Quad* elt, int nro) 
+{
+   if (nro >=0 && nro < nbr_quads)
+       tab_quad [nro] = elt;
+}
+// ============================================================  setEdge
+inline void Elements::setEdge (Edge* elt, int nro)
+{
+   if (nro >=0 && nro < nbr_edges)
+       tab_edge [nro] = elt;
+}
+// ============================================================  setVertex
+inline void Elements::setVertex (Vertex* elt, int nro)
+{
+   if (nro >=0 && nro < nbr_vertex)
+       tab_vertex [nro] = elt;
+}
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// ============================================================  getHexa
+inline Hexa* Elements::getHexa (int nro)
+{
+   Hexa* elt = NULL;
+   int  nombre=tab_hexa.size();
+   // if (nro >=0 && nro < nbr_hexas && el_status == HOK Abu 2010/05/06
+   if (nro >=0 && nro < nombre && el_status == HOK 
+               && tab_hexa [nro] != NULL && tab_hexa [nro]->isValid())
+      elt = tab_hexa [nro]; 
+
+   return elt;
+}
+// ============================================================  getQuad
+inline Quad* Elements::getQuad (int nro) 
+{
+   Quad* elt = NULL;
+   if (nro >=0 && nro < nbr_quads && el_status == HOK 
+               && tab_quad [nro] != NULL && tab_quad [nro]->isValid())
+      elt = tab_quad [nro]; 
+
+   return elt;
+}
+// ============================================================  getEdge
+inline Edge* Elements::getEdge (int nro)
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < nbr_edges && el_status == HOK 
+               && tab_edge [nro] != NULL && tab_edge [nro]->isValid())
+      elt = tab_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Elements::getVertex (int nro)
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro <  nbr_vertex && el_status == HOK 
+               && tab_vertex [nro] != NULL && tab_vertex [nro]->isValid())
+      elt = tab_vertex [nro]; 
+
+   return elt;
+}
+// ============================================================  indVertex
+inline int Elements::indVertex (int nquad, int nsommet, int nh)
+{
+   int nro = nsommet  + QUAD4*nquad + nbr_orig*QUAD4*(nh+1);
+   return nro;
+}
+// ============================================================  nroVertex
+inline int Elements::nroVertex (int nquad, int nsommet, int nh)
+{
+   int nro = nsommet  + QUAD4*nquad + nbr_orig*QUAD4*nh;
+   return nro;
+}
+// ============================================================  indVertex
+inline int Elements::indVertex (int ref_edge, int nh)
+{
+   int    nro = ref_edge + nbr_orig*QUAD4*nh;
+   return nro;
+}
+// ============================================================  nroEdgeH
+inline int Elements::nroEdgeH (int nvertex)
+{
+   return QUAD4*nbr_orig*gr_hauteur + nvertex;
+}
+// ============================================================  nroEdgeH
+inline int Elements::nroEdgeH (int nquad, int nsommet, int nh)
+{
+   return QUAD4*nbr_orig*gr_hauteur + indVertex (nquad, nsommet, nh);
+}
+// ============================================================  nroHexa
+inline int Elements::nroHexa (int nquad, int nh)
+{
+   int nro = gr_hauteur*nquad + nh;
+   return nro;
+}
+
+// ============================================================  addHexa
+inline void Elements::addHexa (Hexa* element)
+{
+   tab_hexa.push_back (element);
+   nbr_hexas ++;
+}
+// ============================================================  addQuad
+inline void Elements::addQuad (Quad* element)
+{
+   tab_quad.push_back (element);
+   nbr_quads ++;
+}
+// ============================================================  addEdge
+inline void Elements::addEdge (Edge* element)
+{
+   tab_edge.push_back (element);
+   nbr_edges ++;
+}
+// ============================================================  addVertex
+inline void Elements::addVertex (Vertex* element)
+{
+   tab_vertex.push_back (element);
+   nbr_vertex ++;
+}
+// ============================================================  findHexa
+inline int Elements::findHexa (Hexa* element)
+{
+   int nbre = tab_hexa.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_hexa [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findQuad
+inline int Elements::findQuad (Quad* element)
+{
+   int nbre = tab_quad.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_quad [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findEdge
+inline int Elements::findEdge (Edge* element)
+{
+   int nbre = tab_edge.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_edge [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findVertex
+inline int Elements::findVertex (Vertex* element)
+{
+   int nbre = tab_vertex.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_vertex [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ========================================================= saveVtk (avec nro)
+inline int Elements::saveVtk  (cpchar radical, int &nro)
+{
+   char num[8];
+   sprintf (num, "%d", nro);
+   nro ++;
+
+   string filename = radical;
+   filename += num;
+   filename += ".vtk";
+   int ier = saveVtk (filename.c_str());
+   return ier;
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexElements_asso.cxx b/src/HEXABLOCK/HexElements_asso.cxx
new file mode 100755 (executable)
index 0000000..f561573
--- /dev/null
@@ -0,0 +1,618 @@
+//
+// CC++ : Interface Cascade de la classe Elements
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexElements.hxx"
+#include "HexEdge.hxx"
+
+#ifndef NO_CASCADE
+#include "HexKasBiCylinder.hxx"
+#include "HexKasPoint.hxx"
+#include "HexKasLine.hxx"
+
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+
+#include <GCPnts_AbscissaPoint.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+
+// HEXABLOCK includes
+#include "HexVertex.hxx"
+#include "HexShape.hxx"
+#include "HexDiagnostics.hxx"
+                                    // Cercles 
+#include <GEOMImpl_CircleDriver.hxx>
+#include <GEOMImpl_ICircle.hxx>
+
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Tool.hxx>
+
+#include <GC_MakeCircle.hxx>
+#include <Geom_Circle.hxx>
+
+#include <gp_Circ.hxx>
+                                    // Sphere
+#include <BRepPrimAPI_MakeSphere.hxx>
+                                    // Cylindre
+#include <GEOMImpl_CylinderDriver.hxx>
+#include <GEOMImpl_ICylinder.hxx>
+#include <BRepPrimAPI_MakeCylinder.hxx>
+#include <BRepAlgoAPI_Section.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+void clear_associations (Edge* edge);
+
+// ---------------------------------------------------------------------
+
+static KasLine      current_line;
+static Shape        current_shape ("");
+
+// ========================================================= cutAssociation
+void Elements::cutAssociation (Shapes& tshapes, Edges& tedges, bool exist)
+{
+   db = on_debug ();
+   char foo[18];
+   int nbedges  = tedges.size();
+   int nbshapes = tshapes.size ();
+   if (nbshapes==0) 
+      return;
+
+   std::vector <KasLine>  tab_gline  (nbshapes);
+   
+   Vertex* prems = tedges [0]         -> getVertex (V_AMONT);
+   Vertex* derns = tedges [nbedges-1] -> getVertex (V_AVAL);
+
+   KasPoint pnt_first, pnt_last;
+   pnt_first.definePoint (prems);
+   pnt_last .definePoint (derns);
+
+   if (exist)
+      {
+      if (pnt_first.isBad())
+         {
+         el_root->putError (W_ASSO_CUT1, prems->getName (foo));
+         return;
+         }
+      else if (pnt_last.isBad ())  
+         {
+         el_root->putError (W_ASSO_CUT2, derns->getName (foo));
+         return;
+         }
+      }
+                            // ----------- Define + longueur totale 
+   double  longueur = 0;
+   for (int ns = 0 ; ns<nbshapes ; ns++)
+       {
+       tab_gline[ns].defineLine (tshapes[ns]);
+       longueur += tab_gline[ns].getLength ();
+       }
+
+                            // ----------- Ordonnancement des shapes
+   double  abscisse = 0;
+   int     nslast   = 0;
+   double* coord    = pnt_first.getCoord ();
+   if (nbshapes==1)
+      {
+      tab_gline [0].setRank (0, 0, abscisse);
+      }
+   else
+      {
+
+      for (int rg = 0 ; rg<nbshapes ; rg++)
+          {
+          bool more = true;
+          for (int ns = 0 ; ns<nbshapes && more ; ns++)
+              {
+              if (tab_gline[ns].getRank()==NOTHING)
+                 {
+                 int pos = tab_gline[ns].findBound (coord);
+                 if (pos!=NOTHING)
+                    {
+                    more   = false;
+                    nslast = ns;
+                    tab_gline [ns].setRank (rg, pos, abscisse);
+                    coord = tab_gline [ns].getEnd ();
+                    }
+                 }
+              }
+                          // Pas trouve 
+          if (more)
+             {
+             el_root->putError (W_ASSO_CUT3, derns->getName (foo));
+             return;
+             }
+          }
+      }
+                            // ----------- Dernier
+   if (exist)
+      {
+      coord = pnt_last.getCoord ();
+      int pos = tab_gline[nslast].findBound (coord);
+      if (pos != V_AVAL)
+         {
+         el_root->putError (W_ASSO_CUT4, derns->getName (foo));
+         return;
+         }
+      }
+                            // ----------- Associations
+   double delta = longueur / nbedges;
+   for (int ned = 0 ; ned<nbedges ; ned++)
+       {
+       if (db) cout << " ++ Association Edge nro " 
+                    << ned << "/" <<nbedges << endl;
+       Edge*  edge = tedges[ned];
+       double  sm1 = ned*delta; 
+       double  sm2 = sm1 + delta; 
+       for (int ns = 0 ; ns<nbshapes ; ns++)
+           {
+           tab_gline[ns].associate (edge, sm1, sm2);
+           }
+
+       }
+   if (db) cout << " +++ End of Elements::cutAssociation" << endl;
+}
+// ====================================================== geom_define_line
+void geom_define_line (string& brep)
+{
+   current_shape.setBrep   (brep);
+   current_shape.setBounds (0, 1);
+   current_line.defineLine (&current_shape);
+}
+// ====================================================== geom_asso_point
+void geom_asso_point (double angle, Vertex* node)
+{
+   if (node!=NULL && node->getAssociation() == NULL)
+       current_line.assoPoint (angle, node);
+}
+// ====================================================== geom_asso_point
+void geom_asso_point (Vertex* node)
+{
+   if (node==NULL || node->getAssociation() != NULL)
+      return;
+   
+   Real3 koord = { node->getX(), node->getY(), node->getZ() };
+   KasPoint  asso_point ;
+   asso_point.definePoint (koord);
+   asso_point.associate   (node);
+}
+// ====================================================== geom_create_circle 
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep)
+{
+   db = on_debug ();
+   if (db) printf ("geom_create_circle c=(%g,%g,%g), r=%g\n", 
+                    milieu[0], milieu[1], milieu[2], rayon);
+   if (db) printf ("    -------- base=(%g,%g,%g)\n", base[0], base[1], base[2]);
+   if (db) printf ("    -------- norm=(%g,%g,%g)\n", normale[0], normale[1], 
+                                                  normale[2]);
+
+   gp_Pnt gp_center (milieu [dir_x], milieu [dir_y], milieu [dir_z]);
+   gp_Vec gp_vx     (base   [dir_x], base   [dir_y], base   [dir_z]);
+   gp_Vec gp_norm   (normale[dir_x], normale[dir_y], normale[dir_z]);
+
+   gp_Ax2  gp_axes (gp_center, gp_norm, gp_vx);
+   gp_Circ gp_circ (gp_axes,   rayon);
+
+   TopoDS_Edge    geom_circ = BRepBuilderAPI_MakeEdge(gp_circ).Edge();
+   ostringstream  stream_shape;
+   BRepTools::Write(geom_circ, stream_shape);
+   brep = stream_shape.str();
+
+   // geom_make_brep (geom_circ, brep);
+   if (NOT db)
+      return;
+                             // Impressions de mise au point
+   double umin = 0, umax = 0;
+   TopLoc_Location    loc;
+   Handle(Geom_Curve) handle = BRep_Tool::Curve (geom_circ, loc, umin, umax);
+   GeomAdaptor_Curve  AdaptCurve (handle);
+   double length = GCPnts_AbscissaPoint::Length(AdaptCurve, umin, umax);
+
+   BRepAdaptor_Curve geom_curve (geom_circ);
+
+   for (int pk=0; pk<=4; pk++)
+       {
+       GCPnts_AbscissaPoint s1 (geom_curve, pk*length/4,
+                                geom_curve.FirstParameter());
+       double u1    = s1.Parameter ();
+       gp_Pnt point = geom_curve.Value (u1);
+       if (db) 
+          printf ( " ..... pnt%d = (%g, %g, %g)\n", pk, point.X(),
+                                            point.Y(),  point.Z());
+       }
+}
+// ====================================================== geom_create_sphere 
+void geom_create_sphere (double* milieu, double radius, string& brep)
+{
+   gp_Pnt gp_center (milieu [dir_x], milieu [dir_y], milieu [dir_z]);
+   gp_Ax2 gp_axis = gp_Ax2 (gp_center, gp_Dir(0,0,1), gp_Dir(1,0,0));
+
+   BRepPrimAPI_MakeSphere make_sphere (gp_axis, radius);
+
+   make_sphere.Build();
+
+   ostringstream     stream_shape;
+   TopoDS_Shape      geom_sphere = make_sphere.Face(); 
+   BRepTools::Write (geom_sphere, stream_shape);
+   brep = stream_shape.str();
+}
+// ====================================================== geom_dump_asso
+void geom_dump_asso (Edge* edge)
+{
+   printf (" %s dump_edge :\n",
+           "_______________________________________________________________");
+   if (edge==NULL || NOT edge->isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   bool db0 = db;
+   db  = false;
+   edge->printName(" = (");
+   edge->getVertex (V_AMONT)-> printName (", ");
+   edge->getVertex (V_AVAL) -> printName (")\n");
+   
+   KasPoint asso_point;
+   for (int nro=0 ; nro<V_TWO ; nro++)
+       {
+       Vertex* vertex = edge->getVertex (nro);
+       vertex->printName ("");
+       printf (" = (%g, %g, %g)", vertex->getX(),  vertex->getY(),  
+                                  vertex->getZ());
+
+       int ier = asso_point.definePoint (vertex);
+       if (ier==HOK)
+          {
+          double* coord = asso_point.getCoord();
+          printf (",  pnt_asso  = (%g, %g, %g)", coord[dir_x],  coord[dir_y],  
+                                     coord[dir_z]);
+          }
+       printf ("\n");
+       }
+
+   KasLine asso_line;
+   const Shapes&  tshapes = edge->getAssociations ();
+   for (int nro=0 ; nro<tshapes.size() ; nro++)
+       {
+       printf ( " ------------------- Edge.tab_shape[%d] :\n", nro);
+       Shape* shape = tshapes[nro];
+       if (shape == NULL)
+          {
+          printf ( "                =  NULL\n");
+          }
+       else
+          {
+          asso_line.defineLine (shape);
+          double* deb = asso_line.getStart  ();
+          double* fin = asso_line.getEnd    ();
+          double  lg  = asso_line.getLength ();
+          printf (" Longueur = %g\n", lg);
+          printf (" Debut = %g = (%g, %g, %g)\n", shape->debut, 
+                                                  deb[0], deb[1], deb[2]);
+          printf (" Fin   = %g = (%g, %g, %g)\n", shape->fin, 
+                                                  fin[0], fin[1], fin[2]);
+          }
+       }
+   db = db0;
+}
+// ====================================================== translate_brep
+void translate_brep (string& brep, double dir[], string& trep)
+{
+   gp_Trsf       transfo;
+   BRep_Builder  builder;
+   TopoDS_Shape  orig;
+
+   gp_Vec      vecteur       (dir [dir_x], dir [dir_y], dir [dir_z]);
+   transfo.SetTranslation    (vecteur);
+   istringstream stream_brep (brep);
+   BRepTools::Read           (orig, stream_brep, builder);
+   
+   TopLoc_Location  loc_orig   = orig.Location();
+   gp_Trsf          trans_orig = loc_orig.Transformation();
+   TopLoc_Location  loc_result (transfo * trans_orig);
+   TopoDS_Shape     result = orig.Located (loc_result);
+
+   ostringstream stream_shape;
+   BRepTools::Write (result, stream_shape);
+   trep = stream_shape.str();
+}
+// ====================================================== transfo_brep
+void transfo_brep (string& brep, Matrix* matrice, string& trep)
+{
+   BRep_Builder  builder;
+   TopoDS_Shape  shape_orig;
+   gp_Trsf       transfo;
+
+   double             a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34;
+   matrice->getCoeff (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34);
+   transfo.SetValues (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34, 
+                      Epsil2, Epsil2);
+
+   istringstream stream_brep (brep);
+   BRepTools::Read           (shape_orig, stream_brep, builder);
+   
+   BRepBuilderAPI_Transform brep_transfo (shape_orig, transfo, Standard_True);
+   TopoDS_Shape result = brep_transfo.Shape();
+
+   ostringstream stream_shape;
+   BRepTools::Write (result, stream_shape);
+   trep = stream_shape.str();
+}
+// ====================================================== clear_associations
+void clear_associations (Edge* edge)
+{
+   edge->clearAssociation();
+   edge->getVertex(V_AMONT)->clearAssociation();
+   edge->getVertex(V_AVAL )->clearAssociation();
+}
+// ====================================================== associateShapes
+int associateShapes (Edges& mline, int msens[], Shape* gstart, Shapes& gline, 
+                    double pstart, double pend, bool closed, bool inv)
+{
+   db = on_debug ();
+   if (db) 
+      {
+      cout << "____________________________________________"
+           << " associateShapes" << endl;
+      PutData (gline.size());
+      PutData (pstart);
+      PutData (pend);
+      PutData (closed);
+      PutData (inv);
+      }
+
+   int nbshapes = gline.size ();
+   int nblines  = nbshapes + 1; 
+
+   vector <KasLine*> buff_line (nblines); // car nblines != 0 
+   vector <KasLine*> geom_line (nblines);
+
+                                    // -------- Bufferisation des shapes
+   for (int ns=0 ; ns<nbshapes ; ns++)
+       buff_line [ns] = new KasLine (gline [ns], 0.0, 1.0);
+
+                                    // -------- Premiere ligne
+   int    sdepart  = NOTHING;
+   double*  extrem    = NULL;
+   double abscisse = 0;
+   double pfin0    = 1;
+   if (closed)
+      {
+      if (pstart > UnEpsil)
+         { 
+         inv    = true;
+         pstart = 0;
+         }
+      else if (pstart < Epsil)
+         { 
+         inv    = false;
+         }
+      }
+   else if (nbshapes==1)
+      pfin0 = pend;
+
+   KasLine* prems = geom_line[0]  = new KasLine (gstart, pstart, pfin0);
+
+                          // Ligne fermee : sens impose par l'utilisateur
+   if (closed)
+      {
+      sdepart = inv ? V_AVAL : V_AMONT;
+      }
+                          // PolyLigne ouverte : trouver le sens
+   else if (nbshapes>0)
+      {
+      sdepart  = NOTHING;
+      extrem = prems -> getEnd();
+      for (int ns=V_AMONT ; ns<=V_AVAL && sdepart==NOTHING ; ns++)
+          {
+          for (int nb=0 ; nb<nbshapes && sdepart==NOTHING ; nb++)
+              {
+              if (buff_line[nb]->findBound(extrem) != NOTHING)
+                 sdepart = ns;
+              }
+          extrem = prems -> getStart();
+          }
+
+      if (sdepart==NOTHING)
+         {
+         printf (" ***************** Erreur dans associateShapes\n");
+         printf (" ***************** La ligne ouverte est interrompue\n");
+         return HERR;
+         }
+      }
+                          // Une seule ligne ouverte : depend de pstart et pend
+   else if (pstart < pend)
+      {
+      sdepart = V_AMONT;
+      pfin0   = pend;
+      }
+   else 
+      {
+      sdepart = V_AVAL;
+      pfin0   = pend;
+      }
+
+   prems -> setRank (0, sdepart, abscisse);
+   extrem = prems -> getEnd();
+                                    // -------- Rangement des autres lignes
+   for (int nl=1 ; nl<nblines ; nl++)
+       {
+       bool more = true;
+       for (int nb=0 ; more && nb<nbshapes ; nb++)
+           {
+           KasLine*  ligne = buff_line[nb];
+           int sens = ligne==NULL ? NOTHING : ligne->findBound (extrem);
+           if (sens != NOTHING)
+              {
+                                 // Derniere ligne si ouverte
+              if (NOT closed && nl==nblines-1)
+                 {
+                 ligne -> setBounds (0, pend);
+                 }
+              ligne -> setRank (nl, sens, abscisse);
+              buff_line [nb] = NULL;
+              geom_line [nl] = ligne;
+              extrem = ligne->getEnd();
+              more   = false;
+              }
+           }
+       if (more)
+          {
+          printf (" ***************** Erreur dans KasLine\n");
+          return HERR;
+          }
+       }
+   if (closed && pstart > Epsil)
+      {
+      KasLine* ligne = new KasLine (gstart, 0, pstart);
+      ligne->setRank   (nblines, sdepart, abscisse);
+      geom_line.push_back (ligne);
+      }
+
+   int ntlines = geom_line.size();
+   int nbedges = mline.size ();
+
+   if (db) 
+      cout << "=============================================================="
+           << endl;
+                                    // -------- Menage
+   for (int ned=0 ; ned<nbedges ; ned++)
+       clear_associations (mline[ned]);
+                                    // -------- Associations
+   double delta = abscisse / nbedges;
+   for (int ned=0 ; ned<nbedges ; ned++)
+       {
+       double sm1 = ned * delta;
+       double sm2 = sm1 + delta;
+       for (int ns = 0 ; ns<ntlines ; ns++)
+           geom_line[ns]->associate (mline[ned], sm1, sm2, msens[ned]);
+       }
+                                    // -------- Liberation
+   for (int nl=1 ; nl<ntlines ; nl++)
+       delete geom_line [nl];
+
+   return HOK;
+}
+// ====================================================== set_debug_asso
+void set_debug_asso (bool boule)
+{
+   db = boule;
+   if (db)
+       printf (" ... Traces actives dans  HexAssoElements_asso.cxx\n");
+}
+END_NAMESPACE_HEXA
+      
+// ------------------------------------------------------------------------
+#else    // #ifndef NO_CASCADE
+// ------------------------------------------------------------------------
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== geom_create_circle 
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep)
+{
+   char buffer [80];
+   sprintf (buffer, "(Cercle c=(%g,%g,%g), r=%g", 
+                    milieu[0], milieu[1], milieu[2], rayon);
+   brep = buffer;
+}
+// ====================================================== geom_create_sphere 
+void geom_create_sphere (double* milieu, double radius, string& brep)
+{
+}
+//
+// ========================================================= cutAssociation
+void Elements::cutAssociation (Shapes& tshapes, Edges& tedges, bool exist)
+{
+}
+// ====================================================== geom_define_line
+void geom_define_line (string& brep)
+{
+}
+// ====================================================== geom_dump_asso
+void geom_dump_asso (Edge* edge)
+{
+}
+// ====================================================== geom_asso_point
+void geom_asso_point (double angle, Vertex* node)
+{
+}
+// ====================================================== geom_asso_point
+void geom_asso_point (Vertex* node)
+{
+}
+// ====================================================== translate_brep
+void translate_brep (string& orig, double dir[], string& result)
+{
+   result = orig;
+}
+// ====================================================== transfo_brep
+void transfo_brep (string& brep, Matrix* matrice, string& trep)
+{
+   trep = brep;
+}
+// ====================================================== dump_edge
+void dump_edge (Edge* edge)
+{
+}
+// ====================================================== associateShapes
+int associateShapes (Edges& mline, int msens[], Shape* gstart, Shapes& gline,
+                     double pstart, double pend, bool closed, bool inv)
+{
+   return HOK;
+}
+// ====================================================== set_debug_asso
+void set_debug_asso (bool boule)
+{
+}
+// ====================================================== geom_create_cylcyl
+int geom_create_cylcyl (double* borig, double* bnorm, double* bbase,
+                        double  bray,  double  bhaut,
+                        double* sorig, double* snorm, double* sbase,
+                        double  sray,  double  shaut)
+{
+   return HOK;
+}
+// ====================================================== geom_asso_cylcyl
+int geom_asso_cylcyl (Edge* edge)
+{
+   return HOK;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexElements_bis.cxx b/src/HEXABLOCK/HexElements_bis.cxx
new file mode 100755 (executable)
index 0000000..0bfc615
--- /dev/null
@@ -0,0 +1,491 @@
+
+// C++ : Table d'hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexCylinder.hxx"
+#include "HexShape.hxx"
+
+#include <map>
+
+BEGIN_NAMESPACE_HEXA
+
+void geom_dump_asso     (Edge* edge);
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep);
+
+// ====================================================== getHexaIJK
+Hexa* Elements::getHexaIJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_hx ||  ny<0 || ny>=size_hy || nz<0 || nz>=size_hz)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_hx*ny + size_hx*size_hy*nz; 
+
+   return tab_hexa [nro]; 
+}
+// ====================================================== getQuadIJ
+Quad* Elements::getQuadIJ (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz 
+                + size_qx*size_qy*size_qz*dir_z;
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadJK
+Quad* Elements::getQuadJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz; // + dir_x*...
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadIK
+Quad* Elements::getQuadIK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz + size_qx*size_qy*size_qz;
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getEdgeI
+Edge* Elements::getEdgeI (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz;
+
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeJ
+Edge* Elements::getEdgeJ (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez;
+
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeK
+Edge* Elements::getEdgeK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz 
+                + size_ex*size_ey*size_ez*dir_z;
+   return tab_edge [nro]; 
+}
+// ====================================================== getVertexIJK
+Vertex* Elements::getVertexIJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_vx ||  ny<0 || ny>=size_vy || nz<0 || nz>=size_vz)
+      return NULL;
+   else if (grid_nocart)
+      return NULL;
+
+   int nro = nx + size_vx*ny + size_vx*size_vy*nz; 
+
+   return tab_vertex [nro]; 
+}
+// ====================================================== setVertex
+void Elements::setVertex (Vertex* elt, int nx, int ny, int nz)
+{
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz) return; 
+
+   int nro = nx + size_vx*ny + size_vx*size_vy*nz;
+   tab_vertex [nro] = elt;
+}
+// ====================================================== setVertex (2)
+void Elements::setVertex (int nx, int ny, int nz, double px, double py, 
+                                                  double pz)
+{
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz) return; 
+
+   Vertex*    node = el_root->addVertex (px, py, pz);
+   setVertex (node, nx, ny, nz);
+}
+// ====================================================== setEdge
+void Elements::setEdge (Edge* elt, EnumCoord dir, int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez
+            || dir < dir_x || dir > dir_z )
+      return;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez*dir;
+   tab_edge [nro] = elt; 
+}
+// ====================================================== setQuad
+void Elements::setQuad (Quad* elt, EnumCoord dir, int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez
+            || dir < dir_x || dir > dir_z )
+      return;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez*dir;
+   tab_quad [nro] = elt; 
+}
+// ====================================================== setHexa
+void Elements::setHexa (Hexa* elt, int nx, int ny, int nz)
+{
+   if (   nx < 0 || nx >= size_hx || ny < 0 || ny >= size_hy 
+       || nz < 0 || nz >= size_hz) return; 
+
+   int nro = nx + size_hx*ny + size_hx*size_hy*nz;
+   tab_hexa [nro] = elt;
+}
+// ====================================================== remove
+void Elements::remove ()
+{
+   int nbre=tab_hexa.size ();
+   nbre = nbr_hexas;
+   for (int nh=0 ; nh<nbre ; nh++)
+       if (tab_hexa[nh] != NULL)
+           tab_hexa[nh]->remove();
+}
+// ====================================================== makeCylinder
+int Elements::makeCylinder (Cylinder* cyl, Vector* vx, int nr, int na, int nl)
+{
+   Vertex* orig = cyl->getBase ();
+   Vector* dir  = cyl->getDirection ();
+   double  ray  = cyl->getRadius ();
+   double  haut = cyl->getHeight ();
+   
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = true;
+   makeCylindricalNodes (orig, vx, dir, ray/(nr+1), 360, haut/nl, 
+                         nr, na, nl, true);
+   fillGrid ();
+   assoCylinder (orig, dir, 360);
+   return HOK;
+}
+// ====================================================== makePipe
+int Elements::makePipe (Cylinder* cyl, Vector* vx, int nr, int na, int nl)
+{
+   Vertex* orig = cyl->getBase ();
+   Vector* dir  = cyl->getDirection ();
+   double  ray  = cyl->getRadius ();
+   double  haut = cyl->getHeight ();
+   
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = true;
+   makeCylindricalNodes (orig, vx, dir, ray, 360, haut, nr, na, nl, false);
+   fillGrid ();
+   assoCylinder (orig, dir, 360);
+   return HOK;
+}
+// 
+// ---------------------------------------- prism Quads
+//
+// ====================================================== prismQuads
+int Elements::prismQuads (Quads& tstart, Vector* dir, int nbiter)
+{
+   el_root->markAll (NO_USED);
+   int nbcells   = tstart.size ();
+   nbr_vertex    = 0;
+   nbr_edges     = 0;
+
+   nbr_hexas = nbcells*nbiter;
+
+   tab_hexa.resize (nbr_hexas);
+   tab_quad.clear ();          // verticaux
+   ker_hquad.clear ();         // Horizontaux
+   tab_edge.clear ();
+   tab_pilier.clear ();
+   tab_vertex.clear ();
+
+   revo_lution = false;
+   prism_vec   = false;
+   gen_matrix.defTranslation (dir);
+
+   for (int nro=0 ; nro<nbcells ; nro++)
+       {
+       prismHexas (nro, tstart[nro], nbiter);
+       }
+
+   endPrism ();
+   return HOK;
+}
+// ====================================================== prismQuadsVec
+int Elements::prismQuadsVec (Quads& tstart, Vector* dir, RealVector& tlen, 
+                             int mode)
+{
+   int nbiter = tlen.size();
+   if (nbiter==0)
+      return HERR;
+
+   el_root->markAll (NO_USED);
+   int nbcells   = tstart.size ();
+   nbr_vertex    = 0;
+   nbr_edges     = 0;
+
+   nbr_hexas = nbcells*nbiter;
+
+   tab_hexa.resize (nbr_hexas);
+   tab_quad.clear ();          // verticaux
+   ker_hquad.clear ();         // Horizontaux
+   tab_edge.clear ();
+   tab_pilier.clear ();
+   tab_vertex.clear ();
+
+   revo_lution = false;
+   prism_vec   = true;
+   dir->getCoord  (prism_dir);
+   normer_vecteur (prism_dir);
+   gen_values = tlen;
+
+   for (int nro=0 ; nro<nbcells ; nro++)
+       {
+       prismHexas (nro, tstart[nro], nbiter);
+       }
+
+   endPrism ();
+   return HOK;
+}
+// ======================================================== revolutionQuads
+int Elements::revolutionQuads (Quads& start, Vertex* center, Vector* axis,
+                               RealVector &angles)
+{
+   int nbiter = angles.size();
+   if (center==NULL  || axis==NULL || nbiter==0)
+      return HERR;
+
+   el_root->markAll (NO_USED);
+   int nbcells   = start.size ();
+   nbr_vertex    = 0;
+   nbr_edges     = 0;
+
+   nbr_hexas   = nbcells*nbiter;
+
+   tab_hexa.resize (nbr_hexas);
+   tab_quad.clear ();          // verticaux
+   ker_hquad.clear ();         // Horizontaux
+   tab_edge.clear ();
+   tab_pilier.clear ();
+   tab_vertex.clear ();
+
+   revo_lution  = true;
+   prism_vec    = false;
+   revo_axis    = axis;
+   revo_center  = center;
+   gen_values = angles;
+
+   for (int nro=0 ; nro<nbcells ; nro++)
+       {
+       prismHexas (nro, start[nro], nbiter);
+       }
+
+   endPrism ();
+   return HOK;
+}
+// ====================================================== prismHexas
+int  Elements::prismHexas (int nro, Quad* qbase, int hauteur)
+{
+   int ind_node [QUAD4];
+   string c_rep;
+
+           // ----------------------------- Vertex + aretes verticales
+   for (int ns=0 ; ns<QUAD4 ; ns++)
+       {
+       Vertex* vbase = qbase ->getVertex (ns);
+       int     indx  = vbase->getMark ();
+       if (indx<0)
+          {
+          indx = nbr_vertex++;
+          vbase->setMark (indx);
+          Vertex* nd0 = vbase;
+          Vertex* nd1 = NULL;
+          double beta = 0;
+          if (revo_lution)
+             {
+             Real3 centre, vk, point, om;
+             revo_center->getPoint (centre);
+             vbase      ->getPoint (point);
+             revo_axis  ->getCoord (vk);
+             normer_vecteur (vk);
+
+             calc_vecteur   (centre, point, om);
+             double oh     = prod_scalaire (om, vk);
+             double rayon  = 0;
+             Real3  ph, hm;
+             for (int dd=dir_x; dd<=dir_z ; dd++)
+                 {
+                 ph [dd] = centre [dd] + oh*vk[dd]; 
+                 hm [dd] = point  [dd] - ph[dd];
+                 rayon  += hm[dd] * hm[dd];
+                 }
+             rayon = sqrt (rayon);
+/********************************
+             PutCoord (centre);
+             PutCoord (point);
+             PutData  (oh);
+             PutCoord (ph);
+             PutData  (rayon);
+             PutCoord (vk);
+             PutCoord (hm);
+********************************/
+             geom_create_circle (ph, rayon, vk, hm, c_rep);
+             }
+
+          for (int nh=0 ; nh<hauteur ; nh++)
+              {
+              nd1 = el_root->addVertex (nd0->getX(), nd0->getY(), nd0->getZ());
+              updateMatrix (nh);
+              gen_matrix.perform   (nd1);
+              tab_vertex.push_back (nd1);
+              Edge* pilier = newEdge (nd0, nd1);
+              tab_pilier.push_back (pilier);
+              if (revo_lution)
+                 {
+                 double alpha = beta;
+                 beta = alpha + gen_values[nh]; 
+                 Shape* shape = new Shape (c_rep);
+                 shape->setBounds (alpha/360, beta/360);
+                 pilier->addAssociation (shape);
+                 //      geom_dump_asso (pilier);
+                 }
+              nd0 = nd1;
+              }
+          }
+       ind_node [ns] = indx;
+       }
+           // ----------------------------- Aretes horizontales
+           // ----------------------------- + face verticales
+   int ind_poutre [QUAD4];
+   for (int ns=0 ; ns<QUAD4 ; ns++)
+       {
+       Edge* ebase = qbase->getEdge (ns);
+       int   indx  = ebase->getMark ();
+       if (indx<0)
+          {
+          indx = nbr_edges ++;
+          ebase->setMark (indx);
+          int   nd1 = ind_node [ns];
+          int   nd2 = ind_node [(ns+1) MODULO QUAD4];
+          Edge* ed0 = ebase;
+          Edge *ed1, *ed2, *ed3;
+          for (int nh=0 ; nh<hauteur ; nh++)
+              {
+              ed2 = ed0;
+              ed0 = newEdge (tab_vertex [nd1*hauteur + nh], 
+                             tab_vertex [nd2*hauteur + nh]);
+              ed1 = tab_pilier [nd1*hauteur + nh];
+              ed3 = tab_pilier [nd2*hauteur + nh];
+
+              Quad* mur = newQuad (ed0, ed1, ed2, ed3);
+              tab_edge.push_back (ed0);
+              tab_quad.push_back (mur);
+              prismAssociation (ed2, ed0, nh, ed1);
+              }
+          }
+       ind_poutre [ns] = indx;
+       }
+           // ----------------------------- Faces horizontales
+           // ----------------------------- + Hexas
+   Quad* qa = qbase;
+   Quad *qb, *qc, *qd, *qe, *qf;
+   int nv0 = hauteur*ind_poutre [0];
+   int nv1 = hauteur*ind_poutre [1];
+   int nv2 = hauteur*ind_poutre [2];
+   int nv3 = hauteur*ind_poutre [3];
+   for (int nh=0 ; nh<hauteur ; nh++)
+       {
+       qb = newQuad (tab_edge [nh+nv0], tab_edge [nh+nv1], 
+                     tab_edge [nh+nv2], tab_edge [nh+nv3]);
+       qc = tab_quad [nh + nv0];
+       qd = tab_quad [nh + nv2];
+       qe = tab_quad [nh + nv1];
+       qf = tab_quad [nh + nv3];
+
+// *** tab_hexa [nh*hauteur + nro] = newHexa (qa, qb, qc, qd, qe, qf); Abu 
+       tab_hexa [nro*hauteur + nh] = newHexa (qa, qb, qc, qd, qe, qf);
+       ker_hquad.push_back (qb);
+       qa = qb;
+       }
+   return HOK;
+}
+// ====================================================== updateMatrix
+void Elements::updateMatrix (int hauteur)
+{
+   if (revo_lution)
+      {
+      gen_matrix.defRotation (revo_center, revo_axis, gen_values[hauteur]);
+      }
+   else if (prism_vec)
+      {
+      double h0 = hauteur>0 ?  gen_values[hauteur-1] : 0;
+      double dh = gen_values[hauteur] - h0;
+      Real3 decal;
+      for (int nc=dir_x ; nc<=dir_z ; nc++)
+          decal [nc] = prism_dir [nc]*dh; 
+      gen_matrix.defTranslation (decal);
+      }
+}
+// ====================================================== endPrism
+void Elements::endPrism ()
+{
+   int nbelts = ker_hquad.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       tab_quad.push_back (ker_hquad[nro]);
+
+   nbelts = tab_pilier.size();
+   for (int nro=0 ; nro<nbelts ; nro++)
+       tab_edge.push_back (tab_pilier[nro]);
+
+
+   nbr_hexas  = tab_hexa.size ();
+   nbr_edges  = tab_edge.size ();
+   nbr_quads  = tab_quad.size ();
+   nbr_vertex = tab_vertex.size ();
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexElements_grid.cxx b/src/HEXABLOCK/HexElements_grid.cxx
new file mode 100755 (executable)
index 0000000..389b171
--- /dev/null
@@ -0,0 +1,605 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// C++ : Table des noeuds
+
+#include "HexElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+// ====================================================== makeBasicCylinder
+int Elements::makeBasicCylinder (double dr, double da, double dl, int nr, 
+                                 int na, int nl, bool fill)
+{
+   cyl_dispo = CYL_NOFILL;
+   if (fill && na > 3)
+      {
+      if (cyl_closed)
+         {
+         if (na==4)
+            cyl_dispo = CYL_CL4;
+        else if (na==6)
+            cyl_dispo = CYL_CL6;
+        else if (na MODULO 2 == 0)
+            cyl_dispo = CYL_CLOSED;
+         }
+      else if ((na MODULO 2)==0)
+         cyl_dispo = CYL_PEER;
+      else 
+         cyl_dispo = CYL_ODD;
+      }
+
+   cyl_fill = cyl_dispo != CYL_NOFILL;
+
+   double alpha  = M_PI*da/180;
+   double beta   = alpha / na;
+   double theta  = 0;
+   int    nb_secteurs = cyl_closed ? size_vy-1 : size_vy;
+
+   for (int ny=0 ; ny<nb_secteurs ; ny++)
+       {
+       double cos_theta = cos (theta);
+       double sin_theta = sin (theta);
+       theta += beta;
+
+       for (int nx=0 ; nx<size_vx ; nx++)
+           {
+           double rayon = dr*(nx+1);
+           double px = rayon*cos_theta;
+           double py = rayon*sin_theta;
+
+           for (int nz=0 ; nz<size_vz ; nz++)
+               {
+               double pz = dl*nz;
+               //   getCylPoint (nx, ny, nz, px, py, pz);
+               Vertex* node = el_root->addVertex (px, py, pz);
+               setVertex (node, nx, ny, nz);
+               }
+           }
+       }
+
+   if (cyl_closed) 
+      {
+      for (int nx=0 ; nx<size_vx ; nx++)
+          for (int nz=0 ; nz<size_vz ; nz++)
+              {
+              Vertex* node = getVertexIJK (nx, 0, nz);
+              setVertex (node, nx, size_vy-1, nz);
+              }
+      }
+
+                      // Les vertex centraux
+   if (cyl_fill) 
+      {
+      ker_vertex = nbr_vertex;
+      for (int nz=0 ; nz<size_vz ; nz++)
+          {
+          Vertex* node = el_root->addVertex (0, 0, nz*dl);
+          tab_vertex.push_back (node);
+          nbr_vertex ++;
+          }
+      }
+
+   return HOK;
+}
+// ====================================================== fillGrid
+int Elements::fillGrid ()
+{
+   if (cyl_closed)
+      for (int nx=0 ; nx<size_vx ; nx++)
+           for (int nz=0 ; nz<size_vz ; nz++)
+               setVertex (getVertexIJK (nx, 0, nz), nx, size_vy-1, nz);
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Vertex* v0 = getVertexIJK (nx, ny, nz  );
+               Vertex* vx = getVertexIJK (nx+1, ny, nz);
+               Vertex* vy = getVertexIJK (nx, ny+1, nz);
+               Vertex* vz = getVertexIJK (nx, ny, nz+1);
+
+               Edge* e1 = NULL;
+               Edge* e2 = newEdge (v0, vy);
+               Edge* e3 = NULL;
+
+               if (cyl_closed && ny==size_vy-1)
+                  {
+                  e1 = getEdgeI (nx, 0, nz);
+                  e3 = getEdgeK (nx, 0, nz);
+                  }
+               else
+                  {
+                  e3 = newEdge (v0, vz);
+                  e1 = newEdge (v0, vx);
+                  }
+
+               setEdge (e1, dir_x, nx, ny, nz);
+               setEdge (e2, dir_y, nx, ny, nz);
+               setEdge (e3, dir_z, nx, ny, nz);
+               }
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Edge* eae = getEdgeI (nx, ny,   nz);
+               Edge* ebe = getEdgeI (nx, ny,   nz+1);
+               Edge* eaf = getEdgeI (nx, ny+1, nz);
+
+               Edge* eac = getEdgeJ (nx,   ny, nz);
+               Edge* ead = getEdgeJ (nx+1, ny, nz);
+               Edge* ebc = getEdgeJ (nx,   ny, nz+1);
+
+               Edge* ece = getEdgeK (nx,   ny,   nz);
+               Edge* ede = getEdgeK (nx+1, ny,   nz);
+               Edge* ecf = getEdgeK (nx,   ny+1, nz);
+               
+               Quad* q1 = newQuad (eac, eaf, ead, eae);
+               Quad* q2 = newQuad (eac, ecf, ebc, ece);
+               Quad* q3 = NULL;
+               Quad* q30 = getQuadIK (nx, 0 ,nz);
+
+               if (cyl_closed && ny==size_vy-1 && q30!= NULL)
+                  {
+                  q3 = q30;
+                  // Display(q3);
+                  }
+               else
+                  {
+                  q3 = newQuad (eae, ede, ebe, ece);
+                  }
+
+               setQuad (q1, dir_z, nx,ny,nz);
+               setQuad (q2, dir_x, nx,ny,nz);
+               setQuad (q3, dir_y, nx,ny,nz);
+               }
+
+   for (int nz=0 ; nz<size_hz ; nz++)
+       for (int ny=0 ; ny<size_hy ; ny++)
+           for (int nx=0 ; nx<size_hx ; nx++)
+               {
+               Quad* qa = getQuadIJ (nx, ny, nz);
+               Quad* qb = getQuadIJ (nx, ny, nz+1);
+
+               Quad* qc = getQuadIK (nx, ny,   nz);
+               Quad* qd = getQuadIK (nx, ny+1, nz);
+
+               Quad* qe = getQuadJK (nx,   ny, nz);
+               Quad* qf = getQuadJK (nx+1, ny, nz);
+
+               setHexa (newHexa (qa, qb, qc, qd, qe, qf), nx, ny, nz);
+               }
+
+   switch (cyl_dispo)
+      {
+      case CYL_CLOSED :
+      case CYL_PEER   :  fillCenter ();
+           break ; 
+      case CYL_CL4 :     fillCenter4 ();
+           break ; 
+      case CYL_CL6 :     fillCenter6 ();
+           break ; 
+      case CYL_ODD :     fillCenterOdd ();
+           break ; 
+      case CYL_NOFILL  :
+      default : ;
+      }
+   return HOK;
+}
+// ====================================================== fillCenter
+// === Remplissage radial
+#define IndElt(nc,nz)   (nbsecteurs*(nz) + nc)
+#define IndRedge(nc,nz) (nbrayons  *(nz) + nc)
+#define IndVquad(nc,nz) (nbrayons  *(nz-1) + nc)
+void Elements::fillCenter ()
+{
+   int nx0 = 0;
+   int nbsecteurs = size_hy / 2;
+   int nbrayons   = cyl_closed ? nbsecteurs : nbsecteurs + 1;
+
+   size_hplus  = nbsecteurs * size_hz;
+   size_qhplus = nbsecteurs * size_vz;
+   size_qvplus = nbrayons   * size_hz;
+   size_ehplus = nbrayons   * size_vz;
+   size_evplus = size_hz;
+
+   ker_hexa .resize (size_hplus);
+   ker_hquad.resize (size_qhplus);
+   ker_vquad.resize (size_qvplus);
+   ker_hedge.resize (size_ehplus);
+   ker_vedge.resize (size_evplus);
+
+   Vertex* pcenter = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Vertex central
+       Vertex* center = getVertex (ker_vertex+nz);
+                                 //   Edges horizontaux radiaux
+       for (int nc=0 ; nc<nbrayons ; nc++)
+           {
+           Vertex* vv = getVertexIJK (nx0, 2*nc, nz);
+           Edge*   edge = newEdge (center, vv);
+           ker_hedge [IndRedge(nc,nz)] = edge;
+           }
+                                 //   Quads horizontaux
+       for (int nc=0; nc<nbsecteurs ; nc++)
+           {
+           int nc1  = (nc + 1) MODULO nbrayons;
+           Edge* e1 = ker_hedge [IndRedge (nc, nz)];
+           Edge* e2 = getEdgeJ (nx0, 2*nc,  nz);
+           Edge* e3 = getEdgeJ (nx0, 2*nc+1,nz);
+           Edge* e4 = ker_hedge [IndRedge (nc1, nz)];
+
+           ker_hquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+           if (debug()) 
+              {
+             printf ("hquad (%d,%d) = ", nc, nz);
+              ker_hquad [IndElt (nc,nz)]->dumpPlus();
+              }
+           }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          Edge* pilier = ker_vedge [nz-1] = newEdge (pcenter, center);
+
+          for (int nc=0 ; nc<nbrayons ; nc++)
+              {
+              Edge* e1 = ker_hedge [IndRedge (nc, nz)];
+              Edge* e2 = getEdgeK (nx0, 2*nc,  nz-1);
+              Edge* e3 = ker_hedge [IndRedge (nc, nz-1)];
+              ker_vquad [IndVquad (nc,nz)] = newQuad (e1, e2, e3, pilier);
+              if (debug()) 
+                 {
+                printf ("vquad (%d,%d) = ", nc, nz);
+                 ker_vquad [IndVquad (nc,nz)]->dumpPlus();
+                 }
+              }
+                                 //   Hexas
+          for (int nc=0 ; nc < nbsecteurs ; nc++)
+              {
+              int nc1  = nc + 1;
+              if (cyl_closed) 
+                  nc1  = nc1 MODULO nbsecteurs;
+              Quad* qa = ker_hquad [IndElt (nc, nz-1)];
+              Quad* qb = ker_hquad [IndElt (nc, nz)];
+
+              Quad* qc = ker_vquad [IndVquad (nc, nz)];
+              Quad* qd = getQuadJK (nx0, 2*nc+1, nz-1);
+
+              Quad* qe = getQuadJK (nx0, 2*nc,   nz-1);
+              Quad* qf = ker_vquad [IndVquad (nc1,  nz)];
+
+              if (debug()) 
+                 {
+                 printf (" --------------- Hexa : nc=%d, nz=%d\n", nc, nz);
+                HexDump (qa);
+                HexDump (qb);
+                HexDump (qc);
+                HexDump (qd);
+                HexDump (qe);
+                HexDump (qf);
+                 }
+              Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+              tab_hexa.push_back (cell);
+              ker_hexa [IndElt (nc,  nz-1)] = cell;
+              }
+          }
+       pcenter = center;
+       }
+}
+// ====================================================== fillCenter4
+// === Remplissage radial
+void Elements::fillCenter4 ()
+{
+   int   nx0  = 0;
+   Quad* sol = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Quad horizontal
+
+       Quad* plafond = newQuad (getEdgeJ (nx0, 0,  nz), getEdgeJ (nx0, 1, nz), 
+                                getEdgeJ (nx0, 2,  nz), getEdgeJ (nx0, 3, nz));
+
+       if (nz>0)
+          {
+          Quad* qc = getQuadJK (nx0, 0, nz-1);
+          Quad* qd = getQuadJK (nx0, 2, nz-1);
+          Quad* qe = getQuadJK (nx0, 1, nz-1);
+          Quad* qf = getQuadJK (nx0, 3, nz-1);
+
+          if (debug()) 
+             {
+             printf (" --------------- Hexa grille4 : nz=%d\n", nz);
+            HexDump (plafond);
+            HexDump (sol);
+            HexDump (qc);
+            HexDump (qd);
+            HexDump (qe);
+            HexDump (qf);
+             }
+          Hexa* cell = newHexa (plafond, sol, qc, qd, qe, qf);
+          tab_hexa.push_back (cell);
+          }
+       sol = plafond;
+       }
+}
+// ====================================================== fillCenter6
+void Elements::fillCenter6 ()
+{
+   int nx0 = 0;
+   int nydemi = size_hy / 2;
+
+   Edge* s_barre = NULL;
+   Quad* sr_quad = NULL;
+   Quad* sl_quad = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Edges horizontal radial
+       Edge* p_barre = newEdge (getVertexIJK (nx0, 0,      nz),
+                                getVertexIJK (nx0, nydemi, nz));
+                                 //   Quads horizontaux
+       Edge* e0 = getEdgeJ (nx0, 0,  nz);
+       Edge* e1 = getEdgeJ (nx0, 1,  nz);
+       Edge* e2 = getEdgeJ (nx0, 2,  nz);
+       Edge* e3 = getEdgeJ (nx0, 3,  nz);
+       Edge* e4 = getEdgeJ (nx0, 4,  nz);
+       Edge* e5 = getEdgeJ (nx0, 5,  nz);
+
+       Quad* pl_quad = newQuad (e0, e1, e2, p_barre);
+       Quad* pr_quad = newQuad (e3, e4, e5, p_barre);
+
+       if (nz>0)
+          {
+                                 //   Cloison interieure
+          Quad* cloison = newQuad (p_barre, getEdgeK (nx0, 0,       nz-1), 
+                                   s_barre, getEdgeK (nx0, nydemi,  nz-1));
+                                 //   Hexas
+          Quad* q0 = getQuadJK (nx0, 0, nz-1);
+          Quad* q1 = getQuadJK (nx0, 1, nz-1);
+          Quad* q2 = getQuadJK (nx0, 2, nz-1);
+          Quad* q3 = getQuadJK (nx0, 3, nz-1);
+          Quad* q4 = getQuadJK (nx0, 4, nz-1);
+          Quad* q5 = getQuadJK (nx0, 5, nz-1);
+
+          Hexa* left  = newHexa (sl_quad, pl_quad, q0, q2,  q1, cloison);
+          Hexa* right = newHexa (sr_quad, pr_quad, q3, q5,  q4, cloison);
+          tab_hexa.push_back (left);
+          tab_hexa.push_back (right);
+          }
+       s_barre = p_barre;
+       sr_quad = pr_quad;
+       sl_quad = pl_quad;
+       }
+}
+// ====================================================== fillCenterOdd
+#undef  IndElt
+#define IndElt(nc,nz) (nbsecteurs*(nz) + nc)
+void Elements::fillCenterOdd ()
+{
+   int nx0 = 0;
+   int nbsecteurs = size_hy / 2;
+
+   vector <Edge*> ker_hedge (nbsecteurs*size_vz);
+   vector <Quad*> ker_hquad (nbsecteurs*size_vz);
+   vector <Quad*> ker_vquad (nbsecteurs*size_vz);
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Edges horizontaux radiaux
+       for (int nc=0 ; nc<nbsecteurs ; nc++)
+           {
+           int nc1 = size_hy - nc;
+           Edge* edge = newEdge (getVertexIJK (nx0, nc,  nz), 
+                                 getVertexIJK (nx0, nc1, nz));
+           ker_hedge [IndElt(nc,nz)] = edge;
+           }
+                                 //   Quads horizontaux
+       for (int nc=0; nc<nbsecteurs ; nc++)
+           {
+           Edge* e1 = ker_hedge [IndElt (nc, nz)];
+           Edge* e2 = getEdgeJ (nx0, nc,           nz);
+           Edge* e4 = getEdgeJ (nx0, size_hy-nc-1, nz);
+
+           Edge* e3 = nc<nbsecteurs-1 ? ker_hedge [IndElt (nc+1, nz)]
+                                      : getEdgeJ (nx0, nbsecteurs, nz);
+
+           ker_hquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+           if (debug()) 
+              {
+             printf ("hquad (%d,%d) = ", nc, nz);
+              ker_hquad [IndElt (nc,nz)]->dumpPlus();
+              }
+           }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          for (int nc=0 ; nc<nbsecteurs ; nc++)
+              {
+              int nc1 = size_hy - nc;
+              Edge* e1 = ker_hedge [IndElt (nc, nz)];
+              Edge* e3 = ker_hedge [IndElt (nc, nz-1)];
+              Edge* e2 = getEdgeK (nx0, nc,   nz-1);
+              Edge* e4 = getEdgeK (nx0, nc1,  nz-1);
+              ker_vquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+              if (debug()) 
+                 {
+                printf ("vquad (%d,%d) = ", nc, nz);
+                 ker_vquad [IndElt (nc,nz)]->dumpPlus();
+                 }
+              }
+                                 //   Hexas
+          for (int nc=0 ; nc < nbsecteurs ; nc++)
+              {
+              int nc1 = size_hy - nc-1;
+              Quad* qa = ker_hquad [IndElt (nc, nz-1)];
+              Quad* qb = ker_hquad [IndElt (nc, nz)];
+
+              Quad* qc = getQuadJK (nx0, nc,  nz-1);
+              Quad* qd = getQuadJK (nx0, nc1, nz-1);
+
+              Quad* qe = ker_vquad [IndElt (nc, nz)];
+              Quad* qf = nc<nbsecteurs-1 ? ker_vquad [IndElt (nc+1,  nz)]
+                                         : getQuadJK (nx0, nbsecteurs, nz-1);
+              if (debug()) 
+                 {
+                 printf (" --------------- Hexa : nc=%d, nz=%d\n", nc, nz);
+                HexDump (qa);
+                HexDump (qb);
+                HexDump (qc);
+                HexDump (qd);
+                HexDump (qe);
+                HexDump (qf);
+                 }
+              Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+              tab_hexa.push_back (cell);
+              }
+          }
+       }
+}
+// --------------------------------------------------------------------------
+// ----------------------------------------- Evols Hexa 3
+// --------------------------------------------------------------------------
+// ====================================================== makeCylindricalGrid
+// ==== Version avec vecteurs
+int Elements::makeCylindricalGrid (Vertex* orig, Vector* base, Vector* haut, 
+                            RealVector& tdr, RealVector& tda, RealVector& tdh, 
+                            bool fill)
+{
+   int nr = tdr.size() - 1;
+   int na = tda.size();
+   int nl = tdh.size();
+   double angle = 0;
+
+   for (int nro=0 ; nro<na ; nro++)
+       angle += tda[nro];
+
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = angle >= 360.0;
+
+   int ier = makeBasicCylinder (tdr, tda, tdh, fill);
+   if (ier!=HOK) 
+       return ier;
+
+   transfoVertices  (orig,  base, haut);
+
+   fillGrid ();
+   assoCylinders (orig, haut, angle, tda);
+   return HOK;
+}
+// ====================================================== makeBasicCylinder
+// ==== Version avec vecteurs
+int Elements::makeBasicCylinder (RealVector& tdr, RealVector& tda, 
+                                 RealVector& tdh, bool fill)
+{
+   int na = tda.size();
+
+   cyl_dispo = CYL_NOFILL;
+   if (fill && na > 3)
+      {
+      if (cyl_closed)
+         {
+         if (na==4)
+            cyl_dispo = CYL_CL4;
+        else if (na==6)
+            cyl_dispo = CYL_CL6;
+        else if (na MODULO 2 == 0)
+            cyl_dispo = CYL_CLOSED;
+         }
+      else if ((na MODULO 2)==0)
+         cyl_dispo = CYL_PEER;
+      else 
+         cyl_dispo = CYL_ODD;
+      }
+
+   cyl_fill = cyl_dispo != CYL_NOFILL;
+
+   double alpha  = 0;
+   int    nb_secteurs = cyl_closed ? size_vy-1 : size_vy;
+
+   for (int ny=0 ; ny<nb_secteurs ; ny++)
+       {
+       if (ny>0)
+          alpha  += tda[ny-1];
+
+       double theta     = M_PI*alpha/180;
+       double cos_theta = cos (theta);
+       double sin_theta = sin (theta);
+       double rayon = 0;
+
+       for (int nx=0 ; nx<size_vx ; nx++)
+           {
+           //  double rayon = dr*(nx+1);
+           rayon += tdr [nx];
+           double px = rayon*cos_theta;
+           double py = rayon*sin_theta;
+           double pz = 0;
+
+           for (int nz=0 ; nz<size_vz ; nz++)
+               {
+               if (nz > 0)
+                   pz += tdh [nz-1];
+               Vertex* node = el_root->addVertex (px, py, pz);
+               setVertex (node, nx, ny, nz);
+               }
+           }
+       }
+
+   if (cyl_closed) 
+      {
+      for (int nx=0 ; nx<size_vx ; nx++)
+          for (int nz=0 ; nz<size_vz ; nz++)
+              {
+              Vertex* node = getVertexIJK (nx, 0, nz);
+              setVertex (node, nx, size_vy-1, nz);
+              }
+      }
+                      // Les vertex centraux
+   if (cyl_fill) 
+      {
+      double pz = 0;
+      ker_vertex = nbr_vertex;
+      for (int nz=0 ; nz<size_vz ; nz++)
+          {
+          if (nz > 0)
+              pz += tdh [nz-1];
+          Vertex* node = el_root->addVertex (0, 0, pz);
+          tab_vertex.push_back (node);
+          nbr_vertex ++;
+          }
+      }
+
+   return HOK;
+}
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexElements_piq.cxx b/src/HEXABLOCK/HexElements_piq.cxx
new file mode 100755 (executable)
index 0000000..46bf4a9
--- /dev/null
@@ -0,0 +1,718 @@
+
+// C++ : Table d'hexaedres (Evol Versions 3)
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexDiagnostics.hxx"
+
+#include <cmath>
+#include <map>
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+// --------------------------------------------------------
+struct PatQuad
+{
+   int   q_edge [QUAD4];
+   Quad* refer;
+}; 
+// --------------------------------------------------------
+struct PatVertex
+{
+   double  v_x, v_y;
+   Vertex* refer;
+}; 
+// --------------------------------------------------------
+struct PatEdge
+{
+   int   v_amont, v_aval;
+   Edge* refer;
+   int   nbr_refer;
+}; 
+
+// --------------------------------------------------------
+class Pattern 
+{
+friend class Elements;
+public  :
+    int initialize (Vertex* v1, Vertex* v2, Vertex* v3);
+    int addQuad    (Quad* quad);
+    int verify     (int &nbed, int &nbver);
+
+private :
+    int addEdge   (Edge*   edge);
+    int addVertex (Vertex* vertex);
+
+private :
+   enum EnumProj { ProjXY, ProjYZ, ProjZX };
+
+   vector <PatVertex> pat_vertex;
+   vector <PatEdge  > pat_edge;
+   vector <PatQuad  > pat_quad;
+
+   int      nbr_vertex, nbr_edges, nbr_quads;
+   double   determinant;
+   EnumProj projection;
+   Real3    base_i, base_j, origine;
+
+   int pos_vertex4;
+   int pos_edge3, pos_edge4;
+};
+
+// ====================================================== initialize
+int Pattern::initialize (Vertex* v1, Vertex* v2, Vertex* v3)
+{
+   nbr_vertex  = nbr_edges = nbr_quads = 0;
+   projection  = ProjXY;
+   determinant = 1;
+   base_i[0]   = base_i[1] =  base_i[2] = 0; 
+   base_j[0]   = base_j[1] =  base_j[2] = 0; 
+
+   if (v1==NULL || v2==NULL || v3==NULL) 
+      return HERR;
+
+   addVertex (v1);
+   addVertex (v2);
+   addVertex (v3);
+   if (nbr_vertex!=3)
+      return HERR;
+
+   Document* doc = v1->dad ();
+   Edge* edc1  = doc->findEdge (v1, v2);
+   Edge* edc2  = doc->findEdge (v2, v3);
+   if (edc1==NULL || edc2==NULL)
+      return HERR;
+
+   addEdge (edc1);
+   addEdge (edc2);
+   if (nbr_edges!=2)
+      return HERR;
+
+   pat_edge[0].nbr_refer = pat_edge[1].nbr_refer = 0; 
+
+   pat_vertex[0].v_x = pat_vertex[1].v_x = 0;
+   pat_vertex[2].v_x = 1; 
+   pat_vertex[0].v_y = 1;
+   pat_vertex[1].v_y = pat_vertex[2].v_y = 0; 
+
+   Real3 pb, pc;
+   v1->getPoint (pc);
+   v2->getPoint (origine);
+   v3->getPoint (pb);
+
+   calc_vecteur (origine, pb, base_i);
+   calc_vecteur (origine, pc, base_j);
+
+   if (db)
+      {
+      PutCoord (origine);
+      PutCoord (base_i);
+      PutCoord (base_j);
+      PutData (determinant);
+      }
+
+/* ******************************
+ * AB = pu.vI + pv.vJ
+ * 
+ * vx = pu.vI[0] + pv.vJ[0]   (1) *+vJ[1] ) };
+ *
+ * (1 & 2 ) : pu =  (vx.vJ[1] - vy.vJ[0]) / detxy
+ *            pv = -(vx.vI[1] - vy.vI[0]) / detxy
+ *x
+ * (2 & 3 ) : pu =  (vy.vJ[2] - vz.vJ[1]) / detyz
+ *            pv = -(vy.vI[2] - vz.vI[1]) / detyz
+ *
+ * (3 & 1 ) : pu =  (vz.vJ[0] - vx.vJ[2]) / detzx
+ *            pv = -(vz.vI[0] - vx.vI[2]) / detzx
+ *
+ *  Les 3 systemes d'equations sont valides. 
+ *  On va choisir celui dont la valeur absolue du determinant est maximale
+   ****************************** */
+
+   double detxy = base_i[dir_x]*base_j[dir_y] - base_i[dir_y]*base_j[dir_x];
+   double detyz = base_i[dir_y]*base_j[dir_z] - base_i[dir_z]*base_j[dir_y];
+   double detzx = base_i[dir_z]*base_j[dir_x] - base_i[dir_x]*base_j[dir_z];
+
+   determinant = detxy;
+   projection  = ProjXY;
+
+   if (fabs (detyz) > fabs (determinant))
+      {
+      determinant = detyz;
+      projection  = ProjYZ;
+      }
+   if (fabs (detzx) > fabs (determinant))
+      {
+      determinant = detzx;
+      projection  = ProjZX;
+      }
+
+   return HOK;
+}
+// ====================================================== verify
+int Pattern::verify (int &nbed, int &nbver)
+{
+   nbed  = nbr_edges;
+   nbver = nbr_vertex;
+   pos_edge3 = pos_edge4 = pos_vertex4 = NOTHING;
+   
+   if (pat_edge[0].nbr_refer!=1 || pat_edge[1].nbr_refer!=1) 
+      return HERR;
+
+   for (int nro=2 ; nro<nbr_edges; nro++)
+       {
+       if (pat_edge[nro].nbr_refer==1)
+          {
+          int pv1 = pat_edge[nro].v_amont;
+          int pv2 = pat_edge[nro].v_aval;
+          
+          if (pv1==2)
+             {
+             pos_edge3   = nro;
+             if (pos_vertex4 == NOTHING)
+                 pos_vertex4 =  pv2;
+             else if (pos_vertex4 != pv2)
+                 {
+                 return HERR;
+                 }
+             }
+          else if (pv2==2)
+             {
+             pos_edge3   = nro;
+             if (pos_vertex4 == NOTHING)
+                 pos_vertex4 =  pv1;
+             else if (pos_vertex4 != pv1)
+                 {
+                 return HERR;
+                 }
+             }
+          else if (pv1==0)
+             {
+             pos_edge4   = nro;
+             if (pos_vertex4 == NOTHING)
+                 pos_vertex4 =  pv2;
+             else if (pos_vertex4 != pv2)
+                 {
+                 return HERR;
+                 }
+             }
+          else if (pv2==0)
+             {
+             pos_edge4   = nro;
+             if (pos_vertex4 == NOTHING)
+                 pos_vertex4 =  pv1;
+             else if (pos_vertex4 != pv1)
+                 {
+                 return HERR;
+                 }
+             }
+          }
+       }
+
+   if (pos_edge3==NOTHING || pos_edge4==NOTHING)
+      return HERR;
+
+   return HOK;
+}
+// ====================================================== addQuad
+int Pattern::addQuad (Quad* elt)
+{
+   if (elt==NULL)
+      return HERR;
+
+   PatQuad quad;
+   quad.refer = elt;
+   for (int nro=0; nro<QUAD4 ; nro++)
+       {
+       Edge* edge = elt->getEdge (nro);
+       quad.q_edge [nro] = addEdge (edge); 
+       }
+
+   pat_quad.push_back (quad);
+   nbr_quads++;
+   return HOK;
+}
+// ====================================================== addEdge
+int Pattern::addEdge (Edge* elt)
+{
+   for (int nro=0; nro<nbr_edges ; nro++)
+       {
+       if (elt==pat_edge [nro].refer)
+          {
+          pat_edge [nro].nbr_refer++;
+          return nro;
+          }
+       }
+
+   PatEdge edge;
+   edge.nbr_refer = 1;
+   edge.refer    = elt;
+   edge.v_amont  = addVertex (elt->getVertex (V_AMONT));
+   edge.v_aval   = addVertex (elt->getVertex (V_AVAL));
+
+   pat_edge.push_back (edge);
+   nbr_edges++;
+   return nbr_edges-1;
+}
+// ====================================================== addVertex
+int Pattern::addVertex (Vertex* elt)
+{
+   for (int nro=0; nro<nbr_vertex ; nro++)
+       {
+       if (elt==pat_vertex [nro].refer)
+          return nro;
+       }
+
+   PatVertex vertex;
+   vertex.refer = elt;
+   double vx = elt->getX() - origine [dir_x];
+   double vy = elt->getY() - origine [dir_y];
+   double vz = elt->getZ() - origine [dir_z];
+   switch (projection)
+      {
+      case ProjXY :  default :
+           vertex.v_x =  (vx*base_j[dir_y] - vy*base_j[dir_x]) / determinant;
+           vertex.v_y = -(vx*base_i[dir_y] - vy*base_i[dir_x]) / determinant;
+           break;
+
+      case ProjYZ : 
+           vertex.v_y =  (vy*base_j[dir_z] - vz*base_j[dir_y]) / determinant;
+           vertex.v_x = -(vy*base_i[dir_z] - vz*base_i[dir_y]) / determinant;
+           break;
+
+      case ProjZX : 
+           vertex.v_x =  (vz*base_j[dir_x] - vx*base_j[dir_z]) / determinant;
+           vertex.v_y = -(vz*base_i[dir_x] - vx*base_i[dir_z]) / determinant;
+           break;
+      }
+
+   if (db)
+      printf (" Vertex nro %d : (%g, %g, %g)\t -> (%g, %g)\n", 
+                        nbr_vertex, vx, vy, vz, vertex.v_x, vertex.v_y);
+   pat_vertex.push_back (vertex);
+   nbr_vertex++;
+   return nbr_vertex-1;
+}
+// -------------------------------------------------------------------
+// -------------------------------------------------------------------
+// -------------------------------------------------------------------
+// -------------------------------------------------------------------
+// ====================================================== replaceHexas 
+int Elements::replaceHexas (Quads& liste, Vertex* p1, Vertex* c1, 
+                            Vertex* p2, Vertex* c2, Vertex* p3, Vertex* c3)
+{
+    Edge* edp1  = el_root->findEdge (p1, p2);
+    Edge* edp2  = el_root->findEdge (p2, p3);
+    Edge* edc1  = el_root->findEdge (c1, c2);
+    Edge* edc2  = el_root->findEdge (c2, c3);
+
+    Quad* quadc = el_root->findQuad (c1, c3);
+
+    if (edp1==NULL || edp2==NULL || edc1==NULL || edc2==NULL || quadc==NULL)  
+       {
+       printf ("... Error in HexaBlock function \n");
+       printf ("... doc.replace (lquads, p1,c1, p2,c2, p3,c3)\n");
+       if (edp1==NULL)
+           printf ("Vertices p1 and p2 don't define an edge\n");
+       else if (edp2==NULL)
+           printf ("Vertices p2 and p3 don't define an edge\n");
+       else if (edc1==NULL)
+           printf ("Vertices c1 and c2 don't define an edge\n");
+       else if (edc2==NULL)
+           printf ("Vertices c2 and c3 don't define an edge\n");
+       else if (quadc==NULL)
+           printf ("Vertices c1 and c3 don't define a quad\n");
+       return HERR;
+       }
+
+    int np = quadc->getNbrParents ();
+    Hexa* hexac = quadc->getParent (0);
+
+    if (np!=1 || hexac==NULL)  
+       {
+       printf ("... Error in HexaBlock function \n");
+       printf ("... doc.replace (lquads, p1,c1, p2,c2, p3,c3)\n");
+       printf ("Quad (c1,c2,c3) is not an external quad\n");
+       return HERR;
+       }
+                              // Analyse du pattern
+    int nbquads = liste.size();
+    Pattern   pattern;
+    int ier = pattern.initialize (p1, p2, p3);
+    if (ier!=HOK)
+       {
+       printf ("... Error in HexaBlock function \n");
+       printf ("... doc.replace (lquads, p1,c1, p2,c2, p3,c3)\n");
+       printf ("Vertices (p1,p2,p3) don't define a virtual quad\n");
+       return HERR;
+       }
+
+    for (int nq=0 ; nq<nbquads ; nq++)
+        {
+        ier = pattern.addQuad (liste[nq]);
+        if (ier!=HOK)
+           {
+           printf ("... Error in HexaBlock function \n");
+           printf ("... doc.replace (lquads, p1,c1, p2,c2, p3,c3)\n");
+           printf ("Quad nr %d of the list is NULL\n", nq+1);
+           return HERR;
+           }
+        }
+    int nbv  = 0;
+    int nbed = 0;
+    int nbh  = 0;
+    ier = pattern.verify (nbed, nbv);
+    if (ier!=HOK)
+       {
+       printf ("... Error in HexaBlock function \n");
+       printf ("... doc.replace (lquads, p1,c1, p2,c2, p3,c3)\n");
+       printf ("Vertices (p1,p2,p3) don't define a virtual quad\n");
+       return HERR;
+       }
+                              // Analyse de la cible
+    Quads pil_quad;
+    Hexas pil_hexa;
+    pil_hexa.push_back (hexac);
+    pil_quad.push_back (quadc);
+    bool more = true;
+                              // Constitution de la pile des hexaedres
+    while (more)
+          {
+          nbh ++;
+          Quad* oppos = hexac->getOpposedQuad (quadc);
+          pil_quad.push_back (oppos);
+          more = oppos->getNbrParents() == 2;
+
+          if (more)
+             {
+             if (oppos->getParent (0)==hexac)
+                 hexac = oppos->getParent(1);
+             else
+                 hexac = oppos->getParent(0);
+             pil_hexa.push_back (hexac);
+             }
+          quadc = oppos;
+          }
+
+    resize (GR_REPLACE, nbquads, nbh, nbv, nbed);
+
+                // 1) Constitution des 4 coins de la cible
+                // 2) Quadriller la face du haut
+                // 3) Trouver les 4 coins de la face du bas
+                // 4) Quadriller la face du bas
+                // 6) Decouper l'hexaedre defini par ces 2 faces
+                // 7) S'il y a un hexaedre dessous goto 3) 
+
+    Vertex* tvert[QUAD4] = { c1, c2, c3, pil_quad[0]->getOpposVertex(c2) };
+    replaceQuad (1, &pattern, pil_quad[0], tvert);
+    for (int nh=1 ; nh<gr_hauteur ; nh++)
+        {
+        for (int nro=0 ; nro<QUAD4 ; nro++)
+            {
+            Edge*  edv  = pil_hexa[nh-1]->getPerpendicularEdge (pil_quad[nh-1],
+                                                                tvert[nro]);
+            tvert [nro] = edv ->opposedVertex(tvert[nro]);
+            }
+        replaceQuad (nh+1, &pattern, pil_quad[nh], tvert);
+        replaceHexa (nh,   &pattern, pil_hexa[nh-1]);
+        }
+
+    for (int nh=1 ; nh<=nbh ; nh++)
+        pil_quad[nh]->remove ();
+
+    extrudeQuad (&pattern);
+    replaceHexa (0, &pattern, NULL);
+    return HOK;
+}
+// ====================================================== repVertex 
+void Elements::repVertex (int nh, int nro, Vertex* elt)
+{
+   int addr = nh * pat_nbvertex + nro;
+   if (tab_vertex[addr] == NULL)
+       tab_vertex[addr]  = elt;
+}
+// ====================================================== repVertex 
+Vertex* Elements::repVertex (int nh, int nro, double px, double py, double pz)
+{
+   int addr = nh * pat_nbvertex + nro;
+
+   if (tab_vertex[addr] == NULL)
+       tab_vertex[addr] = el_root->addVertex (px, py, pz);
+
+   return tab_vertex[addr];
+}
+// ====================================================== repVertex 
+Vertex* Elements::repVertex (int nh, int nro)
+{
+   int addr = nh * pat_nbvertex + nro;
+   return tab_vertex[addr];
+}
+// ====================================================== repEdgeH 
+void Elements::repEdgeH (int nh, int nro, Edge* elt)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + nro;
+   if (tab_edge[addr] == NULL)
+       tab_edge[addr]  = elt;
+}
+// ====================================================== repEdgeH 
+Edge* Elements::repEdgeH (int nh, int nro, Vertex* v1, Vertex* v2)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + nro;
+   if (tab_edge[addr] == NULL)
+       tab_edge[addr]  = el_root->addEdge (v1, v2);
+   return tab_edge[addr];
+}
+// ====================================================== repEdgeH 
+Edge* Elements::repEdgeH (int nh, int nro)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + nro;
+   return tab_edge[addr];
+}
+// ====================================================== repEdgeV 
+void Elements::repEdgeV (int nh, int nro, Edge* elt)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + pat_nbedges + nro;
+   if (tab_edge[addr] == NULL)
+       tab_edge[addr]  = elt;
+}
+// ====================================================== repEdgeV 
+Edge* Elements::repEdgeV (int nh, int nro, Vertex* v1, Vertex* v2)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + pat_nbedges + nro;
+   if (tab_edge[addr] == NULL)
+       tab_edge[addr]  = el_root->addEdge (v1, v2);
+   return tab_edge[addr];
+}
+// ====================================================== repEdgeV 
+Edge* Elements::repEdgeV (int nh, int nro)
+{
+   int addr = nh * (pat_nbedges + pat_nbvertex) + pat_nbedges + nro;
+   return tab_edge[addr];
+}
+// ====================================================== repQuadH 
+void Elements::repQuadH (int nh, int nro, Quad* elt)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nro;
+   if (tab_quad[addr] == NULL)
+       tab_quad[addr]  = elt;
+}
+// ====================================================== repQuadH 
+Quad* Elements::repQuadH (int nh, int nro)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nro;
+   return tab_quad [addr];
+}
+// ====================================================== repQuadH 
+Quad* Elements::repQuadH (int nh, int nro, Edge* e1, Edge* e2, Edge* e3, 
+                                           Edge* e4)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nro;
+   if (tab_quad[addr] == NULL)
+       tab_quad[addr]  = el_root->addQuad (e1, e2, e3, e4);
+   return tab_quad [addr];
+}
+// ====================================================== repQuadV 
+void Elements::repQuadV (int nh, int nro, Quad* elt)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nbr_orig + nro;
+   if (tab_quad[addr] == NULL)
+       tab_quad[addr]  = elt;
+}
+// ====================================================== repQuadV 
+Quad* Elements::repQuadV (int nh, int nro)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nbr_orig + nro;
+   return tab_quad [addr];
+}
+// ====================================================== repQuadV 
+Quad* Elements::repQuadV (int nh, int nro, Edge* e1, Edge* e2, Edge* e3, 
+                                           Edge* e4)
+{
+   int addr = nh * (nbr_orig + pat_nbedges) + nbr_orig + nro;
+   if (tab_quad[addr] == NULL)
+       tab_quad[addr]  = el_root->addQuad (e1, e2, e3, e4);
+   return tab_quad [addr];
+}
+// ====================================================== repHexa 
+Hexa* Elements::repHexa (int nh, int nro, Quad* qa, Quad* qb, Quad* qc, 
+                                          Quad* qd, Quad* qe, Quad* qf)
+{
+   int addr = nh * nbr_orig  + nro;
+   if (tab_hexa[addr] == NULL)
+       tab_hexa[addr]  = el_root->addHexa (qa, qb, qc, qd, qe, qf);
+   return tab_hexa [addr];
+}
+// ====================================================== replaceQuad 
+// ==== Creation des quads horizontaux
+int Elements::replaceQuad (int nh, Pattern* pat, Quad* quad, Vertex* tvert[])
+{
+   Vertex* pvert[QUAD4] = { tvert[0],  tvert[1],  tvert[2],  tvert[3] };
+
+   int vnro [4] = { 0, 1, 2, pat->pos_vertex4};
+   int ednro[4] = { 0, 1, pat->pos_edge3, pat->pos_edge4 };
+
+                              // Enregistrement des vertex & edges existant
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       Vertex* vh    = pvert [nro];
+       Vertex* vh1   = pvert [(nro+1) MODULO QUAD4];
+       Edge*   edh   = quad->findEdge (vh, vh1);
+
+       repVertex (nh,   vnro  [nro], vh);
+       repEdgeH  (nh,   ednro [nro], edh);
+       }
+
+   Real3 orig, ib, jb, pb, pc;
+                              // Creation des vertex
+   tvert[0]->getPoint (pc);
+   tvert[1]->getPoint (orig);
+   tvert[2]->getPoint (pb);
+   calc_vecteur (orig, pb, ib);
+   calc_vecteur (orig, pc, jb);
+
+   for (int nro=0 ; nro<pat->nbr_vertex ; nro++)
+       {
+       double lambda = pat->pat_vertex [nro].v_x;
+       double mu     = pat->pat_vertex [nro].v_y;
+       double px = orig[dir_x] + lambda*ib[dir_x] + mu*jb[dir_x];
+       double py = orig[dir_y] + lambda*ib[dir_y] + mu*jb[dir_y];
+       double pz = orig[dir_z] + lambda*ib[dir_z] + mu*jb[dir_z];
+       repVertex (nh, nro, px, py, pz);
+       }
+                              // Creation des edges horizontaux
+   for (int nro=0 ; nro<pat->nbr_edges ; nro++)
+       {
+       int nv1 = pat->pat_edge [nro].v_amont;
+       int nv2 = pat->pat_edge [nro].v_aval;
+       Vertex* v1 = repVertex (nh, nv1);
+       Vertex* v2 = repVertex (nh, nv2);
+       repEdgeH (nh, nro, v1, v2);
+       }
+                              // Creation des quads horizontaux
+   for (int nro=0 ; nro<pat->nbr_quads ; nro++)
+       {
+       Edge* eda = repEdgeH (nh, pat->pat_quad [nro].q_edge [0]);
+       Edge* edb = repEdgeH (nh, pat->pat_quad [nro].q_edge [1]);
+       Edge* edc = repEdgeH (nh, pat->pat_quad [nro].q_edge [2]);
+       Edge* edd = repEdgeH (nh, pat->pat_quad [nro].q_edge [3]);
+
+       repQuadH (nh,  nro, eda, edb, edc, edd);
+       }
+   return HOK;
+}
+// ====================================================== extrudeQuad 
+// ==== Creation des quads horizontaux
+int Elements::extrudeQuad (Pattern* pat)
+{
+                              // Creation des vertex de niveau 0
+   for (int nro=0 ; nro<pat->nbr_vertex ; nro++)
+       {
+       Vertex* v1 = repVertex (1, nro);
+       Vertex* v2 = repVertex (2, nro);
+       double px = 2*v1->getX() - v2->getX();
+       double py = 2*v1->getY() - v2->getY();
+       double pz = 2*v1->getZ() - v2->getZ();
+       repVertex (0, nro, px, py, pz);
+       }
+                              // Creation des edges horizontaux
+   for (int nro=0 ; nro<pat->nbr_edges ; nro++)
+       {
+       int nv1 = pat->pat_edge [nro].v_amont;
+       int nv2 = pat->pat_edge [nro].v_aval;
+       Vertex* v1 = repVertex (0, nv1);
+       Vertex* v2 = repVertex (0, nv2);
+       repEdgeH (0, nro, v1, v2);
+       }
+                              // Creation des quads horizontaux
+   for (int nro=0 ; nro<pat->nbr_quads ; nro++)
+       {
+       Edge* eda = repEdgeH (0, pat->pat_quad [nro].q_edge [0]);
+       Edge* edb = repEdgeH (0, pat->pat_quad [nro].q_edge [1]);
+       Edge* edc = repEdgeH (0, pat->pat_quad [nro].q_edge [2]);
+       Edge* edd = repEdgeH (0, pat->pat_quad [nro].q_edge [3]);
+
+       repQuadH (0,  nro, eda, edb, edc, edd);
+       }
+   return HOK;
+}
+// ====================================================== replaceHexa 
+int Elements::replaceHexa (int nh, Pattern* pat, Hexa* hexa)
+{
+   int vnro [4] = { 0, 1, 2, pat->pos_vertex4};
+   int ednro[4] = { 0, 1, pat->pos_edge3, pat->pos_edge4 };
+
+                              // Enregistrement des edges & quads existants
+   if (hexa!=NULL)
+       {
+       for (int nro=0 ; nro<QUAD4 ; nro++)
+           {
+           Vertex* vh  = repVertex (nh,   vnro [nro]);
+           Vertex* vh1 = repVertex (nh+1, vnro [nro]);
+           Edge*   edv = hexa->findEdge (vh, vh1);
+           repEdgeV (nh, vnro [nro], edv);
+
+           Edge*   edh   = repEdgeH (nh,   ednro [nro]);
+           Edge*   edh1  = repEdgeH (nh+1, ednro [nro]);
+           Quad*   quadv = hexa->findQuad (edh, edh1);
+           repQuadV (nh, ednro [nro], quadv);
+           }
+       }
+                              // Creation des edges verticaux
+   for (int nro=0 ; nro<pat->nbr_vertex ; nro++)
+       {
+       Vertex* v1 = repVertex (nh,   nro);
+       Vertex* v2 = repVertex (nh+1, nro);
+       repEdgeV (nh, nro, v1, v2); 
+       }
+                              // Creation des quads verticaux
+   for (int nro=0 ; nro<pat->nbr_edges ; nro++)
+       {
+       int nv1 = pat->pat_edge [nro].v_amont;
+       int nv2 = pat->pat_edge [nro].v_aval;
+
+       Edge* eda = repEdgeH (nh,   nro);
+       Edge* edb = repEdgeV (nh,   nv1);
+       Edge* edc = repEdgeH (nh+1, nro);
+       Edge* edd = repEdgeV (nh,   nv2);
+       repQuadV (nh,  nro, eda, edb, edc, edd);
+       }
+                              // Creation des hexaedres
+   for (int nro=0 ; nro<pat->nbr_quads ; nro++)
+       {
+       Quad* qa = repQuadH (nh,   nro);
+       Quad* qb = repQuadH (nh+1, nro);
+       Quad* qc = repQuadV (nh, pat->pat_quad [nro].q_edge [0]);
+       Quad* qd = repQuadV (nh, pat->pat_quad [nro].q_edge [2]);
+       Quad* qe = repQuadV (nh, pat->pat_quad [nro].q_edge [1]);
+       Quad* qf = repQuadV (nh, pat->pat_quad [nro].q_edge [3]);
+       repHexa (nh, nro, qa, qb, qc, qd, qe, qf);
+       }
+
+   return HOK;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexElements_ter.cxx b/src/HEXABLOCK/HexElements_ter.cxx
new file mode 100755 (executable)
index 0000000..a56e79e
--- /dev/null
@@ -0,0 +1,591 @@
+
+// C++ : Table d'hexaedres (Evol Versions 3)
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexHexa.hxx"
+#include "HexMatrix.hxx"
+#include "HexShape.hxx"
+#include "HexGlobale.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+void geom_create_circle (double* milieu, double rayon, double* normale, 
+                         double* base, string& brep);
+void geom_create_sphere (double* milieu, double radius, string& brep);
+
+void translate_brep  (string& brep, double vdir[], string& trep);
+void transfo_brep  (string& brep, Matrix* matrice, string& trep);
+void geom_asso_point (Vertex* node);
+
+static bool db=false;
+
+// ====================================================== makeRind
+int Elements::makeRind (EnumGrid type, Vertex* center, Vector* vx, Vector* vz, 
+                        double radext, double radint, double radhole, 
+                       Vertex* plorig, double angle, int nr, int na, int nl)
+{
+   double phi1;
+   int ier = controlRind (type, center, vx, vz, radext, radint, radhole,
+                          plorig, angle, nr, na, nl, cyl_phi0, phi1);
+   if (ier!=HOK)
+      return ier;
+
+   resize (type, nr, na, nl);
+
+   cyl_radext  = radext;
+   cyl_radint  = radint;
+   cyl_radhole = radhole;
+   cyl_closed  = type==GR_HEMISPHERIC || type==GR_RIND;
+
+   double theta  = cyl_closed ? 2*M_PI : M_PI*angle/180;
+   cyl_dphi      = (phi1-cyl_phi0)/ size_hz;
+   cyl_dtheta    = theta / size_hy;
+
+   int nb_secteurs = cyl_closed ? size_vy-1 : size_vy;
+
+   for (int ny=0 ; ny<nb_secteurs ; ny++)
+       for (int nx=0 ; nx<size_vx ; nx++)
+           for (int nz=0 ; nz<size_vz ; nz++)
+               {
+               double px, py, pz;
+               getCylPoint (nx, ny, nz, px, py, pz);
+               Vertex* node = el_root->addVertex (px, py, pz);
+               setVertex (node, nx, ny, nz);
+               }
+   if (cyl_closed) 
+      for (int nx=0 ; nx<size_vx ; nx++)
+          for (int nz=0 ; nz<size_vz ; nz++)
+              {
+              Vertex* node = getVertexIJK (nx, 0, nz);
+              setVertex (node, nx, size_vy-1, nz);
+              }
+
+   transfoVertices (center, vx, vz);
+   fillGrid ();
+   assoCylinder (center, vz, angle);
+   return HOK;
+}
+// ====================================================== getCylPoint 
+int Elements::getCylPoint (int nr, int na, int nh, double& px, double& py,  
+                           double& pz)
+{
+   if (grid_type == GR_CYLINDRIC)
+      {
+      px = cyl_radext * cos (na*cyl_dtheta);
+      py = cyl_radext * sin (na*cyl_dtheta);
+      pz = cyl_length * nh;
+      return HOK;
+      }
+
+   bool   rind   = (grid_type == GR_RIND || grid_type == GR_PART_RIND);
+   double sinphi = sin (cyl_phi0 + nh*cyl_dphi);
+   double cosphi = cos (cyl_phi0 + nh*cyl_dphi);
+
+   double rayon = 0;
+   if (rind)
+      {
+      rayon = cyl_radint + nr*(cyl_radext-cyl_radint)/size_hx;
+      pz    = rayon*sinphi;
+      rayon = rayon*cosphi;
+      }
+   else
+      {
+      pz    = cyl_radext*sinphi;
+      rayon = cyl_radhole + nr*(cyl_radext*cosphi - cyl_radhole)/size_hx;
+      rayon = std::max (cyl_radhole, rayon);
+      }
+
+   px = rayon * cos (na*cyl_dtheta);
+   py = rayon * sin (na*cyl_dtheta);
+
+   return HOK;
+}
+// ====================================================== controlRind 
+int Elements::controlRind (EnumGrid type, Vertex* cx, Vector* vx, Vector* vz, 
+                           double rext, double rint, double rhole,
+                           Vertex* px, double angle, 
+                           int nrad, int nang, int nhaut, 
+                           double &phi0, double &phi1)
+{
+   const double Epsil1 = 1e-6;
+   phi0  = phi1 = 0;
+
+   if (cx == NULL || vx == NULL || vz == NULL) 
+      return HERR;
+
+   if (nrad<=0 || nang<=0 || nhaut<=0)
+      return HERR;
+
+   if (rext <= 0.0) 
+      return HERR;
+
+   if (rint >= rext) 
+      return HERR;
+
+   if (rhole > rint) 
+      return HERR;
+
+   double nvx = vx->getNorm();
+   double nvz = vz->getNorm();
+
+   if (nvx < Epsil1 || nvz <  Epsil1) 
+      return HERR;
+
+   double alpha = asin (rhole/rext);
+   double beta  = -M_PI*DEMI;
+   if (type==GR_HEMISPHERIC || type==GR_PART_SPHERIC) 
+       alpha = 2*alpha;
+
+   if (px!=NULL)
+      {
+          // oh = oa.n/|n|
+      double oh = ((px->getX() - cx->getX()) * vz->getDx()
+                +  (px->getY() - cx->getY()) * vz->getDy()
+                +  (px->getZ() - cx->getZ()) * vz->getDz()) / nvz;
+      if (oh > rext) 
+         return HERR;
+      else if (oh > -rext) 
+         beta  = asin (oh/rext);
+      }
+
+   phi0 = std::max (alpha - M_PI*DEMI, beta);
+   phi1 = M_PI*DEMI - alpha;
+   return HOK; 
+}
+// ====================================================== getHexas 
+int Elements::getHexas (Hexas& liste)
+{
+   liste.clear ();
+   for (int nro = 0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa [nro];
+       if (cell!=NULL && cell->isValid())
+          liste.push_back (cell);
+       }
+   return HOK;
+}
+// ====================================================== assoCylinder 
+void Elements::assoCylinder (Vertex* ori, Vector* normal, double angle)
+{
+   RealVector tangles;
+   assoCylinders (ori, normal, angle, tangles);
+}
+// ====================================================== assoCylinders 
+void Elements::assoCylinders (Vertex* ori, Vector* normal, double angle, 
+                              RealVector& t_angles)
+{
+   int    na      = t_angles.size();
+   bool   regul   = na == 0;
+   double alpha   = angle/size_hy;
+
+   string brep;
+   Real3 vk = { normal->getDx(), normal->getDy(), normal->getDz() };
+   normer_vecteur (vk);
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+       for (int nx=0 ; nx<size_vx ; nx++)
+           {
+           Vertex* pm = getVertexIJK (nx, 0, nz); 
+           Real3   om = { pm->getX() - ori->getX(), 
+                          pm->getY() - ori->getY(), 
+                          pm->getZ() - ori->getZ() };
+
+           double oh     = prod_scalaire (om, vk);
+           double rayon  = 0;
+           Real3  ph, hm;
+           for (int dd=dir_x; dd<=dir_z ; dd++)
+               {
+               ph [dd] = ori->getCoord(dd) + oh*vk[dd]; 
+               hm [dd] = pm ->getCoord(dd) - ph[dd];
+               rayon  += hm[dd] * hm[dd];
+               }
+
+           rayon = sqrt (rayon);
+           geom_create_circle (ph, rayon, vk, hm, brep);
+
+           double  pmax = 0;
+           for (int ny=0 ; ny<size_hy ; ny++)
+               {
+               double beta  = regul ? alpha : t_angles [ny]; 
+               double pmin = pmax;
+               pmax  += beta/360;
+               Edge* edge   =  getEdgeJ  (nx, ny, nz);
+               Shape* shape = new Shape (brep);
+               shape-> setBounds (pmin, pmax);
+               edge->addAssociation (shape);
+               }
+           }
+       }
+   
+   // Association automatique des vertex non associes -> bph
+   // Traitement des faces spheriques
+
+   Real3 vi = { -vk[dir_x],  -vk[dir_y],  -vk[dir_z] };
+   Real3 po = { ori->getX(), ori->getY(), ori->getZ() };
+
+   switch (grid_type)
+      {
+      case GR_HEMISPHERIC  :    // Pour l'exterieur
+      case GR_PART_SPHERIC :
+           assoRind (po, vi, size_vx-1);
+           break;
+      case GR_PART_RIND    :    // Exterieur + interieur
+      case GR_RIND         :
+           assoRind (po, vi, 0);
+           assoRind (po, vi, size_vx-1);
+           break;
+      default :
+           break;
+      }
+   assoResiduelle ();  // Association des sommets residuels
+}
+// ====================================================== assoRind 
+// Association des meridiennes
+// Creation sphere geometrique + association faces
+void Elements::assoRind (double* ori, double* vi, int nx)
+{
+   Real3  vk;
+   Edges  contour;
+   string c_brep, s_brep;
+   Shape  shape (c_brep);
+   Shapes t_shape;
+   t_shape.push_back (&shape);
+
+   double radius = nx==0 ? cyl_radint : cyl_radext;
+   double paramin = (cyl_phi0 + M_PI/2) / (2*M_PI);
+   double paramax = paramin + size_hz*cyl_dphi/(2*M_PI);
+
+   paramin = std::max (paramin, 0.0);
+   paramax = std::min (paramax, 1.0);
+   geom_create_sphere (ori, radius, s_brep);
+
+   int nz1 = size_vz/2;
+   int nb_secteurs = cyl_closed ? size_vy-1 : size_vy;
+
+   for (int ny=0 ; ny<nb_secteurs ; ny++)
+       {
+       Vertex* pm = getVertexIJK (nx, ny, nz1); 
+       Real3   vj = { pm->getX(), pm->getY(), pm->getZ() };
+       prod_vectoriel (vi, vj, vk);
+       double rayon = cyl_radint + nx*(cyl_radext-cyl_radint)/size_hx;
+       geom_create_circle (ori, rayon, vk, vi, c_brep);
+       shape.setBrep   (c_brep);
+       shape.setBounds (paramin, paramax);
+       contour.clear ();
+
+       for (int nz=0 ; nz<size_hz ; nz++)
+           {
+           contour.push_back (getEdgeK  (nx, ny, nz));
+           Quad* quad = getQuadJK (nx, ny, nz);
+           if (quad != NULL)
+              {
+              Shape* sshape = new Shape (s_brep);
+              quad->addAssociation (sshape);
+              }
+           }
+       cutAssociation (t_shape, contour, false);
+       }
+}
+// ====================================================== assoCircle 
+// ==== utilise pour les spheres carrees
+void Elements::assoCircle (double* center, Edge* ed1, Edge* ed2)
+{
+   Real3 oa,  ob, normal;
+   Real3 pta, ptb, ptc, ptd;
+   string brep;
+
+//  Les 2 edges dont les petits cotes d'un rectangle de rapport L/l=sqrt(2)
+//  Soit le cercle circonscrit a ce rectangle. 
+//    * la largeur est balayee par l'angle alpha
+//    * la longueur par l'angle beta = pi -alpha
+
+   ed1->getVertex(V_AMONT)->getPoint (pta);
+   ed1->getVertex(V_AVAL )->getPoint (ptb);
+   ed2->getVertex(V_AMONT)->getPoint (ptc);
+   ed2->getVertex(V_AVAL )->getPoint (ptd);
+
+   double d1 = calc_distance (pta, ptc);
+   double d2 = calc_distance (pta, ptd);
+
+   if (d1 < d2)
+      {
+      ed2->getVertex(V_AMONT)->getPoint (ptd);
+      ed2->getVertex(V_AVAL )->getPoint (ptc);
+      }
+
+   calc_vecteur   (center, pta, oa);
+   calc_vecteur   (center, ptb, ob);
+   prod_vectoriel (oa, ob, normal);
+   double rayon = calc_norme (oa);
+
+   geom_create_circle (center, rayon, normal, oa, brep);
+
+   Shape* asso1 = new Shape (brep);
+   Shape* asso2 = new Shape (brep);
+
+   const double alpha = atan (sqrt(2)/2)/M_PI; //  angle proche de 70.528 degres
+   asso1->setBounds (0,   alpha);
+   asso2->setBounds (0.5, alpha + 0.5);
+
+   ed1->addAssociation (asso1);
+   ed2->addAssociation (asso2);
+}
+// ====================================================== assoSphere 
+void Elements::assoSphere (Vertex* ori, Edge* t_edge[], Quad* t_quad[])
+{
+   Real3 center, sommet;
+   ori->getPoint(center);
+
+   assoCircle (center, t_edge [E_AC], t_edge [E_BD]);
+   assoCircle (center, t_edge [E_AD], t_edge [E_BC]);
+   assoCircle (center, t_edge [E_AE], t_edge [E_BF]);
+   assoCircle (center, t_edge [E_AF], t_edge [E_BE]);
+   assoCircle (center, t_edge [E_CE], t_edge [E_DF]);
+   assoCircle (center, t_edge [E_CF], t_edge [E_DE]);
+
+   t_edge[E_AC]->getVertex(V_AMONT)->getPoint (sommet);
+   double radius = calc_distance (center, sommet);;
+
+   string brep;
+   geom_create_sphere (center, radius, brep);
+
+   for (int nf=0 ; nf < HQ_MAXI ; nf++)
+       {
+       Shape* shape = new Shape (brep);
+       t_quad [nf]->addAssociation (shape);
+       }
+
+   assoResiduelle ();  // Association des sommets residuels
+}
+// ====================================================== makeSphericalGrid
+int Elements::makeSphericalGrid (Vertex* c, double rayon, int nb, double  k)
+{
+   resize (GR_SPHERIC, nb);
+
+   if (nb<0) 
+      return HERR;
+   else if (rayon <=ZEROR)
+      return HERR;
+
+   Vertex* i_node [HV_MAXI];    // Les noeuds de l'hexa englobant
+   Edge*   i_edge [HE_MAXI];    // Les noeuds de l'hexa englobant
+   Quad*   i_quad [HQ_MAXI];    // Les noeuds de l'hexa englobant
+
+   for (int nro=0 ; nro<HV_MAXI; nro++)
+       {
+       double dx = glob->CoordVertex (nro, dir_x) * rayon;
+       double dy = glob->CoordVertex (nro, dir_y) * rayon;
+       double dz = glob->CoordVertex (nro, dir_z) * rayon;
+
+       i_node [nro] = el_root->addVertex (c->getX ()+dx, c->getY ()+dy, 
+                                          c->getZ ()+dz);
+       }
+
+   for (int nro=0 ; nro<HE_MAXI; nro++)
+       {
+       int v1 = glob->EdgeVertex (nro, V_AMONT);
+       int v2 = glob->EdgeVertex (nro, V_AVAL);
+       i_edge[nro] = newEdge (i_node[v1], i_node[v2]);
+
+       if (db)
+          {
+          char nm0[8], nm1 [8], nm2 [8];
+          printf (" %2d : %s = %s = [%s, %s] = [%d,%d] = [%s,%s]\n", nro, 
+                 glob->namofHexaEdge(nro), i_edge[nro]->getName(nm0), 
+                 glob->namofHexaVertex(v1), glob->namofHexaVertex(v2), v1, v2,
+                 i_node[v1]->getName(nm1), i_node[v2]->getName(nm2));
+          }
+       }
+        
+   for (int nro=0 ; nro<HQ_MAXI; nro++)
+       i_quad[nro] = newQuad (i_edge[glob->QuadEdge (nro, E_A)], 
+                              i_edge[glob->QuadEdge (nro, E_B)], 
+                              i_edge[glob->QuadEdge (nro, E_C)], 
+                              i_edge[glob->QuadEdge (nro, E_D)]);
+
+   tab_hexa.push_back (newHexa (i_quad[Q_A], i_quad[Q_B], i_quad[Q_C], 
+                                i_quad[Q_D], i_quad[Q_E], i_quad[Q_F]));
+   double lambda  = 1;
+   double dcell   = 1;
+   for (int niv=0; niv<gr_rayon ; niv++)
+       {
+       double lambda0 = lambda;
+       dcell  *= k;
+       lambda += dcell;
+       addStrate (i_quad, i_edge, i_node, c,  lambda/lambda0);
+       }
+       
+   assoSphere (c, i_edge, i_quad);
+   return HOK;
+}
+// ==================================================== propagateAssociation
+int Elements::propagateAssociation (Edge* orig, Edge* dest, Edge* dir)
+{
+   if (revo_lution || orig==NULL || dest==NULL || dir==NULL)
+      return HERR;
+
+   const Shapes& tab_shapes = orig->getAssociations ();
+   const Shapes& tab_dest   = dest->getAssociations ();
+   int   nbdest             = tab_dest.size();
+   int   nbshapes           = tab_shapes.size();
+   bool  on_edge            = nbshapes!=0 && nbdest==0;
+
+   Vertex* vo1 = orig->commonVertex  (dir);
+   Vertex* vd1 = dest->commonVertex  (dir);
+   Vertex* vo2 = orig->opposedVertex (vo1);
+   Vertex* vd2 = dest->opposedVertex (vd1);
+
+   if (vo1==NULL || vd1==NULL)
+      return HERR;
+
+   string  trep;
+   Real3   pa, pb, vdir1, vdir2;
+   calc_vecteur (vo1->getPoint (pa), vd1->getPoint (pb), vdir1);
+   calc_vecteur (vo2->getPoint (pa), vd2->getPoint (pb), vdir2);
+
+   double dd = calc_distance (vdir1, vdir2);
+   bool para = dd < 1.0e-3;
+
+   if (para && on_edge)
+      {
+      for (int nro=0 ; nro<nbshapes ; nro++)
+          {
+          Shape* shape  = tab_shapes[nro];
+          if (shape!=NULL)
+             {
+             string brep   = shape->getBrep();
+             translate_brep (brep, vdir1, trep);
+             Shape* tshape = new Shape (trep);
+             tshape->setBounds (shape->debut, shape->fin);
+             dest->addAssociation (tshape);
+             }
+          }
+      }
+
+   double* vdir = vdir1;
+   for (int nro=V_AMONT ; nro<=V_AVAL ; nro++)
+       {
+       Shape* shape = vo1->getAssociation ();
+       if (shape!=NULL && vd1->getAssociation ()==NULL)
+          {
+          string brep   = shape->getBrep();
+          translate_brep (brep, vdir, trep);
+          Shape* tshape = new Shape (trep);
+          vd1->setAssociation (tshape);
+          }
+       vo1  = vo2;
+       vd1  = vd2;
+       vdir = vdir2;
+       }
+
+   return HOK;
+}
+// ==================================================== prismAssociation
+int Elements::prismAssociation (Edge* orig, Edge* dest, int nh, Edge* dir)
+{
+   if (orig==NULL || dest==NULL || dir==NULL)
+      return HERR;
+
+   updateMatrix (nh);
+   const Shapes& tab_shapes = orig->getAssociations ();
+   const Shapes& tab_dest   = dest->getAssociations ();
+   int   nbdest             = tab_dest.size();
+   int   nbshapes           = tab_shapes.size();
+   bool  on_edge            = nbshapes>0 && nbdest==0;
+
+   Vertex* vo1 = orig->commonVertex (dir);
+   Vertex* vd1 = dest->commonVertex (dir);
+
+   if (vo1==NULL || vd1==NULL)
+      return HERR;
+
+   string  trep;
+   Real3   porig, pdest, vdir;
+   vo1->getPoint (porig);
+   vd1->getPoint (pdest);
+   calc_vecteur  (porig, pdest, vdir);
+    
+   if (on_edge)
+      {
+      for (int nro=0 ; nro<nbshapes ; nro++)
+          {
+          Shape* shape  = tab_shapes[nro];
+          if (shape!=NULL)
+             {
+             string brep   = shape->getBrep();
+             //   translate_brep (brep, vdir, trep);
+             transfo_brep (brep, &gen_matrix, trep);
+             Shape* tshape = new Shape (trep);
+             tshape->setBounds (shape->debut, shape->fin);
+             dest->addAssociation (tshape);
+             }
+          }
+      }
+
+   for (int nro=V_AMONT ; nro<=V_AVAL ; nro++)
+       {
+       Shape* shape = vo1->getAssociation ();
+       if (shape!=NULL && vd1->getAssociation ()==NULL)
+          {
+          string brep   = shape->getBrep();
+          //  translate_brep (brep, vdir, trep);
+          transfo_brep (brep, &gen_matrix, trep);
+          Shape* tshape = new Shape (trep);
+          vd1->setAssociation (tshape);
+          }
+       vo1 = orig->opposedVertex (vo1);
+       vd1 = dest->opposedVertex (vd1);
+       }
+   return HOK;
+}
+// ====================================================== assoResiduelle
+void Elements::assoResiduelle ()
+{
+   int nbre = tab_vertex.size();
+   for (int nv=0 ; nv<nbre ; nv++)
+       {
+       geom_asso_point (tab_vertex [nv]);
+       }
+}
+// ====================================================== moveDisco
+void Elements::moveDisco (Hexa* hexa)
+{
+   Real3  center;
+   Matrix matrix;
+   hexa->getCenter (center);
+   matrix.defScale (center, 0.55);
+
+   int nbre = tab_vertex.size();
+   for (int nv=0 ; nv<nbre ; nv++)
+       {
+       matrix.perform (tab_vertex [nv]);
+       }
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexEltBase.cxx b/src/HEXABLOCK/HexEltBase.cxx
new file mode 100755 (executable)
index 0000000..d77aa8b
--- /dev/null
@@ -0,0 +1,168 @@
+
+// C++ : Element de base 
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexEltBase.hxx"
+#include "HexDocument.hxx"
+#include "HexDiagnostics.hxx"
+
+BEGIN_NAMESPACE_HEXA
+// =================================================== Constructeur
+EltBase::EltBase (Document* doc, EnumElt type)
+{
+   el_root   = doc;
+   el_type   = type;
+   el_id     = el_root->doc_nbr_elt [type];
+
+   el_next   = NULL;
+   el_assoc  = NULL;
+   el_status = HOK;
+   el_mark   = 0;
+
+   el_root->doc_nbr_elt  [type] ++;
+   el_root->doc_last_elt [type] -> el_next = this;
+   el_root->doc_last_elt [type] = this;
+   el_root->setDeprecated (1);
+
+   // EL_NONE, EL_VERTEX, EL_EDGE, EL_QUAD, EL_HEXA, EL_REMOVED
+   char buffer [16];
+   sprintf (buffer, "%c%04d", ABR_TYPES[el_type], el_id);
+   el_name = buffer;
+}
+// =================================================== Destructeur
+EltBase::~EltBase ()
+{
+   //  printf (" delete ");
+   //  dump ();
+}
+// =================================================== Constructeur Bis
+// Utilise uniquement dans le constructeur de Document
+// Creation d'un premier element fictif pour accelerer les chainages
+EltBase::EltBase (EnumElt type)
+{
+   el_root   = NULL;
+   el_type   = type;
+   el_id     = -1;
+
+   el_next   = NULL;
+   el_status = HOK;
+   el_mark   = 0;
+}
+// =================================================== remove
+void EltBase::remove ()
+{
+   if (el_type == EL_REMOVED)
+      return;
+
+   el_root->setDeprecated (2);
+   el_type = EL_REMOVED;
+   int nbp = el_parent.size();
+   for (int nro=0 ; nro<nbp ; nro++)
+       {
+       EltBase* elt = el_parent[nro];
+       if (elt != NULL && elt->isHere())
+          elt->remove ();
+       }          
+}
+// =================================================== suppress
+void EltBase::suppress ()
+{
+   if (el_type == EL_REMOVED)
+      return;
+
+   el_root->setDeprecated (2);
+   el_type = EL_REMOVED;
+}
+// ========================================================= replaceAssociation 
+void EltBase::replaceAssociation (EltBase* orig)
+{
+   if (   orig == NULL || orig->el_assoc == NULL
+       || orig == this || orig->el_assoc == el_assoc)
+      return;
+
+   if (el_assoc==NULL)
+      el_assoc = orig->el_assoc;
+   else 
+      el_root->hputError (W_REPL_ASSOC, this, orig);
+}
+// ========================================================= copyAssociation 
+void EltBase::copyAssociation (EltBase* orig)
+{
+   if (   orig == NULL || orig->el_assoc == NULL
+       || orig == this || orig->el_assoc == el_assoc)
+      return;
+
+   el_assoc = orig->el_assoc;
+   el_root->hputError (W_DISCO_ASSOC, orig);
+}
+// ========================================================= getName 
+cpchar EltBase::getName  ()
+{
+   return el_name.c_str() ;
+}
+// ========================================================= getName 
+char* EltBase::getName  (pchar buffer)
+{
+// EL_NONE, EL_VERTEX, EL_EDGE, EL_QUAD, EL_HEXA, EL_REMOVED
+   sprintf (buffer, "%c%04d", ABR_TYPES[el_type], el_id);
+   return   buffer;
+}
+// ========================================================= printName 
+void EltBase::printName  (cpchar sep)
+{
+   char nom[12];
+
+   printf ("%s%s", getName(nom), sep);
+}
+// ========================================================= setAssociation
+void EltBase::setAssociation (Shape* forme)
+{
+   el_assoc = forme;
+
+   if (el_root->debug (2))
+       cout << "  Vertex " << el_name << " : setAssociation" << endl;
+}
+// ========================================================= dumpRef 
+void EltBase::dumpRef ()
+{
+   int nbp = el_parent.size();
+   bool prems = true;
+
+   if (nbp==0)
+      {
+      printf ("\n");
+      }
+
+   for (int nro=0 ; nro<nbp ; nro++)         
+       {
+       if (el_parent[nro]->isHere ())
+          {
+          if (prems) 
+              printf ("\t isin ");
+          prems = false;
+          el_parent[nro]->printName(", ");
+          }
+       }
+
+   printf ("\n");
+}
+
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexEltBase.hxx b/src/HEXABLOCK/HexEltBase.hxx
new file mode 100755 (executable)
index 0000000..a95a290
--- /dev/null
@@ -0,0 +1,157 @@
+
+// Class : Element de base des Vertex/Edge/Quad, etc... 
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __ELT_BASE_H
+#define __ELT_BASE_H
+
+#include "hexa_base.hxx"
+#include "HexDocument.hxx"
+#include <vector>
+
+#define HexDump(x) {printf(#x " = "); if (x) x->dump(); else printf("NULL\n");}
+#define PrintName(x) if (x) x->printName(); else printf ("NULL, ")
+#define PutName(x) { printf(#x " = "); if (x) x->printName("\n"); else printf("NULL\n"); }
+
+#define GetClone(elt) ((elt)==NULL ? NULL : elt->getClone())
+#define BadElement(elt) (elt)==NULL || (elt)->isBad()
+#define ABR_TYPES  "xveqhw????"
+
+BEGIN_NAMESPACE_HEXA
+
+class EltBase 
+{
+public :
+   virtual Hexa*   getHexa   (int nro)  { return NULL; }
+   virtual Quad*   getQuad   (int nro)  { return NULL; }
+   virtual Edge*   getEdge   (int nro)  { return NULL; }
+   virtual Vertex* getVertex (int nro)  { return NULL; }
+
+   virtual int     countHexa   ()  { return 0; }
+   virtual int     countQuad   ()  { return 0; }
+   virtual int     countEdge   ()  { return 0; }
+   virtual int     countVertex ()  { return 0; }
+
+   virtual void    setError    (int kod=HERR)  { el_status = kod; }
+   virtual int     getError    ()              { return el_status; }
+   virtual bool    isValid     ()              { return el_status==HOK; }
+   virtual bool    isBad       ()              { return el_status!=HOK; }
+
+   virtual void    setAssociation (Shape* forme);
+   virtual void    clearAssociation ()            { el_assoc = NULL  ; }
+   virtual void    duplicate ()                   {}
+   virtual Shape*  getAssociation ()              { return el_assoc  ; }
+
+   void copyAssociation    (EltBase* orig);
+   void replaceAssociation (EltBase* orig);
+
+public :
+   virtual void replaceEdge   (Edge* old, Edge* nouveau) 
+                               { printf ("rep-edge\n") ; }
+   virtual void replaceVertex (Vertex* old, Vertex* nouveau) 
+                               { printf ("rep-vertex\n") ; }
+
+   EltBase (Document* doc, EnumElt type=EL_NONE);
+   EltBase (EnumElt type=EL_NONE);
+
+   virtual ~EltBase ();
+   virtual  void remove ();
+   virtual  void suppress ();
+   virtual  void dump ();
+   virtual  void saveXml (XmlWriter* xml)   {}
+   virtual  void majReferences () { }
+
+   EltBase*  next ()                        { return el_next; }
+   void      setNext (EltBase* suivant)     { el_next = suivant; }
+   int       getId ()                       { return el_id; }
+   void      setId (int ln)                 { el_id = ln; }
+   Document* dad ()                         { return el_root; }
+   EnumElt   getType ()                     { return el_type; }
+   bool      isHere ()                      { return el_type!=EL_REMOVED; }
+   bool      isDeleted ()                   { return el_type==EL_REMOVED; }
+             
+                 // On s'occupe des parents 
+
+   void  razReferences ()         { el_parent.clear() ; }
+   void  addParent (EltBase* dad) { if (dad) el_parent.push_back(dad) ; }
+   int   getNbrParents ()         { return el_parent.size() ; }
+   bool  hasParents ();
+   EltBase* getFather  (int nro);  
+
+   int   getMark ()                   { return el_mark; }
+   void  setMark (int ln)             { el_mark = ln ; }
+   char* getName   (pchar nom);
+   void  printName (cpchar sep=" ");
+   void  dumpRef ();
+
+   cpchar getName ();
+   void   setName (const string& nom) { el_name = nom ; }
+   void   setName (cpchar nom)        { el_name = nom ; }
+
+   bool   debug (int niv=0) { return el_root->getLevel() > niv ; } 
+
+protected :
+   EnumElt   el_type;
+   EltBase*  el_next;
+   int       el_id;
+   Document* el_root;
+   Shape*    el_assoc;
+   string    el_name;
+
+   int       el_status;
+   int       el_mark;
+   std::vector <EltBase*> el_parent;
+};
+// ========================================================= dump
+inline void EltBase::dump ()
+{
+   printf ("Elt%d  Nro=%04d", el_type, el_id);
+   dumpRef() ; 
+}
+
+// ========================================================= getFather 
+inline EltBase* EltBase::getFather  (int nro)
+{
+   EltBase* elt = NULL;
+   if (nro >= 0 && nro < (int) el_parent.size() && isHere() 
+                && el_parent[nro]->isHere())
+      elt = el_parent[nro];
+
+   return elt;
+}
+// ========================================================= hasParents 
+inline bool EltBase::hasParents ()
+{
+   int nbp = el_parent.size();
+   for (int nro=0 ; nro<nbp ; nro++)         
+       if (el_parent[nro]!=NULL && el_parent[nro]->isHere())
+          return true;
+
+   return false;
+}
+// ========================================================= clear_association
+inline void clear_association (EltBase* elt)
+{
+   if (elt != NULL && elt->isHere() && elt->isValid())
+       elt -> clearAssociation ();
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexGlobale.cxx b/src/HEXABLOCK/HexGlobale.cxx
new file mode 100755 (executable)
index 0000000..bffdf76
--- /dev/null
@@ -0,0 +1,179 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// C++ : Initialisation du singleton
+
+#include "HexGlobale.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+       6=bed  +----bd-----+ bdf=7
+             /|          /|
+           be |   B    bf |
+           /  |        /  |
+    4=bce +----bc-----+...|...bcf=5
+          |  de     D |   df
+          | E |       | F |             z
+         ce   | C     cf  |             ^
+  2=ade...|...+----ad-|---+ adf=3       |   y
+          |  /        |  /              |  /
+          | ae    A   | af              | /
+          |/          |/                |/
+    0=ace +----ac-----+ acf=1           +----->  x
+                
+ * ----------------------------------------------------- */
+
+Globale* Globale::unique_instance = NULL;
+
+// ====================================================== Constructeur
+Globale::Globale  ()
+{
+   setNames ();
+
+   setCoordVertex ( V_ACE, 0, 0, 0 );
+   setCoordVertex ( V_ACF, 1, 0, 0 );
+   setCoordVertex ( V_ADF, 1, 1, 0 );
+   setCoordVertex ( V_ADE, 0, 1, 0 );
+
+   setCoordVertex ( V_BCE, 0, 0, 1 );
+   setCoordVertex ( V_BCF, 1, 0, 1 );
+   setCoordVertex ( V_BDF, 1, 1, 1 );
+   setCoordVertex ( V_BDE, 0, 1, 1 );
+   
+   setEdgeVertex ( E_AC, V_ACE, V_ACF );
+   setEdgeVertex ( E_AF, V_ACF, V_ADF );
+   setEdgeVertex ( E_AD, V_ADF, V_ADE );
+   setEdgeVertex ( E_AE, V_ADE, V_ACE );
+
+   setEdgeVertex ( E_BC, V_BCE, V_BCF );
+   setEdgeVertex ( E_BF, V_BCF, V_BDF );
+   setEdgeVertex ( E_BD, V_BDF, V_BDE );
+   setEdgeVertex ( E_BE, V_BDE, V_BCE );
+
+   setEdgeVertex ( E_CE, V_ACE, V_BCE );
+   setEdgeVertex ( E_CF, V_ACF, V_BCF );
+   setEdgeVertex ( E_DF, V_ADF, V_BDF );
+   setEdgeVertex ( E_DE, V_ADE, V_BDE );
+
+   setQuadEdge ( Q_A, E_AC, E_AF, E_AD, E_AE );
+   setQuadEdge ( Q_B, E_BC, E_BF, E_BD, E_BE );
+   setQuadEdge ( Q_C, E_AC, E_CF, E_BC, E_CE );
+   setQuadEdge ( Q_D, E_AD, E_DF, E_BD, E_DE );
+   setQuadEdge ( Q_E, E_AE, E_DE, E_BE, E_CE );
+   setQuadEdge ( Q_F, E_AF, E_DF, E_BF, E_CF );
+
+   setOpposedVertex ( V_ACE, V_BDF);
+   setOpposedVertex ( V_ACF, V_BDE);
+   setOpposedVertex ( V_ADF, V_BCE);
+   setOpposedVertex ( V_ADE, V_BCF);
+
+   setOpposedQuad  ( Q_A, Q_B );
+   setOpposedQuad  ( Q_C, Q_D );
+   setOpposedQuad  ( Q_E, Q_F );
+}
+// ====================================================== getInstance
+Globale* Globale::getInstance  ()
+{
+   if (unique_instance==NULL) 
+       unique_instance = new Globale ();
+
+   return unique_instance;
+}
+// ====================================================== setCoordVertex
+void Globale::setCoordVertex (EnumHVertex node, int px, int py, int pz)
+{
+    coord_vertex [node] [dir_x] = 2*px-1;
+    coord_vertex [node] [dir_y] = 2*py-1;
+    coord_vertex [node] [dir_z] = 2*pz-1;
+}
+// ====================================================== setEdgeVertex 
+void Globale::setEdgeVertex (EnumHEdge edge, EnumHVertex v1, EnumHVertex v2)
+{
+    edge_vertex [edge] [V_AMONT] = v1;
+    edge_vertex [edge] [V_AVAL ] = v2;
+
+    if (db) 
+       printf (" %s = %2d = [%s, %s] = [%d,%d]\n", h_edge_name[edge], edge, 
+           h_vertex_name[v1], h_vertex_name[v2], v1, v2);
+}
+// ====================================================== setQuadEdge
+void Globale::setQuadEdge (EnumHQuad face, EnumHEdge c1, EnumHEdge c2, 
+                                          EnumHEdge c3, EnumHEdge c4)
+{
+    quad_edge [face] [E_A] = c1;
+    quad_edge [face] [E_B] = c2;
+    quad_edge [face] [E_C] = c3;
+    quad_edge [face] [E_D] = c4;
+}
+// ====================================================== setopposedVertex 
+void Globale::setOpposedVertex (EnumHVertex lun, EnumHVertex lautre)
+{
+    h_opposed_vertex [lun]    = lautre;
+    h_opposed_vertex [lautre] = lun;
+}
+// ====================================================== setopposedQuad 
+void Globale::setOpposedQuad (EnumHQuad lun, EnumHQuad lautre)
+{
+    h_opposed_quad [lun]    = lautre;
+    h_opposed_quad [lautre] = lun;
+}
+// ====================================================== setNames
+void Globale::setNames  ()
+{
+#define SetNameHexaVertex(v) h_vertex_name [v] = #v
+#define SetNameHexaEdge(e)   h_edge_name   [e] = #e
+#define SetNameHexaQuad(q)   h_quad_name   [q] = #q
+
+   SetNameHexaVertex ( V_ACE );
+   SetNameHexaVertex ( V_ACF );
+   SetNameHexaVertex ( V_ADF );
+   SetNameHexaVertex ( V_ADE );
+   SetNameHexaVertex ( V_BCE );
+   SetNameHexaVertex ( V_BCF );
+   SetNameHexaVertex ( V_BDF );
+   SetNameHexaVertex ( V_BDE );
+   
+   SetNameHexaEdge ( E_AC );
+   SetNameHexaEdge ( E_AF );
+   SetNameHexaEdge ( E_AD );
+   SetNameHexaEdge ( E_AE );
+   SetNameHexaEdge ( E_BC );
+   SetNameHexaEdge ( E_BF );
+   SetNameHexaEdge ( E_BD );
+   SetNameHexaEdge ( E_BE );
+   SetNameHexaEdge ( E_CE );
+   SetNameHexaEdge ( E_CF );
+   SetNameHexaEdge ( E_DF );
+   SetNameHexaEdge ( E_DE );
+
+   SetNameHexaQuad ( Q_A );
+   SetNameHexaQuad ( Q_B );
+   SetNameHexaQuad ( Q_C );
+   SetNameHexaQuad ( Q_D );
+   SetNameHexaQuad ( Q_E );
+   SetNameHexaQuad ( Q_F );
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexGlobale.hxx b/src/HEXABLOCK/HexGlobale.hxx
new file mode 100755 (executable)
index 0000000..6418792
--- /dev/null
@@ -0,0 +1,121 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// Singleton : Var globales : Disposition sommets/aretes/faces d'un hexaedre
+
+#ifndef _HEX_GLOBALE_H
+#define _HEX_GLOBALE_H
+
+#include "hexa_base.hxx"
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+       6=bed  +----bd-----+ bdf=7
+             /|          /|
+           be |   B    bf |
+           /  |        /  |
+    4=bce +----bc-----+...|...bcf=5
+          |  de     D |   df
+          | E |       | F |             z
+         ce   | C     cf  |             ^
+  2=ade...|...+----ad-|---+ adf=3       |   y
+          |  /        |  /              |  /
+          | ae    A   | af              | /
+          |/          |/                |/
+    0=ace +----ac-----+ acf=1           +----->  x
+                
+ * ----------------------------------------------------- */
+
+
+BEGIN_NAMESPACE_HEXA
+
+class Globale
+{
+public :
+   static Globale* getInstance ();
+
+   int CoordVertex (int edge, EnumCoord dim)
+       { return coord_vertex [edge] [dim] ; }
+
+   EnumHVertex EdgeVertex (int edge, EnumVertex sens)
+       { return edge_vertex [edge] [sens] ; }
+
+   EnumHEdge QuadEdge (int face, EnumQuad cote)
+       { return quad_edge [face] [cote] ; }
+
+   cpchar namofHexaEdge   (int arete)   { return h_edge_name   [arete] ; }
+   cpchar namofHexaVertex (int sommet)  { return h_vertex_name [sommet]; }
+   cpchar namofHexaQuad   (int face)    { return h_quad_name   [face];   }
+
+   EnumHQuad getOpposedQuad (int face)  { return h_opposed_quad [face]; }
+
+   void setArgs  (int nbargs, cpchar tabargs[]);
+   int  findArg  (cpchar opt);
+   bool isinArgs (cpchar opt)  { return findArg (opt) >= 0; }
+   cpchar getArg  (int nro)    { return nro>=nbr_args ? NULL : tab_args[nro]; }
+
+private :
+   Globale ();         // Constructeur prive
+
+   void setCoordVertex (EnumHVertex node, int px, int py, int pz);
+   void setEdgeVertex  (EnumHEdge edge, EnumHVertex amont, EnumHVertex aval);
+   void setQuadEdge    (EnumHQuad face, EnumHEdge c1, EnumHEdge c2, 
+                                       EnumHEdge c3, EnumHEdge c4);
+   void setOpposedVertex (EnumHVertex lun, EnumHVertex lautre);
+   void setOpposedQuad   (EnumHQuad   lun, EnumHQuad   lautre);
+
+   void setNames ();
+
+private :
+   int     nbr_args;
+   cpchar* tab_args;
+
+   int         coord_vertex [HV_MAXI] [DIM3];
+   EnumHVertex edge_vertex  [HE_MAXI] [V_TWO];
+   EnumHEdge   quad_edge    [HQ_MAXI] [QUAD4];
+
+   cpchar h_edge_name   [HE_MAXI]; 
+   cpchar h_vertex_name [HV_MAXI];
+   cpchar h_quad_name   [HQ_MAXI]; 
+
+   EnumHVertex  h_opposed_vertex [HV_MAXI];
+   EnumHQuad    h_opposed_quad   [HQ_MAXI];
+
+   static Globale* unique_instance;
+};
+// ===================================================== setArgs
+inline void Globale::setArgs (int nbargs, cpchar tabargs[])
+{
+   nbr_args = nbargs;
+   tab_args = tabargs;
+}
+// ===================================================== findArg
+inline int Globale::findArg (cpchar option)
+{
+   for (int nro=1 ; nro<nbr_args ; nro++)
+       if (Cestegal (option, tab_args[nro]))
+          return nro;
+
+   return NOTHING;
+}
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/HexGroup.cxx b/src/HEXABLOCK/HexGroup.cxx
new file mode 100755 (executable)
index 0000000..3c3afc9
--- /dev/null
@@ -0,0 +1,142 @@
+
+// C++ : Implementation des groupes
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexGroup.hxx"
+#include "HexEltBase.hxx"
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+int Group::last_grp_id = 0;
+static const cpchar kind_name[] = { "HexaCell", "QuadCell", "EdgeCell", 
+                  "HexaNode", "QuadNode", "EdgeNode", "VertexNode" };
+
+// ======================================================== Constructeur
+Group::Group (cpchar nom, EnumGroup grp)  
+{
+   grp_id = last_grp_id++;
+
+   //Initialisation du nom du groupe: un nom par défaut est donné s'il n'est pas fourni
+   std::string _nom = std::string(nom);
+   _nom.erase (_nom.find_last_not_of (" \n\r\t" ) + 1);
+   _nom.erase (0, _nom.find_first_not_of (" \n\r\t" ));
+   if (!_nom.empty())
+       grp_name = _nom;
+   else {
+       char buffer [16];
+       sprintf (buffer, "g%04d", grp_id);
+        grp_name = std::string(buffer);
+   }
+   
+   grp_kind = grp;
+
+   switch (grp_kind)
+      {
+      case HexaCell : case HexaNode :
+           grp_typelt = EL_HEXA;
+           break;
+
+      case QuadCell : case QuadNode :
+           grp_typelt = EL_QUAD;
+           break;
+
+      case EdgeNode : case EdgeCell :
+           grp_typelt = EL_EDGE;
+           break;
+
+      case VertexNode : default :
+           grp_typelt = EL_VERTEX;
+      }
+}
+// ======================================================== addElement
+int Group::addElement (EltBase* elt)
+{
+   if (elt==NULL || elt->isDeleted() || grp_typelt != elt->getType())
+      return HERR;
+   grp_table.push_back (elt);
+   return HOK;
+}
+// ======================================================== findElement
+int Group::findElement (EltBase* elt)
+{
+   int nbelts = grp_table.size ();
+   for (int nro=0 ; nro < nbelts ; nro++)
+       if (grp_table[nro]==elt)
+          return nro;
+       
+   return NOTHING;
+}
+// ======================================================== removeElement
+int Group::removeElement (int nro)
+{
+   int nbelts = grp_table.size ();
+
+   if (nro<0 || nro >= nbelts)
+      return HERR;
+   grp_table.erase (grp_table.begin() + nro);
+   return HOK;
+}
+// ======================================================== removeElement
+int Group::removeElement (EltBase* elt)
+{
+   int nro = findElement (elt);
+   int ier = removeElement (nro);
+   return ier;
+}
+// ======================================================== saveXml
+void Group::saveXml (XmlWriter* xml)
+{
+   char buffer[16];
+   int nbelts = grp_table.size ();
+
+   xml->addMark  ("Group");
+
+   xml->openMark ("Identification");
+   xml->addAttribute ("name",  grp_name);
+   xml->addAttribute ("kind",  kind_name [grp_kind]);
+   xml->closeMark ();
+
+   for (int nro=0 ; nro<nbelts ; nro++)
+       {
+       if (grp_table[nro]->isHere ())
+          {
+          xml->openMark ("Element");
+          xml->addAttribute ("id",  grp_table[nro]->getName (buffer));
+          xml->closeMark ();
+          }
+       }
+   xml->closeMark ();
+}
+// ======================================================== getKind
+EnumGroup Group::getKind (cpchar kind)
+{
+   int nbk = sizeof (kind_name) / sizeof (cpchar);
+   for (int nro=0; nro<nbk ; nro++)
+       {
+       if (Cestegal (kind, kind_name[nro]))
+          return (EnumGroup) nro;
+       }
+   return VertexNode;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexGroup.hxx b/src/HEXABLOCK/HexGroup.hxx
new file mode 100755 (executable)
index 0000000..10e0e71
--- /dev/null
@@ -0,0 +1,63 @@
+
+// Class : Implementation des groupes
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __GROUP_H
+#define __GROUP_H
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Group 
+{
+public :
+   Group (cpchar nom, EnumGroup grp);
+  ~Group ()                   {}
+
+   void      setName (cpchar nom)          { grp_name = nom ; }
+   cpchar    getName ()                    { return grp_name.c_str () ; }
+   EnumGroup getKind ()                    { return grp_kind ; }
+   int       addElement    (EltBase* elt);
+   int       removeElement (EltBase* elt);
+   int       findElement   (EltBase* elt);
+   int       removeElement (int nro);
+   EltBase*  getElement    (int nro)       { return grp_table [nro] ; }
+   int       countElement  ()              { return grp_table.size () ; }
+   void      clearElement  ()              { grp_table.clear () ; }
+
+   void      saveXml  (XmlWriter* xml);
+   EnumElt   getTypeElt ()                 { return grp_typelt ; }
+
+   static EnumGroup getKind (cpchar kind);
+   static EnumGroup getKind (const string& k) { return getKind (k.c_str());}
+
+private :
+   int grp_id;
+   static int last_grp_id;
+   EnumGroup   grp_kind;
+   EnumElt     grp_typelt;
+   std::string grp_name;
+   std::vector <EltBase*> grp_table;
+};
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexHexa.cxx b/src/HEXABLOCK/HexHexa.cxx
new file mode 100755 (executable)
index 0000000..5ababf1
--- /dev/null
@@ -0,0 +1,1071 @@
+
+// C++ : Gestion des Hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+
+#include "HexVertex.hxx"
+#include "HexDocument.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexDiagnostics.hxx"
+#include "HexGlobale.hxx"
+#include "HexMatrix.hxx"
+#include "HexElements.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Hexa::Hexa (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd,
+            Vertex* ve, Vertex* vf, Vertex* vg, Vertex* vh)
+    : EltBase (va->dad(), EL_HEXA)
+{
+   h_vertex [V_ACE] = va;
+   h_vertex [V_ACF] = vb;   // = vc ; Modif Abu 30/08/2011
+   h_vertex [V_ADE] = vc;   // = vb ; Modif Abu 30/08/2011
+   h_vertex [V_ADF] = vd;
+
+   h_vertex [V_BCE] = ve;  
+   h_vertex [V_BCF] = vf;   // = vg ; Modif Abu 30/08/2011
+   h_vertex [V_BDE] = vg;   // = vf ; Modif Abu 30/08/2011
+   h_vertex [V_BDF] = vh;
+
+   h_clone          = NULL;
+
+   controlerSommets ();
+
+   Globale* glob = Globale::getInstance ();
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       h_edge[nro] = new Edge (h_vertex[glob->EdgeVertex (nro, V_AMONT)], 
+                               h_vertex[glob->EdgeVertex (nro, V_AVAL)]);
+       }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       h_quad[nro] = new Quad (h_edge [glob->QuadEdge (nro, E_A)],
+                               h_edge [glob->QuadEdge (nro, E_B)],
+                               h_edge [glob->QuadEdge (nro, E_C)],
+                               h_edge [glob->QuadEdge (nro, E_D)]);
+
+       h_quad[nro] -> addParent (this);
+       }
+   majReferences ();
+}
+// ======================================================== Constructeur 2
+Hexa::Hexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf)
+    : EltBase (qa->dad(), EL_HEXA)
+{
+   h_quad [Q_A] = qa;
+   h_quad [Q_B] = qb;
+   h_quad [Q_C] = qc;
+   h_quad [Q_D] = qd;
+   h_quad [Q_E] = qe;
+   h_quad [Q_F] = qf;
+   h_clone      = NULL;
+
+   for (int nb=0 ; nb<HE_MAXI ; nb++) h_edge   [nb] = NULL;
+   for (int nb=0 ; nb<HV_MAXI ; nb++) h_vertex [nb] = NULL;
+
+   controlerFaces  ();
+
+   verifierAretes  ();
+   verifierSommets ();
+   majReferences   ();
+
+   if (el_status != HOK)
+      {      
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      printf (" +++ Heaedre impossible \n");
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // el_root->dump ();
+      // printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      dumpFull ();
+      for (int nro=0; nro<HQ_MAXI; nro++) HexDump (h_quad[nro]);
+      for (int nro=0; nro<HE_MAXI; nro++) HexDump (h_edge[nro]);
+      for (int nro=0; nro<HV_MAXI; nro++) HexDump (h_vertex[nro]);
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // exit (1);
+      }
+}
+// =========================================================  Constructeur 3
+// === a utiliser uniquement pour le clonage
+Hexa::Hexa (Hexa* other)
+    : EltBase (other->el_root, EL_HEXA)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++) h_quad   [nro] = NULL;
+   for (int nro=0 ; nro<HE_MAXI ; nro++) h_edge   [nro] = NULL;
+   for (int nro=0 ; nro<HV_MAXI ; nro++) h_vertex [nro] = NULL;
+}
+// ======================================================== majReferences
+void Hexa::majReferences  ()
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       h_quad[nro]->addParent (this);
+}
+// ======================================================== controlerArete
+void Hexa::controlerArete  (int arete, int face1, int face2)
+{
+   h_edge [arete] = h_quad[face1]->commonEdge (h_quad[face2]);
+   if (h_edge [arete]==NULL)
+       {
+       el_root->putError (W_H_BAD_EDGE, 
+                          el_root->glob->namofHexaEdge (arete));
+       el_status = 888;
+       }
+}
+// ======================================================== controlerSomet
+void Hexa::controlerSommet  (int node, int ne1, int ne2, int ne3)
+{
+    if (h_edge[ne1] == NULL || h_edge[ne2] == NULL || h_edge[ne3] == NULL)
+       return;
+
+    Vertex* hv = h_edge[ne1]->commonVertex (h_edge[ne2]);
+    h_vertex [node] = hv;
+    if (hv == NULL)
+       {
+       el_root->putError (W_H_BAD_VERTEX, 
+                          el_root->glob->namofHexaVertex(node));
+       el_status = 888;
+       }
+    else if (hv == NULL || h_edge[ne3]->index (hv)<0)
+       {
+       char b[10];
+       el_root->putError (W_H_BAD_VERTEX, 
+                          el_root->glob->namofHexaVertex(node));
+       el_status = 888;
+       printf ("%s = %s\n", el_root->glob->namofHexaVertex(node), 
+                            hv->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne1), 
+                            h_edge[ne1]->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne2), 
+                            h_edge[ne2]->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne3), 
+                            h_edge[ne3]->getName(b));
+       }
+}
+// ======================================================== controlerFaces
+void Hexa::controlerFaces  ()
+{
+   for (int n1=0 ; n1<HQ_MAXI ; n1++) 
+       {
+       if (h_quad [n1] == NULL)
+          {
+          el_root->putError (W_H_NULL_QUAD, 
+                             el_root->glob->namofHexaQuad (n1));
+          el_status = 886;
+          return;
+          }
+       for (int n2=n1+1 ; n2<HQ_MAXI ; n2++) 
+           if (h_quad [n1] == h_quad[n2])
+              {
+              el_root->putError (W_H_EQ_QUAD, 
+                         el_root->glob->namofHexaQuad (n1), 
+                         el_root->glob->namofHexaQuad (n2));
+              el_status = 888;
+              }
+       }
+}
+// ======================================================== controlerSommets
+void Hexa::controlerSommets  ()
+{
+   for (int n1=0 ; n1<HV_MAXI ; n1++) 
+       {
+       if (h_vertex [n1] == NULL)
+          {
+          el_root->putError (W_H_NULL_QUAD, 
+                             el_root->glob->namofHexaVertex (n1));
+          el_status = 886;
+          return;
+          }
+       for (int n2=n1+1 ; n2<HQ_MAXI ; n2++) 
+           if (h_vertex [n1] == h_vertex[n2])
+              {
+              el_root->putError (W_H_EQ_QUAD, 
+                         el_root->glob->namofHexaVertex (n1), 
+                         el_root->glob->namofHexaVertex (n2));
+              el_status = 888;
+              }
+       }
+}
+// ======================================================== verifierAretes
+void Hexa::verifierAretes  ()
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++) h_edge [nro] = NULL;
+
+   controlerArete ( E_AC, Q_A, Q_C);
+   controlerArete ( E_AF, Q_A, Q_F);
+   controlerArete ( E_AD, Q_A, Q_D);
+   controlerArete ( E_AE, Q_A, Q_E);
+
+   controlerArete ( E_BC, Q_B, Q_C);
+   controlerArete ( E_BF, Q_B, Q_F);
+   controlerArete ( E_BD, Q_B, Q_D);
+   controlerArete ( E_BE, Q_B, Q_E);
+
+   controlerArete ( E_CE, Q_C, Q_E);
+   controlerArete ( E_CF, Q_C, Q_F);
+   controlerArete ( E_DF, Q_D, Q_F);
+   controlerArete ( E_DE, Q_D, Q_E);
+}
+// ======================================================== verifierSommets
+void Hexa::verifierSommets  ()
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++) h_vertex [nro] = NULL;
+
+   controlerSommet (V_ACE, E_AC, E_AE, E_CE);
+   controlerSommet (V_ACF, E_AC, E_AF, E_CF);
+   controlerSommet (V_ADF, E_AD, E_AF, E_DF);
+   controlerSommet (V_ADE, E_AD, E_AE, E_DE);
+
+   controlerSommet (V_BCE, E_BC, E_BE, E_CE);
+   controlerSommet (V_BCF, E_BC, E_BF, E_CF);
+   controlerSommet (V_BDF, E_BD, E_BF, E_DF);
+   controlerSommet (V_BDE, E_BD, E_BE, E_DE); 
+}
+// ======================================================== Inter
+Quad* Hexa::Inter (Hexa* other)
+{
+   for (int nf1=0 ; nf1 < HQ_MAXI ; nf1++)
+       for (int nf2=0 ; nf2 < HQ_MAXI ; nf2++)
+           if (h_quad[nf1] == other->h_quad[nf2])
+              return h_quad[nf1];
+
+   return NULL;
+}
+// -------------------------------------------------------------------
+//                         Debug
+// -------------------------------------------------------------------
+// ======================================================= razNodes
+void Hexa::razNodes ()
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       h_vertex[nb]->setMark (NO_COUNTED);
+}
+// ======================================================= countNodes
+int Hexa::countNodes ()
+{
+   int nombre = 0;
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark () == NO_COUNTED) 
+          {
+          h_vertex[nb]->setMark (NO_USED);
+          nombre ++;
+          }
+
+   return nombre;
+}
+// ======================================================= printNodes
+void Hexa::printNodes (pfile vtk, int& compteur)
+{
+   const double minvtk = 1e-30;
+   Real3 koord;
+
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()==NO_USED)
+          {
+          h_vertex[nb]->getPoint (koord);
+          for (int nc=dir_x ; nc<=dir_z ; nc++)
+              if (koord [nc] < minvtk &&  koord [nc] > -minvtk)
+                  koord[nc] = 0.0;
+
+          fprintf (vtk, "%g %g %g\n", koord[dir_x], koord[dir_y], koord[dir_z]);
+          h_vertex[nb]->setMark (compteur);
+          compteur ++;
+          }
+}
+// ======================================================= colorNodes
+void Hexa::colorNodes (pfile vtk)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()>=0)
+          {
+          double color = 100*(h_vertex[nb]->getScalar()+1);
+          fprintf (vtk, "%g\n", color);
+          h_vertex[nb]->setMark (NO_COUNTED);
+          }
+}
+// ======================================================= moveNodes
+void Hexa::moveNodes (Matrix* matrice)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()!=IS_USED)
+          {
+          matrice->perform (h_vertex[nb]);
+          h_vertex[nb]->setMark (IS_USED);
+          }
+}
+// ======================================================= transform
+void Hexa::transform (Matrix* matrice)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       matrice->perform (h_vertex[nb]);
+}
+// ======================================================= printHexa
+void Hexa::printHexa  (pfile vtk)
+{
+   fprintf (vtk, "%d", HV_MAXI);
+
+   fprintf (vtk, " %d", h_vertex[V_ACE]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ACF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ADF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ADE]->getMark ());
+
+   fprintf (vtk, " %d", h_vertex[V_BCE]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BCF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BDF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BDE]->getMark ());
+
+   fprintf (vtk, "\n");
+}
+// ======================================================== hasFreEdges
+bool Hexa::hasFreeEdges ()
+{
+   if (isDeleted())
+       return false;
+
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]->getMark()<0)
+          return true;
+
+   return false;
+}
+// ======================================================== propager
+void Hexa::propager (Propagation* prop, int nro)
+{
+   if (isDeleted())
+       return;
+
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]->getMark()<0)
+           h_edge[nro]->propager (prop, nro);
+}
+// ========================================================= saveXml 
+void Hexa::saveXml (XmlWriter* xml)
+{
+   char ident[12];
+   string quads;
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       if (nro>0) quads += " ";
+       quads += h_quad[nro]->getName(ident);
+       }
+
+   getName (ident);
+   xml->openMark     ("Hexa");
+   xml->addAttribute ("id",    ident);
+   xml->addAttribute ("quads", quads);
+   if (el_name!=ident) 
+       xml->addAttribute ("name", el_name);
+   xml->closeMark ();
+}
+// ========================================================= findQuad 
+int Hexa::findQuad (Quad* element)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       if (h_quad[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= findEdge 
+int Hexa::findEdge (Edge* element)
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= findVertex 
+int Hexa::findVertex (Vertex* element)
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       if (h_vertex[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= disconnectQuad 
+Elements* Hexa::disconnectQuad (Quad* quad)
+{
+   if (quad==NULL)
+      return NULL;
+
+   if (debug())
+      {
+      printf (" ... Avant disconnectQuad, quad=");
+      quad->printName ("\n");
+      dumpFull ();
+      }
+
+   int nface = findQuad (quad);
+   if (nface==NOTHING)
+      return NULL;
+                                       // Face opposee : replace
+   // int nfopp = (nface MODULO 2==0) ? nface+1 : nface-1;
+
+   int  ind_edge  [QUAD4], ind_opp_quad [QUAD4];
+   bool make_quad [QUAD4], make_edge [QUAD4];
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       make_quad [nro] = make_edge[nro] = false;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       int nro1  = (nro+1) MODULO QUAD4;
+       int pedge = findEdge   (quad->getEdge   (nro));
+       int pnode = findVertex (quad->getVertex (nro));
+       int oppq  = findOpposedQuad (quad, quad->getEdge (nro));
+
+       ind_edge [nro]     = pedge;
+       ind_opp_quad [nro] = oppq;
+
+       if (pedge==NOTHING || pnode==NOTHING || oppq==NOTHING)
+          return NULL;
+
+       make_quad [nro]  = h_quad[oppq]->getNbrParents() == 2;
+       make_edge [nro ] = make_edge [nro ] || make_quad [nro];
+       make_edge [nro1] = make_edge [nro1] || make_quad [nro];
+
+       if (debug())
+          {
+          printf (" Sommet nro %d : ", nro);
+          quad->getVertex(nro)->printName (", ");
+          printf (" edge = ");
+          quad->getEdge(nro)->printName (", ");
+          printf (" quad oppose = ");
+          h_quad[oppq]->printName("");
+          if (make_quad [nro])
+             printf (" a dissocier\n");
+          else
+             printf ("\n");
+             
+          }
+       }
+
+   Vertex* new_node     [QUAD4];
+   Edge*   new_opp_edge [QUAD4];
+   Edge*   old_opp_edge [QUAD4];
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       old_opp_edge [nro] = NULL;
+       new_opp_edge [nro] = NULL;
+       Vertex*  o_v0  = quad->getVertex (nro);
+       new_node [nro] = new Vertex (o_v0);
+       if (debug())
+          {
+          printf (" quad.vertex [%d] = ", nro);
+          quad->getVertex (nro)->printName (" --> ");
+          new_node [nro]->printName ("\n");
+          }
+
+       if (make_edge[nro])
+          {
+          Quad*   pface  = h_quad [ind_opp_quad [nro]];
+          int     bid;
+          int     ncut = pface->inter (quad, bid);
+          Edge*   ecut = pface->getEdge ((ncut+1) MODULO QUAD4);  
+          Vertex* vopp = ecut->getVertex(V_AMONT);
+          if (vopp==o_v0)
+              vopp = ecut->getVertex (V_AVAL);
+          else if (o_v0 != ecut->getVertex (V_AVAL));
+              {
+              ecut = pface->getEdge ((ncut+3) MODULO QUAD4);  
+              vopp = ecut->getVertex(V_AMONT);
+              if (vopp==o_v0)
+                  vopp = ecut->getVertex (V_AVAL);
+              else if (o_v0 != ecut->getVertex (V_AVAL))
+                  return NULL;
+              }
+
+          old_opp_edge [nro] = ecut;
+          new_opp_edge [nro] = new Edge (new_node[nro], vopp);
+          if (debug())
+             {
+             printf (" quad.opp_edge [%d] = ", nro);
+             old_opp_edge [nro]->printName (" --> ");
+             new_opp_edge [nro]->printName ("\n");
+             }
+          }
+       }
+
+   Quad* new_quad = new Quad (new_node[0], new_node[1], new_node[2], 
+                                                        new_node[3]);
+
+   Quad* new_opp_quad [QUAD4];
+   Quad* old_opp_quad [QUAD4];
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       old_opp_quad [nro] = NULL;
+       new_opp_quad [nro] = NULL;
+       if (make_quad[nro])
+          {
+          int nro1 = (nro+1) MODULO QUAD4; 
+
+          Edge* n_edge0 = new_quad->getEdge (nro);
+          Edge* n_edge1 = new_opp_edge [nro];
+          Edge* n_edge3 = new_opp_edge [nro1];
+
+          int iv1 = n_edge1->inter (n_edge0);
+          int iv3 = n_edge3->inter (n_edge0);
+          if (iv1 <0 || iv3 <0)
+             return NULL;
+          
+          Quad* o_face = h_quad [ind_opp_quad [nro]];
+          Edge* edge2  = o_face->findEdge (n_edge1->getVertex (1-iv1), 
+                                           n_edge3->getVertex (1-iv3));
+          if (edge2==NULL)
+             return NULL;
+          // Edge* o_edge0 = h_edge [ind_edge     [nro]];
+          // int sens = 1;
+          // Edge* edge2   = o_face->getOpposEdge (o_edge0, sens);
+
+          old_opp_quad [nro] = o_face;
+          if (debug())
+             printf (" -------- Quad oppose nro %d\n", nro);
+          new_opp_quad [nro] = new Quad (n_edge0, n_edge1, edge2, n_edge3);
+          }
+       }
+
+   replaceQuad (quad, new_quad);
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       if (make_quad[nro])
+          replaceQuad (old_opp_quad [nro], new_opp_quad [nro]);
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       replaceEdge (h_edge[ind_edge[nro]], new_quad->getEdge (nro));
+       if (make_edge[nro])
+          replaceEdge (old_opp_edge [nro], new_opp_edge [nro]);
+       }
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       replaceVertex (quad->getVertex(nro), new_node[nro]);
+       }
+
+
+   h_quad [nface] = new_quad;
+   if (debug())
+      {
+      printf (" ... Apres disconnectQuad, new_quad=");
+      new_quad->printName ("\n");
+      dumpFull ();
+      }
+
+   Elements* nouveaux  = new Elements (el_root);
+   nouveaux->addQuad   (new_quad);
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       nouveaux->addEdge   (new_quad->getEdge   (nro));
+       nouveaux->addVertex (new_quad->getVertex (nro));
+       if (make_edge[nro])
+          nouveaux->addEdge (new_opp_edge [nro]);
+       if (make_quad[nro])
+          nouveaux->addQuad (new_opp_quad [nro]);
+       }
+   nouveaux->moveDisco (this);
+   return nouveaux;
+}
+// ========================================================= disconnectEdge 
+Elements* Hexa::disconnectEdge (Edge* arete)
+{
+   int nedge  = findEdge   (arete);
+   int namont = findVertex (arete->getVertex(V_AMONT));
+   int naval  = findVertex (arete->getVertex(V_AVAL ));
+
+   if (nedge==NOTHING || namont==NOTHING || naval==NOTHING)
+      return NULL;
+
+   if (debug())
+      {
+      printf (" ... Avant disconnectEdge, arete=");
+      arete->printName ("\n");
+      dumpFull ();
+      }
+
+   Edge*   n_edge   [HE_MAXI];
+   Quad*   n_quad   [HQ_MAXI];
+   Vertex* n_vertex [HV_MAXI];
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++) n_quad [nro]   = NULL;
+   for (int nro=0 ; nro<HE_MAXI ; nro++) n_edge [nro]   = NULL;
+   for (int nro=0 ; nro<HV_MAXI ; nro++) n_vertex [nro] = NULL;
+
+   Vertex* old_amont = arete->getVertex (V_AMONT);
+   Vertex* old_aval  = arete->getVertex (V_AVAL );
+   Vertex* new_amont = n_vertex [namont] = new Vertex (old_amont);
+   Vertex* new_aval  = n_vertex [naval]  = new Vertex (old_aval);
+   n_edge [nedge]    = new Edge   (new_amont, new_aval);
+
+   // Un edge non remplace, qui contient un vertex remplace
+   //         commun a plus de 2 faces (donc appartenant a un autre hexa)
+   //         doit etre duplique
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       if (   n_edge[nro]==NULL && h_edge[nro] != NULL
+           && h_edge[nro]->getNbrParents()>2)
+          {
+          Vertex* va =  h_edge[nro]->getVertex (V_AMONT); 
+          Vertex* vb =  h_edge[nro]->getVertex (V_AVAL); 
+
+          if (va==old_amont)
+             n_edge [nro] = new Edge (new_amont, vb);
+          else if (va==old_aval)
+             n_edge [nro] = new Edge (new_aval,  vb);
+          else if (vb==old_amont)
+             n_edge [nro] = new Edge (va, new_amont);
+          else if (vb==old_aval)
+             n_edge [nro] = new Edge (va, new_aval);
+          }
+       }
+
+   // Un quad non remplace, qui contient un edge remplace 
+   //         commun a plus de 2 Hexas
+   //         doit etre duplique
+
+   Globale* glob = Globale::getInstance();
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       if (   n_quad[nro]==NULL && h_quad[nro] != NULL
+           && h_quad[nro]->getNbrParents()>1)
+          {
+          Edge* qedge[QUAD4];
+          bool  duplic = false;
+          for (int ned=0 ; ned<QUAD4 ; ned++)
+              {
+              int ndup = glob->QuadEdge (nro, (EnumQuad)ned);
+              if (n_edge [ndup] ==NULL)
+                 qedge [ned] = h_edge[ndup];
+              else
+                 {
+                 qedge [ned] = n_edge[ndup];
+                 duplic = true;
+                 }
+              }
+          if (duplic) 
+             n_quad[nro] = new Quad (qedge[Q_A], qedge[Q_B], 
+                                     qedge[Q_C], qedge[Q_D]);
+          }
+
+   Elements* nouveaux  = new Elements (el_root);
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       if (n_quad[nro]!=NULL)
+          {
+          replaceQuad (h_quad[nro], n_quad[nro]);
+          nouveaux->addQuad  (n_quad[nro]);
+          }
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       if (n_edge[nro]!=NULL)
+          {
+          replaceEdge (h_edge[nro], n_edge[nro]);
+          nouveaux->addEdge  (n_edge[nro]);
+          }
+
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       if (n_vertex[nro]!=NULL)
+          {
+          replaceVertex (h_vertex[nro], n_vertex[nro]);
+          nouveaux->addVertex  (n_vertex[nro]);
+          }
+
+   if (debug())
+      {
+      printf (" ... Apres disconnectEdge\n");
+      dumpFull ();
+      }
+
+   nouveaux->moveDisco (this);
+   return nouveaux;
+}
+// ========================================================= disconnectVertex 
+Elements* Hexa::disconnectVertex (Vertex* noeud)
+{
+   if (debug())
+      {
+      printf (" ... Avant disconnectVertex, vertex=");
+      noeud->printName ("\n");
+      dumpFull ();
+      }
+
+   int node = findVertex (noeud);
+   if (node==NOTHING)
+      return NULL;
+
+   Vertex* new_node = new Vertex (noeud);
+   Quad*   new_quad [HQ_MAXI];
+   Edge*   new_edge [HE_MAXI];
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) new_edge [nro] = NULL;
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       new_quad [nro] = NULL;
+            // Cete face contient le sommet et est commune a 2 hexas
+       if (   h_quad[nro]->indexVertex(noeud) >= 0 
+           && h_quad[nro]->getNbrParents  ()  >= 2)
+           {
+           int nbmod = 0;
+           Edge* tedge [QUAD4];
+           for (int qed=0 ; qed<QUAD4 ; qed++)
+               {
+               Edge* arete = tedge[qed] = h_quad[nro]->getEdge (qed);
+               int   indv  = arete->index (noeud);
+               if (indv>=0)
+                  {
+                  nbmod++;  
+                  int hed = findEdge (arete);
+                  if (hed<0)
+                     return NULL;
+                  if (new_edge [hed]==NULL)
+                      new_edge [hed] = new Edge (new_node, 
+                                                 arete->getVertex(1-indv));
+                  tedge [qed] = new_edge [hed];
+                  }
+               }
+           if (nbmod!=2)
+              return NULL; 
+           new_quad [nro] = new Quad (tedge[0], tedge[1], tedge[2], tedge[3]);
+           }
+       }
+
+   Elements* nouveaux  = new Elements (el_root);
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++) 
+       if (new_quad [nro] != NULL)
+          {
+          replaceQuad (h_quad [nro], new_quad [nro]);
+          nouveaux->addQuad (new_quad[nro]);
+          }
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) 
+       if (new_edge [nro] != NULL)
+          {
+          replaceEdge (h_edge [nro], new_edge [nro]);
+          nouveaux->addEdge (new_edge[nro]);
+          }
+
+   replaceVertex (noeud, new_node);
+   nouveaux->addVertex (new_node);
+
+
+   if (debug())
+      {
+      printf (" ... Apres disconnectVertex\n");
+      dumpFull ();
+      }
+
+   nouveaux->moveDisco (this);
+   return nouveaux;
+}
+// ========================================================= getBase 
+int Hexa::getBase (Vertex* orig, Edge* normale)
+{
+   for (int nq=0 ; nq<HQ_MAXI ; nq++)
+       {
+       if (   h_quad[nq]->indexVertex(orig)    >= 0 
+           && h_quad[nq]->indexEdge  (normale) < 0)
+           return nq;
+       }
+   return NOTHING;
+}
+// ======================================================== replaceQuad
+void Hexa::replaceQuad (Quad* old, Quad* par)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       if (h_quad[nro]==old) 
+           {
+           h_quad[nro] = par;
+           if (debug())
+              {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+                                            
+}
+// ======================================================== replaceEdge
+void Hexa::replaceEdge (Edge* old, Edge* par)
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       if (h_edge[nro]==old) 
+           {
+           h_edge[nro] = par;
+           if (debug())
+              {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       h_quad[nro]->replaceEdge (old, par);
+       }
+}
+// ======================================================== replaceVertex
+void Hexa::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       {
+       if (h_vertex [nro]==old) 
+           {
+           h_vertex [nro] = par;
+           if (debug())
+              {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       h_edge[nro]->replaceVertex (old, par);
+       }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       h_quad[nro]->replaceVertex (old, par);
+       }
+}
+// ======================================================== removeConnected
+void Hexa::removeConnected ()
+{
+                                            
+   if (el_type == EL_REMOVED)
+      return;
+
+   remove();
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       Quad*  face = h_quad [nro];
+       int nbhexas = face->getNbrParents ();
+                                            
+       for (int nc=0 ; nc<nbhexas ; nc++)
+           {
+           Hexa* cell = face->getParent(nc);
+           if (cell!=NULL && cell->isValid ())
+              cell->removeConnected ();
+           }
+       }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       h_quad [nro]->remove();
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       h_edge [nro]->remove();
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       h_vertex [nro]->remove();
+}
+// ======================================================== findOpposedQuad
+int Hexa::findOpposedQuad (Quad* face, Edge* arete)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       Quad*  quad = h_quad [nro];
+       if (quad!=face && quad->indexEdge (arete) >=0)
+          return nro;
+       }
+
+   return NOTHING;
+}
+// ========================================================= dump
+void Hexa::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   for (int nro=0; nro<HQ_MAXI ; nro++)
+        PrintName (h_quad[nro]);
+   printf (")\n");
+
+   printf ("      = (");
+                                            
+   for (int nro=0; nro<HE_MAXI ; nro++)
+        {
+        PrintName (h_edge[nro]);
+        if (nro==3 || nro ==7) 
+           printf ("\n         ");
+        }
+   printf (")\n");
+
+   printf ("      = (");
+   for (int nro=0; nro<HV_MAXI ; nro++)
+        PrintName (h_vertex[nro]);
+   printf (")\n");
+   Real3 cg; 
+   getCenter (cg);
+   printf ("cg    = (%g, %g, %g)\n", cg[0], cg[1], cg[2]);
+
+}
+// ======================================================== dumpPlus
+void Hexa::dumpPlus ()
+{
+   dump ();
+   for (int nro=0 ; nro < HV_MAXI ; nro++)
+       {
+       Vertex* pv = h_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ("");
+          printf ( " (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf ( "NULL\n");
+          }
+       }
+}
+// ======================================================== dumpFull
+void Hexa::dumpFull ()
+{
+   dump ();
+   Globale* glob = Globale::getInstance ();
+
+   printf ("\n");
+   for (int nro=0; nro<HQ_MAXI ; nro++)
+       {
+       printf (" quad(%s) = ", glob->namofHexaQuad(nro));
+       if (h_quad[nro] ==NULL)
+           printf (" NULL\n");
+       else
+           {
+           h_quad[nro]->printName (" = (");
+           for (int nc=0; nc<QUAD4 ; nc++)
+                h_quad[nro]->getEdge(nc)->printName ();
+           printf (")\n");
+           printf ("                   = (");
+           for (int nc=0; nc<QUAD4 ; nc++)
+                h_quad[nro]->getVertex(nc)->printName ();
+           printf (")\n");
+           }
+       }
+
+   printf ("\n");
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       {
+       printf (" edge(%s) = ", glob->namofHexaEdge(nro));
+       if (h_edge[nro] ==NULL)
+           printf (" NULL\n");
+       else
+           {
+           h_edge[nro]->printName (" = (");
+           for (int nc=0; nc<V_TWO ; nc++)
+                h_edge[nro]->getVertex(nc)->printName ();
+           printf (")\n");
+           }
+       }
+   printf ("\n");
+
+   for (int nro=0; nro<HV_MAXI ; nro++)
+       {
+       Vertex* pv = h_vertex[nro];
+       printf (" vertex(%s) = ", glob->namofHexaVertex(nro));
+       if (pv ==NULL)
+           printf (" NULL");
+       else
+           {
+           pv->printName (" = (");
+           printf ("%g, %g, %g)\n", pv->getX(), pv->getY(), pv->getZ());
+           }
+       }
+   printf ("\n");
+}
+// ======================================================== getOpposedQuad
+Quad* Hexa::getOpposedQuad (Quad* face)
+{
+   if      (face == h_quad [Q_A]) return h_quad [Q_B];
+   else if (face == h_quad [Q_B]) return h_quad [Q_A];
+   else if (face == h_quad [Q_C]) return h_quad [Q_D];
+   else if (face == h_quad [Q_D]) return h_quad [Q_C];
+   else if (face == h_quad [Q_E]) return h_quad [Q_F];
+   else if (face == h_quad [Q_F]) return h_quad [Q_F];
+   else                           return NULL;
+}
+// ========================================================= findQuad 
+Quad* Hexa::findQuad (Edge* ed1, Edge* ed2)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       if (   h_quad[nro]->indexEdge (ed1) >= 0
+           && h_quad[nro]->indexEdge (ed2) >= 0) 
+          return h_quad [nro];
+       }
+
+   return NULL;
+}
+// ========================================================= findEdge 
+Edge* Hexa::findEdge (Vertex* v1, Vertex* v2)
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       if (   h_edge[nro]->index (v1) >= 0
+           && h_edge[nro]->index (v2) >= 0) 
+          return h_edge [nro];
+       }
+
+   return NULL;
+}
+// ====================================================== getPerpendicularEdge
+Edge* Hexa::getPerpendicularEdge (Quad* quad, Vertex* vertex)
+{
+   if (quad==NULL || vertex==NULL)
+      return NULL;
+
+   int nv = quad->indexVertex (vertex);
+   int nq = findQuad (quad);
+   if (nv<0 || nq<0)
+      return NULL;
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       if (quad->indexEdge (h_edge[nro])<0 && h_edge[nro]->index(vertex)>=0) 
+          return h_edge [nro];
+       }
+
+   return NULL;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexHexa.hxx b/src/HEXABLOCK/HexHexa.hxx
new file mode 100755 (executable)
index 0000000..b1d2d05
--- /dev/null
@@ -0,0 +1,233 @@
+
+// class : Les hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+       6=bed  +----bd-----+ bdf=7
+             /|          /|
+           be |   B    bf |
+           /  |        /  |
+    4=bce +----bc-----+...|...bcf=5
+          |  de     D |   df
+          | E |       | F |             z
+         ce   | C     cf  |             ^
+  2=ade...|...+----ad-|---+ adf=3       |   y
+          |  /        |  /              |  /
+          | ae    A   | af              | /
+          |/          |/                |/
+    0=ace +----ac-----+ acf=1           +----->  x
+  
+ * ----------------------------------------------------- */
+#ifndef __HEX_HEXA_H_
+#define __HEX_HEXA_H_
+
+#include "HexEltBase.hxx"
+
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Hexa : public EltBase 
+{
+public:
+    virtual Quad*   getQuad   (int  nro);
+    virtual Edge*   getEdge   (int  nro);
+    virtual Vertex* getVertex (int  nro);
+
+    virtual int     countQuad   () { return HQ_MAXI; } 
+    virtual int     countEdge   () { return HE_MAXI; } 
+    virtual int     countVertex () { return HV_MAXI; } 
+
+public:
+    Hexa (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, 
+          Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
+    Hexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf);
+    Hexa (Hexa* other);
+    Quad* Inter   (Hexa* other);
+    bool  definedBy  (Vertex* v1, Vertex* v2);
+    bool  definedBy  (Quad*   va, Quad*   v2);
+    virtual void dump ();
+    virtual void dumpPlus ();
+    virtual void dumpFull ();
+  
+    void razNodes ();
+    int  countNodes ();                      // Compte et numerote les noeuds
+    void printNodes (pfile vtk, int& count); // Impression format vtk
+    void colorNodes (pfile vtk);             // Impression scalaires vtk
+    void moveNodes  (Matrix* matrice);       // transfo controlee ds un ensemble
+    void transform  (Matrix* matrice);       // transfo indivituelle
+    void printHexa  (pfile vtk);             // Impression de la cellule 
+    virtual void majReferences();            // M.A.J relation "utilise par"
+
+    bool hasFreeEdges  ();
+    void propager (Propagation* prop, int nro);
+    void setScalar (double valeur);
+    void setColor  (double valeur)          { setScalar (valeur) ; }
+
+    virtual void saveXml (XmlWriter* xml);
+
+    Elements*  disconnectQuad   (Quad*   face);
+    Elements*  disconnectEdge   (Edge*   arete);
+    Elements*  disconnectVertex (Vertex* noeud);
+
+    int getBase (Vertex* orig, Edge* normale);
+
+    void replaceQuad   (Quad*   old, Quad* nouveau);
+    void replaceEdge   (Edge*   old, Edge* nouveau);
+    void replaceVertex (Vertex* old, Vertex* nouveau);
+    void removeConnected ();
+    void markElements (int marque);
+    double* getCenter    (double centre[]);
+
+    virtual void   duplicate ();
+    Hexa* getClone ()               {  return h_clone ; }
+    Quad*   getOpposedQuad   (Quad* face);
+    Vertex* getOpposedVertex (Quad* face, Vertex* vertex);
+    Edge* getPerpendicularEdge (Quad* face, Vertex* vertex);
+    Edge* getParallelEdge      (Quad* face, Edge*   edge);
+    Quad* findQuad             (Edge* e1, Edge* e2);
+    Edge* findEdge             (Vertex* v1, Vertex* v2);
+
+    int   findQuad   (Quad*   element);
+    int   findEdge   (Edge*   element);
+    int   findVertex (Vertex* element);
+
+
+private:
+    friend class Cloner;
+    void  OrdonnerAretes ();    // obsolete ?
+    void  OrdonnerSommets ();   // obsolete ?
+
+    void  controlerFaces   ();  // Controle primaire des donnees utilisateur   
+    void  controlerSommets ();  // Idem;  
+
+    void  verifierSommets ();   // Controle de coherence des quads
+    void  verifierAretes ();    // Idem
+
+    void  controlerArete (int arete, int face1, int face2);
+    void  controlerSommet (int node, int arete1, int arete2, int arete3);
+
+    int   findOpposedQuad (Quad* face, Edge* arete);
+
+private:
+    Quad*   h_quad   [HQ_MAXI];
+    Edge*   h_edge   [HE_MAXI];
+    Vertex* h_vertex [HV_MAXI];
+    Hexa*   h_clone;
+};
+// ------------------------------------------------------------  inlining
+// ============================================================  getQuad
+inline Quad* Hexa::getQuad (int nro) 
+{
+   Quad* elt = NULL;
+   if (nro >=0 && nro < HQ_MAXI && el_status == HOK && h_quad [nro]->isValid())
+      elt = h_quad [nro]; 
+
+   return elt;
+}
+// ============================================================  getEdge
+inline Edge* Hexa::getEdge (int nro)
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < HE_MAXI && el_status == HOK && h_edge [nro]->isValid())
+      elt = h_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Hexa::getVertex (int nro)
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro <  HV_MAXI && el_status == HOK && h_vertex [nro]->isValid())
+      elt = h_vertex [nro]; 
+
+   return elt;
+}
+// ============================================================  getCenter
+inline double* Hexa::getCenter (double centre[])
+{
+   centre [dir_x] = centre [dir_y] = centre [dir_z] = 0;
+
+   for (int nv=0 ; nv<HV_MAXI ; nv++)
+       {
+       centre [dir_x] += h_vertex[nv]->getX ();
+       centre [dir_y] += h_vertex[nv]->getY ();
+       centre [dir_z] += h_vertex[nv]->getZ ();
+       }
+
+   centre [dir_x] /= HV_MAXI;
+   centre [dir_y] /= HV_MAXI;
+   centre [dir_z] /= HV_MAXI;
+   return centre;
+}
+// =============================================================== definedBy
+inline bool Hexa::definedBy  (Vertex* v1, Vertex* v2)
+{
+   for (int n1=0 ; n1< HV_MAXI ; n1++)
+       {
+//              (   Diagonale        )  Dessus
+       int n2 = (n1 + 2) MODULO HV_MAXI + HV_MAXI;
+       if (   (v1 == h_vertex[n1] && v2 == h_vertex[n2])
+           || (v1 == h_vertex[n2] && v2 == h_vertex[n1])) return true;
+       }
+   return false;
+}
+// =============================================================== definedBy
+inline bool Hexa::definedBy  (Quad* qa, Quad* qb)
+{
+   for (int nc=0 ; nc< 3 ; nc++)
+       {
+       if (   (qa == h_quad[2*nc]   && qb == h_quad[2*nc+1])
+           || (qa == h_quad[2*nc+1] && qb == h_quad[2*nc])) return true;
+       }
+   return false;
+}
+// =============================================================== setScalar
+inline void Hexa::setScalar  (double val)
+{
+   for (int nc=0 ; nc< HV_MAXI ; nc++)
+       h_vertex[nc] -> setScalar (val);
+}
+// ============================================================== markElements
+inline void Hexa::markElements  (int marque)
+{
+   for (int nc=0 ; nc< HQ_MAXI ; nc++) h_quad  [nc] -> setMark (marque);
+   for (int nc=0 ; nc< HE_MAXI ; nc++) h_edge  [nc] -> setMark (marque);
+   for (int nc=0 ; nc< HV_MAXI ; nc++) h_vertex[nc] -> setMark (marque);
+}
+// =============================================================== duplicate
+inline void Hexa::duplicate  ()
+{
+   h_clone = new Hexa (GetClone (h_quad [Q_A]), 
+                       GetClone (h_quad [Q_B]), 
+                       GetClone (h_quad [Q_C]), 
+                       GetClone (h_quad [Q_D]), 
+                       GetClone (h_quad [Q_E]), 
+                       GetClone (h_quad [Q_F]));
+}
+END_NAMESPACE_HEXA
+#endif
+
diff --git a/src/HEXABLOCK/HexKasBiCylinder.cxx b/src/HEXABLOCK/HexKasBiCylinder.cxx
new file mode 100755 (executable)
index 0000000..1312b4b
--- /dev/null
@@ -0,0 +1,297 @@
+//
+// CC++ : Interface Cascade de la classe Elements
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexKasBiCylinder.hxx"
+#include "HexKasLine.hxx"
+#include "HexKas_functions.hxx"
+
+#ifndef NO_CASCADE
+
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+
+#include <GCPnts_AbscissaPoint.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+
+// HEXABLOCK includes
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexShape.hxx"
+#include "HexDiagnostics.hxx"
+                                    // Cercles 
+#include <GEOMImpl_CircleDriver.hxx>
+#include <GEOMImpl_ICircle.hxx>
+
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Tool.hxx>
+
+#include <GC_MakeCircle.hxx>
+#include <Geom_Circle.hxx>
+
+#include <gp_Circ.hxx>
+                                    // Sphere
+#include <BRepPrimAPI_MakeSphere.hxx>
+                                    // Cylindre
+#include <GEOMImpl_CylinderDriver.hxx>
+#include <GEOMImpl_ICylinder.hxx>
+#include <BRepPrimAPI_MakeCylinder.hxx>
+#include <BRepAlgoAPI_Section.hxx>
+                                    // Decoupage
+#include <TopExp_Explorer.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+static KasBiCylinder current_bicyl;
+
+// ====================================================== purge
+void KasBiCylinder::purge ()
+{
+    no_inter = true;
+    inter_line.clear ();
+}
+// ====================================================== defineCyls 
+int KasBiCylinder::defineCyls (double* borig,  double* bnorm, double* bbase,
+                              double  brayon, double  bhaut,
+                              double* sorig,  double* snorm, double* sbase,
+                              double  srayon, double  shaut)
+{
+   db = on_debug ();
+   purge ();
+   if (db)
+      {
+      printf (" ====================== defineCyls\n");
+      printf ("    ----- borig=(%g,%g,%g)\n", borig[0], borig[1], borig[2]);
+      printf ("    ----- bbase=(%g,%g,%g)\n", bbase[0], bbase[1], bbase[2]);
+      printf ("    ----- bnorm=(%g,%g,%g)\n", bnorm[0], bnorm[1], bnorm[2]);
+      printf ("    ----- brayon=%g, bhaut=%g\n", brayon, bhaut);
+      printf ("\n");
+      printf ("    ----- sorig=(%g,%g,%g)\n", sorig[0], sorig[1], sorig[2]);
+      printf ("    ----- sbase=(%g,%g,%g)\n", sbase[0], sbase[1], sbase[2]);
+      printf ("    ----- snorm=(%g,%g,%g)\n", snorm[0], snorm[1], snorm[2]);
+      printf ("    ----- srayon=%g, shaut=%g\n", srayon, shaut);
+      }
+
+                    // --------------------------- Preparation
+   gp_Pnt gpb_orig (borig [dir_x], borig [dir_y], borig [dir_z]);
+   gp_Vec gpb_norm (bnorm [dir_x], bnorm [dir_y], bnorm [dir_z]);
+   gp_Vec gpb_vx   (bbase [dir_x], bbase [dir_y], bbase [dir_z]);
+   gp_Ax2 gpb_axes (gpb_orig, gpb_norm, gpb_vx);
+// gp_Ax2  gp_axes (gp_center, gp_norm, gp_vx);
+
+   BRepPrimAPI_MakeCylinder make_bcyl (gpb_axes, brayon, bhaut);
+   make_bcyl.Build();
+
+   gp_Pnt gps_orig (sorig [dir_x], sorig [dir_y], sorig [dir_z]);
+   gp_Vec gps_vx   (sbase [dir_x], sbase [dir_y], sbase [dir_z]);
+   gp_Vec gps_norm (snorm [dir_x], snorm [dir_y], snorm [dir_z]);
+   gp_Ax2 gps_axes (gps_orig, gps_norm, gpb_vx);
+
+   BRepPrimAPI_MakeCylinder make_scyl (gps_axes, srayon, shaut);
+   make_scyl.Build();
+
+   if (NOT make_bcyl.IsDone())
+      {
+      printf ("defineCyls : Can' build big cylinder\n");
+      return HERR;
+      }
+   else if (NOT make_scyl.IsDone())
+      {
+      printf ("defineCyls : Can' build small cylinder\n");
+      return HERR;
+      }
+                    // --------------------------- Intersection
+
+   TopoDS_Shape cyl_big   = make_bcyl.Shape();
+   TopoDS_Shape cyl_small = make_scyl.Shape();
+
+   BRepAlgoAPI_Section make_inter (cyl_big, cyl_small, false);
+   make_inter.Approximation (true);
+   make_inter.Build();
+
+   if (NOT make_inter.IsDone())
+      {
+      printf ("defineCyls : No intersection\n");
+      return HERR;
+      }
+
+   TopoDS_Shape    cyl_inter = make_inter.Shape();
+   // geom_make_brep (cyl_inter, brep);
+
+                    // --------------------------- Recuperation
+   string crep;
+   Shape shape (crep);
+
+   TopExp_Explorer explo (cyl_inter, TopAbs_EDGE);
+   int nroline = 0;
+   static int nbrep = 0;
+   while (explo.More())
+         {
+         TopoDS_Shape ligne = explo.Current();
+         // TopoDS_Edge ligne = explo.Current();
+         explo.Next ();
+
+         cout << "____________________________________ Ligne suivante" << endl;
+         geom_make_brep (ligne, crep);
+         if (db) 
+            {
+            cout << "----  save_brep inter" << nbrep+1 << ".brep" << endl;
+            save_brep ("inter", crep, nbrep);
+            }
+         shape.setBrep (crep);
+
+         KasLine* geom_line = new KasLine (&shape);
+         inter_line.push_back (geom_line);
+         nroline ++;
+         }
+   return HOK;
+}
+// ====================================================== anaVertex
+// === Trouve le(s) ligne(s) contenant ce vertex et le(s) parametre(s)
+int KasBiCylinder::anaVertex (Vertex* node, int* tline, double* tpara)
+{
+   Real3  point; 
+   node->getPoint (point);
+   int nbsol = 0;
+   int nblines = inter_line.size();
+
+   for (int nl=0 ; nl<nblines ; nl++)
+       {
+       double param = inter_line[nl]->findParam (point);
+       if (param>=0)
+          {
+          if (db) 
+              cout << " ... findParam " << node->getName() 
+                   << ", point=(" << point[0] << ", " << point[1] 
+                                 << ", " << point[2] 
+                   << "), nl=" << nl << ", param=" << param << endl;
+          if (nbsol>=2)
+             return nbsol;
+
+          tline [nbsol] = nl;
+          tpara [nbsol] = param;
+          nbsol ++;
+          }
+       }
+
+   if (nbsol==1)
+      {
+      if (tpara[0]<=Epsil)
+         {
+         nbsol ++;
+         tpara[1] = 1.0;
+         tline[1] = tline[0]-1;
+         if (tline[1] <0) tline[1] = nblines-1;
+         }
+      else if (tpara[0]>=UnEpsil)
+         {
+         nbsol ++;
+         tpara[1] = 0;
+         tline[1] = tline[0]+1;
+         if (tline[1] >= nblines) tline[1] = 0;
+         }
+      }
+
+   return nbsol;
+}
+// ====================================================== associate
+// ==== On suppose une orientation correcte
+int KasBiCylinder::associate (Edge* edge)
+{
+   edge->clearAssociation ();
+
+   double tparam1 [V_TWO], tparam2 [V_TWO];
+   int    tline1  [V_TWO], tline2  [V_TWO];
+   int sol1 = anaVertex (edge->getVertex(V_AMONT), tline1, tparam1);
+   int sol2 = anaVertex (edge->getVertex(V_AVAL),  tline2, tparam2);
+
+   if (sol1==0 || sol2==0)
+      return HERR;
+                                // Ligne commune ? 
+   for (int ns1=0 ; ns1<sol1 ; ns1++)
+       {
+       int nlig = tline1[ns1];
+       for (int ns2=0 ; ns2<sol2 ; ns2++)
+           {
+           if (tline2[ns2] == nlig)
+              {
+              double param1 = tparam1[ns1];
+              double param2 = tparam2[ns2];
+              if (param1 >= 1.0-Epsil && param1 <= 1.0+Epsil)
+                  param1  = 0.0;
+              if (param2 >= -Epsil && param2 <= Epsil)
+                  param2  = 1.0;
+              if (param1 < param2)
+                  inter_line[nlig]->assoEdge (edge, param1, param2, 2);
+              else
+                     // Le debut de la ligne (fermee) est entre les 2 vertex)
+                  {
+                  inter_line[nlig]->assoEdge (edge, param1, 1.0, V_AMONT);
+                  inter_line[nlig]->assoEdge (edge, 0.0, param2, V_AVAL);
+                  }
+              return HOK;
+              }  
+           }
+       }
+   
+    inter_line[tline1[0]]->assoEdge (edge, tparam1[0],    1.0,  V_AMONT);
+    inter_line[tline2[0]]->assoEdge (edge, 0,      tparam2[0], V_AVAL);
+    return HOK;
+}
+// ====================================================== geom_create_cylcyl
+int geom_create_cylcyl (double* borig, double* bnorm, double* bbase,
+                        double  bray,  double  bhaut,
+                        double* sorig, double* snorm, double* sbase,
+                        double  sray,  double  shaut)
+{
+   int ier = current_bicyl.defineCyls (borig, bnorm, bbase, bray,  bhaut,
+                                       sorig, snorm, sbase, sray,  shaut);
+   return ier;
+}
+// ====================================================== geom_asso_cylcyl
+int geom_asso_cylcyl (Edge* edge)
+{
+   cout << " ___________________________________ geom_asso_cylcyl " 
+        << edge->getName () << " = (" << edge->getVertex(0)->getName () 
+                            << ","  << edge->getVertex(1)->getName () 
+        << ")" << endl;
+
+   int ier = current_bicyl.associate (edge);
+   return ier;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexKasBiCylinder.hxx b/src/HEXABLOCK/HexKasBiCylinder.hxx
new file mode 100755 (executable)
index 0000000..89b96dc
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// CC++ : Representation Cascade d'un bi-cylindre
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __KAS_BI_CYLINDER_HXX_
+#define __KAS_BI_CYLINDER_HXX_
+
+#include "HexGlobale.hxx"
+
+#ifndef NO_CASCADE
+
+BEGIN_NAMESPACE_HEXA
+
+class KasLine;
+
+class KasBiCylinder
+{
+public :
+   KasBiCylinder () { purge () ; }
+  ~KasBiCylinder () { purge () ; }
+   int defineCyls (double* borig,  double* bnorm, double* bbase,
+                   double  brayon, double  bhaut,
+                   double* sorig,  double* snorm, double* sbase,
+                   double  srayon, double  shaut);
+   int associate  (Edge* edge);
+
+private :
+   int  anaVertex (Vertex* node, int* tline, double* tpara);
+   void purge ();
+
+private :
+   std::vector <KasLine*> inter_line;
+   bool no_inter;
+};
+END_NAMESPACE_HEXA
+#endif
+#endif
diff --git a/src/HEXABLOCK/HexKasLine.cxx b/src/HEXABLOCK/HexKasLine.cxx
new file mode 100755 (executable)
index 0000000..815d9b8
--- /dev/null
@@ -0,0 +1,442 @@
+//
+// CC++ : Implementation Cascade des lignes
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexKasLine.hxx"
+#include "HexKasPoint.hxx"
+#include "HexKas_functions.hxx"
+
+#ifndef NO_CASCADE
+
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+
+#include <GCPnts_AbscissaPoint.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+
+// HEXABLOCK includes
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexShape.hxx"
+#include "HexDiagnostics.hxx"
+
+#include <GeomAPI_ProjectPointOnCurve.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+static const double TolAsso = 1e-2;    // Tolerance pour les associations
+
+void arrondir (double &val);
+
+// ======================================================= Constructeur
+KasLine::KasLine ()
+{
+   db = on_debug ();
+   lig_brep     = "";
+   lig_debut    = 0;
+   lig_fin      = 1;
+   geom_inverse = false;
+   start_absc   = 0;
+   end_absc     = 1;
+   geom_rang    = NOTHING;
+
+   // geom_line   = TopoDS::Edge(shape);
+   geom_curve  = NULL;
+   geom_length = 0;
+   geom_total_length = 0;
+   for (int nc=0; nc <DIM3 ; nc++) start_coord [nc] = end_coord [nc] = 0;
+}
+// ========================================================= Constructeur bis
+KasLine::KasLine (Shape* asso, double deb, double fin)
+{
+   db = on_debug ();
+   geom_curve  = NULL;
+   defineLine (asso, deb, fin);
+}
+// ========================================================= Destructeur
+KasLine::~KasLine ()
+{
+   delete geom_curve;
+}
+// ========================================================= defineLine
+// === Creation de la quincaillerie associee a une shape 
+void KasLine::defineLine (Shape* asso, double deb, double fin)
+{
+   lig_brep  = asso->getBrep ();
+   lig_ident = asso->getName ();
+   lig_ior   = asso->getIor  ();
+
+   if (fin<0.0)
+      {
+      lig_debut = asso->debut;
+      lig_fin   = asso->fin;
+      }
+   else if (deb >= UnEpsil)
+      {
+      lig_debut = fin;
+      lig_fin   = deb ;
+      }
+   else 
+      {
+      lig_debut = deb;
+      lig_fin   = fin;
+      }
+
+   geom_inverse = false;
+   start_absc   = 0;
+   end_absc     = 1;
+
+   istringstream streamBrep (lig_brep);
+   BRep_Builder  aBuilder;
+   TopoDS_Shape  topo;
+
+   BRepTools::Read(topo, streamBrep, aBuilder);
+   geom_line  = TopoDS::Edge(topo);
+   delete geom_curve;
+   geom_curve = new BRepAdaptor_Curve (geom_line);
+                               // Longueur de la ligne
+   double umin = 0, umax = 0;
+   TopLoc_Location    loc;
+   Handle(Geom_Curve) handle = BRep_Tool::Curve (geom_line, loc, umin, umax);
+   GeomAdaptor_Curve  AdaptCurve (handle);
+   geom_total_length = GCPnts_AbscissaPoint::Length(AdaptCurve, umin, umax);
+   geom_length = geom_total_length * fabs (lig_fin-lig_debut);
+
+                               // Extremites
+   GCPnts_AbscissaPoint s1 (*geom_curve, geom_total_length*lig_debut, 
+                             geom_curve->FirstParameter());
+   GCPnts_AbscissaPoint s2 (*geom_curve, geom_total_length*lig_fin, 
+                             geom_curve->FirstParameter());
+
+   par_mini     = s1.Parameter ();
+   par_maxi     = s2.Parameter ();
+   start_gpoint = geom_curve->Value (par_mini);
+   end_gpoint   = geom_curve->Value (par_maxi);
+   majCoord ();
+
+   if (db) 
+      {
+      Echo (" ____________________________________  KasLine::defineLine");
+      HexDisplay (deb);
+      HexDisplay (fin);
+      HexDisplay (lig_debut);
+      HexDisplay (lig_fin);
+      HexDisplay (geom_total_length);
+      HexDisplay (geom_curve->FirstParameter());
+      HexDisplay (s1.Parameter());
+      HexDisplay (s2.Parameter());
+
+      PutCoord (start_coord);
+      PutCoord (end_coord);
+      }
+}
+// ========================================================= assoPoint
+void KasLine::assoPoint (double abscis, Vertex* node)
+{
+   GCPnts_AbscissaPoint s1 (*geom_curve, abscis, 
+                             geom_curve->FirstParameter());
+   double gparam       = s1.Parameter ();
+   gp_Pnt pnt_asso = geom_curve->Value (gparam);
+
+   KasPoint gpoint;
+   gpoint.definePoint (pnt_asso);
+   gpoint.associate   (node);
+
+   if (db)
+      {
+      double* coord = gpoint.getCoord();
+      char    car   = '%';
+      if (node->definedBy (coord[dir_x], coord[dir_y], coord[dir_z]))
+         car= ' ';
+      printf (" ... assoPoint%c: v=%s (%g,%g,%g), p=%g", car,
+           node->getName(), node->getX(), node->getY(), node->getZ(), abscis);
+      printf (" -> (%g,%g,%g)\n", coord[dir_x], coord[dir_y], coord[dir_z]);
+      }
+}
+// ========================================================= associate
+void KasLine::associate (Edge* edge, double sm1, double sm2, int vorig)
+{
+   if (sm2 < start_absc) return;
+   if (sm1 > end_absc)   return;
+
+   Vertex* segment[V_TWO] = { edge->getVertex (vorig), 
+                              edge->getVertex (1-vorig) };
+
+   double vpara1 = lig_debut + (sm1-start_absc)/geom_total_length;
+   double vpara2 = lig_debut + (sm2-start_absc)/geom_total_length;
+   if (geom_inverse)
+      {
+      vpara2 = lig_fin - (sm1-start_absc)/geom_total_length;
+      vpara1 = lig_fin - (sm2-start_absc)/geom_total_length;
+      }
+
+   double lpara1 = std::max (lig_debut, std::min (lig_fin, vpara1));
+   double lpara2 = std::max (lig_debut, std::min (lig_fin, vpara2));
+
+   arrondir (vpara1);    arrondir (vpara2);
+   arrondir (lpara1);    arrondir (lpara2);
+
+   if (db)
+      {
+      cout << " ++ KasLine::associate : rg=" << geom_rang  << "s=" << vorig
+           << endl;
+      cout << " ligpara = [ " << lig_debut << ", " << lig_fin << " ]" << endl;
+      cout << " absc    = [ " << start_absc << ", " << end_absc << " ]\n" ;
+
+      cout << " Edge    = " << edge->getName() << 
+                     " = [ " << segment[0]->getName() << ", " 
+           << ","             << segment[1]->getName() << endl;
+      cout << " smx     = [ " << sm1    << ", " << sm2    << " ]" << endl;
+      cout << " vparam  = [ " << vpara1 << ", " << vpara2 << " ]" << endl;
+      cout << " lparam  = [ " << lpara1 << ", " << lpara2 << " ]" << endl;
+      }
+
+   if (lpara2 >= lpara1 + TolAsso)
+      {
+      assoEdge (edge, lpara1, lpara2);
+      }
+   else if (db)
+      {
+      printf (" Asso Line refusee %s -> (%g,%g)\n", edge->getName(),
+                                                    lpara1, lpara2);
+      }
+
+                               // ---------------Association du vertex 
+   double hparam = geom_inverse ? vpara2 : vpara1;
+   double smx   = sm1;
+   double absc1 = start_absc - TolAsso*geom_total_length;
+   double absc2 = end_absc   + TolAsso*geom_total_length;
+
+   for (int nx=V_AMONT ; nx<=V_AVAL ; nx++)
+       {
+       if (smx >= absc1 && smx <= absc2)
+          {
+          Vertex* node = segment [nx];
+          if (node->getAssociation()==NULL)
+             {
+                                          // .....  Coordonnees du point
+
+             double abscis = geom_total_length*hparam;
+             GCPnts_AbscissaPoint s1 (*geom_curve, abscis, 
+                                       geom_curve->FirstParameter());
+             double gparam       = s1.Parameter ();
+             gp_Pnt pnt_asso = geom_curve->Value (gparam);
+
+                                          // .....  Creation d'un vertex Geom
+             KasPoint gpoint;
+             gpoint.definePoint (pnt_asso);
+             gpoint.associate (node);
+             if (db)
+                {
+                double* ass = gpoint.getCoord();
+                printf (" Asso Point %s (%g,%g,%g) -> (%g,%g,%g) p=%g s=%g\n", 
+                    node->getName(), node->getX(), node->getY(), node->getZ(),
+                    ass[dir_x], ass[dir_y], ass[dir_z], hparam, smx);
+                }
+             }
+         else if (db)
+             {
+             double abscis = geom_total_length*hparam;
+             GCPnts_AbscissaPoint s1 (*geom_curve, abscis, 
+                                    geom_curve->FirstParameter());
+             double gparam   = s1.Parameter ();
+             gp_Pnt pnt_asso = geom_curve->Value (gparam);
+
+                                          // .....  Creation d'un vertex Geom
+             KasPoint gpoint;
+             gpoint.definePoint (pnt_asso);
+             double* ass = gpoint.getCoord();
+             // gpoint.associate (node);
+             printf (" Asso Point %s (%g,%g,%g) -> (%g,%g,%g) p=%g s=%g\n", 
+                     node->getName(),
+                     node->getX(), node->getY(), node->getZ(),
+                     ass[dir_x], ass[dir_y], ass[dir_z], hparam, smx);
+
+             gpoint.definePoint (node);
+             ass = gpoint.getCoord();
+             printf ("               ignore car deja associe a (%g,%g, %g)\n", 
+                     ass[dir_x], ass[dir_y], ass[dir_z]);
+             }
+          }
+      hparam = geom_inverse ? vpara1 : vpara2;
+      smx   = sm2;
+      }
+}
+// ========================================================= assoEdge
+void KasLine::assoEdge (Edge* edge, double para1, double para2, int vass)
+{
+   Shape* shape = new Shape (lig_brep);
+   shape->setName   (lig_ident);
+   shape->setIor    (lig_ior);
+   shape->setBounds (para1, para2);
+
+   edge ->addAssociation (shape);
+
+   if (db) printf (" ... Asso Edge %s -> (%g,%g)\n", 
+           edge->getName(), para1, para2);
+
+   double lg = geom_total_length;
+   switch (vass) 
+      {
+      case V_AMONT :
+           assoPoint (para1*lg, edge->getVertex (V_AMONT));
+           break;
+      case V_AVAL  :
+           assoPoint (para2*lg, edge->getVertex (V_AVAL));
+           break;
+      case V_TWO   :
+           assoPoint (para1*lg, edge->getVertex (V_AMONT));
+           assoPoint (para2*lg, edge->getVertex (V_AVAL ));
+           break;
+      default :;
+      }
+}
+// ========================================================= majCoord
+void KasLine::majCoord ()
+{
+   start_coord [dir_x] = start_gpoint.X();
+   start_coord [dir_y] = start_gpoint.Y();
+   start_coord [dir_z] = start_gpoint.Z();
+
+   end_coord   [dir_x] = end_gpoint.X();
+   end_coord   [dir_y] = end_gpoint.Y();
+   end_coord   [dir_z] = end_gpoint.Z();
+}
+// ========================================================= setBounds
+void KasLine::setBounds (double deb, double fin)
+{
+   lig_debut = deb;
+   lig_fin   = fin;
+}
+// ========================================================= inverser
+void KasLine::inverser ()
+{
+   gp_Pnt  foo  = start_gpoint;
+   start_gpoint = end_gpoint;
+   end_gpoint   = foo;
+
+              // Prendre le complementaire de l'intercvale initial
+   if (lig_debut > Epsil && lig_debut < UnEpsil)
+      {
+      lig_fin  = lig_debut;
+      lig_debut = 0;
+      cout << " ... inverser : fin = debut = " << lig_fin << endl;
+      }
+   else if (lig_fin > Epsil && lig_fin < UnEpsil)
+      {
+      lig_debut = lig_fin;
+      lig_fin   = 1;
+      cout << " ... inverser : debut = fin = " << lig_debut  << endl;
+      }
+
+   geom_inverse = NOT geom_inverse;
+   majCoord ();
+}
+// ========================================================= setRank
+void KasLine::setRank (int nro, int sens, double& abscisse)
+{
+   if (sens==V_AVAL)
+      inverser ();
+
+   geom_rang  = nro;
+   start_absc = abscisse;
+   abscisse   = end_absc = start_absc + (lig_fin-lig_debut) * geom_total_length;
+
+   if (db)
+      {
+      cout << "KasLine::setRank : nro = " << nro << " sens="  << sens 
+           <<  " = (" << start_absc << ", " << end_absc << ")" << endl;
+      }
+}
+// ========================================================= findBound
+int KasLine::findBound (double* coord)
+{
+   if (same_coords (coord, start_coord) )
+      return V_AMONT;
+
+   if (same_coords (coord, end_coord) )
+      return V_AVAL;
+
+   return NOTHING;
+}
+// ========================================================= findParam
+double KasLine::findParam (double* coord)
+{
+   double umin = 0, umax = 0;
+   gp_Pnt gpoint (coord[dir_x], coord[dir_y], coord[dir_z]);
+   Handle(Geom_Curve) handle = BRep_Tool::Curve (geom_line, umin, umax);
+
+   GeomAPI_ProjectPointOnCurve projector (gpoint, handle);
+   if ( projector.NbPoints() == 0 )
+      return -1.0;
+
+   double gparam = projector.LowerDistanceParameter();
+   if (gparam <par_mini || gparam>par_maxi)
+      {
+      // cout << " Rejet : " << gparam << " not in (" << par_mini 
+      //                              << ", " << par_maxi << ")" << endl;
+      return -1.0;
+      }
+   gp_Pnt rpoint = geom_curve->Value (gparam);
+   if (NOT same_coords (gpoint, rpoint))
+      {
+      //  cout << " Rejet : points differents " << endl;
+      return -1.0;
+      }
+
+
+   GeomAdaptor_Curve  adapt_curve (handle);
+   double abscis = GCPnts_AbscissaPoint::Length (adapt_curve, umin, gparam);
+   double hparam = abscis/geom_total_length;
+  
+   // gparam = (gparam-par_mini) / (par_maxi-par_mini); 
+   return hparam;
+}
+// ========================================================= arrondir
+void arrondir (double &val)
+{
+   if (val >= -TolAsso && val <= TolAsso)
+      {
+      val = 0.0;
+      }
+   else if (val >= 1.0-TolAsso && val <= 1.0+TolAsso)
+      {
+      val = 1.0;
+      }
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexKasLine.hxx b/src/HEXABLOCK/HexKasLine.hxx
new file mode 100755 (executable)
index 0000000..9fb885f
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// CC++ : Interface Cascade de la ligne
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __KAS_LINE_HXX_
+#define __KAS_LINE_HXX_
+
+#include "HexGlobale.hxx"
+
+#ifndef NO_CASCADE
+
+#include <gp_Pnt.hxx>
+#include <BRepAdaptor_Curve.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+class KasPoint;
+
+class KasLine
+{
+public :
+   KasLine ();
+   KasLine (Shape* shape, double deb=-1.0, double fin=-1.0);
+  ~KasLine ();
+   int  findBound (double* point);
+   // void setAbscissa (double total, double& abscisse);
+   void inverser ();
+   void setBounds (double deb, double fin);
+
+   double* getStart  ()       { return start_coord ; }
+   double* getEnd    ()       { return end_coord   ; }
+   double  getLength ()       { return geom_length ; }
+   double  getRank   ()       { return geom_rang ; }
+
+   void defineLine (Shape* asso, double deb=-1.0, double fin=-1.0);
+   void setRank    (int rang, int sens, double& abscisse);
+   void associate  (Edge* edge, double sm1, double sm2, int orig=V_AMONT);
+   void assoEdge   (Edge* edge, double pm1, double pm2, int vass=NOTHING);
+   void assoPoint  (double alpha, Vertex* node);
+
+   double findParam  (double* point);
+
+private :
+   void majCoord ();
+
+private :
+   string lig_brep,  lig_ident, lig_ior;
+   double lig_debut, lig_fin;
+   double par_mini,  par_maxi;
+
+   bool   geom_inverse; 
+   int    geom_rang;
+   Real3  start_coord,  end_coord;
+   double start_absc, end_absc;        // Abscisse globale
+   double geom_length;
+   double geom_total_length;
+
+   gp_Pnt             start_gpoint, end_gpoint;
+   TopoDS_Edge        geom_line;
+   BRepAdaptor_Curve* geom_curve;
+};
+END_NAMESPACE_HEXA
+#endif
+#endif
diff --git a/src/HEXABLOCK/HexKasPoint.cxx b/src/HEXABLOCK/HexKasPoint.cxx
new file mode 100755 (executable)
index 0000000..3668cf9
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// CC++ : Interface Cascade de la classe Elements
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexKasPoint.hxx"
+#include "HexVertex.hxx"
+#include "HexShape.hxx"
+
+#ifndef NO_CASCADE
+
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+
+#include <GCPnts_AbscissaPoint.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <gp_Pnt.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+static bool db = false;
+
+// ======================================================= Constructeur
+KasPoint::KasPoint ()
+{
+   db = on_debug();
+   razPoint ();
+}
+// ======================================================= razPoint
+void KasPoint::razPoint ()
+{
+   is_ok = false;
+   b_rep = "";
+   for (int nc=0; nc <DIM3 ; nc++) g_coord [nc] = 0;
+}
+// ======================================================= definePoint (vertex)
+int KasPoint::definePoint (Vertex* node)
+{
+   razPoint ();
+
+   if (node==NULL)
+      return HERR;
+
+   Shape* asso = node->getAssociation();
+   if (asso==NULL)
+      return HERR;
+   b_rep = asso->getBrep ();
+
+   TopoDS_Shape topo;
+   istringstream streamBrep(b_rep);
+   BRep_Builder aBuilder;
+   BRepTools::Read(topo, streamBrep, aBuilder);
+
+   if (topo.ShapeType() != TopAbs_VERTEX)
+      return HERR;
+
+   is_ok    = true;
+   g_vertex = TopoDS::Vertex (topo);
+   g_point  = BRep_Tool::Pnt( g_vertex );
+
+   g_coord [dir_x] = g_point.X(); 
+   g_coord [dir_y] = g_point.Y(); 
+   g_coord [dir_z] = g_point.Z(); 
+   return HOK;
+}
+// ======================================================= definePoint (xyz)
+void KasPoint::definePoint (Real3 coord)
+{
+   gp_Pnt gpoint (coord[dir_x], coord[dir_y], coord[dir_z]);
+   definePoint   (gpoint);
+}
+// ======================================================= definePoint (g_pnt)
+void KasPoint::definePoint (gp_Pnt& gpoint)
+{
+   is_ok   = true;
+   g_point = gpoint;
+
+   ostringstream   stream_shape;
+
+   BRepBuilderAPI_MakeVertex mkVertex (g_point);
+   TopoDS_Shape              aShape = mkVertex.Shape();
+   BRepTools::Write(aShape, stream_shape);
+
+   g_vertex = TopoDS::Vertex( aShape );
+   b_rep    = stream_shape.str();
+
+   g_coord [dir_x] = g_point.X();
+   g_coord [dir_y] = g_point.Y();
+   g_coord [dir_z] = g_point.Z();
+
+   if (db)
+      {
+      cout << " KasPoint::definePoint :" << endl;
+      PutCoord (g_coord);
+      }
+}
+// ======================================================= associate
+void KasPoint::associate (Vertex* node)
+{
+   if (db) cout << " ++ KasPoint::associate " << endl;
+   if (db) PutName (node);
+   if (node==NULL)
+      return;
+
+   Shape* vshape = new Shape (b_rep);
+   node->setAssociation (vshape);
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexKasPoint.hxx b/src/HEXABLOCK/HexKasPoint.hxx
new file mode 100755 (executable)
index 0000000..24b6d66
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// CC++ : Representation Cascade d'un point
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __KAS_POINT_HXX_
+#define __KAS_POINT_HXX_
+
+#include "HexGlobale.hxx"
+
+#ifndef NO_CASCADE
+
+#include <gp_Pnt.hxx>
+#include <TopoDS_Vertex.hxx>
+
+BEGIN_NAMESPACE_HEXA
+class KasPoint
+{
+public :
+   KasPoint ();
+   double* getCoord () { return g_coord;   }
+   bool    isOk  ()    { return is_ok;     }
+   bool    isBad ()    { return NOT is_ok; }
+
+   void associate   (Vertex* node);
+   void razPoint    ();
+   int  definePoint (Vertex* node);
+   void definePoint (double*   coord);
+   void definePoint (gp_Pnt& gpoint);
+
+   TopoDS_Vertex& getVertex ()              { return g_vertex;  }
+
+private :
+   string b_rep; 
+   Real3  g_coord;
+   bool   is_ok;
+
+   TopoDS_Vertex g_vertex;
+   gp_Pnt        g_point;
+};
+END_NAMESPACE_HEXA
+#endif
+#endif
diff --git a/src/HEXABLOCK/HexKas_functions.cxx b/src/HEXABLOCK/HexKas_functions.cxx
new file mode 100755 (executable)
index 0000000..f6eeedd
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// CC++ : Fonctions Interface Cascade
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef NO_CASCADE
+
+#include "HexKas_functions.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== same_coords
+bool same_coords (gp_Pnt& pa, gp_Pnt& pb, double epsilon)
+{
+   double d2 = carre (pb.X()-pa.X()) + carre (pb.Y()-pa.Y()) 
+                                     + carre (pb.Z()-pa.Z()) ;
+   return d2 < epsilon;
+}
+// ====================================================== save_brep
+void save_brep (cpchar nom, string brep, int& compteur)
+{
+    char buff[8];
+    compteur ++;
+    sprintf (buff ,"%d", compteur);
+
+    string name (nom);
+    name += buff;
+    name += ".brep";
+    FILE*    fic = fopen (name.c_str(), "w");
+    fprintf (fic, "%s\n", brep.c_str());
+    fclose  (fic);
+}
+// ====================================================== geom_make_brep 
+void geom_make_brep (TopoDS_Shape& shape, string& brep)
+{
+   ostringstream  stream_shape;
+   BRepTools::Write (shape, stream_shape);
+   brep = stream_shape.str();
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexKas_functions.hxx b/src/HEXABLOCK/HexKas_functions.hxx
new file mode 100755 (executable)
index 0000000..42213b8
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// CC++ : Representation Cascade d'un point
+//
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _KAS_FUNCTIONS_HXX
+#define _KAS_FUNCTIONS_HXX
+
+#ifndef NO_CASCADE
+
+#include "HexGlobale.hxx"
+
+#include <gp_Pnt.hxx>
+#include <TopoDS_Shape.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepTools.hxx>
+
+BEGIN_NAMESPACE_HEXA
+
+int geom_create_cylcyl (double* borig, double* bnorm, double* bbase,
+                        double  bray,  double  bhaut,
+                        double* sorig, double* snorm, double* sbase,
+                        double  sray,  double  shaut);
+int geom_asso_cylcyl (Edge* edge);
+
+bool same_coords (gp_Pnt& pa, gp_Pnt& pb, double epsil2=1e-6);
+void save_brep   (cpchar nom, string brep, int& nro);
+void geom_make_brep (TopoDS_Shape& shape, string& brep);
+
+END_NAMESPACE_HEXA
+#endif
+#else             // NO_CASCADE
+#endif            // NO_CASCADE
diff --git a/src/HEXABLOCK/HexLaw.cxx b/src/HEXABLOCK/HexLaw.cxx
new file mode 100644 (file)
index 0000000..b163739
--- /dev/null
@@ -0,0 +1,57 @@
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexLaw.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+int Law::last_law_id = 0;
+
+// ================================================== Constructeur
+Law::Law (cpchar name, int nbnodes)
+{
+   nbr_nodes = nbnodes;
+   law_id = last_law_id++;
+
+   //Initialisation du nom: un nom par défaut est donné s'il n'est pas fourni
+   std::string _nom = std::string(name);
+   _nom.erase (_nom.find_last_not_of (" \n\r\t" ) + 1);
+   _nom.erase (0, _nom.find_first_not_of (" \n\r\t" ));
+   if (!_nom.empty())
+       law_name = _nom;
+   else {
+       char buffer [16];
+       sprintf (buffer, "l%04d", law_id);
+        law_name = std::string(buffer);
+   }
+
+   law_type  = Uniform;
+   law_coefficient = 0.0;
+}
+// ================================================== Constructeur 2
+Law::Law (Law* other)
+{
+   nbr_nodes       = other->nbr_nodes;
+   law_name        = other->law_name ;
+   law_type        = other->law_type ;
+   law_coefficient = other->law_coefficient;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexLaw.hxx b/src/HEXABLOCK/HexLaw.hxx
new file mode 100755 (executable)
index 0000000..19f7105
--- /dev/null
@@ -0,0 +1,96 @@
+
+// class : Au nom de la loi
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __LAW_H_
+#define __LAW_H_
+
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Law 
+{
+public:
+   const char* getName ()          { return law_name.c_str() ; }
+   int     getNodes ()             { return nbr_nodes ; }
+   double  getCoefficient ()       { return law_coefficient ; }
+   KindLaw getKind ()              { return law_type ;  }
+
+   int     setNodes (int  nbre);
+   int     setCoefficient (double coeff);
+   void    setKind (KindLaw type)  { law_type = type ;  }
+   void    setKind (cpchar  type);
+   int     setName (cpchar  nom);
+
+    Law (cpchar name, int nbnodes);
+    Law (Law* other);
+    void saveXml (XmlWriter* xml);
+
+private:
+    int law_id;
+    static int last_law_id;
+    std::string law_name;
+    int         nbr_nodes;
+    KindLaw     law_type;
+    double      law_coefficient;
+};
+
+// ================================================== setNodes
+inline int Law::setNodes (int  nbre)
+{
+   nbr_nodes = nbre;
+   return HOK;
+}
+// ================================================== setCoefficient
+inline int Law::setCoefficient (double coeff)
+{
+   law_coefficient = coeff;
+   return HOK;
+}
+// ================================================== setName
+inline int Law::setName (cpchar name)
+{
+   law_name = name;
+   return HOK;
+}
+// ================================================== saveXml
+inline void Law::saveXml (XmlWriter* xml)
+{
+   cpchar kind_law [] = { "Uniform", "Arithmetic", "Geometric" };
+
+   xml->openMark     ("Law");
+   xml->addAttribute ("id",          getName ());
+   xml->addAttribute ("kind",    kind_law [law_type]);
+   xml->addAttribute ("nodes",   nbr_nodes);
+   xml->addAttribute ("coeff", law_coefficient);
+   xml->closeMark ();
+}
+// ================================================== setKind
+inline void Law::setKind (cpchar type)
+{
+#define VerifKind(t,k) if (strcmp(t,#k)==0) law_type = k
+   VerifKind (type, Uniform);
+   VerifKind (type, Arithmetic);
+   VerifKind (type, Geometric);
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexMatrix.hxx b/src/HEXABLOCK/HexMatrix.hxx
new file mode 100755 (executable)
index 0000000..db3cf98
--- /dev/null
@@ -0,0 +1,304 @@
+
+// class : Les matrices
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __MATRIX_H
+#define __MATRIX_H
+
+#include "HexVertex.hxx"
+#include "HexVector.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+class Matrix 
+{
+public:
+    Matrix ();
+    int defTranslation   (Vector* depl);
+    int defTranslation   (double* depl);
+    int defScale         (Vertex* center, double scale);
+    int defScale         (double* center, double scale);
+    int defRotation      (Vertex* center, Vector* depl, double degres);
+    int defSymmetryPoint (Vertex* center);
+    int defSymmetryLine  (Vertex* center, Vector* dir);
+    int defSymmetryPlane (Vertex* center, Vector* normale);
+
+    int perform (Vertex* noeud);
+
+    void getCoeff (double& a11, double& a12, double& a13, double& a14,
+                   double& a21, double& a22, double& a23, double& a24,
+                   double& a31, double& a32, double& a33, double& a34);
+private:
+    void erase();
+private:
+    double mat11, mat12, mat13, mat14;
+    double mat21, mat22, mat23, mat24;
+    double mat31, mat32, mat33, mat34;
+};
+// ------------------------------------------- Inlining
+// ========================================================= Constructeur
+inline Matrix::Matrix ()
+{
+   erase ();
+}
+// ========================================================= erase
+inline void Matrix::erase ()
+{
+   mat12 = mat13 = mat14 = 0.0;
+   mat21 = mat23 = mat24 = 0.0;
+   mat31 = mat32 = mat34 = 0.0;
+   mat11 = mat22 = mat33 = 1.0;
+}
+// ========================================================= perform
+inline int Matrix::perform (Vertex* noeud)
+{
+   double px, py, pz;
+   px = mat11*noeud->getX()+mat12*noeud->getY()+mat13*noeud->getZ()+mat14;
+   py = mat21*noeud->getX()+mat22*noeud->getY()+mat23*noeud->getZ()+mat24;
+   pz = mat31*noeud->getX()+mat32*noeud->getY()+mat33*noeud->getZ()+mat34;
+
+   noeud->setCoord (px, py, pz);
+   return HOK;
+}
+// ========================================================= defTranslation
+inline int Matrix::defTranslation (Vector* boulevard)
+{
+   erase();
+   mat11 = mat22 = mat33 = 1.0;
+
+   mat14 = boulevard->getDx ();
+   mat24 = boulevard->getDy ();
+   mat34 = boulevard->getDz ();
+
+   return HOK;
+}
+// ========================================================= defTranslation (2)
+inline int Matrix::defTranslation (double* decal)
+{
+   erase();
+   mat11 = mat22 = mat33 = 1.0;
+
+   mat14 = decal [dir_x];
+   mat24 = decal [dir_y];
+   mat34 = decal [dir_z];
+   return HOK;
+}
+// ========================================================= defScale
+inline int Matrix::defScale (double* center, double scale)
+{
+   erase();
+   mat11 = mat22 = mat33 = scale;
+
+   mat14 = (1-scale) * center[dir_x];
+   mat24 = (1-scale) * center[dir_y];
+   mat34 = (1-scale) * center[dir_z];
+
+   return HOK;
+}
+// ========================================================= defScale
+inline int Matrix::defScale (Vertex* center, double scale)
+{
+   if (center==NULL)
+      {
+      erase();
+      return HERR;
+      }
+
+   Real3 coord;
+   int ier = defScale (center->getPoint (coord ), scale);
+   return ier;
+}
+// ========================================================= defRotation
+inline int Matrix::defRotation (Vertex* center, Vector* dir, double degres)
+{
+   erase();
+
+   double normed = dir->getNorm ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double ux = dir->getDx () / normed;
+   double uy = dir->getDy () / normed;
+   double uz = dir->getDz () / normed;
+
+   double cx = center->getX ();
+   double cy = center->getY ();
+   double cz = center->getZ ();
+
+   double cost = cos (degres*M_PI/180);
+   double sint = sin (degres*M_PI/180);
+
+   mat11 = ux*ux * (1-cost) + cost;
+   mat12 = ux*uy * (1-cost) - uz*sint;
+   mat13 = ux*uz * (1-cost) + uy*sint;
+
+   mat21 = ux*uy * (1-cost) + uz*sint;
+   mat22 = uy*uy * (1-cost) + cost;
+   mat23 = uy*uz * (1-cost) - ux*sint;
+
+   mat31 = ux*uz * (1-cost) - uy*sint;
+   mat32 = uy*uz * (1-cost) + ux*sint;
+   mat33 = uz*uz * (1-cost) + cost;
+
+   mat14 = cx - mat11*cx - mat12*cy - mat13*cz;
+   mat24 = cy - mat21*cx - mat22*cy - mat23*cz;
+   mat34 = cz - mat31*cx - mat32*cy - mat33*cz;
+
+   return HOK;
+}
+// ========================================================= defSymmetryPoint
+inline int Matrix::defSymmetryPoint (Vertex* center)
+{
+   erase();
+
+   mat11 = mat22 = mat33 = -1;
+
+   mat14 = 2 * center->getX();
+   mat24 = 2 * center->getY();
+   mat34 = 2 * center->getZ();
+
+   return HOK;
+}
+// ========================================================= defSymmetryLine
+//     MH.d = 0        (1)
+//     CH  = lambda*d  (2)
+//     MM' = 2MH       (3)
+// 
+// (1) et (2) => lambda = ((x-xc)*xd + (y-yc)*yd + (z-zc)*zd) / norme(d)
+//
+//     MM' = 2MH (3)
+// <=> MO + OM' =  2 (MO + OC + CH) 
+// <=>      OM' =  MO + 2.OC + 2.CH
+// <=>      OM' = -OM + 2.OC + 2.lambda.d   (2) et (3)
+//
+//           x' = -x  + 2*xc + 2*xd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//           y' = -y  + 2*yc + 2*yd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//           z' = -z  + 2*zc + 2*zd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//
+inline int Matrix::defSymmetryLine (Vertex* center, Vector* dir)
+{
+   erase ();
+
+   double normed = dir->getNorm ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double xc =  center->getX();
+   double yc =  center->getY();
+   double zc =  center->getZ();
+
+   double xd = dir->getDx() / normed;
+   double yd = dir->getDy() / normed;
+   double zd = dir->getDz() / normed;
+
+   mat11 = 2*xd*xd -1;
+   mat12 = 2*xd*yd;
+   mat13 = 2*xd*zd;
+   mat14 = 2*(xc - xd*(xc*xd + yc*yd + zc*zd));
+
+   mat21 = 2*yd*xd;
+   mat22 = 2*yd*yd - 1;
+   mat23 = 2*yd*zd;
+   mat24 = 2*(yc - yd*(xc*xd + yc*yd + zc*zd));
+
+   mat31 = 2*zd*xd;
+   mat32 = 2*zd*yd;
+   mat33 = 2*zd*zd - 1;
+   mat34 = 2*(zc - zd*(xc*xd + yc*yd + zc*zd));
+
+   return HOK;
+}
+// ========================================================= defSymmetryPlane
+//     CH.n = 0         (1)
+//     MH   = lambda*n  (2)
+//     MM'  = 2MH       (3)
+// 
+// (1) et (2) => lambda = ((x-xc)*xn + (y-yc)*yn + (z-zc)*zn) / norme(n)
+//
+//     MM' = 2MH (3)
+// <=> MO + OM' =  2.lambda.n
+// <=>      OM' =  OM + 2.lambda.n
+//
+//           x' = x + 2*lambda*xn
+//           y' = y + 2*lambda*yn
+//           z' = z + 2*lambda*zn
+//
+//           x' = x + 2*xn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//           y' = y + 2*yn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//           z' = z + 2*zn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//
+inline int Matrix::defSymmetryPlane (Vertex* center, Vector* normale)
+{
+   erase ();
+
+   double normed = normale->getNorm ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double xc =  center->getX();
+   double yc =  center->getY();
+   double zc =  center->getZ();
+
+   double xn = normale->getDx() / normed;
+   double yn = normale->getDy() / normed;
+   double zn = normale->getDz() / normed;
+
+   mat11 = -2*xn*xn + 1;
+   mat12 = -2*xn*yn;
+   mat13 = -2*xn*zn;
+   mat14 =  2*xn*(xc*xn + yc*yn + zc*zn);
+
+   mat21 = -2*yn*xn;
+   mat22 = -2*yn*yn + 1;
+   mat23 = -2*yn*zn;
+   mat24 =  2*yn*(xc*xn + yc*yn + zc*zn);
+
+   mat31 = -2*zn*xn;
+   mat32 = -2*zn*yn;
+   mat33 = -2*zn*zn + 1;
+   mat34 =  2*zn*(xc*xn + yc*yn + zc*zn);
+
+   return HOK;
+}
+// ========================================================= getCoeff
+inline void Matrix::getCoeff(double& a11, double& a12, double& a13, double& a14,
+                             double& a21, double& a22, double& a23, double& a24,
+                             double& a31, double& a32, double& a33, double& a34)
+{
+   a11 = mat11;
+   a12 = mat12;
+   a13 = mat13;
+   a14 = mat14;
+
+   a21 = mat21;
+   a22 = mat22;
+   a23 = mat23;
+   a24 = mat24;
+
+   a31 = mat31;
+   a32 = mat32;
+   a33 = mat33;
+   a34 = mat34;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexPipe.cxx b/src/HEXABLOCK/HexPipe.cxx
new file mode 100755 (executable)
index 0000000..f6e99a6
--- /dev/null
@@ -0,0 +1,48 @@
+
+// C++ : Gestion des tuyaux
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexPipe.hxx"
+#include "HexVertex.hxx"
+#include "HexVector.hxx"
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Pipe::Pipe (Vertex* b, Vector* v, double ri, double re, double h)
+    : Cylinder (b, v, re, h)
+{
+    c_int_radius = ri;
+}
+// ========================================================= saveXml 
+void Pipe::saveXml  (XmlWriter* xml)
+{
+   char buffer[12];
+
+   xml->openMark     ("Pipe");
+   xml->addAttribute ("c_base", c_base->getName (buffer));
+   xml->addAttribute ("c_dir",  c_dir->getName  (buffer));
+   xml->addAttribute ("c_radius",     c_radius);
+   xml->addAttribute ("c_int_radius", c_int_radius);
+   xml->addAttribute ("c_height",     c_height);
+   xml->closeMark ();
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexPipe.hxx b/src/HEXABLOCK/HexPipe.hxx
new file mode 100755 (executable)
index 0000000..3d40d2e
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// class : Les tuyaux (de pipe ...)
+
+#ifndef __PIPE_H
+#define __PIPE_H
+
+#include "HexCylinder.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Pipe : public Cylinder 
+{
+public :
+    virtual double  getInternalRadius () { return c_int_radius; }
+
+public :
+    Pipe (Vertex* b, Vector* v, double ri, double re, double h);
+    virtual ~Pipe () {}
+    void saveXml (XmlWriter* xml);
+
+private:
+    double c_int_radius;
+};
+
+// ------------------------------------------- Inlining
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexPropagation.hxx b/src/HEXABLOCK/HexPropagation.hxx
new file mode 100755 (executable)
index 0000000..926a7ef
--- /dev/null
@@ -0,0 +1,111 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// class : Ensembles de propagation
+
+#ifndef __PROPAGATION_H
+#define __PROPAGATION_H
+
+#include "HexDocument.hxx"
+#include "HexEdge.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexLaw.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Propagation 
+{
+public:
+   const Edges& getEdges ()        { return prop_edges; }
+   Law*  getLaw ();
+   bool  getWay ()                 { return prop_way; }
+
+   void  setWay (bool sens)        { prop_way = sens; }
+   int   setLaw (Law* loi);
+
+public:
+    Propagation  ();
+    void saveXml (XmlWriter* xml);
+    void addEdge (Edge* arete);
+    void majLaw  ();
+
+private:
+    Edges prop_edges;
+    Law*  prop_law;
+    bool  prop_way;
+};
+// =========================================================== Constructeur
+inline Propagation::Propagation ()
+{
+    prop_law = NULL;
+    prop_way = true;
+}
+// =========================================================== getLaw
+inline Law* Propagation::getLaw ()
+{
+    return prop_law; 
+/* **********************************  Modif Abu du 18/10/2010
+    if (prop_law != NULL) 
+       return prop_law; 
+
+    if (prop_edges.size()==0) 
+       return NULL;
+
+    Document* root = prop_edges[0]->dad();
+    return root->getLaw (0);
+   ********************************** */
+}
+// =========================================================== setLaw
+inline int Propagation::setLaw (Law* loi)
+{
+   prop_law = loi; 
+   majLaw ();
+   return HOK;
+}
+// =========================================================== majLaw
+inline void Propagation::majLaw ()
+{
+   int nbre = prop_edges.size();
+   for (int nro=0 ; nro < nbre ; nro++)
+        prop_edges[0]->setLaw (prop_law);
+}
+// =========================================================== addEdge
+inline void Propagation::addEdge (Edge* arete)
+{
+   prop_edges.push_back (arete);
+
+   if (prop_law == NULL)
+       prop_law =  arete->getLaw();
+}
+// =========================================================== saveXml
+inline void Propagation::saveXml (XmlWriter* xml)
+{
+    char   buffer[12];
+    cpchar booleen [] = { "true", "false" };
+    cpchar law = prop_law == NULL ? "default" : prop_law->getName();
+
+    xml->openMark     ("Propagation");
+    xml->addAttribute ("edge", prop_edges[0]->getName (buffer));
+    xml->addAttribute ("law",  law);
+    xml->addAttribute ("way",  booleen [prop_way]);
+    xml->closeMark ();
+}
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/HexQuad.cxx b/src/HEXABLOCK/HexQuad.cxx
new file mode 100755 (executable)
index 0000000..987f039
--- /dev/null
@@ -0,0 +1,560 @@
+
+// C++ : Gestion des Quadrangles
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexQuad.hxx"
+
+#include "HexDocument.hxx"
+#include "HexHexa.hxx"
+#include "HexElements.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Quad::Quad (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd)
+    : EltBase (va->dad(), EL_QUAD)
+{
+   q_vertex [E_A] = va;
+   q_vertex [E_B] = vb;
+   q_vertex [E_C] = vc;
+   q_vertex [E_D] = vd;
+   q_clone        = NULL;
+   q_orientation  = Q_UNDEFINED;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       q_edge [nro] = new Edge (q_vertex[nro], 
+                                q_vertex[(nro+1) MODULO QUAD4]);
+       }
+
+   majReferences ();
+}
+// ======================================================== Constructeur bis
+Quad::Quad (Edge* ea, Edge* eb, Edge* ec, Edge* ed)
+    : EltBase (ea->dad(), EL_QUAD)
+{
+   q_edge [E_A] = ea;
+   q_edge [E_B] = eb;
+   q_edge [E_C] = ec;
+   q_edge [E_D] = ed;
+   q_clone       = NULL;
+   q_orientation = Q_UNDEFINED;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       int prec = (nro+1) MODULO QUAD4; 
+       Vertex* node = NULL;
+       int nc  = q_edge[nro] -> inter (q_edge[prec]);
+       if (nc>=0)
+          node = q_edge[nro]->getVertex (nc);
+       else  
+          el_status = 888;
+       q_vertex [prec] = node;
+       }
+
+   if (el_status != HOK)
+      {
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      printf (" +++ Quadrangle impossible \n");
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      dump ();
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // el_root->dump ();
+      for (int ned=0; ned<QUAD4; ned++) 
+          {
+          q_edge[ned]->dumpPlus ();
+          }
+      HexDump (q_vertex[0]);
+      HexDump (q_vertex[1]);
+      HexDump (q_vertex[2]);
+      HexDump (q_vertex[3]);
+
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      fatal_error ("Quadrangle impossible");
+      }
+
+   majReferences ();
+}
+// ======================================================== Constructeur bis
+Quad::Quad (Quad* other)
+    : EltBase (other->dad(), EL_QUAD)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       q_edge   [nro] = NULL;
+       q_vertex [nro] = NULL;
+       }
+   q_orientation = Q_UNDEFINED;
+   q_clone       = NULL;
+}
+// ========================================================= majReferences 
+void Quad::majReferences ()
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       q_edge [nro] -> addParent (this);
+}
+// ========================================================= getParent 
+Hexa* Quad::getParent  (int nro)
+{
+   return static_cast <Hexa*> (getFather (nro));
+}
+// ======================================================== anaMerge
+int Quad::anaMerge (Vertex* v1, Vertex* v2, Vertex* tv1[], Edge* te1[])
+{
+   int orig = NOTHING;
+   for (int nro=0 ; orig == NOTHING && nro < QUAD4 ; nro++)
+       if (q_vertex [nro] == v1)
+           orig = nro;
+
+   if (orig==NOTHING)
+      return HERR;
+
+   int nsp1 = (orig+1)       MODULO QUAD4;
+   int nsm1 = (orig+QUAD4-1) MODULO QUAD4;
+
+   if (q_vertex [nsp1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          {
+          tv1 [nro] = q_vertex [(orig+nro) MODULO QUAD4];
+          te1 [nro] = q_edge   [(orig+nro) MODULO QUAD4];
+          }
+      }
+   else if (q_vertex [nsm1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          {
+          tv1 [nro] = q_vertex [(orig+QUAD4-nro) MODULO QUAD4];
+          te1 [nro] = q_edge   [(orig+QUAD4-nro) MODULO QUAD4];
+          }
+      }
+   else 
+      return 588;
+
+   return HOK;
+}
+// ======================================================== ordoVertex
+int Quad::ordoVertex (Vertex* v1, Vertex* v2, Vertex* tv1[])
+{
+   int orig = NOTHING;
+   for (int nro=0 ; orig == NOTHING && nro < QUAD4 ; nro++)
+       if (q_vertex [nro] == v1)
+           orig = nro;
+
+   if (orig==NOTHING)
+      return HERR;
+
+   int nsp1 = (orig+1)       MODULO QUAD4;
+   int nsm1 = (orig+QUAD4-1) MODULO QUAD4;
+
+   if (q_vertex [nsp1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          tv1 [nro] = q_vertex [(orig+nro) MODULO QUAD4];
+      }
+   else if (q_vertex [nsm1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          tv1 [nro] = q_vertex [(orig+QUAD4-nro) MODULO QUAD4];
+      }
+   else 
+      return 588;
+
+   return HOK;
+}
+// ======================================================== getBrother
+Quad* Quad::getBrother (StrOrient* orient)
+{
+/* *****************************
+   printf (" getBrother ");
+   dump ();
+   printf (" .. Base  : ");
+   orient->v21->printName();
+   orient->v22->printName();
+   printf ("dir=%d, arete=", orient->dir);
+  ***************************** */
+
+   int n21 = indexVertex (orient->v21);
+   int n22 = indexVertex (orient->v22);
+
+   int sens  = n22 - n21;
+   if (sens >  1) sens -= QUAD4;
+   if (sens < -1) sens += QUAD4;
+   if (sens*sens !=1) return NULL;
+
+   switch (orient->dir)
+      {
+      case OR_LEFT  : n22 = n21 - sens;
+           break;
+      case OR_RIGHT : n21 = n22 + sens;
+           break;
+      case OR_FRONT : n21 += 2; 
+                      n22 += 2; 
+           break;
+      default : ;
+      }
+
+   n21 = (n21 + QUAD4) MODULO QUAD4;
+   n22 = (n22 + QUAD4) MODULO QUAD4;
+
+   orient->v21 = q_vertex [n21];
+   orient->v22 = q_vertex [n22];
+
+   Edge* arete  = findEdge (orient->v21, orient->v22);
+   // arete->printName("\n");
+
+   int nbfreres = arete->getNbrParents ();
+
+   for (int nq = 0 ; nq < nbfreres ; nq++)
+       {
+       Quad* next = arete->getParent (nq);
+       if (next!=NULL && next != this )
+          {
+          int   nbp   = next->getNbrParents();
+          Hexa* dad   = next->getParent(0);
+          int   mark  = next->getMark();
+          int   mark2 = dad ? dad->getMark() : IS_NONE;
+
+          if (nbp  <= 1  && mark2 != IS_MARRIED && mark == IS_NONE)
+             return next;
+          // if (nbp  <= 1  && mark == IS_NONE)
+             // return next;
+          }
+       }
+   return NULL;
+}
+// ======================================================== coupler
+int Quad::coupler (Quad* other, StrOrient* orient, Elements* table)
+{
+   if (other==NULL) 
+      return HERR;
+
+   Hexa* hexa = other->getParent(0);
+
+   setMark (IS_MARRIED);
+   other->setMark (IS_MARRIED);
+   if (hexa != NULL)
+       hexa->setMark (IS_MARRIED);
+
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       {
+       Edge* arete  = q_edge[ned]; 
+       int nbfreres = arete ->getNbrParents (); 
+       for (int nq = 0 ; nq < nbfreres ; nq++)
+           {
+           Quad* next = arete->getParent (nq);
+           if (next!=NULL && next != this && next->getMark() > 0)
+              {
+              StrOrient new_ori (orient);
+              new_ori.dir = OR_FRONT;
+              Vertex* va  = arete->getVertex (V_AMONT); 
+              Vertex* vb  = arete->getVertex (V_AVAL); 
+
+//    On voit si un point de repere est conserve
+              if (va == orient->v11)
+                 {
+                 new_ori.v12 = vb;
+                 new_ori.dir += OR_LEFT;
+                 }
+              else if (vb == orient->v11)
+                 {
+                 new_ori.v12 = va;
+                 new_ori.dir += OR_LEFT;
+                 }
+
+              if (va == orient->v12)
+                 {
+                 new_ori.v11 = vb;
+                 new_ori.dir += OR_RIGHT;
+                 }
+              else if (vb == orient->v12)
+                 {
+                 new_ori.v11 = va;
+                 new_ori.dir += OR_RIGHT;
+                 }
+
+              if (new_ori.dir == OR_FRONT)
+                 {
+                 if (definedBy (va, orient->v11))
+                    {
+                    new_ori.v11 = va;
+                    new_ori.v12 = vb;
+                    }
+                 else
+                    {
+                    new_ori.v11 = vb;
+                    new_ori.v12 = va;
+                    }
+                 }
+
+              int nro = next->getMark ();
+              Quad* beauf = other->getBrother (&new_ori);
+              int ier = table->coupler (nro, beauf, &new_ori);
+              if (ier != HOK)
+                 return ier;
+              ier = next->coupler (beauf, &new_ori, table);
+              if (ier != HOK)
+                 return ier;
+              }
+           }
+       }
+   return HOK;
+}
+// ======================================================== getOpposVertex
+Vertex* Quad::getOpposVertex (Vertex* start)
+{
+   int  na = indexVertex (start);
+   if (na==NOTHING)
+      return NULL;
+   return  q_vertex [(na+2) MODULO QUAD4];
+}
+// ======================================================== getOpposEdge
+Edge* Quad::getOpposEdge (Edge* start, int& sens)
+{
+   sens = 1;
+   int  na = indexVertex (start->getVertex (V_AMONT));
+   int  nb = indexVertex (start->getVertex (V_AVAL));
+
+   Vertex* vaprim = q_vertex [(nb+2) MODULO QUAD4];
+   Vertex* vbprim = q_vertex [(na+2) MODULO QUAD4];
+
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       {
+       if (   q_edge[ned]->getVertex(V_AMONT) == vaprim
+           && q_edge[ned]->getVertex(V_AVAL ) == vbprim)
+           {
+           sens = 1;
+           return q_edge[ned];
+           }
+       else if (   q_edge[ned]->getVertex(V_AMONT) == vbprim
+                && q_edge[ned]->getVertex(V_AVAL ) == vaprim)
+           {
+           sens = -1;
+           return q_edge[ned];
+           }
+       }
+   //             TODO : traiter l'erreur
+   cout << " ... Probleme dans Quad::getOpposedEdge :" << endl;
+   PutName (start);
+   PutName (vaprim);
+   PutName (vbprim);
+   HexDisplay (na);
+   HexDisplay (nb);
+   dumpPlus ();
+
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       q_edge[ned]->dump();
+
+   return NULL;
+}
+// ========================================================= saveXml
+void Quad::saveXml (XmlWriter* xml)
+{
+   char buffer[12];
+   string edges;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (nro>0) edges += " ";
+       edges += q_edge[nro]->getName(buffer);
+       }
+
+   xml->openMark     ("Quad");
+   xml->addAttribute ("id",    getName (buffer));
+   xml->addAttribute ("edges", edges);
+   if (el_name!=buffer) 
+       xml->addAttribute ("name", el_name);
+   xml->closeMark ();
+
+   int nbass = tab_assoc.size();
+   for (int nro=0 ; nro<nbass ; nro++)
+       if (tab_assoc[nro] != NULL)
+           tab_assoc[nro]->saveXml (xml); 
+}
+// ======================================================== replaceEdge
+void Quad::replaceEdge (Edge* old, Edge* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (q_edge[nro]==old) 
+           {
+           q_edge[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== replaceVertex
+void Quad::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (q_vertex [nro]==old) 
+          {
+          q_vertex [nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+          }
+       }
+}
+// ======================================================== dump
+void Quad::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+        PrintName (q_edge[nro]);
+   printf (")\n");
+
+   printf ("        (");
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+        PrintName (q_vertex[nro]);
+   printf (")");
+
+   dumpRef ();
+}
+// ======================================================== dumpPlus
+void Quad::dumpPlus ()
+{
+   dump ();
+   if (NOT isHere ())
+      return;
+
+   for (int nro=0 ; nro < QUAD4 ; nro++)
+       {
+       Vertex* pv = q_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ("");
+          printf ( " (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf ( "NULL\n");
+          }
+       }
+}
+// ======================================================== getOpposEdge (2)
+Edge* Quad::getOpposEdge (Edge* start)
+{
+   int  na = indexEdge (start);
+   if (na<0)
+      return NULL;
+   return q_edge [(na+2) MODULO QUAD4];
+}
+// ======================================================== getPerpendicular
+Edge* Quad::getPerpendicular (Edge* arete, Vertex* node)
+{
+   int na = indexEdge (arete);
+   if (na<0)
+      return NULL;
+
+   int nv = arete->index (node);
+   if (nv<0)
+      return NULL;
+   Edge* perp = q_edge [(na+1) MODULO QUAD4];
+
+   nv = perp->index (node);
+   if (nv>=0)
+      return perp;
+
+   perp = q_edge [(na+3) MODULO QUAD4];
+   nv   = perp->index (node);
+   if (nv>=0)
+      return perp;
+   else
+      return NULL;
+}
+static cpchar t_ori[] = {"Q_INSIDE", "Q_DIRECT", "Q_INVERSE", "Q_UNDEF"};
+// ======================================================== setOrientation
+void Quad::setOrientation (int ori)
+{
+    q_orientation = ori;
+    if (ori==Q_DIRECT || ori==Q_INVERSE)
+       printf (" %s = %s\n", el_name.c_str(), t_ori [ q_orientation ]);
+}
+// ======================================================== setOrientation
+int Quad::setOrientation ()
+{
+    q_orientation = Q_INSIDE;
+    if (getNbrParents() != 1)
+       return q_orientation;
+  
+    Real3 cg, orig, pi, pj, vi, vj, vk;
+
+    Hexa* hexa = getParent(0);
+    hexa->getCenter (cg);
+
+/********************************************************************
+    printName (" = ");
+
+    for (int np=0 ; np < QUAD4 ; np++)
+        {
+        q_vertex [np        ] -> getPoint (orig);
+        q_vertex [(np+1) % 4] -> getPoint (pi);
+        q_vertex [(np+3) % 4] -> getPoint (pj);
+
+        calc_vecteur (orig, pi, vi);
+        calc_vecteur (orig, pj, vj);
+        calc_vecteur (orig, cg, vk);
+        double pmixte = prod_mixte (vi, vj, vk);
+        q_orientation = pmixte > ZEROR ? Q_DIRECT : Q_INVERSE;
+        if (pmixte>0) printf (">");
+           else       printf ("<");
+        }
+
+    printf ("\n");
+    return;
+  ******************************************************************* */
+    q_vertex [0] -> getPoint (orig);
+    q_vertex [1] -> getPoint (pi);
+    q_vertex [3] -> getPoint (pj);
+
+    calc_vecteur (orig, pi, vi);
+    calc_vecteur (orig, pj, vj);
+    calc_vecteur (cg, orig, vk);
+
+    double pmixte = prod_mixte (vi, vj, vk);
+    q_orientation = pmixte > ZEROR ? Q_DIRECT : Q_INVERSE;
+    printf (" %s = %s\n", el_name.c_str(), t_ori [ q_orientation ]);
+    return q_orientation;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexQuad.hxx b/src/HEXABLOCK/HexQuad.hxx
new file mode 100755 (executable)
index 0000000..19ee24d
--- /dev/null
@@ -0,0 +1,235 @@
+
+// class : Les Quadrangles
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __QUAD_H
+#define __QUAD_H
+
+#include "HexEdge.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+struct StrOrient
+{
+   Vertex* v11;     // 1er sommet 1er quad
+   Vertex* v12;     // 2eme
+   Vertex* v21;     // 1er sommet 2eme quad
+   Vertex* v22;     // 2eme
+   int dir;         // direction element suivant
+
+StrOrient ( Vertex* n11, Vertex* n12, Vertex* n21, Vertex* n22, int d=0)
+    : v11 (n11), v12 (n12), v21 (n21), v22 (n22), dir (d) {}
+
+StrOrient ( StrOrient* s)
+    : v11 (s->v11), v12(s->v12), v21(s->v21), v22(s->v22), dir(s->dir){}
+
+};
+
+class Quad : public EltBase
+{
+public:
+    virtual Edge*   getEdge   (int  nro);
+    virtual Vertex* getVertex (int  nro);
+
+    virtual int countEdge   () { return QUAD4; } 
+    virtual int countVertex () { return QUAD4; } 
+public:
+    Quad (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd);
+    Quad (Edge* ea, Edge* eb, Edge* ec, Edge* ed);
+    Quad (Quad* other);
+
+    Hexa* getParent (int nro);
+
+    Edge* findEdge   (Vertex* v1, Vertex*v2);
+    Edge* commonEdge (Quad* other);
+    int   anaMerge (Vertex* v1, Vertex* v2, Vertex* tv[], Edge* te[]);
+
+    int   ordoVertex (Vertex* v1, Vertex* v2, Vertex* tv[]);
+    int   prepaMerge (Vertex* tv1[], Vertex* tv2[], Edge* te1[]);
+
+    int   inter     (Quad* other, int& nro);
+    bool  definedBy (Vertex* v1, Vertex* v2);
+    bool  definedBy (Edge*   e1,  Edge*   e2);
+
+    int   indexVertex (Vertex* elt);
+    int   indexEdge   (Edge*   elt);
+
+    int   accoupler (Quad* other, StrOrient* orient);
+    int   coupler (Quad* other, StrOrient* orient, Elements* table);
+
+    Edge*   getOpposEdge   (Edge* arete, int &sens);
+    Vertex* getOpposVertex (Vertex* sommet);
+
+    virtual void majReferences();            // M.A.J relation "utilise par"
+    virtual void dump ();
+    virtual void dumpPlus ();
+    virtual void saveXml (XmlWriter* xml);
+    void setScalar (double valeur);
+    void setColor  (double valeur)          { setScalar (valeur) ; }
+
+    void         replace (Quad* old);
+    virtual void replaceEdge   (Edge*   old, Edge*   nouveau);
+    virtual void replaceVertex (Vertex* old, Vertex* nouveau);
+
+    virtual void  clearAssociation  ()      { tab_assoc.clear() ; }
+    int   addAssociation (Shape* forme); 
+    const Shapes& getAssociations ()        { return tab_assoc ; }
+
+    virtual void duplicate ();
+    Quad* getClone ()               {  return q_clone ; }
+
+    Edge* getOpposEdge     (Edge* arete);   // Version simplifiee 
+    Edge* getPerpendicular (Edge* arete, Vertex* node); 
+    int   getOrientation ()            { return q_orientation; }
+    int   setOrientation ();
+    void  setOrientation (int ori);
+
+private:
+    friend class Cloner;
+    Quad* getBrother (StrOrient* orient);
+    
+private:
+    Edge*   q_edge   [QUAD4];
+    Vertex* q_vertex [QUAD4];
+    Quad*   q_clone;
+    int     q_orientation; 
+
+    Shapes tab_assoc;
+};
+// ----------------------------------------------- Inlining
+// ========================================================== addAssociation
+inline int Quad::addAssociation (Shape* forme)
+{
+   if (forme != NULL)
+       tab_assoc.push_back (forme);
+   return HOK;
+}
+// ============================================================  getEdge
+inline Edge* Quad::getEdge (int nro) 
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < QUAD4 && el_status == HOK && q_edge [nro]->isValid())
+      elt = q_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Quad::getVertex (int nro) 
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro < QUAD4 && el_status == HOK && q_vertex [nro]->isValid())
+      elt = q_vertex [nro]; 
+
+   return elt;
+}
+// ======================================================== commonEdge
+inline Edge* Quad::commonEdge (Quad* other)
+{
+   for (int ne1=0 ; ne1<QUAD4 ; ne1++) 
+       for (int ne2=0 ; ne2<QUAD4 ; ne2++) 
+           if (q_edge [ne1] == other->q_edge [ne2])
+              return q_edge [ne1];
+
+   return NULL;
+}
+
+// ======================================================== Inter
+inline int Quad::inter (Quad* other, int& nother)
+{
+   for (int ne1=0 ; ne1<QUAD4 ; ne1++) 
+       for (int ne2=0 ; ne2<QUAD4 ; ne2++) 
+           if (q_edge [ne1] == other->q_edge [ne2])
+              {
+              nother = ne2;
+              return  ne1;
+              }
+
+   nother = NOTHING;
+   return NOTHING;
+}
+// ============================================================ definedBy (v)
+inline bool Quad::definedBy  (Vertex* v1, Vertex* v2)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (v1 == q_vertex[n1] && v2 == q_vertex[(n1+2) MODULO QUAD4])
+          return true;
+
+   return false;
+}
+// ============================================================ definedBy (e)
+inline bool Quad::definedBy  (Edge* e1, Edge* e2)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (e1 == q_edge[n1] && e2 == q_edge[(n1+2) MODULO QUAD4])
+          return true;
+
+   return false;
+}
+// =============================================================== findEdge
+inline Edge* Quad::findEdge (Vertex* v1, Vertex* v2)
+{
+   for (int nro=0 ; nro< QUAD4 ; nro++)
+       {
+       Vertex* va = q_edge[nro]->getVertex(V_AMONT) ;
+       Vertex* vb = q_edge[nro]->getVertex(V_AVAL) ;
+       if ((v1==va && v2==vb) || (v1==vb && v2==va))
+           return q_edge [nro];
+       }
+
+   return NULL;
+}
+// =============================================================== indexVertex
+inline int Quad::indexVertex  (Vertex* elt)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (elt == q_vertex[n1]) 
+          return n1;
+
+   return NOTHING;
+}
+// =============================================================== indexEdge
+inline int Quad::indexEdge  (Edge* elt)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (elt == q_edge[n1]) 
+          return n1;
+
+   return NOTHING;
+}
+// =============================================================== setScalar
+inline void Quad::setScalar  (double val)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       q_vertex[n1] -> setScalar (val);
+}
+// =============================================================== duplicate
+inline void Quad::duplicate  ()
+{
+   q_orientation  = Q_UNDEFINED;
+   q_clone = new Quad (GetClone (q_edge [E_A]), 
+                       GetClone (q_edge [E_B]), 
+                       GetClone (q_edge [E_C]), 
+                       GetClone (q_edge [E_D]));
+   q_clone->tab_assoc = tab_assoc;
+}
+END_NAMESPACE_HEXA
+#endif
+
diff --git a/src/HEXABLOCK/HexShape.cxx b/src/HEXABLOCK/HexShape.cxx
new file mode 100755 (executable)
index 0000000..7527cee
--- /dev/null
@@ -0,0 +1,48 @@
+
+// C++ : Gestion des formes associees
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexShape.hxx"
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== Constructeur
+Shape::Shape  (string brep)
+{
+   b_rep  = brep;
+   debut  = 0;
+   fin    = 1;
+   ident  = "";
+}
+// ====================================================== saveXml
+void Shape::saveXml (XmlWriter* xml)
+{
+   char interval [80];
+   sprintf (interval, "%g %g", debut, fin);
+
+   xml->openMark     ("Shape");
+   xml->addAttribute ("interval", interval);
+   xml->addAttribute ("ident", ident.c_str());
+   xml->addAttribute ("brep",  b_rep.c_str());
+   xml->closeMark ();
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexShape.hxx b/src/HEXABLOCK/HexShape.hxx
new file mode 100755 (executable)
index 0000000..7d46322
--- /dev/null
@@ -0,0 +1,62 @@
+
+// class : Gestion des formes associees
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __SHAPE_H_
+#define __SHAPE_H_
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Shape 
+{
+public :
+    Shape (string brep);
+    string getBrep  () { return b_rep; }
+    string getName  () { return ident; }
+    string getIor   () { return ior; }
+
+    double getStart () { return debut;  }
+    double getEnd   () { return fin;   }
+    void   getBounds (double& pdeb, double& pfin)  { pdeb=debut ; pfin = fin; }
+
+    void  setBrep   (string brep)               { b_rep = brep; }
+    void  setName   (string name)               { ident = name; }
+    void  setIor    (string val)                { ior   = val; }
+
+    void  setBounds (double pdeb, double pfin)  { debut = pdeb ; fin = pfin; }
+    void  setStart  (double val)                { debut = val ; }
+    void  setEnd    (double val)                { fin   = val ; }
+
+    void  saveXml   (XmlWriter* xml);
+
+public :
+    double debut;
+    double fin;
+    string ident;
+    string ior;
+
+private :
+    std::string b_rep;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexVector.cxx b/src/HEXABLOCK/HexVector.cxx
new file mode 100755 (executable)
index 0000000..f8ab95d
--- /dev/null
@@ -0,0 +1,109 @@
+
+// C++ : Gestion des vecteurs
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HexVector.hxx"
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Vector::Vector (Document* doc, double dx, double dy, double dz)
+      : EltBase (doc, EL_VECTOR)
+{
+    v_dx = dx;
+    v_dy = dy;
+    v_dz = dz;
+}
+// ======================================================== Constructeur bis
+Vector::Vector (Vector* lautre)
+      : EltBase (lautre->el_root)
+{
+    v_dx = lautre -> v_dx;
+    v_dy = lautre -> v_dy;
+    v_dz = lautre -> v_dz;
+}
+
+// ======================================================== calculNormale
+// === Calcule un vecteur orthogonal et norme
+int Vector::calculNormale (double& nx, double& ny, double& nz)
+{
+    double epsil = (v_dx * v_dx + v_dy * v_dy + v_dz * v_dz)*1e-6;
+    int    forme = 2000;
+    if  (v_dx > epsil || v_dx < -epsil) forme += 100;
+    if  (v_dy > epsil || v_dy < -epsil) forme +=  10;
+    if  (v_dz > epsil || v_dz < -epsil) forme +=   1;
+
+    nx = ny = nz = 0;
+    switch (forme)
+       {
+                             // dx=dy=dz=0 : retour vecteur i + erreur
+       case 2000 : nx = 1; 
+                   return HERR;
+                             // dx = 0 : on prend le vecteur i
+       case 2001 :  
+       case 2010 :  
+       case 2011 : nx = 1;
+                   return HOK;  
+                             // dy = 0 : on prend le vecteur j
+       case 2100 :  
+       case 2101 : ny = 1; 
+                   return HOK;  
+                             // dz = 0 : on prend le vecteur k
+       case 2110 : nz = 1;
+                   return HOK;  
+                             // dx, dy, dy non nuls : cas general;
+       default :;
+       }
+
+   double norme = sqrt (v_dx*v_dx + v_dy*v_dy);
+   nx =  v_dy / norme;
+   ny = -v_dx / norme;
+   return HOK;  
+}
+// ========================================================= saveXml 
+void Vector::saveXml (XmlWriter* xml)
+{
+   char buffer[12], coord[80];
+
+   sprintf (coord, "%g %g %g", v_dx, v_dy, v_dz);
+
+   xml->openMark     ("Vector");
+   xml->addAttribute ("id",    getName (buffer));
+   xml->addAttribute ("coord", coord);
+   if (el_name!=buffer) 
+       xml->addAttribute ("name", el_name);
+   xml->closeMark ();
+}
+// ========================================================= getAngleX
+double Vector::getAngleX ()
+{
+   static const double Epsilon = 1e-6;
+
+   double norme = getNorm ();
+   if (norme < Epsilon)
+      return 0.0;
+
+   double kos = v_dx / norme;
+   double deg = acos(kos) * 180.0 / M_PI;
+   return deg;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexVector.hxx b/src/HEXABLOCK/HexVector.hxx
new file mode 100755 (executable)
index 0000000..19551e1
--- /dev/null
@@ -0,0 +1,127 @@
+
+// class : Les vecteurs
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __VECTOR_H
+#define __VECTOR_H
+
+#include "HexEltBase.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+class Vector : public EltBase
+{
+public:
+    double getDx ()    { return v_dx ; }
+    double getDy ()    { return v_dy ; }
+    double getDz ()    { return v_dz ; }
+    double getNorm   ()    { return sqrt (v_dx*v_dx + v_dy*v_dy + v_dz*v_dz); }
+    double getAngleX ();
+
+
+public:
+    Vector (Document* doc, double dx=0, double dy=0, double dz=0);
+    Vector (Vector* lautre);
+    virtual ~Vector () {}
+    virtual void dump ();
+    double  getCoord (int dir);
+    double* getCoord (double coord[]);
+
+    virtual void saveXml (XmlWriter* xml);
+    int    renormer  ();
+    void   vectoriel  (Vector* a, Vector*b);
+    void   multiplier (double scal);
+    int    calculNormale (double& nx, double& ny, double& nz);
+
+private:
+    double v_dx;
+    double v_dy;
+    double v_dz;
+};
+// ------------------------------------------- Inlining
+// ===================================================== getCoord
+inline double Vector::getCoord (int dir) 
+{
+   double val = 0;
+   switch (dir)
+          {
+          case dir_x : val = v_dx; 
+               break;
+          case dir_y : val = v_dy; 
+               break;
+          case dir_z : val = v_dz; 
+               break;
+          }
+   return val;
+}
+// ===================================================== renormer
+inline int Vector::renormer() 
+{
+   double dn = getNorm ();
+   if (dn < 1e-30) 
+      return HERR;
+
+   v_dx /= dn;
+   v_dy /= dn;
+   v_dz /= dn;
+
+   return HOK;
+}
+// ===================================================== vectoriel
+inline void Vector::vectoriel (Vector* a, Vector*b)
+{
+   v_dx =   a->v_dy * b->v_dz - b->v_dy * a->v_dz; 
+   v_dy =   a->v_dz * b->v_dx - b->v_dz * a->v_dx; 
+   v_dz =   a->v_dx * b->v_dy - b->v_dx * a->v_dy; 
+}
+
+// ===================================================== getCoord
+inline double* Vector::getCoord (double coord[])
+{
+   coord [dir_x] = v_dx;
+   coord [dir_y] = v_dy;
+   coord [dir_z] = v_dz;
+   return coord;
+}
+// ===================================================== multiplier
+inline void Vector::multiplier (double scalaire)
+{
+   v_dx *= scalaire;
+   v_dy *= scalaire;
+   v_dz *= scalaire;
+}
+// ===================================================== dump
+inline void Vector::dump ()
+{
+   printf ("Vector ");
+   printName (" = ");
+   if (NOT isHere ())
+      {
+      printf ("(*** deleted ***)\n");
+      return;
+      }
+
+   printf ("(%g, %g, %g)\n", v_dx,v_dy,v_dz);
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexVertex.cxx b/src/HEXABLOCK/HexVertex.cxx
new file mode 100755 (executable)
index 0000000..0c6bee6
--- /dev/null
@@ -0,0 +1,82 @@
+
+//  C++ Les noeuds
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexVector.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== Constructeur
+Vertex::Vertex  (Document* doc, double x, double y, double z)
+      : EltBase (doc, EL_VERTEX)
+{
+   gc_x = v_x = x;
+   gc_y = v_y = y;
+   gc_z = v_z = z;
+
+   v_scalar = 0;
+   v_clone  = NULL;
+}
+// ========================================================= getParent 
+Edge* Vertex::getParent  (int nro)
+{
+   return static_cast <Edge*> (getFather (nro));
+}
+// ========================================================= saveXml 
+void Vertex::saveXml  (XmlWriter* xml)
+{
+   char buffer[12], coord[80];
+
+   sprintf (coord, "%g %g %g", v_x,v_y,v_z);
+
+   xml->openMark     ("Vertex");
+   xml->addAttribute ("id",    getName (buffer));
+   xml->addAttribute ("coord", coord);
+   if (el_name!=buffer) 
+       xml->addAttribute ("name", el_name);
+   if (el_assoc!=NULL)
+      xml->addAttribute ("shape", el_assoc->getBrep().c_str());
+   xml->closeMark ();
+}
+// ========================================================= translate 
+void  Vertex::translate  (Vector* vecteur, double fact)
+{
+    v_x += fact*vecteur->getDx ();
+    v_y += fact*vecteur->getDy ();
+    v_z += fact*vecteur->getDz ();
+}
+// ========================================================= createMiddle 
+Vertex* Vertex::createMiddle  (Vertex* left, Vertex* right)
+{
+    Vertex* milieu = new Vertex (left);
+
+    milieu->v_x = (left->v_x + right->v_x) / 2;
+    milieu->v_y = (left->v_y + right->v_y) / 2;
+    milieu->v_z = (left->v_z + right->v_z) / 2;
+
+    return milieu;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexVertex.hxx b/src/HEXABLOCK/HexVertex.hxx
new file mode 100755 (executable)
index 0000000..6cd017f
--- /dev/null
@@ -0,0 +1,187 @@
+
+// Class : Gestion des sommets 
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __VERTEX_H_
+#define __VERTEX_H_
+
+#include "HexEltBase.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Vertex : public EltBase 
+{
+public :
+   double getX()   { return v_x; }
+   double getY()   { return v_y; }
+   double getZ()   { return v_z; }
+   double getCoord (int dir);
+
+   virtual int     countVertex ()       { return 1; }
+   virtual Vertex* getVertex (int nro)  { return this; }
+
+
+   void setX (double v)   { v_x = v ; }
+   void setY (double v)   { v_y = v ; }
+   void setZ (double v)   { v_z = v ; }
+   void assoCoord (double x, double y, double z);
+   void assoCoord (double* pnt); 
+
+public :
+   Vertex (Document* prev, double x=0.0, double y=0.0, double z=0.0); 
+   Vertex (Document* cible, Vertex* other);
+   Vertex (Vertex* other);
+   virtual ~Vertex () {}
+   virtual void dump () ;
+   virtual void saveXml (XmlWriter* xml);
+
+   void    setScalar (double val)             { v_scalar = val ; }
+   double  getScalar ()                       { return v_scalar ; }
+   void    setColor  (double valeur)          { setScalar (valeur) ; }
+   double* getPoint (double point[]);
+
+   void setCoord  (double x, double y, double z);
+   bool isin      (double xmin, double xmax, double ymin, double ymax, 
+                                            double zmin, double zmax);
+   Edge* getParent (int nro); 
+   Vertex* makeSymetric (Vertex* other);
+   void    translate (Vector* vecteur, double fact=1.0);
+   void    replace   (Vertex* old);
+
+   Vertex* getClone ()              {  return v_clone ; }
+   void    duplicate (Document* doc);
+
+   static Vertex* createMiddle (Vertex* left, Vertex* right);
+   bool   definedBy (double px, double py, double pz, double eps2=1e-4);
+
+private :
+    double v_x;
+    double v_y;
+    double v_z;
+
+    double  v_scalar;
+    Vertex* v_clone;
+    double  gc_x, gc_y, gc_z;
+    bool    gc_ass;
+};
+// ========================================================= Constructeur bis 
+inline Vertex::Vertex (Vertex* other)
+      : EltBase (other->dad(), EL_VERTEX)
+{
+   if (other!= NULL)
+      {
+      v_x = other->v_x;
+      v_y = other->v_y;
+      v_z = other->v_z;
+      v_scalar = other->v_scalar;
+      gc_ass = other->gc_ass;
+      gc_x   = other->gc_x;
+      gc_y   = other->gc_y;
+      gc_z   = other->gc_z;
+      }
+   else 
+      {
+      v_x  = v_y  = v_z  = 0;
+      gc_x = gc_y = gc_z = 0;
+      v_scalar = 0;
+      gc_ass = false;
+      }
+}
+// ===================================================== getCoord
+inline double Vertex::getCoord (int dir) 
+{
+   double val = 0;
+   switch (dir)
+          {
+          case dir_x : val = v_x; 
+               break;
+          case dir_y : val = v_y; 
+               break;
+          case dir_z : val = v_z; 
+               break;
+          }
+   return val;
+}
+// ========================================================= dump 
+inline void Vertex::dump ()
+{
+   printName (" = ");
+   if (NOT isHere ())
+      {
+      printf ("(*** deleted ***)\n");
+      return;
+      }
+
+   printf ("(%g, %g, %g)", v_x,v_y,v_z);
+   dumpRef ();
+}
+// ========================================================= setCoord 
+inline void Vertex::setCoord (double x, double y, double z)
+{
+   v_x = x;
+   v_y = y;
+   v_z = z;
+}
+// ========================================================= assoCoord 
+inline void Vertex::assoCoord (double* coord)
+{
+   assoCoord (coord[dir_x], coord[dir_y], coord[dir_z]);
+}
+// ========================================================= assoCoord 
+inline void Vertex::assoCoord (double x, double y, double z)
+{
+   gc_ass = true;
+   gc_x = x;
+   gc_y = y;
+   gc_z = z;
+}
+// ========================================================= isin 
+inline bool Vertex::isin  (double xmin, double xmax, double ymin, double ymax, 
+                                             double zmin, double zmax)
+{
+   bool   rep =   v_x >= xmin && v_x <= xmax
+               && v_y >= ymin && v_y <= ymax
+               && v_z >= zmin && v_z <= zmax;
+   return rep;
+}
+// ========================================================= getPoint
+inline double* Vertex::getPoint (double point[])
+{
+   point [dir_x] = v_x;
+   point [dir_y] = v_y;
+   point [dir_z] = v_z;
+   return point;
+}
+// ========================================================= duplicate 
+inline void Vertex::duplicate (Document* cible)
+{
+   v_clone = new Vertex (cible, v_x, v_y, v_z);
+   v_clone->v_scalar = v_scalar;
+}
+// ========================================================= duplicate 
+inline bool Vertex::definedBy (double px, double py, double pz, double eps2)
+{
+   double dist2 = carre (v_x-px) + carre (v_y-py) + carre (v_z-pz);
+   return dist2 < eps2;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexXmlTree.cxx b/src/HEXABLOCK/HexXmlTree.cxx
new file mode 100755 (executable)
index 0000000..99995dd
--- /dev/null
@@ -0,0 +1,415 @@
+
+// C++ : ParserXml
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexXmlTree.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum { HEND_FILE = -2, HEND_LINE = -1, CRLF = 13 };
+
+// ====================================================== Constructeur 
+XmlTree::XmlTree (const string& nom, XmlTree* dad)
+{
+   item_name     = nom;
+   item_vide     = "";
+   xml_parent    = dad;
+   nbr_attributs = 0;
+   nbr_items     = 0;
+
+   fic_buffer  = "";
+   len_buffer  = 0;
+   xml_file    = NULL;
+   nro_ligne   = 0;
+   fic_pos     = 1988;
+
+   xml_flow  = NULL;
+   pos_flow  = 0;
+   xml_ended = true;
+}
+// ====================================================== Destructeur
+XmlTree::~XmlTree ()
+{
+}
+// ====================================================== findChild
+XmlTree* XmlTree::findChild (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_items ; nro++)
+       {
+       if (nom == tab_items [nro]->item_name)
+           return tab_items [nro];
+       }
+   return NULL;
+}
+// ====================================================== findAttribute
+int XmlTree::findAttribute (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_attributs ; nro++)
+       {
+       if (nom == tab_attributs [nro])
+          return nro;
+       }
+   return NOTHING;
+}
+// ====================================================== findValue
+const string& XmlTree::findValue (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_attributs ; nro++)
+       {
+       if (nom == tab_attributs [nro])
+          return  tab_values    [nro];
+       }
+   return item_vide;
+}
+// ====================================================== parseFile
+int XmlTree::parseFile (const string& ficnom)
+{
+   fic_buffer  = "";
+   len_buffer  = 0;
+   nro_ligne   = 0;
+   fic_pos     = 1988;
+   xml_flow    = NULL;
+   pos_flow    = 0;
+   xml_ended   = true;
+
+   xml_file = fopen (ficnom.c_str(), "r");
+   if (xml_file==NULL)
+      {
+      cout << " **** Fichier XML '" << ficnom << "' inaccessible" 
+           << endl;
+      return HERR;
+      }
+
+   int ier = parseXml ();
+   return ier;
+}
+// ====================================================== parseFlow
+int XmlTree::parseFlow (cpchar flux)
+{
+   fic_buffer  = "";
+   len_buffer  = 0;
+   nro_ligne   = 0;
+   fic_pos     = 1988;
+
+   xml_flow    = flux;
+   pos_flow    = 0;
+
+   int ier = parseXml ();
+   return ier;
+}
+// ====================================================== parseXml
+int XmlTree::parseXml ()
+{
+   xml_ended  = false;
+
+   enum EnumEtat { M_PREMS, M_BALISE_OUVERTE, M_NEUTRE };
+   EnumEtat etat =  M_PREMS;
+
+   XmlTree* node = this;
+   EnumItem item_lu;
+   string   nom, valeur, foo;
+   while ((item_lu=readItem (nom)) != M_NONE)
+      {
+      switch (item_lu) 
+         {
+         case M_BEGIN :
+              item_lu = getItem (nom, M_IDENT);
+              if (etat==M_PREMS) 
+                 setName (nom);
+              else
+                 node = node -> addChild  (nom);
+              etat = M_BALISE_OUVERTE;
+              break;
+
+         case M_END   :
+              if (etat != M_BALISE_OUVERTE) 
+                 putError (" balise ouverte");
+              etat = M_NEUTRE;
+              break;
+
+         case M_BEGIN_CLOSE :
+              if (etat == M_BALISE_OUVERTE) 
+                 putError (" balise ouverte");
+              getItem (nom, M_IDENT);
+              getItem (foo, M_END);
+              node = node -> getParent ();
+              break;
+
+         case M_CLOSE :
+              if (etat != M_BALISE_OUVERTE) 
+                 putError (" balise deja fermee");
+              node = node -> getParent ();
+              etat = M_NEUTRE;
+              break;
+
+         case M_IDENT :
+              getItem (valeur, M_EQUALS);
+              getItem (valeur, M_STRING);
+              node -> addAttribut (nom, valeur);
+              break;
+
+         case M_COMMENT : goTo ("-->");
+              break;
+
+         case M_PROLOG  : goTo ("?>");
+              break;
+
+         default :
+         case M_EQUALS :
+         case M_STRING :
+         case M_END_COMMENT :
+         case M_END_PROLOG :
+              putError ("Item incorrect");
+         }
+      }
+   return HOK;
+}
+// ====================================================== getItem
+EnumItem XmlTree::getItem (string& value, EnumItem waited)
+{
+   EnumItem item = readItem (value);
+
+   if (item == waited) 
+      return item;
+   putError ("Erreur de sequence");
+   return item;
+}
+// ====================================================== readItem
+EnumItem XmlTree::readItem (string& value)
+{
+   value  = "";
+
+   while (true)
+         {
+         if (fic_pos>=len_buffer)
+            {
+            int ier=readLine ();
+            if (ier==HEND_FILE) 
+               return M_NONE;
+            }
+         else
+            {
+            char  car = fic_buffer [fic_pos++];
+
+            if (car=='=')
+               return M_EQUALS;
+            else if (car=='>')
+               return M_END;
+            else if (car=='"')
+               {
+               getString (value);
+               return M_STRING;
+               }
+            else if (isalpha (car))
+               {
+               getIdent (value);
+               return M_IDENT;
+               }
+
+            char ncar = fic_pos >= len_buffer ? ' ' : fic_buffer [fic_pos];
+            if (car=='/' && ncar == '>')
+               {
+               fic_pos++;
+               return M_CLOSE;
+               }
+            else if (car=='<')
+               {
+               if (ncar=='/') 
+                  {
+                  fic_pos++;
+                  return M_BEGIN_CLOSE;
+                  }
+               else if (ncar=='?') 
+                  {
+                  fic_pos++;
+                  return M_PROLOG;
+                  }
+               else if (ncar=='!') 
+                  {
+                  fic_pos++;
+                  return M_COMMENT;
+                  }
+               else
+                  return M_BEGIN;
+               }
+            }
+         }
+}
+// ====================================================== getIdent
+int XmlTree::getIdent (string& ident)
+{
+   ident = "";
+
+   for (int nc=fic_pos-1; nc<len_buffer ; nc++)
+       {
+       char car = fic_buffer[nc];
+       if (isalnum (car) || car =='_')
+           {
+           ident.push_back (car);
+           }
+       else
+           {
+           fic_pos = nc;
+           return HOK;
+           }
+       }
+
+   fic_pos = len_buffer;
+   return HOK;
+}
+// ====================================================== goTo
+int XmlTree::goTo (cpchar ouca)
+{
+   int nbc = strlen (ouca) - 1;
+   int pos = 0;
+   int car = ' ';
+
+   while ((car = getChar ()) != EOF)
+       {
+       if (car!=ouca[pos])
+          pos = 0;
+       else if (pos<nbc)
+          pos++;
+       else 
+          return HOK;
+       }
+
+   return HERR;
+}
+// ====================================================== getString
+int XmlTree::getString (string& chaine)
+{
+   chaine  = "";
+   int car = ' ';
+
+   while ((car = getChar ()) != EOF)
+       {
+       if (car=='"') 
+          return HOK;
+       chaine.push_back (car); 
+       }
+
+   return HERR;
+}
+// ====================================================== getChar
+int XmlTree::getChar ()
+{
+   while (true)
+         {
+         if (fic_pos<len_buffer)
+            {
+            fic_pos++;
+            return fic_buffer [fic_pos-1];
+            }
+         int ier = readLine ();
+         if (ier==HEND_FILE)
+            return EOF;
+         else
+            return EOL;
+         }
+}
+// ====================================================== readLine
+int XmlTree::readLine ()
+{
+   nro_ligne++;
+   fic_buffer = "";
+   fic_pos    = 0;
+
+   if (xml_ended)
+       return HEND_FILE;
+
+   len_buffer = 0;
+   int ier = HEND_LINE;
+   while (ier==HEND_LINE)
+         {
+         int carac = xml_flow != NULL ? xml_flow [pos_flow++] 
+                                     : fgetc (xml_file);
+
+         if (carac==EOL || carac==CRLF)
+            {
+            ier = HOK;
+            }
+         else if (carac!=EOF && carac!=EOS)
+            {
+            fic_buffer.push_back (carac); 
+            len_buffer ++;
+            }
+         else if (len_buffer > 0)
+            {
+            xml_ended = true;
+            ier = HOK;
+            }
+         else 
+            {
+            xml_ended = true;
+            ier = HEND_FILE;
+            }
+         }
+   return HOK;
+}
+// ====================================================== putError
+void XmlTree::putError (cpchar mess)
+{
+     printf (" ***** Erreur : %s\n", mess);
+     printf (" +++ Derniere ligne lue : nro %d, %deme caractere\n", 
+               nro_ligne, fic_pos);
+     printf ("%s\n", fic_buffer.c_str());
+     //  exit (102);
+}
+// ====================================================== addChild
+XmlTree* XmlTree::addChild (const string& nom)
+{
+   XmlTree* child = new XmlTree (nom, this);
+   tab_items.push_back (child);
+   nbr_items ++;
+   return child;
+}
+// ====================================================== addAttribut
+void XmlTree::addAttribut (const string& nom, const string& value)
+{
+   tab_attributs.push_back (nom);
+   tab_values   .push_back (value);
+   nbr_attributs ++;
+   // printf (" %s = %s\n", nom.c_str(), value.c_str());
+}
+// ====================================================== dump
+void XmlTree::dump (int niveau)
+{
+   string marge = "";
+   for (int niv=0 ; niv<niveau ; niv++)
+       marge += " | ";
+
+   cout << marge << item_name << endl;
+
+   for (int nc=0 ; nc<nbr_attributs ; nc++)
+       {
+       cout << marge  << " : " 
+            << tab_attributs [nc] << " = '" << tab_values [nc] 
+            << "'" << endl;
+       }
+
+   for (int nc=0 ; nc<nbr_items ; nc++)
+       {
+       tab_items [nc]->dump (niveau+1);
+       }
+
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexXmlTree.hxx b/src/HEXABLOCK/HexXmlTree.hxx
new file mode 100755 (executable)
index 0000000..408c7ff
--- /dev/null
@@ -0,0 +1,98 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// Class : Ecriture d'un fichier XML
+//
+#ifndef __XML_TREE_H_
+#define __XML_TREE_H_
+
+#include "hexa_base.hxx"
+
+#include <vector>
+
+BEGIN_NAMESPACE_HEXA
+
+   enum EnumItem { M_NONE,  M_BEGIN, M_END, M_BEGIN_CLOSE, M_CLOSE,
+                   M_IDENT, M_EQUALS, M_STRING, 
+                   M_COMMENT, M_END_COMMENT, M_PROLOG, M_END_PROLOG,
+                   M_ERROR};
+class XmlTree 
+{
+public :
+   XmlTree (const string& name, XmlTree* dad=NULL);
+  ~XmlTree ();
+
+   int  parseFile (const string& name);
+   int  parseFlow (cpchar flow);
+
+   cpchar getName  ()   { return item_name.c_str() ; }
+   int    getNbrAttributs  ()   { return nbr_attributs ; }
+   int    getNbrChildren   ()   { return nbr_items     ; }
+
+   int           findAttribute (const string& nom);
+   const string& findValue     (const string& nom);
+
+   cpchar   getAttribute  (int nro)    { return tab_attributs [nro].c_str(); }
+   cpchar   getValue      (int nro)    { return tab_values    [nro].c_str(); }
+
+   XmlTree* findChild    (const string& nom);
+   XmlTree* getChild     (int nro)    { return tab_items [nro]; }
+   XmlTree* getParent    ()           { return xml_parent; }
+
+                  // ------------------------- Modifications
+
+   XmlTree* addChild    (const string& nom);
+   void     addAttribut (const string& nom, const string& valeur);
+   void     setName     (const string&  nom)   { item_name = nom; }
+   void     dump        (int niveau=0);
+
+   int      goTo        (cpchar  ouca);
+
+private :
+   int  parseXml ();
+   int  readLine ();
+   EnumItem  readItem  (string& item);
+   EnumItem  getItem   (string& item, EnumItem waited=M_NONE);
+   int       getString (string& item);
+   int       getIdent  (string& item);
+   int       getChar   ();
+   void      putError  (cpchar why);
+
+private :
+   string   item_name;
+   string   item_vide;
+   int      nbr_attributs;
+   int      nbr_items;
+   XmlTree* xml_parent;
+
+   vector <string>   tab_attributs;
+   vector <string>   tab_values;
+   vector <XmlTree*> tab_items;
+                               // Lecture
+   string   fic_buffer;
+   int      len_buffer;
+   int      nro_ligne;
+   int      fic_pos;
+   int      pos_flow;
+   pfile    xml_file;
+   cpchar   xml_flow;
+   bool     xml_ended; 
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexXmlWriter.cxx b/src/HEXABLOCK/HexXmlWriter.cxx
new file mode 100755 (executable)
index 0000000..400ba2b
--- /dev/null
@@ -0,0 +1,186 @@
+
+// C++ : Ecriture en XML
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum { M_CLOSED, M_OPEN, M_SAUT };
+
+// ========================================================= Constructeur
+XmlWriter::XmlWriter  ()
+{
+   xml_file  = stdout;
+   xml_level = 0;
+   xml_pos   = 0;
+   on_file   = true;
+}
+// ========================================================= openXml 
+int XmlWriter::openXml (cpchar nomfic)
+{
+   xml_level  = 0;
+   xml_pos    = 0;
+   xml_buffer = "";
+   xml_file   = stdout;
+   on_file    = false;
+
+   if (nomfic != NULL)
+      {
+      on_file   = true;
+      bool suff = true;
+      int  pext = strlen (nomfic) - 4;
+      if (pext > 0)
+         {
+         string sext = &nomfic[pext];
+         set_minus (sext);
+         suff = sext != ".xml";
+         }
+      string fname = nomfic;
+      if (suff) 
+         fname   += ".xml";
+      xml_file = fopen (fname.c_str(), "w");
+      if (xml_file==NULL)
+         {
+         xml_file = stdout;
+         return HERR;
+         }
+      }
+
+   ecrire ("<?xml version='1.0'?>");
+   return HOK;
+}
+// ========================================================= closeXml 
+void XmlWriter::closeXml ()
+{
+   while (NOT pile_mark.empty())
+       closeMark ();
+
+   if (xml_file!=stdout)
+      fclose (xml_file);
+
+   xml_file = stdout;
+}
+// ========================================================= addMark 
+void XmlWriter::addMark (cpchar balise, bool jump)
+{
+   openMark (balise); 
+   ecrire (">");
+   if (jump) 
+      {
+      alaLigne ();
+      pile_etat.top () = M_SAUT;
+      }
+   else
+      {
+      pile_etat.top () = M_CLOSED;
+      }
+}
+// ========================================================= endMark 
+void XmlWriter::endMark ()
+{
+   ecrire ("> ");
+   pile_etat.top () = M_SAUT;
+}
+// ========================================================= openMark 
+void XmlWriter::openMark (cpchar balise)
+{
+   jumpLine ();
+   string mot = "<";
+   mot +=  balise;
+   ecrire (mot);
+
+   pile_mark.push (balise);
+   pile_etat.push (M_OPEN);
+   xml_level ++;
+}
+// ========================================================= closeMark
+void XmlWriter::closeMark (bool jump)
+{
+   string balise = pile_mark.top ();
+   string mot    = "</";
+   int    etat   = pile_etat.top ();
+
+   xml_level --;
+   switch (etat)
+      {
+      case M_OPEN : ecrire (" />");
+                    break;
+      case M_SAUT : jumpLine ();
+      default :
+           mot += balise;
+           mot += ">";
+           ecrire (mot);
+      }
+
+   pile_mark.pop ();
+   pile_etat.pop ();
+   alaLigne ();
+   if (jump) alaLigne (true);
+}
+// ========================================================= jumpLine 
+void XmlWriter::jumpLine ()
+{
+   if (xml_pos>0)
+      addMot ("\n");
+
+   xml_pos = xml_level * xml_decal;
+   if (xml_pos > 0)
+      {
+      string  space (xml_pos, ' ');
+      addMot (space.c_str());
+      }
+}
+// ========================================================= ecrire
+void XmlWriter::ecrire (cpchar mot)
+{
+   int lg   = strlen (mot);
+   xml_pos += lg;
+
+   if (xml_pos >= xml_size)
+       {
+       jumpLine ();
+       xml_pos += lg;
+       }
+
+   addMot (mot);
+}
+// ========================================================= alaLigne
+void XmlWriter::alaLigne (bool force)
+{
+   if (xml_pos==0 && NOT force) 
+      return;
+
+   xml_pos = 0;
+   addMot ("\n");
+}
+// ========================================================= addAttribute 
+void XmlWriter::addAttribute (cpchar cle, cpchar valeur)
+{
+   string phrase = " ";
+   phrase += cle;
+   phrase += " = \"";
+   phrase += valeur;
+   phrase += "\"";
+
+   ecrire (phrase);
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexXmlWriter.hxx b/src/HEXABLOCK/HexXmlWriter.hxx
new file mode 100755 (executable)
index 0000000..f75bc5a
--- /dev/null
@@ -0,0 +1,98 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// Class : Ecriture d'un fichier XML
+//
+#ifndef __XML_WRITER_H
+#define __XML_WRITER_H
+
+#include "hexa_base.hxx"
+#include <stack>
+#include <vector>
+
+BEGIN_NAMESPACE_HEXA
+
+class XmlWriter 
+{
+public :
+   XmlWriter ();
+  ~XmlWriter ()    { closeXml () ; }
+
+   int    openXml  (string& nom)     { return openXml (nom.c_str()); }
+   int    openXml  (cpchar nom=NULL);
+   void   closeXml ();
+   cpchar getXml   ()                { return xml_buffer.c_str();    }
+
+   void openMark  (cpchar balise);                 // <Balise .. 
+   void addMark   (cpchar balise, bool jump=true); // <Balise> + eol
+   void closeMark (bool jump=false);               // </Balise> ou  />
+   void endMark ();       //         >
+
+   void addAttribute (cpchar attrib, cpchar  valeur); // attrib="valeur"
+   void addAttribute (cpchar attrib, int     valeur);
+   void addAttribute (cpchar attrib, double  valeur);
+   void addAttribute (cpchar attrib, string& valeur);
+
+private :
+    void jumpLine ();
+    void alaLigne (bool force=false);
+    void ecrire   (cpchar  mot);
+    void ecrire   (string& mot) { ecrire (mot.c_str()) ; }
+    void addMot   (cpchar  mot);
+
+private :
+    enum  {xml_decal=3, xml_size=80};
+    pfile  xml_file;
+    int    xml_level;
+    int    xml_pos;
+    bool   on_file;
+    std::string  xml_buffer;
+    std::stack <std::string, std::vector <std::string> >  pile_mark; 
+    std::stack <int,         std::vector <int> >          pile_etat; 
+};
+// ====================================================== addAttribute (I)
+inline void XmlWriter::addAttribute (cpchar attrib, int valeur)
+{
+   char buffer [20]; 
+   sprintf (buffer, "%d", valeur);
+   addAttribute (attrib, buffer);
+}
+// ====================================================== addAttribute (R)
+inline void XmlWriter::addAttribute (cpchar attrib, double valeur)
+{
+   char buffer [20]; 
+   sprintf (buffer, "%g", valeur);
+   addAttribute (attrib, buffer);
+}
+// ====================================================== addAttribute (stl)
+inline void XmlWriter::addAttribute (cpchar attrib, string& valeur)
+{
+   addAttribute (attrib, valeur.c_str());
+}
+// ====================================================== addMot
+inline void XmlWriter::addMot (cpchar mot)
+{
+   if (on_file) 
+      fprintf (xml_file, mot);
+   else 
+      xml_buffer += mot;
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/Makefile.am b/src/HEXABLOCK/Makefile.am
new file mode 100755 (executable)
index 0000000..3d1c5b9
--- /dev/null
@@ -0,0 +1,144 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+#      
+# header files  
+salomeinclude_HEADERS = \
+       HexGroup.hxx \
+       HexCylinder.hxx \
+       HexEdge.hxx \
+       HexGlobale.hxx \
+       HexPropagation.hxx \
+       HexVector.hxx \
+       HexXmlWriter.hxx \
+       hexa_base.hxx \
+       HexDiagnostics.hxx \
+       HexElements.hxx \
+       HexHexa.hxx \
+       HexMatrix.hxx \
+       HexQuad.hxx \
+       HexVertex.hxx \
+       HexLaw.hxx \
+       HexCloner.hxx \
+       HexDocument.hxx \
+       HexEltBase.hxx \
+       Hex.hxx \
+       HexPipe.hxx \
+       HexShape.hxx \
+       HexXmlTree.hxx \
+       HexCrossElements.hxx \
+       HexAnaQuads.hxx \
+       HexKasPoint.hxx \
+       HexKasLine.hxx \
+       HexKasBiCylinder.hxx \
+       HexKas_functions.hxx \
+       HexCramer.hxx
+
+
+# Libraries targets
+# SD/Propagation/HexPropagation.cxx \
+# SD/Law/HexLaw.cxx \
+#
+lib_LTLIBRARIES = libHEXABLOCKimpl.la
+
+dist_libHEXABLOCKimpl_la_SOURCES = \
+       hexa_utils.cxx \
+       HexEltBase.cxx \
+       HexGlobale.cxx \
+       HexCloner.cxx   \
+       HexVertex.cxx \
+       HexEdge.cxx \
+       HexQuad.cxx \
+       HexHexa.cxx \
+       HexVector.cxx \
+       HexElements.cxx \
+       HexElements_bis.cxx \
+       HexElements_ter.cxx \
+       HexElements_piq.cxx \
+       HexElements_asso.cxx \
+       HexElements_grid.cxx \
+       HexCylinder.cxx \
+       HexGroup.cxx \
+       HexPipe.cxx \
+       HexLaw.cxx \
+       HexShape.cxx \
+       HexDocument_trans.cxx \
+       HexDocument_Xml.cxx \
+       HexDocument.cxx \
+       HexXmlTree.cxx \
+       HexXmlWriter.cxx \
+       HexCrossElements.cxx \
+       HexCrossElements_build.cxx \
+       Hex.cxx              \
+       HexDocument_asso.cxx \
+       HexDocument_quads.cxx \
+       HexKasPoint.cxx \
+       HexKasLine.cxx \
+       HexKasBiCylinder.cxx \
+       HexKas_functions.cxx
+
+# libHEXABLOCKimpl_la_CPPFLAGS = \
+#      -I$(top_builddir)/salome_adm/unix
+# 
+# libHEXABLOCKimpl_la_LDFLAGS = \
+#      -lOpUtil
+
+libHEXABLOCKimpl_la_CPPFLAGS = \
+       $(KERNEL_CXXFLAGS)    \
+       $(CAS_CPPFLAGS)       \
+        $(VTK_INCLUDES)       \
+       $(GEOM_CXXFLAGS)      \
+       $(HEXABLOCK_CXXFLAGS) \
+       $(SMESH_CXXFLAGS)     \
+       $(BOOST_CPPFLAGS)     \
+       $(CORBA_CXXFLAGS)     \
+       $(CORBA_INCLUDES)     \
+       -I$(top_builddir)/idl
+
+libHEXABLOCKimpl_la_LDFLAGS = \
+       $(CAS_KERNEL) -lTKBRep -lTKPrim -lTKG2d -lTKG3d -lTKTopAlgo -lTKGeomBase -lTKGeomAlgo  -lTKBool -lTKBO \
+       $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace -lSALOMEBasics
+
+####  libHexaBlockimpl_la_CPPFLAGS =  \
+       ####  $(KERNEL_CXXFLAGS)    \
+       ####  $(CAS_CPPFLAGS)       \
+        ####  $(VTK_INCLUDES)       \
+       ####  $(GEOM_CXXFLAGS)      \
+       ####  $(HEXABLOCK_CXXFLAGS) \
+       ####  $(MED_CXXFLAGS)       \
+       ####  $(SMESH_CXXFLAGS)     \
+       ####  $(BOOST_CPPFLAGS)     \
+       ####  $(CORBA_CXXFLAGS)     \
+       ####  $(CORBA_INCLUDES)     \
+       ####  -I$(top_builddir)/idl
+
+####  libHexaBlockimpl_la_LDFLAGS  = \
+       ####  ../../idl/libSalomeIDLHEXABLOCKPLUGIN.la \
+       ####  $(CAS_KERNEL) -lTKBRep -lTKG2d -lTKG3d -lTKTopAlgo -lTKGeomBase -lTKGeomAlgo \
+       ####  $(HEXABLOCK_LDFLAGS) -lHEXABLOCKEngine \
+       ####  $(MED_LDFLAGS) -lSalomeIDLMED \
+       ####  $(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lSMESHDS -lSMDS \
+       ####  $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace -lSALOMEBasics
diff --git a/src/HEXABLOCK/Sauver b/src/HEXABLOCK/Sauver
new file mode 100755 (executable)
index 0000000..86f9193
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Comm : Sauvegarde
+
+model=`pwd`
+model=`basename $model`
+saved=motor_saved
+
+umake -clean
+touch _____________________________
+cd ..
+mkdir -p $saved
+###   ./$model/dsave $* -ln internal_doc implem model -d $saved
+./$model/dsave $model -d $saved
diff --git a/src/HEXABLOCK/dsave b/src/HEXABLOCK/dsave
new file mode 100644 (file)
index 0000000..00bd49f
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Comm : Proc de sauvegarde de repertoire
+
+appel=$0
+PATH=/usr/bin:$PATH
+
+## ========================================================== Begin
+
+radical=pack
+
+if ( [ -z "$1" ] ) then
+   echo
+   echo " *** Indiquez un repertoire a sauver"
+   echo
+   exit 1
+   fi
+
+radical=`echo $1 | cut -d/ -f1 | cut -d. -f1`
+liste_rep=
+dest=.
+wait_dest=
+h=
+psuff=
+for arg in $*
+    do
+    case $arg in 
+       -setx ) set -x
+         ;;
+       *.tgz ) radical=`echo $arg | cut -d. -f1`
+         ;;
+       -ln ) h=h
+         ;;
+       -d )  wait_dest=ok
+         ;;
+       -m )  psuff="-matin"
+         ;;
+       -s )  psuff="-soir"
+         ;;
+
+       d=* | -d=* )   dest=`echo $arg | cut -d= -f2`
+                 echo dest=$dest
+         ;;
+       * ) if ( [ $wait_dest ] ) then
+              wait_dest=
+              dest=$arg
+           else
+              liste_rep="$liste_rep $arg"
+              radical=$arg
+           fi
+         ;;
+    esac
+    done
+
+suff=`date '+%Y-%m-%d'`
+suff2=`date '+%Y-%m-%d_%H-%M'`
+
+fictar="$dest/$radical-$suff$psuff.tgz"
+if ( [ -f $fictar ] ) then
+   fictar="$dest/$radical-$suff2$psuff.tgz"
+   fi
+
+tar cvfz$h $fictar $liste_rep
+echo
+echo " ... Fichier cree : $fictar"
+
diff --git a/src/HEXABLOCK/hexa_base.hxx b/src/HEXABLOCK/hexa_base.hxx
new file mode 100755 (executable)
index 0000000..1fe11fd
--- /dev/null
@@ -0,0 +1,229 @@
+
+// Incl : Common definitions for HEXA-BLOCK
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXA_BASE_H_
+#define _HEXA_BASE_H_
+
+#include <cstdio>
+#include <cstring>
+
+                    // Conventions C Ansi compatibles
+typedef char*       pchar;
+typedef const char* cpchar;
+typedef FILE*       pfile;
+
+#define Cestegal(c1,c2)      !strcmp(c1,c2)
+#define Cestdifferent(c1,c2)  strcmp(c1,c2)
+#define Cestvide(c1)    !c1[0]
+#define Cestnonvide(c1)  c1[0]
+
+                     // Pour rendre les operateurs plus visibles
+#define NOT    !  
+#define XOR    ^
+#define MODULO %
+#define INOT   `
+// #define IOR    |
+#define IAND   &
+                    // Chaines de bits 
+#define DeuxPuissance(n) (1 << (n))
+
+                     // Codes retour d'une fonction 
+#define HOK  0       // Code retour=0 :  deroulement correct
+#define HERR 1       // Code retour>0 = numero d'erreur, 1 par defaut
+#define NOTHING -1   // Code retour fonction de recherche d'un index
+
+#define EOL '\n'
+#define EOS 0
+#define CHVIDE ""
+                      // Calculs reels en 3D
+#define ZEROR 0.0
+#define UNR   1.0
+#define DEMI  0.5
+#define DIM2  2
+
+// enum EnumCoord { dir_x, dir_y, dir_z, DIM3 };
+// typedef double Real;
+// typedef double Real3 [DIM3];
+
+#ifndef PI
+#define PI    3.1415926535898
+#endif
+                       // Conventions C++
+#include <string>
+#include <vector>
+                       // Impressions de mise au point
+#include <iostream>
+using namespace std;
+
+#define HexDisplay(x)      cout << " ... " #x " = " << x << endl
+#define PutData(x)      cout << " ... " #x " = " << x << endl
+#define PutCoord(x)      cout << " ... " #x " = (" << x[0] << ", " \
+                              << x[1] << ", " << x[2] << ")"  << endl
+#define Echo(m)         cout << " _______________ " << m << endl
+
+//  #define Libere(obj)     { if (obj!=NULL) free (obj)      ;  obj=NULL; }
+//  #define Destroy(obj)    { delete obj       ;  obj=NULL   ;            }
+//  #define Deltable(table) { delete [] table  ;  table=NULL ;            }
+
+// ---------------------------------- Definitions propres a HEXA 
+#define HEXA_NS Hex
+#define BEGIN_NAMESPACE_HEXA namespace Hex {
+#define END_NAMESPACE_HEXA   }
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+       6=bed  +----bd-----+ bdf=7
+             /|          /|
+           be |   B    bf |
+           /  |        /  |
+    4=bce +----bc-----+...|...bcf=5
+          |  de     D |   df
+          | E |       | F |             z
+         ce   | C     cf  |             ^
+  2=ade...|...+----ad-|---+ adf=3       |   y
+          |  /        |  /              |  /
+          | ae    A   | af              | /
+          |/          |/                |/
+    0=ace +----ac-----+ acf=1           +----->  x
+                
+ * ----------------------------------------------------- */
+
+//--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+BEGIN_NAMESPACE_HEXA
+
+enum EnumCoord  { dir_x, dir_y, dir_z, DIM3 };
+enum EnumElt    { EL_NONE, EL_VERTEX, EL_EDGE, EL_QUAD, EL_HEXA, EL_VECTOR, 
+                  EL_REMOVED, EL_MAXI };
+
+enum EnumGroup  { HexaCell, QuadCell, EdgeCell, 
+                  HexaNode, QuadNode, EdgeNode, VertexNode};
+
+                //  Modes de remplissage des grilles cylindriques
+enum EnumCyl   { CYL_NOFILL, CYL_CL4, CYL_CL6, CYL_CLOSED, CYL_PEER, CYL_ODD};
+enum EnumGrid   { GR_NONE, GR_CARTESIAN, GR_CYLINDRIC, GR_SPHERIC, GR_JOINT, 
+                  GR_BICYL, GR_BIPIPE, GR_REPLACE, 
+                  GR_HEMISPHERIC, GR_RIND, GR_PART_SPHERIC, GR_PART_RIND };
+                //  Sommets de la decomposition canonique du bicylindre
+                // 0    1     2    3     4    5     6    7     8
+enum EnumVCyl   { S_E, S_NE, S_N, S_NW, S_W, S_SW, S_S, S_SE, S_MAXI };
+
+enum KindLaw    { Uniform, Arithmetic, Geometric };
+
+enum EnumOrient { OR_FRONT, OR_LEFT, OR_RIGHT, OR_BACK }; // respecter l'ordre
+enum EnumMark   { IS_NONE=-1,  IS_MARRIED=-2 };
+enum EnumCount  { NO_COUNTED=-3, NO_USED=-2, IS_USED=-1};
+
+enum EnumVertex { V_AMONT, V_AVAL, V_TWO };
+enum EnumQuad   { E_A, E_B, E_C, E_D, QUAD4 };
+
+          //      z=0   z=1   y=0   y=1   x=0  x=1
+enum EnumHQuad   {Q_A,  Q_B,  Q_C,  Q_D,  Q_E, Q_F,  HQ_MAXI};
+
+enum EnumHEdge   {E_AC, E_AD, E_BC, E_BD, 
+                  E_AE, E_AF, E_BE, E_BF,
+                  E_CE, E_CF, E_DE, E_DF,  HE_MAXI };
+
+enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, 
+                  HV_MAXI };
+
+enum EnumQDirection {Q_INSIDE, Q_DIRECT, Q_INVERSE, Q_UNDEFINED, Q_WAITING };
+
+enum { CylSmall=0, CylBig=1, NxInt=1, NxExt=2 };
+
+class Document;
+class EltBase;
+
+class Hexa;
+class Quad;
+class Edge;
+class Vertex;
+
+class Cylinder;
+class Pipe;
+class Prism;
+
+class Vector;
+class Matrix;
+class Cloner;
+class XmlWriter;
+class XmlTree;
+
+class  Elements;
+class  GridElements;
+class  SphericalGrid;
+class  CrossElements;
+
+struct  StrOrient;
+class   Shape;
+class   Globale;
+class   Propagation;
+class   Law;
+class   Group;
+
+class   AnaQuads;
+class   Pattern;
+
+typedef std::vector <Hexa*>  Hexas;
+typedef std::vector <Quad*>  Quads;
+typedef std::vector <Edge*>  Edges;
+typedef std::vector <Shape*> Shapes;
+typedef std::vector <double> RealVector;
+
+typedef double Real;
+typedef double Real3 [DIM3];
+
+                        // Quelques fonctions :
+
+pchar   get_temp_name (cpchar format, pchar nomfic);
+void    fatal_error   (cpchar format, cpchar info1=NULL, cpchar info2=NULL);
+
+double  prod_scalaire  (double v1[], double v2[]);
+double* prod_vectoriel (double v1[], double v2[], double v3[]);
+double  prod_mixte     (double vi[], double vj[], double vk[]);
+
+double  calc_norme     (double v1[]);
+double  calc_distance  (double v1[], double v2[]);
+void    calc_vecteur   (double pta[], double ptb[], double vab[]);
+void    calc_milieu    (double pta[], double ptb[], double milieu[]);
+int     normer_vecteur (double v1[]);
+
+double carre       (double val);
+bool   same_coords (double* pa, double* pb, double epsilon=1e-6);
+
+bool   on_debug();
+int    niv_debug();
+
+void   set_minus (string& chaine);
+
+bool   special_option ();
+void   set_special_option (bool opt);
+
+const double Epsil   = 1e-6;
+const double UnEpsil = 0.999999;
+const double Epsil2  = 1e-12;
+
+
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/hexa_utils.cxx b/src/HEXABLOCK/hexa_utils.cxx
new file mode 100755 (executable)
index 0000000..e08dc25
--- /dev/null
@@ -0,0 +1,182 @@
+
+// C++ : Fonctions utilitaires de Hexa
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "hexa_base.hxx"
+
+#include <cstdlib>
+#include <cmath>
+#include <sys/stat.h>
+
+BEGIN_NAMESPACE_HEXA
+
+static int debug_level = NOTHING;
+
+// ========================================================= prod_scalaire
+bool on_debug ()
+{
+   if (debug_level == NOTHING)
+      {
+      cpchar rep = getenv ("HEXA_DB");
+      if (rep!=NULL)
+          debug_level = atoi (rep);
+      debug_level = std::max (debug_level, 0); 
+      }
+   return debug_level > 0;
+    
+}
+// ======================================================== set_minus
+void set_minus (string& chaine)
+{
+   int lg = chaine.size();
+   for (int nc=0 ; nc<lg ; nc++)
+       chaine [lg] = tolower (chaine[lg]);
+}
+// ======================================================== get_temp_name
+pchar get_temp_name (cpchar format, pchar nomfic)
+{
+   int nro = 0;
+   while (true)
+         {
+         nro ++;
+         sprintf (nomfic, format, nro);
+         
+         struct stat buffer;
+         int rep = stat (nomfic, &buffer);
+         if (rep<0) 
+            return nomfic;
+         }
+}
+// ========================================================= prod_scalaire
+double prod_scalaire (double v1[], double v2[])
+{
+   double prod = v1[dir_x]*v2[dir_x] + v1[dir_y]*v2[dir_y] 
+                                     + v1[dir_z]*v2[dir_z];
+   return prod;
+}
+// ========================================================= calc_norme
+double calc_norme (double vect[])
+{
+    double norme = vect[dir_x]*vect[dir_x] + vect[dir_y]*vect[dir_y] 
+                                          + vect[dir_z]*vect[dir_z];
+    return sqrt (norme);
+}
+// ======================================================== calc_distance
+double calc_distance  (double v1[], double v2[])
+{
+   Real3 vv = { v2[dir_x]-v1[dir_x], v2[dir_y]-v1[dir_y], v2[dir_z]-v1[dir_z] };
+   return calc_norme (vv);
+}
+// ========================================================= calc_vecteur
+void calc_vecteur  (double pta[], double ptb[], double vab[])
+{
+   vab [dir_x] = ptb [dir_x] - pta [dir_x];
+   vab [dir_y] = ptb [dir_y] - pta [dir_y];
+   vab [dir_z] = ptb [dir_z] - pta [dir_z];
+}
+// ========================================================= calc_milieu
+void calc_milieu  (double pta[], double ptb[], double milieu[])
+{
+   milieu [dir_x] = (ptb [dir_x] + pta [dir_x])/2.0;
+   milieu [dir_y] = (ptb [dir_y] + pta [dir_y])/2.0;
+   milieu [dir_z] = (ptb [dir_z] + pta [dir_z])/2.0;
+}
+// ========================================================= normer_vecteur
+int normer_vecteur (double vect[])
+{
+   double dn = calc_norme (vect);
+   if (dn < 1e-30) 
+      return HERR;
+
+   vect [dir_x] /= dn;
+   vect [dir_y] /= dn;
+   vect [dir_z] /= dn;
+   return HOK;
+}
+// ========================================================= prod_vectoriel
+double* prod_vectoriel (double v1[], double v2[], double prod[])
+{
+   prod [dir_x] = v1[dir_y] * v2[dir_z] - v2[dir_y] * v1[dir_z];
+   prod [dir_y] = v1[dir_z] * v2[dir_x] - v2[dir_z] * v1[dir_x];
+   prod [dir_z] = v1[dir_x] * v2[dir_y] - v2[dir_x] * v1[dir_y];
+
+   return prod;
+}
+// ====================================================== carre
+double carre (double val)
+{
+   return val*val;
+}
+// ====================================================== same_coords
+bool same_coords (double* pa, double* pb, double epsilon)
+{
+
+   double d2 = carre (pb[dir_x]-pa[dir_x]) + carre (pb[dir_y]-pa[dir_y]) 
+             + carre (pb[dir_z]-pa[dir_z]); 
+   return d2 < epsilon;
+}
+// ========================================================= prod_mixte
+double prod_mixte (double vi[], double vj[], double vk[])
+{
+   double pmixte = 0;
+
+   for (int nc=0 ; nc<DIM3 ; nc++) 
+       {
+       int nc1 = (nc + 1) MODULO DIM3;
+       int nc2 = (nc + 2) MODULO DIM3;
+       pmixte +=  vk[nc] * (vi [nc1] * vj [nc2] - vj [nc1] * vi [nc2]);
+       }
+
+   return pmixte;
+}
+// ========================================================= fatal_error
+void fatal_error (cpchar format, cpchar info1, cpchar info2)
+{
+   char     buffer [240];
+   sprintf (buffer, format, info1, info2);
+   printf ("****\n");
+   printf ("**** %s\n", buffer);
+   printf ("****\n");
+#ifdef NO_CASCADE
+   printf ("                ............ Erreur fatale\n");
+   exit (94);
+#endif
+   printf ("\n");
+}
+static int current_option = NOTHING;
+// ====================================================== special_option
+bool special_option ()
+{
+   if (current_option == NOTHING)
+      {
+      cpchar rep = getenv ("HEXA_OPTION");
+      if (rep!=NULL)
+          current_option = atoi (rep);
+      current_option = std::max (current_option, 0); 
+      }
+   return current_option > 0;
+}
+// ====================================================== set_special_option
+void set_special_option (bool opt)
+{
+   current_option = opt ? 1 : 0;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/umake b/src/HEXABLOCK/umake
new file mode 100755 (executable)
index 0000000..e39d5a3
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Comm : Makefile associe aux tests unitaires
+
+commande=$0
+liste_args="$*"
+
+# =============================================== Begin
+
+test_u=
+opt=
+for arg in $*
+   do
+   case $arg in
+      -setx ) set -x 
+           ;;
+      -clean  ) 
+         rm -rf *.exe *.a *.o *.bak *.brep *~ *.vtk *.cpp *.xml *.exe.stackdump
+           exit
+           ;;
+      -j  ) opt="$opt -j4"
+           ;;
+      -j* ) opt="$opt $arg"
+           ;;
+      -k  ) echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
+            echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo
+           ;;
+      *) if ( [ -z "$test_u" ] ) then
+            test_u=`echo $arg | cut -d. -f1`
+            ishere=`grep -w $test_u test_*.cxx | grep -c tabargs`
+            if ( [ "$ishere" = "0" ] ) then
+               echo "****"
+               echo "**** Programme non trouve : $test_u"
+               echo "****"
+               exit 1
+               fi
+            fi
+   esac
+   done
+
+if ( [ -z "$test_u" ] ) then
+   test_u=test_hexa
+   fi
+
+if ( [ ! -f makefile.ozz ] ) then
+   ./make.make
+   fi
+
+make -f makefile.ozz $opt main=$test_u
diff --git a/src/HEXABLOCKGUI/CutEdge_QTD.ui b/src/HEXABLOCKGUI/CutEdge_QTD.ui
new file mode 100644 (file)
index 0000000..8511831
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CutEdgeDialog</class>
+ <widget class="QDialog" name="CutEdgeDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>191</width>
+    <height>114</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Cut Edge Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>nb </string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QSpinBox" name="nb_cut_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="e_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Edge </string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Cylinder_QTD.ui b/src/HEXABLOCKGUI/Cylinder_QTD.ui
new file mode 100644 (file)
index 0000000..70562e2
--- /dev/null
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CylinderDialog</class>
+ <widget class="QDialog" name="CylinderDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>247</width>
+    <height>208</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Cylinder Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Point</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Vector</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="vex_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QLineEdit" name="vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>radius</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="QDoubleSpinBox" name="h_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>height</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QDoubleSpinBox" name="r_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Disconnect_QTD.ui b/src/HEXABLOCKGUI/Disconnect_QTD.ui
new file mode 100644 (file)
index 0000000..d5dd26d
--- /dev/null
@@ -0,0 +1,726 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DisconnectDialog</class>
+ <widget class="QDialog" name="DisconnectDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>282</width>
+    <height>623</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Disconnect Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_5">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>50</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>50</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Disconnect</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <property name="sizeConstraint">
+       <enum>QLayout::SetDefaultConstraint</enum>
+      </property>
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Vertex</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Edge</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Edges</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb2">
+        <property name="text">
+         <string>Quad</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QWidget" name="widget" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>64</height>
+         </size>
+        </property>
+        <layout class="QFormLayout" name="formLayout">
+         <property name="sizeConstraint">
+          <enum>QLayout::SetDefaultConstraint</enum>
+         </property>
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="v_le_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>from hexa : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="h_le_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_2" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>64</height>
+         </size>
+        </property>
+        <layout class="QFormLayout" name="formLayout_2">
+         <property name="sizeConstraint">
+          <enum>QLayout::SetDefaultConstraint</enum>
+         </property>
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>edge</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="e_le_rb1">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>from hexa : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="h_le_rb1">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_3" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>64</height>
+         </size>
+        </property>
+        <layout class="QFormLayout" name="formLayout_3">
+         <property name="sizeConstraint">
+          <enum>QLayout::SetDefaultConstraint</enum>
+         </property>
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>quad</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="q_le_rb2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>from hexa : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="h_le_rb2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_4" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>344</height>
+         </size>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_4">
+         <item>
+          <widget class="QGroupBox" name="groupBox_3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>131</height>
+            </size>
+           </property>
+           <property name="title">
+            <string>Disconnect Edges</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_3">
+            <item>
+             <widget class="QListWidget" name="d_edges_lw">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item>
+          <widget class="QGroupBox" name="groupBox_4">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>131</height>
+            </size>
+           </property>
+           <property name="title">
+            <string>From Hexa(s)</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_2">
+            <item>
+             <widget class="QListWidget" name="hexas_lw">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>10</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>255</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>250</x>
+     <y>111</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_4</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>140</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>479</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_4</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>291</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>479</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb3</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_4</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>223</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>479</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb3</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>223</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>190</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_4</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>58</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>479</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>238</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>271</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>268</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>41</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>73</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>153</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>143</x>
+     <y>109</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>181</x>
+     <y>180</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>76</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>197</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>218</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>182</x>
+     <y>38</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>190</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb3</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>223</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>260</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb3</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>223</x>
+     <y>40</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>167</x>
+     <y>120</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/EdgeAssoc_QTD.ui b/src/HEXABLOCKGUI/EdgeAssoc_QTD.ui
new file mode 100644 (file)
index 0000000..f42defd
--- /dev/null
@@ -0,0 +1,662 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>EdgeAssocDialog</class>
+ <widget class="QDialog" name="EdgeAssocDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>309</width>
+    <height>789</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>260</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Edge(s) Association</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>287</width>
+        <height>767</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QGroupBox" name="groupBox_3">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>52</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>52</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>Mode</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <widget class="QRadioButton" name="single_rb">
+            <property name="text">
+             <string>One edge</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="multiple_rb">
+            <property name="text">
+             <string>Line</string>
+            </property>
+            <property name="checked">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_2">
+         <property name="minimumSize">
+          <size>
+           <width>5</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>Arguments</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout">
+          <item>
+           <widget class="QGroupBox" name="vertex_gb">
+            <property name="enabled">
+             <bool>false</bool>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="title">
+             <string>Vertex</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_4">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>First : </string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="first_vex_le">
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="2">
+              <spacer name="horizontalSpacer">
+               <property name="orientation">
+                <enum>Qt::Horizontal</enum>
+               </property>
+               <property name="sizeHint" stdset="0">
+                <size>
+                 <width>78</width>
+                 <height>20</height>
+                </size>
+               </property>
+              </spacer>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="single_edge_gb">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>58</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>58</height>
+             </size>
+            </property>
+            <property name="title">
+             <string>Edge of model</string>
+            </property>
+            <layout class="QHBoxLayout" name="horizontalLayout_3">
+             <item>
+              <widget class="QLineEdit" name="single_edge_le"/>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="edge_gb">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="title">
+             <string>Edges of model</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0" rowspan="2">
+              <widget class="QListWidget" name="edges_lw"/>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="line_gb">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="title">
+             <string>Line of the geometry</string>
+            </property>
+            <layout class="QVBoxLayout" name="verticalLayout_3">
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_4">
+               <item>
+                <widget class="QLabel" name="label_4">
+                 <property name="text">
+                  <string>Line : </string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="single_line_le">
+                 <property name="readOnly">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="QListWidget" name="lines_lw"/>
+             </item>
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout">
+               <item>
+                <widget class="QCheckBox" name="close_cb">
+                 <property name="text">
+                  <string>Closed line</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QCheckBox" name="inverse_cb">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Inversion</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="QGroupBox" name="groupBox">
+               <property name="minimumSize">
+                <size>
+                 <width>0</width>
+                 <height>86</height>
+                </size>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>16777215</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="title">
+                <string>Parameters</string>
+               </property>
+               <layout class="QFormLayout" name="formLayout">
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label_2">
+                  <property name="text">
+                   <string>Start : </string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QDoubleSpinBox" name="pstart_spb">
+                  <property name="decimals">
+                   <number>6</number>
+                  </property>
+                  <property name="maximum">
+                   <double>1.000000000000000</double>
+                  </property>
+                  <property name="singleStep">
+                   <double>0.010000000000000</double>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QLabel" name="label_3">
+                  <property name="text">
+                   <string>End : </string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QDoubleSpinBox" name="pend_spb">
+                  <property name="decimals">
+                   <number>6</number>
+                  </property>
+                  <property name="maximum">
+                   <double>1.000000000000000</double>
+                  </property>
+                  <property name="singleStep">
+                   <double>0.010000000000000</double>
+                  </property>
+                  <property name="value">
+                   <double>1.000000000000000</double>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>5</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>close_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>vertex_gb</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>338</x>
+     <y>537</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>213</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>close_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>pend_spb</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>196</x>
+     <y>495</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>120</x>
+     <y>581</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>close_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_3</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>196</x>
+     <y>495</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>67</x>
+     <y>581</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>close_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>inverse_cb</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>99</x>
+     <y>393</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>221</x>
+     <y>393</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>vertex_gb</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>137</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>single_edge_gb</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>206</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>edge_gb</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>312</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>lines_lw</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>489</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>vertex_gb</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>206</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>137</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>single_edge_gb</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>206</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>206</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>edge_gb</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>206</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>312</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>single_line_le</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>206</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>lines_lw</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>206</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>489</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>single_line_le</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>close_cb</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>90</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>96</x>
+     <y>627</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>close_cb</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>218</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>96</x>
+     <y>627</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>inverse_cb</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>90</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>212</x>
+     <y>627</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>inverse_cb</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>218</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>212</x>
+     <y>627</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>single_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>label_4</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>91</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>57</x>
+     <y>452</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>multiple_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>label_4</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>217</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>57</x>
+     <y>452</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Edge_QTD.ui b/src/HEXABLOCKGUI/Edge_QTD.ui
new file mode 100644 (file)
index 0000000..ade2b3e
--- /dev/null
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>EdgeDialog</class>
+ <widget class="QDialog" name="EdgeDialog">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>294</width>
+    <height>322</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Edge Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetDefaultConstraint</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>50</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Edge</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <property name="sizeConstraint">
+       <enum>QLayout::SetDefaultConstraint</enum>
+      </property>
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( vertex + vertex )</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( pt + vector )</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+      </property>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>Point</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="vex_le_rb1">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="vec_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="2">
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Point 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="v0_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="inputMethodHints">
+            <set>Qt::ImhNone</set>
+           </property>
+           <property name="echoMode">
+            <enum>QLineEdit::Normal</enum>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Point 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="v1_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>10</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>77</x>
+     <y>47</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>73</x>
+     <y>218</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>116</x>
+     <y>44</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>150</x>
+     <y>159</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>222</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>296</x>
+     <y>135</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>251</x>
+     <y>47</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>265</x>
+     <y>206</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Group_QTD.ui b/src/HEXABLOCKGUI/Group_QTD.ui
new file mode 100644 (file)
index 0000000..808e02c
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>GroupDialog</class>
+ <widget class="QDialog" name="GroupDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>298</width>
+    <height>306</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Group Creation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <layout class="QFormLayout" name="formLayout">
+        <item row="0" column="0">
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>name :</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="name_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>kind : </string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QComboBox" name="kind_cb">
+          <item>
+           <property name="text">
+            <string>Edge Cell</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Quad Cell</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Hexa Cell</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Vertex Node</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Edge Node</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Quad Node</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Hexa Node</string>
+           </property>
+          </item>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QGridLayout" name="gridLayout">
+        <item row="0" column="0" rowspan="2">
+         <widget class="QListWidget" name="eltBase_lw"/>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
new file mode 100755 (executable)
index 0000000..89443f8
--- /dev/null
@@ -0,0 +1,2842 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//#define _DEVDEBUG_
+
+// #include <Python.h>
+
+#include <cassert>
+
+
+// #include "klinkitemselectionmodel.h"
+
+
+#include <QInputDialog>
+#include <QIcon>
+#include <QStackedWidget>
+
+
+
+#include <QtxTreeView.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ViewManager.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_DataObject.h>
+#include <SUIT_DataBrowser.h>
+#include <SUIT_FileDlg.h>
+
+// #include <QxScene_ViewManager.h>
+#include <SVTK_ViewManager.h>
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+
+
+
+#include <SOCC_ViewModel.h>
+#include <SOCC_ViewWindow.h>
+#include <OCCViewer_ViewWindow.h>
+
+
+
+// SALOME KERNEL includes
+#include <SALOMEDS_Study.hxx>
+#include <SALOMEDSClient_StudyBuilder.hxx>
+#include <SALOMEDSClient_SComponent.hxx>
+#include <SALOMEDSClient_ClientFactory.hxx>
+#include <SALOMEDSClient_IParameters.hxx>
+
+
+
+#include <SalomeApp_DataObject.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Module.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_DataModel.h>
+
+
+#include <SALOME_ListIO.hxx>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+
+#include <SALOME_LifeCycleCORBA.hxx>
+
+#include <LightApp_VTKSelector.h>
+
+#include <OCCViewer_ViewManager.h>
+
+
+#include <QtxPopupMgr.h>
+
+
+#include "Resource.hxx"
+// #include "QtGuiContext.hxx"
+
+#include "HEXABLOCKGUI.hxx"
+#include "HEXABLOCKGUI_Export.hxx"
+#include "HEXABLOCKGUI_Trace.hxx"
+#include "HEXABLOCKGUI_Resource.hxx"
+// #include "HEXABLOCKGUI_DataModel.hxx"
+#include "HEXABLOCKGUI_DocumentGraphicView.hxx"
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
+#include "HEXABLOCKGUI_DocumentDelegate.hxx"
+#include "HEXABLOCKGUI_DocumentPanel.hxx"
+
+#include <HEXABLOCK_version.h>
+
+#include "MyBasicGUI_PointDlg.hxx"
+
+// #include CORBA_CLIENT_HEADER(HEXABLOCKPlugin_Algorithm)
+
+#include "HEXABLOCK.hxx"
+#include "HexDocument_impl.hxx"
+
+
+#define DW_MINIMUM_WIDTH       50
+#define DWINPUT_MINIMUM_HEIGHT 50
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+int  HEXABLOCKGUI::_oldStudyId = -1;
+
+HEXABLOCK_ORB::HEXABLOCK_Gen_var HEXABLOCKGUI::_hexaEngine  = HEXABLOCK_ORB::HEXABLOCK_Gen::_nil();
+// SMESH::SMESH_Gen_var             HEXABLOCKGUI::_smeshEngine = SMESH::SMESH_Gen::_nil();
+GEOM::GEOM_Gen_var               HEXABLOCKGUI::_geomEngine  = GEOM::GEOM_Gen::_nil();
+
+// std::map<HEXABLOCK::GUI::DocumentModel*,  SVTK_ViewWindow*> HEXABLOCKGUI::svtkViews;
+// std::map<const QAbstractItemModel*,  SVTK_ViewWindow*> HEXABLOCKGUI::svtkViews;
+// std::map<const QAbstractItemModel*,  SUIT_ViewWindow*> HEXABLOCKGUI::salomeViews;
+// HEXABLOCK::GUI::DocumentModel       *HEXABLOCKGUI::_currentModel = NULL;
+
+SVTK_ViewWindow*      HEXABLOCKGUI::currentVtkView = NULL;
+OCCViewer_ViewWindow* HEXABLOCKGUI::currentOccView = NULL;
+
+HEXABLOCKGUI::HEXABLOCKGUI() :
+  SalomeApp_Module( "HEXABLOCK" ), // default name
+  LightApp_Module( "HEXABLOCK" ),
+  _menuId(190),
+  _dwPattern(0),
+  _dwAssociation(0),
+  _dwGroups(0),
+  _dwMesh(0),
+  _dwObjectBrowser(0),
+  _dwInputPanel(0),
+  _currentModel(0),
+  _patternDataModel(0),
+  _patternBuilderModel(0),
+  _patternDataTreeView(0),
+  _patternBuilderTreeView(0),
+  _associationTreeView(0),
+  _groupsTreeView(0),
+  _meshTreeView(0),
+  _currentGraphicView(0),
+  _treeViewDelegate(0),
+  _patternDataSelectionModel(0),
+  _patternBuilderSelectionModel(0),
+  _meshSelectionModel(0),
+  _groupsSelectionModel(0),
+//   _documentCnt(0),
+  _isSaved( false ),
+  _suitVM(0),//,
+//   _selectFromTree( false )
+  _vertexDiag(0),
+  _edgeDiag(0),
+  _quadDiag(0),
+  _hexaDiag(0),
+  _vectorDiag(0),
+  _cylinderDiag(0),
+  _pipeDiag(0),
+  _makeGridDiag(0),
+  _makeCylinderDiag(0),
+  _makePipeDiag(0),
+  _makeCylindersDiag(0),
+  _makePipesDiag(0),
+  _removeHexaDiag(0),
+  _prismQuadDiag(0),
+  _joinQuadDiag(0),
+  _mergeDiag(0),
+  _disconnectDiag(0),
+  _cutEdgeDiag(0),
+  _makeTransformationDiag(0),
+  _makeSymmetryDiag(0),
+  _performTransformationDiag(0),
+  _performSymmetryDiag(0),
+  _vertexAssocDiag(0),
+  _edgeAssocDiag(0),
+  _quadAssocDiag(0),
+  _groupDiag(0),
+  _lawDiag(0),
+  _propagationDiag(0),
+  _computeMeshDiag(0),
+  _replaceHexaDiag(0),
+  _quadRevolutionDiag(0),
+  _makeHemiSphereDiag(0)
+{
+  DEBTRACE("HEXABLOCKGUI::HEXABLOCKGUI");
+//   _studyContextMap.clear();
+}
+
+HEXABLOCKGUI::~HEXABLOCKGUI()
+{
+//   if ( getApp() )
+//     disconnect( getApp(), SIGNAL(studyClosed()), _genericGui, SLOT  (onCleanOnExit()));
+}
+
+
+SalomeApp_Study* HEXABLOCKGUI::activeStudy()
+{
+  SUIT_Application* app = SUIT_Session::session()->activeApplication();
+  if( app )
+    return dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  else
+    return NULL;
+}
+
+
+// Gets an reference to the module's engine
+HEXABLOCK_ORB::HEXABLOCK_Gen_ptr HEXABLOCKGUI::InitHEXABLOCKGen( SalomeApp_Application* app )
+{
+  Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer", "HEXABLOCK" );
+  HEXABLOCK_ORB::HEXABLOCK_Gen_ptr clr = HEXABLOCK_ORB::HEXABLOCK_Gen::_narrow(comp);
+  ASSERT(!CORBA::is_nil(clr));
+  return clr;
+}
+
+// // Gets an reference to SMESH's engine CS_TO_DELETE
+// SMESH::SMESH_Gen_ptr HEXABLOCKGUI::InitSMESHGen( SalomeApp_Application* app,
+//                                                  const std::string& container )
+// {
+//   Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( container.c_str(), "SMESH" );
+//   SMESH::SMESH_Gen_ptr          clr = SMESH::SMESH_Gen::_narrow(comp);
+//   ASSERT(!CORBA::is_nil(clr));
+//   return clr;
+// }
+//
+// // Gets an reference to GEOM's engine CS_TO_DELETE
+GEOM::GEOM_Gen_ptr HEXABLOCKGUI::InitGEOMGen( SalomeApp_Application* app,
+                                              const std::string& container )
+{
+  Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( container.c_str(), "GEOM" );
+  GEOM::GEOM_Gen_ptr            clr = GEOM::GEOM_Gen::_narrow(comp);
+  ASSERT(!CORBA::is_nil(clr));
+  return clr;
+}
+
+
+void HEXABLOCKGUI::initialize( CAM_Application* app )
+{
+  DEBTRACE("HEXABLOCKGUI::initialize");
+  SalomeApp_Module::initialize( app );
+
+  _hexaEngine = InitHEXABLOCKGen( dynamic_cast<SalomeApp_Application*>( app ) );
+  _geomEngine = InitGEOMGen( dynamic_cast<SalomeApp_Application*>( app ) );
+
+  QWidget* aParent = application()->desktop();
+  DEBTRACE(app << "  " << application() << " " << application()->desktop() << " " << aParent);
+
+  SUIT_ResourceMgr* aResourceMgr = app->resourceMgr();
+  setResource(aResourceMgr);
+
+//   if ( app && app->desktop() ){
+//       connect( app->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
+//                this, SLOT(onWindowActivated( SUIT_ViewWindow* )) );
+//       connect( getApp()->objectBrowser()->treeView(),SIGNAL( clicked(const QModelIndex&) ),
+//                this, SLOT( onObjectBrowserClick(const QModelIndex&) ) );
+// //       connect( getApp(),   SIGNAL(studyClosed()), _genericGui,SLOT  (onCleanOnExit()));
+//   }
+
+// // TEST
+//   QGraphicsScene* scene = new QGraphicsScene;
+//   scene->addText("Hello, philou!");
+//   QGraphicsView* view = new QGraphicsView(scene);
+//   view->show();
+//   app->desktop()->setCentralWidget(view);
+// // TEST
+
+  createAndFillDockWidget();
+  createActions();
+  createMenus();
+  createTools();
+  studyActivated();
+  // add component to study
+  if (createSComponent()) updateObjBrowser();
+
+}
+
+void HEXABLOCKGUI::viewManagers( QStringList& list ) const
+{
+  DEBTRACE("HEXABLOCKGUI::viewManagers");
+  MESSAGE("HEXABLOCKGUI::viewManagers");
+//   foreach (const QString &str, list)
+//     MESSAGE("HEXABLOCKGUI::viewManagers"<<str.toStdString() );
+//   list.append( QxScene_Viewer::Type() );
+//   list.append( OCCViewer_Viewer::Type() );
+//   list.append( SVTK_Viewer::Type() );
+}
+
+bool HEXABLOCKGUI::activateModule( SUIT_Study* theStudy )
+{
+  DEBTRACE("HEXABLOCKGUI::activateModule");
+  bool bOk = SalomeApp_Module::activateModule( theStudy );
+  if ( !bOk ) return false;
+
+//   setMenuShown( true );
+//   setToolShown( true );
+  if ( _currentModel == 0 )
+    initialMenus();
+  else
+    showAllMenus();
+
+
+//   showDockWidgets(false);
+  showDockWidgets(true);
+
+//   // import Python module that manages HEXABLOCK plugins (need to be here because SalomePyQt API uses active module)
+//   PyGILState_STATE gstate = PyGILState_Ensure();
+//   PyObject* pluginsmanager=PyImport_ImportModule((char*)"salome_pluginsmanager");
+//   if(pluginsmanager==NULL)
+//     PyErr_Print();
+//   else
+//     {
+//       PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"hexablock","HEXABLOCK","Plugins");
+//       if(result==NULL)
+//         PyErr_Print();
+//       Py_XDECREF(result);
+//     }
+//   PyGILState_Release(gstate);
+//   // end of HEXABLOCK plugins loading
+
+    connect( getApp()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
+              this, SLOT(onWindowActivated( SUIT_ViewWindow* )) );
+    connect( getApp()->objectBrowser()->treeView(),SIGNAL( clicked(const QModelIndex&) ),
+              this, SLOT( onObjectBrowserClick(const QModelIndex&) ) );
+//       connect( getApp(),   SIGNAL(studyClosed()), _genericGui,SLOT  (onCleanOnExit()));
+
+
+  LightApp_SelectionMgr* sm = getApp()->selectionMgr();
+
+  SUIT_ViewManager* vm;
+  ViewManagerList OCCViewManagers, VTKViewManagers;
+
+  application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers );
+  QListIterator<SUIT_ViewManager*> itOCC( OCCViewManagers );
+  while ( itOCC.hasNext() && (vm = itOCC.next()) )
+    myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) );
+
+  application()->viewManagers( SVTK_Viewer::Type(), VTKViewManagers );
+  QListIterator<SUIT_ViewManager*> itVTK( VTKViewManagers );
+  while ( itVTK.hasNext() && (vm = itVTK.next()) )
+    myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) );
+
+  //NPAL 19674
+  SALOME_ListIO selected;
+  sm->selectedObjects( selected );
+  sm->clearSelected();
+
+  // disable OCC selectors
+  getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
+  QListIterator<GEOMGUI_OCCSelector*> itOCCSel( myOCCSelectors );
+  while ( itOCCSel.hasNext() )
+    if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() )
+      sr->setEnabled(true);
+
+  // disable VTK selectors
+  getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
+  QListIterator<LightApp_VTKSelector*> itVTKSel( myVTKSelectors );
+  while ( itVTKSel.hasNext() )
+    if ( LightApp_VTKSelector* sr = itVTKSel.next() )
+      sr->setEnabled(true);
+
+  sm->setSelectedObjects( selected, true );   //NPAL 19674
+
+
+  _hexaEngine->SetCurrentStudy(SALOMEDS::Study::_nil());
+  if ( SalomeApp_Study* s = dynamic_cast<SalomeApp_Study*>( theStudy ))
+    if ( _PTR(Study) aStudy = s->studyDS()) {
+      //define _CAST(Class, shared_ptr_Obj) dynamic_cast<SALOMEDS_##Class*>(shared_ptr_Obj.get())
+      _hexaEngine->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
+      updateObjBrowser(); // objects can be removed
+    }
+
+
+  return bOk;
+}
+
+
+
+bool HEXABLOCKGUI::deactivateModule( SUIT_Study* theStudy )
+{
+  DEBTRACE("HEXABLOCKGUI::deactivateModule");
+
+  setMenuShown( false );
+  setToolShown( false );
+  showDockWidgets( false );
+//   QtGuiContext *context = QtGuiContext::getQtCurrent();
+//   _studyContextMap[theStudy->id()] = context;
+//   DEBTRACE("_studyContextMap[theStudy] " << theStudy << " " << context);
+
+  disconnect( getApp()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
+            this, SLOT(onWindowActivated( SUIT_ViewWindow* )) );
+  disconnect( getApp()->objectBrowser()->treeView(),SIGNAL( clicked(const QModelIndex&) ),
+            this, SLOT( onObjectBrowserClick(const QModelIndex&) ) );
+//       connect( getApp(),   SIGNAL(studyClosed()), _genericGui,SLOT  (onCleanOnExit()));
+
+
+  if ( HEXABLOCKGUI::currentVtkView ){
+    HEXABLOCKGUI::currentVtkView->SetSelectionMode( ActorSelection ); //default selectionMode in VTKView
+  }
+
+//  if (HEXABLOCKGUI::currentOccView)
+//  {
+//      //getDisplayer()->globalSelection();//????     //defaut selectionMode in OccView
+//  }
+
+
+//   if ( _patternDataSelectionModel ){
+//     delete _patternDataSelectionModel;
+//     _patternDataSelectionModel = NULL;
+//   }
+//   if ( _patternBuilderSelectionModel ){
+//     delete _patternBuilderSelectionModel;
+//     _patternBuilderSelectionModel = NULL;
+//   }
+
+  qDeleteAll(myOCCSelectors);
+  myOCCSelectors.clear();
+  getApp()->selectionMgr()->setEnabled( true, OCCViewer_Viewer::Type() );
+
+  qDeleteAll(myVTKSelectors);
+  myVTKSelectors.clear();
+  getApp()->selectionMgr()->setEnabled( true, SVTK_Viewer::Type() );
+
+  return SalomeApp_Module::deactivateModule( theStudy );
+}
+
+
+bool HEXABLOCKGUI::renameAllowed( const QString& entry) const
+{
+//   MESSAGE("HEXABLOCKGUI::renameAllowed");
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
+  SalomeApp_DataObject* obj = appStudy ? dynamic_cast<SalomeApp_DataObject*>(appStudy->findObjectByEntry(entry)) : 0;
+
+  bool res = app && appStudy && obj && !appStudy->isComponent(entry) && !obj->isReference();
+  return (app && appStudy && obj && !appStudy->isComponent(entry) && !obj->isReference());
+}
+
+
+bool HEXABLOCKGUI::renameObject( const QString& entry, const QString& name)
+{
+  MESSAGE("HEXABLOCKGUI::renameObject");
+//   bool appRes = SalomeApp_Module::renameObject(entry,name);
+//   MESSAGE("appRes"<<appRes);
+//   if( !appRes )
+//     return false;
+  bool result = false;
+
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
+  SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
+
+  if(!appStudy)
+    return result;
+
+  _PTR(Study) aStudy = appStudy->studyDS();
+
+  if(!aStudy)
+    return result;
+
+  _PTR(SObject) obj ( aStudy->FindObjectID(qPrintable(entry)) );
+  _PTR(GenericAttribute) anAttr;
+  if ( obj ){
+    if ( obj->FindAttribute(anAttr, "AttributeName") ){
+      _PTR(AttributeName) aName (anAttr);
+//       GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
+//
+//       HEXABLOCK_Gen_i::Document_var aDoc = HEXABLOCK_Gen_i::Document::_narrow( theIOR );
+//       if (!CORBA::is_nil(aDoc)) {
+        aName->SetValue( name.toLatin1().data() ); // rename the SObject
+//         aDoc->setName( name.toLatin1().data() );  // Rename the corresponding GEOM_Object
+        _currentModel->setName( name/*.toLatin1().data()*/ );
+//     _currentGraphicView->setWindowTitle( _currentModel->getName() );
+        result = true;
+    }
+  }
+  return result;
+}
+
+
+// --- Default windows
+void HEXABLOCKGUI::windows( QMap<int, int>& theMap ) const
+{
+  DEBTRACE("HEXABLOCKGUI::windows");
+  theMap.clear();
+  theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+  theMap.insert( SalomeApp_Application::WT_PyConsole,     Qt::BottomDockWidgetArea );
+}
+
+// LightApp_Displayer* HEXABLOCKGUI::displayer()
+// {
+//   DEBTRACE("HEXABLOCKGUI::displayer");
+//   return _currentGraphicView;
+// }
+
+
+// QString  HEXABLOCKGUI::engineIOR() const
+// {
+//   DEBTRACE("HEXABLOCKGUI::engineIOR");
+// //   return getApp()->defaultEngineIOR();
+// }
+
+
+
+
+QString  HEXABLOCKGUI::engineIOR() const
+{
+  DEBTRACE("HEXABLOCKGUI::engineIOR");
+  CORBA::ORB_var anORB = getApp()->orb();
+  CORBA::String_var anIOR = anORB->object_to_string(_hexaEngine);
+  return QString( anIOR.in() );
+}
+
+
+
+void HEXABLOCKGUI::onObjectBrowserClick(const QModelIndex& index)
+{
+  DEBTRACE("HEXABLOCKGUI::onObjectBrowserClick");
+  // we want to switch automatically to the right view windows
+  QWidget *viewWindow = NULL;
+
+  //first, find entry of item selected
+  QString itemEntry;
+  DataObjectList dol = getApp()->objectBrowser()->getSelected();
+  if (dol.isEmpty()) return;
+  SalomeApp_DataObject* item = dynamic_cast<SalomeApp_DataObject*>(dol[0]);
+  if (!item) return;
+  itemEntry = item->entry();
+
+//   DEBTRACE("HEXABLOCKGUI::onClick index.data()  => "<<index.data().toString().toStdString());
+//   DEBTRACE("HEXABLOCKGUI::onClick index.model() => "<<index.model());
+//   DEBTRACE("HEXABLOCKGUI::onClick item->name(). => "<<item->name().toStdString());
+//   DEBTRACE("HEXABLOCKGUI::onClick itemEntry =>"<<itemEntry.toStdString());
+
+  if ( !_salomeViewWindows.count( itemEntry ) ) return;
+  viewWindow = _salomeViewWindows[ itemEntry ];
+  if ( !viewWindow ) return;
+//   _selectFromTree = true;
+  viewWindow->setFocus();
+  _currentGraphicView->update(); //CS_TEST
+//   _selectFromTree = false;
+
+//   if (getApp()->activeModule()->moduleName().compare("HEXABLOCK") != 0)
+//     getApp()->activateModule("HEXABLOCK");
+}
+
+
+
+
+
+void HEXABLOCKGUI::onWindowActivated( SUIT_ViewWindow* svw)
+{
+  DEBTRACE("HEXABLOCKGUI::onWindowActivated");
+  OCCViewer_ViewWindow* anOccVw = dynamic_cast<OCCViewer_ViewWindow*>(svw);
+
+  if ( anOccVw != NULL )
+    currentOccView = dynamic_cast<OCCViewer_ViewWindow*>(svw);
+//   OCCViewer_Viewer*     aModel = dynamic_cast<OCCViewer_Viewer*>(svw);
+
+  // we want to switch automatically to the right model
+  // only VTK view
+  SVTK_ViewWindow* viewWindow = dynamic_cast<SVTK_ViewWindow*>(svw);
+  if (!viewWindow) return;
+  if (getApp()->activeModule() && getApp()->activeModule()->moduleName().compare("HEXABLOCK") != 0) //CS_TODO?
+    getApp()->activateModule("HEXABLOCK");
+
+  switchModel( viewWindow );
+}
+
+
+void HEXABLOCKGUI::onWindowClosed( SUIT_ViewWindow* svw)
+{
+  DEBTRACE("HEXABLOCKGUI::onWindowClosed");
+}
+
+
+
+
+void HEXABLOCKGUI::onViewManagerAdded( SUIT_ViewManager*  vm)
+{
+  DEBTRACE("HEXABLOCKGUI::onViewManagerAdded");
+  if ( vm && vm->getType() == OCCViewer_Viewer::Type() )
+  {
+//     qDebug( "connect" );
+// //     connect( vm, SIGNAL( keyPress  ( SUIT_ViewWindow*, QKeyEvent* ) ),
+// //              this, SLOT( OnKeyPress( SUIT_ViewWindow*, QKeyEvent* ) ) );
+// //     connect( vm, SIGNAL( mousePress( SUIT_ViewWindow*, QMouseEvent* ) ),
+// //              this, SLOT( OnMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) );
+// //     connect( vm, SIGNAL( mouseMove ( SUIT_ViewWindow*, QMouseEvent* ) ),
+// //              this, SLOT( OnMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
+//     LightApp_SelectionMgr* sm = getApp()->selectionMgr();
+//     myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) );
+//
+//     // disable OCC selectors
+//     getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
+//     QListIterator<GEOMGUI_OCCSelector*> itOCCSel( myOCCSelectors );
+//     while ( itOCCSel.hasNext() )
+//       if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() ){
+//         sr->setEnabled(true);
+//         std::cout<<"HEXABLOCKGUI::onViewManagerAdded sr"<<sr;
+//       }
+  }
+  DEBTRACE("HEXABLOCKGUI::onViewManagerAdded");
+}
+
+void HEXABLOCKGUI::onViewManagerRemoved( SUIT_ViewManager* vm)
+{
+  DEBTRACE("HEXABLOCKGUI::::onViewManagerRemoved");
+}
+
+void HEXABLOCKGUI::onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected  )
+{
+  QModelIndexList l = selected.indexes();
+  if ( l.count() == 0 ) return;
+  if ( !l[0].isValid() ) return;
+
+  QTreeView* theTree = NULL;
+  if ( sender() == _patternDataSelectionModel ){
+    theTree = _patternDataTreeView;
+  } else if ( sender() == _patternBuilderSelectionModel  ){
+    theTree = _patternBuilderTreeView;
+  } else if ( sender() == _groupsSelectionModel ){
+    theTree = _groupsTreeView;
+  } else if ( sender() == _meshSelectionModel ){
+    theTree = _meshTreeView;
+  }
+  if ( theTree ){
+    theTree->scrollTo ( l[0] );
+  }
+}
+
+// void HEXABLOCKGUI::onTryClose(bool &isClosed, QxScene_ViewWindow* window) //CS_TODO
+// {
+//   DEBTRACE("HEXABLOCKGUI::onTryClose");
+//   isClosed = _genericGui->closeContext(window);
+// }
+
+// CAM_DataModel* HEXABLOCKGUI::createDataModel()
+// {
+//   DEBTRACE("HEXABLOCKGUI::createDataModel");
+//   return new HEXABLOCKGUI_DataModel(this);
+// //   return NULL;
+// }
+
+bool HEXABLOCKGUI::createSComponent() //addComponent
+{
+  DEBTRACE("HEXABLOCKGUI::createSComponent");
+  // --- Find or create "HEXABLOCK" SComponent in the study
+
+  _PTR(Study)            aStudy = (( SalomeApp_Study* )(getApp()->activeStudy()))->studyDS();
+  _PTR(StudyBuilder)     aBuilder (aStudy->NewBuilder());
+  _PTR(GenericAttribute) anAttr;
+  _PTR(AttributeName)    aName;
+
+  _PTR(SComponent) aComponent = aStudy->FindComponent("HEXABLOCK");
+  if ( !aComponent ){
+    aComponent = aBuilder->NewComponent("HEXABLOCK");
+    anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
+    aName = _PTR(AttributeName) (anAttr);
+    aName->SetValue(getApp()->moduleTitle("HEXABLOCK").toStdString());
+
+    anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap");
+    _PTR(AttributePixMap) aPixmap(anAttr);
+    aPixmap->SetPixMap("share/salome/resources/hexablock/ModuleHexablock.png");
+
+    aBuilder->DefineComponentInstance(aComponent, engineIOR().toStdString());
+    DEBTRACE("HEXABLOCKGUI::createSComponent engineIOR=>"<<engineIOR().toStdString());
+//      aBuilder->DefineComponentInstance(aComponent, getApp()->defaultEngineIOR().toStdString());
+//      DEBTRACE("HEXABLOCKGUI::createSComponent defaultEngineIOR=>"<<getApp()->defaultEngineIOR().toStdString());
+
+//     SalomeApp_DataModel::synchronize( aComponent, HEXABLOCKGUI::activeStudy() );
+    return true;
+  }
+  return false;
+}
+
+
+
+// bool HEXABLOCKGUI::isSelectionCompatible()
+// {
+//   DEBTRACE("HEXABLOCKGUI::isSelectionCompatible");
+//
+//   bool isCompatible = true;
+//   SALOME_ListIO selected;
+//   if ( LightApp_SelectionMgr *Sel = selectionMgr() )
+//     Sel->selectedObjects( selected );
+//
+//   SALOME_ListIteratorOfListIO It( selected );
+//   for ( ; isCompatible && It.More(); It.Next())
+//     isCompatible =
+//       ( strcmp("GEOM", It.Value()->getComponentDataType()) == 0 ) ||
+//       ( strcmp("HEXABLOCK", It.Value()->getComponentDataType()) == 0 );
+//
+//   return isCompatible;
+// }
+
+void HEXABLOCKGUI::setResource(SUIT_ResourceMgr* r)
+{
+  DEBTRACE("HEXABLOCKGUI::setResource");
+  _myresource = new HEXABLOCKGUI_Resource(r);
+  _myresource->preferencesChanged();
+}
+
+void HEXABLOCKGUI::createPreferences()
+{
+  DEBTRACE("HEXABLOCKGUI::createPreferences");
+  _myresource->createPreferences(this);
+}
+
+void HEXABLOCKGUI::preferencesChanged( const QString& sect, const QString& name )
+{
+  DEBTRACE("HEXABLOCKGUI::preferencesChanged");
+  _myresource->preferencesChanged(sect, name);
+  if(name=="userCatalog")
+    {
+//       _genericGui->getCatalogWidget()->addCatalogFromFile(Resource::userCatalog.toStdString());
+    }
+}
+
+void HEXABLOCKGUI::studyActivated() //CS_TODO
+{
+  int newStudyId = getApp()->activeStudy()->id();
+  DEBTRACE("HEXABLOCKGUI::studyActivated " << _oldStudyId << " " << newStudyId);
+
+  if (_oldStudyId != -1)
+  {
+//       _studyContextMap[_oldStudyId] = QtGuiContext::getQtCurrent();
+//       if (_studyContextMap.count(newStudyId))
+//         {
+//           DEBTRACE("switch to valid context " << QtGuiContext::getQtCurrent() << " " << _studyContextMap[newStudyId]);
+//           QtGuiContext::setQtCurrent(_studyContextMap[newStudyId]);
+//         }
+//       else
+//         {
+//           DEBTRACE("no switch to null context");
+//         }
+  }
+  _oldStudyId = newStudyId;
+}
+
+
+
+void HEXABLOCKGUI::treeContextMenu(const QPoint& aPosition)
+{
+  QModelIndex currentIndex = _patternDataTreeView->currentIndex();
+  QVariant currentAssocVariant;
+  QString currentAssocEntry;
+
+  currentAssocVariant = currentIndex.data( HEXA_ASSOC_ENTRY_ROLE );
+  currentAssocEntry    = currentIndex.data( HEXA_ASSOC_ENTRY_ROLE ).toString();
+  if ( currentAssocVariant.isValid() && !currentAssocEntry.isEmpty() ){
+         //   _currentModel->allowEdition();
+           QMenu menu( _patternDataTreeView );
+           //Remove association
+           QAction *clearAct = menu.addAction( "Remove association(s)" );
+           connect( clearAct, SIGNAL(triggered()), this, SLOT(clearAssociations()) );
+           menu.exec( _patternDataTreeView->mapToGlobal( aPosition) );
+  }
+  else {
+
+         QStandardItem *item = _patternDataModel->itemFromIndex ( currentIndex );
+
+         //We don't do anything for single items having no association
+         if ( item->type() == VERTEXITEM || item->type() == EDGEITEM ||
+                         item->type() == QUADITEM || item->type() == HEXAITEM) return;
+
+         QMenu menu( _patternDataTreeView );
+
+         //Show association(s)
+         QAction *showAssocAct = menu.addAction( "Show associations" );
+         connect( showAssocAct, SIGNAL(triggered()), this, SLOT(showAssociations()) );
+
+         //Clear all associations
+         QAction *clearAllAssocAct = menu.addAction( "Remove all associations" );
+         connect( clearAllAssocAct, SIGNAL(triggered()), this, SLOT(clearAllAssociations()) );
+
+         menu.exec( _patternDataTreeView->mapToGlobal( aPosition) );
+  }
+}
+
+
+void HEXABLOCKGUI::createAndFillDockWidget()
+{
+  QMainWindow *aParent = application()->desktop();
+
+  // Create dock widget (3 dock)
+
+  //1) *********** user input panel ( contain user's edit dialog box )
+  _dwInputPanel = new QDockWidget(aParent);
+//   _dwInputPanel->setWindowFlags(Qt::FramelessWindowHint);
+//   _dwInputPanel->setWindowFlags(Qt::WindowTitleHint);
+  _dwInputPanel->setVisible(false);
+  _dwInputPanel->setWindowTitle("Input Panel");
+//   _dwInputPanel->setMinimumHeight(DWINPUT_MINIMUM_HEIGHT);
+  _dwInputPanel->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
+  _dwInputPanel->raise();
+
+//   _stacked = new QStackedWidget(_dwInputPanel);
+//   _dwInputPanel->setWidget(_stacked);
+
+  _treeViewDelegate = new DocumentDelegate(_dwInputPanel);
+
+  //2) ************* document data ( Pattern, Association, Mesh ) in treeview representation
+  //      Pattern
+  _dwPattern = new QDockWidget(aParent);
+  //   _dwPattern->installEventFilter(this);
+  _dwPattern->setVisible(false);
+  _dwPattern->setWindowTitle("Model");
+  _dwPattern->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
+
+  QFrame*      patternFrame  = new QFrame(_dwPattern);
+  patternFrame->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
+  QVBoxLayout* patternLayout = new QVBoxLayout(patternFrame);
+  patternLayout->setSizeConstraint(QLayout::SetMaximumSize);
+  QSplitter *splitter = new QSplitter(Qt::Vertical,patternFrame);
+  _patternDataTreeView    = new QTreeView(patternFrame);//_dwPattern);
+  _patternBuilderTreeView = new QTreeView(patternFrame);
+  splitter->addWidget(_patternDataTreeView);
+  splitter->addWidget(_patternBuilderTreeView);
+  patternLayout->addWidget(splitter);
+//   _patternDataTreeView->setMinimumHeight(DW_MINIMUM_WIDTH);
+
+  _patternDataTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers/*QAbstractItemView::DoubleClicked*/);
+  _patternDataTreeView->setSelectionMode(QAbstractItemView::SingleSelection/*QAbstractItemView::MultiSelection*/);//);//QAbstractItemView::DoubleClicked, QAbstractItemView::SelectedClicked)
+  _patternDataTreeView->setItemDelegate(_treeViewDelegate);
+
+
+  _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+  _patternBuilderTreeView->setItemDelegate(_treeViewDelegate);
+  _dwPattern->setWidget(patternFrame);
+  patternFrame->show();
+  //_dwPattern->raise();
+
+  //      Groups
+  _dwGroups = new QDockWidget(aParent);
+//   _dwGroups->installEventFilter(this);
+
+  _dwGroups->setVisible(false);
+  _dwGroups->setWindowTitle("Groups");
+  _dwGroups->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
+  _groupsTreeView = new QTreeView(_dwGroups);
+//   _associationTreeView->setMinimumHeight(DW_MINIMUM_WIDTH);
+  _groupsTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+  _groupsTreeView->setItemDelegate(_treeViewDelegate);
+  _dwGroups->setWidget(_groupsTreeView);
+  _groupsTreeView->show();
+
+  //      Mesh
+  _dwMesh = new QDockWidget(aParent);
+//   _dwMesh->installEventFilter(this);
+  _dwMesh->setVisible(false);
+  _dwMesh->setWindowTitle("Mesh");
+  _dwMesh->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
+  _meshTreeView = new QTreeView(_dwMesh);
+  //   _meshTreeView->setMinimumHeight(DW_MINIMUM_WIDTH);
+  _meshTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+  _meshTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
+  _meshTreeView->setItemDelegate(_treeViewDelegate);
+  _dwMesh->setWidget(_meshTreeView);
+  _meshTreeView->show();
+  //   _dwMesh->raise();
+
+
+
+  //3) ************* documents ( salome objectbrowser )
+  QDockWidget *_dwObjectBrowser = 0;
+  QWidget* wid = getApp()->objectBrowser()->treeView();
+  //   QWidget *wid = application()->objectBrowser()->treeView();
+  QWidget *w   = wid->parentWidget();
+  while ( w && !_dwObjectBrowser ) {
+    _dwObjectBrowser = ::qobject_cast<QDockWidget*>( w );
+    w = w->parentWidget();
+  }
+//   _dwObjectBrowser->installEventFilter(this);
+//   _dwObjectBrowser->setVisible(false);
+  _dwObjectBrowser->setMinimumWidth(DW_MINIMUM_WIDTH); // --- force a minimum until display
+  _dwObjectBrowser->setWindowTitle("Study");
+
+
+  // dock widget position
+  //   aParent->addDockWidget(Qt::LeftDockWidgetArea,  _dwPattern);
+  //   aParent->addDockWidget(Qt::RightDockWidgetArea, _dwInputPanel);
+  //   aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwPattern );
+  aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwObjectBrowser );
+  aParent->addDockWidget( Qt::LeftDockWidgetArea, _dwInputPanel );
+
+  aParent->tabifyDockWidget( _dwObjectBrowser, _dwPattern );
+  aParent->tabifyDockWidget( _dwPattern, /*_dwAssociation );
+  aParent->tabifyDockWidget( _dwAssociation, */_dwGroups );
+  aParent->tabifyDockWidget( _dwGroups, _dwMesh );
+
+
+#if QT_VERSION >= 0x040500
+  aParent->setTabPosition(Qt::AllDockWidgetAreas, Resource::tabPanelsUp? QTabWidget::North: QTabWidget::South);
+#endif
+
+
+//   connect( _dwPattern, SIGNAL( visibilityChanged(bool) ),     this, SLOT( showPatternMenus(bool) ) );
+// //   connect( _dwAssociation, SIGNAL( visibilityChanged(bool) ), this, SLOT( showAssociationMenus(bool) ) );
+//   connect( _dwGroups, SIGNAL( visibilityChanged(bool) ),      this, SLOT( showGroupsMenus(bool) ) );
+//   connect( _dwMesh, SIGNAL( visibilityChanged(bool) ),        this, SLOT( showMeshMenus(bool) ) );
+
+
+
+  // popup menu on data tree view
+ _patternDataTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
+  connect(_patternDataTreeView,
+          SIGNAL(customContextMenuRequested(const QPoint &)),
+          this,
+          SLOT(treeContextMenu(const QPoint &)));
+}
+
+void HEXABLOCKGUI::createActions()
+{
+  QMainWindow *aParent = application()->desktop();
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+
+  // Document
+  _newAct = createAction(_menuId++,
+                         tr("Create a new document"),
+                         resMgr->loadPixmap("HEXABLOCK", tr("ICON_NEW_DOCUMENT")),
+                         tr("New Document"),
+                         tr("Create a new document"),
+                         0, aParent, false, this, SLOT(newDocument()));
+  _newAct->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_N ); // --- QKeySequence::New ambiguous in SALOME
+
+  _importAct = createAction(_menuId++,
+                            tr("Load a document"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_LOAD_DOCUMENT")),
+                            tr("Load Document"),
+                            tr("Load a document"),
+                            0, aParent, false, this, SLOT(loadDocument()));
+  _importAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_O); // --- QKeySequence::Open ambiguous in SALOME
+
+  _saveAct = createAction(_menuId++,
+                          tr("Save the document"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_SAVE_DOCUMENT")),
+                          tr("Save Document"),
+                          tr("Save the document"),
+                          0, aParent, false, this, SLOT(saveDocument()));
+
+//  _testAct = createAction(_menuId++, tr("Test"), resMgr->loadPixmap("HEXABLOCK", tr("ICON_TEST")),
+//                          tr("Test"),  tr("New test"),
+//                          0, aParent, false, this, SLOT(test_association()));
+
+  // Pattern Data creation
+  _addVertex = createAction(_menuId++,
+                            tr("Create a vertex"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_VERTEX")),
+                            tr("Add Vertex"),
+                            tr("Create a new vertex"),
+                            0, aParent, false, this, SLOT(addVertex()));
+
+  _addEdge = createAction(_menuId++,
+                          tr("Create an edge"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_EDGE")),
+                          tr("Add Edge"),
+                          tr("Create a new edge"),
+                          0, aParent, false, this, SLOT(addEdge()));
+
+  _addQuad = createAction(_menuId++,
+                          tr("Create a quadrangle"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_QUAD")),
+                          tr("Add Quadrangle"),
+                          tr("Create a new quadrangle"),
+                          0, aParent, false, this, SLOT(addQuad()));
+
+  _addHexa = createAction(_menuId++,
+                          tr("Create an hexahedron"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_HEXA")),
+                          tr("Add Hexahedron"),
+                          tr("Create a new hexahedron"),
+                          0, aParent, false, this, SLOT(addHexa()));
+
+  // Builder Data creation
+  _addVector = createAction(_menuId++,
+                            tr("Create a vector"),
+                            resMgr->loadPixmap( "HEXABLOCK", tr("ICON_ADD_VECTOR")),
+                            tr("Add Vector"),
+                            tr("Create a new vector"),
+                            0, aParent, false, this, SLOT(addVector()));
+
+  _addCylinder = createAction(_menuId++,
+                              tr("Create a cylinder"),
+                              resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_CYLINDER")),
+                              tr("Add Cylinder"),
+                              tr("Create a new cylinder"),
+                              0, aParent, false, this,  SLOT(addCylinder()));
+
+  _addPipe = createAction(_menuId++,
+                          tr("Create a pipe"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_PIPE")),
+                          tr("Add Pipe"),
+                          tr("Create a new pipe"),
+                          0, aParent, false, this, SLOT(addPipe()));
+
+  _makeGrid = createAction(_menuId++,
+                           tr("Make a grid"),
+                           resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_GRID")),
+                           tr("Make Grid"),
+                           tr("Make a grid"),
+                           0, aParent, false, this,  SLOT(makeGrid()));
+
+  _makeCylinder = createAction(_menuId++,
+                               tr("Make a cylinder"),
+                               resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_CYLINDER")),
+                               tr("Make Cylinder"),
+                               tr("Make a cylinder"),
+                               0, aParent, false, this, SLOT(makeCylinder()));
+
+  _makePipe = createAction(_menuId++,
+                           tr("Make a pipe"),
+                           resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_PIPE")),
+                           tr("Make Pipe"),
+                           tr("Make a pipe"),
+                           0, aParent, false, this, SLOT(makePipe()));
+
+  _makeCylinders = createAction(_menuId++,
+                                tr("Make cylinders"),
+                                resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_CYLINDERS")),
+                                tr("Make Cylinders"),
+                                tr("Make cylinders"),
+                                0, aParent, false, this, SLOT(makeCylinders()));
+
+  _makePipes = createAction(_menuId++,
+                            tr("Make pipes"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_PIPES")),
+                            tr("Make Pipes"),
+                            tr("Make pipes"),
+                            0, aParent, false, this, SLOT(makePipes()));
+
+// //   _makeRind     = createAction( _menuId++, tr("Make rind"), resMgr->loadPixmap( "HEXABLOCK", tr("ICON_MAKE_RIND")),
+// //                                             tr("Make rind"),  tr("Make rind"),
+// //                                             0, aParent, false, this, SLOT(makeRind()));
+
+  _makeHemiSphere = createAction(_menuId++,
+                                 tr("Make an hemisphere"),
+                                 resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_HEMISPHERE")),
+                                 tr("Make Hemisphere"),
+                                 tr("Make an hemisphere"),
+                                 0, aParent, false, this, SLOT(makeHemiSphere()));
+
+  // Pattern Data edition
+  _removeHexa = createAction(_menuId++,
+                             tr("Remove hexahedra"),
+                             resMgr->loadPixmap("HEXABLOCK", tr("ICON_REMOVE_HEXA")),
+                             tr("Remove Hexahedra"),
+                             tr("Remove hexahedra"),
+                             0, aParent, false, this, SLOT(removeHexa()));
+
+  _prismQuad = createAction(_menuId++,
+                            tr("Prism quadrangles"),
+                            resMgr->loadPixmap( "HEXABLOCK", tr("ICON_PRISM_QUAD")),
+                            tr("Prism Quadrangles"),
+                            tr("Prism quadrangles"),
+                            0, aParent, false, this, SLOT(prismQuad()));
+
+  _joinQuad = createAction(_menuId++,
+                           tr("Join quadrangles"),
+                           resMgr->loadPixmap("HEXABLOCK", tr("ICON_JOIN_QUAD")),
+                           tr("Join Quadrangles"),
+                           tr("Join quadrangles with hexahedra"),
+                           0, aParent, false, this, SLOT(joinQuad()));
+
+  _merge = createAction(_menuId++,
+                        tr("Merge"),
+                        resMgr->loadPixmap("HEXABLOCK", tr("ICON_MERGE")),
+                        tr("Merge"),
+                        tr("Merge"),
+                        0, aParent, false, this, SLOT(merge()));
+
+  _disconnect = createAction(_menuId++,
+                             tr("Disconnect"),
+                             resMgr->loadPixmap("HEXABLOCK", tr("ICON_DISCONNECT")),
+                             tr("Disconnect"),
+                             tr("Disconnect edges, vertexes or quadrangles"),
+                             0, aParent, false, this, SLOT(disconnectElts()));
+
+  _cutEdge = createAction(_menuId++,
+                          tr("Cut edge"),
+                          resMgr->loadPixmap("HEXABLOCK", tr("ICON_CUT_EDGE")),
+                          tr("Cut Edge"),
+                          tr("Cut edge"),
+                          0, aParent, false, this, SLOT(cutEdge()));
+
+  _makeTransformation = createAction(_menuId++,
+                                     tr("Make transformation"),
+                                     resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_TRANSFORMATION")),
+                                     tr("Make Transformation"),
+                                     tr("Make transformation"),
+                                     0, aParent, false, this, SLOT(makeTransformation()));
+
+  _makeSymmetry = createAction(_menuId++,
+                               tr("Make symmetry"),
+                               resMgr->loadPixmap("HEXABLOCK", tr("ICON_MAKE_SYMMETRY")),
+                               tr("Make Symmetry"),
+                               tr("Make symmetry"),
+                               0, aParent, false, this, SLOT(makeSymmetry()));
+
+  _performTransformation = createAction(_menuId++,
+                                        tr("Perform transformation"),
+                                        resMgr->loadPixmap("HEXABLOCK", tr("ICON_PERFORM_TRANSFORMATION")),
+                                        tr("Perform Transformation"),
+                                        tr("Perform transformation"),
+                                        0, aParent, false, this, SLOT(performTransformation()));
+
+  _performSymmetry = createAction(_menuId++,
+                                  tr("Perform symmetry"),
+                                  resMgr->loadPixmap("HEXABLOCK", tr("ICON_PERFORM_SYMMETRY")),
+                                  tr("Perform Symmetry"),
+                                  tr("Perform symmetry"),
+                                  0, aParent, false, this, SLOT(performSymmetry()));
+
+  _replaceHexa = createAction(_menuId++,
+                              tr("Replace hexahedron"),
+                              resMgr->loadPixmap("HEXABLOCK", tr("ICON_REPLACE_HEXA")),
+                              tr("Replace Hexahedron"),
+                              tr("Replace hexahedron"),
+                              0, aParent, false, this, SLOT(replaceHexa()));
+
+  _quadRevolution = createAction(_menuId++,
+                                 tr("Quad revolution"),
+                                 resMgr->loadPixmap("HEXABLOCK", tr("ICON_QUAD_REVOLUTION")),
+                                 tr("Quad Revolution"),
+                                 tr("Quad revolution"),
+                                 0, aParent, false, this, SLOT(quadRevolution()));
+
+  // Association
+  _assocVertex = createAction(_menuId++,
+                              tr("Make vertex association"),
+                              resMgr->loadPixmap("HEXABLOCK", tr("ICON_VERTEX_ASSOCIATION")),
+                              tr("Make Vertex association"),
+                              tr("Make vertex association"),
+                              0, aParent, false, this, SLOT(assocVertex()));
+
+  _assocEdge = createAction(_menuId++,
+                            tr("Make edge association"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_EDGE_ASSOCIATION")),
+                            tr("Make Edge Association"),
+                            tr("Make edge association"),
+                            0, aParent, false, this, SLOT(assocEdge()));
+
+  _assocQuad = createAction(_menuId++,
+                            tr("Make quadrangle association"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_QUAD_ASSOCIATION")),
+                            tr("Make Quadrangle Association"),
+                            tr("Make quadrangle association"),
+                            0, aParent, false, this, SLOT(assocQuad()));
+
+  // Group
+  _addGroup = createAction(_menuId++,
+                           tr("Add a group"),
+                           resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_GROUP")),
+                           tr("Add Group"),
+                           tr("Add a group"),
+                           0, aParent, false, this, SLOT(addGroup()));
+
+  _removeGroup = createAction(_menuId++,
+                              tr("Remove a group"),
+                              resMgr->loadPixmap("HEXABLOCK", tr("ICON_REMOVE_GROUP")),
+                              tr("Remove Group"),
+                              tr("Remove a group"),
+                              0, aParent, false, this, SLOT(removeGroup()));
+
+  // Mesh
+  _addLaw = createAction(_menuId++,
+                         tr("Add a law"),
+                         resMgr->loadPixmap("HEXABLOCK", tr("ICON_ADD_LAW")),
+                         tr("Add Law"),
+                         tr("Add a law"),
+                         0, aParent, false, this, SLOT(addLaw()));
+
+  _removeLaw = createAction(_menuId++,
+                            tr("Remove a law"),
+                            resMgr->loadPixmap("HEXABLOCK", tr("ICON_REMOVE_LAW")),
+                            tr("Remove Law"),
+                            tr("Remove a law"),
+                            0, aParent, false, this, SLOT(removeLaw()));
+
+  _setPropagation = createAction(_menuId++,
+                                 tr("Set propagation"),
+                                 resMgr->loadPixmap("HEXABLOCK", tr("ICON_SET_PROPAGATION")),
+                                 tr("Set Propagation"),
+                                 tr("Set propagation"),
+                                 0, aParent, false, this, SLOT(setPropagation()));
+
+  _computeMesh = createAction(_menuId++,
+                              tr("Compute mesh"),
+                              resMgr->loadPixmap("HEXABLOCK", tr("ICON_COMPUTE_MESH")),
+                              tr("Compute Mesh"),
+                              tr("Compute mesh"),
+                              0, aParent, false, this, SLOT(computeMesh()));
+
+
+  //   _newAct->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_N ); // --- QKeySequence::New ambiguous in SALOME
+  //       QAction* createAction(const int id,
+  //                             const QString& toolTip,
+  //                             const QIcon& icon,
+  //                             const QString& menu,
+  //                             const QString& status,
+  //                             const int shortCut,
+  //                             QObject* parent =0,
+  //                             bool checkable = false,
+  //                             QObject* receiver =0,
+  //                             const char* member =0);
+}
+
+
+void HEXABLOCKGUI::createMenus()
+{
+  int aMenuId, subMenuId;
+  aMenuId = createMenu( tr("MEN_FILE"), -1, -1 );
+  createMenu( separator(), aMenuId, -1, 10 );
+  aMenuId = createMenu( tr("HEXABLOCK"), aMenuId, -1, 10 );
+  createMenu( _newAct, aMenuId );
+  createMenu( _importAct, aMenuId );
+  createMenu( _saveAct, aMenuId );
+//   createMenu( _testAct, aMenuId );
+
+//   aMenuId = createMenu( tr( "HEXABLOCK" ), -1, -1, 30 );
+  aMenuId = createMenu( tr( "Document" ), -1, -1, 30 );
+  createMenu( _newAct, aMenuId );//, 10
+  createMenu( _importAct, aMenuId );
+  createMenu( _saveAct, aMenuId );
+//   createMenu( _testAct, aMenuId );
+
+  aMenuId = createMenu( tr("Model"), -1, -1, 30 );
+  subMenuId = createMenu( tr( "Construction" ), aMenuId, -1 );
+  createMenu( _addVertex, subMenuId );
+  createMenu( _addEdge,   subMenuId );
+  createMenu( _addQuad,   subMenuId );
+  createMenu( _addHexa,   subMenuId );
+  //createMenu( separator(), aMenuId);
+
+  // Pattern Builder
+  createMenu( _addVector, subMenuId );
+  createMenu( _addCylinder, subMenuId );
+  createMenu( _addPipe, subMenuId );
+  //createMenu( separator(), aMenuId);
+  createMenu( _makeGrid,  subMenuId ); //Cartesian, Cylindrical, Spherical
+  createMenu( _makeCylinder, subMenuId );
+  createMenu( _makePipe,     subMenuId );
+  createMenu( _makeCylinders,subMenuId );
+  createMenu( _makePipes,    subMenuId );
+//   createMenu( _makeRind,  aMenuId );
+  createMenu( _makeHemiSphere,subMenuId );
+  //createMenu( separator(), aMenuId);
+
+  // Pattern Data Edition
+  subMenuId = createMenu( tr( "Operation" ), aMenuId, -1 );
+  createMenu( _removeHexa, subMenuId );
+  createMenu( _prismQuad,  subMenuId );
+  createMenu( _joinQuad,   subMenuId );
+  createMenu( _merge,      subMenuId );//   createMenu( _mergeVertices,   aMenuId ); //   createMenu( _mergeEdges,   aMenuId );
+  createMenu( _disconnect, subMenuId );
+  createMenu( _cutEdge,    subMenuId );
+  createMenu( _makeTransformation, subMenuId ); //   createMenu( _makeTranslation,   aMenuId );
+  createMenu( _makeSymmetry,       subMenuId );
+  createMenu( _performTransformation,   subMenuId );
+  createMenu( _performSymmetry,         subMenuId );
+  createMenu( _replaceHexa,    subMenuId );
+  createMenu( _quadRevolution, subMenuId );
+
+  // Association
+  aMenuId = createMenu( tr("Association"), -1, -1, 30 );
+  createMenu( _assocVertex, aMenuId );
+  createMenu( _assocEdge,   aMenuId );
+  createMenu( _assocQuad,   aMenuId );
+
+  // Group
+  aMenuId = createMenu( tr("Groups"), -1, -1, 30 );
+  createMenu( _addGroup,    aMenuId );
+  createMenu( _removeGroup, aMenuId ); //CS_TODO
+
+  // Law
+  aMenuId = createMenu( tr("Mesh "), -1, -1, 30 );
+  createMenu( _addLaw,    aMenuId );
+  createMenu( _removeLaw, aMenuId );
+  createMenu( _setPropagation, aMenuId );
+  createMenu( _computeMesh, aMenuId );
+}
+
+
+void HEXABLOCKGUI::createTools()
+{
+  int aToolId;
+
+  aToolId = createTool ( tr( "HexaBlock Toolbar" ) );
+  createTool( _newAct, aToolId );
+  createTool( _importAct, aToolId );
+  createTool( _saveAct, aToolId );
+//   createTool( _testAct, aToolId );
+  //createTool( separator(), aToolId );
+
+  // Pattern Data
+  aToolId = createTool ( tr( "Construction" ) );
+  createTool( _addVertex, aToolId );
+  createTool( _addEdge, aToolId );
+  createTool( _addQuad, aToolId );
+  createTool( _addHexa, aToolId );
+  //createTool( separator(), aToolId );
+
+  // Pattern Builder
+  createTool( _addVector, aToolId );
+  createTool( _addCylinder, aToolId );
+  createTool( _addPipe, aToolId );
+  //createTool( separator(), aToolId );
+
+  createTool( _makeGrid,  aToolId );
+  createTool( _makeCylinder, aToolId );
+  createTool( _makePipe,     aToolId );
+  createTool( _makeCylinders,aToolId );
+  createTool( _makePipes,    aToolId );
+//   createTool( _makeRind,     aToolId);
+  createTool( _makeHemiSphere,   aToolId );
+  //createTool( separator(), aToolId );
+
+  // Pattern Data Edition
+  aToolId = createTool ( tr( "Operation" ) );
+  createTool( _removeHexa, aToolId );
+  createTool( _prismQuad,  aToolId );
+  createTool( _joinQuad,   aToolId );
+  createTool( _merge,      aToolId );
+  createTool( _disconnect, aToolId );
+  createTool( _cutEdge,    aToolId );
+  createTool( _makeTransformation, aToolId );
+  createTool( _makeSymmetry,       aToolId );
+  createTool( _performTransformation,   aToolId );
+  createTool( _performSymmetry,         aToolId );
+  createTool( _replaceHexa,    aToolId );
+  createTool( _quadRevolution, aToolId );
+  //createTool( separator(), aToolId );
+
+  // Association
+  aToolId = createTool ( tr( "Association" ) );
+  createTool( _assocVertex, aToolId );
+  createTool( _assocEdge, aToolId );
+  createTool( _assocQuad, aToolId );
+  //createTool( separator(), aToolId );
+
+  // Group
+  aToolId = createTool ( tr( "Group" ) );
+  createTool( _addGroup,    aToolId );
+  createTool( _removeGroup, aToolId ); //CS_TODO
+  //createTool( separator(), aToolId );
+
+  // Law
+  aToolId = createTool ( tr( "Mesh" ) );
+  createTool( _addLaw,    aToolId );
+  createTool( _removeLaw, aToolId );
+  createTool( _setPropagation, aToolId );
+  createTool( _computeMesh, aToolId );
+
+}
+
+void HEXABLOCKGUI::initialMenus()
+{
+  showDocumentMenus( true );
+  showPatternMenus( false );
+  showAssociationMenus( false );
+  showGroupsMenus( false );
+  showMeshMenus( false );
+}
+
+void HEXABLOCKGUI::showAllMenus()
+{
+  showDocumentMenus( true );
+  showPatternMenus( true );
+  showAssociationMenus( true );
+  showGroupsMenus( true );
+  showMeshMenus( true );
+}
+
+
+void HEXABLOCKGUI::showDocumentMenus(bool show)
+{
+  DEBTRACE("HEXABLOCKGUI::showDocumentMenus " << show);
+  show = true; //
+  setMenuShown(_newAct, show);
+  setToolShown(_newAct, show);
+  setMenuShown(_importAct, show);
+  setToolShown(_importAct, show);
+  setMenuShown(_saveAct, show);
+  setToolShown(_saveAct, show);
+//   setMenuShown(_testAct, show);
+//   setToolShown(_testAct, show);
+}
+
+void HEXABLOCKGUI::showPatternMenus(bool show)
+{
+  DEBTRACE("HEXABLOCKGUI::showPatternMenus " << show);
+  DEBTRACE("_currentModel  " << _currentModel  );
+  if ( show && !_currentModel ) return;
+
+  setMenuShown(_addVertex, show );//true);
+  setToolShown(_addVertex, show);
+  setMenuShown(_addEdge,  show );//true);
+  setToolShown(_addEdge, show);
+  setMenuShown(_addQuad,  show );//true);
+  setToolShown(_addQuad, show);
+  setMenuShown(_addHexa,  show );//true);
+  setToolShown(_addHexa, show);
+
+
+  setMenuShown( _addVector,  show );//true);
+  setToolShown( _addVector, show);
+  setMenuShown( _addCylinder,  show );//true);
+  setToolShown( _addCylinder, show);
+  setMenuShown( _addPipe,  show );//true);
+  setToolShown( _addPipe, show);
+  setMenuShown( _makeGrid,  show );//true);
+  setToolShown( _makeGrid, show);
+  setMenuShown( _makeCylinder,  show );//true);
+  setToolShown( _makeCylinder, show);
+  setMenuShown( _makePipe,  show );//true);
+  setToolShown( _makePipe, show);
+  setMenuShown( _makeCylinders,  show );//true);
+  setToolShown( _makeCylinders, show);
+  setMenuShown( _makePipes,  show );//true);
+  setToolShown( _makePipes, show);
+//   setMenuShown( _makeRind,  show );//true);
+//   setToolShown( _makeRind, show);
+  setMenuShown( _makeHemiSphere,  show );//true);
+  setToolShown( _makeHemiSphere, show);
+
+  // Pattern Data Edition
+  setMenuShown( _removeHexa,  show );//true);
+  setToolShown( _removeHexa, show);
+  setMenuShown( _prismQuad,  show );//true);
+  setToolShown( _prismQuad, show);
+  setMenuShown( _joinQuad,  show );//true);
+  setToolShown( _joinQuad, show);
+  setMenuShown( _merge,  show );//true);
+  setToolShown( _merge, show);
+  setMenuShown( _disconnect,  show );//true);
+  setToolShown( _disconnect, show);
+  setMenuShown( _cutEdge,  show );//true);
+  setToolShown( _cutEdge, show);
+  setMenuShown( _makeTransformation,  show );//true);
+  setToolShown( _makeTransformation, show);
+  setMenuShown( _makeSymmetry,  show );//true);
+  setToolShown( _makeSymmetry, show);
+  setMenuShown( _performTransformation,  show );//true);
+  setToolShown( _performTransformation, show);
+  setMenuShown( _performSymmetry,  show );//true);
+  setToolShown( _performSymmetry, show);
+  setMenuShown( _replaceHexa,  show );//true);
+  setToolShown( _replaceHexa, show);
+  setMenuShown( _quadRevolution,  show );//true);
+  setToolShown( _quadRevolution, show);
+
+}
+
+
+void HEXABLOCKGUI::showAssociationMenus(bool show)
+{
+  DEBTRACE("HEXABLOCKGUI::showAssociationMenus" << show);
+  if ( show && !_currentModel ) return;
+
+  // Association Edition
+  setMenuShown( _assocVertex,  show );
+  setToolShown( _assocVertex, show);
+  setMenuShown( _assocEdge,  show );
+  setToolShown( _assocEdge, show);
+  setMenuShown( _assocQuad,  show );
+  setToolShown( _assocQuad, show);
+
+}
+
+void HEXABLOCKGUI::showGroupsMenus(bool show)
+{
+  DEBTRACE("HEXABLOCKGUI::showGroupsMenus" << show);
+  if ( show && !_currentModel ) return;
+  setMenuShown( _addGroup,  show );//true);
+  setToolShown( _addGroup, show);
+  setMenuShown( _removeGroup ,  show );//true);
+  setToolShown( _removeGroup , show);
+}
+
+void HEXABLOCKGUI::showMeshMenus(bool show)
+{
+  DEBTRACE("HEXABLOCKGUI::showMeshMenus" << show);
+  if ( show && !_currentModel ) return;
+  setMenuShown( _addLaw,  show );//true);
+  setToolShown( _addLaw, show);
+  setMenuShown( _removeLaw,  show );//true);
+  setToolShown( _removeLaw, show);;
+  setMenuShown( _setPropagation,  show );//true);
+  setToolShown( _setPropagation, show);
+  setMenuShown( _computeMesh, show); //true);
+  setToolShown( _computeMesh, show);
+}
+
+
+
+void HEXABLOCKGUI::switchModel(SUIT_ViewWindow *view)
+{
+  DEBTRACE("HEXABLOCKGUI::switchModel " << view);
+
+  if ( _documentModels.count(view) == 0 ){
+    DEBTRACE("HEXABLOCKGUI::switchModel : no model found, cannot switch");
+    initialMenus();
+    return;
+  }
+
+  if ( _currentModel != _documentModels[view] ){ // need to switch
+    if (_dwInputPanel){
+      QWidget* w = _dwInputPanel->widget();
+      if (w) w->close();
+    }
+
+    // models
+    _currentModel = _documentModels[view];
+    _patternDataModel->setSourceModel(_currentModel);
+    _patternBuilderModel->setSourceModel(_currentModel);
+//     _associationsModel->setSourceModel(_currentModel);
+    _groupsModel->setSourceModel(_currentModel);
+    _meshModel->setSourceModel(_currentModel);
+
+    // associate models and views
+    _currentGraphicView = _documentView[view];
+//     _currentGraphicView->setModel(_patternDataModel);
+//     connect( _currentModel, SIGNAL(patternDataChanged() ), _currentGraphicView,  SLOT ( onPatternDatachanged() ) );
+    _currentGraphicView->setModel(_currentModel);
+
+    _patternDataTreeView->setModel(_patternDataModel); //_currentModel
+    _patternBuilderTreeView->setModel(_patternBuilderModel);//_currentModel
+//     _associationTreeView->setModel(_associationsModel);;
+    _groupsTreeView->setModel(_groupsModel);
+    _meshTreeView->setModel(_meshModel);
+
+    // set selections for each view
+    if ( _patternDataSelectionModel )    delete _patternDataSelectionModel;
+    if ( _patternBuilderSelectionModel ) delete _patternBuilderSelectionModel;
+    if ( _groupsSelectionModel )         delete _groupsSelectionModel;
+    if ( _meshSelectionModel )           delete _meshSelectionModel;
+
+    _patternDataSelectionModel    = new PatternDataSelectionModel( _patternDataModel );
+    _patternBuilderSelectionModel = new PatternBuilderSelectionModel( _patternBuilderModel, _patternDataSelectionModel );
+    _groupsSelectionModel         = new GroupsSelectionModel( _groupsModel );
+    _meshSelectionModel           = new MeshSelectionModel( _meshModel );
+
+    _patternDataSelectionModel->setSalomeSelectionMgr( selectionMgr() );
+//     _meshSelectionModel->setSalomeSelectionMgr( selectionMgr() );
+//     _patternDataSelectionModel->setGeomEngine( _geomEngine );
+
+    _currentGraphicView->setSelectionModel(_patternDataSelectionModel);
+
+    _patternDataTreeView->setSelectionModel(_patternDataSelectionModel);
+    _patternDataTreeView->setEditTriggers(/*QAbstractItemView::EditKeyPressed*/QAbstractItemView::AllEditTriggers /*QAbstractItemView::NoEditTriggers*/);
+
+    _patternBuilderTreeView->setSelectionModel(_patternBuilderSelectionModel);
+    _patternBuilderTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+
+    _groupsTreeView->setSelectionModel(_groupsSelectionModel);
+    _groupsTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+
+    _meshTreeView->setSelectionModel( _meshSelectionModel );
+    _meshTreeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
+
+
+    // delegate for edition
+    _treeViewDelegate->setDocumentModel( _currentModel );
+    _treeViewDelegate->setPatternDataSelectionModel( _patternDataSelectionModel );
+    _treeViewDelegate->setPatternBuilderSelectionModel( _patternBuilderSelectionModel );
+    _treeViewDelegate->setGroupsSelectionModel( _groupsSelectionModel /*_groupsTreeView->selectionModel()*/ );
+    _treeViewDelegate->setMeshSelectionModel( _meshSelectionModel/*_meshTreeView->selectionModel()*/ );
+
+
+    connect( _patternDataSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                                   this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+    connect( _patternBuilderSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                                      this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+    connect( _groupsSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                              this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+    connect( _meshSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                            this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+
+
+    currentVtkView = dynamic_cast<SVTK_ViewWindow*>( _currentGraphicView->get_SUIT_ViewWindow() );
+  }
+
+  showPatternMenus(true);
+}
+
+
+
+
+void HEXABLOCKGUI::showDockWidgets(bool isVisible)
+{
+  DEBTRACE("HEXABLOCKGUI::showDockWidgets " << isVisible);
+
+  if (_dwObjectBrowser) _dwObjectBrowser->setVisible(isVisible);
+  if (_dwObjectBrowser) _dwObjectBrowser->toggleViewAction()->setVisible(isVisible);
+
+  if (_dwPattern) _dwPattern->setVisible(isVisible);
+  if (_dwPattern) _dwPattern->toggleViewAction()->setVisible(isVisible);
+
+//   if (_dwAssociation) _dwAssociation->setVisible(isVisible);
+//   if (_dwAssociation) _dwAssociation->toggleViewAction()->setVisible(isVisible);
+
+  if (_dwMesh) _dwMesh->setVisible(isVisible);
+  if (_dwMesh) _dwMesh->toggleViewAction()->setVisible(isVisible);
+
+  if (_dwGroups) _dwGroups->setVisible(isVisible);
+  if (_dwGroups) _dwGroups->toggleViewAction()->setVisible(isVisible);
+
+  if (_dwInputPanel) _dwInputPanel->setVisible(isVisible);
+  if (_dwInputPanel) _dwInputPanel->toggleViewAction()->setVisible(isVisible);
+
+  QWidget* w = _dwInputPanel->widget();
+  if (w) w->show();
+//   if ( isVisible ) _dwObjectBrowser->raise();//_dwPattern->raise();
+}
+
+
+// void HEXABLOCKGUI::raiseStacked()
+// {
+// //   if (_dwStacked) _dwStacked->raise();
+// }
+
+
+
+
+DocumentGraphicView* HEXABLOCKGUI::newGraphicView()
+{
+  MESSAGE("HEXABLOCKGUI::newGraphicView");
+  DocumentGraphicView *newGView = 0;
+  SUIT_ViewWindow *suitVW = NULL;
+
+  SUIT_ViewManager *suitVM = getApp()->getViewManager(SVTK_Viewer::Type(), true);
+  MESSAGE("suitVM->getViewsCount() => " << suitVM->getViewsCount() );
+  suitVW = suitVM->getActiveView();
+  if ( _documentView.count(suitVW) > 0)
+    suitVW = suitVM->createViewWindow();
+
+  if ( suitVW ){
+    suitVW->setClosable(false);
+    newGView = new DocumentGraphicView(getApp(), suitVW, application()->desktop());
+    _documentView[suitVW] = newGView;
+  }
+
+  return newGView;
+}
+
+
+
+
+
+
+
+
+void HEXABLOCKGUI::testDocument()
+{
+  //CS_TEST
+  // ----------
+//   QStandardItem *parentItem = _currentModel->invisibleRootItem();
+//   QStandardItem *myItem =  new QStandardItem("MyItem");
+//   parentItem->appendRow(myItem);
+// //   ----------
+//   QModelIndex v0 = _currentModel->addVertex(0., 0., 0.);
+//   QModelIndex v1 = _currentModel->addVertex(5., 0., 0.);
+//   QModelIndex v2 = _currentModel->addVertex(5., 5., 0.);
+//   QModelIndex v3 = _currentModel->addVertex(0., 5., 0.);
+//   QModelIndex v4 = _currentModel->addVertex(0., 0., 5.);
+//   QModelIndex v5 = _currentModel->addVertex(5., 0., 5.);
+//   QModelIndex v6 = _currentModel->addVertex(5., 5., 5.);
+//   QModelIndex v7 = _currentModel->addVertex(0., 5., 5.);
+// //
+// //
+//   QModelIndex q0 = _currentModel->addQuadVertices( v0, v1, v2, v3 );
+//   QModelIndex q1 = _currentModel->addQuadVertices( v4, v5, v6, v7 );
+//   QModelIndex q2 = _currentModel->addQuadVertices( v0, v3, v7, v4 );
+//   QModelIndex q3 = _currentModel->addQuadVertices( v1, v2, v6, v5 );
+//   QModelIndex q4 = _currentModel->addQuadVertices( v0, v1, v5, v4 );
+//   QModelIndex q5 = _currentModel->addQuadVertices( v3, v2, v6, v7 );
+//
+//   QModelIndex h0 = _currentModel->addHexaQuad( q0, q1, q2, q3, q4, q5 );
+//   QModelIndex vx = _currentModel->addVector(1., 0., 0.);
+//   QModelIndex vy = _currentModel->addVector(0., 1., 0.);
+//   QModelIndex vz = _currentModel->addVector(0., 0., 1.);
+//
+
+
+
+// //   QModelIndex orig1 = _currentModel->addVertex (0, 0,0);
+// //   QModelIndex orig2 = _currentModel->addVertex (50,0,0);
+// //   QModelIndex vz    = _currentModel->addVector (0,0,1);
+// //   QModelIndex vx    = _currentModel->addVector (1,0,0);
+// //
+// //   int nr  = 4;
+// //   int nri = 3;
+// //   int nre = nr;
+// //   int na = 9;
+// //   int nl = 5;
+// //
+// //   QModelIndex  cyl  = _currentModel->addCylinder   (orig1, vz, nr, nl);
+// //   QModelIndex  pipe = _currentModel->addPipe       (orig2, vz, nri, nre, nl);
+// //
+// //   _currentModel->makeCylinder (cyl,  vx, nr, na, nl);
+// //   _currentModel->makePipe(pipe, vx, nr, na, nl);
+
+
+
+//   newMesh( "toto", 3, "FactoryServer");
+// newMesh
+}
+
+void HEXABLOCKGUI::test_make_cart_grid()
+{
+QModelIndex orig1 = _currentModel->addVertex( 0, 0, 0);
+QModelIndex orig2 = _currentModel->addVertex( 10, 0, 0);
+QModelIndex orig3 = _currentModel->addVertex( 0, 10, 0);
+QModelIndex orig4 = _currentModel->addVertex( 10, 10, 0);
+QModelIndex orig5 = _currentModel->addVertex( 0, 20, 0);
+QModelIndex orig6 = _currentModel->addVertex( 10, 20, 0);
+
+QModelIndex vz = _currentModel->addVector(0, 0, 1);
+QModelIndex vx = _currentModel->addVector(1, 0, 0);
+
+//int dr = 1;
+//int dl = 1;
+//int nr = 2;
+//int nl = 3;
+
+// QModelIndex c1 = _currentModel->makeCylindrical(orig1, vx, vz, dr, 360, dl, nr, 4, nl, true);
+// QModelIndex c2 = _currentModel->makeCylindrical(orig2, vx, vz, dr, 360, dl, nr, 8, nl, true);
+// QModelIndex c3 = _currentModel->makeCylindrical(orig3, vx, vz, dr, 270, dl, nr, 8, nl, true);
+// QModelIndex c4 = _currentModel->makeCylindrical(orig4, vx, vz, dr, 270, dl, nr, 7, nl, true);
+// QModelIndex c5 = _currentModel->makeCylindrical(orig5, vx, vz, dr, 360, dl, nr, 5, nl, true);
+// QModelIndex c6 = _currentModel->makeCylindrical(orig6, vx, vz, dr, 360, dl, nr, 6, nl, true);
+
+}
+
+
+void HEXABLOCKGUI::test_make_elmts_transform()
+{
+
+int size_x = 1;
+int size_y = 1;
+int size_z = 2;
+
+QModelIndex orig = _currentModel->addVertex(0, 0, 0);
+QModelIndex dirVr = _currentModel->addVector(1, 1, 1);
+
+QModelIndex grid = _currentModel->makeCartesian(orig, dirVr, size_x, size_y, size_z);//, 0, 0, 0);
+// orig.setScalar(2);
+
+// file_name = os.path.join(os.environ['TMP'], 'transfo0.vtk')
+// _currentModel->saveVtk(file_name)
+
+QModelIndex devant = _currentModel->addVector(5, 0, 0);
+QModelIndex grid2  = _currentModel->makeTranslation(grid, devant);
+
+// file_name = os.path.join(os.environ['TMP'], 'transfo_translation.vtk')
+// _currentModel->saveVtk(file_name)
+
+QModelIndex grid4 = _currentModel->makeRotation(grid2, orig, dirVr, 45);
+
+
+// file_name = os.path.join(os.environ['TMP'], 'transfo_rotation.vtk');
+// _currentModel->saveVtk(file_name);
+
+
+// print "...test make elements by transforming elements OK"
+}
+
+
+void HEXABLOCKGUI::test()
+{
+  DEBTRACE("HEXABLOCKGUI::test");
+  _currentGraphicView->update();
+
+}
+
+void HEXABLOCKGUI::test_association()
+{
+  DEBTRACE("HEXABLOCKGUI::test_association");
+  newDocument();
+
+  QModelIndex v0, v1, v2, v3, e0, e1, q0;
+
+  DocumentModel::GeomObj v0Assoc, v1Assoc, v2Assoc, v3Assoc;
+  DocumentModel::GeomObj e0AssocA, e1AssocA, e1AssocB, e1AssocC;
+  DocumentModel::GeomObj q0AssocA, q0AssocB;
+
+  DocumentModel::GeomObj v0Assoc_test, v1Assoc_test, v2Assoc_test, v3Assoc_test;
+  QList<DocumentModel::GeomObj> e1Assocs_test;
+  DocumentModel::GeomObj q0Assoc_test;
+
+  v0 = _currentModel->addVertex(0, 0, 0);
+  v1 = _currentModel->addVertex(1, 0, 0);
+  v2 = _currentModel->addVertex(1, 1, 0);
+  v3 = _currentModel->addVertex(0, 1, 0);
+  e0  = _currentModel->addEdgeVertices(v0, v1);
+  e1  = _currentModel->addEdgeVertices(v1, v2);
+  q0 = _currentModel->addQuadVertices( v0, v1, v2, v3 );
+
+
+// >>> face3.GetEntry()'0:1:4'
+// >>> e1.GetEntry()'0:1:8'
+// >>> e2.GetEntry()'0:1:9'
+// >>> e3.GetEntry()'0:1:10'
+// >>> e4.GetEntry()'0:1:11'
+// >>> v1.GetEntry()'0:1:12'
+// >>> v2.GetEntry()'0:1:13'
+// >>> v3.GetEntry()'0:1:14'
+// >>> v4.GetEntry()'0:1:15'
+
+
+//   v0Assoc.name  = "geomV0";
+//   v0Assoc.entry = "0:1:1:1:3:6";//"0:1:12";
+//   v0Assoc.brep  = "brepV0";
+//   v1Assoc.name  = "geomV1";
+//   v1Assoc.entry = "0:1:1:1:3:7";//"0:1:13";
+//   v1Assoc.brep  = "brepV1";
+//   v2Assoc.name  = "geomV2";
+//   v2Assoc.entry = "0:1:1:1:3:8";//"0:1:14";
+//   v2Assoc.brep  = "brepV2";
+//   v3Assoc.name  = "geomV3";
+//   v3Assoc.entry = "0:1:1:1:3:9";//"0:1:15";
+//   v3Assoc.brep  = "brepV3";
+//
+//
+//
+//   e0AssocA.name   = "geomE0a";
+//   e0AssocA.entry  = "0:1:1:1:3:5";//"0:1:8";
+//   e0AssocA.brep  = "brepE0a";
+//   e0AssocA.start  = 0.10;
+//   e0AssocA.end    = 0.95;
+//
+//
+//
+//   e1AssocA.name   = "geomE1a";
+//   e1AssocA.entry  = "0:1:1:1:3:2";//"0:1:8";
+//   e1AssocA.brep  = "brepE1a";
+//   e1AssocA.start  = 0.12;
+//   e1AssocA.end    = 0.89;
+//   e1AssocB.name   = "geomE1b";
+//   e1AssocB.entry  = "0:1:1:1:3:3";//"0:1:9";
+//   e1AssocB.brep  = "brepE1b";
+//   e1AssocB.start  = 0.20;
+//   e1AssocB.end    = 0.80;
+//   e1AssocC.name   = "geomE1c";
+//   e1AssocC.entry  = "0:1:1:1:3:4";//"0:1:10";
+//   e1AssocC.brep  = "brepE1c";
+//   e1AssocC.start  = 0.16;
+//   e1AssocC.end    = 0.96;
+//
+//   q0AssocA.name   = "geomQuad";
+//   q0AssocA.entry  = "0:1:1:1:3";
+//   q0AssocA.brep   = "brepq0";
+//
+//   q0AssocB.name   = "geomQuad";
+//   q0AssocB.entry  = "0:1:1:1:4";
+//   q0AssocB.brep   = "brepq0";
+//
+//   _currentModel->addAssociation( v0, v0Assoc );
+//   _currentModel->addAssociation( v1, v1Assoc );
+//   _currentModel->addAssociation( v2, v2Assoc );
+//   _currentModel->addAssociation( v3, v3Assoc );
+//
+//
+//   _currentModel->addAssociation( e0, e0AssocA );
+//
+//   _currentModel->addAssociation( e1, e1AssocA );
+//   _currentModel->addAssociation( e1, e1AssocB );
+//   _currentModel->addAssociation( e1, e1AssocC );
+//
+//   _currentModel->addAssociation( q0, q0AssocA );
+//   _currentModel->addAssociation( q0, q0AssocB );
+
+
+
+
+
+//   v0Assoc_test = _currentModel->getAssociations( v0 )[0];
+//   v1Assoc_test = _currentModel->getAssociations( v1 )[0];
+//   v2Assoc_test = _currentModel->getAssociations( v2 )[0];
+//   v3Assoc_test = _currentModel->getAssociations( v3 )[0];
+//   ASSERT( v0Assoc.name == v0Assoc_test.name );
+//   ASSERT( v1Assoc.name == v1Assoc_test.name );
+//   ASSERT( v2Assoc.name == v2Assoc_test.name );
+//   ASSERT( v3Assoc.name == v3Assoc_test.name );
+//   ASSERT( v0Assoc.entry == v0Assoc_test.entry );
+//   ASSERT( v1Assoc.entry == v1Assoc_test.entry );
+//   ASSERT( v2Assoc.entry == v2Assoc_test.entry );
+//   ASSERT( v3Assoc.entry == v3Assoc_test.entry );
+//
+//
+//   e1Assocs_test = _currentModel->getAssociations( e1 );
+//   ASSERT( e1Assocs_test[0].name == e1AssocA.name );
+//   ASSERT( e1Assocs_test[1].name == e1AssocB.name );
+//   ASSERT( e1Assocs_test[2].name == e1AssocC.name );
+//   ASSERT( e1Assocs_test[0].entry == e1AssocA.entry );
+//   ASSERT( e1Assocs_test[1].entry == e1AssocB.entry );
+//   ASSERT( e1Assocs_test[2].entry == e1AssocC.entry );
+//   ASSERT( e1Assocs_test[0].start == e1AssocA.start );
+//   ASSERT( e1Assocs_test[1].start == e1AssocB.start );
+//   ASSERT( e1Assocs_test[2].start == e1AssocC.start );
+//   ASSERT( e1Assocs_test[0].end == e1AssocA.end );
+//   ASSERT( e1Assocs_test[1].end == e1AssocB.end );
+//   ASSERT( e1Assocs_test[2].end == e1AssocC.end );
+//
+//   q0Assoc_test = _currentModel->getAssociations( q0 )[0];
+//   ASSERT( q0Assoc_test.name  == q0Assoc.name );
+//   ASSERT( q0Assoc_test.entry == q0Assoc.entry );
+
+
+  DEBTRACE("HEXABLOCKGUI::test_association fin");
+}
+
+
+void HEXABLOCKGUI::newDocument()
+{
+  DEBTRACE("HEXABLOCKGUI::newDocument");
+
+  SUIT_ViewWindow *suitVW = NULL;
+//   std::stringstream name;
+//   name << "newDoc_" << ++_documentCnt;
+//   QString fileName = name.str().c_str();
+  QMainWindow *aParent = application()->desktop();
+  QWidget *central = aParent->centralWidget();
+  if (central)
+    central->setFocus();
+  else
+    DEBTRACE("No Central Widget");
+
+//   BasicGUI_PointDlg* aDlg = new BasicGUI_PointDlg( NULL, aParent );
+//   aDlg->show();
+
+  // Create Document from HEXABLOCK ENGINE
+  // WARNING : IN HEXABLOCK component,  GUI and ENGINE share the same process
+  HEXABLOCK_ORB::Document_ptr docIn = _hexaEngine->addDocument("default");
+
+  HEXA_NS::Document* doc = NULL;
+  QString            docEntry;
+
+  // looking doc impl ( c++ )
+  Document_impl* dServant = DownCast<Document_impl*>( docIn );
+  ASSERT( dServant );
+  if ( dServant) doc = dServant->GetImpl();
+
+//   doc->reorderFaces(); //CS_TEST
+
+  // looking for docEntry
+  if ( !CORBA::is_nil(docIn) ){
+    CORBA::String_var anIOR = SalomeApp_Application::orb()->object_to_string( docIn );
+    QString docIOR = anIOR.in();
+    SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+    if ( !docIOR.isEmpty() ) {
+      _PTR(SObject) SO( study->studyDS()->FindObjectIOR( docIOR.toLatin1().constData() ) );
+      if ( SO )
+        docEntry = SO->GetID().c_str();
+    }
+  }
+
+  DEBTRACE("HEXABLOCKGUI::newDocument docEntry "<<docEntry.toStdString());
+
+
+  // Now create Document Model
+  _currentModel     = new DocumentModel( doc, docEntry, this ); //CS_TOCHECK this
+//   _currentModel->setHeaderData(0, Qt::Horizontal, tr("HELLOH0"));
+//   _currentModel->setHeaderData(1, Qt::Horizontal, tr("HELLOH1"));
+//   _currentModel->setHeaderData(0, Qt::Vertical, tr("HELLOV0"));
+  _patternDataModel    = new PatternDataModel(this);
+  _patternBuilderModel = new PatternBuilderModel(this);
+//   _associationsModel   = new AssociationsModel(this);
+  _groupsModel     = new GroupsModel(this);
+  _meshModel       = new MeshModel(this);
+
+  _patternDataModel->setSourceModel(_currentModel);
+  _patternBuilderModel->setSourceModel(_currentModel);
+//   _associationsModel->setSourceModel(_currentModel);
+  _groupsModel->setSourceModel(_currentModel);
+  _meshModel->setSourceModel(_currentModel);
+
+  // --- new Graphic view ( SVTK )
+  _currentGraphicView  = newGraphicView();
+  suitVW = _currentGraphicView->get_SUIT_ViewWindow();
+
+  // --- setting model
+  _currentGraphicView->setModel(_currentModel);
+//   _currentGraphicView->setModel(_patternDataModel);
+//   connect( _currentModel, SIGNAL(patternDataChanged() ), _currentGraphicView,  SLOT ( onPatternDatachanged() ) );
+  _patternDataTreeView->setModel(_patternDataModel);//_currentModel;
+//   _patternDataTreeView->setModel(_currentModel);//;
+  _patternBuilderTreeView->setModel(_patternBuilderModel);//_currentModel;
+//   _associationTreeView->setModel(_associationsModel);
+  _groupsTreeView->setModel(_groupsModel);
+  _meshTreeView->setModel(_meshModel);
+
+
+  // --- setting selection model
+  if ( _patternDataSelectionModel )    delete _patternDataSelectionModel;
+  if ( _patternBuilderSelectionModel ) delete _patternBuilderSelectionModel;
+  if ( _groupsSelectionModel )         delete _groupsSelectionModel;
+  if ( _meshSelectionModel )           delete _meshSelectionModel;
+
+  _patternDataSelectionModel    = new PatternDataSelectionModel(_patternDataModel);
+  _patternBuilderSelectionModel = new PatternBuilderSelectionModel( _patternBuilderModel, _patternDataSelectionModel );
+  _groupsSelectionModel         = new GroupsSelectionModel(_groupsModel);
+  _meshSelectionModel           = new MeshSelectionModel(_meshModel);
+
+  _patternDataSelectionModel->setSalomeSelectionMgr( selectionMgr() );
+//   _meshSelectionModel->setSalomeSelectionMgr( selectionMgr() );
+
+  _currentGraphicView->setSelectionModel(_patternDataSelectionModel);
+  _patternDataTreeView->setSelectionModel(_patternDataSelectionModel);
+  _patternDataTreeView->setSelectionMode(QAbstractItemView::SingleSelection); //QAbstractItemView::MultiSelection //CS_TEST
+  _patternBuilderTreeView->setSelectionModel(_patternBuilderSelectionModel);
+  _groupsTreeView->setSelectionModel(_groupsSelectionModel);
+  _meshTreeView->setSelectionModel(_meshSelectionModel);
+  _meshTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
+
+  _treeViewDelegate->setDocumentModel( _currentModel );
+  _treeViewDelegate->setPatternDataSelectionModel( _patternDataSelectionModel );
+  _treeViewDelegate->setPatternBuilderSelectionModel( _patternBuilderSelectionModel );
+  _treeViewDelegate->setGroupsSelectionModel( _groupsSelectionModel/*_groupsTreeView->selectionModel()*/ );
+  _treeViewDelegate->setMeshSelectionModel( _meshSelectionModel/*_meshTreeView->selectionModel()*/ );
+
+
+  connect( _patternDataSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                                 this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+  connect( _patternBuilderSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                                    this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+  connect( _groupsSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                            this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+  connect( _meshSelectionModel, SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
+                          this, SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+
+
+  // salome view/object browser/model management
+  _documentModels[ suitVW ] = _currentModel;
+
+//   _salomeViews[ _currentModel ] = suitVW;
+//   std::map<const QAbstractItemModel*,  SUIT_ViewWindow*> _salomeViews;
+
+  _salomeViewWindows[docEntry] = suitVW;
+  currentVtkView = dynamic_cast<SVTK_ViewWindow*>( _currentGraphicView->get_SUIT_ViewWindow() );
+  currentVtkView->raise();
+
+//   _currentGraphicView->setWindowTitle( _currentModel->getName() );
+//   currentVtkView->setWindowTitle( _currentModel->getName() );
+//   showDockWidgets(true);
+//   showPatternMenus
+//   _dwPattern->setVisible(true);
+//   _dwPattern->toggleViewAction()->setVisible(true);
+  _dwPattern->raise();
+//   testDocument();
+//   test_make_cart_grid();
+//   test_make_elmts_transform();
+  showAllMenus();
+  getApp()->updateObjectBrowser();
+
+}
+
+void HEXABLOCKGUI::slot_modelChanged(const QModelIndex &topLeft, const QModelIndex  &bottomRight)
+{
+  //std::cout << "HHHHHHHHHHHHHHHHHH  Model changed." << std::endl;
+  //std::cout << "HHHHHHHHHHHHHHHHHH  slot_modelChanged topLeft -> " << topLeft.data().toString().toStdString()<<std::endl;
+  //std::cout << "HHHHHHHHHHHHHHHHHH  slot_modelChanged bottomRight ->" << bottomRight.data().toString().toStdString()<<std::endl;
+
+  _patternDataTreeView->openPersistentEditor( topLeft );
+
+//   // Make the combo boxes always displayed.
+//   for ( int i = 0; i < _currentModel->rowCount(); ++i )
+//     {
+//       QModelIndex ind = _currentModel->index(i);
+//     _patternDataTreeView->openPersistentEditor( ind );
+//     std::cout << "ind" << ind.data() << std::endl;
+//     }
+}
+
+void HEXABLOCKGUI::loadDocument( const QString &inFile )
+{
+  DEBTRACE("HEXABLOCKGUI::loadDocument");
+  QMainWindow *aParent = application()->desktop();
+  QString selectedFile;
+
+  if ( inFile.isNull() ){
+    QFileDialog dialog( aParent, tr("Open HexaBlock Document") ,
+                        QString::null, tr( "XML-Files (*.xml);;All Files (*)" ) );
+    dialog.setHistory( getQuickDirList() );
+    if (dialog.exec()){
+      QStringList selectedFiles = dialog.selectedFiles();
+      if (!selectedFiles.isEmpty())
+        selectedFile = selectedFiles.first();
+    }
+  } else {
+    selectedFile = inFile;
+  }
+
+  if (! selectedFile.isEmpty()){
+    newDocument();
+    _currentModel->load(selectedFile);
+    renameObject( _currentModel->documentEntry(), _currentModel->getName() );
+  }
+}
+
+void HEXABLOCKGUI::saveDocument()
+{
+  QMainWindow *aParent = application()->desktop();
+  QString anInitialPath = "";
+  if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+    anInitialPath = QDir::currentPath();
+//   QString aMeshName = anIO->getName();
+
+  QString aDocName = "document";
+  QStringList filter;
+  filter.append( QObject::tr( "XML_FILES_FILTER" ) + " (*.xml)" );
+  filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" );
+  QString aFilename =  anInitialPath + QString("/") + aDocName;
+  aFilename = SUIT_FileDlg::getFileName( aParent,
+                                         aFilename,
+                                         filter,
+                                         tr( "Save HexaBlock Document" ),
+                                         false );
+  //std::cout<<"HEXABLOCKGUI::saveDocument()"<<std::endl;
+  if ( !aFilename.isEmpty() ) {
+    //std::cout<<"!aFilename.isEmpty()"<<std::endl;
+    _currentModel->save( aFilename );
+  }
+  //CS_TODO save doc
+}
+
+void HEXABLOCKGUI::_showDialogBox( HexaBaseDialog* diag )
+{
+  MESSAGE("HEXABLOCKGUI::_showDialogBox()");
+  if (!diag) return;
+  MESSAGE("if (!diag) return;");
+  if (!_dwInputPanel) return;
+  MESSAGE("if (!_dwInputPanel) return;");
+
+  diag->setDocumentModel(_currentModel);
+  diag->setPatternDataSelectionModel(_patternDataSelectionModel);
+  diag->setPatternBuilderSelectionModel(_patternBuilderSelectionModel);
+  diag->setGroupsSelectionModel(_groupsSelectionModel);
+  diag->setMeshSelectionModel(_meshSelectionModel/*_meshTreeView->selectionModel()*/);
+
+  QWidget* w = _dwInputPanel->widget();
+  if (w) w->hide();
+
+  if ( !_dwInputPanel->isVisible() ) _dwInputPanel->setVisible(true);
+  _dwInputPanel->setWidget(diag);
+  _dwInputPanel->setWindowTitle(diag->windowTitle());
+  diag->show();
+}
+
+
+void HEXABLOCKGUI::addVertex()
+{
+  if ( !_vertexDiag ){
+    _vertexDiag = new VertexDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _vertexDiag );
+}
+
+void HEXABLOCKGUI::addEdge()
+{
+  if ( !_edgeDiag ){
+    _edgeDiag = new EdgeDialog( _dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _edgeDiag );
+}
+
+
+
+
+void HEXABLOCKGUI::addQuad()
+{
+  if ( !_quadDiag ){
+    _quadDiag = new QuadDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _quadDiag );
+}
+
+void HEXABLOCKGUI::addHexa()
+{
+  if ( !_hexaDiag ){
+    _hexaDiag = new HexaDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _hexaDiag );
+}
+
+void HEXABLOCKGUI::addVector()
+{
+  if ( !_vectorDiag ){
+    _vectorDiag = new VectorDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _vectorDiag );
+}
+
+void HEXABLOCKGUI::addCylinder()
+{
+  if ( !_cylinderDiag ){
+    _cylinderDiag = new CylinderDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _cylinderDiag );
+}
+
+
+void HEXABLOCKGUI::addPipe()
+{
+  if ( !_pipeDiag){
+    _pipeDiag = new PipeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _pipeDiag );
+}
+
+
+void HEXABLOCKGUI::makeGrid()
+{
+  if ( !_makeGridDiag ){
+    _makeGridDiag = new MakeGridDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeGridDiag );
+}
+
+
+void HEXABLOCKGUI::makeCylinder()
+{
+  if ( !_makeCylinderDiag ){
+    _makeCylinderDiag = new MakeCylinderDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeCylinderDiag );
+}
+
+void HEXABLOCKGUI::makePipe()
+{
+  if ( !_makePipeDiag ){
+    _makePipeDiag = new MakePipeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makePipeDiag );
+}
+
+void HEXABLOCKGUI::makeCylinders()
+{
+  if ( !_makeCylindersDiag ){
+    _makeCylindersDiag = new MakeCylindersDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeCylindersDiag );
+}
+
+void HEXABLOCKGUI::makePipes()
+{
+  if ( !_makePipesDiag ){
+    _makePipesDiag = new MakePipesDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makePipesDiag );
+}
+
+
+void HEXABLOCKGUI::makeHemiSphere()  // NEW HEXA3
+{
+  if ( !_makeHemiSphereDiag ){
+    _makeHemiSphereDiag = new MakeHemiSphereDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeHemiSphereDiag );
+}
+
+
+void HEXABLOCKGUI::removeHexa()
+{
+  if ( !_removeHexaDiag ){
+    _removeHexaDiag = new RemoveHexaDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _removeHexaDiag );
+}
+
+
+void HEXABLOCKGUI::prismQuad()
+{
+  if ( !_prismQuadDiag ){
+    _prismQuadDiag = new PrismQuadDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _prismQuadDiag );
+}
+
+
+void HEXABLOCKGUI::joinQuad()
+{
+  if ( !_joinQuadDiag ){
+    _joinQuadDiag = new JoinQuadDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _joinQuadDiag );
+}
+
+void HEXABLOCKGUI::merge()
+{
+  if ( !_mergeDiag ){
+    _mergeDiag = new MergeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _mergeDiag );
+}
+
+void HEXABLOCKGUI::disconnectElts()
+{
+  if ( !_disconnectDiag ){
+    _disconnectDiag = new DisconnectDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _disconnectDiag );
+}
+
+void HEXABLOCKGUI::cutEdge()
+{
+  if ( !_cutEdgeDiag ){
+    _cutEdgeDiag = new CutEdgeDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _cutEdgeDiag );
+}
+
+void HEXABLOCKGUI::makeTransformation()
+{
+  if ( !_makeTransformationDiag ){
+    _makeTransformationDiag = new MakeTransformationDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeTransformationDiag );
+}
+
+
+void HEXABLOCKGUI::makeSymmetry()
+{
+  if ( !_makeSymmetryDiag ){
+    _makeSymmetryDiag = new MakeSymmetryDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _makeSymmetryDiag );
+}
+
+
+void HEXABLOCKGUI::performTransformation()
+{
+  if ( !_performTransformationDiag ){
+    _performTransformationDiag = new PerformTransformationDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _performTransformationDiag );
+}
+
+
+void HEXABLOCKGUI::performSymmetry()
+{
+  if ( !_performSymmetryDiag ){
+    _performSymmetryDiag = new PerformSymmetryDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _performSymmetryDiag );
+}
+
+
+void HEXABLOCKGUI::replaceHexa()    // NEW HEXA3
+{
+  if ( !_replaceHexaDiag ){
+    _replaceHexaDiag = new ReplaceHexaDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _replaceHexaDiag );
+}
+
+
+void HEXABLOCKGUI::quadRevolution() // NEW HEXA3
+{
+  if ( !_quadRevolutionDiag ){
+    _quadRevolutionDiag = new QuadRevolutionDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _quadRevolutionDiag );
+}
+
+
+// void HEXABLOCKGUI::assocVertex()
+// {
+//   if ( !_vertexAssocDiag ){
+//     _vertexAssocDiag = new VertexAssocDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+//   }
+//   _showDialogBox( vertexAssocDiag );
+// }
+
+
+void HEXABLOCKGUI::assocVertex()
+{
+ MESSAGE("HEXABLOCKGUI::assocVertex()");
+ QWidget* d = dynamic_cast<SUIT_Desktop*>(_dwInputPanel->parent());
+  if ( !_vertexAssocDiag  ){
+    _vertexAssocDiag  = new VertexAssocDialog( NULL, d );
+  }
+  _vertexAssocDiag->setDocumentModel(_currentModel);
+  _vertexAssocDiag->setPatternDataSelectionModel(_patternDataSelectionModel);
+  _dwInputPanel->setWidget(_vertexAssocDiag);
+  _dwInputPanel->setWindowTitle(_vertexAssocDiag->windowTitle());
+  //_vertexAssocDiag->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+  _vertexAssocDiag->show();
+}
+
+
+
+void HEXABLOCKGUI::assocEdge()
+{
+  if ( !_edgeAssocDiag ){
+    _edgeAssocDiag = new EdgeAssocDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+    _edgeAssocDiag->setGeomEngine( _geomEngine );
+  }
+  _showDialogBox( _edgeAssocDiag );
+}
+
+void HEXABLOCKGUI::assocQuad()
+{
+  if ( !_quadAssocDiag ){
+    _quadAssocDiag = new QuadAssocDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _quadAssocDiag );
+}
+
+
+void HEXABLOCKGUI::addGroup()
+{
+  if ( !_groupDiag ){
+    _groupDiag = new GroupDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _groupDiag );
+}
+
+
+/*
+void HEXABLOCKGUI::removeGroup()
+{
+  QItemSelectionModel *groupsSelectionModel = _groupsTreeView->selectionModel();
+  QModelIndex selected = groupsSelectionModel->currentIndex();
+  selected = _groupsModel->mapToSource( selected );
+
+/*
+  if ( !selected.isValid() ){
+    SUIT_MessageBox::information( 0, tr( "CANNOT REMOVE GROUP" ), tr( "No group selected!" ) );
+    return;
+  }
+
+  //Demande de confirmation de la suppression des groupes
+  if (SUIT_MessageBox::question(
+            0,
+            tr("Remove Group"),
+            tr("Remove group : %1 ?").arg(selected.data().toString()),
+            SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+            SUIT_MessageBox::Cancel
+        ) == SUIT_MessageBox::Cancel) return;
+
+  groupsSelectionModel->clearSelection();
+  std::cout << "//////////////////////////  " << selected.data().toString().toStdString() << std::endl;
+  bool removed = _currentModel->removeGroup( selected );
+  //std::cout << "  " << selected.data().toString().toStdString() << std::endl;
+  if ( !removed ) {
+     SUIT_MessageBox::critical( 0, tr( "ERR_ERROR" ), tr( "CANNOT REMOVE %1" ).arg(selected.data().toString()) );
+     groupsSelectionModel->clearSelection();
+     return;
+  }
+}*/
+
+
+
+void HEXABLOCKGUI::removeGroup()
+{
+  QItemSelectionModel *groupsSelectionModel = _groupsTreeView->selectionModel();
+  QModelIndexList l = groupsSelectionModel->selectedIndexes();
+  int nbGroupsRemoved = 0;
+
+  if ( l.isEmpty() ){
+    SUIT_MessageBox::information( 0, tr( "CANNOT REMOVE GROUP" ), 
+                                                                       tr( "No group selected!" ) );
+    return;
+  }
+
+  foreach( QModelIndex selected, l ){
+    if ( selected.data(HEXA_TREE_ROLE) == GROUP_TREE ){
+      selected = _groupsModel->mapToSource( selected );
+      Q_ASSERT(selected.isValid());
+
+      //Confirm the deletion of the group
+      if (SUIT_MessageBox::question(
+            0,
+            tr("Remove Group"),
+            tr("Remove group : %1 ?").arg(selected.data().toString()),
+            SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+            SUIT_MessageBox::Cancel
+        ) == SUIT_MessageBox::Cancel) return;
+
+      bool removed = _currentModel->removeGroup( selected );
+      if ( !removed ) {
+        SUIT_MessageBox::critical( 0, tr( "ERR_ERROR" ), 
+                                       tr( "CANNOT REMOVE %1" ).arg(selected.data().toString()) );
+        return;
+      }
+         nbGroupsRemoved++;
+    }
+  }
+  if (!nbGroupsRemoved)
+       SUIT_MessageBox::information( 0, tr( "CANNOT REMOVE GROUP" ), 
+                                                                       tr( "No group selected!" ) );
+}
+
+
+void HEXABLOCKGUI::addLaw()
+{
+  if ( !_lawDiag ){
+    _lawDiag = new LawDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _showDialogBox( _lawDiag );
+}
+
+void HEXABLOCKGUI::removeLaw()
+{
+
+  QModelIndexList l = _meshSelectionModel->selectedIndexes();
+  int nbLawsRemoved = 0;
+
+  if ( l.isEmpty() ){
+    SUIT_MessageBox::information( 0, tr( "CANNOT REMOVE LAW" ), 
+                                                                       tr( "No law selected!" ) );
+    return;
+  }
+
+  foreach( QModelIndex selected, l ){
+    if ( selected.data(HEXA_TREE_ROLE) == LAW_TREE ){
+      selected = _meshModel->mapToSource( selected );
+      Q_ASSERT(selected.isValid());
+
+      //Confirm the deletion of the law
+      if (SUIT_MessageBox::question(
+            0,
+            tr("Remove Law"),
+            tr("Remove law : %1 ?\nAll propagations having this law will \
+have the default law.").arg(selected.data().toString()),
+            SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+            SUIT_MessageBox::Cancel
+        ) == SUIT_MessageBox::Cancel) return;
+
+      bool removed = _currentModel->removeLaw(selected);
+      if ( !removed ) {
+        SUIT_MessageBox::critical( 0, tr( "ERR_ERROR" ), 
+                                       tr( "CANNOT REMOVE %1" ).arg(selected.data().toString()) );
+        return;
+      }
+         nbLawsRemoved++;
+    }
+  }
+  if (!nbLawsRemoved)
+       SUIT_MessageBox::information( 0, tr( "CANNOT REMOVE LAW" ), 
+                                                                       tr( "No law selected!" ) );
+
+}
+
+
+void HEXABLOCKGUI::setPropagation()
+{
+  if (!_dwInputPanel) return;
+  PropagationDialog* diag = new PropagationDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  diag->setDocumentModel(_currentModel);
+  diag->setMeshSelectionModel(_meshSelectionModel);
+  //diag->setValue(p);
+  diag->setFocus();
+  _dwInputPanel->setWidget(diag);
+  _dwInputPanel->setWindowTitle( diag->windowTitle() );
+  diag->clear();
+}
+
+
+// Dialog box to compute a mesh from a document
+// --------------------------------------------
+
+void HEXABLOCKGUI::computeMesh()
+{
+  if ( !_computeMeshDiag ){
+    _computeMeshDiag = new ComputeMeshDialog(_dwInputPanel, HexaBaseDialog::NEW_MODE);
+  }
+  _computeMeshDiag->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+  _showDialogBox( _computeMeshDiag );
+}
+
+void HEXABLOCKGUI::clearAssociations()
+{
+//   QMessageBox::warning( 0, "windowTitle()", "clearAssociations" );
+  QModelIndex iDataModel = _patternDataTreeView->currentIndex();
+  QModelIndex iModel     = _patternDataModel->mapToSource(iDataModel);
+
+  _currentModel->clearEltAssociations(iModel);
+
+  SUIT_MessageBox::information( 0, tr( "HEXA_INFO" ), tr( "ASSOCIATION CLEARED" ) );
+}
+
+void HEXABLOCKGUI::clearAllAssociations()
+{
+       //Confirm the deletion of the associations
+       if (SUIT_MessageBox::question(
+                       0,
+                       tr("Clear Associations"),
+                       tr("Clear all associations ?"),
+                       SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+                       SUIT_MessageBox::Cancel
+       ) == SUIT_MessageBox::Cancel) return;
+
+       int currentChildIndex = 0;
+       QModelIndex currentIndex = _patternDataModel->mapToSource(_patternDataTreeView->currentIndex());
+       QVariant currentAssocVariant;
+       QString currentAssocEntry;
+
+       QModelIndex currentChild = currentIndex.child(currentChildIndex++, 0);
+       while( currentChild.isValid() ) {
+
+               currentAssocVariant = currentChild.data( HEXA_ASSOC_ENTRY_ROLE );
+               currentAssocEntry = currentChild.data( HEXA_ASSOC_ENTRY_ROLE ).toString();
+               if ( currentAssocVariant.isValid() && !currentAssocEntry.isEmpty() )
+                       _currentModel->clearEltAssociations(currentChild);
+
+               currentChild = currentChild.sibling(currentChildIndex++, 0);
+       }
+
+       //SUIT_MessageBox::information( 0, tr( "HEXA_INFO" ), tr( "ASSOCIATION CLEARED" ) );
+}
+
+void HEXABLOCKGUI::showAssociations()
+{
+       QModelIndexList elts;
+       int currentChildIndex = 0;
+       QVariant currentAssocVariant;
+       QString currentAssocEntry;
+       QModelIndex currentIndex = _patternDataTreeView->currentIndex();
+       QModelIndex currentChild = currentIndex.child(currentChildIndex++, 0);
+
+       while( currentChild.isValid() ) {
+
+               currentAssocVariant = currentChild.data( HEXA_ASSOC_ENTRY_ROLE );
+               currentAssocEntry = currentChild.data( HEXA_ASSOC_ENTRY_ROLE ).toString();
+               if ( currentAssocVariant.isValid() && !currentAssocEntry.isEmpty() )
+                       elts << currentChild;
+
+               currentChild = currentChild.sibling(currentChildIndex++, 0);
+       }
+       _patternDataSelectionModel-> highlightVTKElts( elts );
+
+}
+
+
+LightApp_SelectionMgr* HEXABLOCKGUI::selectionMgr()
+{
+  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+  if( anApp )
+    return dynamic_cast<LightApp_SelectionMgr*>( anApp->selectionMgr() );
+  else
+    return 0;
+}
+
+QStringList HEXABLOCKGUI::getQuickDirList()
+{
+  QStringList dirList;
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  if ( resMgr )
+    dirList = resMgr->stringValue( "FileDlg", "QuickDirList" ).split( ';', QString::SkipEmptyParts );
+  return dirList;
+}
+
+
+
+// --- Export the module
+
+extern "C"
+{
+  HEXABLOCKGUI_EXPORT CAM_Module* createModule()
+  {
+    return new HEXABLOCKGUI();
+  }
+
+  HEXABLOCKGUI_EXPORT char* getModuleVersion()
+  {
+    return (char*)HEXABLOCK_VERSION_STR;
+  }
+}
+
+
+
+
+
+
+
+
+
+
+// void  HEXABLOCKGUI::newMesh( const std::string& meshName,
+//                                             int dim,
+//                              const std::string& container )
+// {
+//   SalomeApp_Application* app = getApp();
+//   int activeStudyId = app->activeStudy()->id();
+//
+//   if ( CORBA::is_nil(_hexaEngine) ) _hexaEngine  = InitHEXABLOCKGen( app );
+//   if ( CORBA::is_nil(_smeshEngine)) _smeshEngine = InitSMESHGen( app, container );
+//   if ( CORBA::is_nil(_geomEngine) ) _geomEngine  = InitGEOMGen( app, container );
+//
+//   std::cout << "_hexaEngine =>" << _hexaEngine << std::endl;
+//   std::cout << "_smeshEngine =>" << _smeshEngine << std::endl;
+//   std::cout << "_geomEngine =>" << _geomEngine << std::endl;
+//
+//   HEXA_NS::Document* docImpl = _currentModel->documentImpl();
+//   std::cout << "docImpl =>" << docImpl << std::endl;
+//   std::cout << "docImpl->getFile() =>" << docImpl->getFile() << std::endl;
+//   HEXABLOCK_ORB::Document_var anDocObj=  _hexaEngine->loadDocument( docImpl->getFile() );
+//   std::cout << "anDocObj =>" << anDocObj << std::endl;
+//
+//
+//   GEOM::GEOM_I3DPrimOperations_var anGeomOper = _geomEngine->GetI3DPrimOperations( activeStudyId );
+//   if ( CORBA::is_nil(anGeomOper) ) return;  //!anGeomOper->_is_nil() ) {
+//   std::cout << "anGeomOper =>" << anGeomOper << std::endl;
+//   GEOM::GEOM_Object_var            anGeomObj = anGeomOper->MakeBoxDXDYDZ( 5., 5., 5. );
+//   std::cout << "anGeomObj =>" << anGeomObj << std::endl;
+//
+//
+//   SALOMEDS::SObject _geomEngine->AddInStudy (in SALOMEDS::Study theStudy,
+//                                   in GEOM_Object theObject,
+//                                   in string theName,
+//
+//
+//
+// // void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object )
+// // {
+//   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+//   if ( study && !CORBA::is_nil( object ) ) {
+//     _PTR(Study) studyDS = study->studyDS();
+//     QString entry = GetEntry( object );
+//     GEOM::GEOM_Object_var father = object->GetMainShape();
+//     QString fatherEntry = GetEntry( father );
+//     if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
+//       QString name = GetName( object );
+//       GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
+//                                          object, name.toLatin1().data(), father.in() );
+//     }
+//   }
+// }
+//
+//
+// //     geompy = smesh.geompy
+// //     #fkl: shape  = doc.getShape()
+// //     shape  = geompy.MakeBox(0, 0, 0,  1, 1, 1)
+// //     geompy.addToStudy(shape, name)
+// //
+// //     component = salome.lcc.FindOrLoadComponent(container, "SMESH")
+// //     component.init_smesh(salome.myStudy, geompy.geom)
+// //     mesh = component.Mesh(shape, name)
+// //
+// //     so = "libHexaBlockEngine.so"
+// //
+// //     algo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(component, "HEXABLOCK_3D", so)
+//     SMESH::SMESH_Hypothesis_var algo = _smeshEngine->CreateHypothesis( "HEXABLOCK_3D", "libHexaBlockEngine.so");
+// //       raises ( SALOME::SALOME_Exception );
+// //     mesh.mesh.AddHypothesis(shape, algo)
+// //
+// //     hypo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(component, "HEXABLOCK_Parameters", so)
+//     //HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis_var
+//      SMESH::SMESH_Hypothesis_var hypo = _smeshEngine->CreateHypothesis( "HEXABLOCK_Parameters", "libHexaBlockEngine.so");
+//
+//      HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis_var hexHypo = HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis::_narrow(hypo);
+//     ASSERT(!CORBA::is_nil(hexHypo));
+//
+// //     mesh.mesh.AddHypothesis(shape, hypo)
+// //
+// //     hexHypo->SetDocument(anDocObj);
+// //     hexHypo->SetDimension(dim);
+// //
+// //     mesh.Compute()
+// //
+// //     return mesh
+//
+// }
+//
+//
+//
+// void  newMesh( const std::string& meshName, int dim )// const std::string& container )
+// {
+//
+// //     _smeshEngine.init_smesh(salome.myStudy, geompy.geom)
+// SMESH::SMESH_var mesh = _smeshEngine->Mesh(shape, name);
+// SMESH::SMESH_Hypothesis_var algo = _smeshEngine->CreateHypothesis( "HEXABLOCK_3D", "libHexaBlockEngine.so");
+// SMESH::SMESH_Hypothesis_var hypo = _smeshEngine->CreateHypothesis( "HEXABLOCK_Parameters", "libHexaBlockEngine.so");
+// HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis_var hexHypo = HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis::_narrow(hypo);
+// hexHypo->SetDocument(anDocObj);
+// hexHypo->SetDimension(dim);
+// }
+
+/*
+SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
+{
+  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
+  if ( CORBA::is_nil( myComponentSMESH ) )
+    {
+      SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
+      if ( aStudy )
+        aGUI.myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
+      return aGUI.myComponentSMESH;
+    }
+  if ( aStudy )
+    myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
+  return myComponentSMESH;
+}*/
+
+// bool HEXABLOCKGUI::eventFilter(QObject *obj, QEvent *event)
+// {
+//     if ( event->type() == QEvent::Enter ){//QEvent::Show ){ //QEvent::KeyPress) {
+//         showDocumentMenus( false );
+//         showPatternMenus( false );
+//         showAssociationMenus( false );
+//         showGroupsMenus( false );
+//         showMeshMenus( false );
+//         if ( obj == _dwObjectBrowser ) {
+//           showDocumentMenus( true );
+//         } else if ( obj == _dwPattern  ) {
+//           showPatternMenus( true );
+//         } else if ( obj == _dwAssociation ) {
+//           showAssociationMenus( true );
+//         } else if ( obj == _dwGroups ) {
+//           showGroupsMenus( true );
+//         } else if ( obj == _dwMesh ) {
+//
+//           showMeshMenus( true );
+//         }
+//         return false;
+//     } else {
+//          // standard event processing
+//          return QObject::eventFilter(obj, event);
+//     }
+// }
+
+// try {
+// //   throw SALOME_Exception(LOCALIZED("assocVertex"));
+//   } catch ( SALOME::SALOME_Exception& exc ){
+//       INFOS("Following exception was cought:\n\t"<<exc.details.text);
+//   } catch( const std::exception& exc){
+//       INFOS("Following exception was cought:\n\t"<<exc.what());
+//   } catch (Standard_Failure& exc) {
+//       MESSAGE("OCCT Exception in SMESH_Pattern: " << exc.GetMessageString());
+//   } catch(...){
+//       MESSAGE("Unknown exception was cought !!!");
+//   }
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx
new file mode 100755 (executable)
index 0000000..68cda62
--- /dev/null
@@ -0,0 +1,455 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_HXX_
+#define _HEXABLOCKGUI_HXX_
+
+#include <iostream>
+#include <map>
+
+#include <QTreeView>
+#include <QModelIndex>
+#include <QDockWidget>
+
+
+#include "klinkitemselectionmodel.hxx"
+
+#include <OB_Browser.h>
+#include <SalomeApp_Module.h>
+// #include <LightApp_Module.h>
+
+#include <LightApp_SelectionMgr.h>
+#include <LightApp_DataModel.h>
+
+#include <SALOMEconfig.h>
+
+
+// #include "MyBasicGUI_PointDlg.hxx"
+// #include "Resource.hxx"
+#include "HEXABLOCKGUI_Resource.hxx"
+
+#include "GEOMGUI_OCCSelector.h"
+
+
+
+
+#include CORBA_CLIENT_HEADER(HEXABLOCK_Gen)
+// #include CORBA_CLIENT_HEADER(GEOM_Gen)
+// #include CORBA_CLIENT_HEADER(SMESH_Gen)
+
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+    class DocumentGraphicView;
+    class DocumentDelegate;
+    class DocumentModel;
+    class PatternDataModel;
+    class PatternBuilderModel;
+    class AssociationsModel;
+    class GroupsModel;
+    class MeshModel;
+    class PatternDataSelectionModel;
+    class PatternBuilderSelectionModel;
+    class GroupsSelectionModel;
+    class MeshSelectionModel;
+
+    class HexaBaseDialog;
+    class VertexDialog;
+    class EdgeDialog;
+    class QuadDialog;
+    class HexaDialog;
+    class VectorDialog;
+    class CylinderDialog;
+    class PipeDialog;
+    class MakeGridDialog;
+    class MakeCylinderDialog;
+    class MakePipeDialog;
+    class MakeCylindersDialog;
+    class MakePipesDialog;
+    class RemoveHexaDialog;
+    class PrismQuadDialog;
+    class JoinQuadDialog;
+    class MergeDialog;
+    class DisconnectDialog;
+    class CutEdgeDialog;
+    class MakeTransformationDialog;
+    class MakeSymmetryDialog;
+    class PerformTransformationDialog;
+    class PerformSymmetryDialog;
+    typedef class MyBasicGUI_PointDlg VertexAssocDialog;
+    class EdgeAssocDialog;
+    class QuadAssocDialog;
+    class GroupDialog;
+    class LawDialog;
+    class PropagationDialog;
+    class ComputeMeshDialog;
+    class ReplaceHexaDialog;
+    class QuadRevolutionDialog;
+    class MakeHemiSphereDialog;
+  }
+}
+
+class HEXABLOCKGUI_Resource;//SUIT_ResourceMgr;
+class SalomeApp_Study;
+class SalomeApp_Application;
+class SUIT_ViewWindow;
+class SVTK_ViewWindow;
+class OCCViewer_ViewWindow;
+class LightApp_VTKSelector;
+
+// // SALOME KERNEL includes
+// #include <SALOMEDS_Study.hxx>
+// #include <SALOMEDSClient_StudyBuilder.hxx>
+// #include <SALOMEDSClient_SComponent.hxx>
+// #include <SALOMEDSClient_ClientFactory.hxx>
+// #include <SALOMEDSClient_IParameters.hxx>
+
+
+class HEXABLOCKGUI : public SalomeApp_Module
+{
+  Q_OBJECT
+
+  friend class HEXABLOCKGUI_Resource;
+
+public:
+  HEXABLOCKGUI();
+  virtual ~HEXABLOCKGUI();
+
+  static SalomeApp_Study*         activeStudy();
+
+  static HEXABLOCK_ORB::HEXABLOCK_Gen_ptr InitHEXABLOCKGen( SalomeApp_Application* );
+//   static SMESH::SMESH_Gen_ptr             InitSMESHGen( SalomeApp_Application* app, const std::string& container = "FactoryServer" );
+  static GEOM::GEOM_Gen_ptr InitGEOMGen( SalomeApp_Application* app, const std::string& container = "FactoryServer" );
+
+  static LightApp_SelectionMgr*   selectionMgr();
+
+
+  static SVTK_ViewWindow*      currentVtkView;
+  static OCCViewer_ViewWindow* currentOccView;
+
+ //HEXABLOCK::GUI::DocumentModel*
+
+  virtual void initialize( CAM_Application* app);
+
+  virtual bool renameAllowed( const QString& ) const;
+  virtual bool renameObject( const QString& entry, const QString& name);
+  virtual void windows( QMap<int, int>& theMap) const;
+//   virtual LightApp_Displayer* displayer();
+  virtual QString  engineIOR() const;
+
+  virtual void viewManagers(QStringList& list) const;
+  virtual void setResource(SUIT_ResourceMgr* r);
+  virtual void createPreferences();
+  virtual void preferencesChanged( const QString& sect, const QString& name );
+  virtual void studyActivated();
+
+  //------------------------------------
+  void createAndFillDockWidget();
+  void createActions();
+  void createMenus();
+  void createTools();
+
+  void initialMenus();
+  void showAllMenus();
+
+//   void showBaseMenus(bool show);
+//   void showEditionMenus(bool show);
+//   void showExecMenus(bool show);
+//   void showCommonMenus(bool show);
+
+  void switchModel(SUIT_ViewWindow *view);
+  void showDockWidgets(bool isVisible);
+
+
+public slots:
+  bool deactivateModule( SUIT_Study* theStudy);
+  bool activateModule( SUIT_Study* theStudy);
+  void onObjectBrowserClick(const QModelIndex& index);
+
+  void showDocumentMenus(bool show);
+  void showPatternMenus(bool show);
+  void showAssociationMenus(bool show);
+  void showGroupsMenus(bool show);
+  void showMeshMenus(bool show);
+  
+protected slots:
+  void onWindowActivated( SUIT_ViewWindow* svw);
+  void onWindowClosed( SUIT_ViewWindow* svw);
+
+  virtual void                        onViewManagerAdded( SUIT_ViewManager* );
+  virtual void                        onViewManagerRemoved( SUIT_ViewManager* );
+//   void onTryClose(bool &isClosed, QxScene_ViewWindow* window);
+
+  void onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
+
+protected:
+//   virtual  CAM_DataModel* createDataModel();
+  bool createSComponent();
+//   virtual bool isSelectionCompatible();
+
+  void _showDialogBox( HEXABLOCK::GUI::HexaBaseDialog* diag );
+
+
+//   bool _selectFromTree;
+  HEXABLOCKGUI_Resource* _myresource;
+//   SUIT_ResourceMgr* _myresource;
+  static int _oldStudyId;
+  static HEXABLOCK_ORB::HEXABLOCK_Gen_var _hexaEngine;
+//   static SMESH::SMESH_Gen_var             _smeshEngine;
+  static GEOM::GEOM_Gen_var               _geomEngine;
+private slots:
+
+  void slot_modelChanged(const QModelIndex &topLeft, const QModelIndex  &bottomRight);
+
+  void treeContextMenu(const QPoint& aPosition);
+
+  void test_association();
+  void test();
+
+  void newDocument();
+  void loadDocument( const QString &path = QString() );
+  void saveDocument();
+
+  // new
+  void addVertex();
+  void addEdge();
+  void addQuad();
+  void addHexa();
+
+  void addVector();
+  void addCylinder();
+  void addPipe();
+//   void makeCartesian();
+//   void makeCylindrical();
+  void makeGrid();
+  void makeCylinder();
+  void makePipe();
+  void makeCylinders();
+  void makePipes();
+
+//   void makeRind();    // NEW HEXA3
+  void makeHemiSphere();  // NEW HEXA3
+
+  void removeHexa();
+  void prismQuad();
+  void joinQuad();
+//   void mergeVertices();
+//   void mergeEdges();
+  void merge();
+  void disconnectElts();
+  void cutEdge();
+//   void makeTranslation();
+  void makeTransformation();
+  void makeSymmetry();
+  void performTransformation();
+  void performSymmetry();
+
+  void replaceHexa();    // NEW HEXA3
+  void quadRevolution(); // NEW HEXA3
+
+
+  void assocVertex();
+  void assocEdge();
+  void assocQuad();
+
+  void addGroup();
+  void removeGroup (); //CS_TODO
+  void addLaw();
+  void removeLaw();
+  void setPropagation();
+  void computeMesh();
+
+  //Clears associations of a single element (VERTEX, EDGE, QUAD, ...)
+  void clearAssociations();
+
+  //Clears associations under a tree (VERTEX_TREE, EDGE_TREE, ...)
+  void clearAllAssociations();
+
+  void showAssociations();
+
+private:
+
+  QList<GEOMGUI_OCCSelector*>  myOCCSelectors;
+  QList<LightApp_VTKSelector*> myVTKSelectors;
+
+
+  QStringList getQuickDirList();
+  HEXABLOCK::GUI::DocumentGraphicView* newGraphicView();
+
+
+  // -------------------------------------------------------------------------------------------------
+  //          MainWindow presentation
+  // -------------------------------------------------------------------------------------------------
+  QDockWidget *_dwPattern;       // Hexablock model edition
+  QDockWidget *_dwAssociation;   // Hexablock association edition
+  QDockWidget *_dwGroups;        // Hexablock groups edition
+  QDockWidget *_dwMesh;          // Hexablock meshing edtion
+  QDockWidget *_dwObjectBrowser; // Salome study
+  QDockWidget *_dwInputPanel;    // user Input
+
+  // Dialog Box ( to keep persistent values )
+  HEXABLOCK::GUI::VertexDialog*                 _vertexDiag;
+  HEXABLOCK::GUI::EdgeDialog*                   _edgeDiag;
+  HEXABLOCK::GUI::QuadDialog*                   _quadDiag;
+  HEXABLOCK::GUI::HexaDialog*                   _hexaDiag;
+  HEXABLOCK::GUI::VectorDialog*                 _vectorDiag;
+  HEXABLOCK::GUI::CylinderDialog*               _cylinderDiag;
+  HEXABLOCK::GUI::PipeDialog*                   _pipeDiag;
+  HEXABLOCK::GUI::MakeGridDialog*               _makeGridDiag;
+  HEXABLOCK::GUI::MakeCylinderDialog*           _makeCylinderDiag;
+  HEXABLOCK::GUI::MakePipeDialog*               _makePipeDiag;
+  HEXABLOCK::GUI::MakeCylindersDialog*          _makeCylindersDiag;
+  HEXABLOCK::GUI::MakePipesDialog*              _makePipesDiag;
+  HEXABLOCK::GUI::RemoveHexaDialog*             _removeHexaDiag;
+  HEXABLOCK::GUI::PrismQuadDialog*              _prismQuadDiag;
+  HEXABLOCK::GUI::JoinQuadDialog*               _joinQuadDiag;
+  HEXABLOCK::GUI::MergeDialog*                  _mergeDiag;
+  HEXABLOCK::GUI::DisconnectDialog*             _disconnectDiag;
+  HEXABLOCK::GUI::CutEdgeDialog*                _cutEdgeDiag;
+  HEXABLOCK::GUI::MakeTransformationDialog*     _makeTransformationDiag;
+  HEXABLOCK::GUI::MakeSymmetryDialog*           _makeSymmetryDiag;
+  HEXABLOCK::GUI::PerformTransformationDialog*  _performTransformationDiag;
+  HEXABLOCK::GUI::PerformSymmetryDialog*        _performSymmetryDiag;
+  HEXABLOCK::GUI::VertexAssocDialog*            _vertexAssocDiag;
+  HEXABLOCK::GUI::EdgeAssocDialog*              _edgeAssocDiag;
+  HEXABLOCK::GUI::QuadAssocDialog*              _quadAssocDiag;
+  HEXABLOCK::GUI::GroupDialog*                  _groupDiag;
+  HEXABLOCK::GUI::LawDialog*                    _lawDiag;
+  HEXABLOCK::GUI::PropagationDialog*            _propagationDiag;
+  HEXABLOCK::GUI::ComputeMeshDialog*            _computeMeshDiag;
+  HEXABLOCK::GUI::ReplaceHexaDialog*            _replaceHexaDiag;
+  HEXABLOCK::GUI::QuadRevolutionDialog*         _quadRevolutionDiag;
+  HEXABLOCK::GUI::MakeHemiSphereDialog*         _makeHemiSphereDiag;
+
+
+  // Actions
+  int _menuId;
+  // Object Browser
+  QAction *_newAct;
+  QAction *_importAct;
+  QAction *_saveAct;
+  QAction *_testAct;
+
+  // Pattern Data
+  QAction *_addVertex;
+  QAction *_addEdge;
+  QAction *_addQuad;
+  QAction *_addHexa;
+
+  // Pattern Builder
+  QAction *_addVector;
+  QAction *_addCylinder;
+  QAction *_addPipe;
+  QAction *_makeGrid; //Cartesian, Cylindrical, Spherical
+  QAction *_makeCylinder;
+  QAction *_makePipe;
+  QAction *_makeCylinders;
+  QAction *_makePipes;
+
+//   QAction *_makeRind;   // NEW HEXA3
+  QAction *_makeHemiSphere; // NEW HEXA3
+
+
+  // Pattern Data Edition
+  QAction *_removeHexa;
+  QAction *_prismQuad;
+  QAction *_joinQuad;
+  QAction *_merge;//   QAction *_mergeVertices; //   QAction *_mergeEdges;
+  QAction *_disconnect;
+  QAction *_cutEdge;
+  QAction *_makeTransformation; //   QAction *_makeTranslation;
+  QAction *_makeSymmetry;
+  QAction *_performTransformation;
+  QAction *_performSymmetry;
+
+  QAction *_replaceHexa;    // NEW HEXA3
+  QAction *_quadRevolution; // NEW HEXA3
+
+  // Pattern Data Association
+  QAction *_assocVertex;
+  QAction *_assocEdge;
+  QAction *_assocQuad;
+
+  // Group
+  QAction *_addGroup;
+  QAction *_removeGroup ; //CS_TODO
+
+  // Law
+  QAction *_addLaw;
+  QAction *_removeLaw;
+
+  // Propagation
+  QAction *_setPropagation;
+
+  // Meshing
+  QAction *_computeMesh;
+
+  // -------------------------------------------------------------------------------------------------
+  //          Model/View implementation  
+  // -------------------------------------------------------------------------------------------------
+
+  //      MODEL      MODEL      MODEL      MODEL      MODEL      MODEL      MODEL      MODEL      MODEL
+  HEXABLOCK::GUI::DocumentModel       *_currentModel;//  a model for each document : 1..n  ( multiple document allowed )
+  HEXABLOCK::GUI::PatternDataModel    *_patternDataModel;     // sub-part of DocumentModel
+  HEXABLOCK::GUI::PatternBuilderModel *_patternBuilderModel;  // sub-part of DocumentModel
+  HEXABLOCK::GUI::AssociationsModel   *_associationsModel;    // sub-part of DocumentModel
+  HEXABLOCK::GUI::GroupsModel         *_groupsModel;    // sub-part of DocumentModel
+  HEXABLOCK::GUI::MeshModel           *_meshModel;      // sub-part of DocumentModel
+
+  //      VIEW      VIEW      VIEW      VIEW      VIEW      VIEW      VIEW      VIEW      VIEW      VIEW
+  QTreeView                           *_patternDataTreeView;    //  document's pattern : 1 ( only one view )
+  QTreeView                           *_patternBuilderTreeView; //  document's pattern : 1 ( only one view )
+  QTreeView                           *_associationTreeView;    //  document's association : 1 ( only one view )
+  QTreeView                           *_groupsTreeView; //  document's groups
+  QTreeView                           *_meshTreeView;   //  document's mesh property: 1 ( only one view )
+  HEXABLOCK::GUI::DocumentGraphicView *_currentGraphicView;// graphical view (SVTK view) of the document : 1..n ( multiple view )
+
+  //      DELEGATE      DELEGATE      DELEGATE      DELEGATE      DELEGATE      DELEGATE      DELEGATE
+  HEXABLOCK::GUI::DocumentDelegate    *_treeViewDelegate;  // specific editor for each item of the tree 
+
+  //    SELECTION_MODEL      SELECTION_MODEL      SELECTION_MODEL      SELECTION_MODEL     SELECTION_MODEL
+  HEXABLOCK::GUI::PatternDataSelectionModel    *_patternDataSelectionModel;   // 1..n   selection
+  HEXABLOCK::GUI::PatternBuilderSelectionModel *_patternBuilderSelectionModel;// 1..n   selection
+  HEXABLOCK::GUI::GroupsSelectionModel         *_groupsSelectionModel;
+  HEXABLOCK::GUI::MeshSelectionModel           *_meshSelectionModel;
+
+  //  SALOME   SALOME    SALOME     SALOME     SALOME     SALOME     SALOME     SALOME     SALOME     SALOME
+  SUIT_ViewManager *_suitVM;
+  std::map<QString, SUIT_ViewWindow*>  _salomeViewWindows; //  key = entry
+
+  // SALOME/QT    SALOME/QT  SALOME/QT    SALOME/QT   SALOME/QT    SALOME/QT  
+  std::map<SUIT_ViewWindow*, HEXABLOCK::GUI::DocumentModel*>       _documentModels;
+  std::map<SUIT_ViewWindow*, HEXABLOCK::GUI::DocumentGraphicView*> _documentView;
+
+//   static std::map<HEXABLOCK::GUI::DocumentModel*,  SUIT_ViewWindow*> _salomeViews;
+
+//   int _documentCnt;
+  bool _isSaved;
+
+
+  void testDocument();
+  void test_make_cart_grid();
+  void test_make_elmts_transform();
+  
+
+};
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx
new file mode 100755 (executable)
index 0000000..dcd4f11
--- /dev/null
@@ -0,0 +1,475 @@
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include <iostream>
+#include <QtGui>
+
+
+#include "utilities.h"
+
+
+#include "HEXABLOCKGUI_DocumentDelegate.hxx"
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+#include "HEXABLOCKGUI_DocumentPanel.hxx"
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+
+DocumentDelegate::DocumentDelegate(QDockWidget *dw, QObject *parent)
+    : QItemDelegate(parent),
+      _dw(dw),
+      _documentModel(0),
+      _patternDataSelectionModel(0),
+      _patternBuilderSelectionModel(0),
+      _groupsSelectionModel(0),
+      _meshSelectionModel(0)
+{
+//   connect( this, SIGNAL( closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint) ),
+//            this, SLOT( onCloseEditor(QWidget *, QAbstractItemDelegate::EndEditHint) ) );
+//   connect( this, SIGNAL( commitData ( QWidget * ) ),
+//            this, SLOT( onCommitData ( QWidget * ) ) );
+}
+
+
+// void DocumentDelegate::commitEditor()
+// {
+//   MESSAGE("DocumentDelegate::commitEditor(){")
+//   MESSAGE("*  sender is: " << sender() );
+//   QWidget* editor = qobject_cast<QWidget*>(sender());
+//   emit commitData(editor);
+// //   emit closeEditor(editor);
+//   MESSAGE("}");
+// }
+
+QWidget *DocumentDelegate::createEditor( QWidget                    *parent,
+                                         const QStyleOptionViewItem &option,
+                                         const QModelIndex          &index ) const
+{
+  MESSAGE("DocumentDelegate::createEditor(){");
+  MESSAGE("*  parent is: " << parent);
+  MESSAGE("*  _dw    is: " << _dw);
+  MESSAGE("*  item   is: " << index.data(Qt::DisplayRole).toString().toStdString());
+
+  HexaBaseDialog *editor = 0;
+
+  switch ( index.data(HEXA_TREE_ROLE).toInt() ){
+    case VERTEX_TREE :   editor = new VertexDialog(parent, HexaBaseDialog::UPDATE_MODE);   break;
+    case EDGE_TREE :     editor = new EdgeDialog(parent, /*HexaBaseDialog::NEW_MODE*/HexaBaseDialog::INFO_MODE);     break;
+    case QUAD_TREE :     editor = new QuadDialog(parent, HexaBaseDialog::INFO_MODE);     break;
+    case HEXA_TREE :     editor = new HexaDialog(parent, HexaBaseDialog::INFO_MODE);     break;
+    case VECTOR_TREE :   editor = new VectorDialog(parent, HexaBaseDialog::INFO_MODE);   break;
+    case CYLINDER_TREE : editor = new CylinderDialog(parent, HexaBaseDialog::INFO_MODE);   break;
+    case PIPE_TREE :     editor = new PipeDialog(parent, HexaBaseDialog::INFO_MODE);       break;
+  //   case ELEMENTS_TREE :  break;
+  //   case CROSSELEMENTS_TREE : break;
+    case GROUP_TREE       : editor = new GroupDialog(parent, HexaBaseDialog::INFO_MODE/*UPDATE_MODE*/); break;
+    case LAW_TREE         : editor = new LawDialog(parent, HexaBaseDialog::UPDATE_MODE); break;
+    case PROPAGATION_TREE : editor = new PropagationDialog(parent, HexaBaseDialog::INFO_MODE); break;
+  }
+  if ( editor ){
+    if ( _documentModel )                editor->setDocumentModel( _documentModel );
+    if ( _patternDataSelectionModel )    editor->setPatternDataSelectionModel( _patternDataSelectionModel );
+    if ( _patternBuilderSelectionModel ) editor->setPatternBuilderSelectionModel( _patternBuilderSelectionModel);
+    if ( _groupsSelectionModel )         editor->setGroupsSelectionModel( _groupsSelectionModel );
+    if ( _meshSelectionModel )           editor->setMeshSelectionModel( _meshSelectionModel);
+
+//     QWidget* w = _dw->widget();
+//     if (w) w->close();
+    if ( !_dw->isVisible() ) _dw->setVisible(true);
+    _dw->setWidget( editor );
+    _dw->setWindowTitle( editor->windowTitle() );
+//         connect ( editor, SIGNAL( editingFinished() ), this, SLOT ( commitEditor() ) );
+//         editor->exec();
+//     editor->show();
+//     editor->raise();
+//     editor->setFocus();
+  }
+
+  MESSAGE("}");
+  return editor;
+//   return new QLineEdit(parent);
+}
+
+
+void DocumentDelegate::setEditorData( QWidget *editor,
+                                      const QModelIndex &index) const
+{
+  MESSAGE("DocumentDelegate::setEditorData(){");
+  MESSAGE("*  item   is: " << index.data(Qt::DisplayRole).toString().toStdString());
+
+//   HexaBaseDialog* editor = dynamic_cast<HexaBaseDialog*>( editor );
+
+  switch ( index.data(HEXA_TREE_ROLE).toInt() ){
+    case VERTEX_TREE : {
+      HEXA_NS::Vertex *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Vertex* >();
+      VertexDialog *vertexEditor = static_cast<VertexDialog*>(editor);
+      vertexEditor->setValue(value);
+    }
+    break;
+    case EDGE_TREE : {
+      HEXA_NS::Edge *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Edge* >();
+      EdgeDialog *edgeEditor = static_cast<EdgeDialog*>(editor);
+      edgeEditor->setValue(value);
+    }
+    break;
+    case QUAD_TREE : {
+      HEXA_NS::Quad *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Quad* >();
+      QuadDialog *quadEditor = static_cast<QuadDialog*>(editor);
+      quadEditor->setValue(value);
+    }
+    break;
+    case HEXA_TREE : {
+      HEXA_NS::Hexa *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Hexa* >();
+      HexaDialog *hexaEditor = static_cast<HexaDialog*>(editor);
+      hexaEditor->setValue(value);
+    }
+    break;
+    case VECTOR_TREE : {
+      HEXA_NS::Vector *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Vector* >();
+      VectorDialog *vectorEditor = static_cast<VectorDialog*>(editor);
+      vectorEditor->setValue(value);
+    }
+    break;
+    case CYLINDER_TREE : {
+      HEXA_NS::Cylinder *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Cylinder* >();
+      CylinderDialog *cylinderEditor = static_cast<CylinderDialog*>(editor);
+      cylinderEditor->setValue(value);
+    }
+    break;
+    case PIPE_TREE : {
+      HEXA_NS::Pipe *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Pipe* >();
+      PipeDialog *pipeEditor= static_cast<PipeDialog*>(editor);
+      pipeEditor->setValue(value);
+    }
+    break;
+//         case ELEMENTSITEM : editor = new ElementsDialog(parent);   break;
+//         case CROSSELEMENTSITEM : editor = new CrossElementsDialog(parent);   break;
+    case GROUP_TREE :{
+      HEXA_NS::Group *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Group* >();
+      GroupDialog *groupEditor = static_cast<GroupDialog*>(editor);
+      groupEditor->setValue(value);
+    }
+    break;
+    case LAW_TREE : {
+      HEXA_NS::Law *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Law* >();
+      LawDialog *lawEditor = static_cast<LawDialog*>(editor);
+      lawEditor->setValue(value);
+    }
+    break;
+    case PROPAGATION_TREE : {
+      HEXA_NS::Propagation *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Propagation* >();
+      PropagationDialog *propagationEditor = static_cast<PropagationDialog*>(editor);
+      propagationEditor->setValue(value);
+    }
+    break;
+  }
+
+//   editor->setFocus();
+//  editor->exec();
+  MESSAGE("}");
+}
+
+// void DocumentDelegate::setModelData( QWidget *editor, QAbstractItemModel *model,
+//                                      const QModelIndex &index) const
+// {
+//     cout << "//////////////////// CS_BP DocumentDelegate::setModelData BEGIN "<< editor << endl;
+// // //     QStandardItem  *item = 0;
+// // //     QItemDelegate::setModelData( editor, model,index);
+// // 
+// // //     // CS_TODO : simplification?
+// //     QSortFilterProxyModel *pmodel = dynamic_cast<QSortFilterProxyModel *>( model );
+// //     if ( pmodel ){
+// //       QStandardItemModel *smodel = dynamic_cast<QStandardItemModel *>( pmodel->sourceModel() );
+// //       if ( smodel ){
+// // //         item = smodel->itemFromIndex(index);
+// //         QItemDelegate::setModelData( editor, smodel, pmodel->mapToSource(index));
+// //       }
+// //     } else {
+// //       QStandardItemModel *smodel = dynamic_cast<QStandardItemModel *>( model );
+// //       if ( smodel ){
+// // //         item = smodel->itemFromIndex(index);
+// //         QItemDelegate::setModelData( editor, model,index);
+// //       }
+// //     }
+// //   QItemDelegate::setModelData( editor, model, index);
+//   cout << "//////////////////// CS_BP DocumentDelegate::setModelData END"<< editor << endl;    
+// 
+// }
+
+
+void DocumentDelegate::setModelData( QWidget *editor, 
+                                     QAbstractItemModel *model,
+                                     const QModelIndex &index) const
+{
+//   cout <<" XXXXXXXXXXXXXX setModelData editor => " << editor << endl;
+  MESSAGE("DocumentDelegate::setModelData(){");
+  MESSAGE("*  item   is: " << index.data(Qt::DisplayRole).toString().toStdString());
+//   HexaDialog *hexaEditor = qobject_cast<HexaDialog*>(editor);
+// //   PipeDialog *qtcast = qobject_cast<PipeDialog*>(editor);
+// //   PipeDialog *cppcast = dynamic_cast<PipeDialog*>(editor);
+// 
+//   if  ( hexaEditor ){
+//     HEXA_NS::Hexa *value  = hexaEditor->getValue();
+//     cout << "XXXXXXXXXXX DocumentDelegate::setModelData value  "<< value  << endl;
+//     model->setData( index, QVariant::fromValue( value ), HEXA_DATA_ROLE );
+//     model->setData( index, value->getName(), Qt::DisplayRole/*Qt::EditRole*/ );
+//     model->setData( index, QString::number( reinterpret_cast<intptr_t>(value) ), HEXA_ENTRY_ROLE ); 
+//   }
+//   editor->show();
+//   editor->raise();
+  
+//   cout << "AAAAAAA _dw"<< _dw<< endl;
+//   cout << "AAAAAAA _dw->widget()"<< _dw->widget() << endl;
+//   cout << "AAAAAAA isVisible"<< _dw->isVisible() << endl;
+//   cout << "AAAAAAA editor isVisible"<< editor->isVisible() << endl;
+// //   editor = new HexaDialog();
+//   _dw->setWindowTitle( "HOOOOOOOOOO" );
+//   _dw->setWidget(editor);
+//   _dw->setVisible(false);
+// //   editor->raise();
+//   _dw->raise();
+//   _dw->setVisible(true);
+//   cout << "BBBBBBB _dw"<< _dw<< endl;
+//   cout << "BBBBBBB _dw->widget()"<< _dw->widget() << endl;
+//   cout << "BBBBBBB isVisible"<< _dw->isVisible() << endl;
+//   cout << "BBBBBBB editor isVisible"<< editor->isVisible() << endl;
+  
+//               HEXA_NS::Quad *value   = quadEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+  MESSAGE("}");
+}
+
+
+
+
+
+void DocumentDelegate::updateEditorGeometry(  QWidget *editor,
+                                              const QStyleOptionViewItem &option,
+                                              const QModelIndex &index ) const
+{
+
+  MESSAGE("DocumentDelegate::updateEditorGeometry(){");
+  MESSAGE("*  item   is: " << index.data(Qt::DisplayRole).toString().toStdString());
+//   cout << "CS_BP option.rect.size()"<<option.rect.size()<<endl;
+  MESSAGE("*  option.rect.width() is: " << option.rect.width() << option.rect.width() );
+  MESSAGE("*  option.rect.x()     is: " << option.rect.x() << option.rect.x() );
+  MESSAGE("*  option.rect.y()     is: " << option.rect.y() << option.rect.y() );
+//   editor->setGeometry(option.rect);
+  editor->show();
+//   editor->raise();
+  MESSAGE("}");
+}
+
+
+
+
+
+void DocumentDelegate::setDocumentModel( DocumentModel* m )
+{
+  _documentModel = m;
+}
+
+void DocumentDelegate::setPatternDataSelectionModel( PatternDataSelectionModel* s )
+{
+  _patternDataSelectionModel = s;
+}
+
+void DocumentDelegate::setPatternBuilderSelectionModel( PatternBuilderSelectionModel* s )
+{
+  _patternBuilderSelectionModel = s;
+}
+
+void DocumentDelegate::setGroupsSelectionModel( GroupsSelectionModel* s )
+{
+  _groupsSelectionModel = s ;
+}
+
+void DocumentDelegate::setMeshSelectionModel( MeshSelectionModel* s )
+{
+  _meshSelectionModel = s;
+}
+
+
+
+bool DocumentDelegate::editorEvent ( QEvent                     *event,
+                                     QAbstractItemModel         *model,
+                                     const QStyleOptionViewItem &option,
+                                     const QModelIndex          &index )
+{
+  MESSAGE("DocumentDelegate::editorEvent(){");
+  MESSAGE("*  item   is: " << index.data().toString().toStdString());
+  MESSAGE("*  event  is: " << event->type() );
+
+  Qt::ItemFlags flags = model->flags(index);
+  if ( flags == Qt::ItemFlags( ~Qt::ItemIsEditable ) ){
+    MESSAGE("*  you can select it ");
+  } else {
+    MESSAGE("*  you cannot select it ");
+  }
+
+
+  
+//   bool r;
+//   if ( event->type() == 3 ){
+//     r = true;
+//   } else {
+//     r = QItemDelegate::editorEvent ( event, model, option, index );
+//   }
+//   MESSAGE("*  result  is: " << r );
+//   MESSAGE("}");
+//   return r;
+
+  return QItemDelegate::editorEvent ( event, model, option, index );
+}
+
+// void DocumentDelegate::onCloseEditor( QWidget *w, QAbstractItemDelegate::EndEditHint h)
+// {
+//   MESSAGE("DocumentDelegate::onCloseEditor(){");
+//   MESSAGE("}");
+// }
+// 
+// 
+// void DocumentDelegate::onCommitData ( QWidget * editor )
+// {
+//   MESSAGE("DocumentDelegate::onCommitData(){");
+//   MESSAGE("}");
+// }
+
+
+// connect( this, SIGNAL( commitData ( QWidget * ) ),
+//          this, SLOT( onCommitData ( QWidget * ) ) );
+
+
+// // virtual bool     eventFilter ( QObject * editor, QEvent * event )
+// // {
+// // //   std::cout << "eventFilter  eventFilter " << event->type() << std::endl;
+// // //   std::cout << std::endl;
+// // 
+// //  if (event->type() == QEvent::FocusOut) {
+// // //              QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+// // //              qDebug() << "Ate key press" << keyEvent->key();
+// // //              return true;
+// // return false;
+// //          } else {
+// //               return QItemDelegate::eventFilter ( editor, event );
+// // //              return false;
+// //          }
+
+
+
+// void DocumentDelegate::setModelData( QWidget *editor, QAbstractItemModel *model,
+//                                      const QModelIndex &index) const
+// {
+//     cout << "*********************** CS_BP DocumentDelegate::setModelData BEGIN "<< editor << endl;
+//     QStandardItem  *item = 0;
+// 
+//     // CS_TODO : simplification?
+//     QSortFilterProxyModel *pmodel = dynamic_cast<QSortFilterProxyModel *>( model );
+//     if ( pmodel ){
+//       QStandardItemModel *smodel = dynamic_cast<QStandardItemModel *>( pmodel->sourceModel() );
+//       if ( smodel ){
+//         item = smodel->itemFromIndex(pmodel->mapToSource(index));
+//       }
+//     } else {
+//       QStandardItemModel *smodel = dynamic_cast<QStandardItemModel *>( model );
+//       if ( smodel ){
+//         item = smodel->itemFromIndex(index);
+//       }
+//     }
+// 
+// 
+//     if ( item ){
+// //       cout << "item " << item->type() << endl;
+//       if ( item->data().isValid() )
+//         cout << "***************   item " << item->data(Qt::DisplayRole).toString().toStdString() << endl;
+//       switch ( item->type() ){
+//         case VERTEXITEM : {
+//               VertexDialog *vertexEditor = static_cast<VertexDialog*>(editor);
+//               HEXA_NS::Vertex *value     = vertexEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//             break;
+// 
+//         case EDGEITEM : {
+//               EdgeDialog *edgeEditor = static_cast<EdgeDialog*>(editor);
+//               HEXA_NS::Edge *value   = edgeEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//             break;
+// 
+//         case QUADITEM : {
+//               QuadDialog *quadEditor = static_cast<QuadDialog*>(editor);
+//               HEXA_NS::Quad *value   = quadEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//             break;
+// 
+//         case HEXAITEM : {
+//               HexaDialog *hexaEditor = static_cast<HexaDialog*>(editor);
+//               HEXA_NS::Hexa *value   = hexaEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//             break;
+// 
+//         case VECTORITEM : {
+//               VectorDialog *vectorEditor = static_cast<VectorDialog*>(editor);
+//               HEXA_NS::Vector *value   = vectorEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//             break;
+// 
+//         case CYLINDERITEM : {
+//               CylinderDialog *cylinderEditor = static_cast<CylinderDialog*>(editor);
+//               HEXA_NS::Cylinder *value   = cylinderEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//         break;
+//         case PIPEITEM : {
+//               PipeDialog *pipeEditor = static_cast<PipeDialog*>(editor);
+//               HEXA_NS::Pipe *value   = pipeEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//             }
+//         break;
+// //         case ELEMENTSITEM : editor = new ElementsDialog(parent);   break;
+// //         case CROSSELEMENTSITEM : editor = new CrossElementsDialog(parent);   break;
+//         case GROUPITEM :{
+//               GroupDialog *groupEditor = static_cast<GroupDialog*>(editor);
+//               HEXA_NS::Group *value = groupEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//         }
+//         break;
+//         case LAWITEM : {
+//               LawDialog *lawEditor = static_cast<LawDialog*>(editor);
+//               HEXA_NS::Law *value = lawEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//         }
+//         break;
+//         case PROPAGATIONITEM : {
+//               PropagationDialog *propagationEditor = static_cast<PropagationDialog*>(editor);
+//               HEXA_NS::Propagation *value = propagationEditor->getValue();
+//               model->setData(index, QVariant::fromValue( value ), HEXA_DATA_ROLE);
+//         }
+//         break;
+// 
+//       }
+//     }
+//   editor->show();
+//   cout << "*********************** CS_BP DocumentDelegate::setModelData END "<< editor << endl;
+// }
\ No newline at end of file
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx
new file mode 100755 (executable)
index 0000000..f8e713c
--- /dev/null
@@ -0,0 +1,99 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HEXABLOCKGUI_DOCUMENTDELEGATE_HXX_
+#define __HEXABLOCKGUI_DOCUMENTDELEGATE_HXX_
+
+
+// QEvent * event, QAbstractItemModel 
+
+#include <QEvent>
+#include <QItemDelegate>
+#include <QModelIndex>
+#include <QObject>
+#include <QSize>
+#include <QSpinBox>
+
+#include <QDockWidget>
+
+
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+      class DocumentDelegate : public QItemDelegate
+      {
+          Q_OBJECT
+      
+      public:
+          DocumentDelegate( QDockWidget *dw, QObject *parent = 0);
+
+          QWidget *createEditor( QWidget *parent,
+                                 const QStyleOptionViewItem &option,
+                                 const QModelIndex &index) const;
+
+          void setEditorData( QWidget *editor, const QModelIndex &index) const;
+
+          void setModelData( QWidget            *editor,
+                             QAbstractItemModel *model,
+                             const QModelIndex  &index ) const;
+
+          void updateEditorGeometry( QWidget *editor,
+                                     const QStyleOptionViewItem &option,
+                                     const QModelIndex &index ) const;
+
+         // can be used by editor
+          void setDocumentModel( DocumentModel* m );
+
+          //  selection
+          void setPatternDataSelectionModel( PatternDataSelectionModel* s );
+          void setPatternBuilderSelectionModel( PatternBuilderSelectionModel* s );
+          void setGroupsSelectionModel( /*QItemSelectionModel**/ GroupsSelectionModel* s );
+          void setMeshSelectionModel( MeshSelectionModel* s );
+
+          virtual bool editorEvent ( QEvent * event, 
+                                     QAbstractItemModel * model, 
+                                     const QStyleOptionViewItem & option, 
+                                     const QModelIndex & index );
+
+      public slots:
+//           void onCloseEditor( QWidget *, QAbstractItemDelegate::EndEditHint);
+//           void onCommitData ( QWidget * editor );
+
+      private:
+          QDockWidget *_dw; // editor's container 
+
+          // can be used by editor
+          DocumentModel*                _documentModel;
+
+          PatternDataSelectionModel*    _patternDataSelectionModel;
+          PatternBuilderSelectionModel* _patternBuilderSelectionModel;
+          GroupsSelectionModel*         _groupsSelectionModel; 
+          MeshSelectionModel*           _meshSelectionModel;
+
+      private slots:
+          void commitEditor();
+
+      };
+  }
+}
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.cxx
new file mode 100755 (executable)
index 0000000..3486e03
--- /dev/null
@@ -0,0 +1,945 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//#define _DEVDEBUG_
+
+#include <sstream>
+
+#include <iostream>
+
+#include <math.h>
+
+#include "utilities.h"
+
+#include <QtGui>
+
+
+#include <LightApp_Application.h>
+
+#include <SUIT_ViewManager.h>
+#include <SUIT_ViewWindow.h>
+#include <SVTK_ViewManager.h>
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SVTK_Prs.h>
+#include <SALOME_Actor.h>
+#include <VTKViewer_Algorithm.h>
+#include <SalomeApp_Study.h>
+
+// VTK includes
+#include <vtkRenderer.h>
+#include <vtkActorCollection.h>
+#include <vtkUnstructuredGrid.h>
+
+// test tutorial (sphere)
+#include <vtkPolyDataMapper.h>
+#include <vtkSphereSource.h>
+
+// test point (cf. SMESHGUI)
+#include <vtkIdList.h>
+#include <vtkCellArray.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkUnstructuredGrid.h>
+#include <vtkDataSetMapper.h>
+#include <vtkProperty.h>
+#include <vtkLineSource.h>
+
+#include <vtkLine.h>
+#include <vtkQuad.h>
+#include <vtkHexahedron.h>
+
+#include "vtkLookupTable.h"
+#include "vtkPoints.h"
+#include "vtkCellArray.h"
+#include "vtkFloatArray.h"
+#include "vtkPolyData.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkActor.h"
+#include "vtkPointData.h"
+#include "vtkProperty.h"
+
+
+// #include "vtkStructuredGridReader.h"
+#include "vtkUnstructuredGridReader.h"
+
+
+#include <VTKViewer_CellLocationsArray.h>
+
+
+
+
+
+#ifndef M_PI
+#define M_PI 3.1415927
+#endif
+
+#include "HEXABLOCKGUI_Trace.hxx"
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentGraphicView.hxx"
+
+
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+
+Document_Actor::Document_Actor( HEXA_NS::Document* doc, const QString& entry ):
+  SALOME_Actor(),
+  _doc( doc )
+{
+  DEBTRACE("Document_Actor::Document_Actor " << entry.toLatin1() );
+  Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject( entry.toLatin1(), "HEXABLOCK" );//,theName); CS_TODO
+  setIO(anIO);
+  vtkUnstructuredGrid* aGrid = getUnstructuredGrid();
+//   std::cout << "Document_Actor aGrid->GetNumberOfCells() =>"<< aGrid->GetNumberOfCells();
+  vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
+  aMapper->SetInput(aGrid);
+  aGrid->Delete();
+
+  SetVisibility( true );//VisibilityOff();
+  SetPickable( true ); //PickableOff();//
+  SetMapper( aMapper );
+  aMapper->Delete();
+
+  vtkProperty* aProp = vtkProperty::New();
+
+//   aProp->SetRepresentationToSurface();
+  aProp->SetRepresentationToWireframe();
+//   aProp->SetRepresentationToPoints();
+  aProp->EdgeVisibilityOn ();
+  aProp->SetPointSize(5);
+  SetProperty( aProp );
+  aProp->Delete();
+//   SetPointRepresentation(true);
+
+}
+
+Document_Actor::~Document_Actor()
+{
+
+}
+
+
+vtkUnstructuredGrid* Document_Actor::getUnstructuredGrid()
+{
+  vtkUnstructuredGrid* theGrid = vtkUnstructuredGrid::New();
+
+  _doc->reorderFaces(); //CS_TEST
+
+  std::map<int,vtkIdType>   vtkNodeId;
+  std::map<vtkIdType, int>  hexaNodeId;
+
+  // Create points
+  vtkPoints* aPoints = vtkPoints::New();
+  int nbVertex = _doc->countVertex();
+  aPoints->SetNumberOfPoints( nbVertex );
+
+  HEXA_NS::Vertex* v = NULL;
+  int vertexId;
+  for ( int i=0; i <nbVertex; ++i ){
+    v = _doc->getVertex(i);
+    aPoints->SetPoint( i, v->getX(), v->getY(), v->getZ() );
+    vertexId = reinterpret_cast<intptr_t>(v); //v->getId();
+    vtkNodeId [ vertexId ] = i;
+    hexaNodeId[ i ] = vertexId ;
+//     vtkNodeId [ vertexId ] = i+1;
+//     hexaNodeId[ i+1 ] = vertexId ;
+  }
+
+  theGrid->SetPoints( aPoints );
+  aPoints->Delete();
+//   theGrid->SetCells( 0, 0, 0, 0, 0 );
+
+
+  // Calculate cells size
+  int nb0DElement = _doc->countVertex();
+  int nbEdge      = _doc->countEdge();
+  int nbFace      = _doc->countQuad();
+  int nbVolume    = _doc->countHexa();
+
+  vtkIdType aCellsSize =  2*nb0DElement + 3*nbEdge + ( 4 + 1 )*nbFace + ( 8 + 1 )*nbVolume;
+  vtkIdType aNbCells   =  nb0DElement + nbEdge + nbFace + nbVolume;
+
+  // Create cells
+  vtkCellArray* aConnectivity = vtkCellArray::New();
+  aConnectivity->Allocate( aCellsSize, 0 );
+
+  vtkUnsignedCharArray* aCellTypesArray = vtkUnsignedCharArray::New();
+  aCellTypesArray->SetNumberOfComponents( 1 );
+  aCellTypesArray->Allocate( aNbCells * aCellTypesArray->GetNumberOfComponents() );
+
+  vtkIdList *anIdList = vtkIdList::New();
+  vtkIdType iVtkElem = 0;
+//   vtkIdType iVtkElem = 1; //CS_TEST
+  int       iHexaElem;
+
+  // VERTEX
+  for ( int i=0; i<nb0DElement; ++i ){
+    anIdList->SetNumberOfIds( 1 );
+    v = _doc->getVertex(i);
+    iHexaElem = reinterpret_cast<intptr_t>(v);//v->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+    anIdList->SetId(0, vtkNodeId[iHexaElem]);
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_VERTEX );//getCellType( aType, anElem->IsPoly(), aNbNodes ) );
+    ++iVtkElem;
+  }
+
+  // EDGE
+  HEXA_NS::Edge* e = NULL;
+  HEXA_NS::Vertex* vertexElem = NULL;
+  for ( int i=0; i<nbEdge; ++i ){
+    anIdList->SetNumberOfIds( 2 );
+    e = _doc->getEdge(i);
+    iHexaElem = reinterpret_cast<intptr_t>(e); //e->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+
+    for( vtkIdType j = 0; j< 2; ++j ){ //j< e->countVertex(); ++j ){
+      vertexElem = e->getVertex( j );
+      anIdList->SetId( j, vtkNodeId[ reinterpret_cast<intptr_t>(vertexElem) ] );//vertexElem->getId() ]);
+    }
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_LINE );//getCellType( aType, anElem->IsPoly(), aNbNodes ) );
+    ++iVtkElem;
+  }
+
+  // QUAD
+  HEXA_NS::Quad* q = NULL;
+  HEXA_NS::Quad* quadElem = NULL;
+  for ( int i=0; i<nbFace; ++i ){
+    anIdList->SetNumberOfIds( 4 );
+    q = _doc->getQuad(i);
+    iHexaElem = reinterpret_cast<intptr_t>(q); //q->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+
+    for( vtkIdType j = 0; j< 4; ++j ){
+      vertexElem = q->getVertex( j );
+      anIdList->SetId( j, vtkNodeId[ reinterpret_cast<intptr_t>(vertexElem) ] );//vertexElem->getId() ]);
+    }
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_QUAD );//getCellType( aType, anElem->IsPoly(), aNbNodes ) );
+    ++iVtkElem;
+  }
+
+  // HEXA
+  HEXA_NS::Hexa* h = NULL;
+  HEXA_NS::Hexa* hexaElem = NULL;
+  std::map<int, int> connectivity;
+  connectivity[0] = 0;
+  connectivity[1] = 1;
+  connectivity[2] = 3;
+  connectivity[3] = 2;
+  connectivity[4] = 4;
+  connectivity[5] = 5;
+  connectivity[6] = 7;
+  connectivity[7] = 6;
+  for ( int i=0; i<nbVolume; ++i ){
+    anIdList->SetNumberOfIds( 8 );
+    h = _doc->getHexa(i);
+    iHexaElem = reinterpret_cast<intptr_t>(h); //q->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+
+    for( vtkIdType j = 0; j< 8; ++j ){
+      vertexElem = h->getVertex( j );// );
+      anIdList->SetId( connectivity[j], vtkNodeId[ reinterpret_cast<intptr_t>(vertexElem) ]);//vertexElem->getId() ]);
+    }
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_HEXAHEDRON );
+    ++iVtkElem;
+  }
+
+
+// 0        1      2     3        4     5      6      7
+// V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, 
+// 
+// 0        1     3      2        4    5      7      6
+
+  // Insert cells in grid
+  VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+  aCellLocationsArray->SetNumberOfComponents( 1 );
+  aCellLocationsArray->SetNumberOfTuples( aNbCells );
+//   std::cout << "aNbCells =>" << aNbCells << std::endl;
+
+  aConnectivity->InitTraversal();
+  for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
+    aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) );
+  }
+  theGrid->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
+
+  aCellLocationsArray->Delete();
+  aCellTypesArray->Delete();
+  aConnectivity->Delete();
+  anIdList->Delete();
+  //std::cout << "theGrid->GetNumberOfCells()" << theGrid->GetNumberOfCells() << std::endl;
+
+  return theGrid;
+}
+
+// =============================================================== Abu : debut
+// ===================================================== Constructeur
+Associate_Actor::Associate_Actor( HEXA_NS::Document* doc, const QString& entry)
+               : SALOME_Actor(), _doc( doc )
+{
+  DEBTRACE("Associate_Actor::Associate_Actor " << entry.toLatin1() );
+  Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject( entry.toLatin1(), "HEXABLOCK" );//,theName); CS_TODO
+  setIO(anIO);
+  vtkUnstructuredGrid* aGrid = getUnstructuredGrid();
+
+  vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
+  aMapper->SetInput(aGrid);
+  aGrid->Delete();
+
+  SetVisibility( true );//VisibilityOff();
+  SetPickable( true ); //PickableOff();//
+  SetMapper( aMapper );
+  aMapper->Delete();
+
+  vtkProperty* aProp = vtkProperty::New();
+  aProp->SetColor(0,255,0);
+//   aProp->SetRepresentationToSurface();
+  aProp->SetRepresentationToWireframe();
+//   aProp->SetRepresentationToPoints();
+  aProp->EdgeVisibilityOn ();
+  aProp->SetPointSize(5);
+  SetProperty( aProp );
+  aProp->Delete();
+//   SetPointRepresentation(true);
+}
+// ===================================================== getUnstructuredGrid
+vtkUnstructuredGrid* Associate_Actor::getUnstructuredGrid()
+{
+  vtkUnstructuredGrid* theGrid = vtkUnstructuredGrid::New();
+
+  _doc->reorderFaces(); //CS_TEST
+
+  std::map<int,vtkIdType>   vtkNodeId;
+  std::map<vtkIdType, int>  hexaNodeId;
+  std::vector <HEXA_NS::Vertex*>  tab_vertex;
+  HEXA_NS::Edges    tab_edge; 
+
+  _doc->getAssoVertices (tab_vertex);
+  _doc->getAssoEdges    (tab_edge);
+
+  int nb0DElement = tab_vertex.size();
+  int nbEdge      = tab_edge.size();
+  int nbFace      = 0;
+  int nbVolume    = 0;
+
+  // Create points
+  vtkPoints* aPoints = vtkPoints::New();
+  int nbVertex = nb0DElement;
+  aPoints->SetNumberOfPoints( nbVertex );
+
+  HEXA_NS::Vertex* v = NULL;
+  int vertexId;
+  for ( int i=0; i <nbVertex; ++i ){
+    v = _doc->getVertex(i);
+    aPoints->SetPoint( i, v->getX(), v->getY(), v->getZ() );
+    vertexId = reinterpret_cast<intptr_t>(v); //v->getId();
+    vtkNodeId [ vertexId ] = i;
+    hexaNodeId[ i ] = vertexId ;
+//     vtkNodeId [ vertexId ] = i+1;
+//     hexaNodeId[ i+1 ] = vertexId ;
+  }
+
+  theGrid->SetPoints( aPoints );
+  aPoints->Delete();
+//   theGrid->SetCells( 0, 0, 0, 0, 0 );
+
+  // Calculate cells size
+
+  vtkIdType aCellsSize =  2*nb0DElement + 3*nbEdge + ( 4 + 1 )*nbFace + ( 8 + 1 )*nbVolume;
+  vtkIdType aNbCells   =  nb0DElement + nbEdge + nbFace + nbVolume;
+
+  // Create cells
+  vtkCellArray* aConnectivity = vtkCellArray::New();
+  aConnectivity->Allocate( aCellsSize, 0 );
+
+  vtkUnsignedCharArray* aCellTypesArray = vtkUnsignedCharArray::New();
+  aCellTypesArray->SetNumberOfComponents( 1 );
+  aCellTypesArray->Allocate( aNbCells * aCellTypesArray->GetNumberOfComponents() );
+
+  vtkIdList *anIdList = vtkIdList::New();
+  vtkIdType iVtkElem = 0;
+//   vtkIdType iVtkElem = 1; //CS_TEST
+  int       iHexaElem;
+
+  // VERTEX
+  for ( int i=0; i<nb0DElement; ++i ){
+    anIdList->SetNumberOfIds( 1 );
+ // v = _doc->getVertex(i);        // Abu 
+    v = tab_vertex [i];
+    iHexaElem = reinterpret_cast<intptr_t>(v);//v->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+    anIdList->SetId(0, vtkNodeId[iHexaElem]);
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_VERTEX );//getCellType( aType, anElem->IsPoly(), aNbNodes ) );
+    ++iVtkElem;
+  }
+
+  // EDGE
+  HEXA_NS::Edge* e = NULL;
+  HEXA_NS::Vertex* vertexElem = NULL;
+  for ( int i=0; i<nbEdge; ++i ){
+    anIdList->SetNumberOfIds( 2 );
+ // e = _doc->getEdge(i);        // Abu 
+    e = tab_edge [i];
+    iHexaElem = reinterpret_cast<intptr_t>(e); //e->getId();
+    vtkElemsId[iHexaElem] = iVtkElem;
+    hexaElemsId[iVtkElem] = iHexaElem;
+
+    for( vtkIdType j = 0; j< 2; ++j ){ //j< e->countVertex(); ++j ){
+      vertexElem = e->getVertex( j );
+      anIdList->SetId( j, vtkNodeId[ reinterpret_cast<intptr_t>(vertexElem) ] );//vertexElem->getId() ]);
+    }
+    aConnectivity->InsertNextCell( anIdList );
+    aCellTypesArray->InsertNextValue( VTK_LINE );//getCellType( aType, anElem->IsPoly(), aNbNodes ) );
+    ++iVtkElem;
+  }
+
+
+// 0        1      2     3        4     5      6      7
+// V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, 
+// 
+// 0        1     3      2        4    5      7      6
+
+  // Insert cells in grid
+  VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+  aCellLocationsArray->SetNumberOfComponents( 1 );
+  aCellLocationsArray->SetNumberOfTuples( aNbCells );
+//   std::cout << "aNbCells =>" << aNbCells << std::endl;
+
+  aConnectivity->InitTraversal();
+  for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
+    aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) );
+  }
+  theGrid->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
+
+  aCellLocationsArray->Delete();
+  aCellTypesArray->Delete();
+  aConnectivity->Delete();
+  anIdList->Delete();
+  //std::cout << "theGrid->GetNumberOfCells()" << theGrid->GetNumberOfCells() << std::endl;
+
+  return theGrid;
+}
+// =============================================================== Abu : Fin
+
+
+// DocumentGraphicView::DocumentGraphicView(SalomeApp_Application* app, SUIT_ViewWindow *suitView, QWidget *parent)
+DocumentGraphicView::DocumentGraphicView( LightApp_Application* app, SUIT_ViewWindow *suitView, QWidget *parent )
+    : QAbstractItemView(parent),
+      _suitView( suitView ),
+      _documentActor( 0 ),
+      _associateActor (NULL), // Abu
+      _currentChanged( false )
+{
+//   MESSAGE("DocumentGraphicView::DocumentGraphicView() app"<<app);
+//   MESSAGE("DocumentGraphicView::DocumentGraphicView() suitView"<<suitView);
+//   MESSAGE("DocumentGraphicView::DocumentGraphicView() parent"<<parent);
+// _suitView->getViewPort();
+// _suitView->viewport();
+// _suitView->installEventFilter(this);
+}
+
+DocumentGraphicView::~DocumentGraphicView()
+{  
+}
+
+void DocumentGraphicView::setWindowTitle(const QString& title)
+{
+  _suitView->setWindowTitle( QString("hexablock : ") + title );
+}
+
+void DocumentGraphicView::onPatternDatachanged()
+{
+  MESSAGE("DocumentGraphicView::onPatternDatachanged(){");
+  update();
+  MESSAGE("}");
+}
+
+
+void DocumentGraphicView::update()
+{
+  MESSAGE("DocumentGraphicView::update(){");
+
+  SVTK_ViewWindow*    theVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>(_suitView);
+//   PatternDataModel*   theModel         = dynamic_cast<PatternDataModel *>( model() );
+  DocumentModel*   theModel = dynamic_cast<DocumentModel*>( model() );
+  MESSAGE("model()"<<model());
+  MESSAGE("theModel"<<theModel);
+  if (!theModel) return;
+    
+  HEXA_NS::Document*  theDocumentImpl  = theModel->documentImpl();
+  QString             theDocumentEntry = theModel->documentEntry();
+
+  if ( _documentActor ){
+    theVTKViewWindow->RemoveActor( _documentActor );
+    _documentActor->Delete();
+  }
+  _documentActor  = new Document_Actor( theDocumentImpl, theDocumentEntry );
+  theVTKViewWindow->AddActor( _documentActor );
+                                 // -------------------- Abu debut 
+  if (HEXA_NS::special_option())
+     {
+     if (_associateActor != NULL)
+        {
+        theVTKViewWindow->RemoveActor( _associateActor );
+        _associateActor->Delete();
+        }
+     _associateActor = new Associate_Actor( theDocumentImpl, theDocumentEntry );
+     theVTKViewWindow->AddActor( _associateActor );
+     }
+                                 // -------------------- Abu fin
+
+  // display HEXABLOCK document model
+  theVTKViewWindow->getRenderer()->Render();
+  theVTKViewWindow->Repaint();
+  theVTKViewWindow->onFitAll();
+  // myVTKViewWindow->SetSelectionMode( ActorSelection );
+  // theVTKViewWindow->SetSelectionMode( NodeSelection );
+  // myVTKViewWindow->SetSelectionMode( FaceSelection );
+  MESSAGE("}");
+}
+
+
+/********************************************************************************
+*                   ABSTRACT METHOD ( MUST BE IMPLEMENTED )
+********************************************************************************/
+
+/*
+    Returns the item that covers the coordinate given in the view.
+*/
+
+QModelIndex DocumentGraphicView::indexAt(const QPoint &point) const
+{
+  MESSAGE("DocumentGraphicView::indexAt(){");
+  MESSAGE("}");
+  return QModelIndex();
+}
+
+void DocumentGraphicView::scrollTo(const QModelIndex &index, ScrollHint)
+{
+  MESSAGE("DocumentGraphicView::scrollTo(){");
+  MESSAGE("*  item   is: " << index.data().toString().toStdString());
+  MESSAGE("}");
+}
+
+/*
+    Returns the position of the item in viewport coordinates.
+*/
+QRect DocumentGraphicView::visualRect(const QModelIndex &index) const
+{
+    MESSAGE("DocumentGraphicView::visualRect(){");
+    MESSAGE("*  item   is: " << index.data().toString().toStdString());
+    MESSAGE("}");
+    return QRect();
+}
+
+// PROTECTED :
+int DocumentGraphicView::horizontalOffset() const
+{
+    MESSAGE("DocumentGraphicView::horizontalOffset(){");
+    MESSAGE("}");
+    return horizontalScrollBar()->value();
+}
+
+bool DocumentGraphicView::isIndexHidden(const QModelIndex &index) const
+{
+    MESSAGE("DocumentGraphicView::isIndexHidden(){");
+    MESSAGE("*  item   is: " << index.data().toString().toStdString());
+    MESSAGE("}");
+    return false;
+}
+
+QModelIndex DocumentGraphicView::moveCursor(QAbstractItemView::CursorAction cursorAction,
+                                            Qt::KeyboardModifiers /*modifiers*/)
+{
+    MESSAGE("DocumentGraphicView::moveCursor(){");
+    QModelIndex current = currentIndex();
+    MESSAGE("*  current  is: " << current.data(Qt::DisplayRole).toString().toStdString());
+    MESSAGE("}");
+    return current;
+}
+
+/*
+    Find the indices corresponding to the extent of the selection.
+*/
+void DocumentGraphicView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)
+{
+    MESSAGE("DocumentGraphicView::setSelection(){");
+    MESSAGE("}");
+}
+
+
+int DocumentGraphicView::verticalOffset() const
+{
+    MESSAGE("DocumentGraphicView::verticalOffset(){");
+    MESSAGE("}");
+    return verticalScrollBar()->value();
+}
+
+/*
+    Returns a region corresponding to the selection in viewport coordinates.
+*/
+QRegion DocumentGraphicView::visualRegionForSelection(const QItemSelection &selection) const
+{
+    MESSAGE("DocumentGraphicView::visualRegionForSelection(){");
+    MESSAGE("}");
+    return QRegion();
+}
+
+
+
+
+/********************************************************************************
+*                   PROTECTED SLOTS 
+********************************************************************************/
+void DocumentGraphicView::closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint )
+{ 
+  MESSAGE("DocumentGraphicView::closeEditor(){");
+  MESSAGE("*  hint is: " << hint);
+  MESSAGE("}");
+}
+
+void DocumentGraphicView::commitData ( QWidget * editor )
+{ 
+  MESSAGE("DocumentGraphicView::commitData(){");
+  MESSAGE("}");
+}
+
+void DocumentGraphicView::currentChanged( const QModelIndex & current, const QModelIndex & previous )
+{ 
+//   MESSAGE("DocumentGraphicView::currentChanged(){");
+//   MESSAGE("*  current  is: " << current.data().toString().toStdString());
+//   MESSAGE("*  previous is: " << previous.data().toString().toStdString());
+//   MESSAGE("}");
+//   openPersistentEditor( current );
+  _currentChanged = true;
+}
+
+void DocumentGraphicView::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight )
+{ 
+//   MESSAGE("DocumentGraphicView::dataChanged(){");
+//   MESSAGE("*  topLeft     is: " << topLeft.data().toString().toStdString());
+//   MESSAGE("*  bottomRight is: " << bottomRight.data().toString().toStdString());
+//   MESSAGE("}");
+  update();
+  _currentChanged = false;
+//   updateObject(topLeft);
+}
+
+void DocumentGraphicView::editorDestroyed ( QObject * editor )
+{ 
+  MESSAGE("DocumentGraphicView::editorDestroyed(){");
+  MESSAGE("}");
+}
+
+void DocumentGraphicView::rowsAboutToBeRemoved ( const QModelIndex & parent, int start, int end )
+{ 
+//   MESSAGE("DocumentGraphicView::rowsAboutToBeRemoved (){");
+//   MESSAGE("*  parent    is: " << parent.data(Qt::DisplayRole).toString().toStdString());
+//   MESSAGE("*  start     is: " << start);
+//   MESSAGE("*  end       is: " << end);
+//   MESSAGE("}");
+}
+
+void DocumentGraphicView::rowsInserted ( const QModelIndex & parent, int start, int end )
+{ 
+//   MESSAGE("DocumentGraphicView::rowsInserted(){");
+//   MESSAGE("*  parent    is: " << parent.data(Qt::DisplayRole).toString().toStdString());
+//   MESSAGE("*  start     is: " << start);
+//   MESSAGE("*  end       is: " << end);
+//   MESSAGE("}");
+}
+
+void DocumentGraphicView::selectionChanged( const QItemSelection & selected, const QItemSelection & deselected )
+{ 
+  MESSAGE("DocumentGraphicView::selectionChanged(){");
+  foreach( const QModelIndex& isel, selected.indexes() ){
+    MESSAGE("*  selected : " << isel.data().toString().toStdString());
+  }
+  foreach( const QModelIndex& iunsel, deselected.indexes() ){
+    MESSAGE("*  unselected : " << iunsel.data().toString().toStdString());
+  }
+  MESSAGE("}");
+}
+
+void DocumentGraphicView::updateGeometries ()
+{ 
+  MESSAGE("DocumentGraphicView::updateGeometries (){");
+  MESSAGE("}");
+}
+
+SUIT_ViewWindow* DocumentGraphicView::get_SUIT_ViewWindow()
+{
+  return _suitView;
+}
+
+// bool DocumentGraphicView::canBeDisplayed( const QString& entry, const QString& viewer_type ) const //CS_TODO
+// {
+//   bool result = false;
+// 
+//   result = (viewer_type==SVTK_Viewer::Type());
+// //   QStringList es = entry.split( "_" );22
+// //   bool result = ( es.count() == 3 && es[ 0 ] == "ATOMSOLVGUI" && viewer_type == SVTK_Viewer::Type() ); 
+// //   //  printf ( " canBeDisplayed : entry = %s, count = %d, res = %d \n", entry.latin1(), es.count(), result );
+//   std::cout << "canBeDisplayed => "<< result << std::endl;
+//   return result; // entry of an atom for sure
+// }
+
+// SALOME_Prs* HEXABLOCKGUI_Displayer::buildPresentation( const QString& entry, SALOME_View* theViewFrame)
+// {
+//     SALOME_Prs* prs = 0;
+// 
+//     SALOME_View* aViewFrame = theViewFrame ? theViewFrame : GetActiveView();
+// 
+//     if ( aViewFrame )
+//     {
+//         SVTK_Viewer* vtk_viewer = dynamic_cast<SVTK_Viewer*>( aViewFrame );
+//         if (vtk_viewer)
+//         {
+//             SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
+//             SALOME_Actor* anActor = myGraphicView->FindActorByEntry( wnd, entry.toLatin1().data() );
+//             if (!anActor)
+//             {
+// //                anActor = myGraphicView->CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
+//                 anActor = myGraphicView->CreateActor(entry.toLatin1().data());
+//             }
+//             if (anActor)
+//             {
+//                 // Display actor :
+//                 SVTK_ViewWindow* vtkWnd = dynamic_cast<SVTK_ViewWindow*> (wnd);
+//                 if (vtkWnd != NULL)
+//                 {
+//                     vtkWnd->AddActor(anActor);
+//                     vtkWnd->Repaint();
+//                     prs = LightApp_Displayer::buildPresentation(entry.toLatin1().data(), aViewFrame);
+//                 }
+//             }
+//             if (prs)
+//             {
+//                 UpdatePrs(prs);
+//             }
+//             else if (anActor)
+//             {
+//                 //SMESH::RemoveActor( vtk_viewer->getViewManager()->getActiveView(), anActor );
+//                 std::cout << "Remove Actor" << std::endl;
+//             }
+//         }
+//     }
+// 
+//     return prs;
+// }
+
+// SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_View* theViewFrame )
+// {
+//   SALOME_Prs* prs = 0;
+// 
+//   SALOME_View* aViewFrame = theViewFrame ? theViewFrame : GetActiveView();
+// 
+//   if ( aViewFrame )
+//   {
+//     SVTK_Viewer* vtk_viewer = dynamic_cast<SVTK_Viewer*>( aViewFrame );
+//     if( vtk_viewer )
+//     {
+//       SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
+//       SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
+//       if( !anActor )
+//         anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
+//       if( anActor )
+//       {
+//         SMESH::DisplayActor( wnd, anActor );
+//         prs = LightApp_Displayer::buildPresentation( entry.toLatin1().data(), aViewFrame );
+//       }
+//       if( prs )
+//         UpdatePrs( prs );
+//       else if( anActor )
+//         SMESH::RemoveActor( vtk_viewer->getViewManager()->getActiveView(), anActor );
+//     }
+//   }
+// 
+//   return prs;
+// }
+
+// 
+// void DocumentGraphicView::RemoveActor(SUIT_ViewWindow *theWnd, SALOME_Actor* theActor)
+// {
+//     std::cout << "RemoveActor() : 1" << std::endl;
+//     SVTK_ViewWindow* myViewWindow = dynamic_cast<SVTK_ViewWindow*>(theWnd);
+// //    SVTK_ViewWindow* myViewWindow = dynamic_cast<SVTK_ViewWindow*>(_suitView);    
+//     if (myViewWindow != NULL)
+//     {
+//         myViewWindow->RemoveActor(theActor);
+//         if(theActor->hasIO())
+//         {
+//             std::cout << "RemoveActor() : 2" << std::endl;            
+//             Handle(SALOME_InteractiveObject) anIO = theActor->getIO();
+//             if(anIO->hasEntry())
+//             {
+//                 std::cout << "RemoveActor() : 3" << std::endl;                
+//                 std::string anEntry = anIO->getEntry();
+//                 SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myViewWindow->getViewManager()->study() );
+//                 int aStudyId = aStudy->id();
+// //                 TVisualObjCont::key_type aKey(aStudyId,anEntry);
+// //                 VISUAL_OBJ_CONT.erase(aKey);
+//             }
+//         }
+//         theActor->Delete();
+//         myViewWindow->Repaint();
+//         std::cout << "RemoveActor() : 4" << std::endl;        
+//     }
+// }
+
+// bool DocumentGraphicView::eventFilter(QObject *obj, QEvent *event)
+// {
+//     std::cout << event->type() << std::endl;
+// //     if ( event->type() == QEvent::FocusIn ){ //QEvent::KeyPress) { 
+// //         return false;
+// //     } else {
+// //          // standard event processing
+// // //          return QObject::eventFilter(obj, event);
+// 
+//     if ( event->type() == QEvent::Paint ) { //QEvent::FocusIn ){ 
+//       std::cout << "PAINTTTTTTTTTT"<< std::endl;
+// //       loadVTK( "/tmp/load.vtk"); //CS_TEST
+//     }
+//     return _suitView->event(event);
+// //     }
+// }
+// 
+// 
+void DocumentGraphicView::setModel ( QAbstractItemModel * model )
+{
+  MESSAGE("DocumentGraphicView::setModel (){");
+  QAbstractItemView::setModel( model );
+  
+//   PatternDataModel* pdm = dynamic_cast<PatternDataModel*>(model);
+//   MESSAGE("pdm"<<pdm);
+//   if (pdm){    
+//     connect( pdm, SIGNAL(patternDataChanged() ), this,  SLOT ( onPatternDatachanged() ) );
+//   }
+    
+  DocumentModel* dm = dynamic_cast<DocumentModel*>(model);
+  MESSAGE("dm"<<dm);
+  if (dm){
+    setWindowTitle( dm->getName() );
+    connect( dm, SIGNAL(patternDataChanged() ), this,  SLOT ( onPatternDatachanged() ) );
+    connect( dm, SIGNAL( nameChanged(const QString&) ), this,  SLOT ( setWindowTitle(const QString&) ) );    
+    
+  }
+  
+  
+}
+
+// void DocumentGraphicView::loadVTK( const QString&  path ) //CS_TEST
+// {
+//   std::cout << "DocumentGraphicView::loadVTK=>"<<std::endl;
+//   QFile file(path);
+//   if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+//     return;
+// //   QByteArray vtkData = file.readAll ();
+//   QString vtkData = file.readAll ();
+//   vtkData.replace(",",".");
+// 
+// 
+//   SVTK_ViewWindow* myVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>(_suitView);
+// 
+//   // vtkStructuredGridReader
+//   vtkUnstructuredGridReader* r = vtkUnstructuredGridReader::New();
+// //   r->SetFileName( path.toLocal8Bit().constData() );
+//   r->SetInputString( vtkData.toLocal8Bit().constData() );
+//   r->SetReadFromInputString( true );
+//   r->Update();
+// 
+//   vtkUnstructuredGrid* myGrid = r->GetOutput();//vtkUnstructuredGrid::New();
+//   std::cout << "GetNumberOfCells =>"<< myGrid->GetNumberOfCells();
+//   // Create and display actor
+// 
+//   vtkDataSetMapper* myMapper = vtkDataSetMapper::New();
+//   myMapper->SetInput(myGrid);
+// 
+// //   if ( myPreviewActor ){
+// //     myVTKViewWindow->RemoveActor(myPreviewActor);
+// //     myPreviewActor->Delete();
+// //   }
+// 
+//   SALOME_Actor* myPreviewActor = SALOME_Actor::New();
+//   myPreviewActor = SALOME_Actor::New();
+//   Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject(QString::number( reinterpret_cast<intptr_t>(_hexaDocument) ),"HEXABLOCK");//,theName);
+//   myPreviewActor->setIO(anIO);
+// 
+// //   myPreviewActor->PickableOff();
+//   myPreviewActor->SetVisibility( true );//VisibilityOff();
+//   myPreviewActor->SetPickable( true );
+//   myPreviewActor->SetMapper(myMapper);
+// 
+//   vtkProperty* aProp = vtkProperty::New();
+// //   aProp->SetRepresentationToWireframe();
+//   aProp->SetRepresentationToSurface();
+//   aProp->EdgeVisibilityOn ();
+// 
+// //   aProp->SetColor(10, 10, 250); 
+//   aProp->SetPointSize(5);
+//   myPreviewActor->SetProperty(aProp);
+//   aProp->Delete();
+// 
+//   /*vtkProperty* myBackProp = vtkProperty::New();
+//   GetColor( "SMESH", "backface_color", aBackRGB[0], aBackRGB[1], aBackRGB[2], QColor( 0, 0, 255 ) );
+//   myBackProp->SetColor( aBackRGB[0], aBackRGB[1], aBackRGB[2] );
+//   myPreviewActor->SetBackfaceProperty( myBackProp );
+//   myBackProp->Delete()*/;
+//   myVTKViewWindow->AddActor(myPreviewActor);
+//   myVTKViewWindow->getRenderer()->Render();
+//   myVTKViewWindow->Repaint();
+//   myVTKViewWindow->onFitAll();
+// 
+//   myVTKViewWindow->SetSelectionMode( ActorSelection );
+// // myVTKViewWindow->SetSelectionMode( NodeSelection );
+// // myVTKViewWindow->SetSelectionMode( EdgeSelection );
+// // myVTKViewWindow->SetSelectionMode( FaceSelection );
+// }
+
+// void DocumentGraphicView::rowsInserted ( const QModelIndex & parent, int start, int end )
+// { 
+// 
+// //   std::cout << "DocumentGraphicView::rowsInserted  :  " << parent.data().toString().toStdString() << std::endl;
+//   QModelIndex newRow;
+// 
+//   SVTK_ViewWindow* myViewWindow = dynamic_cast<SVTK_ViewWindow*>(_suitView);
+//   SUIT_ViewManager* vman = myViewWindow->getViewManager();
+//   SUIT_ViewModel* vmodel = vman->getViewModel();
+// 
+//   for ( int i = start; i<= end; ++i ){
+//     newRow = parent.child(i,0);
+// //     std::cout << "newRow.data().toString() =>" << newRow.data().toString().toStdString() << std::endl; 
+//     QString entry = newRow.data(HEXA_ENTRY_ROLE).toString();//.toStdString();
+//     Display(entry, true, dynamic_cast<SALOME_View*>(vmodel));
+//     UpdateViewer();
+//         
+// //     addObject(newRow);
+//   }
+// }
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentGraphicView.hxx
new file mode 100755 (executable)
index 0000000..9e2bd3d
--- /dev/null
@@ -0,0 +1,172 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_DOCUMENTGRAPHICVIEW_HXX_
+#define _HEXABLOCKGUI_DOCUMENTGRAPHICVIEW_HXX_
+
+
+// SALOME GUI includes
+#include <LightApp_Displayer.h>
+// #include <SVTK_ViewWindow.h>
+#include <SUIT_ViewWindow.h>
+#include <SALOME_Actor.h>
+
+
+
+
+
+
+
+#include <QAbstractItemView>
+#include <QMap>
+
+// #include <QContextMenuEvent>
+// #include <QAction>
+// #include <QGraphicsRectItem>
+
+#include <HexVertex.hxx>
+#include <HexQuad.hxx>
+#include <HexEdge.hxx>
+#include <HexHexa.hxx>
+#include <HexDocument.hxx>
+
+
+// class LightApp_Displayer;
+// class SalomeApp_Application;
+class LightApp_Application;
+class SALOME_Actor;
+
+// class vtkLookupTable ;
+// class vtkPoints ;
+// class vtkCellArray ;
+// class vtkFloatArray ;
+// class vtkActor ;
+// class vtkPolyData;
+
+
+class vtkUnstructuredGrid;
+
+
+namespace HEXABLOCK
+{
+
+    namespace GUI
+    {
+
+        class Document_Actor : public SALOME_Actor
+        {
+          public:
+            Document_Actor(HEXA_NS::Document* doc, const QString& entry);
+            virtual ~Document_Actor();
+
+            std::map<int,vtkIdType>   vtkElemsId;
+            std::map<vtkIdType, int>  hexaElemsId;
+
+            vtkUnstructuredGrid* getUnstructuredGrid();
+          private:
+            HEXA_NS::Document* _doc;
+        };
+
+                                                     // Abu
+        class Associate_Actor : public SALOME_Actor
+        {
+          public:
+            Associate_Actor(HEXA_NS::Document* doc, const QString& entry);
+            virtual ~Associate_Actor() {}
+
+            std::map<int,vtkIdType>   vtkElemsId;
+            std::map<vtkIdType, int>  hexaElemsId;
+
+            vtkUnstructuredGrid* getUnstructuredGrid();
+          private:
+            HEXA_NS::Document* _doc;
+        };
+
+
+        /********************************************************************************
+         *                          DocumentGraphicView
+         ********************************************************************************/
+        class DocumentGraphicView : public QAbstractItemView
+        {
+            Q_OBJECT
+
+            public:
+            DocumentGraphicView( LightApp_Application* app, SUIT_ViewWindow *suitView, QWidget *parent = 0 );
+            virtual ~DocumentGraphicView();
+           
+           
+           void setModel ( QAbstractItemModel * model );
+
+
+            SUIT_ViewWindow* get_SUIT_ViewWindow();
+//             static SALOME_Actor* FindActorByEntry(SUIT_ViewWindow *theWindow, const char* theEntry);
+
+//             void loadVTK( const QString&  path );
+            void update();//mise à jours de la vue : reconstruction complète
+
+//             bool eventFilter(QObject *obj, QEvent *event);
+//             virtual void setModel ( QAbstractItemModel * model );
+
+            QModelIndex indexAt(const QPoint &point) const;
+            void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible);
+            QRect visualRect(const QModelIndex &index) const;
+
+//             public:
+//         virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const;
+
+        public slots:
+         void setWindowTitle(const QString& title);
+          void onPatternDatachanged();
+
+        protected slots:
+          virtual void         closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint );
+          virtual void         commitData ( QWidget * editor );
+          virtual void         currentChanged ( const QModelIndex & current, const QModelIndex & previous );
+          virtual void         dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight );
+          virtual void         editorDestroyed ( QObject * editor );
+          virtual void         rowsAboutToBeRemoved ( const QModelIndex & parent, int start, int end );
+          virtual void         rowsInserted ( const QModelIndex & parent, int start, int end );
+          virtual void         selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected );
+          virtual void         updateGeometries ();
+
+        protected:
+            int horizontalOffset() const;
+            bool isIndexHidden(const QModelIndex &index) const;
+            QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction,
+                                   Qt::KeyboardModifiers modifiers);
+            void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command);
+            int verticalOffset() const;
+            QRegion visualRegionForSelection(const QItemSelection &selection) const;
+
+//         protected:
+//           virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
+
+        private:
+            SUIT_ViewWindow *_suitView;
+            Document_Actor  *_documentActor;
+            Associate_Actor *_associateActor;
+            bool _currentChanged;
+        };
+    }
+}
+
+
+
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx
new file mode 100755 (executable)
index 0000000..7016d47
--- /dev/null
@@ -0,0 +1,556 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+#include "HexShape.hxx"
+
+#include <inttypes.h>
+
+/*
+#include <QVariant>*/
+
+
+//#define _DEVDEBUG_
+
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+
+// ----------------------- VERTEX
+
+VertexItem::VertexItem( HEXA_NS::Vertex* hexaVertex ):
+  QStandardItem(),
+  _hexaVertex( hexaVertex )
+{
+//   char pName[12];
+  QString name = _hexaVertex->getName(/*pName*/);
+//   QString docEntry = model()->invisibleRootItem()->data(HEXA_ENTRY_ROLE).toString();
+  setText(name);
+//   setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );//Qt::ItemIsEditable);
+  setData( VERTEX_TREE, HEXA_TREE_ROLE );
+  setData( QString::number( reinterpret_cast<intptr_t>(_hexaVertex) ), HEXA_ENTRY_ROLE ); //_hexaVertex->dad()
+
+  HEXA_NS::Shape* assoc = hexaVertex->getAssociation();
+  if ( assoc ){
+    QString entry = QString(assoc->ident.c_str());
+    setData( entry + ";" , HEXA_ASSOC_ENTRY_ROLE );
+  }
+}
+
+int VertexItem::type() const
+{
+  return VERTEXITEM;
+}
+
+
+
+QVariant VertexItem::data( int role ) const
+{
+       if ( role == HEXA_DATA_ROLE ){
+               return QVariant::fromValue( _hexaVertex );
+       } else if (role == Qt::ForegroundRole ) {
+               HEXA_NS::Shape* assoc = _hexaVertex->getAssociation();
+               if ( assoc )
+                       return QColor(Qt::darkGreen);
+               else
+                       return QColor(Qt::black);
+       } else {
+               return QStandardItem::data( role );
+       }
+}
+
+void VertexItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaVertex = value.value<HEXA_NS::Vertex*>();
+      emitDataChanged ();
+    } else {
+//       std::cout << " VertexItem::setData( " << role << ", "<< value.toString().toStdString() << " )" <<std::endl;
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- EDGE
+EdgeItem::EdgeItem( HEXA_NS::Edge* hexaEdge ):
+  QStandardItem(),
+  _hexaEdge( hexaEdge )
+{
+//   char pName[12];
+//   QString name = _hexaEdge->getName(pName);
+  QString name = _hexaEdge->getName();
+//   std::cout << "EdgeItem name : "<<  name.toStdString() << std::endl;
+  setText(name);
+  setData( EDGE_TREE, HEXA_TREE_ROLE );
+  setData( QString::number( reinterpret_cast<intptr_t>(_hexaEdge) ), HEXA_ENTRY_ROLE );
+
+  QString entries, entry;
+  const HEXA_NS::Shapes& assocs = hexaEdge->getAssociations();
+  for( HEXA_NS::Shapes::const_iterator anAssoc = assocs.begin(); anAssoc != assocs.end(); ++anAssoc ){
+    entry = (*anAssoc)->ident.c_str();
+    entries += entry + ";";
+  }
+  if ( !entries.isEmpty() )
+    setData( entries, HEXA_ASSOC_ENTRY_ROLE );
+
+}
+
+
+int EdgeItem::type() const
+{
+  return EDGEITEM;
+}
+
+QVariant EdgeItem::data( int role ) const
+{
+       if ( role == HEXA_DATA_ROLE ){
+               return QVariant::fromValue( _hexaEdge );
+       } else if (role == Qt::ForegroundRole ) {
+               const HEXA_NS::Shapes& assocs = _hexaEdge->getAssociations();
+               if ( assocs.size()>0 )
+                       return QColor(Qt::darkGreen);
+               else
+                       return QColor(Qt::black);
+       } else {
+               return QStandardItem::data( role );
+       }
+}
+
+void EdgeItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaEdge = value.value<HEXA_NS::Edge*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+
+// ----------------------- QUAD
+QuadItem::QuadItem( HEXA_NS::Quad* hexaQuad ):
+  QStandardItem(),
+  _hexaQuad( hexaQuad )
+{
+//   char pName[12];
+  QString name = _hexaQuad->getName(/*pName*/);
+  setText(name);
+  setData( QUAD_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaQuad)), HEXA_ENTRY_ROLE );
+
+  QString entries, entry;
+  const HEXA_NS::Shapes& assocs = hexaQuad->getAssociations();
+  for( HEXA_NS::Shapes::const_iterator anAssoc = assocs.begin(); anAssoc != assocs.end(); ++anAssoc ){
+    entry = (*anAssoc)->ident.c_str();
+    entries += entry + ";";
+  }
+  if ( !entries.isEmpty() )
+    setData( entries, HEXA_ASSOC_ENTRY_ROLE );
+}
+
+
+int QuadItem::type() const
+{
+  return QUADITEM;
+}
+
+QVariant QuadItem::data( int role ) const
+{
+       if ( role == HEXA_DATA_ROLE ){
+               return QVariant::fromValue( _hexaQuad );
+       } else if ( role == Qt::ForegroundRole ) {
+               const HEXA_NS::Shapes& assocs = _hexaQuad->getAssociations();
+               if ( assocs.size()>0 )
+                       return QColor(Qt::darkGreen);
+               else
+                       return QColor(Qt::black);
+       } else {
+               return QStandardItem::data( role );
+       }
+}
+
+void QuadItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaQuad = value.value<HEXA_NS::Quad*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+
+
+// ----------------------- HEXA
+
+HexaItem::HexaItem( HEXA_NS::Hexa* hexaHexa ):
+  QStandardItem(),
+  _hexaHexa( hexaHexa )
+{
+//   char pName[12];
+  QString name = _hexaHexa->getName(/*pName*/);
+  setText(name);
+  setData( HEXA_TREE, HEXA_TREE_ROLE );
+  setData( QString::number( reinterpret_cast<intptr_t>(_hexaHexa)), HEXA_ENTRY_ROLE );
+}
+
+
+int HexaItem::type() const
+{
+  return HEXAITEM;
+}
+
+QVariant HexaItem::data( int role ) const
+{
+       if ( role == HEXA_DATA_ROLE ){
+               return QVariant::fromValue( _hexaHexa );
+       }
+       else if ( role == Qt::ForegroundRole ) {
+               return QColor(Qt::black);
+       }
+       else {
+               return QStandardItem::data( role );
+       }
+}
+
+void HexaItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaHexa = value.value<HEXA_NS::Hexa*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+
+
+// ----------------------- VECTOR
+VectorItem::VectorItem( HEXA_NS::Vector* hexaVector ):
+  QStandardItem(),
+  _hexaVector( hexaVector )
+{
+//   char pName[12];
+  QString name = _hexaVector->getName(/*pName*/);
+  setText(name);
+  setData( VECTOR_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaVector)), HEXA_ENTRY_ROLE );
+}
+
+int VectorItem::type() const
+{
+  return VECTORITEM;
+}
+
+QVariant VectorItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaVector );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void VectorItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaVector = value.value<HEXA_NS::Vector*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+
+// ----------------------- CYLINDER
+CylinderItem::CylinderItem( HEXA_NS::Cylinder* hexaCylinder):
+  QStandardItem(),
+  _hexaCylinder( hexaCylinder )
+{
+//   char pName[12];
+  QString name = _hexaCylinder->getName(/*pName*/);
+  setText(name);
+  setData( CYLINDER_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaCylinder)), HEXA_ENTRY_ROLE );
+}
+
+int CylinderItem::type() const
+{
+  return CYLINDERITEM;
+}
+
+QVariant CylinderItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaCylinder );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void CylinderItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaCylinder = value.value<HEXA_NS::Cylinder*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+
+// ----------------------- PIPE
+PipeItem::PipeItem( HEXA_NS::Pipe* hexaPipe ):
+  QStandardItem(),
+  _hexaPipe( hexaPipe )
+{
+//   char pName[12];
+  QString name = _hexaPipe->getName(/*pName*/);
+  setText(name);
+  setData( PIPE_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaPipe)), HEXA_ENTRY_ROLE );
+}
+
+int PipeItem::type() const
+{
+  return PIPEITEM;
+}
+
+QVariant PipeItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaPipe );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void PipeItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaPipe = value.value<HEXA_NS::Pipe*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- ELEMENTS
+ElementsItem::ElementsItem( HEXA_NS::Elements* hexaElements ):
+  QStandardItem(),
+  _hexaElements( hexaElements )
+{
+//   char pName[12];
+  QString name = _hexaElements->getName(/*pName*/);
+  setText(name);
+  setData( ELEMENTS_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaElements)), HEXA_ENTRY_ROLE );
+}
+
+int ElementsItem::type() const
+{
+  return ELEMENTSITEM;
+}
+
+QVariant ElementsItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaElements );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void ElementsItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaElements = value.value<HEXA_NS::Elements*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- CROSSELEMENTS
+CrossElementsItem::CrossElementsItem( HEXA_NS::CrossElements* hexaCrossElts ):
+  QStandardItem(),
+  _hexaCrossElts( hexaCrossElts )
+{
+//   char pName[12];
+  QString name = _hexaCrossElts->getName(/*pName*/);
+  setText(name);
+  setData( CROSSELEMENTS_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaCrossElts)), HEXA_ENTRY_ROLE );
+}
+
+int CrossElementsItem::type() const
+{
+  return CROSSELEMENTSITEM;
+}
+
+QVariant CrossElementsItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaCrossElts );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void CrossElementsItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaCrossElts = value.value<HEXA_NS::CrossElements*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- GROUP
+GroupItem::GroupItem( HEXA_NS::Group* hexaGroup ):
+  QStandardItem(),
+  _hexaGroup( hexaGroup )
+{
+//   char pName[12];
+  QString name = _hexaGroup->getName();//pName);
+  setText(name);
+  setData( GROUP_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaGroup)), HEXA_ENTRY_ROLE );
+}
+
+int GroupItem::type() const
+{
+  return GROUPITEM;
+}
+
+QVariant GroupItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaGroup );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void GroupItem::setData ( const QVariant& value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaGroup = value.value<HEXA_NS::Group*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- LAW
+LawItem::LawItem( HEXA_NS::Law* hexaLaw ):
+  QStandardItem(),
+  _hexaLaw( hexaLaw )
+{
+//   char pName[12];
+  QString name = _hexaLaw->getName();//pName);
+  setText(name);
+  setData( LAW_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaLaw)), HEXA_ENTRY_ROLE );
+}
+
+int LawItem::type() const
+{
+  return LAWITEM;
+}
+
+QVariant LawItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaLaw);
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void LawItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaLaw = value.value<HEXA_NS::Law*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
+
+
+
+// ----------------------- PROPAGATIONITEM
+PropagationItem::PropagationItem( HEXA_NS::Propagation* hexaPropagation ):
+  QStandardItem(),
+  _hexaPropagation( hexaPropagation )
+{
+//   char pName[12];
+//   QString name = _hexaPropagation->getName(pName);
+  QString name = "Propagation";
+  setText(name);
+  setData( PROPAGATION_TREE, HEXA_TREE_ROLE );
+  setData( QString::number(reinterpret_cast<intptr_t>(_hexaPropagation)), HEXA_ENTRY_ROLE );
+}
+
+int PropagationItem::type() const
+{
+  return PROPAGATIONITEM;
+}
+
+QVariant PropagationItem::data( int role ) const 
+{ 
+    if ( role == HEXA_DATA_ROLE ){
+      return QVariant::fromValue( _hexaPropagation );
+    } else {
+      return QStandardItem::data( role );
+    }
+}
+
+void PropagationItem::setData ( const QVariant & value, int role )
+{
+    if ( role == HEXA_DATA_ROLE ){
+      _hexaPropagation = value.value<HEXA_NS::Propagation*>();
+      emitDataChanged ();
+    } else {
+      QStandardItem::setData ( value, role );
+    }
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.hxx
new file mode 100755 (executable)
index 0000000..b5a16aa
--- /dev/null
@@ -0,0 +1,323 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_DOCUMENTITEM_HXX_
+#define _HEXABLOCKGUI_DOCUMENTITEM_HXX_
+
+
+#include <QStandardItem>
+
+#include <HexVertex.hxx>
+#include <HexEdge.hxx>
+#include <HexQuad.hxx>
+#include <HexHexa.hxx>
+
+
+#include <HexVector.hxx>
+#include <HexCylinder.hxx>
+#include <HexPipe.hxx>
+#include <HexElements.hxx>
+#include <HexCrossElements.hxx>
+
+
+
+#include <HexGroup.hxx>
+#include <HexLaw.hxx>
+#include <HexPropagation.hxx>
+
+
+
+Q_DECLARE_METATYPE( HEXA_NS::EltBase* );
+Q_DECLARE_METATYPE( HEXA_NS::Vertex* );
+Q_DECLARE_METATYPE( HEXA_NS::Edge* );
+Q_DECLARE_METATYPE( HEXA_NS::Quad* );
+Q_DECLARE_METATYPE( HEXA_NS::Hexa* );
+
+Q_DECLARE_METATYPE( HEXA_NS::Vector* );
+Q_DECLARE_METATYPE( HEXA_NS::Cylinder* );
+Q_DECLARE_METATYPE( HEXA_NS::Pipe* );
+Q_DECLARE_METATYPE( HEXA_NS::Elements* );
+Q_DECLARE_METATYPE( HEXA_NS::CrossElements* );
+
+Q_DECLARE_METATYPE( HEXA_NS::Group* );
+Q_DECLARE_METATYPE( HEXA_NS::Law* );
+Q_DECLARE_METATYPE( HEXA_NS::Propagation* );
+
+
+
+// Q_DECLARE_METATYPE( QList<HEXA_NS::Shape*> ); // association
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+    enum {
+      VERTEXITEM = QStandardItem::UserType + 1,
+      EDGEITEM,
+      QUADITEM,
+      HEXAITEM,
+
+      VECTORITEM,
+      CYLINDERITEM,
+      PIPEITEM,
+      ELEMENTSITEM,
+      CROSSELEMENTSITEM,
+
+      GROUPITEM,
+      LAWITEM,
+      PROPAGATIONITEM,
+
+    };
+
+    enum HexaTreeRole { 
+      VERTEX_TREE = 10,
+      EDGE_TREE,
+      QUAD_TREE,
+      HEXA_TREE,
+
+      VECTOR_TREE,
+      CYLINDER_TREE,
+      PIPE_TREE,
+      ELEMENTS_TREE,
+      CROSSELEMENTS_TREE,
+
+      GROUP_TREE,
+      LAW_TREE,
+      PROPAGATION_TREE,
+
+      VERTEX_DIR_TREE,
+      EDGE_DIR_TREE,
+      QUAD_DIR_TREE,
+      HEXA_DIR_TREE,
+
+      VECTOR_DIR_TREE,
+      CYLINDER_DIR_TREE,
+      PIPE_DIR_TREE,
+      ELEMENTS_DIR_TREE,
+      CROSSELEMENTS_DIR_TREE,
+
+      GROUP_DIR_TREE,
+      LAW_DIR_TREE,
+      PROPAGATION_DIR_TREE
+
+    }; //HEXA_TREE_ROLE
+
+    enum {
+      HEXA_DATA_ROLE = Qt::UserRole + 1,
+      HEXA_DATA_ASSOC,
+      HEXA_TREE_ROLE,
+      HEXA_ENTRY_ROLE,
+      HEXA_DOC_ENTRY_ROLE,
+      HEXA_ASSOC_ENTRY_ROLE,
+    };
+
+// QVariant::UserType
+
+    class VertexItem : public QStandardItem
+    {
+      public:
+        VertexItem( HEXA_NS::Vertex* hexaVertex );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Vertex* _hexaVertex;
+    };
+
+    class EdgeItem : public QStandardItem
+    {
+      public:
+        EdgeItem( HEXA_NS::Edge* hexaEdge );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Edge* _hexaEdge;
+    };
+
+    class QuadItem : public QStandardItem
+    {
+      public:
+        QuadItem( HEXA_NS::Quad* hexaQuad );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Quad* _hexaQuad;
+    };
+
+
+    class HexaItem : public QStandardItem
+    {
+      public:
+        HexaItem( HEXA_NS::Hexa* hexaHexa );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Hexa* _hexaHexa;
+    };
+
+
+    class VectorItem : public QStandardItem
+    {
+      public:
+        VectorItem( HEXA_NS::Vector* hexaVector );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Vector* _hexaVector;
+    };
+
+
+    class CylinderItem : public QStandardItem
+    {
+      public:
+        CylinderItem( HEXA_NS::Cylinder* hexaCyl );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Cylinder* _hexaCylinder;
+    };
+
+
+    class PipeItem : public QStandardItem
+    {
+      public:
+        PipeItem( HEXA_NS::Pipe* hexaPipe );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Pipe* _hexaPipe;
+    };
+
+
+    class ElementsItem : public QStandardItem
+    {
+      public:
+        ElementsItem( HEXA_NS::Elements* hexaElements );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Elements* _hexaElements;
+    };
+
+    class CrossElementsItem : public QStandardItem
+    {
+      public:
+        CrossElementsItem( HEXA_NS::CrossElements* hexaCrossElts );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::CrossElements* _hexaCrossElts;
+    };
+
+
+      
+
+    class GroupItem : public QStandardItem
+    {
+      public:
+        GroupItem( HEXA_NS::Group* hexaGroup );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Group* _hexaGroup;
+    };
+
+
+    class LawItem : public QStandardItem
+    {
+      public:
+        LawItem( HEXA_NS::Law* hexaLaw );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Law* _hexaLaw;
+    };
+
+
+    class PropagationItem : public QStandardItem
+    {
+      public:
+        PropagationItem( HEXA_NS::Propagation* hexaPropagation );
+        virtual int type () const;
+        virtual QVariant data ( int role ) const;
+        virtual void setData ( const QVariant & value, int role ); //= Qt::UserRole + 1 )
+      private:
+        HEXA_NS::Propagation* _hexaPropagation;
+    };
+
+  }
+}
+
+#endif
+
+
+
+
+
+
+// The QStandardItem class provides an item for use with the QStandardItemModel class.
+// 
+// Items usually contain text, icons, or checkboxes.
+// 
+// Each item can have its own background brush which is set with the setBackground() function. The current background brush can be found with background(). The text label for each item can be rendered with its own font and brush. These are specified with the setFont() and setForeground() functions, and read with font() and foreground().
+// 
+// By default, items are enabled, editable, selectable, checkable, and can be used both as the source of a drag and drop operation and as a drop target. Each item's flags can be changed by calling setFlags(). Checkable items can be checked and unchecked with the setCheckState() function. The corresponding checkState() function indicates whether the item is currently checked.
+// 
+// You can store application-specific data in an item by calling setData().
+// 
+// Each item can have a two-dimensional table of child items. This makes it possible to build hierarchies of items. The typical hierarchy is the tree, in which case the child table is a table with a single column (a list).
+// 
+// The dimensions of the child table can be set with setRowCount() and setColumnCount(). Items can be positioned in the child table with setChild(). Get a pointer to a child item with child(). New rows and columns of children can also be inserted with insertRow() and insertColumn(), or appended with appendRow() and appendColumn(). When using the append and insert functions, the dimensions of the child table will grow as needed.
+// 
+// An existing row of children can be removed with removeRow() or takeRow(); correspondingly, a column can be removed with removeColumn() or takeColumn().
+// 
+// An item's children can be sorted by calling sortChildren().
+
+
+// Subclassing
+// 
+// When subclassing QStandardItem to provide custom items, it is possible to define new types for them so that they can be distinguished from the base class. The type() function should be reimplemented to return a new type value equal to or greater than UserType.
+// 
+// Reimplement data() and setData() if you want to perform custom handling of data queries and/or control how an item's data is represented.
+// 
+// Reimplement clone() if you want QStandardItemModel to be able to create instances of your custom item class on demand (see QStandardItemModel::setItemPrototype()).
+// 
+// Reimplement read() and write() if you want to control how items are represented in their serialized form.
+// 
+// Reimplement operator<() if you want to control the semantics of item comparison. operator<() determines the sorted order when sorting items with sortChildren() or with QStandardItemModel::sort().
+
+// QStandardItemModel model;
+//  QStandardItem *parentItem = model.invisibleRootItem();
+//  for (int i = 0; i < 4; ++i) {
+//      QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+//      parentItem->appendRow(item);
+//      parentItem = item;
+//  }
+
+//  QStandardItem *item = myStandardItemModel->itemFromIndex(index);
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.cxx
new file mode 100755 (executable)
index 0000000..1f1d0d7
--- /dev/null
@@ -0,0 +1,3375 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//CS_TODO: relever les fonctions qui nécessitent updateData().
+//        addGroupElement à tester
+
+#include <algorithm>
+#include <string>
+
+#include "utilities.h"
+
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+
+#include "HEXABLOCKGUI.hxx"
+#include "HEXABLOCKGUI_Trace.hxx"
+
+#include "HexVertex.hxx"
+#include "HexShape.hxx"
+
+#include <qglobal.h>
+//#define _DEVDEBUG_
+
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+/*****************************************************************
+                      DocumentModel
+*****************************************************************/
+// DocumentModel::DocumentModel(QObject * parent):
+DocumentModel::DocumentModel(HEXA_NS::Document* docIn, const QString& entryIn, QObject * parent):
+  QStandardItemModel(parent),
+  _hexaFile( new QTemporaryFile() ),
+  _hexaDocument( docIn ),
+  _entry( entryIn ),
+//   _hexaDocument(  new HEXA_NS::Document("/tmp/doc.hex") ), //CS_TODO
+
+  _vertexDirItem( new QStandardItem(tr("TREE_ITEM_VERTEX")) ),
+  _edgeDirItem(   new QStandardItem(tr("TREE_ITEM_EDGE")) ),
+  _quadDirItem(   new QStandardItem(tr("TREE_ITEM_QUAD")) ),
+  _hexaDirItem(   new QStandardItem(tr("TREE_ITEM_HEXA")) ),
+
+  _vectorDirItem(        new QStandardItem(tr("TREE_ITEM_VECTOR")) ),
+  _cylinderDirItem(      new QStandardItem(tr("TREE_ITEM_CYLINDER")) ),
+  _pipeDirItem(          new QStandardItem(tr("TREE_ITEM_PIPE")) ),
+  _elementsDirItem(      new QStandardItem(tr("TREE_ITEM_ELEMENT")) ),
+  _crossElementsDirItem( new QStandardItem(tr("TREE_ITEM_CROSSELEMENT")) ),
+
+  _groupDirItem( new QStandardItem(tr("TREE_ITEM_GROUP")) ),
+
+  _lawDirItem( new QStandardItem(tr("TREE_ITEM_LAW")) ),
+  _propagationDirItem( new QStandardItem(tr("TREE_ITEM_PROPAGATION")) ),
+
+  _vertexItemFlags( Qt::NoItemFlags ),
+  _edgeItemFlags( Qt::NoItemFlags ),
+  _quadItemFlags( Qt::NoItemFlags ),
+  _hexaItemFlags( Qt::NoItemFlags ),
+  _vectorItemFlags( Qt::NoItemFlags ),
+  _cylinderItemFlags( Qt::NoItemFlags ),
+  _pipeItemFlags( Qt::NoItemFlags ),
+  _elementsItemFlags( Qt::NoItemFlags ),
+  _crossElementsItemFlags( Qt::NoItemFlags ),
+  _disallowEdition( false )
+{
+//   setColumnCount( 4 ); //CS_TEST
+  if ( !_hexaDocument && _hexaFile->open() ){
+    _hexaDocument =  new HEXA_NS::Document( _hexaFile->fileName().toLatin1() );
+    _hexaDocument->reorderFaces();
+  }
+
+  QStandardItem *parentItem = invisibleRootItem();
+//   parentItem->setData( QString::number( reinterpret_cast<intptr_t>(_hexaDocument) ), HEXA_ENTRY_ROLE );
+  parentItem->setData( _entry, HEXA_ENTRY_ROLE );
+
+  _vertexDirItem->setData( VERTEX_DIR_TREE,           HEXA_TREE_ROLE );
+  _edgeDirItem->setData( EDGE_DIR_TREE,               HEXA_TREE_ROLE );
+  _quadDirItem->setData( QUAD_DIR_TREE,               HEXA_TREE_ROLE );
+  _hexaDirItem->setData( HEXA_DIR_TREE,               HEXA_TREE_ROLE );
+
+  _vectorDirItem->setData( VECTOR_DIR_TREE,           HEXA_TREE_ROLE );
+  _cylinderDirItem->setData( CYLINDER_DIR_TREE,       HEXA_TREE_ROLE );
+  _pipeDirItem->setData( PIPE_DIR_TREE,                   HEXA_TREE_ROLE );
+  _elementsDirItem->setData( ELEMENTS_DIR_TREE,           HEXA_TREE_ROLE );
+  _crossElementsDirItem->setData( CROSSELEMENTS_DIR_TREE, HEXA_TREE_ROLE );
+
+  _groupDirItem->setData( GROUP_DIR_TREE, HEXA_TREE_ROLE );
+
+  //CS_TODO associations
+
+  _lawDirItem->setData( LAW_DIR_TREE, HEXA_TREE_ROLE );
+  _propagationDirItem->setData( PROPAGATION_DIR_TREE, HEXA_TREE_ROLE );
+
+
+  parentItem->appendRow(_vertexDirItem);
+  parentItem->appendRow(_edgeDirItem);
+  parentItem->appendRow(_quadDirItem);
+  parentItem->appendRow(_hexaDirItem);
+  parentItem->appendRow(_vectorDirItem);
+  parentItem->appendRow(_cylinderDirItem);
+  parentItem->appendRow(_pipeDirItem);
+  parentItem->appendRow(_elementsDirItem);
+  parentItem->appendRow(_crossElementsDirItem);
+  parentItem->appendRow(_groupDirItem);
+  parentItem->appendRow(_lawDirItem);
+  parentItem->appendRow(_propagationDirItem);
+}
+
+DocumentModel::~DocumentModel()
+{
+  delete _hexaDocument;
+  delete _hexaFile;
+}
+
+void DocumentModel::setName(const QString& name)
+{
+  _hexaDocument->setName( name.toLocal8Bit().constData() );
+  emit nameChanged(name);
+}
+
+QString DocumentModel::getName()
+{
+  return _hexaDocument->getName();
+}
+
+void DocumentModel::load( const QString& xmlFileName ) // Fill Data
+{
+  MESSAGE("HEXABLOCKGUI::load()  => "<<xmlFileName.toStdString());
+  //   QString tmp = xmlFileName.section('.', 0, 0); //CS_BP bof
+  // _hexaDocument->setFile( tmp.toLocal8Bit().constData() );
+  // _hexaDocument->loadXml();
+  //std::cout << "AAAAAAAAAA name ->" << _hexaDocument->getName() << std::endl;
+  //   _hexaDocument->loadXml(tmp.toLocal8Bit().constData() );
+  _hexaDocument->loadXml(xmlFileName.toLocal8Bit().constData() );
+  //std::cout << "BBBBBBBBB  name ->" << _hexaDocument->getName() << std::endl;
+  //std::cout << "DocumentModel::load ->" << tmp.toStdString() << std::endl;
+  clearAll();
+
+  fillData();
+  fillBuilder();
+  fillAssociation();
+  fillGroups();
+  fillMesh();
+
+//   tmp = "/tmp/load.vtk";
+//   //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+
+  emit patternDataChanged();
+
+  // BUILDER, ASSOCIATION, GROUPS, ... CS_TODO _fillBuilderFrom( _hexaDocument );
+}
+
+void DocumentModel::save( const QString& xmlFileName )
+{
+  MESSAGE("HEXABLOCKGUI::save()  => "<<xmlFileName.toStdString());
+  //std::cout << "DocumentModel::save ->" << xmlFileName.toStdString() << std::endl;
+  //std::cout << "DocumentModel::save _hexaDocument->" << _hexaDocument << std::endl;
+//   QString noSuffix = xmlFileName.section('.', 0, 0);
+  //std::cout << "DocumentModel::save ->" << noSuffix.toStdString() << std::endl;
+  //_hexaDocument->setFile( noSuffix.toLocal8Bit().constData() );   // Abu
+  //_hexaDocument->saveFile();   // Abu
+//   _hexaDocument->save( noSuffix.toLocal8Bit().constData() );
+  _hexaDocument->save( xmlFileName.toLocal8Bit().constData() );
+}
+
+void DocumentModel::updateData()
+{
+  //std::cout<<"DocumentModel::updateData()  begin"<<std::endl;
+  clearData();
+  fillData();
+  clearMesh();
+  fillMesh();
+  QString tmp = "/tmp/load.vtk";
+  ////_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  emit patternDataChanged();
+  //std::cout<<"DocumentModel::updateData()  end"<<std::endl;
+}
+
+void DocumentModel::clearAll() 
+{
+  clearData();
+  clearBuilder();
+  clearAssociation();
+  clearGroups();
+  clearMesh();
+  //dataChanged( const QModelIndex & topLeft, const QModelIndex & bottomRight )
+  //CS_TODO : todo : association, groups, mesh
+}
+
+void DocumentModel::clearData()
+{
+  _vertexDirItem->removeRows( 0, _vertexDirItem->rowCount() );
+  _edgeDirItem->removeRows(0, _edgeDirItem->rowCount() );
+  _quadDirItem->removeRows(0, _quadDirItem->rowCount() );
+  _hexaDirItem->removeRows(0, _hexaDirItem->rowCount() );
+}
+
+
+void DocumentModel::clearBuilder()
+{
+  _vectorDirItem->removeRows(0, _vectorDirItem->rowCount() );
+  _cylinderDirItem->removeRows(0, _cylinderDirItem->rowCount() );
+  _pipeDirItem->removeRows(0, _pipeDirItem->rowCount() );
+  _elementsDirItem->removeRows(0, _elementsDirItem->rowCount() );
+  _crossElementsDirItem->removeRows(0, _crossElementsDirItem->rowCount() );
+}
+
+void DocumentModel::clearAssociation() 
+{
+  //CS_TODO
+}
+
+void DocumentModel::clearGroups()
+{
+  _groupDirItem->removeRows(0, _groupDirItem->rowCount() );
+}
+
+void DocumentModel::clearMesh()
+{
+  _lawDirItem->removeRows(0, _lawDirItem->rowCount() );
+  _propagationDirItem->removeRows(0, _propagationDirItem->rowCount() );
+}
+
+
+void DocumentModel::fillData()
+{
+  //std::cout<<"DocumentModel::fillData()  begin"<<std::endl;
+
+  //std::cout << "DocumentModel::fillData() _hexaDocument->" << _hexaDocument << std::endl;
+
+  // DATA
+  HEXA_NS::Vertex *v     = NULL;
+  VertexItem      *vItem = NULL;
+  for ( int i=0; i<_hexaDocument->countVertex(); ++i ){
+//     /*char pName[12];*/ std::string name;
+//     HEXA_NS::Shape *aShape = NULL;
+//     QString         shapeIDs;
+
+    v = _hexaDocument->getVertex(i);
+//     name   = v->getName(/*pName*/);
+//     aShape = v->getAssociation();
+
+    vItem = new VertexItem(v);
+    vItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+//     if ( aShape ){
+//       shapeIDs = aShape->ident.c_str();
+//       shapeIDs += ";";
+//       vItem->setData( QVariant::fromValue(shapeIDs), HEXA_ASSOC_ENTRY_ROLE );
+//     }
+    _vertexDirItem->appendRow(vItem);
+//     std::cout<<name<<":"<< shapeIDs.toStdString() <<std::endl;
+
+    //CS_TEST
+//     HEXA_NS::Shape* s = v->getAssociation();
+//     std::cout<<"assoc->"<<s<<std::endl;
+//     if (s){
+//       QList<QStandardItem *>  assocItems;
+//       assocItems << new QStandardItem(s->ident.c_str()); 
+//       std::cout<<"assoc id =>"<<s->ident<<std::endl;
+//       vItem->appendColumn(assocItems);
+//     }
+// 
+    //CS_TEST
+//     _vertexDirItem->setEditable( false );//CS_TEST
+  }
+
+  HEXA_NS::Edge *e     = NULL;
+  EdgeItem      *eItem = NULL;
+  for ( int i=0; i<_hexaDocument->countEdge(); ++i ){
+//     /*char pName[12]; */std::string name;
+//     HEXA_NS::Shapes shapeList;
+//     QString         shapeIDs;
+
+    e = _hexaDocument->getEdge(i);
+//     name      = e->getName(pName);
+//     shapeList = e->getAssociations();
+
+    eItem = new EdgeItem(e);
+    eItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+
+//     std::cout << "shapeList.size() => " << shapeList.size() << std::endl;
+// 
+//     if ( !shapeList.empty() ){
+//       for ( HEXA_NS::Shapes::const_iterator aShape = shapeList.begin();
+//             aShape != shapeList.end();
+//             ++aShape ){
+//         shapeIDs += (*aShape)->ident.c_str();
+//         shapeIDs += ";";
+//       }
+//       eItem->setData( QVariant::fromValue(shapeIDs), HEXA_ASSOC_ENTRY_ROLE );
+//     }
+    _edgeDirItem->appendRow(eItem);
+//     std::cout<<name<<":"<< shapeIDs.toStdString() <<std::endl;
+  }
+
+  HEXA_NS::Quad *q     = NULL;
+  QuadItem      *qItem = NULL;
+  for ( int i=0; i<_hexaDocument->countQuad(); ++i ){
+//     char pName[12]; std::string name;
+//     HEXA_NS::Shapes shapeList;
+//     QString         shapeIDs;
+
+    q = _hexaDocument->getQuad(i);
+//     name      = q->getName(pName);
+//     shapeList = q->getAssociations();
+
+    qItem = new QuadItem(q);
+    qItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+//     if ( !shapeList.empty() ){
+//       for ( HEXA_NS::Shapes::const_iterator aShape = shapeList.begin();
+//             aShape != shapeList.end();
+//             ++aShape ){
+//         shapeIDs += (*aShape)->ident.c_str();
+//         shapeIDs += ";";
+//       }
+//       eItem->setData( QVariant::fromValue(shapeIDs), HEXA_ASSOC_ENTRY_ROLE );
+//     }
+    _quadDirItem->appendRow(qItem);
+//     std::cout<<name<<":"<< shapeIDs.toStdString() <<std::endl;
+  }
+
+  HEXA_NS::Hexa *h     = NULL;
+  HexaItem      *hItem = NULL;
+  for ( int i=0; i<_hexaDocument->countHexa(); ++i ){
+    h = _hexaDocument->getHexa(i);
+    hItem = new HexaItem(h);
+    hItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _hexaDirItem->appendRow(hItem);
+  }
+
+  //std::cout<<"DocumentModel::fillData()  end"<<std::endl;
+}
+
+
+void DocumentModel::fillBuilder() 
+{
+  //std::cout<<"DocumentModel::fillBuilder()  begin"<<std::endl;
+
+  HEXA_NS::Vector *v     = NULL;
+  VectorItem      *vItem = NULL;
+  for ( int i=0; i<_hexaDocument->countVector(); ++i ){
+    v = _hexaDocument->getVector(i);
+    vItem = new VectorItem(v);
+    _vectorDirItem->appendRow(vItem);
+  }
+
+  //   _cylinderDirItem
+  HEXA_NS::Cylinder *c     = NULL;
+  CylinderItem      *cItem = NULL;
+  for ( int i=0; i<_hexaDocument->countCylinder(); ++i ){
+    c = _hexaDocument->getCylinder(i);
+    cItem = new CylinderItem(c);
+    _cylinderDirItem->appendRow(cItem);
+  }
+
+//   _pipeDirItem
+  HEXA_NS::Pipe *p     = NULL;
+  PipeItem      *pItem = NULL;
+  for ( int i=0; i<_hexaDocument->countPipe(); ++i ){
+    p = _hexaDocument->getPipe(i);
+    pItem = new PipeItem(p);
+    _pipeDirItem->appendRow(pItem);
+
+  } 
+//   _elementsDirItem     CS_TODO : no elements
+//   HEXA_NS::Elements *e     = NULL;
+//   ElementsItem      *eItem = NULL;
+//   for ( int i=0; i<_hexaDocument->countElements(); ++i ){
+//     e = _hexaDocument->getElements(i);
+//     eItem = new ElementsItem(e);
+//     _elementsDirItem->appendRow(eItem);
+//   }
+
+//   _crossElementsDirItem
+//   HEXA_NS::CrossElements *c = NULL;
+//   CrossElementsItem      *cItem = NULL;
+//   for ( int i=0; i<_hexaDocument->countCrossElements(); ++i ){
+//     c = _hexaDocument->getCrossElements(i);
+//     cItem = new CrossElementsItem(c);
+//     _crossElementsDirItem->appendRow(cItem);
+//   }
+
+}
+
+void DocumentModel::fillAssociation()
+{
+
+}
+
+void DocumentModel::fillGroups()
+{
+  //std::cout<<"DocumentModel::fillGroups()  begin"<<std::endl;
+//   _groupDirItem
+  HEXA_NS::Group *g     = NULL;
+  GroupItem      *gItem = NULL;
+  //std::cout<<"countGroup => "<< _hexaDocument->countGroup() << std::endl;
+  for ( int i=0; i<_hexaDocument->countGroup(); ++i ){
+    g = _hexaDocument->getGroup(i);
+    //std::cout<<"getGroup => "<< i << std::endl;
+    gItem = new GroupItem(g);
+    gItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _groupDirItem->appendRow(gItem);
+  } 
+  //std::cout<<"DocumentModel::fillGroups()  end"<<std::endl;
+}
+
+void DocumentModel::fillMesh()
+{
+  //   _lawDirItem
+  HEXA_NS::Law *l     = NULL;
+  LawItem      *lItem = NULL;
+  //std::cout<<"countLaw => "<< _hexaDocument->countLaw() << std::endl;
+  for ( int i=0; i<_hexaDocument->countLaw(); ++i ){
+    l = _hexaDocument->getLaw(i);
+    //std::cout<<"getLaw => "<< i << std::endl;
+    lItem = new LawItem(l);
+    _lawDirItem->appendRow(lItem);
+  }
+
+  //   _propagationDirItem
+  HEXA_NS::Propagation *p     = NULL;
+  PropagationItem      *pItem = NULL;
+  //std::cout<<"countPropagation => "<< _hexaDocument->countPropagation() << std::endl;
+  for ( int i=0; i<_hexaDocument->countPropagation(); ++i ){
+    p = _hexaDocument->getPropagation(i);
+//     std::cout<<"getPropagation => "<< i << std::endl;
+    pItem = new PropagationItem(p);
+    pItem->setText(QString("Propagation%1").arg(i) );
+    pItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _propagationDirItem->appendRow(pItem);
+  }
+}
+
+// Qt::ItemFlags DocumentModel::flags(const QModelIndex &index) const
+// {
+//   Qt::ItemFlags flags;
+// 
+//   if (!index.isValid()){
+//       std::cout<<"!index.isValid()"<<std::endl;
+//       return Qt::ItemIsEnabled;
+//   }
+// 
+//   QStandardItem *item = itemFromIndex ( index );
+// 
+//   if ( (item->type() == VERTEXITEM) && (_vertexItemFlags != Qt::NoItemFlags) ){
+//     flags = _vertexItemFlags;
+//   } else if ( (item->type() == EDGEITEM) && (_edgeItemFlags != Qt::NoItemFlags) ){
+//     flags = _edgeItemFlags;
+//   } else if ( (item->type() == QUADITEM) && (_quadItemFlags != Qt::NoItemFlags) ){
+//     flags = _quadItemFlags;
+//   } else if ( (item->type() == HEXAITEM) && (_hexaItemFlags != Qt::NoItemFlags) ){
+//     flags = _hexaItemFlags;
+//   } else if ( (item->type() == VECTORITEM) && (_vectorItemFlags != Qt::NoItemFlags) ){
+//     flags = _vectorItemFlags;
+//   } else if ( (item->type() == CYLINDERITEM) && (_cylinderItemFlags != Qt::NoItemFlags) ){
+//     flags = _cylinderItemFlags;
+//   } else if ( (item->type() == PIPEITEM ) && (_pipeItemFlags != Qt::NoItemFlags) ){
+//     flags = _pipeItemFlags;
+//   } else if ( (item->type() == ELEMENTSITEM) && (_elementsItemFlags != Qt::NoItemFlags) ){
+//     flags = _elementsItemFlags;
+//   } else if ( (item->type() == CROSSELEMENTSITEM) && (_crossElementsItemFlags != Qt::NoItemFlags) ){
+//     flags = _crossElementsItemFlags;
+//   } else if ( (item->type() == GROUPITEM) && (_groupItemFlags != Qt::NoItemFlags) ){
+//     flags = _groupItemFlags;
+//   } else if ( (item->type() == LAWITEM ) && (_lawItemFlags != Qt::NoItemFlags) ){
+//     flags = _lawItemFlags;
+//   } else if ( (item->type() == PROPAGATIONITEM ) && (_propagationItemFlags != Qt::NoItemFlags) ){
+//     flags = _propagationItemFlags;
+//   } else {
+//     flags = item->flags();
+//   }
+// 
+//   return flags;
+// }
+
+// Qt::ItemFlags DocumentModel::flags(const QModelIndex &index) const
+// {
+//   Qt::ItemFlags flags;
+// 
+//   if (!index.isValid()) return Qt::ItemIsEnabled;
+//   QStandardItem *item = itemFromIndex ( index );
+//   if ( _disallowEdition ){
+//     flags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+//   } else {
+//     flags = item->flags();
+//   }
+// 
+//   return flags;
+// }
+
+Qt::ItemFlags DocumentModel::flags(const QModelIndex &index) const
+{
+  Qt::ItemFlags flags;
+
+  if (!index.isValid()) return Qt::ItemIsEnabled;
+
+  if ( _disallowEdition ){
+    return QAbstractItemModel::flags(index) | Qt::ItemFlags( ~Qt::ItemIsEditable );
+  } else {
+    return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
+  }
+}
+
+void DocumentModel::allowEdition()
+{
+  MESSAGE("DocumentModel::allowEdition(){");
+  _disallowEdition = false;
+  MESSAGE("}");
+}
+
+void DocumentModel::disallowEdition()
+{
+  MESSAGE("DocumentModel::disallowEdition (){");
+  _disallowEdition = true;
+  MESSAGE("}");
+}
+
+// disallowEdition
+// void DocumentModel::allowAllSelection()
+// {
+//   _vertexItemFlags = Qt::NoItemFlags;
+//   _edgeItemFlags   = Qt::NoItemFlags;
+//   _quadItemFlags   = Qt::NoItemFlags;
+//   _hexaItemFlags   = Qt::NoItemFlags;
+// 
+//   _vectorItemFlags   = Qt::NoItemFlags;
+//   _cylinderItemFlags = Qt::NoItemFlags;
+//   _pipeItemFlags     = Qt::NoItemFlags;
+//   _elementsItemFlags      = Qt::NoItemFlags;
+//   _crossElementsItemFlags = Qt::NoItemFlags;
+// 
+//   _groupItemFlags = Qt::NoItemFlags;
+//   _lawItemFlags   = Qt::NoItemFlags;
+//   _propagationItemFlags = Qt::NoItemFlags;
+// }
+
+void DocumentModel::allowDataSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _quadItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+  _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+// void DocumentModel::allowVertexSelectionOnly()
+// {
+//     std::cout << "allowVertexSelectionOnly() allowVertexSelectionOnly() allowVertexSelectionOnly() "<< std::endl;
+//     _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable);
+//     _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _quadItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+// 
+//     _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+// 
+//     _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+//     _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+// 
+// //     emit layoutChanged();
+// }
+
+void DocumentModel::allowVertexSelectionOnly()
+{
+    //std::cout << "allowVertexSelectionOnly() allowVertexSelectionOnly() allowVertexSelectionOnly() "<< std::endl;
+    _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable);
+    _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _quadItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+    _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+    _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+    _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+//     emit layoutChanged();
+}
+
+void DocumentModel::allowEdgeSelectionOnly()
+{
+  //std::cout << "allowEdgeSelectionOnly() allowEdgeSelectionOnly() allowEdgeSelectionOnly() "<< std::endl;
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _quadItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowQuadSelectionOnly()
+{
+  //std::cout << "allowQuadSelectionOnly() allowQuadSelectionOnly() allowQuadSelectionOnly() "<< std::endl;
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowHexaSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+  _vectorItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowVectorSelectionOnly()
+{
+  //std::cout << "allowVectorSelectionOnly() allowVectorSelectionOnly() allowVectorSelectionOnly() "<< std::endl;
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowCylinderSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowPipeSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+/*
+void DocumentModel::allowPipeItemFlags()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}*/
+
+void DocumentModel::allowElementsSelectionOnly()
+{
+  //std::cout << "allowElementsSelectionOnly() allowElementsSelectionOnly() allowElementsSelectionOnly() "<< std::endl;
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowCrossElementsSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEditable );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::allowLawSelectionOnly()
+{
+  _vertexItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _edgeItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _quadItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _hexaItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+
+  _vectorItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _cylinderItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _pipeItemFlags     = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _elementsItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _crossElementsItemFlags = Qt::ItemFlags( Qt::ItemIsEnabled );
+
+  _groupItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+  _lawItemFlags   = Qt::ItemFlags( ~Qt::ItemIsEditable );
+  _propagationItemFlags = Qt::ItemFlags( ~Qt::ItemIsEnabled );
+}
+
+void DocumentModel::setName( const QModelIndex& iElt, const QString& name )
+{
+  HEXA_NS::EltBase *elt = NULL;
+
+  switch ( data(iElt, HEXA_TREE_ROLE).toInt() ){
+  case VERTEX_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Vertex* >(); break;
+  case EDGE_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Edge* >(); break;
+  case QUAD_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Quad* >(); break;
+  case HEXA_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Hexa* >(); break;
+  case VECTOR_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Vector* >(); break;
+  case CYLINDER_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Cylinder* >(); break;
+  case PIPE_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Pipe* >(); break;
+  case ELEMENTS_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Elements* >(); break;
+  case CROSSELEMENTS_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::CrossElements* >(); break;
+  case GROUP_TREE :
+    { 
+      HEXA_NS::Group* grp = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Group* >();
+      grp->setName( name.toLatin1().data() );
+      break;
+    }
+  case LAW_TREE :
+    {
+      HEXA_NS::Law* l = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Law* >();
+      l->setName( name.toLatin1().data() );
+      break;
+    }
+//   case PROPAGATION_TREE : elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Propagation* >(); break;
+  }
+
+  if ( elt != NULL ) elt->setName( name.toStdString() );
+
+  setData( iElt, name );
+}
+
+bool DocumentModel::clearEltAssociations( const QModelIndex& iElt )
+{
+  bool isOk = false;
+  HEXA_NS::EltBase *elt = NULL;
+
+  switch ( data(iElt, HEXA_TREE_ROLE).toInt() ){
+  case VERTEX_TREE :
+    { 
+      elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Vertex* >(); 
+      //std::cout<<"VERTEX_TREE:"<<std::endl;
+      break;
+    }
+  case EDGE_TREE :
+    {
+      elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Edge* >();
+      //std::cout<<"EDGE_TREE :"<<std::endl;
+      break;
+    }
+  case QUAD_TREE :
+    {
+      elt = iElt.data( HEXA_DATA_ROLE ).value< HEXA_NS::Quad* >();
+      //std::cout<<"QUAD_TREE :"<<std::endl;
+      break;
+    }
+  }
+
+  if ( elt != NULL ){
+    elt->clearAssociation();
+    setData( iElt, QVariant(), HEXA_ASSOC_ENTRY_ROLE );
+    isOk = true;
+  }
+
+  return isOk;
+}
+
+QModelIndex DocumentModel::addVertex( double x, double y, double z )
+{
+  //std::cout << "DocumentModel::addVertex() _hexaDocument->" << _hexaDocument << std::endl;
+  QModelIndex vertexIndex;
+
+  HEXA_NS::Vertex* hv = _hexaDocument->addVertex(x, y, z);
+  if ( hv->isValid() ){
+    VertexItem* v = new VertexItem(hv);
+    v->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _vertexDirItem->appendRow(v);
+//     v->appendRow( new QStandardItem("titi") );
+//     QList<QStandardItem*> l;
+//     l << new QStandardItem("toto");
+//     v->appendColumn( l );
+    vertexIndex = v->index();
+    emit patternDataChanged();
+  } else {
+    delete hv;
+  }
+
+  return vertexIndex;
+}
+
+QModelIndex DocumentModel::addEdgeVertices (const QModelIndex &i_v0, const QModelIndex &i_v1 )
+{
+  QModelIndex edgeIndex;
+
+  HEXA_NS::Vertex* hv0 = data(i_v0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(i_v1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Edge* he = _hexaDocument->addEdge( hv0, hv1 );
+
+  if ( he->isValid() ){
+    EdgeItem* e = new EdgeItem(he);
+    e->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _edgeDirItem->appendRow(e);
+    edgeIndex = e->index();
+    emit patternDataChanged();
+    QString tmp = "/tmp/addEdgeVertices.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete he;
+  }
+  return edgeIndex;
+}
+
+QModelIndex DocumentModel::addEdgeVector( const QModelIndex &i_v, const QModelIndex &i_vec )
+{
+  QModelIndex edgeIndex;
+
+  HEXA_NS::Vertex* hv   = data(i_v, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec = data(i_vec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Edge* he = _hexaDocument->addEdge( hv, hvec );
+
+  if ( he->isValid() ){
+    EdgeItem* e = new EdgeItem(he);
+    e->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _edgeDirItem->appendRow(e);
+    edgeIndex = e->index();
+    emit patternDataChanged();
+    QString tmp = "/tmp/addEdgeVector.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete he;
+  }
+  return edgeIndex;
+}
+
+QModelIndex DocumentModel::addQuadVertices( const QModelIndex &i_v0, const QModelIndex &i_v1,
+                                            const QModelIndex &i_v2, const QModelIndex &i_v3 )
+{ //CS_TODO : gestion erreur
+  QModelIndex quadIndex;
+
+//   QStandardItem *item_v0 = itemFromIndex(i_v0);
+//   QStandardItem *item_v1 = itemFromIndex(i_v1);
+//   QStandardItem *item_v2 = itemFromIndex(i_v2);
+//   QStandardItem *item_v3 = itemFromIndex(i_v3);
+
+//   HASSERT( item_v0->type() == item_v1->type() 
+//         == item_v2->type() == item_v3->type()
+//         == VERTEXITEM );
+
+  HEXA_NS::Vertex* hv0 = data(i_v0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(i_v1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv2 = data(i_v2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv3 = data(i_v3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  if ( hv0 and hv1 and hv2 and hv3 ){
+    HEXA_NS::Quad* hq = _hexaDocument->addQuadVertices( hv0, hv1, hv2, hv3 );
+    if ( hq->isValid() ){
+      QuadItem* q = new QuadItem(hq);
+      q->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+      _quadDirItem->appendRow(q);
+      quadIndex = q->index();
+      emit patternDataChanged();
+      QString tmp = "/tmp/addQuadVertices.vtk";
+      //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+    } else {
+      delete hq;
+    }
+  }
+  return quadIndex;
+}
+
+QModelIndex DocumentModel::addQuadEdges( const QModelIndex &e0, const QModelIndex &e1,
+                                         const QModelIndex &e2, const QModelIndex &e3 )
+{ //CS_TODO
+  QModelIndex quadIndex;
+
+  HEXA_NS::Edge* he0 = data(e0, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+  HEXA_NS::Edge* he1 = data(e1, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+  HEXA_NS::Edge* he2 = data(e2, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+  HEXA_NS::Edge* he3 = data(e3, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+
+  if ( he0 and he1 and he2 and he3 ){
+    HEXA_NS::Quad* hq = _hexaDocument->addQuad( he0, he1, he2, he3 );    
+    if ( hq->isValid() ){
+      QuadItem* q = new QuadItem(hq);
+      q->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+      _quadDirItem->appendRow(q);
+      quadIndex = q->index();
+      emit patternDataChanged();
+      QString tmp = "/tmp/addQuadEdges.vtk";
+      //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+    } else {
+      delete hq;
+    }
+  }
+  return quadIndex;
+}
+
+QModelIndex DocumentModel::addHexaVertices( 
+            const QModelIndex &iv0, const QModelIndex &iv1,
+            const QModelIndex &iv2, const QModelIndex &iv3,
+            const QModelIndex &iv4, const QModelIndex &iv5,
+            const QModelIndex &iv6, const QModelIndex &iv7 )
+{ 
+  QModelIndex iHexa;
+
+  HEXA_NS::Vertex* hv0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv2 = data(iv2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv3 = data(iv3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv4 = data(iv4, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv5 = data(iv5, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv6 = data(iv6, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv7 = data(iv7, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Hexa* hh = _hexaDocument->addHexaVertices( hv0, hv1, hv2, hv3,
+                                                      hv4, hv5, hv6, hv7 );
+
+  if ( hh->isValid() ){
+    HexaItem* h = new HexaItem(hh);
+    h->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _hexaDirItem->appendRow(h);
+    iHexa = h->index();
+    emit patternDataChanged();
+    QString tmp = "/tmp/addHexaVertices.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hh;
+  }
+
+  return iHexa;
+}
+
+QModelIndex DocumentModel::addHexaQuad( const QModelIndex &i_q0, const QModelIndex &i_q1,
+    const QModelIndex &i_q2,const QModelIndex &i_q3, const QModelIndex &i_q4, const QModelIndex &i_q5 )
+{ //CS_TODO : gestion erreur
+  QModelIndex hexaIndex;
+
+//   QStandardItem *item_v0 = itemFromIndex(i_q0);
+//   QStandardItem *item_v1 = itemFromIndex(i_q1);
+//   QStandardItem *item_v2 = itemFromIndex(i_q2);
+//   QStandardItem *item_v3 = itemFromIndex(i_q3);
+//   QStandardItem *item_v4 = itemFromIndex(i_q4);
+//   QStandardItem *item_v5 = itemFromIndex(i_q5);
+  HEXA_NS::Quad* hq0 = data(i_q0, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hq1 = data(i_q1, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hq2 = data(i_q2, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hq3 = data(i_q3, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hq4 = data(i_q4, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hq5 = data(i_q5, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+
+  HEXA_NS::Hexa* hh = _hexaDocument->addHexa( hq0, hq1, hq2, hq3, hq4, hq5 );
+
+  if ( hh->isValid() ){
+    HexaItem* h = new HexaItem(hh);
+    h->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _hexaDirItem->appendRow(h);
+    hexaIndex = h->index();
+    emit patternDataChanged();
+    QString tmp = "/tmp/addHexaQuad.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hh;
+  }
+
+  return hexaIndex;
+}
+
+QModelIndex DocumentModel::addHexaQuads( const QModelIndexList &iquads)
+{ 
+  QModelIndex hexaIndex;
+
+  HEXA_NS::Hexa* hh = NULL;
+  HEXA_NS::Quad* hq0, *hq1, *hq2, *hq3, *hq4, *hq5 = NULL;
+
+  hq0 = data( iquads.value(0), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  hq1 = data( iquads.value(1), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  hq2 = data( iquads.value(2), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  hq3 = data( iquads.value(3), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  hq4 = data( iquads.value(4), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  hq5 = data( iquads.value(5), HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+
+  if ( hq0 && hq1 ){
+      hh = _hexaDocument->addHexa2Quads( hq0, hq1);
+  } else if ( hq0 && hq1 && hq2){
+      hh = _hexaDocument->addHexa3Quads( hq0, hq1, hq2 );
+  } else if ( hq0 && hq1 && hq2 && hq3 ){
+      hh = _hexaDocument->addHexa4Quads( hq0, hq1, hq2, hq3 );
+  } else if ( hq0 && hq1 && hq2 && hq3 && hq4 ){
+      hh = _hexaDocument->addHexa5Quads( hq0, hq1, hq2, hq3, hq4 );
+  } else if ( hq0 && hq1 && hq2 && hq3 && hq4 && hq5 ){
+      hh = _hexaDocument->addHexa( hq0, hq1, hq2, hq3, hq4, hq5 );
+  }
+
+  if ( hh && hh->isValid() ){
+    HexaItem* h = new HexaItem(hh);
+    h->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+    _hexaDirItem->appendRow(h);
+    hexaIndex = h->index();
+    emit patternDataChanged();
+    QString tmp = "/tmp/addHexaQuads.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hh;
+  }
+
+  return hexaIndex;
+}
+
+// Vector addVector( in double dx, in double dy, in double dz )
+//         raises (SALOME::SALOME_Exception);
+QModelIndex DocumentModel::addVector( double dx, double dy, double dz )
+{
+  //std::cout << "DocumentModel::addVector" << std::endl;
+  QModelIndex vectorIndex;
+
+  HEXA_NS::Vector* hv = _hexaDocument->addVector(dx, dy, dz);
+
+  if ( hv->isValid() ){
+    //std::cout << "hv->isValid()" << std::endl;
+    VectorItem* v = new VectorItem(hv);
+    _vectorDirItem->appendRow(v);
+    vectorIndex = v->index();
+//     QStandardItem *toto = new QStandardItem("Toto");
+//     std::cout << "before" << std::endl;
+//     _vectorDirItem->appendRow(toto);
+//     std::cout << "after" << std::endl;
+//     vectorIndex = toto->index();
+    QString tmp = "/tmp/addVector.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+
+  } else {
+    //std::cout << "delete hv" << std::endl;
+    delete hv;
+  }
+
+  return vectorIndex;
+}
+
+QModelIndex DocumentModel::addVectorVertices( const QModelIndex &iv0, const QModelIndex &iv1 )
+{
+  QModelIndex iVec;
+
+  HEXA_NS::Vertex* hv0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Vector* hvec = _hexaDocument->addVectorVertices( hv0, hv1 );
+
+  if ( hvec->isValid() ){
+    VectorItem* vec = new VectorItem(hvec);
+    _vectorDirItem->appendRow(vec);
+    iVec = vec->index();
+    QString tmp = "/tmp/addVectorVertices.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hvec;
+  }
+
+  return iVec;
+}
+
+QModelIndex DocumentModel::addCylinder( const QModelIndex &iv, const QModelIndex &ivec, double r,  double h )
+{
+  QModelIndex iCyl;
+
+  HEXA_NS::Vertex* hv   = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Cylinder* hcyl = _hexaDocument->addCylinder( hv, hvec, r, h );
+
+  if ( hcyl->isValid() ){
+    CylinderItem* cyl = new CylinderItem(hcyl);
+    _cylinderDirItem->appendRow(cyl);
+    iCyl = cyl->index();
+    QString tmp = "/tmp/addCylinder.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hcyl;
+  }
+
+  return iCyl;
+}
+
+QModelIndex DocumentModel::addPipe( const QModelIndex &iv, const QModelIndex &ivec, double ri, double re, double h )
+{
+  QModelIndex iPipe;
+
+  HEXA_NS::Vertex* hv   = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Pipe* hPipe = _hexaDocument->addPipe( hv, hvec, ri, re, h );
+
+  if ( hPipe->isValid() ){
+    PipeItem* pipe = new PipeItem(hPipe);
+    _pipeDirItem->appendRow(pipe);
+    iPipe = pipe->index();
+    QString tmp = "/tmp/addPipe.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hPipe;
+  }
+
+  return iPipe;
+}
+
+QModelIndex DocumentModel::makeCartesian( const QModelIndex& i_pt,
+      const QModelIndex& i_vec_x, const QModelIndex& i_vec_y, const QModelIndex& i_vec_z,
+      long nx, long ny, long nz)
+{
+  QModelIndex eltsIndex;
+  //std::cout<<"makeCartesian begin"<<std::endl; 
+
+  HEXA_NS::Vertex* hpt    = data(i_pt,    HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec_x = data(i_vec_x, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvec_y = data(i_vec_y, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvec_z = data(i_vec_z, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  //std::cout<<"hpt "<<hpt<<std::endl; 
+  //std::cout<<"hvec_x "<<hvec_x<<std::endl; 
+  //std::cout<<"hvec_y "<<hvec_y<<std::endl; 
+  //std::cout<<"hvec_z "<<hvec_z<<std::endl; 
+
+  HEXA_NS::Elements* new_helts = _hexaDocument->makeCartesian( hpt,
+                                                               hvec_x, hvec_y, hvec_z,
+                                                               nx, ny, nz );
+
+  if ( new_helts->isValid() ){
+    //std::cout<<"makeCartesian OK!!!"<<std::endl; 
+    updateData(); //CS_TODO more or less?
+    ElementsItem* eltsItem = new ElementsItem(new_helts);
+    _elementsDirItem->appendRow(eltsItem);
+    eltsIndex = eltsItem->index();
+    QString tmp = "/tmp/makeCartesian1.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    //std::cout<<"makeCartesian KO!!!"<<std::endl; 
+    delete new_helts;
+  }
+
+  return eltsIndex;
+}
+
+QModelIndex DocumentModel::makeCartesian( const QModelIndex& ivex,
+                                          const QModelIndex& ivec,
+                                          int nx, int ny, int nz )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hVex = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hVec = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makeCartesian( hVex,
+                                                           hVec,
+                                                           nx, ny, nz );
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/makeCartesian2.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+// Elements makeCylindrical( in Vertex pt,
+//           in Vector vex, in Vector vez,
+//           in double dr, in double da, in double dl,
+//           in long nr, in long na, in long nl,
+//           in boolean fill )
+//         raises (SALOME::SALOME_Exception);
+QModelIndex DocumentModel::makeCylindrical( const QModelIndex& i_pt,
+        const QModelIndex& i_vec_x, const QModelIndex& i_vec_z,
+        double dr, double da, double dl,
+        long nr, long na, long nl,
+        bool fill )
+{
+
+  QModelIndex eltsIndex;
+
+  HEXA_NS::Vertex* hpt = data(i_pt, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec_x = data(i_vec_x, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvec_z = data(i_vec_z, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* new_helts = _hexaDocument->makeCylindrical( hpt, hvec_x, hvec_z, dr, da, dl, nr, na, nl, fill );
+
+  if ( new_helts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(new_helts);
+    _elementsDirItem->appendRow(eltsItem);
+    eltsIndex = eltsItem->index();
+    QString tmp = "/tmp/makeCylindrical.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete new_helts;
+  }
+
+  return eltsIndex;
+}
+
+QModelIndex DocumentModel::makeCylindricals( 
+    const QModelIndex& icenter, const QModelIndex& ibase, const QModelIndex& iheight,
+    QList< double> radius, QList<double> angles, QList<double> heights, 
+    bool fill ) //HEXA3
+{
+  QModelIndex eltsIndex;
+
+  HEXA_NS::Vertex* hcenter = data( icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hbase   = data( ibase,   HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hheight = data( iheight, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+//   HEXA_NS::Elements* helts;
+  std::vector<double> r = radius.toVector().toStdVector();
+  std::vector<double> a = angles.toVector().toStdVector();
+  std::vector<double> h = heights.toVector().toStdVector();
+
+  HEXA_NS::Elements* helts = _hexaDocument->makeCylindricals( 
+             hcenter, hbase, hheight,
+             r, a, h,
+             fill );
+
+//   HEXA_NS::Elements* helts = _hexaDocument->makeCylindricals( 
+//              hcenter, hbase, hheight,
+//              radius.toVector().toStdVector(), angles.toVector().toStdVector(), heights.toVector().toStdVector(),
+//              fill );
+
+  if ( helts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(helts);
+    _elementsDirItem->appendRow(eltsItem);
+    eltsIndex = eltsItem->index();
+  } else {
+    delete helts;
+  }
+
+  return eltsIndex;
+}
+
+QModelIndex DocumentModel::makeSpherical( const QModelIndex& iv, const QModelIndex& ivec, int nb, double k)
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hv   = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvec = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makeSpherical( hv, hvec, nb, k );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/makeSpherical.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makeSpherical( const QModelIndex& icenter, double radius, int nb, double k )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hcenter = data(icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* helts = _hexaDocument->makeSpherical( hcenter, radius, nb, k );
+
+  if ( helts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* eltsItem = new ElementsItem(helts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+//     QString tmp = "/tmp/makeSpherical.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete helts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makeCylinder( const QModelIndex& icyl, const QModelIndex& ivec,
+                                         int nr, int na, int nl )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Cylinder* hcyl = data(icyl, HEXA_DATA_ROLE).value<HEXA_NS::Cylinder *>();
+  HEXA_NS::Vector* hvec   = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makeCylinder( hcyl, hvec, nr, na, nl );
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/makeCylinder.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makePipe( const QModelIndex& ipipe, const QModelIndex& ivecx, 
+                                     int nr, int na, int nl )
+{ 
+  QModelIndex iElts;
+
+  HEXA_NS::Pipe*   hPipe  = data(ipipe, HEXA_DATA_ROLE).value<HEXA_NS::Pipe *>();
+  HEXA_NS::Vector* hVecx  = data(ivecx, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makePipe( hPipe, hVecx, nr, na, nl );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/makePipe.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makeCylinders(const QModelIndex& icyl1, const QModelIndex& icyl2)
+{ //CS_TODO
+  QModelIndex iCrossElts;
+  
+  HEXA_NS::Cylinder* hCyl1  = data(icyl1, HEXA_DATA_ROLE).value<HEXA_NS::Cylinder *>();
+  HEXA_NS::Cylinder* hCyl2  = data(icyl2, HEXA_DATA_ROLE).value<HEXA_NS::Cylinder *>();
+
+  HEXA_NS::CrossElements* hCrossElts = _hexaDocument->makeCylinders( hCyl1, hCyl2 );
+  
+  if ( hCrossElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* crossElts = new ElementsItem(hCrossElts);
+    _crossElementsDirItem->appendRow(crossElts);
+    iCrossElts = crossElts->index();    
+    QString tmp = "/tmp/makeCylinders.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hCrossElts;
+  }
+    
+  return iCrossElts;
+}
+
+//
+QModelIndex DocumentModel::makePipes( const QModelIndex& ipipe1, const QModelIndex& ipipe2 )
+{ 
+  QModelIndex iCrossElts;
+  
+  HEXA_NS::Pipe* hPipe1  = data(ipipe1, HEXA_DATA_ROLE).value<HEXA_NS::Pipe *>();
+  HEXA_NS::Pipe* hPipe2  = data(ipipe2, HEXA_DATA_ROLE).value<HEXA_NS::Pipe *>();
+
+
+//   MESSAGE("DocumentModel::makePipes( "<< ipipe1.data().toString().toStdString() << ","<< ipipe2.data().toString().toStdString() );
+// 
+//   HEXA_NS::Vertex* b1 = hPipe1->getBase();
+//   HEXA_NS::Vector* d1 = hPipe1->getDirection();
+//   MESSAGE("pipe1 vertex is  " << b1->getName()
+//                               <<"("<< b1->getX()
+//                               <<","<< b1->getY()
+//                               <<","<< b1->getZ()<<")"
+//           );
+//   MESSAGE("pipe1 vector is  " << d1->getName()
+//                               <<"("<< d1->getDx()
+//                               <<","<< d1->getDy()
+//                               <<","<< d1->getDz()<<")"
+//           );
+//   MESSAGE("pipe1 ir is  " << hPipe1->getInternalRadius());
+//   MESSAGE("pipe1 er is  " << hPipe1->getRadius());
+//   MESSAGE("pipe1 h  is  " << hPipe1->getHeight());
+// 
+// 
+//   HEXA_NS::Vertex* b2 = hPipe2->getBase();
+//   HEXA_NS::Vector* d2 = hPipe2->getDirection();
+//   MESSAGE("pipe2 vertex is  " << b2->getName()
+//                               <<"("<< b2->getX()
+//                               <<","<< b2->getY()
+//                               <<","<< b2->getZ()<<")"
+//           );
+//   MESSAGE("pipe2 vector is  " << d2->getName()
+//                               <<"("<< d2->getDx()
+//                               <<","<< d2->getDy()
+//                               <<","<< d2->getDz()<<")"
+//           );
+//   MESSAGE("pipe2 vertex is  " << hPipe2->getBase()->getName() );
+//   MESSAGE("pipe2 vector is  " << hPipe2->getDirection()->getName());
+//   MESSAGE("pipe2 ir is  " << hPipe2->getInternalRadius());
+//   MESSAGE("pipe2 er is  " << hPipe2->getRadius());
+//   MESSAGE("pipe2 h  is  " << hPipe2->getHeight());
+
+
+
+  HEXA_NS::CrossElements* hCrossElts = _hexaDocument->makePipes( hPipe1, hPipe2 );
+  
+  if ( hCrossElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* crossElts = new ElementsItem(hCrossElts);
+    _crossElementsDirItem->appendRow(crossElts);
+    iCrossElts = crossElts->index();
+    QString tmp = "/tmp/makePipes.vtk";
+    _hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hCrossElts;
+  }
+  
+  return iCrossElts;
+}
+
+QModelIndex DocumentModel::makeRind( const QModelIndex& icenter, 
+                    const QModelIndex& ivecx, const QModelIndex& ivecz,
+                    double  radext, double radint, double radhole,
+                    const QModelIndex& iplorig,
+                    int nrad, int nang, int nhaut )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hcenter = data(icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvecx   = data(ivecx, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvecz   = data(ivecz, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vertex* hplorig = data(iplorig, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makeRind( hcenter, 
+                            hvecx, hvecz,
+                            radext, radint, radhole,
+                            hplorig,
+                            nrad, nang, nhaut );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* eltsItem = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makePartRind( const QModelIndex& icenter, 
+                    const QModelIndex& ivecx, const QModelIndex& ivecz,
+                    double  radext, double radint, double radhole,
+                    const QModelIndex& iplorig, double angle,
+                    int nrad, int nang, int nhaut )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hcenter = data(icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvecx   = data(ivecx, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvecz   = data(ivecz, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vertex* hplorig = data(iplorig, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makePartRind( hcenter, 
+                            hvecx, hvecz,
+                            radext, radint, radhole,
+                            hplorig, angle,
+                            nrad, nang, nhaut );
+
+  if ( hElts->isValid() ){
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makeSphere( const QModelIndex& icenter, 
+                    const QModelIndex& ivecx, const QModelIndex& ivecz,
+                    double radius, double radhole,
+                    const QModelIndex& iplorig,
+                    int nrad, int nang, int nhaut )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hcenter = data(icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvecx   = data(ivecx, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvecz   = data(ivecz, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vertex* hplorig = data(iplorig, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makeSphere( hcenter, 
+                                                hvecx, hvecz, 
+                                                radius, radhole,
+                                                hplorig, 
+                                                nrad, nang, nhaut);
+
+  if ( hElts->isValid() ){
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::makePartSphere( const QModelIndex& icenter, 
+                    const QModelIndex& ivecx, const QModelIndex& ivecz,
+                    double  radius, double radhole,
+                    const QModelIndex& iplorig, double angle,
+                    int nrad, int nang, int nhaut )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Vertex* hcenter = data(icenter, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* hvecx   = data(ivecx, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vector* hvecz   = data(ivecz, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+  HEXA_NS::Vertex* hplorig = data(iplorig, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->makePartSphere( hcenter,
+                                                hvecx, hvecz,
+                                                radius, radhole,
+                                                hplorig, angle, 
+                                                nrad, nang, nhaut);
+
+  if ( hElts->isValid() ){
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+// ************  EDIT HEXABLOCK MODEL ************
+
+bool DocumentModel::updateVertex( const QModelIndex& ivertex, double x, double y, double z )
+{
+  bool ret = false;
+
+//   cout << "DocumentModel::updateVertex" << ivertex.data().toString().toStdString() << endl;
+//   cout << "DocumentModel::updateVertex" << ivertex.data(HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>() << endl;
+//   cout << "DocumentModel::updateVertex" << ivertex.data(HEXA_TREE_ROLE).toString().toStdString() << endl;
+//   cout << "DocumentModel::updateVertex" << ivertex.data(HEXA_DOC_ENTRY_ROLE).toString().toStdString() << endl;
+
+//   HEXA_NS::Vertex* hVertex = data(ivertex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex = ivertex.data(HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>(); //CS_TODO?  pareil pour toutes les autres méthodes du modèle?
+
+  cout << "DocumentModel::updateVertex hVertex = " << hVertex << endl;
+  if ( hVertex ){
+//     hVertex->setName( name.toStdString() );
+    hVertex->setX ( x );
+    hVertex->setY ( y );
+    hVertex->setZ ( z );
+    emit patternDataChanged();
+    ret = true;
+  }
+
+  return ret;
+}
+
+bool DocumentModel::removeHexa( const QModelIndex& ihexa )
+{
+  bool ret = false;
+  HEXA_NS::Hexa* hHexa = data(ihexa, HEXA_DATA_ROLE).value<HEXA_NS::Hexa *>();
+
+  int r = _hexaDocument->removeHexa( hHexa );
+  if ( r == HOK ){
+    updateData();
+    QString tmp = "/tmp/removeHexa.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+    ret = true;
+  } else if ( r == HERR ){    
+    ret = false;
+  }
+  
+  return ret;
+}
+
+bool DocumentModel::removeConnectedHexa( const QModelIndex& ihexa )
+{
+  bool ret = false;
+  HEXA_NS::Hexa* hHexa = data(ihexa, HEXA_DATA_ROLE).value<HEXA_NS::Hexa *>();
+  
+  int r = _hexaDocument->removeConnectedHexa( hHexa );
+  
+  if ( r == HOK ){    
+    updateData();
+    QString tmp = "/tmp/removeConnectedHexa.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+    ret = true;
+  } else if ( r == HERR ){    
+    ret = false;
+  }
+  
+  return ret;
+}
+
+QModelIndex DocumentModel::prismQuad( const QModelIndex& iquad, const QModelIndex& ivec, int nb)
+{ 
+  QModelIndex iElts;
+
+  HEXA_NS::Quad*   hQuad = data(iquad, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Vector* hVect = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->prismQuad( hQuad, hVect, nb );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/prismQuad.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::prismQuads( const QModelIndexList& iquads, const QModelIndex& ivec, int nb)
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Quads   hQuads;
+  HEXA_NS::Quad*   hQuad = NULL;
+  foreach( const QModelIndex& iquad, iquads ){
+    hQuad = data( iquad, HEXA_DATA_ROLE ).value<HEXA_NS::Quad *>();
+    hQuads.push_back( hQuad );
+  }
+  HEXA_NS::Vector* hVect = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->prismQuads( hQuads, hVect, nb );
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/prismQuads.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+  return iElts;
+}
+
+//
+QModelIndex DocumentModel::joinQuad(
+      const QModelIndex& iquadstart, const QModelIndex& iquaddest,
+      const QModelIndex& iv0, const QModelIndex& iv1,
+      const QModelIndex& iv2, const QModelIndex& iv3,
+      int nb )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Quad*   hQuadStart  = data(iquadstart, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad*   hQuadDest   = data(iquaddest, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+
+  HEXA_NS::Vertex* hVertex0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex2 = data(iv2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex3 = data(iv3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->joinQuad( hQuadStart, hQuadDest,
+                        hVertex0,  hVertex1,  hVertex2,  hVertex3, nb );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/joinQuad.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::joinQuads( 
+      const QModelIndexList& iquadsstart, const QModelIndex& iquaddest,
+      const QModelIndex& iv0, const QModelIndex& iv1,
+      const QModelIndex& iv2, const QModelIndex& iv3,
+      int nb )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Quad*   hQuadStart;
+  HEXA_NS::Quads  hQuadsStart;
+
+  foreach( const QModelIndex& iquad, iquadsstart ){
+    hQuadStart = data( iquad, HEXA_DATA_ROLE ).value<HEXA_NS::Quad *>();
+    hQuadsStart.push_back( hQuadStart );
+  }
+  HEXA_NS::Quad*   hQuadDest = data( iquaddest, HEXA_DATA_ROLE ).value<HEXA_NS::Quad *>();
+
+  HEXA_NS::Vertex* hVertex0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex2 = data(iv2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hVertex3 = data(iv3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->joinQuads(
+                        hQuadsStart, hQuadDest,
+                        hVertex0,  hVertex1,  hVertex2,  hVertex3,
+                        nb );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TODO more or less?
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/joinQuads.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+bool DocumentModel::mergeVertices( const QModelIndex &iv0, const QModelIndex &iv1 ) //CS_TODO : impact sur le model?
+{
+  bool ret = false;
+
+  HEXA_NS::Vertex* hv0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  int r = _hexaDocument->mergeVertices( hv0, hv1 );
+  if ( r == HOK ){
+    updateData(); //CS_TODO more or less?
+    //std::cout << "DocumentModel:: mergeVertices => OK " << std::endl;
+    QString tmp = "/tmp/mergeVertices.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+    ret = true;
+  } else if ( r == HERR ){
+    //std::cout << "DocumentModel:: mergeVertices => KO " << std::endl;
+    ret = false;
+  }
+
+  return ret;
+}
+
+bool DocumentModel::mergeEdges( const QModelIndex &ie0, const QModelIndex &ie1,
+                                const QModelIndex &iv0, const QModelIndex &iv1 )
+//CS_TODO : impact sur le model?
+{
+  bool ret = false;
+
+  HEXA_NS::Edge* he0 = data(ie0, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+  HEXA_NS::Edge* he1 = data(ie1, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+
+  HEXA_NS::Vertex* hv0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  int r = _hexaDocument->mergeEdges( he0, he1, hv0, hv1 ); 
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/mergeEdges.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+bool DocumentModel::mergeQuads( const QModelIndex& iquad0, const QModelIndex& iquad1,
+                                const QModelIndex& iv0, const QModelIndex& iv1,
+                                const QModelIndex& iv2, const QModelIndex& iv3 )
+{
+  bool ret = false;
+
+  HEXA_NS::Quad* hquad0 = data(iquad0, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+  HEXA_NS::Quad* hquad1 = data(iquad1, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+
+  HEXA_NS::Vertex* hv0 = data(iv0, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv1 = data(iv1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv2 = data(iv2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hv3 = data(iv3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  int r = _hexaDocument->mergeQuads( hquad0, hquad1, hv0, hv1, hv2, hv3 );
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/mergeQuads.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+//
+QModelIndex DocumentModel::disconnectVertex( const QModelIndex& ihexa, const QModelIndex& ivertex )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Hexa*   hHexa   = data( ihexa, HEXA_DATA_ROLE ).value<HEXA_NS::Hexa *>();
+  HEXA_NS::Vertex* hVertex = data( ivertex, HEXA_DATA_ROLE ).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->disconnectVertex( hHexa, hVertex );
+
+  if ( hElts && hElts->isValid() ){
+    updateData(); //CS_TO_CHECK
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/disconnectVertex.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+QModelIndex DocumentModel::disconnectEdge( const QModelIndex& ihexa, const QModelIndex& iedge )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Hexa* hHexa = data( ihexa, HEXA_DATA_ROLE ).value<HEXA_NS::Hexa *>();
+  HEXA_NS::Edge* hEdge = data( iedge, HEXA_DATA_ROLE ).value<HEXA_NS::Edge *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->disconnectEdge( hHexa, hEdge );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TO_CHECK
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/disconnectEdge.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::disconnectEdges( const QModelIndexList& ihexas, const QModelIndexList& iedges )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Hexas hHexas;
+  HEXA_NS::Edges hEdges;
+
+  //Construction de la liste des edges
+  HEXA_NS::Edge* hedge = NULL;
+  foreach( const QModelIndex& iedge, iedges ){
+    hedge = data( iedge, HEXA_DATA_ROLE ).value<HEXA_NS::Edge *>();
+    hEdges.push_back( hedge );
+  }
+
+  //Construction de la liste des hexas
+  HEXA_NS::Hexa* hhexa = NULL;
+  foreach( const QModelIndex& ihexa, ihexas ){
+    hhexa = data( ihexa, HEXA_DATA_ROLE ).value<HEXA_NS::Hexa *>();
+    hHexas.push_back( hhexa );
+  }
+
+
+  HEXA_NS::Elements* hElts = _hexaDocument->disconnectEdges( hHexas, hEdges );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TO_CHECK
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/disconnectEdges.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::disconnectQuad( const QModelIndex& ihexa, const QModelIndex& iquad )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Hexa* hHexa = data( ihexa, HEXA_DATA_ROLE ).value<HEXA_NS::Hexa *>();
+  HEXA_NS::Quad* hQuad = data( iquad, HEXA_DATA_ROLE ).value<HEXA_NS::Quad *>();
+
+  HEXA_NS::Elements* hElts = _hexaDocument->disconnectQuad( hHexa, hQuad );
+
+  if ( hElts->isValid() ){
+    updateData(); //CS_TO_CHECK
+    ElementsItem* elts = new ElementsItem(hElts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/disconnectQuad.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::cutEdge( const QModelIndex &i_e0, int nbcuts )
+//CS_TODO : impact sur le model?
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Edge* he0 = data(i_e0, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+  HEXA_NS::Elements* helts = _hexaDocument->cut( he0, nbcuts );
+
+  if ( helts->isValid() ){
+    updateData(); //CS_TODO more?
+    ElementsItem* elts = new ElementsItem(helts);
+    _elementsDirItem->appendRow(elts);
+    iElts = elts->index();
+    QString tmp = "/tmp/cutEdge.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete helts;
+  }
+
+  return iElts;
+}
+
+
+
+
+// Elements makeTranslation( in Elements l, in Vector vec )
+//         raises (SALOME::SALOME_Exception);
+QModelIndex DocumentModel::makeTranslation( const QModelIndex& ielts, const QModelIndex& ivec )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeTranslation( hElts, hVec );
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeTranslation.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+
+QModelIndex DocumentModel::makeScale( const QModelIndex& ielts, const QModelIndex& ivex, double k )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeScale( hElts, hVex, k );
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeScale.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+
+QModelIndex DocumentModel::makeRotation( const QModelIndex& ielts, 
+                                         const QModelIndex& iv, 
+                                         const QModelIndex& ivec, double angle )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeRotation( hElts, hVex, hVec, angle );
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeRotation.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::makeSymmetryPoint( const QModelIndex& ielts, const QModelIndex& iv )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>(); 
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeSymmetryPoint (hElts, hVex);
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeSymmetryPoint.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::makeSymmetryLine( const QModelIndex& ielts, 
+                                             const QModelIndex& iv, 
+                                             const QModelIndex& ivec )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeSymmetryLine( hElts, hVex, hVec );
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeSymmetryLine.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+QModelIndex DocumentModel::makeSymmetryPlane( const QModelIndex& ielts, const QModelIndex& iv, const QModelIndex& ivec )
+{
+  QModelIndex iElts;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(iv, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  HEXA_NS::Elements* hNewElts = _hexaDocument->makeSymmetryPlane( hElts, hVex, hVec );
+
+  if ( hNewElts->isValid() ){
+    updateData(); //CS_TODO  more or less?
+    ElementsItem* eltsItem = new ElementsItem(hNewElts);
+    _elementsDirItem->appendRow(eltsItem);
+    iElts = eltsItem->index();
+    QString tmp = "/tmp/makeSymmetryPlane.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else {
+    delete hNewElts;
+  }
+
+  return iElts;
+}
+
+
+bool DocumentModel::performTranslation( const QModelIndex& ielts, const QModelIndex& ivec )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  int r = _hexaDocument->performTranslation (hElts, hVec);
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performTranslation.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+
+//
+bool DocumentModel::performScale( const QModelIndex& ielts, const QModelIndex& ivex, double k )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  int r = _hexaDocument->performScale (hElts, hVex, k);
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performScale.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+//
+bool DocumentModel::performRotation( const QModelIndex& ielts, const QModelIndex& ivex, const QModelIndex& ivec, double angle )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  int r = _hexaDocument-> performRotation( hElts, hVex, hVec, angle );
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performRotation.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+
+//
+bool DocumentModel::performSymmetryPoint( const QModelIndex& ielts, const QModelIndex& ivex )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  int r = _hexaDocument->performSymmetryPoint( hElts, hVex );
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performSymmetryPoint.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+
+bool DocumentModel::performSymmetryLine( const QModelIndex& ielts, const QModelIndex& ivex, const QModelIndex& ivec )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  int r = _hexaDocument->performSymmetryLine( hElts, hVex, hVec );
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performSymmetryLine.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+
+bool DocumentModel::performSymmetryPlane( const QModelIndex& ielts,
+                                          const QModelIndex& ivex,
+                                          const QModelIndex& ivec )
+{
+  bool ret = false;
+
+  HEXA_NS::Elements* hElts = data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements *>();
+  HEXA_NS::Vertex*   hVex  = data(ivex, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector*   hVec  = data(ivec, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+  int r = _hexaDocument->performSymmetryPlane( hElts, hVex, hVec );
+  if ( r == HOK ){
+    updateData();
+    ret = true;
+    QString tmp = "/tmp/performSymmetryPlane.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+QModelIndex DocumentModel::revolutionQuads( const QModelIndexList& istartquads,
+                                            const QModelIndex& icenter, 
+                                            const QModelIndex& ivecaxis, 
+                                            const QList<double>& angles )
+{
+  QModelIndex ielts;
+
+  HEXA_NS::Quads   hstartquads;
+  HEXA_NS::Quad*   hquad = NULL;
+  foreach( const QModelIndex& iquad, istartquads){
+    hquad = data( iquad, HEXA_DATA_ROLE ).value<HEXA_NS::Quad*>();
+    hstartquads.push_back( hquad );
+  }
+  HEXA_NS::Vertex* hcenter = data( icenter,  HEXA_DATA_ROLE ).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vector* haxis   = data( ivecaxis, HEXA_DATA_ROLE ).value<HEXA_NS::Vector *>();
+  std::vector<double> hangles = angles.toVector().toStdVector();
+
+  HEXA_NS::Elements* helts = _hexaDocument->revolutionQuads( hstartquads, hcenter, haxis, hangles );
+
+  if ( helts && helts->isValid() ){
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(helts);
+    _elementsDirItem->appendRow(eltsItem);
+    ielts = eltsItem->index();
+  } else {
+    delete helts;
+  }
+
+  return ielts;
+}
+
+QModelIndex DocumentModel::replace( const QModelIndexList& iquadsPattern,
+                             const QModelIndex& ip1, const QModelIndex& ic1,
+                             const QModelIndex& ip2, const QModelIndex& ic2,
+                             const QModelIndex& ip3, const QModelIndex& ic3 )
+{
+  QModelIndex ielts;
+
+  HEXA_NS::Vertex* hp1 = data(ip1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hc1 = data(ic1, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hp2 = data(ip2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hc2 = data(ic2, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hp3 = data(ip3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+  HEXA_NS::Vertex* hc3 = data(ic3, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+
+  HEXA_NS::Quads   hquads;
+  HEXA_NS::Quad*   hquad = NULL;
+  foreach( const QModelIndex& iquad, iquadsPattern ){
+    hquad = data( iquad, HEXA_DATA_ROLE ).value<HEXA_NS::Quad*>();
+    hquads.push_back( hquad );
+  }
+
+  HEXA_NS::Elements* helts = _hexaDocument->replace( hquads,
+                                hp1, hc1, hp2, hc2, hp3, hc3 );
+//   HEXA_NS::Elements* helts = NULL;
+
+  if ( helts && helts->isValid() ){
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(helts);
+    _elementsDirItem->appendRow(eltsItem);
+    ielts = eltsItem->index();
+  } else {
+    delete helts;
+  }
+
+  return ielts;
+}
+
+// ************  ADD ASSOCIATION ************
+//
+void DocumentModel::addAssociation( const QModelIndex& iElt, const DocumentModel::GeomObj& assocIn )
+{
+//   assocIn.name;
+  HEXA_NS::Shape* assoc = new HEXA_NS::Shape( assocIn.brep.toStdString() );//CS_TODO : delete assoc
+  assoc->debut =  assocIn.start;
+  assoc->fin   =  assocIn.end;
+  assoc->ident =  ( assocIn.entry + "," + assocIn.subid ).toStdString();
+  _assocName[ assocIn.entry ] = assocIn.name; // for getAssociations()
+
+  QString currentAssoc, newAssoc;
+
+  if ( data(iElt, HEXA_TREE_ROLE) == VERTEX_TREE ){
+    HEXA_NS::Vertex* hVex = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+    hVex->setAssociation( assoc );
+  } else if ( data(iElt, HEXA_TREE_ROLE) == EDGE_TREE ){
+    HEXA_NS::Edge*   hEdge = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+    hEdge->addAssociation( assoc );
+  } else if ( data(iElt, HEXA_TREE_ROLE) == QUAD_TREE ){
+    HEXA_NS::Quad*   hQuad  = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+    hQuad->addAssociation( assoc );
+  }
+
+  currentAssoc = data( iElt, HEXA_ASSOC_ENTRY_ROLE ).toString();
+  if ( !currentAssoc.isEmpty() ){
+    newAssoc = currentAssoc + assocIn.entry + "," + assocIn.subid + ";";
+  } else {
+    newAssoc = assocIn.entry + "," + assocIn.subid + ";";
+  }
+
+  //std::cout << "addAssociation() newAssoc =>"  << newAssoc.toStdString()  << std::endl;
+  setData( iElt, QVariant::fromValue(newAssoc), HEXA_ASSOC_ENTRY_ROLE );
+
+  // tree view : 
+/*
+  QList<QStandardItem *>  assocItems;
+  QStandardItem *aAssocItem = NULL;
+
+  QStandardItem *item = NULL;
+
+  aAssocItem = new QStandardItem(assocIn.name);
+  aAssocItem->setData( assocIn.entry + "," + assocIn.subid, HEXA_ENTRY_ROLE );
+
+
+  assocItems << aAssocItem;
+  item = itemFromIndex(iElt);
+  item->appendColumn(assocItems);
+//     appendColumn(assocItems);
+//     item->appendRow( assocItems );
+//     item->appendRow( new QStandardItem(assocIn.name) );
+  if ( item->columnCount() > columnCount() )
+    setColumnCount( columnCount()+1 );
+*/
+}
+
+
+QList<DocumentModel::GeomObj> DocumentModel::getAssociations( const QModelIndex& iElt )
+{
+  MESSAGE("DocumentModel::getAssociations( "<< iElt.data().toString().toStdString() << " )" );
+  QList<DocumentModel::GeomObj> res;
+  DocumentModel::GeomObj        assoc;
+
+  //std::cout << "getAssociations() start"  << std::endl;
+  if ( data(iElt, HEXA_TREE_ROLE) == VERTEX_TREE ){
+    MESSAGE("*  of a Vertex");
+    HEXA_NS::Vertex* hVex = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>();
+    HEXA_NS::Shape* hShape = hVex->getAssociation();
+    QStringList shapeID;
+    if ( hShape != NULL ){
+      assoc.entry = "";
+      assoc.subid = QString::number(-1);
+      assoc.name  = "";
+      assoc.brep  = hShape->getBrep().c_str();
+      assoc.start = hShape->debut;
+      assoc.end   = hShape->fin;
+
+      shapeID = QString( hShape->ident.c_str() ).split(",");
+      if ( shapeID.count() == 2 ){
+        assoc.entry = shapeID[0];
+        assoc.subid = shapeID[1].isEmpty()? QString::number(-1) : shapeID[1];
+        assoc.name  = _assocName[assoc.entry];
+      }
+      MESSAGE("*  assoc.entry"  << assoc.entry.toStdString() );
+      MESSAGE("*  assoc.subid"  << assoc.subid.toStdString() );
+      MESSAGE("*  -----------" );
+      res << assoc;
+    }
+  } else if ( data(iElt, HEXA_TREE_ROLE) == EDGE_TREE ){
+    MESSAGE("*  of an Edge");
+    HEXA_NS::Edge*   hEdge = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>();
+    HEXA_NS::Shapes  hShapes = hEdge->getAssociations();
+    QStringList shapeID;
+    for ( HEXA_NS::Shapes::iterator it = hShapes.begin(); it != hShapes.end(); ++it){
+      assoc.entry = "";
+      assoc.subid = QString::number(-1);
+      assoc.name  = "";
+      assoc.brep  = (*it)->getBrep().c_str();
+      assoc.start = (*it)->debut;
+      assoc.end   = (*it)->fin;
+
+      MESSAGE("*  assoc.ident " << (*it)->ident );
+      shapeID = QString( (*it)->ident.c_str() ).split(",");
+      if ( shapeID.count() == 2 ){
+        assoc.entry = shapeID[0];
+        assoc.subid = shapeID[1].isEmpty()? QString::number(-1) : shapeID[1];
+        assoc.name  = _assocName[assoc.entry];
+      }
+      MESSAGE("*  assoc.entry" << assoc.entry.toStdString() );
+      MESSAGE("*  assoc.subid" << assoc.subid.toStdString() );
+      MESSAGE("*  assoc.brep"  << assoc.brep.toStdString() );
+      MESSAGE("*  assoc.start" << assoc.start );
+      MESSAGE("*  assoc.end"   << assoc.end );
+      MESSAGE("*  -----------" );
+      res << assoc;
+    }
+  } else if ( data(iElt, HEXA_TREE_ROLE) == QUAD_TREE ){
+    MESSAGE("*  of a Quad");
+    HEXA_NS::Quad*   hQuad  = data(iElt, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+    HEXA_NS::Shapes  hShapes = hQuad->getAssociations();
+    QStringList shapeID;
+    for ( HEXA_NS::Shapes::iterator it = hShapes.begin(); it != hShapes.end(); ++it){
+      assoc.entry = "";
+      assoc.subid = QString::number(-1);
+      assoc.name  = "";
+      assoc.brep  = (*it)->getBrep().c_str();
+      assoc.start = (*it)->debut;
+      assoc.end   = (*it)->fin;
+      MESSAGE("*  assoc.entry" << assoc.entry.toStdString() );
+      MESSAGE("*  assoc.subid" << assoc.subid.toStdString() );
+//       MESSAGE("*  assoc.brep"  << assoc.brep.toStdString() );
+//       MESSAGE("*  assoc.start" << assoc.start );
+//       MESSAGE("*  assoc.end"   << assoc.end );
+      MESSAGE("*  -----------" );
+      shapeID = QString( (*it)->ident.c_str() ).split(",");
+      if ( shapeID.count() == 2 ){
+        assoc.entry = shapeID[0];
+        assoc.subid = shapeID[1].isEmpty()? QString::number(-1) : shapeID[1];
+        assoc.name  = _assocName[assoc.entry];
+      }
+
+      res << assoc;
+    }
+  }
+
+  MESSAGE("}" );
+  return res;
+}
+
+//         int associateOpenedLine (Edge*  mstart, Edges&  mline, Shape* gstart, 
+//                              double pstart, Shapes& gline, double pend);
+//         int  associateClosedLine (Vertex* mfirst, Edge*  mstart, Edges&  mline, 
+//                              Shape*  gstart, double pstart, Shapes& gline);
+bool DocumentModel::associateOpenedLine( const QModelIndexList& iedges,
+                                         const GeomObjList&     assocs,
+                                         double pstart,
+                                         double pend )
+{
+    MESSAGE("DocumentModel::associateOpenedLine() ");
+    bool ret = false;
+    HEXA_NS::Edge*  mstart = NULL;
+    HEXA_NS::Edges  mline;
+    HEXA_NS::Shape* gstart = NULL;
+//     double pstart;
+    HEXA_NS::Shapes gline;
+//     double pend;
+
+    HEXA_NS::Edge* hedge = NULL;
+    foreach( const QModelIndex& iedge, iedges ){
+        hedge = data( iedge, HEXA_DATA_ROLE ).value<HEXA_NS::Edge *>();
+        if ( mstart == NULL ){
+            mstart = hedge;
+            MESSAGE("*    mstart" << iedge.data().toString().toStdString() );
+        } else {
+            mline.push_back( hedge );
+            MESSAGE("*    mline :" << iedge.data().toString().toStdString() );
+        }
+    }
+
+    HEXA_NS::Shape* hshape = NULL;
+    foreach( const GeomObj& anAssoc, assocs ){
+        hshape = new HEXA_NS::Shape( anAssoc.brep.toStdString() );
+        hshape->debut = anAssoc.start;  //0.;
+        hshape->fin   = anAssoc.end;    //1.;
+        hshape->ident = ( anAssoc.entry + "," + anAssoc.subid ).toStdString(); //anAssoc.entry.toStdString();
+
+        if ( gstart == NULL ){
+            gstart = hshape; // CS_TODO :gstart.debut = pstart ??
+            MESSAGE("*    gstart->debut" << gstart->debut);
+            MESSAGE("*    gstart->fin"   << gstart->fin);
+            MESSAGE("*    gstart->ident" << gstart->ident);
+            MESSAGE("*    gstart->getBrep()" << gstart->getBrep());
+//             pstart = anAssoc.start;
+        } else {
+            gline.push_back( hshape ); //CS_TODO : hshape.fin = pend ??
+            MESSAGE("*    gline->debut" << hshape->debut);
+            MESSAGE("*    gline->fin"   << hshape->fin);
+            MESSAGE("*    gline->ident" << hshape->ident);
+            MESSAGE("*    gline->getBrep()" << hshape->getBrep());
+        }
+    }
+//     pend = assocs.last().end;
+    MESSAGE("*    pstart" << pstart );
+    MESSAGE("*    pend"   << pend );
+
+    int r = _hexaDocument->associateOpenedLine( mstart, mline,
+                                                gstart, pstart, gline, pend );
+//     HEXA_NS::Edge *e0     = _hexaDocument->getEdge(0);
+//     HEXA_NS::Edge *e1     = _hexaDocument->getEdge(1);
+//     HEXA_NS::Shapes  mstartAssoc = e0->getAssociations();
+//     HEXA_NS::Shapes  mlineAssoc  = e1->getAssociations();
+//     HEXA_NS::Shapes  mstartAssoc = mstart->getAssociations();
+//     HEXA_NS::Shapes  mlineAssoc= mline[0]->getAssociations();
+//     std::cout << "DocumentModel:: associateOpenedLine : mstartAssoc.size() => " << mstartAssoc.size() << std::endl;
+// std::cout << "DocumentModel:: associateOpenedLine : mstartAssoc[0]->ident=> " << mstartAssoc[0]->ident << std::endl;
+//     std::cout << "DocumentModel:: associateOpenedLine : mlineAssoc[0]->ident => " << mlineAssoc[0]->ident << std::endl;
+
+    if ( r == HOK ){
+        updateData();
+        MESSAGE("*    DocumentModel:: associateOpenedLine() => OK ");
+        ret = true;
+    } else if ( r == HERR ){
+        MESSAGE("*    DocumentModel:: associateOpenedLine() => ERR ");
+        ret = false;
+    }
+    delete gstart; //CS_TODO : delete gline?
+    return ret;
+}
+
+bool DocumentModel::associateClosedLine( const  QModelIndex& ivertex,
+                                         const  QModelIndexList& iedges,
+                                         const  GeomObjList&     assocs,
+                                         double pstart,
+                                        bool   inv )
+{
+    MESSAGE("DocumentModel::associateClosedLine() ");
+    bool ret = false;
+    HEXA_NS::Vertex* mfirst = data( ivertex, HEXA_DATA_ROLE ).value<HEXA_NS::Vertex *>();
+    HEXA_NS::Edge*   mstart = NULL;
+    HEXA_NS::Edges   mline;
+    HEXA_NS::Shape*  gstart = NULL;
+//     double  pstart;
+    HEXA_NS::Shapes  gline;
+
+
+    HEXA_NS::Edge* hedge = NULL;
+    foreach( const QModelIndex& iedge, iedges ){
+        hedge = data( iedge, HEXA_DATA_ROLE ).value<HEXA_NS::Edge *>();
+        if ( mstart == NULL ){
+            mstart = hedge;
+            MESSAGE("*    mstart" << iedge.data().toString().toStdString() );
+        } else {
+            mline.push_back( hedge );
+            MESSAGE("*    mline :" << iedge.data().toString().toStdString() );
+        }
+    }
+
+    HEXA_NS::Shape* hshape = NULL;
+    foreach( const GeomObj& anAssoc, assocs ){
+        hshape = new HEXA_NS::Shape( anAssoc.brep.toStdString() );
+        hshape->debut = anAssoc.start; //0.;
+        hshape->fin   = anAssoc.end; //1.;
+        hshape->ident = ( anAssoc.entry + "," + anAssoc.subid ).toStdString();//anAssoc.entry.toStdString();
+
+        if ( gstart == NULL ){
+            gstart = hshape; // CS_TODO :gstart.debut = pstart ??
+//             pstart = anAssoc.start;
+            MESSAGE("*    gstart->debut" << gstart->debut);
+            MESSAGE("*    gstart->fin"   << gstart->fin);
+            MESSAGE("*    gstart->ident" << gstart->ident);
+            MESSAGE("*    gstart->getBrep()" << gstart->getBrep());
+        } else {
+            gline.push_back( hshape ); //CS_TODO : hshape.fin = pend ??
+            MESSAGE("*    gline->debut" << hshape->debut);
+            MESSAGE("*    gline->fin"   << hshape->fin);
+            MESSAGE("*    gline->ident" << hshape->ident);
+            MESSAGE("*    gline->getBrep()" << hshape->getBrep());
+        }
+    }
+    MESSAGE("*    pstart" << pstart );
+
+    int r = _hexaDocument->associateClosedLine( mfirst, mstart, mline,
+                                                gstart, pstart, inv, gline );
+    if ( r == HOK ){
+        updateData();
+        //std::cout << "DocumentModel:: associateClosedLine => OK " << std::endl;
+        ret = true;
+    } else if ( r == HERR ){
+        //std::cout << "DocumentModel:: associateClosedLine => ERR " << std::endl;
+        ret = false;
+    }
+    return ret;
+}
+
+// ************  GROUPS  ************
+//
+QModelIndex DocumentModel::addGroup( const QString& name, Group kind )
+{
+  QModelIndex iGroup;
+
+  HEXA_NS::Group* hGroup = _hexaDocument->addGroup( name.toLocal8Bit().constData(), kind );
+
+  GroupItem* groupItem = new GroupItem(hGroup);
+  groupItem->setData( _entry, HEXA_DOC_ENTRY_ROLE );
+  _groupDirItem->appendRow(groupItem);
+  iGroup = groupItem->index();
+  QString tmp = "/tmp/addGroup.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+
+  return iGroup;
+}
+
+//
+bool DocumentModel::removeGroup( const QModelIndex& igrp )
+{
+  bool ret = false;
+
+  HEXA_NS::Group* hGroup = data(igrp, HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+  int r = _hexaDocument->removeGroup ( hGroup );
+
+  if ( r == HOK ){
+    removeRow( igrp.row(), igrp.parent());
+    ret = true;
+    QString tmp = "/tmp/removeGroup.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+  return ret;
+}
+
+QModelIndexList DocumentModel::getGroupElements( const QModelIndex& iGroup, DocumentModel::Group& kind ) const
+{
+  QModelIndexList iElements;
+
+  HEXA_NS::Group* g = iGroup.data(HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+  if ( !g ) return iElements;
+
+  QModelIndexList iFound;
+  QVariant q;
+  HEXA_NS::EltBase* eltBase = NULL;
+  for ( int nr = 0; nr < g->countElement(); ++nr ){
+    eltBase = g->getElement( nr );
+    //std::cout<< "eltBase"<< eltBase << std::endl;
+    kind = g->getKind();
+    switch ( kind ){
+      case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: q = QVariant::fromValue( (HEXA_NS::Hexa *)eltBase ); break;
+      case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: q = QVariant::fromValue( (HEXA_NS::Quad *)eltBase ); break;
+      case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: q = QVariant::fromValue( (HEXA_NS::Edge *)eltBase ); break;
+      case HEXA_NS::VertexNode: q = QVariant::fromValue( (HEXA_NS::Vertex *)eltBase ); break;
+    }
+    iFound = match( index(0, 0),
+                    HEXA_DATA_ROLE,
+                    q,
+                    1,
+                    Qt::MatchRecursive );
+    if ( !iFound.isEmpty() )
+      iElements << iFound[0];
+  }
+  return iElements;
+}
+
+// 7.4 Boite: éditer un groupe
+void DocumentModel::setGroupName( const QModelIndex& igrp, const QString& name )
+{
+  HEXA_NS::Group* hGroup = data(igrp, HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+
+  if ( hGroup ){
+    hGroup->setName( name.toLocal8Bit().constData() );
+    setData(igrp, QVariant::fromValue( name ) );
+  }
+
+  QString tmp = "/tmp/setGroupName.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+}
+
+bool DocumentModel::addGroupElement( const QModelIndex& igrp, const QModelIndex& ielt )
+{ //CS_TODO : check input? add child?
+// int       addElement    (EltBase* elt);
+
+  bool addOk = false;
+  HEXA_NS::Group*   hGroup = data(igrp, HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+  HEXA_NS::EltBase* hElt   = NULL; 
+  switch ( hGroup->getKind() ){
+  case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: hElt = data(ielt, HEXA_DATA_ROLE).value<HEXA_NS::Hexa *>(); break;
+  case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: hElt = data(ielt, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>(); break;
+  case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: hElt = data(ielt, HEXA_DATA_ROLE).value<HEXA_NS::Edge *>(); break;
+  case HEXA_NS::VertexNode: hElt = data(ielt, HEXA_DATA_ROLE).value<HEXA_NS::Vertex *>(); break;
+  }
+
+  //std::cout << "hGroup" << hGroup << std::endl;
+  //std::cout << "hElt"   << hElt   << std::endl;
+
+  int res = HERR;   
+  if ( hGroup and hElt )
+    res = hGroup->addElement( hElt );
+
+  if ( res == HOK ) addOk = true;
+
+//   QString tmp = "/tmp/addGroupElement.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+
+  return addOk;
+}
+
+bool DocumentModel::removeGroupElement( const QModelIndex& igrp, int nro )
+{ //CS_TODO : remove child?
+  HEXA_NS::Group* hGroup = data(igrp, HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+
+  if ( hGroup )
+    hGroup->removeElement( nro );
+
+  QString tmp = "/tmp/removeGroupElement.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+}
+
+bool DocumentModel::clearGroupElement( const QModelIndex& igrp )
+{
+  HEXA_NS::Group* hGroup = data(igrp, HEXA_DATA_ROLE).value<HEXA_NS::Group *>();
+
+  if ( hGroup )
+    hGroup->clearElement();
+
+  QString tmp = "/tmp/clearGroupElement.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+}
+
+// ************  LAWS  ************
+
+//
+QModelIndex DocumentModel::addLaw( const QString& name, int nbnodes )
+{
+  QModelIndex iLaw;
+
+  HEXA_NS::Law* hLaw = _hexaDocument->addLaw( name.toLocal8Bit().constData(), nbnodes );
+
+  LawItem* lawItem = new LawItem(hLaw);
+  _lawDirItem->appendRow(lawItem);
+  iLaw = lawItem->index();
+  QString tmp = "/tmp/addLaw.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+
+  return iLaw;
+}
+
+bool DocumentModel::setLaw( const QModelIndex& ilaw, int nbnodes, double coeff, KindLaw type )
+{
+  bool ret = false;
+
+  HEXA_NS::Law* hLaw = data(ilaw, HEXA_DATA_ROLE).value<HEXA_NS::Law *>();
+
+  if ( hLaw ){
+    int ok;
+    ok = hLaw->setNodes( nbnodes );
+    ( ok == HOK) ? ret = true : ret = false;
+    ok = hLaw->setCoefficient( coeff );
+    hLaw->setKind(type);
+  }
+
+  QString tmp = "/tmp/setLaw.vtk";
+  //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  return ret;
+}
+
+// 
+bool  DocumentModel::removeLaw( const QModelIndex& ilaw )
+{
+  bool ret = false;
+  HEXA_NS::Law* hLaw = data(ilaw, HEXA_DATA_ROLE).value<HEXA_NS::Law *>();
+  int r = _hexaDocument->removeLaw( hLaw );
+
+  if ( r == HOK ){
+    removeRow( ilaw.row(),  ilaw.parent());
+    ret = true;
+    QString tmp = "/tmp/removeLaw.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+
+  return ret;
+}
+
+bool DocumentModel::setPropagation( const QModelIndex& iPropagation, const QModelIndex& iLaw, bool way )
+{
+  bool ret = false;
+  HEXA_NS::Propagation* hPropagation = data(iPropagation, HEXA_DATA_ROLE).value<HEXA_NS::Propagation *>();
+  HEXA_NS::Law* hLaw = data(iLaw, HEXA_DATA_ROLE).value<HEXA_NS::Law *>();
+
+  int r = hPropagation->setLaw( hLaw );
+  hPropagation->setWay( way );
+
+  if ( r == HOK ){
+    ret = true;
+    QString tmp = "/tmp/setPropagation.vtk";
+    //_hexaDocument->saveVtk( tmp.toLocal8Bit().constData() );
+  } else if ( r == HERR ){
+    ret = false;
+  }
+  return ret;
+}
+
+QModelIndexList DocumentModel::getPropagation( const QModelIndex& iPropagation ) const
+{
+  QModelIndexList iEdges;
+
+  QModelIndexList iFound;
+  HEXA_NS::Propagation* propa = iPropagation.data(HEXA_DATA_ROLE).value<HEXA_NS::Propagation *>();
+  if ( !propa ) return iEdges;
+
+  const HEXA_NS::Edges& edges = propa->getEdges();
+  for ( HEXA_NS::Edges::const_iterator anEdge = edges.begin();
+        anEdge != edges.end();
+        ++anEdge ){
+    iFound = match( index(0, 0),
+              HEXA_DATA_ROLE,
+              QVariant::fromValue( *anEdge ),
+              1,
+              Qt::MatchRecursive);
+    if ( !iFound.isEmpty() )
+      iEdges << iFound[0];
+  }
+
+  return iEdges;
+}
+
+HEXA_NS::Document* DocumentModel::documentImpl()
+{
+  return _hexaDocument;
+}
+
+QString DocumentModel::documentEntry()
+{
+  return _entry;
+}
+
+// QModelIndex DocumentModel::indexBy( int role, const QString& value )
+// {
+//   QModelIndex eltIndex; // element (vertex, edge, quad) of model
+//   QModelIndexList theIndexes = match( index(0, 0),
+//                                       role,
+//                                       value,
+//                                       1,
+//                                       Qt::MatchRecursive | Qt::MatchContains );//Qt::MatchFixedString );
+//   if ( theIndexes.count()>0 )
+//     eltIndex = theIndexes[0] ;
+//   return eltIndex;
+// }
+
+
+// 8.3 Boite: éditer une loi  CS_TODO
+// (idem création)
+
+/*****************************************************************
+                      PatternDataModel
+*****************************************************************/
+
+PatternDataModel::PatternDataModel( QObject * parent ) :
+  QSortFilterProxyModel( parent )
+{
+  QString dataRegExp = QString("(%1|%2|%3|%4|%5|%6|%7|%8)").
+        arg(VERTEX_TREE).arg(EDGE_TREE).arg(QUAD_TREE).arg(HEXA_TREE).
+        arg(VERTEX_DIR_TREE).arg(EDGE_DIR_TREE).arg(QUAD_DIR_TREE).arg(HEXA_DIR_TREE);
+
+  setFilterRole(HEXA_TREE_ROLE);
+  setFilterRegExp ( QRegExp(dataRegExp) );
+}
+
+PatternDataModel::~PatternDataModel()
+{
+}
+
+HEXA_NS::Document* PatternDataModel::documentImpl()
+{
+  HEXA_NS::Document* doc = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if (m) doc = m->documentImpl();
+  return doc;
+}
+
+QString PatternDataModel::documentEntry()
+{
+  QString entry;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if (m) entry = m->documentEntry();
+  return entry;
+}
+
+Qt::ItemFlags PatternDataModel::flags(const QModelIndex &index) const
+{
+//   MESSAGE("PatternDataModel::flags() "<< index.data().toString().toStdString() );
+  Qt::ItemFlags flags;
+
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    flags = m->flags( mapToSource(index) );
+  }
+
+//   if ( flags == Qt::ItemFlags( ~Qt::ItemIsEditable ) ){
+//     MESSAGE("*  you can select "<< index.data().toString().toStdString() );
+//   } else {
+//     MESSAGE("*  you cannot select  "<< index.data().toString().toStdString() );
+//   }
+
+//   MESSAGE("}");
+  return flags;
+}
+
+
+QVariant PatternDataModel::headerData ( int section, Qt::Orientation orientation, int role ) const
+{
+  if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+    return QVariant( "Data" );
+  } else {
+    return QSortFilterProxyModel::headerData ( section, orientation, role );
+  }
+}
+
+// QModelIndex PatternDataModel::addVertex( double x, double y, double z )
+// {
+//   QModelIndex vertexIndex;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     QModelIndex sourceIndex = m->addVertex( x, y, z );
+//     vertexIndex = mapFromSource(sourceIndex);
+//   }
+//   return vertexIndex;
+// }
+// 
+// void PatternDataModel::updateVertex(const QModelIndex& i_v)
+// {
+//     std::cout << "PatternDataModel::updateVertex()" << std::endl;
+//     VertexItem *item_v = dynamic_cast<VertexItem*>(itemFromIndex(i_v));
+//     DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+// 
+//     if (item_v != NULL)
+//     {
+//         std::cout << "updateVertex() : OK" << std::endl;
+//         m->updateView(item_v);
+// 
+//     }
+//     else
+//     {
+//         std::cout << "updateVertex() : NOT OK" << std::endl;
+// 
+//     }
+// }
+// 
+// 
+// QModelIndex PatternDataModel::addQuad( const QModelIndex &i_v0, const QModelIndex &i_v1,
+//                                        const QModelIndex &i_v2, const QModelIndex &i_v3 )
+// {
+//   QModelIndex quadIndex;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     QModelIndex sourceIndex = m->addQuad( mapToSource(i_v0), mapToSource(i_v1),
+//                                           mapToSource(i_v2), mapToSource(i_v3) );
+//     quadIndex = mapFromSource(sourceIndex);
+//   }
+//   return quadIndex;
+// }
+// 
+// 
+// 
+// QModelIndex PatternDataModel::addHexaFromQuad( const QModelIndex &i_q0, const QModelIndex &i_q1, const QModelIndex &i_q2,
+//                                                const QModelIndex &i_q3, const QModelIndex &i_q4, const QModelIndex &i_q5 )
+// {
+//   QModelIndex hexaIndex;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     QModelIndex sourceIndex = m->addHexaFromQuad( mapToSource(i_q0), mapToSource(i_q1), mapToSource(i_q2),
+//                                                   mapToSource(i_q3), mapToSource(i_q4), mapToSource(i_q5) );
+//     hexaIndex = mapFromSource(sourceIndex);
+//   }
+//   return hexaIndex;
+// }
+// 
+// 
+// 
+// 
+// 
+// 
+// bool PatternDataModel::mergeVertices( const QModelIndex &i_v0, const QModelIndex &i_v1 )
+// {
+//   bool ret = false;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     ret = m->mergeVertices( mapToSource(i_v0), mapToSource(i_v1) );
+//   }
+//   return ret;
+// }
+// 
+// bool PatternDataModel::mergeEdges( const QModelIndex &i_e0, const QModelIndex &i_e1,
+//                                    const QModelIndex &i_v0, const QModelIndex &i_v1 )
+// {
+//   bool ret = false;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     ret = m->mergeEdges( mapToSource(i_e0), mapToSource(i_e1),
+//                          mapToSource(i_v0), mapToSource(i_v1) );
+//   }
+//   return ret;
+// }
+// 
+// QModelIndex PatternDataModel::cutEdge( const QModelIndex &i_e0, int nbcuts )
+// {
+//   QModelIndex elementsIndex;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     QModelIndex sourceElementsIndex = m->cutEdge( mapToSource(i_e0), nbcuts );
+//     std::cout << " sourceElementsIndex.isValid() => " << sourceElementsIndex.isValid() << std::endl;
+//     elementsIndex = mapFromSource(sourceElementsIndex);
+//     std::cout << " elementsIndex.isValid() => " << elementsIndex.isValid() << std::endl;
+//   }
+//   return elementsIndex;
+// }
+
+
+QStandardItem* PatternDataModel::itemFromIndex ( const QModelIndex & index ) const
+{
+  QStandardItem *item = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    item = m->itemFromIndex( mapToSource(index) );
+  }
+  return item;
+}
+
+PatternBuilderModel::PatternBuilderModel( QObject * parent ) :
+  QSortFilterProxyModel( parent )
+{
+  QString builderRegExp =QString("(%1|%2|%3|%4|%5|%6|%7|%8|%9|%10)").
+    arg(VECTOR_TREE).arg(CYLINDER_TREE).arg(PIPE_TREE).arg(ELEMENTS_TREE).
+    arg(CROSSELEMENTS_TREE).arg(VECTOR_DIR_TREE).arg(CYLINDER_DIR_TREE).
+    arg(PIPE_DIR_TREE).arg(ELEMENTS_DIR_TREE).arg(CROSSELEMENTS_DIR_TREE);
+
+  setFilterRole( HEXA_TREE_ROLE );
+  setFilterRegExp ( QRegExp(builderRegExp ) ); 
+}
+
+PatternBuilderModel::~PatternBuilderModel() 
+{
+}
+
+Qt::ItemFlags PatternBuilderModel::flags(const QModelIndex &index) const
+{
+//   std::cout<<"PatternBuilderModel::flags()"<<std::endl;
+  Qt::ItemFlags flags;
+
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    flags = m->flags( mapToSource(index) );
+  }
+  return flags;
+}
+
+QVariant PatternBuilderModel::headerData ( int section, Qt::Orientation orientation, int role ) const
+{
+  if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+      return QVariant( "Builder" );
+  } else {
+      return QSortFilterProxyModel::headerData ( section, orientation, role );
+  }
+}
+
+QStandardItem* PatternBuilderModel::itemFromIndex ( const QModelIndex & index ) const
+{
+  QStandardItem *item = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    item = m->itemFromIndex( mapToSource(index) );
+  }
+  return item;
+}
+
+// QModelIndex PatternBuilderModel::addVector( double dx, double dy, double dz )
+// {
+//   std::cout << "PatternBuilderModel::addVector" << std::endl;
+//   QModelIndex vectorIndex;
+// 
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     std::cout << "PatternBuilderModel::addVector m != NULL " << std::endl;
+//     QModelIndex sourceIndex = m->addVector( dx, dy, dz );
+//     vectorIndex = mapFromSource(sourceIndex);
+//   }
+//   return vectorIndex;
+// }
+// 
+// 
+// QModelIndex PatternBuilderModel::makeCartesian( const QModelIndex& i_pt,
+//                                    const QModelIndex& i_vec_x, const QModelIndex& i_vec_y, const QModelIndex& i_vec_z,
+//                                    long nx, long ny, long nz)
+// {
+//   std::cout << " PatternBuilderModel::makeCartesian()"<< std::endl;
+//   QModelIndex elementsIndex;
+//   DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+//   if ( m != NULL ){
+//     QModelIndex sourceElementsIndex = m->makeCartesian( 
+//                     mapToSource(i_pt),
+//                     mapToSource(i_vec_x), mapToSource(i_vec_y), mapToSource(i_vec_z),
+//                     nx, ny, nz );
+//     std::cout << " sourceElementsIndex.isValid() => " << sourceElementsIndex.isValid() << std::endl;
+//     elementsIndex = mapFromSource(sourceElementsIndex);
+//     std::cout << " elementsIndex.isValid() => " << elementsIndex.isValid() << std::endl;
+//   }
+//   return elementsIndex;
+// }
+
+AssociationsModel::AssociationsModel( QObject * parent ) :
+  QSortFilterProxyModel( parent )
+{
+  QString assocRegExp;// =QString("(%1|%2)").arg(GROUP_TREE).arg(GROUP_DIR_TREE); CS_TODO
+
+  setFilterRole( HEXA_TREE_ROLE );
+  setFilterRegExp ( QRegExp(assocRegExp) ); 
+}
+
+AssociationsModel::~AssociationsModel() 
+{
+}
+
+Qt::ItemFlags AssociationsModel::flags(const QModelIndex &index) const
+{
+//   std::cout<<"AssociationsModel::flags()"<<std::endl;
+  Qt::ItemFlags flags;
+
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    flags = m->flags( mapToSource(index) );
+  }
+  return flags;
+}
+
+QVariant AssociationsModel::headerData ( int section, Qt::Orientation orientation, int role ) const
+{
+  if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+      return QVariant( "Associations" );
+  } else {
+      return QSortFilterProxyModel::headerData ( section, orientation, role );
+  }
+}
+
+QStandardItem* AssociationsModel::itemFromIndex ( const QModelIndex & index ) const
+{
+  QStandardItem *item = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    item = m->itemFromIndex( mapToSource(index) );
+  }
+  return item;
+}
+
+GroupsModel::GroupsModel( QObject * parent ) :
+  QSortFilterProxyModel( parent )
+{
+  QString groupsRegExp =QString("(%1|%2)").arg(GROUP_TREE).arg(GROUP_DIR_TREE);
+
+  setFilterRole( HEXA_TREE_ROLE );
+  setFilterRegExp ( QRegExp(groupsRegExp ) ); 
+}
+
+GroupsModel::~GroupsModel() 
+{
+}
+
+Qt::ItemFlags GroupsModel::flags(const QModelIndex &index) const
+{
+//   MESSAGE("GroupsModel::flags() "<< index.data().toString().toStdString() );
+  Qt::ItemFlags flags;
+
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+//     MESSAGE("*  ( m != NULL ) "<< index.data().toString().toStdString() );
+    flags = m->flags( mapToSource(index) );
+  } else {
+//     MESSAGE("*  ( m is NULL ) "<< index.data().toString().toStdString() );
+  }
+//   if ( flags == Qt::ItemFlags( ~Qt::ItemIsEditable ) ){
+//     MESSAGE("*  flags == Qt::ItemFlags( ~Qt::ItemIsEditable ) "<< index.data().toString().toStdString() );
+//   } else {
+//     MESSAGE("*  flags is not Qt::ItemFlags( ~Qt::ItemIsEditable ) "<< index.data().toString().toStdString() );
+//   }
+//   MESSAGE("}");
+  return flags;
+}
+
+QVariant GroupsModel::headerData ( int section, Qt::Orientation orientation, int role ) const
+{
+  if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+      return QVariant( "Groups" );
+  } else {
+      return QSortFilterProxyModel::headerData ( section, orientation, role );
+  }
+}
+
+QStandardItem* GroupsModel::itemFromIndex ( const QModelIndex & index ) const
+{
+  QStandardItem *item = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    item = m->itemFromIndex( mapToSource(index) );
+  }
+  return item;
+}
+
+QModelIndexList GroupsModel::getGroupElements( const QModelIndex& iGroup, DocumentModel::Group& kind ) const
+{
+  QModelIndexList elements;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    elements = m->getGroupElements( mapToSource(iGroup), kind );
+  }
+  return elements;
+}
+
+MeshModel::MeshModel( QObject * parent ) :
+  QSortFilterProxyModel( parent )
+{
+  QString meshRegExp =QString("(%1|%2|%3|%4)").arg(LAW_TREE).arg(LAW_DIR_TREE)                            .arg(PROPAGATION_TREE).arg(PROPAGATION_DIR_TREE);
+
+  setFilterRole( HEXA_TREE_ROLE );
+  setFilterRegExp ( QRegExp(meshRegExp) );
+}
+
+MeshModel::~MeshModel() 
+{
+}
+
+Qt::ItemFlags MeshModel::flags(const QModelIndex &index) const
+{
+//   MESSAGE("MeshModel::flags() "<< index.data().toString().toStdString() );
+  Qt::ItemFlags flags;
+
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+//     MESSAGE("*  ( m != NULL ) "<< index.data().toString().toStdString() );
+    flags = m->flags( mapToSource(index) );
+  } else {
+//     MESSAGE("*  ( m is NULL ) "<< index.data().toString().toStdString() );
+  }
+//   if ( flags == Qt::ItemFlags( ~Qt::ItemIsEditable ) ){
+//     MESSAGE("*  you can select "<< index.data().toString().toStdString() );
+//   } else {
+//     MESSAGE("*  you cannot select  "<< index.data().toString().toStdString() );
+//   }
+//   MESSAGE("}");
+  return flags;
+}
+
+QVariant MeshModel::headerData ( int section, Qt::Orientation orientation, int role ) const
+{
+  if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+      return QVariant( "Mesh" );
+  } else {
+      return QSortFilterProxyModel::headerData ( section, orientation, role );
+  }
+}
+
+QStandardItem* MeshModel::itemFromIndex ( const QModelIndex & index ) const
+{
+  QStandardItem *item = NULL;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    item = m->itemFromIndex( mapToSource(index) );
+  }
+  return item;
+}
+
+QModelIndexList MeshModel::getPropagation( const QModelIndex& iPropagation ) const
+{
+  QModelIndexList edges;
+  DocumentModel *m = dynamic_cast<DocumentModel *>( sourceModel() );
+  if ( m != NULL ){
+    edges = m->getPropagation( mapToSource(iPropagation) );
+  }
+  return edges;
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx
new file mode 100755 (executable)
index 0000000..a16a479
--- /dev/null
@@ -0,0 +1,496 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
+#define _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
+
+
+#include <QTemporaryFile>
+#include <QStandardItemModel>
+#include <QSortFilterProxyModel>
+
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+#include "HexDocument.hxx"
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+
+    class DocumentModel : public QStandardItemModel
+    {
+      Q_OBJECT
+      public:
+
+        // enum EnumGroup  { HexaCell, QuadCell, EdgeCell, 
+        //                   HexaNode, QuadNode, EdgeNode, Vertex_Node};
+        typedef HEXA_NS::EnumGroup Group;
+        typedef HEXA_NS::KindLaw   KindLaw;
+
+        struct GeomObj
+        {
+          QString name;
+          QString entry;
+          QString subid; // sub-shape id
+          QString brep;
+          double  start;
+          double  end;
+        };
+
+        typedef QList<GeomObj> GeomObjList;
+
+        DocumentModel( HEXA_NS::Document* doc, const QString& entry, QObject * parent = 0 );
+        DocumentModel( int rows, int columns, QObject * parent = 0 );
+
+        virtual ~DocumentModel();
+
+
+        void setName(const QString& name);
+        QString getName();
+        void load( const QString& xmlFileName );
+        void save( const QString& xmlFileName );
+
+        void updateData();
+
+        void clearAll();
+        void clearData();
+        void clearBuilder();
+        void clearAssociation();
+        void clearGroups();
+        void clearMesh();
+
+        void fillData();
+        void fillBuilder();
+        void fillAssociation();
+        void fillGroups();
+        void fillMesh();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+
+
+        void allowEdition();
+        void disallowEdition();
+
+//         void setDefaultSelection();
+//         void allowSelection();
+        void allowDataSelectionOnly();
+        void allowVertexSelectionOnly();
+        void allowEdgeSelectionOnly();
+        void allowQuadSelectionOnly();
+        void allowHexaSelectionOnly();
+
+        void allowVectorSelectionOnly();
+        void allowCylinderSelectionOnly();
+        void allowPipeSelectionOnly();
+        void allowElementsSelectionOnly();
+        void allowCrossElementsSelectionOnly();
+
+        void allowLawSelectionOnly();
+
+
+        void setName( const QModelIndex& iElt, const QString& name );
+        bool clearEltAssociations( const QModelIndex& iElt );
+
+        //  ************  BUILD HEXABLOCK MODEL ************
+        QModelIndex addVertex( double x, double y, double z );
+
+        //
+        QModelIndex addEdgeVertices (const QModelIndex &i_v0, const QModelIndex &i_v1 );
+        QModelIndex addEdgeVector( const QModelIndex &i_v, const QModelIndex &i_vec );
+
+        //
+        QModelIndex addQuadVertices( const QModelIndex &i_v0, const QModelIndex &i_v1,
+                                     const QModelIndex &i_v2, const QModelIndex &i_v3 );
+        QModelIndex addQuadEdges( const QModelIndex &i_e0, const QModelIndex &i_e1,
+                                  const QModelIndex &i_e2, const QModelIndex &i_e3 );
+
+        //
+        QModelIndex addHexaVertices( const QModelIndex &i_v0, const QModelIndex &i_v1,
+                                     const QModelIndex &i_v2, const QModelIndex &i_v3,
+                                     const QModelIndex &i_v4, const QModelIndex &i_v5,
+                                     const QModelIndex &i_v6, const QModelIndex &i_v7 );
+        QModelIndex addHexaQuad( const QModelIndex &i_q0, const QModelIndex &i_q1, const QModelIndex &i_q2, const QModelIndex &i_q3, const QModelIndex &i_q4, const QModelIndex &i_q5 );
+
+        QModelIndex addHexaQuads( const QModelIndexList &i_quads ); //NEW HEXA3
+
+
+        //
+        QModelIndex addVector( double dx, double dy, double dz );
+        QModelIndex addVectorVertices( const QModelIndex &i_v0, const QModelIndex &i_v1 );
+
+        //
+        QModelIndex addCylinder( const QModelIndex &iv, const QModelIndex &ivec, double r,  double h );
+        
+        //
+        QModelIndex addPipe( const QModelIndex &iv, const QModelIndex &ivec, double ri, double re, double h );
+
+
+        // 
+        QModelIndex makeCartesian( const QModelIndex& ivex,
+                                   const QModelIndex& ivecx, const QModelIndex& ivecy, const QModelIndex& ivecz,
+                                   long nx, long ny, long nz);
+
+        QModelIndex makeCartesian( const QModelIndex& ivex,
+                                   const QModelIndex& ivec,
+                                   int nx, int ny, int nz );
+
+        QModelIndex makeCylindrical( const QModelIndex& i_pt,
+                                     const QModelIndex& i_vx, const QModelIndex& i_vz,
+                                     double dr, double da, double dl,
+                                     long nr, long na, long nl,
+                                     bool fill  = false );
+
+        QModelIndex makeCylindricals(
+            const QModelIndex& i_center, const QModelIndex& i_base, const QModelIndex& i_height,
+            QList< double>     i_radius, QList<double> i_angles,    QList<double> i_heights, 
+            bool fill = false ); //NEW HEXA3
+
+        QModelIndex makeSpherical( const QModelIndex& i_v, const QModelIndex& i_vec, int nb, double k = 1 ); //CS_TO_DEL
+
+        QModelIndex makeSpherical( const QModelIndex& i_center, double rayon, int nb, double k = 1 );
+
+        //
+        QModelIndex makeCylinder( const QModelIndex& cyl, const QModelIndex& vec,
+                                  int nr, int na, int nl );
+
+        //
+        QModelIndex makePipe( const QModelIndex& pipe, const QModelIndex& vecx, 
+                              int nr, int na, int nl );
+
+        //
+        QModelIndex makeCylinders(const QModelIndex& cyl1, const QModelIndex& cyl2);
+
+        //
+        QModelIndex makePipes( const QModelIndex& pipe1, const QModelIndex& pipe2 );
+
+
+    
+        QModelIndex makeRind( const QModelIndex& center, const QModelIndex& vecx, const QModelIndex& vecz,
+                    double  radext, double radint, double radhole,
+                    const QModelIndex& plorig,
+                    int nrad, int nang, int nhaut ); //NEW HEXA3
+
+        QModelIndex makePartRind( const QModelIndex& center, const QModelIndex& vecx, const QModelIndex& vecz,
+                    double  radext, double radint, double radhole,
+                    const QModelIndex& plorig, double angle,
+                    int nrad, int nang, int nhaut ); //NEW HEXA3
+
+        QModelIndex makeSphere( const QModelIndex& center, const QModelIndex& vecx, const QModelIndex& vecz,
+                    double radius, double radhole,
+                    const QModelIndex& plorig,
+                    int nrad, int nang, int nhaut ); //NEW HEXA3
+
+        QModelIndex makePartSphere( const QModelIndex& center, const QModelIndex& vecx, const QModelIndex& vecz,
+                    double  radius, double radhole,
+                    const QModelIndex& plorig, double angle,
+                    int nrad, int nang, int nhaut ); //NEW HEXA3
+
+        // ************  EDIT HEXABLOCK MODEL ************
+
+        bool updateVertex( const QModelIndex& vertex, double x, double y, double z );
+
+        //
+        bool removeHexa( const QModelIndex& hexa );
+        bool removeConnectedHexa( const QModelIndex& hexa );
+
+
+        //
+        QModelIndex prismQuad( const QModelIndex& quad, const QModelIndex& dv, int nb);
+        QModelIndex prismQuads( const QModelIndexList& quads, const QModelIndex& dv, int nb);
+
+
+        //
+        QModelIndex joinQuad( const QModelIndex& start_q, const QModelIndex& dest_q,
+                              const QModelIndex& v0, const QModelIndex& v1,
+                              const QModelIndex& v2, const QModelIndex& v3,
+                              int nb );
+
+
+        QModelIndex joinQuads( const QModelIndexList& start_q, const QModelIndex& dest_q,
+                               const QModelIndex& v0, const QModelIndex& v1,
+                               const QModelIndex& v2, const QModelIndex& v3,
+                               int nb );
+
+
+        //
+        bool mergeVertices( const QModelIndex& va, const QModelIndex& vb );
+        bool mergeEdges( const QModelIndex& ea, const QModelIndex& eb,
+                         const QModelIndex& v0, const QModelIndex& v1 );
+        bool mergeQuads( const QModelIndex& qa, const QModelIndex& qb,
+                         const QModelIndex& v0, const QModelIndex& v1,
+                         const QModelIndex& v2, const QModelIndex& v3 );
+
+        //
+        QModelIndex disconnectVertex( const QModelIndex& h, const QModelIndex& v );
+        QModelIndex disconnectEdge( const QModelIndex& h, const QModelIndex& e );
+        QModelIndex disconnectQuad( const QModelIndex& h, const QModelIndex& q );
+       QModelIndex disconnectEdges( const QModelIndexList& h, const QModelIndexList& e );
+
+        //
+        QModelIndex cutEdge( const QModelIndex &e, int nbcuts );
+
+        //
+        QModelIndex makeTranslation( const QModelIndex& elts, const QModelIndex& vec );
+        QModelIndex makeScale( const QModelIndex& elts, const QModelIndex& v, double k );
+
+        //
+        QModelIndex makeRotation( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec, double angle );
+
+        //
+        QModelIndex makeSymmetryPoint( const QModelIndex& elts, const QModelIndex& v );
+        QModelIndex makeSymmetryLine( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
+        QModelIndex makeSymmetryPlane( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
+
+        //
+        bool performTranslation( const QModelIndex& elts, const QModelIndex& vec );
+
+        //
+        bool performScale( const QModelIndex& elts, const QModelIndex& v, double k );
+
+        //
+        bool performRotation( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec, double angle );
+
+        //
+        bool performSymmetryPoint( const QModelIndex& elts, const QModelIndex& v );
+        bool performSymmetryLine( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
+        bool performSymmetryPlane( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
+
+
+        QModelIndex revolutionQuads( const QModelIndexList& startQuads, const QModelIndex& center, 
+                                     const QModelIndex& vec_axis, const QList<double>& angles); //NEW HEXA3
+
+        QModelIndex replace( const QModelIndexList& quadsPattern, 
+                             const QModelIndex& p1, const QModelIndex& c1,
+                             const QModelIndex& p2, const QModelIndex& c2,
+                             const QModelIndex& p3, const QModelIndex& c3 ); //NEW HEXA3
+
+
+
+
+
+        // ************  ASSOCIATION ************
+        // elt is Vertex, Edge, Quad
+        void addAssociation( const QModelIndex& elt, const GeomObj& assoc );
+        QList<GeomObj> getAssociations( const QModelIndex& elt );
+
+        bool associateOpenedLine( const QModelIndexList& edges,
+                                  const GeomObjList&     assocs,
+                                  double pstart,
+                                  double pend );
+
+        bool associateClosedLine( const QModelIndex& vertex, 
+                                  const QModelIndexList& edges,
+                                  const GeomObjList&     assocs,
+                                  double pstart, 
+                                 bool   inv = false );
+
+
+        // ************  GROUPS  ************
+
+        //
+        QModelIndex addGroup( const QString& name, Group kind );
+
+        //
+        bool removeGroup( const QModelIndex& grp );
+
+        //
+        QModelIndexList getGroupElements( const QModelIndex& iGroup, Group& kind) const;
+
+        // 7.4 Boite: éditer un groupe
+        void setGroupName( const QModelIndex& grp, const QString& name );
+        bool addGroupElement( const QModelIndex& grp, const QModelIndex& elt );
+        bool removeGroupElement( const QModelIndex& grp, int nro ); //CS_TODO
+        bool clearGroupElement( const QModelIndex& grp );
+
+
+        // ************  LAWS  ************
+
+        //
+        QModelIndex addLaw( const QString& name, int nbnodes );
+
+// 8.2 Boite: créer une loi 
+// class Law 
+// {
+// public:
+// int     setNodes (int  nbre);
+// int     setCoefficient (double coeff);
+// void    setKind (KindLaw type);
+// }
+
+        bool setLaw( const QModelIndex& ilaw, int nbnodes, double coeff, KindLaw type );
+
+        // 
+        bool  removeLaw( const QModelIndex& law );
+
+        // 8.3 Boite: éditer une loi 
+        // (idem création)
+
+// 9 Discrétisation
+// 9.1 Boite: poser une loi de discrétisation sur une propagation
+// int   setLaw (Law* loi);
+// void  setWay (bool sens);
+        bool setPropagation( const QModelIndex& iPropagation, const QModelIndex& iLaw, bool way );
+        QModelIndexList getPropagation( const QModelIndex& iPropagation ) const;
+
+// 
+// 9.1 Boite: éditer 
+// (idem création)
+
+
+      // tools
+      HEXA_NS::Document* documentImpl();
+      QString            documentEntry();
+//       QModelIndex        indexBy( int role, const QString& value );
+
+      signals:
+        void patternDataChanged();
+       void nameChanged(const QString& name);
+        
+      private:
+        QTemporaryFile    *_hexaFile;
+        HEXA_NS::Document *_hexaDocument;
+        QString            _entry;
+
+        QMap<QString, QString> _assocName; // clé: id; valeur: nom
+        bool              _disallowEdition;
+
+        //data
+        QStandardItem     *_vertexDirItem;
+        QStandardItem     *_edgeDirItem;
+        QStandardItem     *_quadDirItem;
+        QStandardItem     *_hexaDirItem;
+
+        //builder
+        QStandardItem     *_vectorDirItem;
+        QStandardItem     *_cylinderDirItem;
+        QStandardItem     *_pipeDirItem;
+        QStandardItem     *_elementsDirItem;
+        QStandardItem     *_crossElementsDirItem;
+
+      
+        //association
+        // CS_TODO
+
+
+        // groups
+        QStandardItem     *_groupDirItem;
+
+        // law
+        QStandardItem     *_lawDirItem;
+        QStandardItem     *_propagationDirItem;
+
+
+        Qt::ItemFlags     _vertexItemFlags;
+        Qt::ItemFlags     _edgeItemFlags;
+        Qt::ItemFlags     _quadItemFlags;
+        Qt::ItemFlags     _hexaItemFlags;
+
+        Qt::ItemFlags     _vectorItemFlags;
+        Qt::ItemFlags     _cylinderItemFlags;
+        Qt::ItemFlags     _pipeItemFlags;
+        Qt::ItemFlags     _elementsItemFlags;
+        Qt::ItemFlags     _crossElementsItemFlags;
+
+        Qt::ItemFlags     _groupItemFlags;
+        Qt::ItemFlags     _lawItemFlags;
+        Qt::ItemFlags     _propagationItemFlags;
+
+    };
+
+
+
+    class  PatternDataModel : public QSortFilterProxyModel
+    {
+      public:
+        PatternDataModel( QObject * parent = 0 );
+        virtual ~PatternDataModel();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+        virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+
+        QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
+
+
+        HEXA_NS::Document* documentImpl();
+        QString            documentEntry();
+
+
+    };
+
+
+    class  PatternBuilderModel : public QSortFilterProxyModel
+    {
+      public:
+        PatternBuilderModel( QObject * parent = 0 );
+        virtual ~PatternBuilderModel();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+        virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+        QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
+    };
+
+
+
+    class  AssociationsModel : public QSortFilterProxyModel
+    {
+      public:
+        AssociationsModel( QObject * parent = 0 );
+        virtual ~AssociationsModel();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+        virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+        QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
+    };
+
+
+    class  GroupsModel : public QSortFilterProxyModel
+    {
+      public:
+        GroupsModel( QObject * parent = 0 );
+        virtual ~GroupsModel();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+        virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+        QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
+
+        QModelIndexList getGroupElements( const QModelIndex& iGroup, DocumentModel::Group& kind ) const;
+     };
+
+
+    class  MeshModel : public QSortFilterProxyModel
+    {
+      public:
+        MeshModel( QObject * parent = 0 );
+        virtual ~MeshModel();
+
+        virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+        virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+        QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
+
+
+        QModelIndexList getPropagation( const QModelIndex& iPropagation ) const;
+    }; 
+
+
+
+
+  }
+}
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx
new file mode 100755 (executable)
index 0000000..91c790c
--- /dev/null
@@ -0,0 +1,5565 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <OCCViewer_ViewWindow.h>
+#include "HEXABLOCKGUI_DocumentPanel.hxx"
+#include "HEXABLOCKGUI_DocumentGraphicView.hxx"
+#include "HEXABLOCKGUI_SalomeTools.hxx"
+#include "HEXABLOCKGUI.hxx"
+
+
+#include <iostream>
+#include <QtGui>
+#include <QFlags>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <PyConsole_Console.h>
+#include <SalomeApp_Tools.h>
+
+#include <Standard_GUID.hxx>
+#include <TDF_Label.hxx>
+
+#include <OCCViewer_ViewWindow.h>
+#include <OCCViewer_ViewManager.h>
+// #include <OCCViewer_ViewModel.h>
+
+
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+
+
+#include <SUIT_Session.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_Session.h>
+#include "SVTK_Selection.h"
+#include <SVTK_ViewModel.h>
+#include <VTKViewer_ViewModel.h>
+
+#include <SUIT_ResourceMgr.h>
+
+
+// #include <GeometryGUI.h>
+
+#include <GEOMBase.h>
+#include <GEOMImpl_Types.hxx>
+
+
+
+#include "MyGEOMBase_Helper.hxx"
+#include "GEOMBase.h"
+#include "GEOM_Operation.h"
+
+
+#define VERTEX_COORD_MIN -1000000
+#define VERTEX_COORD_MAX  1000000
+
+
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+
+Q_DECLARE_METATYPE(HEXABLOCK::GUI::HexaTreeRole);
+Q_DECLARE_METATYPE(TopAbs_ShapeEnum);
+
+//General SpinBox Delegate
+class HexaDoubleSpinBoxDelegate : public QStyledItemDelegate  {
+public:
+       HexaDoubleSpinBoxDelegate(QObject *parent=0) : QStyledItemDelegate (parent){}
+
+       QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+                       const QModelIndex &index) const{
+               return new QDoubleSpinBox( parent );
+       }
+};
+
+//Angle SpinBox Delegate
+class HexaAngleDoubleSpinBoxDelegate : public QStyledItemDelegate  {
+public:
+       HexaAngleDoubleSpinBoxDelegate(QObject *parent=0) : QStyledItemDelegate (parent){}
+
+       QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+                       const QModelIndex &index) const{
+               QDoubleSpinBox *sb = new QDoubleSpinBox( parent );
+               sb->setMinimum(0);
+               sb->setMaximum(360);
+               return sb;
+       }
+};
+
+
+//Positive DoubleSpinBox Delegate (for heigth, radius, ...)
+class HexaPositiveDoubleSpinBoxDelegate : public QStyledItemDelegate  {
+public:
+       HexaPositiveDoubleSpinBoxDelegate(QObject *parent=0) : QStyledItemDelegate (parent){}
+
+       QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+                       const QModelIndex &index) const{
+               QDoubleSpinBox *sb = new QDoubleSpinBox( parent );
+               sb->setMinimum(0);
+               /////// sb->setMaximum(1000000000000000); //10e15   Abu : Pb en 32 bits
+               sb->setMaximum(1000000000);       //10e9
+               return sb;
+       }
+};
+
+
+// ======================================================== Constructeur
+HexaBaseDialog::HexaBaseDialog( QWidget * parent, Mode editmode, Qt::WindowFlags f ):
+                                                               //   _model(0),
+                                                               //   _selectionModel(0),
+                                                                 QDialog(parent, f),
+                                                                 MyGEOMBase_Helper( dynamic_cast<SUIT_Desktop*>(parent->parent()) ),
+                                                                 _editMode( editmode ),
+                                                                 _documentModel(0),
+                                                                 //   _patternDataModel(0),
+                                                                 //   _patternBuilderModel(0),
+                                                                 _patternDataSelectionModel(0),
+                                                                 _patternBuilderSelectionModel(0),
+                                                                 _groupsSelectionModel(0),
+                                                                 _meshSelectionModel(0),
+                                                                 _mgr(0),
+                                                                 _vtkVm(0),
+                                                                 _occVm(0),
+                                                                 _currentObj(0),
+                                                                 _expectedSelection(-1),
+                                                                 _selectionMutex( false ),
+                                                                 // _applyCloseButton(0),
+                                                                 _applyButton(0)
+{
+       MESSAGE("HexaBaseDialog::HexaBaseDialog() dynamic_cast<SUIT_Desktop*>(parent->parent()) =>" << dynamic_cast<SUIT_Desktop*>(parent->parent()) );
+       _strHexaWidgetType[VERTEX_TREE] = tr( "VERTEX" );
+       _strHexaWidgetType[EDGE_TREE]   = tr( "EDGE" );
+       _strHexaWidgetType[QUAD_TREE]   = tr( "QUAD" );
+       _strHexaWidgetType[HEXA_TREE]   = tr( "HEXA" );
+
+       _strHexaWidgetType[VECTOR_TREE]   = tr( "VECTOR" );
+       _strHexaWidgetType[CYLINDER_TREE] = tr( "CYLINDER" );
+       _strHexaWidgetType[PIPE_TREE]     = tr( "PIPE" );
+       _strHexaWidgetType[ELEMENTS_TREE] = tr( "ELEMENTS" );
+       _strHexaWidgetType[CROSSELEMENTS_TREE]= tr( "CROSSELEMENTS" );
+
+       _strHexaWidgetType[GROUP_TREE]      = tr( "GROUP" );
+       _strHexaWidgetType[LAW_TREE]        = tr( "LAW" );
+       _strHexaWidgetType[PROPAGATION_TREE]= tr( "PROPAGATION" );
+
+}
+
+// ============================================================= Destructeur
+HexaBaseDialog::~HexaBaseDialog()
+{
+       //   _mgr->clearSelectionCache();
+       //   _mgr->clearSelected();
+       //   globalSelection();
+       //   erasePreview();
+}
+
+// ============================================================== _initButtonBox
+QGroupBox* HexaBaseDialog::_initButtonBox( Mode editmode )
+{
+       if ( editmode == INFO_MODE )
+               return NULL;
+
+       //QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
+       QGroupBox* buttonBox = new QGroupBox();
+       buttonBox->setMinimumWidth(5);
+       buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
+       //buttonBox->setOrientation(Qt::Horizontal);
+       QHBoxLayout* buttonsHLayout = new QHBoxLayout();
+       _applyButton      = new QPushButton(tr("Apply"));
+       QPushButton* closeButton = new QPushButton(tr("Close"));
+       QPushButton* helpButton  = new QPushButton(tr("Help"));
+       //_applyCloseButton = new QPushButton(tr("Apply And Close"));
+
+       //connect( buttonBox, SIGNAL(clicked()), this, SLOT(applyAndClose()) );
+       connect( _applyButton, SIGNAL(clicked()), this, SLOT(apply()) );
+       connect( closeButton, SIGNAL(clicked()), this, SLOT(close()) );
+       connect( helpButton, SIGNAL(clicked()), this, SLOT(onHelpRequested()) );
+
+       buttonsHLayout->addWidget( _applyButton );
+       buttonsHLayout->addWidget( closeButton );
+       buttonsHLayout->addStretch(1);
+       buttonsHLayout->addWidget( helpButton );
+       //buttonsHLayout->addButton( _applyCloseButton );
+       buttonBox->setLayout(buttonsHLayout);
+       layout()->addWidget(buttonBox);
+
+       return buttonBox;
+}
+
+// ============================================================== _initWidget
+void HexaBaseDialog::_initWidget( Mode editmode )
+{
+       _initInputWidget( editmode );
+       _initButtonBox( editmode );
+}
+
+
+// ============================================================== _initViewManager
+void HexaBaseDialog::_initViewManager()
+{
+       SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+       _mgr   = dynamic_cast<LightApp_SelectionMgr*>( anApp->selectionMgr() );
+       _vtkVm = anApp->getViewManager( SVTK_Viewer::Type(),      true );
+       _occVm = anApp->getViewManager( OCCViewer_Viewer::Type(), true );
+       SUIT_ViewManager* activeVm = anApp->activeViewManager();
+
+       onWindowActivated ( activeVm );
+}
+
+
+// ============================================================== apply
+bool HexaBaseDialog::apply()
+{
+       MESSAGE("HexaBaseDialog::apply()");
+       QModelIndex iNew;
+       bool applied = apply(iNew);
+       if ( applied ){
+               // clear all selection
+               if (_patternDataSelectionModel)    _patternDataSelectionModel->clearSelection();
+               if (_patternBuilderSelectionModel) _patternBuilderSelectionModel->clearSelection();
+               if (_groupsSelectionModel)         _groupsSelectionModel->clearSelection();
+               if (_meshSelectionModel)           _meshSelectionModel->clearSelection();
+               // select and highlight in vtk view the result
+               _selectAndHighlight( iNew );
+               // reinitialization
+               _currentObj = NULL;
+       }
+       return applied;
+}
+
+// ============================================================== accept
+//void HexaBaseDialog::accept()
+//{
+//  bool applied = apply();
+//  if ( applied ){
+//    QDialog::accept();
+//    _disallowSelection();
+//  }
+//}
+
+// ============================================================== close
+void HexaBaseDialog::close()
+{
+       _currentObj = NULL;
+       _disallowSelection();
+       //resize(300, 350);
+       QDialog::close();
+}
+
+// ============================================================== onHelpRequested
+void HexaBaseDialog::onHelpRequested()
+{
+       LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
+       if ( app )
+               //     app->onHelpContextModule( myGeometryGUI ? app->moduleName( myGeometryGUI->moduleName() ) : QString( "" ), _helpFileName );
+               app->onHelpContextModule( "HEXABLOCK", _helpFileName );
+
+       else {
+               QString platform;
+#ifdef WIN32
+               platform = "winapplication";
+#else
+               platform = "application";
+#endif
+
+               SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ),
+                               QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
+                               arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( _helpFileName ),
+                               QObject::tr( "BUT_OK" ) );
+       }
+
+}
+
+// ============================================================== _selectAndHighlight
+void HexaBaseDialog::_selectAndHighlight( const QModelIndex& i )
+{
+       if ( !i.isValid() ) return;
+       setProperty("QModelIndex",  QVariant::fromValue(i));
+       setFocus();
+}
+
+
+// ============================================================== _allowSelection
+void HexaBaseDialog::_allowSelection()
+{
+       MESSAGE("HexaBaseDialog::_allowSelection(){");
+       if ( _documentModel ){
+               _documentModel->disallowEdition();
+       }
+       MESSAGE("}");
+}
+
+// ============================================================== _disallowSelection
+void HexaBaseDialog::_disallowSelection()
+{
+       MESSAGE("HexaBaseDialog::_disallowSelection(){");
+       if ( _documentModel ){
+               _documentModel->allowEdition();
+       }
+       if ( _patternDataSelectionModel ){
+               _patternDataSelectionModel->setAllSelection();
+       }
+       MESSAGE("}");
+}
+
+
+// ============================================================== _allowVTKSelection
+bool HexaBaseDialog::_allowVTKSelection( QObject* obj )
+{
+       MESSAGE("HexaBaseDialog::_allowModelSelection(){");
+       if ( !_patternDataSelectionModel ) return false;
+       bool isOk = false;
+
+       HexaWidgetType wType;
+       QVariant v  = obj->property("HexaWidgetType");
+       if ( !v.isValid() ) {
+               MESSAGE("*  no HexaWidgetType property");
+               return false;
+       }
+       MESSAGE("*  HEXABLOCKGUI::currentVtkView->raise()");
+       HEXABLOCKGUI::currentVtkView->raise();
+       //   HEXABLOCKGUI::currentVtkView->setFocus();
+       wType = v.value<HexaWidgetType>();
+       MESSAGE("*  HexaWidgetType property is " << wType );
+
+       switch (wType){
+       case VERTEX_TREE:
+               _patternDataSelectionModel->setVertexSelection(); isOk = true;
+               break;
+       case EDGE_TREE:
+               _patternDataSelectionModel->setEdgeSelection(); isOk = true;
+               break;
+       case QUAD_TREE:
+               _patternDataSelectionModel->setQuadSelection(); isOk = true;
+               break;
+       case HEXA_TREE:
+               _patternDataSelectionModel->setHexaSelection(); isOk = true;
+               break;
+               //    case VECTOR_TREE:
+               //    case CYLINDER_TREE:
+               //    case PIPE_TREE:
+               //    case ELEMENTS_TREE:
+               //    case CROSSELEMENTS_TREE: //selector = _patternBuilderSelectionModel;
+               //    case GROUP_TREE:      //selector = _groupsSelectionModel;
+               //    case LAW_TREE:
+               //    case PROPAGATION_TREE: // selector = _meshSelectionModel;
+       default : MESSAGE("NOT YET");
+       }
+       MESSAGE("}");
+       return isOk;
+}
+
+// ============================================================== _allowOCCSelection
+bool HexaBaseDialog::_allowOCCSelection( QObject* obj )
+{
+       MESSAGE("HexaBaseDialog::_allowOCCCSelection(){");
+       if ( !HEXABLOCKGUI::currentOccView ) return false;
+
+       //We do not allow occ selection when the occ viewer is not activated
+       SUIT_ViewWindow* window = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+       bool isOCC = (window && window->getViewManager()->getType() == OCCViewer_Viewer::Type());
+       if (!isOCC) return false;
+
+
+       GeomWidgetType wType;
+       QVariant v = obj->property("GeomWidgetType");
+       if ( !v.isValid() ) {
+               MESSAGE("*  no GeomWidgetType property");
+               return false;
+       }
+       MESSAGE("*  HEXABLOCKGUI::currentOccView->raise()");
+       HEXABLOCKGUI::currentOccView->raise();
+       wType = v.value<GeomWidgetType>();
+       MESSAGE("*  GeomWidgetType property is " << wType );
+       MESSAGE("*  TopAbs_VERTEX           is " << TopAbs_VERTEX );
+       MESSAGE("*  TopAbs_EDGE             is " << TopAbs_EDGE );
+       MESSAGE("*  TopAbs_FACE             is " << TopAbs_FACE );
+
+       globalSelection(); // close local contexts, if any
+       localSelection(GEOM::GEOM_Object::_nil(), wType/*TopAbs_EDGE*/);
+       return true;
+}
+
+
+// ============================================================== _getSelector
+QItemSelectionModel* HexaBaseDialog::_getSelector( QObject* obj )
+{
+       QItemSelectionModel* selector = NULL;
+       MESSAGE("HexaBaseDialog::getSelector(){");
+
+       QString objectName = obj->objectName();
+       QString className = obj->metaObject()->className();
+       MESSAGE("*  obj->objectName() is "<< objectName.toStdString() ); //toStdString()
+       MESSAGE("*  obj->metaObject()->className() is "<< className.toStdString() );
+
+       HexaWidgetType wtype;
+       QVariant v  = obj->property("HexaWidgetType");
+       if ( !v.isValid() ) {
+               MESSAGE("*  no HexaWidgetType property");
+               return NULL;
+       }
+
+       wtype = v.value<HexaWidgetType>();
+       MESSAGE("*  HexaWidgetType property is " << wtype);
+
+       switch (wtype){
+       case VERTEX_TREE:
+       case EDGE_TREE:
+       case QUAD_TREE:
+       case HEXA_TREE:
+               selector = _patternDataSelectionModel; break;
+       case VECTOR_TREE:
+       case CYLINDER_TREE:
+       case PIPE_TREE:
+       case ELEMENTS_TREE:
+       case CROSSELEMENTS_TREE:
+               selector = _patternBuilderSelectionModel; break;
+       case GROUP_TREE:
+               selector = _groupsSelectionModel; break;
+       case LAW_TREE:
+       case PROPAGATION_TREE:
+               selector = _meshSelectionModel; break;
+       default : MESSAGE("NOT YET");
+       }
+       MESSAGE("}");
+       return selector;
+}
+
+
+// ============================================================== _onSelectionChanged
+
+bool HexaBaseDialog::_onSelectionChanged( const QItemSelection& sel, QLineEdit*  le )
+{
+       MESSAGE("HexaBaseDialog::_onSelectionChanged(const QItemSelection& sel, QLineEdit*  le)");
+       MESSAGE("*  le is "<< le->objectName().toStdString() );
+       QModelIndexList l = sel.indexes();
+       if ( l.count() == 0 ) return false;
+
+       //type from selection (first)
+       QModelIndex selected = l[0];
+       int selType = selected.data(HEXA_TREE_ROLE).toInt();
+
+       //type of widget
+       QVariant v = le->property("HexaWidgetType");
+       if ( !v.isValid() ) return false;
+       HexaWidgetType wType = v.value<HexaWidgetType>();
+
+       // check selection compatibility between selection and widget
+       if ( selType != wType ){
+               MESSAGE("*  bad selection : " << selType << " is not  " << wType );
+               SUIT_MessageBox::information( 0,
+                               tr("HEXA_INFO"),
+                               tr("%1: Bad type selected\nPlease select a %2.").arg(windowTitle()).arg( _strHexaWidgetType[wType]) );
+               return false;
+       }
+
+       //fill the lineEdit if selection is OK
+       le->setText( selected.data().toString() );// name
+       le->setProperty("QModelIndex",  QVariant::fromValue(selected) );
+       _index[le] = selected;
+       MESSAGE("}");
+       return true;
+}
+
+
+// ============================================================== _onSelectionChanged
+bool HexaBaseDialog::_onSelectionChanged( const QItemSelection& sel, QListWidget* lw )
+{
+       MESSAGE("HexaBaseDialog::_onSelectionChanged( const QItemSelection& sel, QListWidget* lw )");
+       MESSAGE("*  lw is "<< lw->objectName().toStdString() );
+       QModelIndexList l = sel.indexes();
+
+       if ( l.count() == 0 ) return false;
+
+       //type of widget
+       QVariant v = lw->property("HexaWidgetType");
+       if ( !v.isValid() ) return false;
+       HexaWidgetType wType = v.value<HexaWidgetType>();
+
+       //fill the listWidget
+       QListWidgetItem* item = NULL;
+       int selType;
+       QString selName;
+       //   int maxSize = 8;
+       foreach( const QModelIndex& isel, l ){
+               //     if ( lw->count() == maxSize) break;
+               selType = isel.data(HEXA_TREE_ROLE).toInt();
+               if ( selType != wType ){ // check selection compatibility between selection and widget
+                       MESSAGE("*  bad selection : " << selType<< " is not  " << wType );
+                       SUIT_MessageBox::information( 0,
+                                       tr("HEXA_INFO"),
+                                       tr("%1: Bad type selected\nPlease select a %2.").arg(windowTitle()).arg( _strHexaWidgetType[wType]) );
+                       return false;
+               }
+               // add selection to listWidget if selection is OK
+               selName = isel.data().toString();
+               QList<QListWidgetItem *> twice = lw->findItems( selName, Qt::MatchExactly);
+               if ( twice.count() == 0 ){
+                       item = new QListWidgetItem( selName );
+                       item->setData(  LW_QMODELINDEX_ROLE, QVariant::fromValue<QModelIndex>(isel) );
+                       lw->addItem(item);
+                       updateButtonBox();
+               }
+       }
+       MESSAGE("}");
+       return true;
+}
+
+// ============================================================== onCurrentSelectionChanged
+void HexaBaseDialog::onCurrentSelectionChanged()
+{
+}
+
+
+// ============================================================== setDocumentModel
+void HexaBaseDialog::setDocumentModel(DocumentModel* m)
+{
+       _documentModel = m;
+}
+
+// ============================================================== clear
+void HexaBaseDialog::clear()
+{
+}
+
+
+// ============================================================== setPatternDataSelectionModel
+void HexaBaseDialog::setPatternDataSelectionModel(PatternDataSelectionModel* s)
+{
+       _patternDataSelectionModel = s;
+}
+
+
+// ============================================================== setPatternBuilderSelectionModel
+void HexaBaseDialog::setPatternBuilderSelectionModel(PatternBuilderSelectionModel* s)
+{
+       _patternBuilderSelectionModel = s;
+}
+
+// ============================================================== setGroupsSelectionModel
+void HexaBaseDialog::setGroupsSelectionModel( GroupsSelectionModel* s )
+{
+       _groupsSelectionModel = s;
+}
+
+
+// ============================================================== setMeshSelectionModel
+void HexaBaseDialog::setMeshSelectionModel( MeshSelectionModel* s )
+{
+       _meshSelectionModel = s;
+}
+
+
+// ============================================================== onSelectionChanged
+void HexaBaseDialog::onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel )
+{
+       MESSAGE( "HexaBaseDialog::onSelectionChanged(){" );
+       QString className = metaObject()->className();
+       MESSAGE( "*  I am                          : " << className.toStdString() );
+       MESSAGE( "*  sender is                     : " << sender() );
+       MESSAGE( "*  _patternDataSelectionModel    : " << _patternDataSelectionModel );
+       MESSAGE( "*  _patternBuilderSelectionModel : " << _patternBuilderSelectionModel );
+       MESSAGE( "*  _groupsSelectionModel         : " << _groupsSelectionModel );
+       MESSAGE( "*  _meshSelectionModel           : " << _meshSelectionModel );
+
+
+       QItemSelectionModel* selector = dynamic_cast<QItemSelectionModel*>(sender());
+       MESSAGE( "*  selector           : " << selector);
+
+       foreach( const QModelIndex& isel, sel.indexes() ){
+               MESSAGE("*  selected : " << isel.data().toString().toStdString());
+       }
+       foreach( const QModelIndex& iunsel, unsel.indexes() ){
+               MESSAGE("*  unselected : " << iunsel.data().toString().toStdString());
+       }
+
+       if ( _selectionMutex )
+               return;
+
+
+       bool selOk = false;
+       QLineEdit*   aLineEdit   = 0;
+       QListWidget* aListWidget = 0;
+       aLineEdit = dynamic_cast<QLineEdit*>(_currentObj);
+       if ( aLineEdit){ //fill the lineedit with selection
+               selOk = _onSelectionChanged( sel, aLineEdit );
+       }
+       aListWidget = dynamic_cast<QListWidget*>(_currentObj);
+       if ( aListWidget){ //fill the listWidget with selection
+               selOk = _onSelectionChanged( sel, aListWidget );
+       }
+
+       if ( !selOk && selector && ( aLineEdit || aListWidget ) ){
+               selector->clearSelection();
+       }
+
+       MESSAGE("}");
+}
+
+// ============================================================== onWindowActivated
+void HexaBaseDialog::onWindowActivated( SUIT_ViewManager* vm )
+{
+}
+
+// ============================================================== hideEvent
+void HexaBaseDialog::hideEvent ( QHideEvent * event )
+{
+       MESSAGE("HexaBaseDialog::hideEvent(){");
+       QString className = metaObject()->className();
+       MESSAGE( "*  I am                          : " << className.toStdString() );
+
+       if ( _patternDataSelectionModel )
+               disconnect( _patternDataSelectionModel, SIGNAL( selectionChanged ( const QItemSelection &, const QItemSelection &) ),
+                               this,                         SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       if ( _patternBuilderSelectionModel )
+               disconnect( _patternBuilderSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                            SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       if ( _groupsSelectionModel )
+               disconnect( _groupsSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                    SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       if ( _meshSelectionModel )
+               disconnect( _meshSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       //   if ( _mgr )
+       //     disconnect( _mgr, 0/*SIGNAL(currentSelectionChanged())*/, this, 0/*SLOT(onCurrentSelectionChanged())*/ );
+       disconnect( HEXABLOCKGUI::selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(onCurrentSelectionChanged()) );
+       if ( _vtkVm )
+               disconnect( _vtkVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+       if ( _occVm )
+               disconnect( _occVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+
+       _documentModel->allowEdition();
+
+       QDialog::hideEvent( event );
+       MESSAGE("}");
+}
+
+// ============================================================== showEvent
+void HexaBaseDialog::showEvent( QShowEvent * event )
+{
+       MESSAGE("HexaBaseDialog::showEvent(){");
+       QString className = metaObject()->className();
+       MESSAGE( "*  I am                          : " << className.toStdString() );
+
+       if ( _editMode == INFO_MODE ){
+               _documentModel->allowEdition();
+       } else {
+               _documentModel->disallowEdition();
+       }
+
+       if ( _patternDataSelectionModel ){
+               _patternDataSelectionModel->clearSelection();
+               connect( _patternDataSelectionModel, SIGNAL( selectionChanged ( const QItemSelection &, const QItemSelection &) ),
+                               this,                    SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       }
+       if ( _patternBuilderSelectionModel ){
+               _patternBuilderSelectionModel->clearSelection();
+               connect( _patternBuilderSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                            SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       }
+       if ( _groupsSelectionModel ){
+               _groupsSelectionModel->clearSelection();
+               connect( _groupsSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                    SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       }
+       if ( _meshSelectionModel ){
+               _meshSelectionModel->clearSelection();
+               connect( _meshSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &) ),
+                               this,                SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+       }
+       if ( _mgr )
+               connect( _mgr, SIGNAL(currentSelectionChanged()), this, SLOT(onCurrentSelectionChanged()) );
+
+       if ( _vtkVm )
+               connect( _vtkVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+       if ( _occVm )
+               connect( _occVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+
+       QDialog::showEvent ( event );
+       MESSAGE("}");
+}
+
+
+
+// ============================================================== updateButtonBox
+void HexaBaseDialog::updateButtonBox()
+{
+}
+
+void HexaBaseDialog::updateName()
+{
+       if (!_documentModel) return;
+       if ( !_patternDataSelectionModel )  return;
+       const PatternDataModel*   patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+
+       QLineEdit* lineEdit = dynamic_cast<QLineEdit*>(sender());
+       if (!lineEdit) return;
+       QString newName = lineEdit->text();
+       if ( newName.isEmpty() ) return;
+
+       QVariant v = lineEdit->property("QModelIndex");
+       if ( !v.isValid() ) return;
+
+       QModelIndex index = v.value<QModelIndex>();
+       if ( index.isValid() )
+               _documentModel->setName( patternDataModel->mapToSource(index), newName );
+}
+
+
+
+// ============================================================== selectElementOfModel
+void HexaBaseDialog::selectElementOfModel()
+{
+       MESSAGE("HexaBaseDialog::selectElementOfModel()");
+       if (!_patternDataSelectionModel) return;
+
+       QListWidget* currentListWidget = dynamic_cast<QListWidget*>( sender() );
+       if ( !currentListWidget ) return;
+
+       _selectionMutex = true;
+
+       QList<QListWidgetItem *> sel = currentListWidget->selectedItems();
+       QModelIndex index;
+       _patternDataSelectionModel->clearSelection();
+       foreach ( QListWidgetItem *item, sel ){
+               MESSAGE( "*  selecting the element : " << index.data().toString().toStdString() );
+               index = item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>();
+               if ( index.isValid() )
+                       _patternDataSelectionModel->select( index, QItemSelectionModel::Select );
+       }
+       _selectionMutex = false;
+
+       MESSAGE("}");
+}
+
+// ============================================================== eventFilter
+bool HexaBaseDialog::eventFilter(QObject *obj, QEvent *event)
+{
+       QLineEdit       *lineEdit = dynamic_cast<QLineEdit*>(obj);
+       QListWidget *listWidget = dynamic_cast<QListWidget*>(obj);
+       HexaBaseDialog  *dialog = dynamic_cast<HexaBaseDialog*>(obj);
+
+       if ( event->type() == QEvent::FocusIn ){
+               QString className  = obj->metaObject()->className();
+               QString objectName = obj->objectName();
+               MESSAGE("QEvent::FocusIn : I am "<< objectName.toStdString() );
+               MESSAGE("QEvent::FocusIn : I am "<< className.toStdString() );
+
+               // Highlight the input widget
+               if ( lineEdit || listWidget ){
+                       QWidget* w = dynamic_cast<QWidget*>(obj);
+                       QPalette palette1 = w->palette();
+                       palette1.setColor(w->backgroundRole(), Qt::yellow);
+                       w->setPalette(palette1);
+               }
+       }
+
+       if ( event->type() == QEvent::FocusOut ){
+               QString className = obj->metaObject()->className();
+               QString objectName = obj->objectName();
+               MESSAGE("QEvent::FocusOut : I am "<< objectName.toStdString() );
+               MESSAGE("QEvent::FocusOut : I am "<< className.toStdString() );
+
+               // UnHighlight the input widget
+               if ( lineEdit || listWidget ){
+                       QWidget* w = dynamic_cast<QWidget*>(obj);
+                       QPalette palette1 = w->palette();
+                       palette1.setColor(w->backgroundRole(), Qt::white);
+                       w->setPalette(palette1);
+               }
+       }
+
+       if ( event->type() != QEvent::FocusIn ){ //QEvent::KeyPress) {
+               return false;
+               //              return QObject::eventFilter(obj, event);
+       }
+
+       MESSAGE("HexaBaseDialog::eventFilter{");
+       MESSAGE("*  QEvent::FocusIn");
+
+       /* ON FOCUS ON A WIDGET*/
+       QVariant v;
+       QModelIndex index;
+
+
+       QItemSelectionModel *selector = 0;
+       _allowVTKSelection( obj );
+
+       //geom selection
+       _allowOCCSelection( obj );
+
+       //Depending of focused widget type, get the right selector for it
+       selector = _getSelector( obj );
+       if ( !selector ) return false;
+
+       // Highlight the input widget
+       if ( _currentObj != obj && (lineEdit || listWidget) ){
+               selector->clearSelection();
+       }
+       _currentObj = obj;
+
+
+       //If there is a current selection fill the widget with it
+       if ( selector->hasSelection() ){
+               QItemSelection currentSelection  = selector->selection();
+               bool selOk = false;
+               if ( lineEdit ){ //element can be from lineEdit
+                       selOk = _onSelectionChanged( currentSelection, lineEdit );
+               } else if ( listWidget ){
+                       selOk = _onSelectionChanged( currentSelection, listWidget );
+               }
+               if ( !selOk &&  ( lineEdit || listWidget ) ){
+                       selector->clearSelection();
+               }
+
+       } else { //If the widget contains an hexa element, select it in model/view
+               if ( lineEdit ){ //element can be from lineEdit
+                       MESSAGE("*  on QLineEdit");
+                       v = lineEdit->property("QModelIndex");
+                       if ( !v.isValid() ) {
+                               //return QObject::eventFilter(obj, event);
+                               return false;
+                       }
+                       index = v.value<QModelIndex>();
+
+                       _selectionMutex = true;
+                       MESSAGE("*  selecting the element : " << index.data().toString().toStdString());
+                       MESSAGE("*  with selector : " << selector);
+                       MESSAGE( "*  _patternDataSelectionModel    : " << _patternDataSelectionModel );
+                       MESSAGE( "*  _patternBuilderSelectionModel : " << _patternBuilderSelectionModel );
+                       MESSAGE( "*  _groupsSelectionModel         : " << _groupsSelectionModel );
+                       MESSAGE( "*  _meshSelectionModel           : " << _meshSelectionModel );
+                       selector->select( index, QItemSelectionModel::Clear );
+                       selector->select( index, QItemSelectionModel::Select );
+                       _selectionMutex = false;
+               }
+
+
+               if ( dialog ){ //element can be from a dialog box
+                       MESSAGE("*  on Dialog");
+                       v = dialog->property("QModelIndex");
+                       if ( !v.isValid() ) {
+                               //return QObject::eventFilter(obj, event);
+                               return false;
+                       }
+                       index = v.value<QModelIndex>();
+                       _selectionMutex = true;
+                       MESSAGE("*  selecting the element : " << index.data().toString().toStdString());
+                       selector->select( index, QItemSelectionModel::Clear );
+                       selector->select( index, QItemSelectionModel::Select );
+                       _selectionMutex = false;
+               }
+
+       }
+       MESSAGE("}");
+       return false;
+}
+
+
+// ------------------------- VERTEX ----------------------------------
+
+// ============================================================== Constructeur
+VertexDialog::VertexDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                 HexaBaseDialog(parent, editmode, f),
+                                                                 _value(0)
+{
+       _helpFileName = "gui_vertex.html";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( name_le );
+
+       if ( editmode  == NEW_MODE ){
+               setWindowTitle( tr("Vertex Construction") );
+       } else if ( editmode == UPDATE_MODE ){
+               setWindowTitle( tr("Vertex Modification") );
+       }
+}
+
+// ============================================================== Destructeur
+VertexDialog::~VertexDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void VertexDialog::_initInputWidget( Mode editmode )
+{
+       x_spb->setRange(VERTEX_COORD_MIN, VERTEX_COORD_MAX);
+       y_spb->setRange(VERTEX_COORD_MIN, VERTEX_COORD_MAX);
+       z_spb->setRange(VERTEX_COORD_MIN, VERTEX_COORD_MAX);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       installEventFilter(this);
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       name_le->installEventFilter(this);
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()));
+}
+
+// ============================================================== clear
+void VertexDialog::clear()
+{
+       //   name_le->clear();
+}
+
+// ============================================================== setValue
+void VertexDialog::setValue(HEXA_NS::Vertex* v)
+{
+       MESSAGE("*  setValue : " << v);
+       //0) Name
+       name_le->setText( v->getName() );
+
+       //1) Value (x,y,z)
+       x_spb->setValue( v->getX() );
+       y_spb->setValue( v->getY() );
+       z_spb->setValue( v->getZ() );
+
+       MESSAGE("*  _patternDataSelectionModel  : " << _patternDataSelectionModel );
+       if ( _patternDataSelectionModel ){
+               QModelIndex iv = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v) );
+               MESSAGE("*  selecting the element : " << iv.data().toString().toStdString());
+
+               setProperty( "QModelIndex",  QVariant::fromValue<QModelIndex>(iv) );
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue<QModelIndex>(iv) );
+       }
+       _value = v;
+}
+
+
+// ============================================================== getValue
+HEXA_NS::Vertex* VertexDialog::getValue()
+{
+       return _value;
+}
+
+
+
+// ============================================================== apply
+bool VertexDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       bool isOk = false;
+
+       QModelIndex iVertex;
+       double newX = x_spb->value();
+       double newY = y_spb->value();
+       double newZ = z_spb->value();
+
+       if ( _editMode == UPDATE_MODE){
+               QVariant v = property("QModelIndex");
+               if ( v.isValid() ){
+                       iVertex = patternDataModel->mapToSource( v.value<QModelIndex>() );
+                       if ( iVertex.isValid() )
+                               isOk = _documentModel->updateVertex( iVertex, newX, newY, newZ );
+               }
+       } else if ( _editMode == NEW_MODE){
+               iVertex = _documentModel->addVertex( newX, newY, newZ );
+               if ( iVertex.isValid() )
+                       isOk = true;
+       }
+       if (!isOk) {
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "VERTEX UPDATE/CONSTRUCTION" ) );
+               return false;
+       }
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iVertex, newName );
+
+       // to select/highlight result
+       result = patternDataModel->mapFromSource(iVertex);
+
+       return isOk;
+}
+
+
+// ------------------------- EDGE ----------------------------------
+
+// ============================================================== Constructeur
+EdgeDialog::EdgeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                 HexaBaseDialog(parent, editmode, f),
+                                                                 _value(0)
+{
+       _helpFileName = "gui_edge.html";
+       setupUi( this );
+       _initWidget(editmode);
+
+       rb0->setFocusProxy( v0_le_rb0 );
+       rb1->setFocusProxy( vex_le_rb1 );
+       rb0->click();
+
+       if  ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Edge Information") );
+               rb1->hide();
+       }
+}
+
+
+
+// ============================================================== Destructeur
+EdgeDialog::~EdgeDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void EdgeDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       name_le->installEventFilter(this);
+
+       v0_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v0_le_rb0->setValidator( validator );
+       v1_le_rb0->setValidator( validator );
+       v0_le_rb0->installEventFilter(this);
+       v1_le_rb0->installEventFilter(this);
+
+       vex_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       vex_le_rb1->setValidator( validator );
+       vec_le_rb1->setValidator( validator );
+       vex_le_rb1->installEventFilter(this);
+       vec_le_rb1->installEventFilter(this);
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()) );
+}
+
+
+// ============================================================== Clear
+void EdgeDialog::clear()
+{
+       name_le->clear();
+       v0_le_rb0->clear();
+       v1_le_rb0->clear();
+       vex_le_rb1->clear();
+       vec_le_rb1->clear();
+}
+
+
+
+// ============================================================== setValue
+void EdgeDialog::setValue(HEXA_NS::Edge* e)
+{
+       HEXA_NS::Vertex* v0 = e->getVertex(0);
+       HEXA_NS::Vertex* v1 = e->getVertex(1);
+
+       name_le->setText( e->getName() );
+       v0_le_rb0->setText( v0->getName() );
+       v1_le_rb0->setText( v1->getName() );
+
+       if ( _patternDataSelectionModel ){
+               QModelIndex ie  = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(e) );
+               QModelIndex iv0 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v0) );
+               QModelIndex iv1 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v1) );
+
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(ie) );
+               v0_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv0) );
+               v1_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv1) );
+       }
+       _value = e;
+}
+
+
+// ============================================================== getValue
+HEXA_NS::Edge* EdgeDialog::getValue()
+{
+       return _value;
+}
+
+// ============================================================== apply
+bool EdgeDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iEdge;
+
+       if ( rb0->isChecked() ){
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb0] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb0] );
+               if ( iv0.isValid()&& iv1.isValid() ){
+                       iEdge = _documentModel->addEdgeVertices( iv0, iv1 );
+               }
+       } else if ( rb1->isChecked() ){
+               QModelIndex ivex = patternDataModel->mapToSource( _index[vex_le_rb1] );
+               QModelIndex ivec = patternBuilderModel->mapToSource( _index[vec_le_rb1] );
+               if ( ivex.isValid() && ivec.isValid() ){
+                       iEdge = _documentModel->addEdgeVector( ivex, ivec );
+               }
+       }
+
+       if ( !iEdge.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT BUILD EDGE" ) );
+               return false;
+       }
+       _value  = iEdge.model()->data(iEdge, HEXA_DATA_ROLE).value<HEXA_NS::Edge*>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iEdge, newName );
+
+       result = patternDataModel->mapFromSource(iEdge);
+
+       return true;
+}
+
+
+// ------------------------- QUAD ----------------------------------
+
+// ============================================================== Constructeur
+QuadDialog::QuadDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                 HexaBaseDialog(parent, editmode, f),
+                                                                 _value(0)
+{
+       _helpFileName = "gui_quadrangle.html";
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( v0_le_rb0 );
+       rb1->setFocusProxy( e0_le_rb1 );
+       rb0->click();
+
+       if  ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Quad Information") );
+       }
+}
+
+// ============================================================== Destructeur
+QuadDialog::~QuadDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void QuadDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       name_le->installEventFilter(this);
+
+       v0_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v2_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v3_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+
+       v0_le_rb0->setValidator( validator );
+       v1_le_rb0->setValidator( validator );
+       v2_le_rb0->setValidator( validator );
+       v3_le_rb0->setValidator( validator );
+       v0_le_rb0->installEventFilter(this);
+       v1_le_rb0->installEventFilter(this);
+       v2_le_rb0->installEventFilter(this);
+       v3_le_rb0->installEventFilter(this);
+
+       e0_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       e1_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       e2_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       e3_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+
+       e0_le_rb1->setValidator( validator );
+       e1_le_rb1->setValidator( validator );
+       e2_le_rb1->setValidator( validator );
+       e3_le_rb1->setValidator( validator );
+
+       e0_le_rb1->installEventFilter(this);
+       e1_le_rb1->installEventFilter(this);
+       e2_le_rb1->installEventFilter(this);
+       e3_le_rb1->installEventFilter(this);
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()) );
+}
+
+
+// ============================================================== clear
+void QuadDialog::clear()
+{
+       v0_le_rb0->clear();
+       v1_le_rb0->clear();
+       v2_le_rb0->clear();
+       v3_le_rb0->clear();
+
+       e0_le_rb1->clear();
+       e1_le_rb1->clear();
+       e2_le_rb1->clear();
+       e3_le_rb1->clear();
+
+       name_le->clear();
+}
+
+
+// ============================================================== setValue
+void QuadDialog::setValue(HEXA_NS::Quad* q)
+{
+       Q_ASSERT( q->countEdge() == 4 );
+       Q_ASSERT( q->countVertex() == 4 );
+
+       //0) Name
+       name_le->setText( q->getName() );
+
+       //1) Vertices
+       HEXA_NS::Vertex* v0 = q->getVertex(0);
+       HEXA_NS::Vertex* v1 = q->getVertex(1);
+       HEXA_NS::Vertex* v2 = q->getVertex(2);
+       HEXA_NS::Vertex* v3 = q->getVertex(3);
+
+       v0_le_rb0->setText( v0->getName() );
+       v1_le_rb0->setText( v1->getName() );
+       v2_le_rb0->setText( v2->getName() );
+       v3_le_rb0->setText( v3->getName() );
+
+
+       //2) Edges
+       HEXA_NS::Edge* e0 = q->getEdge(0);
+       HEXA_NS::Edge* e1 = q->getEdge(1);
+       HEXA_NS::Edge* e2 = q->getEdge(2);
+       HEXA_NS::Edge* e3 = q->getEdge(3);
+
+       e0_le_rb1->setText( e0->getName() );
+       e1_le_rb1->setText( e1->getName() );
+       e2_le_rb1->setText( e2->getName() );
+       e3_le_rb1->setText( e3->getName() );
+
+       if ( _patternDataSelectionModel ){
+               QModelIndex iq = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(q) );
+
+               QModelIndex iv0 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v0) );
+               QModelIndex iv1 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v1) );
+               QModelIndex iv2 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v2) );
+               QModelIndex iv3 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v3) );
+
+               QModelIndex ie0 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(e0) );
+               QModelIndex ie1 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(e1) );
+               QModelIndex ie2 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(e2) );
+               QModelIndex ie3 = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(e3) );
+
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(iq) );
+
+               v0_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv0) );
+               v1_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv1) );
+               v2_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv2) );
+               v3_le_rb0->setProperty( "QModelIndex",  QVariant::fromValue(iv3) );
+
+               e0_le_rb1->setProperty( "QModelIndex",  QVariant::fromValue(ie0) );
+               e1_le_rb1->setProperty( "QModelIndex",  QVariant::fromValue(ie1) );
+               e2_le_rb1->setProperty( "QModelIndex",  QVariant::fromValue(ie2) );
+               e3_le_rb1->setProperty( "QModelIndex",  QVariant::fromValue(ie3) );
+       }
+       _value = q;
+
+}
+
+// ============================================================== getValue
+HEXA_NS::Quad* QuadDialog::getValue()
+{
+       return _value;
+}
+
+
+// ============================================================== apply
+bool QuadDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iQuad;
+
+       if ( rb0->isChecked() ){ //vertices
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb0] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb0] );
+               QModelIndex iv2 = patternDataModel->mapToSource( _index[v2_le_rb0] );
+               QModelIndex iv3 = patternDataModel->mapToSource( _index[v3_le_rb0] );
+
+               if ( iv0.isValid()
+                               && iv1.isValid()
+                               && iv2.isValid()
+                               && iv3.isValid() ){
+                       iQuad = _documentModel->addQuadVertices( iv0, iv1, iv2, iv3 );
+               }
+       } else if ( rb1->isChecked() ){ //edges
+               QModelIndex ie0 = patternDataModel->mapToSource( _index[e0_le_rb1] );
+               QModelIndex ie1 = patternDataModel->mapToSource( _index[e1_le_rb1] );
+               QModelIndex ie2 = patternDataModel->mapToSource( _index[e2_le_rb1] );
+               QModelIndex ie3 = patternDataModel->mapToSource( _index[e3_le_rb1] );
+
+               if ( ie0.isValid()
+                               && ie1.isValid()
+                               && ie2.isValid()
+                               && ie3.isValid() ){
+                       iQuad = _documentModel->addQuadEdges( ie0, ie1, ie2, ie3 );
+               }
+       }
+
+       if ( !iQuad.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT BUILD QUAD" ) );
+               return false;
+       }
+       _value  = iQuad.model()->data(iQuad, HEXA_DATA_ROLE).value<HEXA_NS::Quad *>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iQuad, newName );
+
+       // to select/highlight result
+       result = patternDataModel->mapFromSource(iQuad);
+
+       return true;
+}
+
+
+
+// ------------------------- HEXA ----------------------------------
+
+// ============================================================== HexaDialog
+
+HexaDialog::HexaDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                 HexaBaseDialog(parent, editmode, f),
+                                                                 _value(0)
+{
+       _helpFileName = "gui_hexahedron.html";
+       setupUi( this );
+       _initWidget(editmode);
+       quads_rb->setFocusProxy( quads_lw );
+       vertices_rb->setFocusProxy( vertices_lw );
+       quads_rb->click();
+       //   quads_rb->setFocus();
+
+       if  ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Hexahedron Information") );
+       }
+}
+
+// ============================================================== Destructeur
+HexaDialog::~HexaDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void HexaDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       name_le->installEventFilter(this);
+
+       quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       quads_lw->installEventFilter(this);
+
+       vertices_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vertices_lw->installEventFilter(this);
+
+
+       if ( editmode != INFO_MODE ) {
+               // delete item from listwidget
+               QShortcut* delQuadShortcut   = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+               QShortcut* delVertexShortcut = new QShortcut( QKeySequence(Qt::Key_X), vertices_lw );
+               delQuadShortcut->setContext( Qt::WidgetShortcut );
+               delVertexShortcut->setContext( Qt::WidgetShortcut );
+               connect(delQuadShortcut,   SIGNAL(activated()), this, SLOT(deleteQuadItem()));
+               connect(delVertexShortcut, SIGNAL(activated()), this, SLOT(deleteVertexItem()));
+       }
+       // edit name
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()) );
+       // highlight item on model view (VTK) from listwidget
+       connect( quads_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+       connect( vertices_lw, SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+}
+
+// ============================================================== clear
+void HexaDialog::clear()
+{
+       name_le->clear();
+       quads_lw->clear();
+       vertices_lw->clear();
+}
+
+// ============================================================== updateButtonBox
+void HexaDialog::updateButtonBox()
+{
+       if ( quads_rb->isChecked() ){  // build from quads count() must be between [2,6]
+               int nbQuads = quads_lw->count();
+               //std::cout << "nbQuads => " <<  nbQuads << std::endl;
+               if ( nbQuads >= 2 && nbQuads <= 6 ){
+                       //_applyCloseButton->setEnabled(true);
+                       _applyButton->setEnabled(true);
+                       //       _applyCloseButton->setFlat( false );
+                       //       _applyButton->setFlat( false );
+               } else {
+                       //_applyCloseButton->setEnabled(false);
+                       _applyButton->setEnabled(false);
+                       //       _applyCloseButton->setFlat( true );
+                       //       _applyButton->setFlat( true );
+               }
+       } else if ( vertices_rb->isChecked() ){ // build from vertices count() must be equals to 8
+               int nbVertices = vertices_lw->count();
+               //std::cout << "nbVertices => " <<  nbVertices << std::endl;
+               if ( nbVertices == 8 ){
+                       //_applyCloseButton->setEnabled(true);
+                       _applyButton->setEnabled(true);
+                       //       _applyCloseButton->setFlat( false );
+                       //       _applyButton->setFlat( false );
+               } else {
+                       //_applyCloseButton->setEnabled(false);
+                       _applyButton->setEnabled(false);
+                       //       _applyCloseButton->setFlat( true );
+                       //       _applyButton->setFlat( true );
+               }
+       }
+}
+
+// ============================================================== deleteQuadItem
+void HexaDialog::deleteQuadItem()
+{
+       delete quads_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== deleteVertexItem
+void HexaDialog::deleteVertexItem()
+{
+       delete vertices_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== _setValueQuads
+void HexaDialog::_setValueQuads( HEXA_NS::Hexa* h )
+{
+       QListWidgetItem *qItem = NULL;
+       HEXA_NS::Quad   *q     = NULL;
+       QModelIndex      qIndex;
+
+       quads_lw->clear();
+       for( int i = 0; i <= 5; ++i ){
+               q      = h->getQuad(i);
+               qIndex = _patternDataSelectionModel->indexBy( HEXA_ENTRY_ROLE, QString::number(reinterpret_cast<intptr_t>(q)) );
+               qItem  = new QListWidgetItem( q->getName() );
+               qItem->setData(  LW_QMODELINDEX_ROLE, QVariant::fromValue<QModelIndex>(qIndex) );
+               quads_lw->addItem( qItem );
+       }
+}
+
+// ============================================================== _setValueVertices
+void HexaDialog::_setValueVertices( HEXA_NS::Hexa* h )
+{
+       QListWidgetItem *vItem = NULL;
+       HEXA_NS::Vertex* v     = NULL;
+       QModelIndex      vIndex;
+
+       vertices_lw->clear();
+       for( int i = 0; i <= 7; ++i ){
+               v = h->getVertex(i);
+               vIndex = _patternDataSelectionModel->indexBy( HEXA_ENTRY_ROLE, QString::number(reinterpret_cast<intptr_t>(v)) );
+               vItem  = new QListWidgetItem( v->getName() );
+               vItem->setData(  LW_QMODELINDEX_ROLE, QVariant::fromValue<QModelIndex>(vIndex) );
+               vertices_lw->addItem( vItem );
+       }
+}
+
+// ============================================================== setValue
+void HexaDialog::setValue(HEXA_NS::Hexa* h)
+{
+       // 0) name
+       name_le->setText( h->getName() );
+
+       if ( _patternDataSelectionModel){
+               QModelIndex hIndex = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(h) );
+               _setValueVertices(h);
+               _setValueQuads(h);
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(hIndex) );
+       }
+       _value = h;
+}
+
+// ============================================================== getValue
+HEXA_NS::Hexa* HexaDialog::getValue()
+{
+       return _value;
+}
+
+// ============================================================== apply
+bool HexaDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex  iHexa;
+
+       QListWidget* currentLw = NULL;
+       QListWidgetItem*  item = NULL;
+
+       if ( quads_rb->isChecked() )
+               currentLw = dynamic_cast<QListWidget*>( quads_lw );
+       else if ( vertices_rb->isChecked() )
+               currentLw = dynamic_cast<QListWidget*>( vertices_lw );
+
+       QModelIndex     iElt;
+       QModelIndexList iElts;
+       for ( int r = 0; r < currentLw->count(); ++r){
+               item = currentLw->item(r);
+               iElt = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               if ( iElt.isValid() )
+                       iElts << iElt;
+       }
+
+       if ( quads_rb->isChecked() and (iElts.count()>=2 and iElts.count()<=6) ){ // build from quads iElts.count() should be between [2,6]
+               iHexa = _documentModel->addHexaQuads( iElts );
+       } else if ( vertices_rb->isChecked() and iElts.count()== 8 ){ // build from vertices
+               iHexa = _documentModel->addHexaVertices( iElts[0], iElts[1], iElts[2], iElts[3],
+                               iElts[4], iElts[5], iElts[6], iElts[7] );
+       }
+
+       if ( !iHexa.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT BUILD HEXA" ) );
+               return false;
+       }
+       _value  = iHexa.model()->data(iHexa, HEXA_DATA_ROLE).value<HEXA_NS::Hexa*>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iHexa, newName );
+
+       // to select/highlight result
+       result = patternDataModel->mapFromSource(iHexa);
+
+       return true;
+}
+
+
+// ------------------------- VECTOR ----------------------------------
+
+// ============================================================== Constructeur
+
+VectorDialog::VectorDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                 HexaBaseDialog(parent, editmode, f),
+                                                                 _value(0)
+{
+       _helpFileName = "gui_vector.html";
+       setupUi( this );
+       _initWidget(editmode);
+
+       rb0->setFocusProxy( dx_spb_rb0 );
+       rb1->setFocusProxy( v0_le_rb1 );
+       rb0->click();
+       //   setFocusProxy( rb0 );
+
+       if ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Vector Information") );
+               rb1->hide();
+       }
+}
+
+// ============================================================== Destructeur
+VectorDialog::~VectorDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void VectorDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       name_le->installEventFilter(this);
+
+       v0_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v0_le_rb1->setValidator( validator );
+       v0_le_rb1->installEventFilter(this);
+
+       v1_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb1->setValidator( validator );
+       v1_le_rb1->installEventFilter(this);
+
+       if ( editmode == INFO_MODE ){
+               dx_spb_rb0->setReadOnly(true);
+               dy_spb_rb0->setReadOnly(true);
+               dz_spb_rb0->setReadOnly(true);
+       }
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()) );
+}
+
+// ============================================================== clear
+void VectorDialog::clear()
+{
+       name_le->clear();
+       dx_spb_rb0->clear();
+       dy_spb_rb0->clear();
+       dz_spb_rb0->clear();
+       v0_le_rb1->clear();
+       v1_le_rb1->clear();
+}
+
+// ============================================================== setValue
+void VectorDialog::setValue(HEXA_NS::Vector* v)
+{
+       name_le->setText( v->getName() );
+       dx_spb_rb0->setValue( v->getDx() );
+       dy_spb_rb0->setValue( v->getDy() );
+       dz_spb_rb0->setValue( v->getDz() );
+
+       if ( _patternDataSelectionModel ){
+               QModelIndex ivec = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(v) );
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(ivec) );
+       }
+       _value = v;
+}
+
+// ============================================================== getValue
+HEXA_NS::Vector* VectorDialog::getValue()
+{
+       return _value;
+}
+
+// ============================================================== apply
+bool VectorDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel )  return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iVector;
+
+       if ( rb0->isChecked() ){ //scalar
+               double dx = dx_spb_rb0->value();
+               double dy = dy_spb_rb0->value();
+               double dz = dz_spb_rb0->value();
+
+               iVector = _documentModel->addVector( dx, dy, dz );
+       } else if ( rb1->isChecked() ){ //vertices
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb1] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb1] );
+
+               if ( iv0.isValid()
+                               && iv1.isValid() ){
+                       iVector = _documentModel->addVectorVertices( iv0, iv1 );
+               }
+       }
+
+       if ( !iVector.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT BUILD VECTOR" ) );
+               return false;
+       }
+
+       _value  = iVector.model()->data(iVector, HEXA_DATA_ROLE).value<HEXA_NS::Vector *>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iVector, newName );
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iVector);
+
+       return true;
+}
+
+
+// ============================================================== Constructeur
+CylinderDialog::CylinderDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f),
+  _value(0)
+{
+       _helpFileName = "gui_cyl.html";
+       setupUi( this );
+       _initWidget(editmode);
+
+       if ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Cylinder Information") );
+       }
+}
+
+// ============================================================== Destructeur
+CylinderDialog::~CylinderDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void CylinderDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(CYLINDER_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(CYLINDER_TREE) );
+       name_le->installEventFilter(this);
+
+       vex_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+
+       vex_le->setValidator( validator );
+       vec_le->setValidator( validator );
+
+       vex_le->installEventFilter(this);
+       vec_le->installEventFilter(this);
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()));
+}
+
+// ============================================================== clear
+void CylinderDialog::clear()
+{
+       name_le->clear();
+       vex_le->clear();
+       vec_le->clear();
+       r_spb->clear();
+       h_spb->clear();
+}
+
+// ============================================================== setValue
+void CylinderDialog::setValue(HEXA_NS::Cylinder* c)
+{
+       HEXA_NS::Vertex* base      = c->getBase();
+       HEXA_NS::Vector* direction = c->getDirection();
+       double  r = c->getRadius();
+       double  h = c->getHeight();
+
+       name_le->setText( c->getName() );
+       vex_le->setText( base->getName() );
+       vec_le->setText( direction->getName() );
+       r_spb->setValue(r);
+       h_spb->setValue(h);
+
+       if ( _patternDataSelectionModel ){
+               QModelIndex iCyl       = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(c) );
+               QModelIndex iBase      = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(base) );
+               QModelIndex iDirection = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(direction) );
+
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(iCyl) );
+               vex_le->setProperty( "QModelIndex",  QVariant::fromValue(iBase) );
+               vec_le->setProperty( "QModelIndex",  QVariant::fromValue(iDirection) );
+       }
+       _value = c;
+}
+
+// ============================================================== getValue
+HEXA_NS::Cylinder* CylinderDialog::getValue()
+{
+       return _value;
+}
+
+
+
+// ============================================================== apply
+bool CylinderDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel ) return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iCyl;
+       QModelIndex ivex = patternDataModel->mapToSource( _index[vex_le] );
+       QModelIndex ivec = patternBuilderModel->mapToSource( _index[vec_le] );
+       double r = r_spb->value();
+       double h = h_spb->value();
+
+       if ( ivex.isValid()
+                       && ivec.isValid() ){
+               iCyl = _documentModel->addCylinder( ivex, ivec, r,  h );
+       }
+
+       if ( !iCyl.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT ADD CYLINDER" ) );
+               return false;
+       }
+
+       _value  = iCyl.model()->data(iCyl, HEXA_DATA_ROLE).value<HEXA_NS::Cylinder *>();
+
+       QString newName = name_le->text();
+       if (!newName.isEmpty()) /*{*/
+               _documentModel->setName( iCyl, newName );
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iCyl);
+
+       return true;
+}
+
+
+//------------------------------- PipeDialog -----------------------------------
+
+// ============================================================== Constructeur
+
+PipeDialog::PipeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f),
+  _value(0)
+{
+       _helpFileName = "gui_pipe.html";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( vex_le );
+
+       if ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Pipe Information") );
+       }
+
+}
+
+// ============================================================== Destructeur
+PipeDialog::~PipeDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void PipeDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(PIPE_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(PIPE_TREE) );
+       name_le->installEventFilter(this);
+
+       //Vertex Field config
+       vex_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vex_le->installEventFilter(this);
+       vex_le->setValidator( validator );
+
+       //Vector Field config
+       vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       vec_le->installEventFilter(this);
+       vec_le->setValidator( validator );
+
+
+       if ( editmode == INFO_MODE ){
+               ir_spb->setReadOnly(true);
+               er_spb->setReadOnly(true);
+               h_spb->setReadOnly(true);
+       }
+
+       connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()));
+}
+
+
+// ============================================================== clear
+void PipeDialog::clear()
+{
+       name_le->clear();
+       vex_le->clear();
+       vec_le->clear();
+}
+
+// ============================================================== setValue
+void PipeDialog::setValue(HEXA_NS::Pipe* p)
+{
+       HEXA_NS::Vertex* base      = p->getBase();
+       HEXA_NS::Vector* direction = p->getDirection();
+       double  ir = p->getInternalRadius();
+       double  er = p->getRadius();
+       double  h  = p->getHeight();
+
+       name_le->setText( p->getName() );
+       vex_le->setText( base->getName() );
+       vec_le->setText( direction->getName() );
+       ir_spb->setValue(ir);
+       er_spb->setValue(er);
+       h_spb->setValue(h);
+
+       if ( _patternDataSelectionModel ){
+               QModelIndex iPipe      = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(p) );
+               QModelIndex iBase      = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(base) );
+               QModelIndex iDirection = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(direction) );
+
+               name_le->setProperty( "QModelIndex",  QVariant::fromValue(iPipe) );
+               vex_le->setProperty( "QModelIndex",  QVariant::fromValue(iBase) );
+               vec_le->setProperty( "QModelIndex",  QVariant::fromValue(iDirection) );
+       }
+       _value = p;
+}
+
+// ============================================================== getValue
+HEXA_NS::Pipe* PipeDialog::getValue()
+{
+       return _value;
+}
+
+
+// ============================================================== apply
+bool PipeDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iPipe;
+       QModelIndex ivex = patternDataModel->mapToSource( _index[vex_le] );
+       QModelIndex ivec = patternBuilderModel->mapToSource( _index[vec_le] );
+       double ir = ir_spb->value();
+       double er = er_spb->value();
+       double h  = h_spb->value();
+
+       if (ir >= er) {
+               SUIT_MessageBox::information( this, tr( "CANNOT ADD PIPE" ), tr( "External radius must be greather than Internal radius!" ) );
+               return false;
+       }
+
+
+       if ( ivex.isValid()
+                       && ivec.isValid() ){
+               iPipe = _documentModel->addPipe( ivex, ivec, ir, er, h );
+       }
+
+       if ( !iPipe.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT ADD PIPE" ) );
+               return false;
+       }
+       _value  = iPipe.model()->data(iPipe, HEXA_DATA_ROLE).value<HEXA_NS::Pipe *>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iPipe, newName );
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iPipe);
+
+       return true;
+}
+
+
+// ------------------------- MakeGridDialog ----------------------------------
+//                  ( Cartesian, Cylindrical, Spherical )
+
+// ============================================================== Constructeur
+
+MakeGridDialog::MakeGridDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->click();// Default : cartesian grid
+       uniform_rb->click();
+       rb0->setFocusProxy( vex_le_rb0 );
+       rb1->setFocusProxy( center_le_rb1 );
+       rb2->setFocusProxy( vex_le_rb2 );
+       //   setFocusProxy( rb0 );
+
+       _helpFileName = "creategrids.html#guicartgrid";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+
+// ============================================================== Destructeur
+MakeGridDialog::~MakeGridDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakeGridDialog::_initInputWidget( Mode editmode )
+{
+
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       vex_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       vex_le_rb0->setValidator( validator );
+       vec_le_rb0->setValidator( validator );
+       vex_le_rb0->installEventFilter(this);
+       vec_le_rb0->installEventFilter(this);
+
+       center_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       base_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       height_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       center_le_rb1->setValidator( validator );
+       base_le_rb1->setValidator( validator );
+       height_le_rb1->setValidator( validator );
+       center_le_rb1->installEventFilter(this);
+       base_le_rb1->installEventFilter(this);
+       height_le_rb1->installEventFilter(this);
+
+       vex_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vex_le_rb2->setValidator( validator );
+       vex_le_rb2->installEventFilter(this);
+
+
+       if ( editmode != INFO_MODE ){
+               //Cylindrical
+               radius_lw->setItemDelegate(new HexaPositiveDoubleSpinBoxDelegate(radius_lw));
+               radius_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
+
+               angle_lw->setItemDelegate(new HexaAngleDoubleSpinBoxDelegate(angle_lw));
+               angle_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
+
+               height_lw->setItemDelegate(new HexaPositiveDoubleSpinBoxDelegate(height_lw));
+               height_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
+
+               connect( add_radius_pb, SIGNAL(clicked()), this, SLOT(addRadiusItem()) );
+               connect( del_radius_pb, SIGNAL(clicked()), this, SLOT(delRadiusItem()) );
+               connect( add_angle_pb, SIGNAL(clicked()), this, SLOT(addAngleItem()) );
+               connect( del_angle_pb, SIGNAL(clicked()), this, SLOT(delAngleItem()) );
+               connect( add_height_pb, SIGNAL(clicked()), this, SLOT(addHeightItem()) );
+               connect( del_height_pb, SIGNAL(clicked()), this, SLOT(delHeightItem()) );
+       }
+
+}
+
+// ============================================================== clear
+void MakeGridDialog::clear()
+{
+       vex_le_rb0->clear();
+       vec_le_rb0->clear();
+       base_le_rb1->clear();
+       center_le_rb1->clear();
+       height_le_rb1->clear();
+       random_param_w->clear();
+       radius_lw->clear();
+       angle_lw->clear();
+       height_lw->clear();
+       vex_le_rb2->clear();
+}
+
+// ============================================================== updateHelpFileName
+void MakeGridDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "creategrids.html#guicartgrid";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "creategrids.html#guicylgrid";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "creategrids.html#guisphergrid";
+       }
+}
+
+
+// ============================================================== updateButtonBox
+void MakeGridDialog::updateButtonBox() //CS_TODO?
+{
+       //   int nbQuads  = quads_lw->count();
+       //   int nbAngles = angles_lw->count();
+       //
+       //   if ( nbQuads>0 && nbAngles> 0 ){
+       //     _applyCloseButton->setEnabled(true);
+       //     _applyButton->setEnabled(true);
+       //   } else {
+       //     _applyCloseButton->setEnabled(false);
+       //     _applyButton->setEnabled(false);
+       //   }
+
+       //   if ( rb0->isChecked() ){ //cartesian
+       //   } else if ( rb1->isChecked() ){ //cylindrical
+       //     nb_radius = radius_lw->item(r);
+       //     nb_angle  = angle_lw->item(r);
+       //     nb_height = height_lw->item(r);
+       //   } else if ( rb2->isChecked() ){ //spherical
+       //   }
+}
+
+// ============================================================== addRadiusItem
+void MakeGridDialog::addRadiusItem()
+{
+       QListWidgetItem* previousItem = radius_lw->currentItem();
+       QListWidgetItem* newItem      = new QListWidgetItem();
+
+       double defaultValue = 0.;
+       if ( previousItem )
+               defaultValue = previousItem->data(Qt::EditRole).toDouble();
+
+       newItem->setData(  Qt::EditRole, QVariant(defaultValue) );
+       newItem->setFlags( newItem->flags () | Qt::ItemIsEditable);
+       radius_lw->addItem(newItem);
+
+       updateButtonBox();
+}
+
+// ============================================================== delRadiusItem
+void MakeGridDialog::delRadiusItem()
+{
+       delete radius_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== addAngleItem
+void MakeGridDialog::addAngleItem()
+{
+       QListWidgetItem* previousItem = angle_lw->currentItem();
+       QListWidgetItem* newItem      = new QListWidgetItem();
+
+       double defaultValue = 0.;
+       if ( previousItem )
+               defaultValue = previousItem->data(Qt::EditRole).toDouble();
+
+       newItem->setData(  Qt::EditRole, QVariant(defaultValue) );
+       newItem->setFlags( newItem->flags () | Qt::ItemIsEditable);
+       angle_lw->addItem(newItem);
+
+       updateButtonBox();
+}
+
+// ============================================================== delAngleItem
+void MakeGridDialog::delAngleItem()
+{
+       //std::cout << "delAngleItem()" << std::endl;
+       delete angle_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== addHeightItem
+void MakeGridDialog::addHeightItem()
+{
+       QListWidgetItem* previousItem = height_lw->currentItem();
+       QListWidgetItem* newItem      = new QListWidgetItem();
+
+       double defaultValue = 0.;
+       if ( previousItem )
+               defaultValue = previousItem->data(Qt::EditRole).toDouble();
+
+       newItem->setData(  Qt::EditRole, QVariant(defaultValue) );
+       newItem->setFlags( newItem->flags () | Qt::ItemIsEditable);
+       height_lw->addItem(newItem);
+
+       updateButtonBox();
+}
+
+// ============================================================== delHeightItem
+void MakeGridDialog::delHeightItem()
+{
+       //std::cout << "delHeightItem()" << std::endl;
+       delete height_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== apply
+bool MakeGridDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iNewElts;
+       if ( rb0->isChecked() ){ //cartesian
+               QModelIndex ivex_rb0 = patternDataModel->mapToSource( _index[vex_le_rb0] );
+               QModelIndex ivec_rb0 = patternBuilderModel->mapToSource( _index[vec_le_rb0] );
+               long nx = nx_spb_rb0->value();
+               long ny = ny_spb_rb0->value();
+               long nz = nz_spb_rb0->value();
+
+               if ( ivex_rb0.isValid()
+                               && ivec_rb0.isValid() ){
+                       iNewElts = _documentModel->makeCartesian( ivex_rb0, ivec_rb0, nx, ny, nz );
+               }
+
+       } else if ( rb1->isChecked() ){ //cylindrical
+               QModelIndex icenter_rb1 = patternDataModel->mapToSource( _index[center_le_rb1] );
+               QModelIndex ibase_rb1   = patternBuilderModel->mapToSource( _index[base_le_rb1] );
+               QModelIndex iheight_rb1 = patternBuilderModel->mapToSource( _index[height_le_rb1] );
+
+               if ( icenter_rb1.isValid()
+                               && ibase_rb1.isValid()
+                               && iheight_rb1.isValid() ){
+
+                       bool fill = fill_cb_rb1->isChecked();
+                       if ( uniform_rb->isChecked() ){
+                               double dr = dr_spb_rb1->value();
+                               double da = da_spb_rb1->value();
+                               double dl = dl_spb_rb1->value();
+                               double nr = nr_spb_rb1->value();
+                               double na = na_spb_rb1->value();
+                               double nl = nl_spb_rb1->value();
+
+                               iNewElts = _documentModel->makeCylindrical( icenter_rb1,
+                                               ibase_rb1, iheight_rb1,
+                                               dr, da, dl, nr, na, nl, fill );
+                       }
+                       if ( random_rb->isChecked() ){
+                               QListWidgetItem* item = NULL;
+                               QDoubleSpinBox*   spb = NULL;
+
+                               QList<double> radius;
+                               QList<double> angles;
+                               QList<double> heights;
+
+                               for ( int r = 0; r < radius_lw->count(); ++r){
+                                       item = radius_lw->item(r);
+                                       //std::cout << "radius : " << item->data(Qt::EditRole).toDouble()<< std::endl;
+                                       radius << item->data(Qt::EditRole).toDouble();
+                               }
+
+                               for ( int r = 0; r < angle_lw->count(); ++r){
+                                       item = angle_lw->item(r);
+                                       angles << item->data(Qt::EditRole).toDouble();
+                               }
+
+                               for ( int r = 0; r < height_lw->count(); ++r){
+                                       item = height_lw->item(r);
+                                       heights << item->data(Qt::EditRole).toDouble();
+                               }
+
+                               iNewElts =  _documentModel->makeCylindricals(
+                                               icenter_rb1, ibase_rb1, iheight_rb1,
+                                               radius, angles, heights,
+                                               fill ); //NEW HEXA3
+
+                       }
+               }
+
+       } else if ( rb2->isChecked() ){ //spherical
+               QModelIndex ivex_rb2  = patternDataModel->mapToSource( _index[vex_le_rb2] );
+               //     QModelIndex ivecx_rb2 = patternBuilderModel->mapToSource( _index[vec_le_rb2] );
+               double radius = radius_spb_rb2->value();
+               int    nb     = nb_spb_rb2->value();
+               int    k      = k_spb_rb2->value();
+
+               if ( ivex_rb2.isValid() ){
+                       iNewElts = _documentModel->makeSpherical( ivex_rb2, radius, nb, k );
+               }
+       }
+
+       if ( !iNewElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE GRID" ) );
+               return false;
+       }
+
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource( iNewElts );
+
+       return true;
+}
+
+
+
+// ============================================================== Constructeur
+
+MakeCylinderDialog::MakeCylinderDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_blocks_for_cyl_pipe.html#make-cylinder";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( cyl_le );
+}
+
+// ============================================================== Destructeur
+MakeCylinderDialog::~MakeCylinderDialog()
+{
+}
+
+void MakeCylinderDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       cyl_le->setProperty( "HexaWidgetType",  QVariant::fromValue(CYLINDER_TREE) );
+       vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       cyl_le->setValidator( validator );
+       vec_le->setValidator( validator );
+       cyl_le->installEventFilter(this);
+       vec_le->installEventFilter(this);
+}
+
+// ============================================================== clear
+void MakeCylinderDialog::clear()
+{
+       cyl_le->clear();
+       vec_le->clear();
+}
+
+
+// ============================================================== apply
+bool MakeCylinderDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iElts;
+       QModelIndex icyl = patternBuilderModel->mapToSource( _index[cyl_le] );
+       QModelIndex ivec = patternBuilderModel->mapToSource( _index[vec_le] );
+       double nr = nr_spb->value();
+       double na = na_spb->value();
+       double nl = nl_spb->value();
+
+       if ( icyl.isValid()
+                       && ivec.isValid() ){
+               iElts = _documentModel->makeCylinder( icyl, ivec, nr, na, nl );
+       }
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE CYLINDER" ) );
+               return false;
+       }
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+
+//---------------------------------- MakePipeDialog -----------------------------
+
+// ============================================================== Constructeur
+
+MakePipeDialog::MakePipeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_blocks_for_cyl_pipe.html#make-pipe";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( pipe_le );
+}
+
+// ============================================================== Destructeur
+MakePipeDialog::~MakePipeDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakePipeDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       pipe_le->setProperty( "HexaWidgetType", QVariant::fromValue(PIPE_TREE) );
+       vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+
+       pipe_le->setValidator( validator );
+       vec_le->setValidator( validator );
+
+       pipe_le->installEventFilter(this);
+       vec_le->installEventFilter(this);
+
+}
+
+// ============================================================== clear
+void MakePipeDialog::clear()
+{
+       pipe_le->clear();
+       vec_le->clear();
+}
+
+
+// ============================================================== apply
+bool MakePipeDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iElts;
+       QModelIndex ipipe = patternBuilderModel->mapToSource( _index[pipe_le] );
+       QModelIndex ivec  = patternBuilderModel->mapToSource( _index[vec_le] );
+       double nr = nr_spb->value();
+       double na = na_spb->value();
+       double nl = nl_spb->value();
+
+       if ( ipipe.isValid()
+                       && ivec.isValid() ){
+               iElts = _documentModel->makePipe( ipipe, ivec, nr, na, nl );
+       }
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE PIPE" ) );
+               return false;
+       }
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+//---------------------------------- MakeCylindersDialog -----------------------------
+
+// ============================================================== Constructeur
+
+MakeCylindersDialog::MakeCylindersDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_blocks_for_cyl_pipe.html#make-cylinders";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( cyl1_le );
+}
+
+// ============================================================== Destructeur
+MakeCylindersDialog::~MakeCylindersDialog()
+{
+}
+
+void MakeCylindersDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(CROSSELEMENTS_TREE) );
+       installEventFilter(this);
+
+       cyl1_le->setProperty( "HexaWidgetType",  QVariant::fromValue(CYLINDER_TREE) );
+       cyl2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(CYLINDER_TREE) );
+
+       cyl1_le->setValidator( validator );
+       cyl2_le->setValidator( validator );
+
+       cyl1_le->installEventFilter(this);
+       cyl2_le->installEventFilter(this);
+}
+
+// ============================================================== clear
+void MakeCylindersDialog::clear()
+{
+       cyl1_le->clear();
+       cyl2_le->clear();
+}
+
+
+// ============================================================== apply
+bool MakeCylindersDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iCrossElts;
+       QModelIndex icyl1 = patternBuilderModel->mapToSource( _index[cyl1_le] );
+       QModelIndex icyl2 = patternBuilderModel->mapToSource( _index[cyl2_le] );
+
+       if ( icyl1.isValid()
+                       && icyl2.isValid() ){
+               iCrossElts = _documentModel->makeCylinders( icyl1, icyl2 );
+       }
+
+       if ( !iCrossElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE CYLINDERS" ) );
+               return false;
+       }
+
+       // to select/highlight result
+       result = patternBuilderModel->mapFromSource(iCrossElts);
+
+       return true;
+}
+
+
+
+//---------------------------------- MakePipesDialog -----------------------------
+
+// ============================================================== Constructeur
+
+MakePipesDialog::MakePipesDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_blocks_for_cyl_pipe.html#make-pipes";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( pipe1_le );
+}
+
+// ============================================================== Destructeur
+MakePipesDialog::~MakePipesDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakePipesDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       pipe1_le->setProperty( "HexaWidgetType",  QVariant::fromValue(PIPE_TREE) );
+       pipe2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(PIPE_TREE) );
+
+       pipe1_le->setValidator( validator );
+       pipe2_le->setValidator( validator );
+
+       pipe1_le->installEventFilter(this);
+       pipe2_le->installEventFilter(this);
+}
+
+
+// ============================================================== clear
+void MakePipesDialog::clear()
+{
+       pipe1_le->clear();
+       pipe2_le->clear();
+}
+
+
+// ============================================================== apply
+bool MakePipesDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iCrossElts;
+       QModelIndex ipipe1 = patternBuilderModel->mapToSource( _index[pipe1_le] );
+       QModelIndex ipipe2 = patternBuilderModel->mapToSource( _index[pipe2_le] );
+
+       if ( ipipe1.isValid()
+                       && ipipe2.isValid() ){
+               iCrossElts = _documentModel->makePipes( ipipe1, ipipe2 );
+       }
+       if ( !iCrossElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE PIPES" ) );
+               return false;
+       }
+       result = patternBuilderModel->mapFromSource(iCrossElts);
+
+       return true;
+}
+
+
+//---------------------------------- RemoveHexaDialog -----------------------------
+
+// ============================================================== Constructeur
+
+RemoveHexaDialog::RemoveHexaDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_remove.html";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( hexa_le );
+}
+
+
+// ============================================================== Destructeur
+RemoveHexaDialog::~RemoveHexaDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void RemoveHexaDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       hexa_le->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       hexa_le->setValidator( validator );
+       hexa_le->installEventFilter(this);
+}
+
+// ============================================================== clear
+void RemoveHexaDialog::clear()
+{
+       hexa_le->clear();
+}
+
+
+// ============================================================== apply
+bool RemoveHexaDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex ihexa = patternDataModel->mapToSource( _index[hexa_le] );
+
+       bool removed = false;
+       if ( ihexa.isValid() ){
+               if ( connected_cb->isChecked() ){
+                       removed = _documentModel->removeConnectedHexa( ihexa );
+               } else {
+                       removed = _documentModel->removeHexa( ihexa );
+               }
+       }
+
+       if ( removed == false ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT REMOVE HEXA" ) );
+               return false;
+       }
+       return true;
+}
+
+
+//---------------------------------- PrismQuadDialog -----------------------------
+
+// ============================================================== Constructeur
+
+PrismQuadDialog::PrismQuadDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_prism_join_quad.html#prism-quadrangles";
+       setupUi( this );
+       _initWidget(editmode);
+       setFocusProxy( quads_lw );
+}
+
+
+// ============================================================== Destructeur
+PrismQuadDialog::~PrismQuadDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void PrismQuadDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+
+       vec_le->setValidator( validator );
+
+       vec_le->installEventFilter(this);
+       quads_lw->installEventFilter(this);
+
+       if ( editmode != INFO_MODE ){
+               QShortcut* delQuadShortcut   = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+               delQuadShortcut->setContext( Qt::WidgetShortcut );
+               connect( delQuadShortcut, SIGNAL(activated()), this, SLOT(removeQuad()) );
+       }
+
+       connect( quads_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+}
+
+// ============================================================== clear
+void PrismQuadDialog::clear()
+{
+       vec_le->clear();
+       quads_lw->clear();
+}
+
+// ============================================================== removeQuad
+void PrismQuadDialog::removeQuad()
+{
+       QListWidgetItem *item = quads_lw->currentItem();
+
+       if (item) {
+               int r = quads_lw->row(item);
+               quads_lw->takeItem(r);
+               delete item;
+       }
+
+}
+
+// void PrismQuadDialog::clearQuads()
+// {
+//   if (quads_lw->count() != 0)
+//     quads_lw->clear();
+// }
+
+
+// ============================================================== apply
+bool PrismQuadDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       /////
+       QModelIndexList iquads;
+       QModelIndex     iquad;
+       QListWidgetItem* item = NULL;
+       for ( int r = 0; r < quads_lw->count(); ++r){
+               item = quads_lw->item(r);
+               iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               iquads << iquad;
+       }
+       QModelIndex ivec  = patternBuilderModel->mapToSource( _index[vec_le] );
+
+       QModelIndex iElts;
+       if ( ivec.isValid() ){
+               int nb = nb_spb->value();
+               if ( iquads.count() == 1 ){
+                       iElts = _documentModel->prismQuad( iquads[0], ivec, nb );
+               } else if ( iquads.count() > 1 ){
+                       iElts = _documentModel->prismQuads( iquads, ivec, nb );
+               }
+       }
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT PRISM QUAD(S)" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+//---------------------------------- JoinQuadDialog -----------------------------
+
+// ============================================================== Constructeur
+
+JoinQuadDialog::JoinQuadDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_prism_join_quad.html#join-quadrangles";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( quads_lw );
+}
+
+
+// ============================================================== Destructeur
+JoinQuadDialog::~JoinQuadDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void JoinQuadDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       vex0_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vex1_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vex2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vex3_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       quad_dest_le->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+
+       vex0_le->setValidator( validator );
+       vex1_le->setValidator( validator );
+       vex2_le->setValidator( validator );
+       vex3_le->setValidator( validator );
+       quad_dest_le->setValidator( validator );
+
+       vex0_le->installEventFilter(this);
+       vex1_le->installEventFilter(this);
+       vex2_le->installEventFilter(this);
+       vex3_le->installEventFilter(this);
+       quad_dest_le->installEventFilter(this);
+       quads_lw->installEventFilter(this);
+
+       if ( editmode != INFO_MODE ){
+               QShortcut* delQuadShortcut = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+               delQuadShortcut->setContext( Qt::WidgetShortcut );
+               connect( delQuadShortcut,   SIGNAL(activated()), this, SLOT(removeQuad()) );
+       }
+       connect( quads_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+}
+
+
+// ============================================================== clear
+void JoinQuadDialog::clear()
+{
+       quads_lw->clear();
+       vex0_le->clear();
+       vex2_le->clear();
+
+
+       quad_dest_le->clear();
+       vex1_le->clear();
+       vex3_le->clear();
+}
+
+
+// ============================================================== removeQuad
+void JoinQuadDialog::removeQuad()
+{
+       QListWidgetItem *item = quads_lw->currentItem();
+
+       if (item) {
+               int r = quads_lw->row(item);
+               quads_lw->takeItem(r);
+               delete item;
+       }
+
+}
+
+// void JoinQuadDialog::clearQuads()
+// {
+//   if (quads_lw->count() != 0)
+//     quads_lw->clear();
+// }
+
+
+// ============================================================== apply
+bool JoinQuadDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       /////
+       QModelIndexList iquads;
+       QModelIndex     iquad;
+       QListWidgetItem* item = NULL;
+       for ( int r = 0; r < quads_lw->count(); ++r){
+               item = quads_lw->item(r);
+               iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               if ( iquad.isValid() ) iquads << iquad;
+       }
+       QModelIndex iquaddest = patternDataModel->mapToSource( _index[quad_dest_le] );
+       QModelIndex ivex0 = patternDataModel->mapToSource( _index[vex0_le] );
+       QModelIndex ivex1 = patternDataModel->mapToSource( _index[vex1_le] );
+       QModelIndex ivex2 = patternDataModel->mapToSource( _index[vex2_le] );
+       QModelIndex ivex3 = patternDataModel->mapToSource( _index[vex3_le] );
+
+       QModelIndex iElts;
+       if ( iquaddest.isValid()
+                       && ivex0.isValid()
+                       && ivex1.isValid()
+                       && ivex2.isValid()
+                       && ivex3.isValid() ){
+               int nb = nb_spb->value();
+               if ( iquads.count() == 1 ){
+                       iElts = _documentModel->joinQuad( iquads[0], iquaddest,
+                                       ivex0, ivex1, ivex2, ivex3,
+                                       nb );
+               } else if ( iquads.count() > 1 ){
+                       iElts = _documentModel->joinQuads( iquads, iquaddest,
+                                       ivex0, ivex1, ivex2, ivex3,
+                                       nb );
+               }
+       }
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT JOIN QUAD(S)" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+
+// void JoinQuadDialog::reject()
+// {
+//   QDialog::reject();
+//   _disallowSelection();
+// }
+
+
+
+// ------------------------- MergeDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+MergeDialog::MergeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( v0_le_rb0 );
+       rb1->setFocusProxy( e0_le_rb1 );
+       rb2->setFocusProxy( q0_le_rb2 );
+       //   setFocusProxy( rb0 );
+       rb0->click();
+
+       _helpFileName = "gui_merge_elmts.html#merge-2-vertices";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+// ============================================================== Destructeur
+MergeDialog::~MergeDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MergeDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+
+       v0_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v0_le_rb0->setValidator( validator );
+       v1_le_rb0->setValidator( validator );
+       v0_le_rb0->installEventFilter(this);
+       v1_le_rb0->installEventFilter(this);
+
+       v0_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       e0_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       e1_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+
+       v0_le_rb1->setValidator( validator );
+       v1_le_rb1->setValidator( validator );
+       e0_le_rb1->setValidator( validator );
+       e1_le_rb1->setValidator( validator );
+
+       v0_le_rb1->installEventFilter(this);
+       v1_le_rb1->installEventFilter(this);
+       e0_le_rb1->installEventFilter(this);
+       e1_le_rb1->installEventFilter(this);
+
+
+       v0_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v1_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v2_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       v3_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       q0_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       q1_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+
+
+       v0_le_rb2->setValidator( validator );
+       v1_le_rb2->setValidator( validator );
+       v2_le_rb2->setValidator( validator );
+       v3_le_rb2->setValidator( validator );
+       q0_le_rb2->setValidator( validator );
+       q1_le_rb2->setValidator( validator );
+
+       v0_le_rb2->installEventFilter(this);
+       v1_le_rb2->installEventFilter(this);
+       v2_le_rb2->installEventFilter(this);
+       v3_le_rb2->installEventFilter(this);
+       q0_le_rb2->installEventFilter(this);
+       q1_le_rb2->installEventFilter(this);
+}
+
+
+// ============================================================== clear
+void MergeDialog::clear()
+{
+       v0_le_rb0->clear();
+       v1_le_rb0->clear();
+       v0_le_rb1->clear();
+       v1_le_rb1->clear();
+       v0_le_rb2->clear();
+       v1_le_rb2->clear();
+       v2_le_rb2->clear();
+       v3_le_rb2->clear();
+       e0_le_rb1->clear();
+       e1_le_rb1->clear();
+       q0_le_rb2->clear();
+       q1_le_rb2->clear();
+}
+
+// ============================================================== updateHelpFileName
+void MergeDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_merge_elmts.html#merge-2-vertices";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_merge_elmts.html#merge-2-edges";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_merge_elmts.html#merge-2-quadrangles";
+       }
+}
+
+
+// ============================================================== apply
+bool MergeDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       bool merged = false;
+
+       if ( rb0->isChecked() ){
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb0] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb0] );
+
+               if ( iv0.isValid()
+                               && iv1.isValid() ){
+                       merged = _documentModel->mergeVertices( iv0, iv1 );
+               }
+       } else if ( rb1->isChecked() ){
+               QModelIndex ie0 = patternDataModel->mapToSource( _index[e0_le_rb1] );
+               QModelIndex ie1 = patternDataModel->mapToSource( _index[e1_le_rb1] );
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb1] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb1] );
+
+               if ( ie0.isValid()
+                               && ie1.isValid()
+                               && iv0.isValid()
+                               && iv1.isValid() ){
+                       merged =  _documentModel->mergeEdges( ie0, ie1, iv0, iv1);
+               }
+       } else if ( rb2->isChecked() ){
+
+               QModelIndex iq0 = patternDataModel->mapToSource( _index[q0_le_rb2] );
+               QModelIndex iq1 = patternDataModel->mapToSource( _index[q1_le_rb2] );
+               QModelIndex iv0 = patternDataModel->mapToSource( _index[v0_le_rb2] );
+               QModelIndex iv1 = patternDataModel->mapToSource( _index[v1_le_rb2] );
+               QModelIndex iv2 = patternDataModel->mapToSource( _index[v2_le_rb2] );
+               QModelIndex iv3 = patternDataModel->mapToSource( _index[v3_le_rb2] );
+
+               if ( iq0.isValid()
+                               && iq1.isValid()
+                               && iv0.isValid()
+                               && iv1.isValid()
+                               && iv2.isValid()
+                               && iv3.isValid() ){
+                       merged =  _documentModel->mergeQuads( iq0, iq1,
+                                       iv0, iv1, iv2, iv3 );
+               }
+       }
+
+       if ( merged == false ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MERGE" ) );
+               return false;
+       }
+
+       return true;
+}
+
+
+// ------------------------- DisconnectDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+DisconnectDialog::DisconnectDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( v_le_rb0 );
+       rb1->setFocusProxy( e_le_rb1 );
+       rb2->setFocusProxy( q_le_rb2 );
+       rb3->setFocusProxy( d_edges_lw);
+       rb0->click();
+       //   setFocusProxy( rb0 );
+
+       _helpFileName = "gui_disc_elmts.html#disconnect-a-vertex";
+
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb3, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+// ============================================================== Destructeur
+DisconnectDialog::~DisconnectDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void DisconnectDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       //vertex
+       v_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       h_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       v_le_rb0->setValidator( validator );
+       h_le_rb0->setValidator( validator );
+       v_le_rb0->installEventFilter(this);
+       h_le_rb0->installEventFilter(this);
+
+       //edge
+       e_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       h_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       e_le_rb1->setValidator( validator );
+       h_le_rb1->setValidator( validator );
+       e_le_rb1->installEventFilter(this);
+       h_le_rb1->installEventFilter(this);
+
+       //quad
+       q_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       h_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       q_le_rb2->setValidator( validator );
+       h_le_rb2->setValidator( validator );
+       q_le_rb2->installEventFilter(this);
+       h_le_rb2->installEventFilter(this);
+
+       //edges
+       d_edges_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       hexas_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXA_TREE) );
+       d_edges_lw->installEventFilter(this);
+       hexas_lw->installEventFilter(this);
+
+       QShortcut* delEdgeShortcut = new QShortcut(QKeySequence(/*Qt::Key_Delete*/Qt::Key_X/*Qt::Key_Alt*//*Qt::Key_Space*/), d_edges_lw);
+       QShortcut* delHexaShortcut = new QShortcut(QKeySequence(/*Qt::Key_Delete*/Qt::Key_X/*Qt::Key_Alt*//*Qt::Key_Space*/), hexas_lw);
+       delEdgeShortcut->setContext( Qt::WidgetShortcut );
+       delHexaShortcut->setContext( Qt::WidgetShortcut );
+
+       connect( d_edges_lw,   SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+       connect( hexas_lw,   SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+       connect( delEdgeShortcut, SIGNAL(activated()), this, SLOT(deleteEdgeItem()) );
+       connect( delHexaShortcut, SIGNAL(activated()), this, SLOT(deleteHexaItem()) );
+
+}
+
+
+// ============================================================== clear
+void DisconnectDialog::clear()
+{
+       v_le_rb0->clear();
+       e_le_rb1->clear();
+       q_le_rb2->clear();
+       h_le_rb0->clear();
+       h_le_rb1->clear();
+       h_le_rb2->clear();
+       d_edges_lw->clear();
+       hexas_lw->clear();
+}
+
+// ============================================================== deleteEdgeItem
+void DisconnectDialog::deleteEdgeItem()
+{
+       delete d_edges_lw->currentItem();
+}
+
+// ============================================================== deleteHexaItem
+void DisconnectDialog::deleteHexaItem()
+{
+       delete hexas_lw->currentItem();
+}
+
+
+// ============================================================== updateHelpFileName
+void DisconnectDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_disc_elmts.html#disconnect-a-vertex";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_disc_elmts.html#disconnect-an-edge";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_disc_elmts.html#disconnect-a-quadrangle";
+       } else if (sender() == rb3 ){
+               _helpFileName = "gui_disc_elmts.html#disconnect-edges";
+       }
+}
+
+
+// ============================================================== apply
+bool DisconnectDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iElts;
+
+       if ( rb0->isChecked() ){
+               QModelIndex ihexa = patternDataModel->mapToSource( _index[h_le_rb0] );
+               QModelIndex ivex  = patternDataModel->mapToSource( _index[v_le_rb0] );
+
+               if ( ihexa.isValid()
+                               && ivex.isValid() ){
+                       iElts = _documentModel->disconnectVertex( ihexa, ivex );
+               }
+       } else if ( rb1->isChecked() ){
+               QModelIndex ihexa = patternDataModel->mapToSource( _index[h_le_rb1] );
+               QModelIndex iedge = patternDataModel->mapToSource( _index[e_le_rb1] );
+
+               if ( ihexa.isValid()
+                               && iedge.isValid() ){
+                       iElts = _documentModel->disconnectEdge( ihexa, iedge );
+               }
+       } else if ( rb2->isChecked() ){
+               QModelIndex ihexa = patternDataModel->mapToSource( _index[h_le_rb2] );
+               QModelIndex iquad = patternDataModel->mapToSource( _index[q_le_rb2] );
+
+               if ( ihexa.isValid()
+                               && iquad.isValid() ){
+                       iElts = _documentModel->disconnectQuad( ihexa, iquad );
+               }
+       } else if ( rb3->isChecked() ){ //
+
+               QModelIndex iedge, ihexa;
+               QModelIndexList iedges, ihexas;
+               QListWidgetItem* item = NULL;
+
+               //Liste des edges
+               for (int r = 0; r < d_edges_lw->count(); ++r){
+                       item = d_edges_lw->item(r);
+                       iedge = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+                       if ( iedge.isValid() )
+                               iedges << iedge;
+               }
+
+               //Liste des hexas
+               for (int r = 0; r < hexas_lw->count(); ++r){
+                       item = hexas_lw->item(r);
+                       ihexa = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+                       if ( ihexa.isValid() )
+                               ihexas << ihexa;
+               }
+
+               iElts = _documentModel->disconnectEdges( ihexas, iedges );
+       }
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT DISCONNECT" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+
+
+
+// ------------------------- CutEdgeDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+CutEdgeDialog::CutEdgeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_cut_hexa.html";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( e_le );
+}
+
+// ============================================================== Destructeur
+CutEdgeDialog::~CutEdgeDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void CutEdgeDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       e_le->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
+       e_le->setValidator( validator );
+       e_le->installEventFilter(this);
+}
+
+// ============================================================== clear
+void CutEdgeDialog::clear()
+{
+       e_le->clear();
+}
+
+
+// ============================================================== apply
+bool CutEdgeDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       int nbCut = nb_cut_spb->value();
+       QModelIndex iedge = patternDataModel->mapToSource( _index[e_le] );
+
+       QModelIndex iElts;
+       if ( iedge.isValid() ){
+               iElts = _documentModel->cutEdge( iedge, nbCut );
+       }
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT CUT EDGE" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+
+
+
+
+// // ------------------------- MakeTransformationDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+MakeTransformationDialog::MakeTransformationDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( elts_le_rb0 );
+       rb1->setFocusProxy( elts_le_rb1 );
+       rb2->setFocusProxy( elts_le_rb2 );
+       setFocusProxy( rb0 );
+       rb0->click();
+
+       _helpFileName = "gui_make_elmts.html#make-elements-by-translation";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+// ============================================================== Destructeur
+MakeTransformationDialog::~MakeTransformationDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakeTransformationDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       vec_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
+
+       vec_le_rb0->setValidator( validator );
+       elts_le_rb0->setValidator( validator );
+       vec_le_rb0->installEventFilter(this);
+       elts_le_rb0->installEventFilter(this);
+
+       vex_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       elts_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb1->setValidator( validator );
+       elts_le_rb1->setValidator( validator );
+       vex_le_rb1->installEventFilter(this);
+       elts_le_rb1->installEventFilter(this);
+
+       vex_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb2->setValidator( validator );
+       vec_le_rb2->setValidator( validator );
+       elts_le_rb2->setValidator( validator );
+       vex_le_rb2->installEventFilter(this);
+       vec_le_rb2->installEventFilter(this);
+       elts_le_rb2->installEventFilter(this);
+
+}
+
+// ============================================================== clear
+void MakeTransformationDialog::clear()
+{
+       vex_le_rb1->clear();
+       vex_le_rb2->clear();
+       vec_le_rb0->clear();
+       vec_le_rb2->clear();
+       elts_le_rb0->clear();
+       elts_le_rb1->clear();
+       elts_le_rb2->clear();
+}
+
+
+// ============================================================== updateHelpFileName
+void MakeTransformationDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_make_elmts.html#make-elements-by-translation";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_make_elmts.html#make-elements-by-scaling";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_make_elmts.html#make-elements-by-rotation";
+       }
+}
+
+// ============================================================== apply
+bool MakeTransformationDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iNewElts;
+
+       if ( rb0->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb0] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb0] );
+
+               if ( ielts.isValid()
+                               && ivec.isValid() )
+                       iNewElts = _documentModel->makeTranslation( ielts, ivec );
+
+       } else if ( rb1->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb1] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb1] );
+               double          k = k_spb->value();
+
+               if ( ielts.isValid()
+                               && ivex.isValid() )
+                       iNewElts = _documentModel->makeScale( ielts, ivex, k );
+
+       } else if ( rb2->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb2] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb2] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb2] );
+               double      angle = angle_spb->value();
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       iNewElts = _documentModel->makeRotation( ielts, ivex, ivec, angle );
+       }
+
+       if ( !iNewElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE TRANSFORMATION" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iNewElts);
+
+       return true;
+}
+
+
+
+// // ------------------------- MakeSymmetryDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+MakeSymmetryDialog::MakeSymmetryDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( elts_le_rb0 );
+       rb1->setFocusProxy( elts_le_rb1 );
+       rb2->setFocusProxy( elts_le_rb2 );
+       rb0->click();
+       //     setFocusProxy( rb0 );
+
+       _helpFileName = "gui_make_symmetry.html#make-elements-by-point-symmetry";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+
+// ============================================================== Destructeur
+MakeSymmetryDialog::~MakeSymmetryDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakeSymmetryDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       vex_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(VERTEX_TREE) );
+       elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb0->setValidator( validator );
+       elts_le_rb0->setValidator( validator );
+       vex_le_rb0->installEventFilter(this);
+       elts_le_rb0->installEventFilter(this);
+
+       vex_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb1->setValidator( validator );
+       vec_le_rb1->setValidator( validator );
+       elts_le_rb1->setValidator( validator );
+       vex_le_rb1->installEventFilter(this);
+       vec_le_rb1->installEventFilter(this);
+       elts_le_rb1->installEventFilter(this);
+
+
+       vex_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb2->setValidator( validator );
+       vec_le_rb2->setValidator( validator );
+       elts_le_rb2->setValidator( validator );
+       vex_le_rb2->installEventFilter(this);
+       vec_le_rb2->installEventFilter(this);
+       elts_le_rb2->installEventFilter(this);
+
+}
+
+// ============================================================== clear
+void MakeSymmetryDialog::clear()
+{
+       vex_le_rb0->clear();
+       vex_le_rb1->clear();
+       vex_le_rb2->clear();
+
+       vec_le_rb1->clear();
+       vec_le_rb2->clear();
+
+       elts_le_rb0->clear();
+       elts_le_rb1->clear();
+       elts_le_rb2->clear();
+}
+
+
+// ============================================================== updateHelpFileName
+void MakeSymmetryDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_make_symmetry.html#make-elements-by-point-symmetry";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_make_symmetry.html#make-elements-by-line-symmetry";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_make_symmetry.html#make-elements-by-plan-symmetry";
+       }
+}
+
+
+// ============================================================== apply
+bool MakeSymmetryDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex iNewElts;
+
+       if ( rb0->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb0] );
+               QModelIndex  ivex = patternBuilderModel->mapToSource( _index[vex_le_rb0] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid() )
+                       iNewElts = _documentModel->makeSymmetryPoint( ielts, ivex );
+
+       } else if ( rb1->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb1] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb1] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb1] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       iNewElts = _documentModel->makeSymmetryLine( ielts, ivex, ivec );
+
+       } else if ( rb2->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb2] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb2] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb2] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       iNewElts = _documentModel->makeSymmetryPlane( ielts, ivex, ivec );
+       }
+
+       if ( !iNewElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE TRANSFORMATION" ) );
+               return false;
+       }
+
+       result = patternBuilderModel->mapFromSource(iNewElts);
+
+       return true;
+}
+
+
+
+
+
+// // ------------------------- PerformTransformationDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+PerformTransformationDialog::PerformTransformationDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                               HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget(editmode);
+       rb0->setFocusProxy( elts_le_rb0 );
+       rb1->setFocusProxy( elts_le_rb1 );
+       rb2->setFocusProxy( elts_le_rb2 );
+       //   setFocusProxy( rb0 );
+       rb0->click();
+
+       _helpFileName = "gui_modify_elmts.html#modify-elements-by-translation";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+
+// ============================================================== Destructeur
+PerformTransformationDialog::~PerformTransformationDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void PerformTransformationDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       vec_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
+       vec_le_rb0->setValidator( validator );
+       elts_le_rb0->setValidator( validator );
+       vec_le_rb0->installEventFilter(this);
+       elts_le_rb0->installEventFilter(this);
+
+       vex_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       elts_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb1->setValidator( validator );
+       elts_le_rb1->setValidator( validator );
+       vex_le_rb1->installEventFilter(this);
+       elts_le_rb1->installEventFilter(this);
+
+
+       vex_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb2->setValidator( validator );
+       vec_le_rb2->setValidator( validator );
+       elts_le_rb2->setValidator( validator );
+       vex_le_rb2->installEventFilter(this);
+       vec_le_rb2->installEventFilter(this);
+       elts_le_rb2->installEventFilter(this);
+
+}
+
+// ============================================================== clear
+void PerformTransformationDialog::clear()
+{
+       vex_le_rb1->clear(); vex_le_rb2->clear();
+       vec_le_rb0->clear(); vec_le_rb2->clear();
+       elts_le_rb0->clear(); elts_le_rb1->clear(); elts_le_rb2->clear();
+}
+
+// ============================================================== updateHelpFileName
+void PerformTransformationDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_modify_elmts.html#modify-elements-by-translation";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_modify_elmts.html#modify-elements-by-scaling";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_modify_elmts.html#modify-elements-by-rotation";
+       }
+}
+
+
+// ============================================================== apply
+bool PerformTransformationDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       bool performed = false;
+
+       if ( rb0->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb0] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb0] );
+
+               if ( ielts.isValid()
+                               && ivec.isValid() )
+                       performed = _documentModel->performTranslation( ielts, ivec );
+
+       } else if ( rb1->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb1] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb1] );
+               double          k = k_spb->value();
+
+               if ( ielts.isValid()
+                               && ivex.isValid() )
+                       performed = _documentModel->performScale( ielts, ivex, k );
+
+       } else if ( rb2->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb2] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb2] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb2] );
+               double      angle = angle_spb->value();
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       performed = _documentModel->performRotation( ielts, ivex, ivec, angle );
+       }
+
+       if ( performed == false){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT PERFORM TRANSFORMATION" ) );
+               return false;
+       }
+
+
+       return true;
+}
+
+
+
+
+
+// // ------------------------- PerformSymmetryDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+PerformSymmetryDialog::PerformSymmetryDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f)
+{
+       setupUi( this );
+       _initWidget( editmode );
+       rb0->setFocusProxy( elts_le_rb0 );
+       rb1->setFocusProxy( elts_le_rb1 );
+       rb2->setFocusProxy( elts_le_rb2 );
+       //   setFocusProxy( rb0 );
+       rb0->click();
+
+       _helpFileName = "gui_modify_symmetry.html#modify-elements-by-point-symmetry";
+       connect( rb0, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb1, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+       connect( rb2, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+}
+
+// ============================================================== Destructeur
+PerformSymmetryDialog::~PerformSymmetryDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void PerformSymmetryDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       vex_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb0->setValidator( validator );
+       elts_le_rb0->setValidator( validator );
+       vex_le_rb0->installEventFilter(this);
+       elts_le_rb0->installEventFilter(this);
+
+       vex_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb1->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb1->setValidator( validator );
+       vec_le_rb1->setValidator( validator );
+       elts_le_rb1->setValidator( validator );
+       vex_le_rb1->installEventFilter(this);
+       vec_le_rb1->installEventFilter(this);
+       elts_le_rb1->installEventFilter(this);
+
+
+       vex_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       vec_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       elts_le_rb2->setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       vex_le_rb2->setValidator( validator );
+       vec_le_rb2->setValidator( validator );
+       elts_le_rb2->setValidator( validator );
+       vex_le_rb2->installEventFilter(this);
+       vec_le_rb2->installEventFilter(this);
+       elts_le_rb2->installEventFilter(this);
+
+}
+
+// ============================================================== clear
+void PerformSymmetryDialog::clear()
+{
+       vex_le_rb0->clear(); vex_le_rb1->clear(); vex_le_rb2->clear();
+       vec_le_rb1->clear(); vec_le_rb2->clear();
+       elts_le_rb0->clear(); elts_le_rb1->clear(); elts_le_rb2->clear();
+}
+
+// ============================================================== updateHelpFileName
+void PerformSymmetryDialog::updateHelpFileName()
+{
+       if ( sender() == rb0 ){
+               _helpFileName = "gui_modify_symmetry.html#modify-elements-by-point-symmetry";
+       } else if ( sender() == rb1 ){
+               _helpFileName = "gui_modify_symmetry.html#modify-elements-by-line-symmetry";
+       } else if ( sender() == rb2 ){
+               _helpFileName = "gui_modify_symmetry.html#modify-elements-by-plan-symmetry";
+       }
+}
+
+// ============================================================== apply
+bool PerformSymmetryDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel*    patternDataModel    = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       bool performed = false;
+
+       if ( rb0->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb0] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb0] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid() )
+                       performed = _documentModel->performSymmetryPoint( ielts, ivex );
+
+       } else if ( rb1->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb1] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb1] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb1] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       performed = _documentModel->performSymmetryLine( ielts, ivex, ivec );
+
+       } else if ( rb2->isChecked() ){
+               QModelIndex ielts = patternBuilderModel->mapToSource( _index[elts_le_rb2] );
+               QModelIndex  ivex = patternDataModel->mapToSource( _index[vex_le_rb2] );
+               QModelIndex  ivec = patternBuilderModel->mapToSource( _index[vec_le_rb2] );
+
+               if ( ielts.isValid()
+                               && ivex.isValid()
+                               && ivec.isValid() )
+                       performed = _documentModel->performSymmetryPlane( ielts, ivex, ivec );
+       }
+
+       if ( performed == false ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT PERFORM SYMMETRY" ) );
+               return false;
+       }
+
+       return true;
+}
+
+
+
+// // ------------------------- EdgeAssocDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+EdgeAssocDialog::EdgeAssocDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                                               HexaBaseDialog( parent, editmode, f )
+{
+       _helpFileName ="gui_asso_quad_to_geom.html#associate-to-edges-or-wires-of-the-geometry";
+       setupUi( this );
+       _initWidget(editmode);
+       _initViewManager();
+       setFocusProxy( edges_lw );
+
+       myLine.nullify();
+
+       _currentParameter = 0.;
+       single_rb->click();
+}
+
+// ============================================================== Destructeur
+EdgeAssocDialog::~EdgeAssocDialog()
+{
+       //   disconnect( delEdgeShortcut, SIGNAL(activated()), this, SLOT(deleteEdgeItem()) );
+       //   disconnect( delLineShortcut, SIGNAL(activated()), this, SLOT(deleteLineItem()) );
+       disconnect( HEXABLOCKGUI::selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(addLine()) );
+       disconnect( pstart_spb, SIGNAL(valueChanged(double)), this, SLOT( pstartChanged(double)) );
+       disconnect( pend_spb,   SIGNAL(valueChanged(double)), this, SLOT( pendChanged(double)) );
+}
+
+
+// ============================================================== _initInputWidget
+void EdgeAssocDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       //model
+       first_vex_le->setProperty( "HexaWidgetType", QVariant::fromValue(VERTEX_TREE) );
+       first_vex_le->installEventFilter(this);
+       first_vex_le->setValidator( validator );
+
+       single_edge_le->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+       single_edge_le->installEventFilter(this);
+
+       edges_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+       edges_lw->installEventFilter(this);
+
+
+       //geom
+       lines_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+       lines_lw->installEventFilter(this);
+
+       single_line_le->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+       single_line_le->installEventFilter(this);
+
+
+       QShortcut* delEdgeShortcut = new QShortcut(QKeySequence(/*Qt::Key_Delete*/Qt::Key_X), edges_lw);
+       QShortcut* delLineShortcut = new QShortcut(QKeySequence(Qt::Key_X), lines_lw);
+       delLineShortcut->setContext( Qt::WidgetWithChildrenShortcut );
+       delEdgeShortcut->setContext( Qt::WidgetWithChildrenShortcut );
+
+       pend_spb->setValue(1.);
+
+       connect( delEdgeShortcut, SIGNAL(activated()), this, SLOT(deleteEdgeItem()) );
+       connect( delLineShortcut, SIGNAL(activated()), this, SLOT(deleteLineItem()) );
+       connect( pstart_spb, SIGNAL(valueChanged(double)), this, SLOT( pstartChanged(double)) );
+       connect( pend_spb,   SIGNAL(valueChanged(double)), this, SLOT( pendChanged(double)) );
+       connect( edges_lw,   SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+
+}
+
+// ============================================================== clear
+void EdgeAssocDialog::clear()
+{
+       first_vex_le->clear();
+       edges_lw->clear();
+       lines_lw->clear();
+       single_edge_le->setText("");
+       single_line_le->setText("");
+}
+
+// ============================================================== deleteEdgeItem
+void EdgeAssocDialog::deleteEdgeItem()
+{
+       delete edges_lw->currentItem();
+}
+
+// ============================================================== deleteLineItem
+void EdgeAssocDialog::deleteLineItem()
+{
+       delete lines_lw->currentItem();
+}
+
+
+// ============================================================== setGeomEngine
+void EdgeAssocDialog::setGeomEngine( GEOM::GEOM_Gen_var geomEngine )
+{
+       _geomEngine = geomEngine;
+}
+
+// ============================================================== onWindowActivated
+void EdgeAssocDialog::onWindowActivated(SUIT_ViewManager* vm)
+{
+       SUIT_ViewWindow* v = vm->getActiveView();
+       QString vmType = vm->getType();
+       if ( (vmType == SVTK_Viewer::Type()) || (vmType == VTKViewer_Viewer::Type()) ){
+               edges_lw->setFocus();
+       } else if ( vmType == OCCViewer_Viewer::Type() ){
+               lines_lw->setFocus();
+       }
+}
+
+// ============================================================== createOperation
+GEOM::GEOM_IOperations_ptr EdgeAssocDialog::createOperation()
+{
+       return _geomEngine->GetIBasicOperations(getStudyId());
+}
+
+// ============================================================== execute
+bool EdgeAssocDialog::execute(ObjectList& objects)
+{
+       MESSAGE("execute(){");
+       MESSAGE("*    objects.size()" << objects.size() );
+
+       bool res = false;
+
+       GEOM::GEOM_Object_var anObj;
+       QStringList aParameters;
+
+       GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
+       anObj = anOper->MakePointOnCurve( _currentLine.get(), _currentParameter );
+       if ( !anObj->_is_nil() ) {
+               objects.push_back(anObj._retn());
+               res = true;
+       }
+       MESSAGE("}execute()");
+       return res;
+}
+
+// ============================================================== pstartChanged
+void EdgeAssocDialog::pstartChanged( double val )
+{
+       MESSAGE("pstartChanged("<<val<<") { ");
+       QListWidgetItem* lineItem = lines_lw->item( 0 );
+       if (!lineItem) return;
+       //   MESSAGE("data : "<<lineItem->text().toStdString());
+       _currentLine = lineItem->data(LW_GEOM_OBJ_ROLE).value<GEOM::GeomObjPtr>();
+       _currentParameter = pstart_spb->value();
+       displayPreview(true);
+       MESSAGE("}pstartChanged()");
+}
+
+// ============================================================== pendChanged
+void EdgeAssocDialog::pendChanged( double val )
+{
+       MESSAGE("pendChanged("<<val<<") { ");
+       //   if ( _lastLine->_is_nil() ) return;
+       QListWidgetItem* lineItem = lines_lw->item( lines_lw->count()-1 );
+       if (!lineItem) return;
+       //   MESSAGE("data : "<<lineItem->text().toStdString());
+       _currentLine      = lineItem->data(LW_GEOM_OBJ_ROLE).value<GEOM::GeomObjPtr>();
+       _currentParameter = pend_spb->value();
+       displayPreview(true);
+       MESSAGE("}pendChanged()");
+}
+
+// ============================================================== onCurrentSelectionChanged
+void EdgeAssocDialog::onCurrentSelectionChanged()
+{
+       if ( !isVisible() ) return;
+
+       SUIT_ViewWindow* window = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+
+       bool isOCC = (window && window->getViewManager()->getType() == OCCViewer_Viewer::Type());
+       //   bool isVTK = (window && window->getViewManager()->getType() == SVTK_Viewer::Type());
+
+       if (!isOCC) return;
+
+
+       GEOM::GeomObjPtr aSelectedObject = getSelected(TopAbs_EDGE);
+       TopoDS_Shape aShape;
+
+       if ( !(aSelectedObject && GEOMBase::GetShape(aSelectedObject.get(), aShape) && !aShape.IsNull()) )
+               return;
+
+       if (single_rb->isChecked()) {
+               QString aName = GEOMBase::GetName(aSelectedObject.get());
+               single_line_le->setText(aName);
+               myLine = aSelectedObject;
+       }
+       else if( multiple_rb->isChecked() ) {
+
+               DocumentModel::GeomObj aLine;
+               QListWidgetItem* item = NULL;
+               QString mainShapeEntry;
+               int     subId = -1;
+               QString brep;
+
+               if ( aSelectedObject->IsMainShape() ){
+                       mainShapeEntry = aSelectedObject->GetStudyEntry();
+                       brep =  shape2string( aShape ).c_str();
+               } else {
+                       TopoDS_Shape shape;
+                       TopoDS_Shape subshape;
+                       GEOM::GEOM_Object_var mainShape = aSelectedObject->GetMainShape();
+                       mainShapeEntry = mainShape->GetStudyEntry();
+                       // CS_TODO : à optimiser
+                       bool okShape = GEOMBase::GetShape( mainShape , shape);//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                       bool oksubShape = GEOMBase::GetShape( aSelectedObject.get(), subshape );//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                       if ( okShape && oksubShape ){
+                               brep =  shape2string( subshape ).c_str();
+                               subId = GEOMBase::GetIndex( subshape, shape );
+                       }
+               }
+               aLine.name  = GEOMBase::GetName( aSelectedObject.get() );
+               aLine.entry = mainShapeEntry;
+               aLine.subid = QString::number(subId);
+               aLine.brep  = brep;
+               aLine.start = 0.;
+               aLine.end   = 1.;
+
+               item  = new QListWidgetItem( aLine.name );
+               item->setData(  LW_ASSOC_ROLE, QVariant::fromValue<DocumentModel::GeomObj>(aLine) );
+               item->setData(  LW_GEOM_OBJ_ROLE, QVariant::fromValue<GEOM::GeomObjPtr>(aSelectedObject) );
+               lines_lw->addItem(item);
+       }
+}
+
+
+// ============================================================== apply
+bool EdgeAssocDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       bool assocOk = false;
+
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel ) return false;
+       _currentObj = NULL;
+
+       QListWidgetItem* item = NULL;
+
+       QModelIndex     iEdge;
+       QModelIndexList iEdges;
+       QList<DocumentModel::GeomObj> assocs;
+       DocumentModel::GeomObj aLine;
+
+       if (single_rb->isChecked()){ //Single edge and/or line association
+
+               QString mainShapeEntry;
+               int     subId = -1;
+               QString brep;
+               GEOM::GeomObjPtr aSelectedObject = myLine;
+               TopoDS_Shape aShape;
+
+               if ( aSelectedObject && GEOMBase::GetShape(aSelectedObject.get(), aShape) && !aShape.IsNull() ){
+                       if ( aSelectedObject->IsMainShape() ){
+                               mainShapeEntry = aSelectedObject->GetStudyEntry();
+                               brep =  shape2string( aShape ).c_str();
+                       }
+                       else {
+                               TopoDS_Shape shape;
+                               TopoDS_Shape subshape;
+                               GEOM::GEOM_Object_var mainShape = aSelectedObject->GetMainShape();
+                               mainShapeEntry = mainShape->GetStudyEntry();
+                               // CS_TODO : à optimiser
+                               bool okShape = GEOMBase::GetShape( mainShape , shape);//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                               bool oksubShape = GEOMBase::GetShape( aSelectedObject.get(), subshape );//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                               if ( okShape && oksubShape ){
+                                       brep =  shape2string( subshape ).c_str();
+                                       subId = GEOMBase::GetIndex( subshape, shape );
+                               }
+                       }
+                       aLine.name  = GEOMBase::GetName( aSelectedObject.get() );
+                       aLine.entry = mainShapeEntry;
+                       aLine.subid = QString::number(subId);
+                       aLine.brep  = brep;
+                       aLine.start = pstart_spb->value();
+                       aLine.end   = pend_spb->value();
+                       iEdge = patternDataModel->mapToSource( _index[single_edge_le] );
+                       if (!iEdge.isValid()) return false;
+                       _documentModel->addAssociation(iEdge, aLine);
+                       assocOk = true;
+               }
+       }
+       else { //Multiple edge and/or line association
+
+               // edges
+               for ( int r = 0; r < edges_lw->count(); ++r){
+                       item = edges_lw->item(r);
+                       iEdge = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+                       if ( iEdge.isValid() )
+                               iEdges << iEdge;
+               }
+
+               // lines
+               for ( int r = 0; r < lines_lw->count(); ++r){
+                       item = lines_lw->item(r);
+                       aLine = item->data(LW_ASSOC_ROLE).value<DocumentModel::GeomObj>();
+                       //std::cout << " line added : " << aLine.name.toStdString() << std::endl;
+                       MESSAGE(" assocs => " << aLine.name.toStdString() );
+                       MESSAGE(" assocs => " << aLine.brep.toStdString() );
+                       assocs << aLine;
+               }
+
+               if ( close_cb->isChecked() ){ //closed line
+                       QModelIndex iFirstVertex = patternDataModel->mapToSource( _index[first_vex_le] );
+                       // if (inverse_cb->isChecked())
+                       //      assocOk = _documentModel->associateClosedLine( iFirstVertex, iEdges, assocs, pstart_spb->value(), true );
+                       // else
+                       assocOk = _documentModel->associateClosedLine( iFirstVertex, iEdges, assocs, pstart_spb->value() );
+               } else {
+                       //opened line
+                       assocOk = _documentModel->associateOpenedLine( iEdges, assocs, pstart_spb->value(), pend_spb->value() );
+               }
+       }
+
+       if ( !assocOk ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE EDGE ASSOCIATION" ) );
+               return false;
+       }
+
+       return true;
+}
+
+
+
+// // ------------------------- QuadAssocDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+QuadAssocDialog::QuadAssocDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_asso_quad_to_geom.html#associate-to-a-face-or-a-shell-of-the-geometry";
+       setupUi( this );
+       _initWidget(editmode);
+       _initViewManager();
+       setFocusProxy( quad_le );
+}
+
+// ============================================================== Destructeur
+QuadAssocDialog::~QuadAssocDialog()
+{
+       disconnect( _delFaceShortcut, SIGNAL(activated()), this, SLOT(deleteFaceItem()) );
+       disconnect( HEXABLOCKGUI::selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(addFace()) );
+       delete _delFaceShortcut;
+}
+
+// ============================================================== _initInputWidget
+void QuadAssocDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       quad_le->setProperty( "HexaWidgetType", QVariant::fromValue(QUAD_TREE) );
+       quad_le->installEventFilter(this);
+       quad_le->setValidator( validator );
+
+
+       faces_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_FACE) );
+       faces_lw->installEventFilter(this);
+       _delFaceShortcut = new QShortcut( QKeySequence(Qt::Key_X/*Qt::Key_Delete*/), faces_lw );
+       _delFaceShortcut->setContext( Qt::WidgetShortcut );
+
+       connect( _delFaceShortcut, SIGNAL(activated()), this, SLOT(deleteFaceItem()) );
+}
+
+// ============================================================== clear
+void QuadAssocDialog::clear()
+{
+       quad_le->clear();
+       faces_lw->clear();
+}
+
+// ============================================================== onCurrentSelectionChanged
+void QuadAssocDialog::onCurrentSelectionChanged()
+{
+
+       if ( !isVisible() ) return;
+
+       SUIT_ViewWindow* window = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+
+       bool isOCC = (window && window->getViewManager()->getType() == OCCViewer_Viewer::Type());
+       //   bool isVTK = (window && window->getViewManager()->getType() == SVTK_Viewer::Type());
+
+       if (!isOCC) return;
+
+       GEOM::GeomObjPtr aSelectedObject = getSelected(TopAbs_FACE);
+       TopoDS_Shape aShape;
+
+       if ( aSelectedObject && GEOMBase::GetShape(aSelectedObject.get(), aShape) && !aShape.IsNull() ){
+               DocumentModel::GeomObj aFace;
+               QListWidgetItem* item = NULL;
+               QString mainShapeEntry;
+               int     subId = -1;
+               QString brep;
+
+               if ( aSelectedObject->IsMainShape() ){
+                       mainShapeEntry = aSelectedObject->GetStudyEntry();
+                       brep =  shape2string( aShape ).c_str();
+               } else {
+                       TopoDS_Shape shape;
+                       TopoDS_Shape subshape;
+                       GEOM::GEOM_Object_var mainShape = aSelectedObject->GetMainShape();
+                       mainShapeEntry = mainShape->GetStudyEntry();
+                       // CS_TODO : à optimiser
+                       bool okShape = GEOMBase::GetShape( mainShape , shape);//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                       bool oksubShape = GEOMBase::GetShape( aSelectedObject.get(), subshape );//,const TopAbs_ShapeEnum type = TopAbs_SHAPE );
+                       if ( okShape && oksubShape ){
+                               brep =  shape2string( subshape ).c_str();
+                               subId = GEOMBase::GetIndex( subshape, shape );
+                       }
+               }
+               aFace.name  = GEOMBase::GetName( aSelectedObject.get() );
+               aFace.entry = mainShapeEntry;
+               aFace.subid = QString::number(subId);
+               aFace.brep  = brep;
+               aFace.start = 0.;
+               aFace.end   = 1.;
+
+               item  = new QListWidgetItem( aFace.name );
+               item->setData(  LW_ASSOC_ROLE, QVariant::fromValue<DocumentModel::GeomObj>(aFace) );
+               faces_lw->addItem(item);
+               //     faces_lw->setCurrentRow( faces_lw->count() - 1 );
+       }
+
+}
+
+// ============================================================== onWindowActivated
+void QuadAssocDialog::onWindowActivated(SUIT_ViewManager* vm)
+{
+       SUIT_ViewWindow* v = vm->getActiveView();
+       QString     vmType = vm->getType();
+       if ( (vmType == SVTK_Viewer::Type()) || (vmType == VTKViewer_Viewer::Type()) ){
+               quad_le->setFocus();
+       } else if ( vmType == OCCViewer_Viewer::Type() ){
+               faces_lw->setFocus();
+       }
+}
+
+// ============================================================== deleteFaceItem
+void QuadAssocDialog::deleteFaceItem()
+{
+       delete faces_lw->currentItem();
+}
+
+
+// ============================================================== apply
+bool QuadAssocDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       //if ( !_documentModel ) return;
+       if ( !_patternDataSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternDataModel )           return false;
+       _currentObj = NULL;
+
+       // quad
+       QModelIndex iQuad = patternDataModel->mapToSource( _index[quad_le] );
+
+       // faces
+       QListWidgetItem* item = NULL;
+       DocumentModel::GeomObj aFace;
+       for ( int r = 0; r < faces_lw->count(); ++r ){
+               item = faces_lw->item(r);
+               aFace = item->data(LW_ASSOC_ROLE).value<DocumentModel::GeomObj>();
+               _documentModel->addAssociation( iQuad, aFace );
+       }
+
+       result = patternDataModel->mapFromSource(iQuad);
+
+       return true;
+}
+
+
+
+// ------------------------- GroupDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+GroupDialog::GroupDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f),
+                                                               _value(NULL)
+{
+       _helpFileName = "gui_groups.html#add-group";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( name_le/*eltBase_lw */);
+
+       if ( editmode  == NEW_MODE ){
+               setWindowTitle( tr("Group Construction") );
+       } else if ( editmode == UPDATE_MODE ){
+               setWindowTitle( tr("Group Modification") );
+       } else if ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Group Information") );
+       }
+}
+
+// ============================================================== Destructeur
+GroupDialog::~GroupDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void GroupDialog::_initInputWidget( Mode editmode )
+{
+       setProperty( "HexaWidgetType",  QVariant::fromValue(GROUP_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(GROUP_TREE) );
+       name_le->installEventFilter(this);
+
+       // kind checkbox
+       strKind[ HEXA_NS::HexaCell ] = "HexaCell";
+       strKind[ HEXA_NS::QuadCell ] = "QuadCell";
+       strKind[ HEXA_NS::EdgeCell ] = "EdgeCell";
+       strKind[ HEXA_NS::HexaNode ] = "HexaNode";
+       strKind[ HEXA_NS::QuadNode ] = "QuadNode";
+       strKind[ HEXA_NS::EdgeNode ] = "EdgeNode";
+       strKind[ HEXA_NS::VertexNode ] = "VertexNode";
+       kind_cb->clear();
+       QMap<HEXA_NS::EnumGroup, QString>::ConstIterator iKind;
+       for( iKind = strKind.constBegin(); iKind != strKind.constEnd(); ++iKind )
+               kind_cb->addItem( iKind.value(), QVariant(iKind.key()) );
+
+       onKindChanged( kind_cb->currentIndex() );
+       eltBase_lw->installEventFilter(this);
+
+       if ( editmode != INFO_MODE ){
+               QShortcut* delEltShortcut = new QShortcut( QKeySequence(Qt::Key_X), eltBase_lw );
+               delEltShortcut->setContext( Qt::WidgetShortcut );
+               connect(delEltShortcut,   SIGNAL(activated()), this, SLOT(removeEltBase()));
+               connect(kind_cb,  SIGNAL(activated(int)), this, SLOT(onKindChanged(int)) );
+       }
+
+       connect(eltBase_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()));
+}
+
+// ============================================================== clear
+void GroupDialog::clear()
+{
+       name_le->clear();
+       eltBase_lw->clear();
+}
+
+// ============================================================== onKindChanged
+void GroupDialog::onKindChanged(int index)
+{
+       //   onKind
+       MESSAGE("GroupDialog::onKindChanged(" << index << ") ");
+       switch ( kind_cb->itemData(index).toInt() ){
+       case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: eltBase_lw->setProperty("HexaWidgetType", QVariant::fromValue(HEXA_TREE)); MESSAGE("====>HEXA_TREE"); break;
+       case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: eltBase_lw->setProperty("HexaWidgetType", QVariant::fromValue(QUAD_TREE)); MESSAGE("====>QUAD_TREE"); break;
+       case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: eltBase_lw->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE)); MESSAGE("====>EDGE_TREE"); break;
+       case HEXA_NS::VertexNode: eltBase_lw->setProperty("HexaWidgetType", QVariant::fromValue(VERTEX_TREE)); MESSAGE("====>VERTEX_TREE"); break;
+       default:Q_ASSERT( false );
+       }
+       eltBase_lw->clear();
+       eltBase_lw->setFocus();
+}
+
+// ============================================================== setValue
+void GroupDialog::setValue(HEXA_NS::Group* g)
+{
+       //0) name
+       name_le->setText( g->getName() );
+
+       //1) kind
+       kind_cb->clear();
+       kind_cb->addItem ( strKind[g->getKind()], QVariant( g->getKind() ) );
+       //   onKindChanged( kind_cb->currentIndex() );
+
+       //2) elts
+       HEXA_NS::EltBase* eltBase = NULL;
+       QListWidgetItem* item = NULL;
+       QModelIndex iEltBase;
+       QList<QStandardItem *> eltBaseItems;
+       QVariant v;
+
+       if ( !_patternDataSelectionModel ) return;
+       if ( !_groupsSelectionModel ) return;
+
+       QModelIndex iGroup = _groupsSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(g) );
+       name_le->setProperty( "QModelIndex",  QVariant::fromValue(iGroup) );
+
+
+       for ( int nr = 0; nr < g->countElement(); ++nr ){
+               eltBase = g->getElement( nr );
+               switch ( g->getKind() ){
+               case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: v = QVariant::fromValue( (HEXA_NS::Hexa *)eltBase ); break;
+               case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: v = QVariant::fromValue( (HEXA_NS::Quad *)eltBase ); break;
+               case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: v = QVariant::fromValue( (HEXA_NS::Edge *)eltBase ); break;
+               case HEXA_NS::VertexNode:                       v = QVariant::fromValue( (HEXA_NS::Vertex *)eltBase ); break;
+               }
+               iEltBase  = _patternDataSelectionModel->indexBy( HEXA_DATA_ROLE, v);
+               if ( iEltBase.isValid() ){
+                       item = new QListWidgetItem( eltBase->getName() );
+                       item->setData(  LW_QMODELINDEX_ROLE, QVariant::fromValue<QModelIndex>(iEltBase) );
+                       eltBase_lw->addItem( item );
+               }
+       }
+
+       _value = g;
+}
+
+// ============================================================== getValue
+HEXA_NS::Group* GroupDialog::getValue()
+{
+       return _value;
+}
+
+
+// ============================================================== removeEltBase
+void GroupDialog::removeEltBase()
+{
+       QListWidgetItem *item = eltBase_lw->currentItem();
+
+       if (item) {
+               int r = eltBase_lw->row(item);
+               eltBase_lw->takeItem(r);
+               delete item;
+       }
+
+}
+
+// ============================================================== apply
+bool GroupDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel ) return false;
+       if ( !_groupsSelectionModel )      return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const GroupsModel*      groupsModel = dynamic_cast<const GroupsModel*>( _groupsSelectionModel->model() );
+       _currentObj = NULL;
+
+       QString               grpName = name_le->text();
+       DocumentModel::Group  grpKind = static_cast<DocumentModel::Group>( kind_cb->itemData( kind_cb->currentIndex() ).toInt());
+       QModelIndex iGrp;
+       if ( _value == NULL ){ // create group
+               iGrp = _documentModel->addGroup( grpName, grpKind );
+       } else {
+               QModelIndexList iGrps = _documentModel->match(
+                               _documentModel->index(0, 0),
+                               HEXA_DATA_ROLE,
+                               QVariant::fromValue( _value ),
+                               1,
+                               Qt::MatchRecursive );
+               if ( !iGrps.isEmpty() )
+                       iGrp = iGrps[0];
+       }
+
+       //   kind_cb->
+       if ( !iGrp.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT ADD GROUP" ) );
+               return false;
+       }
+
+       //fill it and select it
+       QModelIndex iEltBase;
+       QListWidgetItem* item = NULL;
+       bool eltAdded = false;
+       _documentModel->clearGroupElement(iGrp);
+       for ( int r = 0; r < eltBase_lw->count(); ++r){
+               item     = eltBase_lw->item(r);
+               iEltBase = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               if ( iEltBase.isValid() )
+                       eltAdded = _documentModel->addGroupElement( iGrp, iEltBase );
+               //    if ( eltAdded == false ){
+               //      //SUIT_MessageBox::information( this, tr( "HEXA_INFO" ), tr( "ELEMENT NOT ADDED : %1" ).arg( iEltBase.data().toString() ));
+               //    }
+       }
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iGrp, newName );
+
+       result = groupsModel->mapFromSource(iGrp);
+
+       return true;
+}
+
+
+
+// ------------------------- LawDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+LawDialog::LawDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f),
+  _value(NULL)
+{
+       _helpFileName = "gui_discret_law.html#add-law";
+       setupUi( this );
+       _initWidget(editmode);
+       if ( editmode  == NEW_MODE ){
+               setWindowTitle( tr("Law Construction") );
+       } else if ( editmode == UPDATE_MODE ){
+               setWindowTitle( tr("Law Modification") );
+       }
+}
+
+// ============================================================== Destructeur
+LawDialog::~LawDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void LawDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(LAW_TREE) );
+       installEventFilter(this);
+
+       name_le->setProperty( "HexaWidgetType",  QVariant::fromValue(LAW_TREE) );
+       name_le->installEventFilter(this);
+
+       // kind checkbox
+       strKind[ HEXA_NS::Uniform ]    = "Uniform";
+       strKind[ HEXA_NS::Arithmetic ] = "Arithmetic";
+       strKind[ HEXA_NS::Geometric ]  = "Geometric";
+
+       kind_cb->clear();
+       QMap<HEXA_NS::KindLaw, QString>::ConstIterator iKind;
+       for( iKind = strKind.constBegin(); iKind != strKind.constEnd(); ++iKind )
+               kind_cb->addItem( iKind.value(), QVariant(iKind.key()) );
+
+}
+
+// ============================================================== clear
+void LawDialog::clear()
+{
+       name_le->clear();
+}
+
+// ============================================================== setValue
+void LawDialog::setValue(HEXA_NS::Law* l)
+{
+       // 0) name
+       name_le->setText( l->getName() );
+
+       nb_nodes_spb->setValue( l->getNodes() );
+       coeff_spb->setValue( l->getCoefficient() );
+
+       HEXA_NS::KindLaw k = l->getKind();
+       kind_cb->setCurrentIndex( kind_cb->findData(k) );
+
+       _value = l;
+}
+
+// ============================================================== getValue
+HEXA_NS::Law* LawDialog::getValue()
+{
+       return _value;
+}
+
+
+
+// ============================================================== apply
+bool LawDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_meshSelectionModel ) return false;
+
+       _currentObj = NULL;
+       const MeshModel* meshModel = dynamic_cast<const MeshModel*>( _meshSelectionModel->model() );
+
+       QString lawName = name_le->text();
+       int     nbnodes = nb_nodes_spb->value();
+       double  coeff   = coeff_spb->value();
+       DocumentModel::KindLaw  lawKind = static_cast<DocumentModel::KindLaw>( kind_cb->itemData( kind_cb->currentIndex() ).toInt());
+
+
+       QModelIndex iLaw;
+       if ( _value == NULL ){ // create Law
+               iLaw = _documentModel->addLaw( lawName, nbnodes );
+       } else {
+               QModelIndexList iLaws = _documentModel->match(
+                               _documentModel->index(0, 0),
+                               HEXA_DATA_ROLE,
+                               QVariant::fromValue( _value ),
+                               1,
+                               Qt::MatchRecursive );
+               if ( !iLaws.isEmpty() )
+                       iLaw = iLaws[0];
+       }
+
+       if ( !iLaw.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT ADD LAW" ) );
+               return false;
+       }
+       //fill it and select it
+       bool setOk = _documentModel->setLaw( iLaw, nbnodes, coeff, lawKind );
+       if ( !setOk ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT ADD LAW" ) );
+               return false;
+       }
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iLaw, newName );
+
+       result = meshModel->mapFromSource(iLaw);
+
+       return true;
+}
+
+
+
+
+// ------------------------- PropagationDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+PropagationDialog::PropagationDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f )
+: HexaBaseDialog(parent, editmode, f),
+  _value(NULL)
+{
+       _helpFileName = "gui_propag.html";
+       setupUi( this );
+       _initWidget(editmode);
+       //   setFocusProxy( law_le );
+       setFocusProxy( propagations_lw );
+
+       if ( editmode == INFO_MODE ){
+               setWindowTitle( tr("Propagation Information") );
+               if (groupBox_2)
+                       delete groupBox_2;
+       } else if ( editmode == UPDATE_MODE ){
+               setWindowTitle( tr("Propagation Modification") );
+               if (groupBox_2)
+                       delete groupBox_2;
+       } else if ( editmode == NEW_MODE ){
+               setWindowTitle( tr("Propagation(s) Setting") );
+       }
+}
+
+
+// ============================================================== Destructeur
+PropagationDialog::~PropagationDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void PropagationDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(PROPAGATION_TREE) );
+       installEventFilter(this);
+
+
+       law_le->setProperty( "HexaWidgetType",  QVariant::fromValue(LAW_TREE) );
+       law_le->installEventFilter(this);
+       law_le->setValidator( validator );
+
+       propagations_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(PROPAGATION_TREE) );
+       propagations_lw->installEventFilter(this);
+
+       QShortcut* delPropagationShortcut = new QShortcut(QKeySequence(/*Qt::Key_Delete*/Qt::Key_X/*Qt::Key_Alt*//*Qt::Key_Space*/), propagations_lw);
+       delPropagationShortcut->setContext( Qt::WidgetShortcut );
+
+       connect( delPropagationShortcut, SIGNAL(activated()), this, SLOT(deletePropagationItem()) );
+       connect( propagations_lw,   SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()) );
+}
+
+
+// ============================================================== clear
+void PropagationDialog::clear()
+{
+       propagations_lw->clear();
+       law_le->clear();
+}
+
+// ============================================================== deletePropagationItem
+void PropagationDialog::deletePropagationItem()
+{
+       delete propagations_lw->currentItem();
+}
+
+
+// ============================================================== setValue
+void PropagationDialog::setValue(HEXA_NS::Propagation* p)
+{
+       HEXA_NS::Law* l = p->getLaw();
+       bool way = p->getWay();
+
+       // propagation
+       QModelIndex ip = _meshSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(p) );
+       setProperty( "QModelIndex",  QVariant::fromValue<QModelIndex>(ip) );
+
+
+       // law on propagation
+       if ( l != NULL ){
+               law_le->setText( l->getName() );
+               QModelIndex il = _meshSelectionModel->indexBy( HEXA_DATA_ROLE, QVariant::fromValue(l) );
+               law_le->setProperty( "QModelIndex",  QVariant::fromValue<QModelIndex>(il) );
+       }
+
+       // way of propagation
+       way_cb->setChecked(way);
+
+       _value = p;
+}
+
+// ============================================================== getValue
+HEXA_NS::Propagation* PropagationDialog::getValue()
+{
+       return _value;
+}
+
+
+// ============================================================== apply
+bool PropagationDialog::apply(QModelIndex& result)
+{
+       bool isOk = false;
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_meshSelectionModel ) return false;
+       _currentObj = NULL;
+
+       const MeshModel* meshModel = dynamic_cast<const MeshModel*>( _meshSelectionModel->model() );
+       bool way = way_cb->isChecked();
+       QListWidgetItem* item = NULL;
+
+       QModelIndex iPropagation;
+       QModelIndex iLaw = meshModel->mapToSource( law_le->property("QModelIndex").value<QModelIndex>() );
+       if (!iLaw.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT SET PROPAGATION" ) );
+               return false;
+       }
+       MESSAGE("iLaw.isValid()         => " << iLaw.isValid() );
+
+       for (int r = 0; r < propagations_lw->count(); ++r){
+               item = propagations_lw->item(r);
+               iPropagation = meshModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               if ( !iPropagation.isValid() ){
+                       SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT SET PROPAGATION" ) );
+                       return false;
+               }
+               MESSAGE("iPropagation.isValid() => " << iPropagation.isValid() );
+
+               //fill it and select it
+               isOk = _documentModel->setPropagation( iPropagation, iLaw, way );
+               if ( !isOk ){
+                       SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT SET PROPAGATION" ) );
+                       return false;
+               }
+
+               result = meshModel->mapFromSource(iPropagation);
+       }
+
+       return true;
+}
+
+
+// ------------------------- ComputeMeshDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+ComputeMeshDialog::ComputeMeshDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_mesh.html";
+       setWindowTitle( tr("Compute mesh") );
+       QVBoxLayout* layout = new QVBoxLayout;
+       setLayout(layout);
+
+       QHBoxLayout* up   = new QHBoxLayout;
+       QHBoxLayout* down = new QHBoxLayout;
+
+       layout->addLayout(up);
+       layout->addLayout(down);
+
+       QVBoxLayout* vlg = new QVBoxLayout;
+       QVBoxLayout* vld = new QVBoxLayout;
+
+       up->addLayout(vlg);
+       up->addLayout(vld);
+
+       vlg->addWidget(new QLabel("Name"));
+       vlg->addWidget(new QLabel("Dimension"));
+       vlg->addWidget(new QLabel("Container"));
+
+       _name = new QLineEdit("Mesh");
+       _dim  = new QSpinBox();
+       _fact = new QLineEdit("FactoryServer");
+
+       vld->addWidget(_name);
+       vld->addWidget(_dim);
+       vld->addWidget(_fact);
+
+       _dim->setRange(1, 3);
+       _dim->setValue(3);
+
+       _initWidget(editmode);
+
+}
+
+// ============================================================== Destructeur
+ComputeMeshDialog::~ComputeMeshDialog()
+{
+}
+
+
+// ============================================================== _initInputWidget
+void ComputeMeshDialog::_initInputWidget( Mode editmode )
+{
+}
+
+// ============================================================== setDocumentModel
+void ComputeMeshDialog::setDocumentModel(DocumentModel* m)
+{
+       HexaBaseDialog::setDocumentModel(m);
+       _name->setText(_documentModel->getName());
+}
+
+// ============================================================== clear
+void ComputeMeshDialog::clear()
+{
+}
+
+// ============================================================== apply
+bool ComputeMeshDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+
+       QString command = QString("import hexablock ; %1 = hexablock.mesh(\"%2\", \"%1\", %3, \"%4\")")
+                                                                 .arg( _name->text() )
+                                                                 .arg( _documentModel->documentEntry() )
+                                                                 .arg( _dim->value() )
+                                                                 .arg( _fact->text() );
+       //std::cout << "command: " << command.toStdString() << std::endl;
+
+       SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+       PyConsole_Console* pyConsole = app->pythonConsole();
+
+       if ( pyConsole )
+               pyConsole->exec( command );
+       else
+               return false;
+
+       //   clear();
+       return true;
+}
+
+// void  ComputeMeshDialog::accept() {
+//     _disallowSelection();
+//     QDialog::accept();
+//
+//     QString command = QString("import hexablock ; %1 = hexablock.mesh(\"%1\", \"%2\", %3, \"%4\")")
+//       .arg( _name->text() )
+//       .arg( _documentModel->documentEntry() )
+//       .arg( _dim->value() )
+//       .arg( _fact->text() );
+//     std::cout << "command: " << command.toStdString() << std::endl;
+//
+//     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+//     PyConsole_Console* pyConsole = app->pythonConsole();
+//
+//     if ( pyConsole ) pyConsole->exec( command );
+// }
+
+// void ComputeMeshDialog::reject() {
+//     _disallowSelection();
+//     QDialog::reject();
+// }
+
+
+
+// ------------------------- ReplaceHexaDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+ReplaceHexaDialog::ReplaceHexaDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_replace_hexa.html";
+       setupUi( this );
+       _initWidget(editmode);
+       setFocusProxy( quads_lw );
+}
+
+// ============================================================== Destructeur
+ReplaceHexaDialog::~ReplaceHexaDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void ReplaceHexaDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       c1_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       c2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       c3_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+
+       p1_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       p2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       p3_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+
+       c1_le->installEventFilter(this);
+       c2_le->installEventFilter(this);
+       c3_le->installEventFilter(this);
+
+       p1_le->installEventFilter(this);
+       p2_le->installEventFilter(this);
+       p3_le->installEventFilter(this);
+
+       quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+       quads_lw->installEventFilter(this);
+
+       if ( editmode == NEW_MODE ){
+               QShortcut* delQuadShortcut = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+               delQuadShortcut->setContext( Qt::WidgetShortcut );
+
+               connect( delQuadShortcut, SIGNAL(activated()), this, SLOT(deleteQuadItem()) );
+               connect( quads_lw, SIGNAL(currentRowChanged(int)), this, SLOT(updateButtonBox(int)) );
+       }
+
+       connect(quads_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()));
+}
+
+// ============================================================== clear
+void ReplaceHexaDialog::clear()
+{
+}
+
+// ============================================================== updateButtonBox
+void ReplaceHexaDialog::updateButtonBox()
+{
+       int nbQuad = quads_lw->count();
+
+       if ( nbQuad > 0 ){
+               //_applyCloseButton->setEnabled(true);
+               _applyButton->setEnabled(true);
+       } else {
+               //_applyCloseButton->setEnabled(false);
+               _applyButton->setEnabled(false);
+       }
+}
+
+// ============================================================== deleteQuadItem
+void ReplaceHexaDialog::deleteQuadItem()
+{
+       delete quads_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== apply
+bool ReplaceHexaDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel ) return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex ielts; //result
+
+       QListWidgetItem* item = NULL;
+       QModelIndexList iquads;
+       QModelIndex     iquad;
+       for ( int r = 0; r < quads_lw->count(); ++r){
+               item = quads_lw->item(r);
+               iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               //std::cout << "iquad => " << iquad.data().toString().toStdString() << std::endl;
+               if ( iquad.isValid() )
+                       iquads << iquad;
+       }
+
+       QModelIndex ic1 = patternDataModel->mapToSource( _index[c1_le] );
+       QModelIndex ic2 = patternDataModel->mapToSource( _index[c2_le] );
+       QModelIndex ic3 = patternDataModel->mapToSource( _index[c3_le] );
+
+       QModelIndex ip1 = patternDataModel->mapToSource( _index[p1_le] );
+       QModelIndex ip2 = patternDataModel->mapToSource( _index[p2_le] );
+       QModelIndex ip3 = patternDataModel->mapToSource( _index[p3_le] );
+
+       //   std::cout << "nbHexa => " << nbHexa << std::endl;
+
+       if ( ic1.isValid() && ic2.isValid() && ic3.isValid()
+                       && ip1.isValid() && ip2.isValid() && ip3.isValid() ){
+               ielts = _documentModel->replace( iquads,
+                               ip1, ic1,
+                               ip2, ic2,
+                               ip3, ic3 );
+       }
+
+       if ( !ielts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT REPLACE HEXA" ) );
+               return false;
+       }
+       _value  = ielts.model()->data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements*>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( ielts, newName );
+
+       result = patternBuilderModel->mapFromSource(ielts);
+
+       return true;
+}
+
+
+
+
+// ------------------------- QuadRevolutionDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+QuadRevolutionDialog::QuadRevolutionDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_quad_revolution.html";
+       setupUi( this );
+       _initWidget(editmode);
+       setFocusProxy( quads_lw );
+}
+
+// ============================================================== Destructeur
+QuadRevolutionDialog::~QuadRevolutionDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void QuadRevolutionDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       center_pt_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       axis_vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
+
+       center_pt_le->setValidator( validator );
+       axis_vec_le->setValidator( validator );
+       //   quads_lw->setValidator( validator );
+
+       center_pt_le->installEventFilter(this);
+       axis_vec_le->installEventFilter(this);
+       quads_lw->installEventFilter(this);
+
+       if ( editmode == NEW_MODE ){
+               angles_lw->setItemDelegate( new HexaAngleDoubleSpinBoxDelegate(angles_lw) );
+               angles_lw->setEditTriggers( QAbstractItemView::DoubleClicked );
+
+               QShortcut* delQuadShortcut = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+               delQuadShortcut->setContext( Qt::WidgetShortcut );
+               connect( delQuadShortcut, SIGNAL(activated()), this, SLOT(delQuadItem()) );
+               connect( add_angle_pb, SIGNAL(clicked()), this, SLOT(addAngleItem()));
+               connect( del_angle_pb, SIGNAL(clicked()), this, SLOT(delAngleItem()));
+               //     connect(clear_pb, SIGNAL(clicked()), this, SLOT(clearQuads()));
+       }
+
+       connect(quads_lw,    SIGNAL(itemSelectionChanged()), this, SLOT(selectElementOfModel()));
+}
+
+// ============================================================== clear
+void QuadRevolutionDialog::clear()
+{
+}
+
+
+// ============================================================== updateButtonBox
+void QuadRevolutionDialog::updateButtonBox() //CS_TODO? : check center, axis
+{
+       int nbQuads  = quads_lw->count();
+       int nbAngles = angles_lw->count();
+
+       if ( nbQuads>0 && nbAngles> 0 ){
+               //_applyCloseButton->setEnabled(true);
+               _applyButton->setEnabled(true);
+       } else {
+               //_applyCloseButton->setEnabled(false);
+               _applyButton->setEnabled(false);
+       }
+}
+
+
+// ============================================================== addAngleItem
+void QuadRevolutionDialog::addAngleItem() //CS_TODO
+{
+       QListWidgetItem* previousItem = angles_lw->currentItem();
+       QListWidgetItem* newItem      = new QListWidgetItem();
+
+       double defaultValue = 0.;
+       if ( previousItem )
+               defaultValue =  previousItem->data(Qt::EditRole).toDouble();
+
+       newItem->setData(  Qt::EditRole, QVariant(defaultValue) );
+       newItem->setFlags( newItem->flags () | Qt::ItemIsEditable);
+       angles_lw->addItem(newItem);
+
+       updateButtonBox();
+}
+
+// ============================================================== delAngleItem
+void QuadRevolutionDialog::delAngleItem()
+{
+       delete angles_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== delQuadItem
+void QuadRevolutionDialog::delQuadItem()
+{
+       delete quads_lw->currentItem();
+       updateButtonBox();
+}
+
+// ============================================================== apply
+bool QuadRevolutionDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternDataSelectionModel )    return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       if ( !patternDataModel )    return false;
+       if ( !patternBuilderModel ) return false;
+       _currentObj = NULL;
+
+       QModelIndex ielts; //result
+       QListWidgetItem* item = NULL;
+
+       QModelIndexList istartquads;
+       QModelIndex     iquad;
+       for ( int r = 0; r < quads_lw->count(); ++r){
+               item = quads_lw->item(r);
+               iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+               if ( iquad.isValid() )
+                       istartquads << iquad;
+       }
+
+       QModelIndex icenter_pt = patternDataModel->mapToSource( _index[center_pt_le] );
+       QModelIndex iaxis_vec  = patternBuilderModel->mapToSource( _index[axis_vec_le] );
+
+       QList<double> angles;
+       for ( int r = 0; r < angles_lw->count(); ++r){
+               item = angles_lw->item(r);
+               angles << item->data(Qt::EditRole).toDouble();
+       }
+
+       if ( icenter_pt.isValid() && iaxis_vec.isValid() ){
+               ielts = _documentModel->revolutionQuads( istartquads, icenter_pt, iaxis_vec, angles );
+       }
+
+       if ( !ielts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE QUAD REVOLUTION" ) );
+               return false;
+       }
+       _value  = ielts.model()->data(ielts, HEXA_DATA_ROLE).value<HEXA_NS::Elements*>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( ielts, newName );
+
+       result = patternBuilderModel->mapFromSource(ielts);
+
+       return true;
+}
+
+
+
+// ------------------------- QuadRevolutionDialog ----------------------------------
+
+// ============================================================== Constructeur
+
+MakeHemiSphereDialog::MakeHemiSphereDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+                                                               HexaBaseDialog(parent, editmode, f)
+{
+       _helpFileName = "gui_hemisphere.html";
+       setupUi( this );
+       _initWidget(editmode);
+}
+
+// ============================================================== Destructeur
+MakeHemiSphereDialog::~MakeHemiSphereDialog()
+{
+}
+
+// ============================================================== _initInputWidget
+void MakeHemiSphereDialog::_initInputWidget( Mode editmode )
+{
+       QRegExp rx("");
+       QValidator *validator = new QRegExpValidator(rx, this);
+
+       setProperty( "HexaWidgetType",  QVariant::fromValue(ELEMENTS_TREE) );
+       installEventFilter(this);
+
+       sphere_center_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       cross_pt_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
+       hole_axis_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       cross_vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+       radial_vec_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+
+       sphere_center_le->setValidator( validator );
+       cross_pt_le->setValidator( validator );
+       hole_axis_le->setValidator( validator );
+       cross_vec_le->setValidator( validator );
+       radial_vec_le->setValidator( validator );
+
+
+       sphere_center_le->installEventFilter(this);
+       cross_pt_le->installEventFilter(this);
+       hole_axis_le->installEventFilter(this);
+       cross_vec_le->installEventFilter(this);
+       radial_vec_le->installEventFilter(this);
+}
+
+// ============================================================== clear
+void MakeHemiSphereDialog::clear()
+{
+}
+
+// ============================================================== apply
+bool MakeHemiSphereDialog::apply(QModelIndex& result)
+{
+       SUIT_OverrideCursor wc;
+       if ( !_documentModel ) return false;
+       if ( !_patternBuilderSelectionModel ) return false;
+       if ( !_patternDataSelectionModel )    return false;
+       const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+       const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+       if ( !patternBuilderModel ) return false;
+       if ( !patternDataModel )    return false;
+       _currentObj = NULL;
+
+       QModelIndex iElts;
+       QModelIndex icenter = patternDataModel->mapToSource( _index[sphere_center_le] );
+       QModelIndex iplorig = patternDataModel->mapToSource( _index[cross_pt_le] );
+       QModelIndex ivecx  = patternBuilderModel->mapToSource( _index[radial_vec_le] );
+       QModelIndex ivecz  = patternBuilderModel->mapToSource( _index[hole_axis_le] );
+
+       double radext  = sphere_radext_spb->value();
+       double radhole = hole_rad_spb->value();
+
+       int nrad  = ngrid_rad_spb->value();
+       int nang  = ngrid_ang_spb->value();
+       int nhaut = ngrid_height_spb->value();
+
+
+       if ( icenter.isValid() && ivecx.isValid() && ivecz.isValid() && iplorig.isValid() ){
+               if ( sphere_rind_cb->isChecked() ){ // rind
+                       double radint  = sphere_radint_spb->value();
+                       if ( radial_partial_cb->isChecked() ){
+                               double angle = radial_angle_spb->value();
+                               iElts = _documentModel->makePartRind( icenter, ivecx, ivecz,
+                                               radext, radint, radhole,
+                                               iplorig,      angle,
+                                               nrad, nang, nhaut );
+                       } else {
+                               iElts = _documentModel->makeRind( icenter,
+                                               ivecx, ivecz,
+                                               radext, radint, radhole,
+                                               iplorig,
+                                               nrad, nang, nhaut );
+                       }
+               } else { // sphere
+                       if ( radial_partial_cb->isChecked() ){
+                               double angle = radial_angle_spb->value();
+                               iElts = _documentModel->makePartSphere( icenter, ivecx, ivecz,
+                                               radext, radhole,
+                                               iplorig, angle,
+                                               nrad, nang, nhaut );
+                       } else {
+                               iElts = _documentModel->makeSphere( icenter,
+                                               ivecx, ivecz,
+                                               radext, radhole,
+                                               iplorig,
+                                               nrad, nang, nhaut );
+                       }
+               }
+       }
+
+
+       if ( !iElts.isValid() ){
+               SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE RIND" ) );
+               return false;
+       }
+       _value  = iElts.model()->data(iElts, HEXA_DATA_ROLE).value<HEXA_NS::Elements*>();
+
+       QString newName = name_le->text();
+       if ( !newName.isEmpty() )/*{*/
+               _documentModel->setName( iElts, newName );
+
+       result = patternBuilderModel->mapFromSource(iElts);
+
+       return true;
+}
+// ==============================================================
+
+
+// MakeRindDialog::MakeRindDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
+// HexaBaseDialog(parent, editmode, f)
+// {
+// //   _helpFileName()
+//   setupUi( this );
+//   setWindowTitle( tr("MAKE RIND") );
+//
+//   if ( editmode == NEW_MODE ){
+//     _initButtonBox( editmode );
+//
+//     //selection management
+//     _vertexLineEdits << center_le << plorig_le;
+//     _vectorLineEdits << vx_le << vz_le;
+//
+//     center_le->installEventFilter(this);
+//     plorig_le->installEventFilter(this);
+//     vx_le->installEventFilter(this);
+//     vz_le->installEventFilter(this);
+//   }
+// }
+//
+//
+// MakeRindDialog::~MakeRindDialog()
+// {
+// }
+//
+//
+//
+// bool MakeRindDialog::apply(QModelIndex& result)
+// {
+//   SUIT_OverrideCursor wc;
+//   if ( !_documentModel ) return false;
+//   if ( !_patternBuilderSelectionModel ) return false;
+//   if ( !_patternDataSelectionModel )    return false;
+//   const PatternBuilderModel* patternBuilderModel = dynamic_cast<const PatternBuilderModel*>( _patternBuilderSelectionModel->model() );
+//   const PatternDataModel* patternDataModel = dynamic_cast<const PatternDataModel*>( _patternDataSelectionModel->model() );
+//   if ( !patternBuilderModel ) return false;
+//   if ( !patternDataModel )    return false;
+//
+//   QModelIndex iElts;
+//   QModelIndex icenter = patternDataModel->mapToSource( _index[center_le] );
+//   QModelIndex iplorig = patternDataModel->mapToSource( _index[plorig_le] );
+//   QModelIndex ivecx  = patternBuilderModel->mapToSource( _index[vx_le] );
+//   QModelIndex ivecz  = patternBuilderModel->mapToSource( _index[vz_le] );
+//
+//   double radext = radext_spb->value();
+//   double radint = radint_spb->value();
+//   double radhole = radhole_spb->value();
+//
+//   int nrad = nrad_spb->value();
+//   int nang = nang_spb->value();
+//   int nhaut = nhaut_spb->value();
+//
+//   if ( icenter.isValid() && ivecx.isValid() && ivecz.isValid() && iplorig.isValid() ){
+//     if ( partial_cb->isChecked() ){
+//       double angle = angle_spb->value(); // Part Rind only
+//       iElts = _documentModel->makePartRind( icenter, ivecx, ivecz,
+//                                         radext, radint, radhole,
+//                                         iplorig,      angle,
+//                                         nrad, nang, nhaut );
+//     } else {
+//       iElts = _documentModel->makeRind( icenter,
+//                                         ivecx, ivecz,
+//                                         radext, radint, radhole,
+//                                         iplorig,
+//                                         nrad, nang, nhaut );
+//     }
+//   }
+//
+//   if ( !iElts.isValid() ){
+//     SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE RIND" ) );
+//     return false;
+//   }
+//
+//   QString newName = name_le->text();
+//   if (!newName.isEmpty()) _documentModel->setName( iElts, newName );
+//
+//   return true;
+// }
+
+// QVariant v = lineEdit->property("index");
+//           if ( v.isValid() ){
+//             MESSAGE("*  get index ... " );
+//             QModelIndex i = v.value<QModelIndex>();
+//             _selectionMutex = true;
+//             _patternDataSelectionModel->select( i, QItemSelectionModel::Clear );
+//             _patternDataSelectionModel->select( i, QItemSelectionModel::Select );
+//             _selectionMutex = false;
+//           }
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.hxx
new file mode 100755 (executable)
index 0000000..b59b2e3
--- /dev/null
@@ -0,0 +1,1058 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
+#define __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
+
+
+#if defined WIN32
+#  if defined HEXABLOCKGUI_DOCUMENTPANEL_EXPORT || defined HexablockGui_DocumentPanel_EXPORTS
+#    define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT __declspec( dllexport )
+#  else
+#    define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT
+#endif
+
+
+
+#include <QShortcut>
+
+#include "ui_Vertex_QTD.h"
+#include "ui_Quad_QTD.h"
+#include "ui_Edge_QTD.h"
+#include "ui_Hexa_QTD.h"
+
+#include "ui_Vector_QTD.h"
+#include "ui_Cylinder_QTD.h"
+#include "ui_Pipe_QTD.h"
+#include "ui_MakeGrid_QTD.h"
+#include "ui_MakePipe_QTD.h"
+#include "ui_MakeCylinder_QTD.h"
+#include "ui_MakeCylinders_QTD.h"
+#include "ui_MakePipes_QTD.h"
+#include "ui_RemoveHexa_QTD.h"
+#include "ui_PrismQuad_QTD.h"
+#include "ui_JoinQuad_QTD.h"
+#include "ui_Merge_QTD.h"
+#include "ui_Disconnect_QTD.h"
+#include "ui_CutEdge_QTD.h"
+#include "ui_Transformation_QTD.h"
+#include "ui_Symmetry_QTD.h"
+
+#include "ui_EdgeAssoc_QTD.h"
+#include "ui_QuadAssoc_QTD.h"
+
+#include "ui_Group_QTD.h"
+#include "ui_Law_QTD.h"
+#include "ui_Propagation_QTD.h"
+
+
+#include "ui_QuadRevolution_QTD.h"
+#include "ui_MakeRind_QTD.h"
+#include "ui_ReplaceHexa_QTD.h"
+#include "ui_MakeHemiSphere_QTD.h"
+
+
+#include "MyGEOMBase_Helper.hxx"
+
+
+
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+
+#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+// #include "HEXABLOCKGUI_SalomeTools.hxx"
+
+#include "klinkitemselectionmodel.hxx"
+
+
+
+Q_DECLARE_METATYPE(QModelIndex);
+Q_DECLARE_METATYPE(HEXABLOCK::GUI::DocumentModel::GeomObj);
+Q_DECLARE_METATYPE(GEOM::GeomObjPtr);
+
+// class MyBasicGUI_PointDlg;
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+    class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT HexaBaseDialog : public QDialog,
+                                                             public MyGEOMBase_Helper
+    {
+        Q_OBJECT
+
+        public:
+          enum Mode {
+            NEW_MODE,
+            INFO_MODE,
+            UPDATE_MODE
+          };
+
+          // define input widget type => usefull for selection
+          typedef HexaTreeRole  HexaWidgetType;
+          typedef TopAbs_ShapeEnum/*int */GeomWidgetType; //CS_TODO
+
+// TopAbs_ShapeEnum aType = TopAbs_EDGE;
+
+          // listwidget
+          enum {
+            LW_QMODELINDEX_ROLE = Qt::UserRole + 1,
+            LW_ASSOC_ROLE,
+            LW_GEOM_OBJ_ROLE
+          };
+
+          HexaBaseDialog( QWidget * parent = 0, Mode editmode = NEW_MODE, Qt::WindowFlags f = 0 );
+          virtual ~HexaBaseDialog();
+
+          // clear all input widget
+          virtual void clear();
+
+          //  model
+          virtual void setDocumentModel( DocumentModel* m );
+
+          //  selection
+          virtual void setPatternDataSelectionModel( PatternDataSelectionModel* s );
+          virtual void setPatternBuilderSelectionModel( PatternBuilderSelectionModel* s );
+          virtual void setGroupsSelectionModel( GroupsSelectionModel* s );
+          virtual void setMeshSelectionModel( MeshSelectionModel* s );
+
+        public slots:
+          //virtual void accept();
+          virtual bool apply();
+          virtual void close();
+          virtual void onHelpRequested();
+
+
+        protected:
+          virtual bool eventFilter(QObject *obj, QEvent *event);
+          virtual void hideEvent ( QHideEvent * event );
+          virtual void showEvent ( QShowEvent * event );
+          virtual bool apply(QModelIndex& result) = 0;
+
+          virtual void _initInputWidget( Mode editmode )=0; //must be implemented on inherited dialog box
+          virtual QGroupBox*  _initButtonBox( Mode editmode );
+          void _initWidget( Mode editmode ); // call _initInputWidget() & _initButtonBox()
+
+          void _initViewManager();
+
+
+          void _allowSelection();
+          void _disallowSelection();
+          QItemSelectionModel* _allowSelection( HexaWidgetType wtype );
+
+          bool _allowVTKSelection( QObject* obj );
+          bool _allowOCCSelection( QObject* obj );
+          QItemSelectionModel* _getSelector( QObject* obj );
+
+
+          bool _onSelectionChanged( const QItemSelection& sel, QLineEdit*   le );
+          bool _onSelectionChanged( const QItemSelection& sel, QListWidget* lw );
+
+          void _selectAndHighlight( const QModelIndex& i );
+
+
+          Mode _editMode;
+
+          DocumentModel*       _documentModel;
+
+          // user selection
+          PatternDataSelectionModel*    _patternDataSelectionModel;
+          PatternBuilderSelectionModel* _patternBuilderSelectionModel;
+          GroupsSelectionModel*         _groupsSelectionModel;
+          MeshSelectionModel*           _meshSelectionModel;
+
+          QMap<QObject*, QModelIndex>   _index;
+          QObject*                      _currentObj;
+
+          int                           _expectedSelection;
+          bool                          _selectionMutex;
+
+          LightApp_SelectionMgr*        _mgr;
+          SUIT_ViewManager*             _vtkVm;
+          SUIT_ViewManager*             _occVm;
+
+          QMap<HexaWidgetType, QString>  _strHexaWidgetType;
+
+          //QPushButton* _applyCloseButton;
+          QPushButton* _applyButton;
+
+          QString  _helpFileName;
+
+        protected slots:
+          virtual void onSelectionChanged(  const QItemSelection& sel, const QItemSelection& unsel ); //from qt model/view selectionManager
+          virtual void onCurrentSelectionChanged();//from salome selectionManager
+          virtual void onWindowActivated( SUIT_ViewManager* vm );
+          virtual void updateButtonBox();
+          void updateName();
+          void selectElementOfModel();
+
+    };
+
+
+
+    class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT VertexDialog : public HexaBaseDialog,
+                                                          public Ui::VertexDialog
+    {
+      Q_OBJECT
+
+      public:
+        VertexDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~VertexDialog();
+
+        void clear();
+
+        void setValue(HEXA_NS::Vertex* v);
+        HEXA_NS::Vertex* getValue();
+
+        void setIndex(const QModelIndex& i);
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Vertex     *_value;
+        QModelIndex         _ivalue;
+    };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT EdgeDialog : public HexaBaseDialog,
+                                                       public Ui::EdgeDialog
+  {
+      Q_OBJECT
+
+      public:
+        EdgeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~EdgeDialog();
+
+        void clear();
+
+        void setValue(HEXA_NS::Edge* e);
+        HEXA_NS::Edge* getValue();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      private:
+        HEXA_NS::Edge *_value;
+        QModelIndex   _ivalue;
+    };
+
+
+    class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadDialog : public HexaBaseDialog,
+                                                        public Ui::QuadDialog
+    {
+      Q_OBJECT
+
+      public:
+        QuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~QuadDialog();
+
+        void clear();
+
+        void setValue(HEXA_NS::Quad* v);
+        HEXA_NS::Quad* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Quad    *_value;
+        QModelIndex      _ivalue;
+    };
+
+
+
+    class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT HexaDialog : public HexaBaseDialog,
+                                                         public Ui::HexaDialog
+    {
+      Q_OBJECT
+
+      public:
+        HexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~HexaDialog();
+
+        void clear();
+
+        void setValue(HEXA_NS::Hexa* v);
+        HEXA_NS::Hexa* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void deleteQuadItem();
+        void deleteVertexItem();
+        void updateButtonBox();
+
+      private:
+        void _setValueQuads( HEXA_NS::Hexa* h );
+        void _setValueVertices( HEXA_NS::Hexa* h );
+
+        HEXA_NS::Hexa   *_value;
+        QModelIndex     _ivalue;
+    };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT VectorDialog : public HexaBaseDialog,
+                                                         public Ui::VectorDialog
+  {
+      Q_OBJECT
+
+      public:
+        VectorDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~VectorDialog();
+
+        void clear();
+
+        void setValue(HEXA_NS::Vector* v);
+        HEXA_NS::Vector* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Vector *_value;
+        QModelIndex     _ivalue;
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT CylinderDialog : public HexaBaseDialog,
+                                                           public Ui::CylinderDialog
+  {
+      Q_OBJECT
+
+      public:
+        CylinderDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~CylinderDialog();
+
+        void clear();
+
+        void setValue( HEXA_NS::Cylinder* v );
+        HEXA_NS::Cylinder* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Cylinder   *_value;
+        QModelIndex         _ivalue;
+    };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PipeDialog : public HexaBaseDialog,
+                                                       public Ui::PipeDialog
+  {
+      Q_OBJECT
+
+      public:
+        PipeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~PipeDialog();
+
+        void clear();
+
+        void setValue( HEXA_NS::Pipe* p );
+        HEXA_NS::Pipe* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         void updateName();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Pipe   *_value;
+        QModelIndex     _ivalue;
+
+    };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeGridDialog : public HexaBaseDialog,
+                                                           public Ui::MakeGridDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeGridDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeGridDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void addRadiusItem();
+        void delRadiusItem();
+        void addAngleItem();
+        void delAngleItem();
+        void addHeightItem();
+        void delHeightItem();
+        void updateButtonBox();
+
+      protected slots:
+        void updateHelpFileName();
+
+  };
+
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeCylinderDialog : public HexaBaseDialog,
+                                                           public Ui::MakeCylinderDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeCylinderDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeCylinderDialog();
+
+        void clear();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+  };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakePipeDialog : public HexaBaseDialog,
+                                                           public Ui::MakePipeDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakePipeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakePipeDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+  };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeCylindersDialog : public HexaBaseDialog,
+                                                                public Ui::MakeCylindersDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeCylindersDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeCylindersDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+  };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakePipesDialog : public HexaBaseDialog,
+                                                            public Ui::MakePipesDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakePipesDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakePipesDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT RemoveHexaDialog : public HexaBaseDialog,
+                                                             public Ui::RemoveHexaDialog
+  {
+      Q_OBJECT
+
+      public:
+        RemoveHexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~RemoveHexaDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+  };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PrismQuadDialog : public HexaBaseDialog,
+                                                            public Ui::PrismQuadDialog
+  {
+      Q_OBJECT
+
+      public:
+        PrismQuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~PrismQuadDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private slots:
+        void addQuad();
+        void removeQuad();
+        void clearQuads();
+
+  };
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT JoinQuadDialog : public HexaBaseDialog,
+                                                           public Ui::JoinQuadDialog
+  {
+      Q_OBJECT
+
+      public:
+        JoinQuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~JoinQuadDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private slots:
+        void addQuad();
+        void removeQuad();
+        void clearQuads();
+
+  };
+
+
+    class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MergeDialog : public HexaBaseDialog,
+                                                          public Ui::MergeDialog
+    {
+      Q_OBJECT
+
+      public:
+        MergeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MergeDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+
+
+   };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT DisconnectDialog : public HexaBaseDialog,
+                                                             public Ui::DisconnectDialog
+  {
+      Q_OBJECT
+
+      public:
+        DisconnectDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~DisconnectDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+       void deleteEdgeItem();
+       void deleteHexaItem();
+   };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT CutEdgeDialog : public HexaBaseDialog,
+                                                          public Ui::CutEdgeDialog
+  {
+      Q_OBJECT
+
+      public:
+        CutEdgeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~CutEdgeDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+   };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeTransformationDialog : public HexaBaseDialog,
+                                                          public Ui::TransformationDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeTransformationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeTransformationDialog ();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+   };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeSymmetryDialog : public HexaBaseDialog,
+                                                               public Ui::SymmetryDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeSymmetryDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeSymmetryDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+   };
+
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PerformTransformationDialog : public HexaBaseDialog,
+                                                                        public Ui::TransformationDialog
+  {
+      Q_OBJECT
+
+      public:
+        PerformTransformationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~PerformTransformationDialog ();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+   };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PerformSymmetryDialog : public HexaBaseDialog,
+                                                                  public Ui::SymmetryDialog
+  {
+      Q_OBJECT
+
+      public:
+        PerformSymmetryDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~PerformSymmetryDialog();
+
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+   };
+
+
+//   typedef class MyBasicGUI_PointDlg VertexAssocDialog;
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT EdgeAssocDialog : public HexaBaseDialog,
+                                                            public Ui::EdgeAssocDialog
+  {
+      Q_OBJECT
+
+      public:
+        EdgeAssocDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~EdgeAssocDialog();
+        void clear();
+
+        void setGeomEngine( GEOM::GEOM_Gen_var geomEngine );
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        virtual void _initInputWidget( Mode editmode );
+//         virtual void hideEvent ( QHideEvent * event );
+//         virtual void showEvent ( QShowEvent * event );
+        virtual GEOM::GEOM_IOperations_ptr createOperation();
+        virtual bool execute( ObjectList& );
+
+      protected slots:
+        virtual void onCurrentSelectionChanged();
+//         void onSelectionChanged(  const QItemSelection& sel, const QItemSelection& unsel );
+        virtual void onWindowActivated(SUIT_ViewManager*);
+
+        void deleteEdgeItem();
+        void deleteLineItem();
+
+        void addLine();
+        void pstartChanged( double val );
+        void pendChanged( double val );
+
+      private:
+        // Preview in GEOM
+//         GEOM::GeomObjPtr    _firstLine;
+//         GEOM::GeomObjPtr    _lastLine;
+        GEOM::GeomObjPtr    _currentLine;
+       GEOM::GeomObjPtr    myLine;
+        double              _currentParameter;
+        GEOM::GEOM_Gen_var  _geomEngine ;
+
+  };
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadAssocDialog : public HexaBaseDialog,
+                                                            public Ui::QuadAssocDialog
+  {
+      Q_OBJECT
+
+      public:
+        QuadAssocDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~QuadAssocDialog();
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        virtual void _initInputWidget( Mode editmode );
+//         virtual void hideEvent ( QHideEvent * event );
+//         virtual void showEvent ( QShowEvent * event );
+
+      protected slots:
+        virtual void onCurrentSelectionChanged();
+        virtual void onWindowActivated(SUIT_ViewManager*);
+        void deleteFaceItem();
+
+      private:
+        QList<DocumentModel::GeomObj> _assocs;
+        QShortcut*                    _delFaceShortcut;
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT GroupDialog : public HexaBaseDialog,
+                                                        public Ui::GroupDialog
+  {
+      Q_OBJECT
+
+      QMap<DocumentModel::Group, QString> strKind;
+
+      public:
+        GroupDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~GroupDialog();
+        void clear();
+
+        void setValue(HEXA_NS::Group* v);
+        HEXA_NS::Group* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private slots:
+//         void addEltBase();
+        void removeEltBase();
+//         void clearEltBase();
+        void onKindChanged( int index );
+
+      private:
+        HEXA_NS::Group   *_value;
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT LawDialog : public HexaBaseDialog,
+                                                      public Ui::LawDialog
+  {
+      Q_OBJECT
+
+      QMap<DocumentModel::KindLaw, QString> strKind;
+
+      public:
+        LawDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~LawDialog();
+        void clear();
+
+        void setValue(HEXA_NS::Law* v);
+        HEXA_NS::Law* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Law   *_value;
+  };
+
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PropagationDialog : public HexaBaseDialog,
+                                                      public Ui::PropagationDialog
+  {
+      Q_OBJECT
+
+      public:
+        PropagationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~PropagationDialog();
+        void clear();
+
+        void setValue(HEXA_NS::Propagation* v);
+        HEXA_NS::Propagation* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void updateHelpFileName();
+        void deletePropagationItem();
+
+      private:
+        HEXA_NS::Propagation *_value;
+  };
+
+
+
+    // Define the compute mesh dialog box
+    // ----------------------------------
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT ComputeMeshDialog : public HexaBaseDialog
+  {
+      Q_OBJECT
+
+      public:
+        ComputeMeshDialog( QWidget* parent = 0, Mode editmode = NEW_MODE, Qt::WindowFlags f = Qt::SubWindow );
+        virtual ~ComputeMeshDialog();
+        void clear();
+
+        void setDocumentModel(DocumentModel* m);
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+//         virtual void accept();
+//         virtual void reject();
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+       QLineEdit* _name;
+       QSpinBox*  _dim;
+       QLineEdit* _fact;
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT ReplaceHexaDialog : public HexaBaseDialog,
+                                                              public Ui::ReplaceHexaDialog
+  {
+      Q_OBJECT
+
+      public:
+        ReplaceHexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~ReplaceHexaDialog();
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void deleteQuadItem();
+        void updateButtonBox();
+
+      private:
+        HEXA_NS::Elements *_value;
+  };
+
+
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadRevolutionDialog : public HexaBaseDialog,
+                                                                 public Ui::QuadRevolutionDialog
+  {
+      Q_OBJECT
+
+      public:
+        QuadRevolutionDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~QuadRevolutionDialog();
+        void clear();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      protected slots:
+        void addAngleItem();
+        void delAngleItem();
+        void delQuadItem();
+        void updateButtonBox();
+
+      private:
+        HEXA_NS::Elements *_value;
+  };
+
+
+
+  class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeHemiSphereDialog : public HexaBaseDialog,
+                                                             public Ui::MakeHemiSphereDialog
+  {
+      Q_OBJECT
+
+      public:
+        MakeHemiSphereDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+        virtual ~MakeHemiSphereDialog();
+        void clear();
+
+//         void setValue(HEXA_NS::Propagation* v);
+//         HEXA_NS::Propagation* getValue();
+
+      public slots:
+        virtual bool apply(QModelIndex& result);
+
+      protected:
+        void _initInputWidget( Mode editmode );
+
+      private:
+        HEXA_NS::Elements *_value;
+  };
+
+//   class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeRindDialog : public HexaBaseDialog,
+//                                                     public Ui::MakeRindDialog
+//   {
+//       Q_OBJECT
+//
+//       public:
+//         MakeRindDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
+//         virtual ~MakeRindDialog();
+//
+//       public slots:
+//         virtual bool apply(QModelIndex& result);
+//
+//       private:
+// //         HEXA_NS::Propagation *_value;:q
+//
+//   };
+
+
+  }
+}
+
+
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx
new file mode 100755 (executable)
index 0000000..393c908
--- /dev/null
@@ -0,0 +1,1406 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <set>
+#include <map>
+
+
+#include "utilities.h"
+
+#include <QtxWorkstack.h>
+#include <STD_TabDesktop.h>
+#include <STD_MDIDesktop.h>
+#include <STD_SDIDesktop.h>
+
+#include <SalomeApp_Tools.h>
+
+#include "SOCC_ViewModel.h"
+#include <OCCViewer_ViewManager.h>
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
+
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_Session.h>
+#include <SUIT_Selector.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ViewManager.h>
+
+
+#include "HEXABLOCKGUI_SalomeTools.hxx"
+#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentGraphicView.hxx"
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+#include "HEXABLOCKGUI.hxx"
+
+
+#include <SVTK_Selector.h>
+#include <SVTK_ViewModel.h>
+
+
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
+#include <SALOME_Actor.h>
+#include <SALOME_ListIO.hxx>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+#include <QMultiMap>
+
+#include "GEOMBase.h"
+#include "MyGEOMBase_Helper.hxx"
+
+#include <OCCViewer_ViewModel.h>
+#include <SVTK_ViewModel.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+
+
+//#define _DEVDEBUG_
+using namespace std;
+using namespace HEXABLOCK::GUI;
+
+
+
+PatternDataSelectionModel::PatternDataSelectionModel( QAbstractItemModel * model ):
+QItemSelectionModel( model ),
+MyGEOMBase_Helper( SUIT_Session::session()->activeApplication()->desktop() ),
+_theModelSelectionChanged(false),
+_theVtkSelectionChanged(false),
+_theGeomSelectionChanged(false),
+_selectionFilter(-1),
+_salomeSelectionMgr(0)
+{
+  connect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+           this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  connect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+           this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+
+}
+
+
+PatternDataSelectionModel::~PatternDataSelectionModel()
+{
+  disconnect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+          this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  disconnect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+
+//   if ( _salomeSelectionMgr )
+//     disconnect( _salomeSelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( salomeSelectionChanged() ) );
+  disconnect( HEXABLOCKGUI::selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( salomeSelectionChanged() ) );
+}
+
+
+void PatternDataSelectionModel::setVertexSelection()
+{
+  MESSAGE("PatternDataSelectionModel::setVertexSelection(){");
+  SetSelectionMode(NodeSelection);
+// //  NodeSelection,
+// //  CellSelection,
+// //  EdgeOfCellSelection,
+// //  EdgeSelection,
+// //  FaceSelection,
+// //  VolumeSelection,
+// //  ActorSelection };
+  _selectionFilter = VERTEX_TREE;
+  MESSAGE("}");
+}
+
+void PatternDataSelectionModel::setEdgeSelection()
+{
+  MESSAGE("PatternDataSelectionModel::setEdgeSelection(){");
+  SetSelectionMode(EdgeSelection);
+  _selectionFilter = EDGE_TREE;
+  MESSAGE("}");
+}
+
+void PatternDataSelectionModel::setQuadSelection()
+{
+  MESSAGE("PatternDataSelectionModel::setQuadSelection(){");
+  SetSelectionMode(FaceSelection);
+  _selectionFilter = QUAD_TREE;
+  MESSAGE("}");
+}
+
+void PatternDataSelectionModel::setHexaSelection()
+{
+  MESSAGE("PatternDataSelectionModel::setHexaSelection(){");
+  SetSelectionMode(VolumeSelection);
+  _selectionFilter = HEXA_TREE;
+  MESSAGE("}");
+}
+
+
+void PatternDataSelectionModel::setAllSelection()
+{
+  MESSAGE("PatternDataSelectionModel::setAllSelection(){");
+  _selectionFilter = -1;
+  MESSAGE("}");
+}
+
+
+QModelIndex PatternDataSelectionModel::indexBy( int role, const QString& value )
+{
+  QModelIndex eltIndex; // element (vertex, edge, quad) of model
+  const QAbstractItemModel* theModel = model();
+  if ( !theModel ) return eltIndex;
+  QModelIndexList theIndexes = theModel->match( theModel->index(0, 0),
+                                          role,
+                                          value,
+                                          1,
+                                          Qt::MatchRecursive | Qt::MatchContains );//Qt::MatchFixedString );
+  if ( theIndexes.count()>0 )
+    eltIndex = theIndexes[0] ;
+  return eltIndex;
+}
+
+
+QModelIndex PatternDataSelectionModel::indexBy( int role, const QVariant& var )
+{
+  QModelIndex eltIndex; // element (vertex, edge, quad) of model
+  const QAbstractItemModel* theModel = model();
+  if ( !theModel ) return eltIndex;
+  QModelIndexList theIndexes = theModel->match( theModel->index(0, 0),
+                                          role,
+                                          var,
+                                          1,
+                                          Qt::MatchRecursive /*| Qt::MatchContains*/ );//Qt::MatchFixedString );
+  if ( theIndexes.count()>0 )
+    eltIndex = theIndexes[0] ;
+  return eltIndex;
+}
+
+
+void PatternDataSelectionModel::setSalomeSelectionMgr( LightApp_SelectionMgr* mgr )
+{
+  _salomeSelectionMgr = mgr;
+  connect( _salomeSelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( salomeSelectionChanged() ) );
+}
+
+
+void  PatternDataSelectionModel::SetSelectionMode(Selection_Mode theMode)
+{
+  MESSAGE("PatternDataSelectionModel::SetSelectionMode(){");
+  SVTK_ViewWindow* aVTKViewWindow = _getVTKViewWindow();
+//   aViewWindow->clearFilters();
+//   _salomeSelectionMgr->clearFilters();
+  if ( aVTKViewWindow )
+    aVTKViewWindow->SetSelectionMode( theMode );
+  MESSAGE("}");
+}
+
+
+//     A) De Salome(OCC, VTK) vers Hexablock(TreeView Data) :
+//         -Vertex:
+//             in:     selection (vertex associé OCC).
+//             out:    (vertex VTK) highlighté, (vertex TreeView) sélectionné.
+// 
+//             in :    selection (vertex associé VTK).
+//             out:    (vertex OCC) highlighté, (vertex TreeView) sélectionné.
+// 
+//         -Edge:
+//             in:     selection (edge associé OCC).
+//             out:    (vertex VTK) highlighté, (vertex TreeView) sélectionné.
+// 
+//             in:     selection (edge associé VTK).
+//             out:    (toute la ligne OCC) highlighté + vertex sur (deb,fin) , (edge TreeView) sélectionné.
+// 
+//         -Face: idem vertex
+void PatternDataSelectionModel::onCurrentChanged( const QModelIndex & current, const QModelIndex & previous )
+{
+  MESSAGE("PatternDataSelectionModel::onCurrentChanged(){");
+  MESSAGE("*  current  : " << current.data().toString().toStdString());
+  MESSAGE("*  previous : " << previous.data().toString().toStdString());
+//   _selectSalome( current, true );
+//   _selectSalome( previous, false );
+  MESSAGE("}");
+}
+
+
+
+void PatternDataSelectionModel::onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected )
+{
+  MESSAGE("PatternDataSelectionModel::onSelectionChanged(){");
+  foreach( const QModelIndex& isel, selected.indexes() ){
+    MESSAGE("*  selected : " << isel.data().toString().toStdString());
+  }
+  foreach( const QModelIndex& iunsel, deselected.indexes() ){
+    MESSAGE("*  unselected : " << iunsel.data().toString().toStdString());
+  }
+
+  _theModelSelectionChanged = true;
+  try {
+    if ( _salomeSelectionMgr == NULL ) return;
+//     if ( !_theVtkSelectionChanged and  !_theGeomSelectionChanged ) return;
+
+    _salomeSelectionMgr->clearSelected();
+    //   erasePreview(true);
+    QModelIndexList indexes = selected.indexes();
+    for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index ){
+  //     std::cout << "entry selected" << i_index->data( HEXA_ENTRY_ROLE ).toString().toStdString() << std::endl;
+      if ( !_theVtkSelectionChanged )  _selectVTK( *i_index );
+      if ( !_theGeomSelectionChanged ) _highlightGEOM( *i_index );
+    }
+    // CS_BP todo SALOMEGUI_Swig.cxx:370
+    //   indexes = deselected.indexes();
+    //   for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index )
+    //     _unselectSalome( *i_index);
+  } catch ( ... ) {
+    MESSAGE("Unknown exception was cought !!!");
+  }
+  _theModelSelectionChanged = false;
+
+  MESSAGE("}");
+}
+
+
+void PatternDataSelectionModel::salomeSelectionChanged()
+{
+  MESSAGE("PatternDataSelectionModel::salomeSelectionChanged(){");
+  try {
+    QModelIndex toSelect;
+
+    if ( _salomeSelectionMgr == NULL ) return;
+    SALOME_ListIO salomeSelected;
+  //   _salomeSelectionMgr->selectedObjects( salomeSelected, SVTK_Viewer::Type() );//salomeSelected.Extent()
+    _salomeSelectionMgr->selectedObjects( salomeSelected, NULL, false );
+    if ( salomeSelected.IsEmpty() ){
+      MESSAGE("*  salomeSelected.IsEmpty()");
+      clearSelection();
+      return;
+    }
+
+    Handle(SALOME_InteractiveObject) anIObject;
+    SALOME_ListIteratorOfListIO it(salomeSelected);
+    for( ; it.More(); it.Next()){
+      anIObject = it.Value(); //anIObject->getName()
+      toSelect = _geomSelectionChanged( anIObject );// is it comming from GEOM?
+      if ( !toSelect.isValid() ){
+        toSelect = _vtkSelectionChanged( anIObject ); ;// or VTK?...
+        if ( toSelect.isValid() )
+          MESSAGE("*  OK : selection from VTK");
+      } else {
+        MESSAGE("*  OK : selection from GEOM");
+      }
+    }
+  } catch ( ... ) {
+    MESSAGE("*  Unknown exception was cought !!!");
+  }
+  MESSAGE("}");
+}
+
+SVTK_ViewWindow* PatternDataSelectionModel::_getVTKViewWindow()
+{
+  SVTK_ViewWindow* aVtkView = HEXABLOCKGUI::currentVtkView;
+  return aVtkView;
+}
+
+
+OCCViewer_ViewWindow*  PatternDataSelectionModel::_getOCCViewWindow()
+{
+  OCCViewer_ViewWindow* aOccView = HEXABLOCKGUI::currentOccView;
+  return aOccView;
+}
+
+
+QModelIndex PatternDataSelectionModel::_indexOf( const QString& anEntry, int role )
+{
+  QModelIndex eltIndex; // element (vertex, edge, quad) of model
+  const QAbstractItemModel* theModel = model();
+  if ( !theModel ) return eltIndex;
+  QModelIndexList theIndexes = theModel->match( theModel->index(0, 0),
+                                          role,
+                                          anEntry,
+                                          1,
+                                          Qt::MatchRecursive | Qt::MatchContains );//Qt::MatchFixedString );
+  if ( theIndexes.count()>0 )
+    eltIndex = theIndexes[0] ;
+  return eltIndex;
+}
+
+
+void PatternDataSelectionModel::_setVTKSelectionMode( const QModelIndex& eltIndex, SVTK_ViewWindow* vtkViewWindow )
+{
+  MESSAGE("PatternDataSelectionModel::_setVTKSelectionMode( "<< eltIndex.data().toString().toStdString() << " ," << vtkViewWindow << " )");
+  QVariant treeVariant = eltIndex.data( HEXA_TREE_ROLE );
+  if ( !treeVariant.isValid() ) return;
+  int eltType = treeVariant.toInt();
+
+  if ( (_selectionFilter != -1) and ( _selectionFilter != eltType ) ) return;
+
+  switch ( eltType ){
+    case VERTEX_TREE :
+    case VERTEX_DIR_TREE : vtkViewWindow->SetSelectionMode(NodeSelection); MESSAGE("VERTEX"); break;
+    case EDGE_TREE :
+    case EDGE_DIR_TREE :   vtkViewWindow->SetSelectionMode(EdgeSelection); MESSAGE("EDGE");     break;
+    case QUAD_TREE :
+    case QUAD_DIR_TREE :   vtkViewWindow->SetSelectionMode(FaceSelection); MESSAGE("QUAD");     break;
+    case HEXA_TREE :
+    case HEXA_DIR_TREE :   vtkViewWindow->SetSelectionMode(VolumeSelection); MESSAGE("HEXA");   break;
+    case PROPAGATION_TREE :
+    case PROPAGATION_DIR_TREE :   vtkViewWindow->SetSelectionMode(EdgeSelection); MESSAGE("PROPAGATION");   break;
+//  CellSelection,
+//  EdgeOfCellSelection,
+//  VolumeSelection,
+//  ActorSelection
+  }
+}
+
+
+
+void PatternDataSelectionModel::highlightVTKElts( const QModelIndexList& elts )
+{
+       if (!elts.size()) return;
+
+       SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+       if ( currentVTKViewWindow == NULL ) return;
+       SVTK_Selector* selector = currentVTKViewWindow->GetSelector();
+       if ( selector == NULL ) return;
+
+       // document selection
+       Document_Actor* docActor = NULL;
+       Handle(SALOME_InteractiveObject) docIO;
+
+       // element highlight
+       TColStd_MapOfInteger aMap;
+       QList<int>::const_iterator anIter;
+       int vtkElemsId;
+
+       // data from model
+       QString docEntry;
+       QVariant docEntryVariant    = elts[0].data( HEXA_DOC_ENTRY_ROLE );
+
+       if ( !docEntryVariant.isValid() ){
+               //INFOS("data from model not valid");
+               return;
+       }
+
+       docEntry = docEntryVariant.toString();
+
+       // Select the document in Salome
+       docActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, docEntry.toLatin1() ) );
+       if ( docActor == NULL) return;
+
+       //   // Set selection mode in VTK view
+//     currentVTKViewWindow->SetSelectionMode(EdgeSelection);
+       docIO = docActor->getIO();
+
+       // Highlight in vtk view the element from document
+       QString edgeEntry;
+       foreach( const QModelIndex& iElt, elts ){
+               edgeEntry = iElt.data( HEXA_ENTRY_ROLE ).toString();
+               vtkElemsId = docActor->vtkElemsId[ edgeEntry.toInt() ];
+               if ( vtkElemsId > 0 ) aMap.Add( vtkElemsId );
+       }
+
+       selector->AddOrRemoveIndex( docIO, aMap, false );
+       currentVTKViewWindow->highlight( docIO, true, true );
+}
+
+// 1 vertex -> 1 point
+// 1 edge   -> n lines + points(deb,fin)
+// 1 quad   -> n faces
+void PatternDataSelectionModel::_highlightGEOM( const QMultiMap<QString, int>&  entrySubIDs )
+{
+  MESSAGE("PatternDataSelectionModel::_highlightGEOM( const QMultiMap<QString, int>&  entrySubIDs ){");
+
+  OCCViewer_ViewWindow*  occView = _getOCCViewWindow();
+  if ( occView == NULL ) return;
+  SOCC_Viewer* soccViewer = dynamic_cast<SOCC_Viewer*>( occView->getViewManager()->getViewModel() ); 
+  if (!soccViewer) return;
+  _PTR(Study) aStudy = GetActiveStudyDocument();
+  if (!aStudy) return;
+
+  CORBA::Object_var     aCorbaObj = CORBA::Object::_nil();
+  GEOM::GEOM_Object_var aGeomObj  = GEOM::GEOM_Object::_nil();
+  erasePreview(true);
+  foreach ( QString entry, entrySubIDs.keys() ){
+    _PTR(SObject) aSChild = aStudy->FindObjectID( entry.toStdString() );
+    MESSAGE("*    entry => "<< entry.toStdString());
+    aCorbaObj = corbaObj( aSChild );
+    aGeomObj = GEOM::GEOM_Object::_narrow( aCorbaObj );
+    if ( !CORBA::is_nil(aGeomObj) ){
+      MESSAGE("*  !CORBA::is_nil(aGeomObj)");
+      QString objIOR = GEOMBase::GetIORFromObject( aGeomObj._retn() );
+      Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape( objIOR );//, true );
+      if ( !aSh.IsNull() ){
+        MESSAGE("*  !aSh.IsNull() ");
+        TColStd_IndexedMapOfInteger anIndexes;
+        foreach ( int subid, entrySubIDs.values(entry) ){
+          if ( subid != -1 ) 
+            anIndexes.Add( subid );
+        }
+        if ( anIndexes.Extent() > 0 ){ // if it's a sub-shape
+          MESSAGE("*  a sub-shape");
+          aSh->highlightSubShapes( anIndexes, true );
+          soccViewer->Repaint();
+        } else {  // or a main shape
+//             std::cout << "aSh->getIO() => " << aSh->getIO() << std::endl;
+//           getDisplayer()->SetDisplayMode(0);
+//           soccViewer->setColor( aSh->getIO(), QColor( Qt::red ), true );
+//           soccViewer->switchRepresentation( aSh->getIO(), 2 );
+          MESSAGE("*  a main shape");
+//           globalSelection();
+          soccViewer->highlight( aSh->getIO(), true, true );
+        }
+      }
+    }
+  }
+
+  MESSAGE("}");
+}
+
+
+void PatternDataSelectionModel::_highlightGEOM( const QModelIndex & anEltIndex )
+{
+  MESSAGE("PatternDataSelectionModel::_highlightGEOM(" << anEltIndex.data().toString().toStdString() << ")");
+  // getting association(s) from model
+  QList<DocumentModel::GeomObj> assocs;
+  QMultiMap< QString, int >     assocEntrySubIDs;
+  DocumentModel               *docModel = NULL;
+  const QSortFilterProxyModel *pModel   = dynamic_cast<const QSortFilterProxyModel *>( model() );
+
+  if ( !pModel ) return;
+  docModel = dynamic_cast<DocumentModel*>( pModel->sourceModel() ); 
+  if ( !docModel ) return;
+  assocs = docModel->getAssociations( pModel->mapToSource(anEltIndex) );
+  foreach( const DocumentModel::GeomObj& anAssoc, assocs )
+    assocEntrySubIDs.insert( anAssoc.entry, anAssoc.subid.toInt() );
+
+  _highlightGEOM( assocEntrySubIDs );
+  MESSAGE("}");
+}
+
+
+
+void PatternDataSelectionModel::_selectVTK( const QModelIndex& eltIndex )
+{
+  MESSAGE("PatternDataSelectionModel::_selectVTK( "<< eltIndex.data().toString().toStdString() << ")");
+  SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+  if ( currentVTKViewWindow == NULL ) return;
+  SVTK_Selector* selector = currentVTKViewWindow->GetSelector();
+  if ( selector == NULL ) return;
+
+  // document selection
+  Document_Actor* docActor = NULL;
+  Handle(SALOME_InteractiveObject) docIO;
+  SALOME_ListIO aList;
+
+  // element highlight
+  TColStd_MapOfInteger aMap;
+  QList<int>::const_iterator anIter;
+  int vtkElemsId;
+
+  // data from model
+  QString eltEntry;
+  QString docEntry;
+  QVariant entryVariant    = eltIndex.data( HEXA_ENTRY_ROLE );
+  QVariant docEntryVariant = eltIndex.data( HEXA_DOC_ENTRY_ROLE );
+
+  if ( !entryVariant.isValid() ){
+    //INFOS("entryVariant not valid");
+    return;
+  }
+  if ( !docEntryVariant.isValid() ){
+    //INFOS("docEntryVariant not valid");
+    return;
+  }
+
+  eltEntry = entryVariant.toString();
+  docEntry = docEntryVariant.toString();
+
+  // Select the document in Salome
+  docActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, docEntry.toLatin1() ) );
+  if ( docActor == NULL ) return;
+
+  // Set selection mode in VTK view
+  _setVTKSelectionMode( eltIndex, currentVTKViewWindow );
+
+// if ( _salomeSelectionMgr == NULL ) return;
+//   _salomeSelectionMgr->selectedObjects( aList );
+//   std::cout<<"aList.Extent() => " << aList.Extent() << std::endl;
+//   aList.Append(docIO);
+//   _salomeSelectionMgr->setSelectedObjects( aList, true );//false );//true ); //CS_BP false?
+  docIO = docActor->getIO();
+  // Highlight in vtk view the element from document 
+  vtkElemsId = docActor->vtkElemsId[ eltEntry.toInt() ];// get vtk ids from actor
+  if ( vtkElemsId > 0 ) // CS_BP ?: erreur si 1er elt == vertex (0,0,0)
+    aMap.Add( vtkElemsId );
+//     for (anIter = theIds.begin(); anIter != theIds.end(); ++anIter) {
+//       aMap.Add(*anIter);
+//     }
+  selector->AddOrRemoveIndex( docIO, aMap, false );
+  currentVTKViewWindow->highlight( docIO, true, true );
+
+  MESSAGE("}");
+}
+
+QModelIndex PatternDataSelectionModel::_geomSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject )
+{
+  MESSAGE("PatternDataSelectionModel::_geomSelectionChanged(){");
+  QModelIndex eltIndex;// the element of the model which is associated to the geom object and that is to be selected
+
+  bool fromGEOM = ( strcmp("GEOM", anIObject->getComponentDataType()) == 0 );
+  if ( !fromGEOM ) return eltIndex;
+  if (!_salomeSelectionMgr) return eltIndex;
+
+  QString aName;
+  GEOM::GEOM_Object_var aGeomObj = GEOMBase::ConvertIOinGEOMObject( anIObject );
+
+  int anIndex = -1;
+  if ( GEOMBase::IsShape(aGeomObj) ){
+    aName = GEOMBase::GetName(aGeomObj);
+    TColStd_IndexedMapOfInteger anIndexes;
+    _salomeSelectionMgr->GetIndexes(anIObject, anIndexes);
+    if ( anIndexes.Extent() == 1 )
+      anIndex = anIndexes(1);
+      QString aGeomObjStudyEntry = aGeomObj->GetStudyEntry();
+      QString aGeomObjModelEntry = aGeomObjStudyEntry + "," + QString::number(anIndex) + ";";
+      eltIndex = _indexOf( aGeomObjModelEntry, HEXA_ASSOC_ENTRY_ROLE );
+      if ( !_theModelSelectionChanged && eltIndex.isValid() ){ // select in model
+        _theGeomSelectionChanged = true;
+        //       select( newIndex, QItemSelectionModel::ClearAndSelect );
+        //       select( newIndex, QItemSelectionModel::SelectCurrent );
+//         setCurrentIndex( eltIndex, QItemSelectionModel::SelectCurrent );
+        setCurrentIndex( eltIndex, QItemSelectionModel::Clear );  //CS_TEST
+        setCurrentIndex( eltIndex, QItemSelectionModel::SelectCurrent );
+        _theGeomSelectionChanged = false;
+
+      } else {
+        clearSelection();
+      }
+    }
+
+  MESSAGE("}");
+  return eltIndex;
+}
+
+QModelIndex PatternDataSelectionModel::_vtkSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject )
+{
+  MESSAGE("PatternDataSelectionModel::_vtkSelectionChanged(){");
+  QModelIndex anIOIndex;// // the element of the model which is associated to the Interactive object and that is to be selected
+
+  bool fromVTK  = ( strcmp("HEXABLOCK", anIObject->getComponentDataType()) == 0 );
+  if ( !fromVTK ) return anIOIndex;
+  SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+  if ( !currentVTKViewWindow )  return anIOIndex;
+  if ( !anIObject->hasEntry() ) return anIOIndex;
+  
+  QString anIOEntry = anIObject->getEntry();
+  Document_Actor *anDocActor = NULL;
+  int anhexaElemsId;
+
+  QString aText = "";
+  if ( GetNameOfSelectedElements( currentVTKViewWindow, anIObject, aText ) <= 0 ) return anIOIndex;
+  anDocActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, anIOEntry.toLatin1() ) );
+  if ( !anDocActor ) return anIOIndex;
+  anhexaElemsId = anDocActor->hexaElemsId[ aText.toInt() ];
+  anIOEntry = QString::number( anhexaElemsId );
+  anIOIndex = _indexOf( anIOEntry, HEXA_ENTRY_ROLE );
+
+  if ( !_theModelSelectionChanged && anIOIndex.isValid() ){ // select in model
+    _theVtkSelectionChanged = true;
+//     select( anIOIndex, QItemSelectionModel::Clear );
+//     select( anIOIndex, QItemSelectionModel::Select );
+//     select( anIOIndex, QItemSelectionModel::ClearAndSelect );
+//     select( anIOIndex, QItemSelectionModel::SelectCurrent );
+//     setCurrentIndex( anIOIndex, QItemSelectionModel::SelectCurrent );
+//     setCurrentIndex( anIOIndex, QItemSelectionModel::SelectCurrent );
+//     setCurrentIndex( anIOIndex, QItemSelectionModel::ClearAndSelect );
+//     setCurrentIndex( anIOIndex, QItemSelectionModel::ClearAndSelect );
+    setCurrentIndex( anIOIndex, QItemSelectionModel::Clear );
+    setCurrentIndex( anIOIndex, QItemSelectionModel::SelectCurrent );
+    _theVtkSelectionChanged = false;
+  } else {
+    clearSelection();
+  }
+
+//  if (anIOIndex.isValid())
+//       _selectVTK(anIOIndex);
+
+  if (anIOIndex.isValid())
+  {
+         QModelIndexList l;
+         l << anIOIndex;
+         highlightVTKElts(l);
+  }
+
+  MESSAGE("}");
+  return anIOIndex;
+}
+
+
+
+
+
+
+
+GroupsSelectionModel::GroupsSelectionModel( QAbstractItemModel * model ):
+QItemSelectionModel( model )
+{
+  connect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+           this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  connect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+           this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+}
+
+
+GroupsSelectionModel::~GroupsSelectionModel()
+{
+  disconnect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+          this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  disconnect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+}
+
+
+
+
+QModelIndex GroupsSelectionModel::indexBy( int role, const QVariant& var )
+{
+  QModelIndex eltIndex; // element (vertex, edge, quad) of model
+  const QAbstractItemModel* theModel = model();
+  if ( !theModel ) return eltIndex;
+  QModelIndexList theIndexes = theModel->match( theModel->index(0, 0),
+                                          role,
+                                          var,
+                                          1,
+                                          Qt::MatchRecursive /*| Qt::MatchContains*/ );//Qt::MatchFixedString );
+  if ( theIndexes.count()>0 )
+    eltIndex = theIndexes[0] ;
+  return eltIndex;
+}
+
+
+SVTK_ViewWindow* GroupsSelectionModel::_getVTKViewWindow()
+{
+  SVTK_ViewWindow* aVtkView = HEXABLOCKGUI::currentVtkView;
+  return aVtkView;
+}
+
+
+void GroupsSelectionModel::_highlightGroups( const QModelIndex& eltIndex )
+{
+  const GroupsModel* m = dynamic_cast<const GroupsModel *>( model() );
+  
+// ---- VTK ----
+  if ( m == NULL ) return;
+  SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+  if ( currentVTKViewWindow == NULL ) return;
+  SVTK_Selector* selector = currentVTKViewWindow->GetSelector();
+  if ( selector == NULL ) return;
+
+// ----  vtkActor
+  // document selection
+  Document_Actor* docActor = NULL;
+  Handle(SALOME_InteractiveObject) docIO;
+  SALOME_ListIO aList;
+
+  // element highlight
+  TColStd_MapOfInteger aMap;
+  QList<int>::const_iterator anIter;
+  int vtkElemsId;
+
+
+  
+  // debut ** data from model
+  int     eltType;
+  QString docEntry;
+
+  QVariant treeVariant        = eltIndex.data( HEXA_TREE_ROLE );
+  QVariant docEntryVariant    = eltIndex.data( HEXA_DOC_ENTRY_ROLE );
+
+  if ( !treeVariant.isValid() || !docEntryVariant.isValid() ){ 
+    //INFOS("data from model not valid");
+    return;
+  }
+
+  eltType  = treeVariant.toInt();
+  docEntry = docEntryVariant.toString();
+
+  if ( eltType != GROUP_TREE ){
+    //INFOS("bad element type : not a group item" << eltType );
+    return;
+  }
+  // fin ** data from model
+
+  // Select the document in Salome
+  docActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, docEntry.toLatin1() ) );
+  if ( docActor == NULL) return;
+  docIO = docActor->getIO();
+
+  // Highlight in vtk view the element from document
+  DocumentModel::Group kind;
+  QModelIndexList iElements = m->getGroupElements( eltIndex, kind );
+
+  // Set selection mode in VTK view
+  switch (kind){
+  case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: currentVTKViewWindow->SetSelectionMode(VolumeSelection); break;
+  case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: currentVTKViewWindow->SetSelectionMode(FaceSelection);   break;
+  case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: currentVTKViewWindow->SetSelectionMode(EdgeSelection);   break;
+  case HEXA_NS::VertexNode: currentVTKViewWindow->SetSelectionMode(NodeSelection); break;
+  }
+
+  QString eltEntry;
+  foreach( const QModelIndex& iElt, iElements ){
+    eltEntry = iElt.data( HEXA_ENTRY_ROLE ).toString();
+    vtkElemsId = docActor->vtkElemsId[ eltEntry.toInt() ];
+    if ( vtkElemsId > 0 ) aMap.Add( vtkElemsId );
+  }
+
+  selector->AddOrRemoveIndex( docIO, aMap, false );
+  currentVTKViewWindow->highlight( docIO, true, true );
+
+}
+
+/*
+void GroupsSelectionModel::_highlightAssoc( const QModelIndex& eltIndex )
+{
+  const GroupsModel* m = dynamic_cast<const GroupsModel *>( model() );
+  
+// ---- VTK ----
+  if ( m == NULL ) return;
+  SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+  if ( currentVTKViewWindow == NULL ) return;
+  SVTK_Selector* selector = currentVTKViewWindow->GetSelector();
+  if ( selector == NULL ) return;
+
+// ----  vtkActor
+  // document selection
+  Document_Actor* docActor = NULL;
+  Handle(SALOME_InteractiveObject) docIO;
+  SALOME_ListIO aList;
+
+  // element highlight
+  TColStd_MapOfInteger aMap;
+  QList<int>::const_iterator anIter;
+  int vtkElemsId;
+
+
+  
+  // debut ** data from model
+  int     eltType;
+  QString docEntry;
+
+  QVariant treeVariant        = eltIndex.data( HEXA_TREE_ROLE );
+  QVariant docEntryVariant    = eltIndex.data( HEXA_DOC_ENTRY_ROLE );
+
+  if ( !treeVariant.isValid() || !docEntryVariant.isValid() ){ 
+    //INFOS("data from model not valid");
+    return;
+  }
+
+  eltType  = treeVariant.toInt();
+  docEntry = docEntryVariant.toString();
+ ){
+    //INFOS("bad element typ
+  if ( eltType != GROUP_TREE ){
+    //INFOS("bad element type : not a group item" << eltType );
+    return;
+  }
+  // fin ** data from model
+
+  // Select the document in Salome
+  docActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, docEntry.toLatin1() ) );
+  if ( docActor == NULL) return;
+  docIO = docActor->getIO();
+
+  // Highlight in vtk view the element from document
+  DocumentModel::Group kind;
+  QModelIndexList iElements = m->getGroupElements( eltIndex, kind );
+
+  // Set selection mode in VTK view
+/*
+  switch (kind){
+  case HEXA_NS::HexaCell: case HEXA_NS::HexaNode: currentVTKViewWindow->SetSelectionMode(VolumeSelection); break;
+  case HEXA_NS::QuadCell: case HEXA_NS::QuadNode: currentVTKViewWindow->SetSelectionMode(FaceSelection);   break;
+  case HEXA_NS::EdgeCell: case HEXA_NS::EdgeNode: currentVTKViewWindow->SetSelectionMode(EdgeSelection);   break;
+  case HEXA_NS::VertexNode: currentVTKViewWindow->SetSelectionMode(NodeSelection); break;
+  }---/
+
+  QString eltEntry;
+  foreach( const QModelIndex& iElt, iElements ){
+    eltEntry = iElt.data( HEXA_ENTRY_ROLE ).toString();
+    vtkElemsId = docActor->vtkElemsId[ eltEntry.toInt() ];
+    if() 
+      if ( vtkElemsId > 0 ) aMap.Add( vtkElemsId );
+  }
+
+  selector->AddOrRemoveIndex( docIO, aMap, false );
+  currentVTKViewWindow->highlight( docIO, true, true );
+
+}*/
+
+
+
+void GroupsSelectionModel::onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected )
+{
+  MESSAGE("GroupsSelectionModel::onSelectionChanged");
+  try {
+    //     if ( _salomeSelectionMgr == NULL ) return;
+    //     _salomeSelectionMgr->clearSelected();
+    //   erasePreview(true);
+    QModelIndexList indexes = selected.indexes();
+    for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index ){
+      MESSAGE( "entry selected" << i_index->data( HEXA_ENTRY_ROLE ).toString().toStdString() );
+      _highlightGroups( *i_index );
+    }
+
+    // CS_BP todo SALOMEGUI_Swig.cxx:370
+    //   indexes = deselected.indexes();
+    //   for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index )
+    //     _unselectSalome( *i_index);
+  } catch ( ... ) {
+    MESSAGE("Unknown exception was cought !!!");
+  }
+
+}
+
+
+
+
+
+
+
+MeshSelectionModel::MeshSelectionModel( QAbstractItemModel * model ):
+QItemSelectionModel( model )
+{
+  connect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+           this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  connect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+           this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+}
+
+
+MeshSelectionModel::~MeshSelectionModel()
+{
+  disconnect( this, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
+          this, SLOT( onCurrentChanged( const QModelIndex & , const QModelIndex & ) ) );
+  disconnect( this, SIGNAL( selectionChanged( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT( onSelectionChanged( const QItemSelection & , const QItemSelection & ) ) );
+}
+
+
+QModelIndex MeshSelectionModel::indexBy( int role, const QVariant& var )
+{
+  QModelIndex eltIndex; // element (vertex, edge, quad) of model
+  const QAbstractItemModel* theModel = model();
+  if ( !theModel ) return eltIndex;
+  QModelIndexList theIndexes = theModel->match( theModel->index(0, 0),
+                                          role,
+                                          var,
+                                          1,
+                                          Qt::MatchRecursive /*| Qt::MatchContains*/ );//Qt::MatchFixedString );
+  if ( theIndexes.count()>0 )
+    eltIndex = theIndexes[0] ;
+  return eltIndex;
+}
+
+
+
+SVTK_ViewWindow* MeshSelectionModel::_getVTKViewWindow()
+{
+  SVTK_ViewWindow* aVtkView = HEXABLOCKGUI::currentVtkView;
+  return aVtkView;
+}
+
+
+void MeshSelectionModel::_highlightPropagation( const QModelIndex& eltIndex )
+{
+  const MeshModel* m = dynamic_cast<const MeshModel *>( model() );
+  if ( m == NULL ) return;
+  SVTK_ViewWindow* currentVTKViewWindow = _getVTKViewWindow();
+  if ( currentVTKViewWindow == NULL ) return;
+  SVTK_Selector* selector = currentVTKViewWindow->GetSelector();
+  if ( selector == NULL ) return;
+
+  // document selection
+  Document_Actor* docActor = NULL;
+  Handle(SALOME_InteractiveObject) docIO;
+  SALOME_ListIO aList;
+
+  // element highlight
+  TColStd_MapOfInteger aMap;
+  QList<int>::const_iterator anIter;
+  int vtkElemsId;
+
+  // data from model
+  int     eltType;
+  QString docEntry;
+
+  QVariant treeVariant        = eltIndex.data( HEXA_TREE_ROLE );
+  QVariant docEntryVariant    = eltIndex.data( HEXA_DOC_ENTRY_ROLE );
+
+  if ( !treeVariant.isValid() || !docEntryVariant.isValid() ){ 
+    //INFOS("data from model not valid");
+    return;
+  }
+
+  eltType  = treeVariant.toInt();
+  docEntry = docEntryVariant.toString();
+
+  if ( eltType != PROPAGATION_TREE ){
+    //INFOS("bad element type : not a propagation item" << eltType );
+    return;
+  }
+
+  // Select the document in Salome
+  docActor = dynamic_cast<Document_Actor*>( findActorByEntry( currentVTKViewWindow, docEntry.toLatin1() ) );
+  if ( docActor == NULL) return;
+
+//   // Set selection mode in VTK view
+  currentVTKViewWindow->SetSelectionMode(EdgeSelection); 
+  docIO = docActor->getIO();
+  // Highlight in vtk view the element from document 
+  QModelIndexList iEdges = m->getPropagation( eltIndex );
+
+  QString edgeEntry;
+  foreach( const QModelIndex& iEdge, iEdges ){
+    edgeEntry = iEdge.data( HEXA_ENTRY_ROLE ).toString();
+    vtkElemsId = docActor->vtkElemsId[ edgeEntry.toInt() ];
+    if ( vtkElemsId > 0 ) aMap.Add( vtkElemsId );
+  }
+
+  selector->AddOrRemoveIndex( docIO, aMap, false );
+  currentVTKViewWindow->highlight( docIO, true, true );
+}
+
+
+
+void MeshSelectionModel::onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected )
+{
+  MESSAGE("MeshSelectionModel::onSelectionChanged");
+  try {
+    //     if ( _salomeSelectionMgr == NULL ) return;
+    //     _salomeSelectionMgr->clearSelected();
+    //   erasePreview(true);
+    QModelIndexList indexes = selected.indexes();
+    for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index ){
+      MESSAGE( "entry selected" << i_index->data( HEXA_ENTRY_ROLE ).toString().toStdString() );
+      _highlightPropagation( *i_index );
+    }
+
+    // CS_BP todo SALOMEGUI_Swig.cxx:370
+    //   indexes = deselected.indexes();
+    //   for( QModelIndexList::const_iterator i_index = indexes.begin(); i_index != indexes.end(); ++i_index )
+    //     _unselectSalome( *i_index);
+  } catch ( ... ) {
+    MESSAGE("Unknown exception was cought !!!");
+  }
+
+}
+
+
+
+
+// //=================================================================================
+// // function : activateSelection
+// // purpose  : Activate selection in accordance with myEditCurrentArgument
+// //=================================================================================
+// void PatternDataSelectionModel::activateSelection()
+// {
+//   erasePreview(false);
+// 
+//   // local selection
+//   if (!myObject->_is_nil() && !isAllSubShapes())
+//   {
+//     GEOM_Displayer* aDisplayer = getDisplayer();
+//     SALOME_View* view = GEOM_Displayer::GetActiveView();
+//     if (view) {
+//       CORBA::String_var aMainEntry = myObject->GetStudyEntry();
+//       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
+//       if (view->isVisible(io)) {
+//         aDisplayer->Erase(myObject, false, false);
+//         myIsHiddenMain = true;
+//       }
+//     }
+// 
+//     int prevDisplayMode = aDisplayer->SetDisplayMode(0);
+// 
+//     SUIT_ViewWindow* aViewWindow = 0;
+//     SUIT_Study* activeStudy = SUIT_Session::session()->activeApplication()->activeStudy();
+//     if (activeStudy)
+//       aViewWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+//     if (aViewWindow == 0) return;
+// 
+//     SUIT_ViewManager* aViewManager = aViewWindow->getViewManager();
+//     if (aViewManager->getType() != OCCViewer_Viewer::Type() &&
+//         aViewManager->getType() != SVTK_Viewer::Type())
+//       return;
+// 
+//     SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
+//     SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
+//     if (aView == 0) return;
+// 
+//     //TopoDS_Shape aMainShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myObject);
+// 
+//     TopTools_IndexedMapOfShape aSubShapesMap;
+//     TopExp::MapShapes(myShape, aSubShapesMap);
+//     CORBA::String_var aMainEntry = myObject->GetStudyEntry();
+//     QString anEntryBase = aMainEntry.in();
+// 
+//     TopExp_Explorer anExp (myShape, (TopAbs_ShapeEnum)shapeType());
+//     for (; anExp.More(); anExp.Next())
+//     {
+//       TopoDS_Shape aSubShape = anExp.Current();
+//       int index = aSubShapesMap.FindIndex(aSubShape);
+//       QString anEntry = anEntryBase + QString("_%1").arg(index);
+// 
+//       SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
+//       if (aPrs) {
+//         displayPreview(aPrs, true, false); // append, do not update
+//       }
+//     }
+//     aDisplayer->UpdateViewer();
+//     aDisplayer->SetDisplayMode(prevDisplayMode);
+//   }
+// 
+//   globalSelection(GEOM_ALLSHAPES);
+// }
+
+
+
+
+// SUIT_DataOwnerPtrList aList;
+//   ObjectList::iterator anIter;
+//   for ( anIter = objects.begin(); anIter != objects.end(); ++anIter )
+//   {
+//     QString anEntry = getEntry( *anIter );
+//     LightApp_DataOwner* anOwher = new LightApp_DataOwner( anEntry );
+//     aList.append( anOwher );
+//   }
+// 
+//   SUIT_Session* session = SUIT_Session::session();
+//   SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
+//   if ( !app )
+//     return false;
+// 
+//   LightApp_SelectionMgr* aMgr = app->selectionMgr();
+//   if ( !aMgr )
+//     return false;
+// _getVTKViewWindow()
+//   aMgr->setSelecte_getVTKViewWindow()d( aList, false );
+
+
+
+
+
+//   SMESH_Actor* anActor = SMESH::FindActorByObject(myMesh);
+//   if (!anActor || !anActor->hasIO())
+//     return;
+// 
+//   Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
+//   //mySelectionMgr->clearSelected();
+//   //mySelectionMgr->AddIObject(anIO, false);
+//   SALOME_ListIO aList;
+//   aList.Append(anIO);
+//   mySelectionMgr->setSelectedObjects(aList, false);
+// 
+//   // Remove filter corresponding to the current type from viewer
+//   int aType = myTable->GetType();
+//   int aFilterId = SMESH::UnknownFilter;
+//   if      (aType == SMESH::EDGE  ) aFilterId = SMESH::EdgeFilter;
+//   else if (aType == SMESH::FACE  ) aFilterId = SMESH::FaceFilter;
+//   else if (aType == SMESH::VOLUME) aFilterId = SMESH::VolumeFilter;
+//   Handle(VTKViewer_Filter) aFilter = SMESH::GetFilter(aFilterId);
+//   SMESH::RemoveFilter(aFilterId);
+// 
+//   // get vtk ids
+//   TColStd_MapOfInteger aMap;
+//   QList<int>::const_iterator anIter;
+//   for (anIter = theIds.begin(); anIter != theIds.end(); ++anIter) {
+//     aMap.Add(*anIter);
+//   }
+// 
+//   // Set new selection
+//   activeViewWindow->AddOrRemoveIndex(anIO, aMap, false);
+//   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+//     aViewWindow->highlight( anIO, true, true );
+// 
+//   // insert previously stored filter in viewer if necessary
+//   if (!aFilter.IsNull())
+//     SMESH::SetFilter(aFilter);
+
+
+
+
+
+
+
+
+
+//     //CS_TEST
+//  if(SVTK_Selector* aSelector = aView->GetSelector()){
+//             const SALOME_ListIO& aListIO = aSelector->StoredIObjects();
+//             SALOME_ListIteratorOfListIO anIter(aListIO);
+//             for(; anIter.More(); anIter.Next()){
+//               Handle(SALOME_InteractiveObject) anIO = anIter.Value();
+//     _PTR(Study) aStudy  = HEXABLOCKGUI::activeStudy()->studyDS();
+//     _PTR(SObject) aSObj = aStudy->FindObjectID( anEntry.toStdString().c_str() );
+//     LightApp_DataObject*      o = HEXABLOCKGUI::activeStudy()->findObjectByEntry(anEntry.toStdString().c_str());
+//     //CS_TEST
+
+
+
+
+
+// void PatternDataSelectionModel::test()
+// {
+//   if (myBusy) return;
+//   myMeshActor = 0;
+// 
+//   SALOME_ListIO aList;
+//   mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+// 
+//   if (aList.Extent() == 1) {
+//     Handle(SALOME_InteractiveObject) anIO = aList.First();
+//     myMeshActor = SMESH::FindActorByEntry(anIO->getEntry());
+//     if(myMeshActor){
+//       QString aText;
+//       if (SMESH::GetNameOfSelectedNodes(activeViewWindow,anIO,aText) == 1) {
+//         if(SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh()) {
+//           if(const SMDS_MeshNode* aNode = aMesh->FindNode(aText.toInt())) {
+//             myBusy = true;
+//             myId->setText(aText);
+//             myX->SetValue(aNode->X());
+//             myY->SetValue(aNode->Y());
+//             myZ->SetValue(aNode->Z());
+//             myBusy = false;
+//             erasePreview(); // avoid overlapping of a selection and a preview
+//             updateButtons();
+//             return;
+//           }
+//         }
+//       }
+//     }
+//   }
+// 
+//   reset();
+// }
+
+
+/*
+
+void PatternDataSelectionModel::setGeomEngine( GEOM::GEOM_Gen_var geomEngine )
+{gaumont parnasse
+  _geomEngine = geomEngine;
+}
+
+GEOM::GEOM_IOperations_ptr PatternDataSelectionModel::createOperation()
+{
+//   return myGeomGUI->GetGeomGen()->GetIBasicOperations(getStudyId());
+  return _geomEngine->GetIBasicOperations(getStudyId());
+}
+
+bool PatternDataSelectionModel::execute(ObjectList& objects)
+{
+  bool res = false;
+
+  _PTR(Study)   aStudy = GetActiveStudyDocument();
+  _PTR(SObject) aSChild;
+  CORBA::Object_var aCorbaObj = CORBA::Object::_nil();
+  GEOM::GEOM_Object_var assoc;
+
+  foreach( const DocumentModel::GeomObj& anAssoc, _assocList ){
+    std::cout << "FOUND=> " << anAssoc.entry.toStdString() << std::endl;
+    aSChild = aStudy->FindObjectID( anAssoc.entry.toStdString() );
+    aCorbaObj = corbaObj(aSChild);
+    assoc = GEOM::GEOM_Object::_narrow(aCorbaObj);
+
+    if ( !CORBA::is_nil(assoc) ){
+      std::cout << "geom to highlight =>" << anAssoc.name.toStdString() << std::endl;
+      objects.push_back( assoc._retn() );
+      res = true;
+    } else {
+      std::cout << "not a geom =>" << anAssoc.name.toStdString()<< std::endl;
+    }
+  }
+
+  return res;
+}
+*/
+
+
+// SVTK_ViewWindow* PatternDataSelectionModel::GetViewWindow()
+// {
+//     SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+//         (SUIT_Session::session()->activeApplication());
+//     if (anApp) {
+//       if (SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(anApp->desktop()->activeWindow()))
+//         return aView;
+// 
+// //       SUIT_ViewManager* aViewManager =
+// //         anApp->getViewManager(SVTK_Viewer::Type(), createIfNotFound);
+// //       if (aViewManager) {
+// //         if (SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView()) {
+// //           if (SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
+// //             aViewWindow->raise();
+// //             aViewWindow->setFocus();
+// //             return aView;
+// //           }
+// //         }
+// //       }
+//     }
+//     return NULL;
+// }
+
+
+
+
+// void  PatternDataSelectionModel::SetSelectionMode(Selection_Mode theMode)
+// {
+// 
+//   QList<SUIT_Selector*> aSelectors;
+//   _salomeSelectionMgr->selectors( SVTK_Viewer::Type(), aSelectors );
+//   QListIterator<SUIT_Selector*> it( aSelectors );
+//   
+//   std::cout << "PatternDataSelectionModel::SetSelectionMode()" << std::endl;
+//   while ( it.hasNext() )
+//   {
+//   //   SUIT_Selector* selector = it.next();
+//     SVTK_Selector* selector = dynamic_cast<SVTK_Selector*>( it.next() );
+//     if ( selector ){
+//       std::cout << "PatternDataSelectionModel::SetSelectionMode()" << theMode << std::endl;
+//       selector->SetSelectionMode(theMode);
+//     }
+//   }
+// }
+
+// LightApp_SelectionMgr* PatternDataSelectionModel::selectionMgr()
+// {
+//   SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+//   if( anApp )
+//     return dynamic_cast<LightApp_SelectionMgr*>( anApp->selectionMgr() );
+//   else
+//     return 0;
+// }
+
+// //CS_TEST
+// SUIT_DataOwnerPtrList aOList;
+// LightApp_DataOwner* anOwher = new LightApp_DataOwner( "0:1:1:1:2" );
+// aOList.append( anOwher );
+// _salomeSelectionMgr->setSelected( aOList, false );
+// //CS_TEST
+
+// void PatternDataSelectionModel::_highlightGEOM( const QModelIndex & anEltIndex )
+// {
+//   std::cout << "PatternDataSelectionModel::_highlightGEOM go find ASSOCIATION for"<< anEltIndex.data().toString().toStdString()<<std::endl;
+// // HEXABLOCKGUI::currentVtkView
+// 
+//   QList<DocumentModel::GeomObj> assocList;
+// 
+//   DocumentModel               *docModel = NULL;
+//   const QSortFilterProxyModel *pModel   = NULL;
+// //   const QStandardItemModel    *smodel
+// //   const QAbstractItemModel    *theModel = NULL;
+// 
+//   pModel = dynamic_cast<const QSortFilterProxyModel *>( model() );
+// 
+//   std::cout << "pModel "<< pModel << std::endl;
+//   if ( pModel ){
+//     std::cout << "if ( pModel ){"<< std::endl;
+//     docModel = dynamic_cast<DocumentModel*>( pModel->sourceModel() ); 
+//     if ( docModel ){
+//       std::cout << "if ( docModel ){"<< std::endl;
+//       assocList = docModel->getAssociations( pModel->mapToSource(anEltIndex) );
+//     }
+//   }
+// 
+// 
+//   _PTR(Study)   aStudy = GetActiveStudyDocument();
+//   _PTR(SObject) aSChild;
+//   CORBA::Object_var aCorbaObj = CORBA::Object::_nil();
+//   GEOM::GEOM_Object_var assoc;
+// //   foreach( const QString& entry, geomEntries ){
+// // struct GeomObj
+// //         {
+// //           QString name;
+// //           QString entry;
+// //           QString brep;
+// //           double  start;
+// //           double  end;
+// //         };
+// 
+//   QVariant treeVariant = pModel->mapToSource(anEltIndex).data( HEXA_TREE_ROLE );
+//   int eltType;
+//   if ( !treeVariant.isValid() ) return;
+//   eltType = treeVariant.toInt();
+// 
+// //   GEOM::GeomObjPtr
+// //   GEOM::GEOM_Object_ptr firstLine;  //firstLine.nullify();//
+//   GEOM::GEOM_Object_var firstLine = GEOM::GEOM_Object::_nil();  //GEOM::GeomObjPtr
+//   GEOM::GEOM_Object_var lastLine  = GEOM::GEOM_Object::_nil();
+//   double firstParameter = 0.2; //CS_TODO
+//   double lastParameter  = 0.4; //CS_TODO
+// 
+//   foreach( const DocumentModel::GeomObj& anAssoc, assocList ){
+//     std::cout << "FOUND=> " << anAssoc.entry.toStdString() << std::endl;
+//     aSChild = aStudy->FindObjectID( anAssoc.entry.toStdString() );
+//     aCorbaObj = corbaObj(aSChild);
+//     assoc = GEOM::GEOM_Object::_narrow(aCorbaObj);
+// 
+//     if ( !CORBA::is_nil(assoc) ){
+//       std::cout << "geom to highlight =>" << anAssoc.name.toStdString() << std::endl;
+// //       objects.push_back(assoc._retn());
+// //       if ( eltType == EDGE_TREE ){
+// //           if ( CORBA::is_nil(firstLine) ){
+// //             firstLine = GEOM::GEOM_Object::_duplicate( assoc._retn() );
+// //           }
+// //           lastLine = GEOM::GEOM_Object::_duplicate( assoc._retn() );
+// //       }
+//       displayPreview( assoc._retn(),
+//                       true, //false, //append,
+//                       false,//true, //false, //activate,
+//                       false,//true,//update,
+//                       4,//lineWidth,
+//                       1,//-1,//displayMode,
+//                       Quantity_NOC_RED );
+//     } else {
+//       std::cout << "not a geom =>" << anAssoc.name.toStdString()<< std::endl;
+//     }
+//   }
+// //     std::cout << "CORBA::is_nil(firstLine) =>" << CORBA::is_nil(firstLine) << std::endl;
+// //     std::cout << "CORBA::is_nil(lastLine) =>"  << CORBA::is_nil(lastLine) << std::endl;
+// //     std::cout << "test" << ( !( CORBA::is_nil(firstLine) and !CORBA::is_nil(lastLine) ) ) << std::endl;
+//  /*
+//   if ( !( CORBA::is_nil(firstLine) and !CORBA::is_nil(lastLine) ) ){
+//     GEOM::GEOM_IBasicOperations_var anOper = _geomEngine->GetIBasicOperations( getStudyId() );
+//     GEOM::GEOM_Object_var firstPoint = anOper->MakePointOnCurve( firstLine, firstParameter );
+//     GEOM::GEOM_Object_var lastPoint  = anOper->MakePointOnCurve( lastLine, lastParameter );
+// 
+// //     std::cout << "firstPoint->_is_nil() =>" << firstPoint->_is_nil() << std::endl;
+//     std::cout << "lastPoint->_is_nil() =>"  << lastPoint->_is_nil() << std::endl;
+//     if ( !( CORBA::is_nil(firstPoint) ) )// !firstPoint->_is_nil() )
+//         displayPreview( firstPoint._retn(), true );
+//     if ( !( CORBA::is_nil(lastPoint) ) )//if ( !lastPoint->_is_nil() )
+//         displayPreview( lastPoint._retn(), true );
+//   }*/
+// }
+// 
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx
new file mode 100755 (executable)
index 0000000..4301931
--- /dev/null
@@ -0,0 +1,159 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_DOCUMENTSELECTIONMODEL_HXX_
+#define _HEXABLOCKGUI_DOCUMENTSELECTIONMODEL_HXX_
+
+#include <QItemSelectionModel>
+
+#include <LightApp_SelectionMgr.h>
+
+#include <SVTK_ViewWindow.h>
+#include <SVTK_Selector.h>
+
+// #include <SOCC_ViewModel.h>
+// #include <SOCC_ViewWindow.h>
+// #include <OCCViewer_ViewWindow.h>
+
+#include "MyGEOMBase_Helper.hxx"
+
+#include "klinkitemselectionmodel.hxx"
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+
+
+class OCCViewer_ViewWindow;
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+
+    class PatternBuilderSelectionModel: public KLinkItemSelectionModel
+    {
+      public:
+        PatternBuilderSelectionModel( QAbstractItemModel *model, 
+                                      QItemSelectionModel *proxySelector, QObject *parent = 0 ):
+        KLinkItemSelectionModel( model, proxySelector, parent )
+        {
+        }
+    };
+
+    class PatternDataSelectionModel : public QItemSelectionModel,
+                                      public MyGEOMBase_Helper
+    {
+      Q_OBJECT
+
+      public:
+        PatternDataSelectionModel( QAbstractItemModel * model );
+        virtual ~PatternDataSelectionModel();
+
+        void setVertexSelection();
+        void setEdgeSelection();
+        void setQuadSelection();
+        void setHexaSelection();
+        void setAllSelection();
+        void highlightVTKElts( const QModelIndexList& elts );
+
+        // 
+        QModelIndex  indexBy( int role, const QString&  value );
+        QModelIndex  indexBy( int role, const QVariant& var );
+
+        //Salome
+        void setSalomeSelectionMgr( LightApp_SelectionMgr* mgr );
+        void SetSelectionMode( Selection_Mode theMode );
+
+      protected slots:
+        void onCurrentChanged( const QModelIndex & current, const QModelIndex & previous );
+        void onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
+        void salomeSelectionChanged(); // Salome to Qt
+
+      private:
+        SVTK_ViewWindow*       _getVTKViewWindow();
+        OCCViewer_ViewWindow*  _getOCCViewWindow();
+
+        QModelIndex _indexOf( const QString& anIOEntry, int role );
+        void _setVTKSelectionMode( const QModelIndex& eltIndex, SVTK_ViewWindow* vtkViewWindow );
+        void _highlightGEOM( const QMultiMap<QString, int>&  entrySubIDs );
+        void _highlightGEOM( const QModelIndex & index );
+        void _selectVTK( const QModelIndex & index );
+
+        QModelIndex _geomSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject );
+        QModelIndex _vtkSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject );
+
+        LightApp_SelectionMgr* _salomeSelectionMgr;
+        int                    _selectionFilter;
+
+        bool _theModelSelectionChanged;
+        bool _theVtkSelectionChanged;
+        bool _theGeomSelectionChanged;
+
+    };
+
+
+
+    class GroupsSelectionModel : public QItemSelectionModel
+    {
+      Q_OBJECT
+
+      public:
+        GroupsSelectionModel( QAbstractItemModel * model );
+        virtual ~GroupsSelectionModel();
+
+        QModelIndex  indexBy( int role, const QVariant& var );
+
+      protected slots:
+//         void onCurrentChanged( const QModelIndex & current, const QModelIndex & previous );
+        void onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
+
+      private:
+        SVTK_ViewWindow* _getVTKViewWindow();
+        void _highlightGroups( const QModelIndex& eltIndex );
+
+    };
+
+
+
+
+    class MeshSelectionModel : public QItemSelectionModel
+    {
+      Q_OBJECT
+
+      public:
+        MeshSelectionModel( QAbstractItemModel * model );
+        virtual ~MeshSelectionModel();
+
+        QModelIndex  indexBy( int role, const QVariant& var );
+
+      protected slots:
+//         void onCurrentChanged( const QModelIndex & current, const QModelIndex & previous );
+        void onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
+
+      private:
+        SVTK_ViewWindow* _getVTKViewWindow();
+        void _highlightPropagation( const QModelIndex& eltIndex );
+
+    };
+
+
+  }
+}
+
+#endif
+
+
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.cxx
new file mode 100755 (executable)
index 0000000..53b446c
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <stdlib.h>
+
+#include "HEXABLOCKGUI_Exception.hxx"
+
+using namespace HEXABLOCK::GUI;
+
+//#define _DEVDEBUG_
+
+#ifdef _DEVDEBUG_
+#include <execinfo.h>
+#endif
+
+Exception::Exception(const std::string& what):_what(what)
+{
+#ifdef _DEVDEBUG_
+  void *array[20];
+  size_t size=10;
+  char **strings;
+  size_t i;
+
+  size = backtrace (array, 10);
+  strings = backtrace_symbols (array, size);
+
+  _what=_what+'\n';
+  for (i = 0; i < size; i++)
+     _what=_what+strings[i]+'\n';
+
+  free (strings);
+#endif
+}
+
+const char *Exception::what( void ) const throw ()
+{
+  return _what.c_str();
+}
+
+Exception::~Exception() throw ()
+{
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.hxx
new file mode 100755 (executable)
index 0000000..f0edb98
--- /dev/null
@@ -0,0 +1,44 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __HEXABLOCKGUI_EXCEPTION_HXX__
+#define __HEXABLOCKGUI_EXCEPTION_HXX__
+
+#include "HEXABLOCKGUI_Export.hxx"
+
+#include <string>
+#include <exception>
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+    class HEXABLOCKGUI_EXPORT Exception : public std::exception
+    {
+    protected:
+      std::string _what;
+    public:
+      Exception(const std::string& what);
+      const char *what( void ) const throw ();
+      virtual ~Exception() throw ();
+    };
+  }
+}
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Export.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Export.hxx
new file mode 100755 (executable)
index 0000000..833f5e4
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_EXPORT_HXX_
+#define _HEXABLOCKGUI_EXPORT_HXX_
+
+#ifdef WNT
+#  if defined HEXABLOCKGUI_EXPORT
+#    define HEXABLOCKGUI_EXPORT __declspec( dllexport )
+#  else
+#    define HEXABLOCKGUI_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define HEXABLOCKGUI_EXPORT
+#endif
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Model.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Model.cxx
new file mode 100755 (executable)
index 0000000..15d3881
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HEXABLOCKGUI_Model.hxx"
+
+//#define _DEVDEBUG_
+#include "HEXABLOCKGUI_Trace.hxx"
+
+
+
+HEXABLOCKGUI_Model::HEXABLOCKGUI_Model(CAM_Module* theModule)
+  : SalomeApp_DataModel(theModule)
+{
+  DEBTRACE("HEXABLOCKGUI_Model::HEXABLOCKGUI_Model");
+}
+
+HEXABLOCKGUI_Model::~HEXABLOCKGUI_Model()
+{
+  DEBTRACE("HEXABLOCKGUI_Model:: ~HEXABLOCKGUI_Model");
+}
+  
+bool HEXABLOCKGUI_Model::open(const QString& fileName, CAM_Study* study, QStringList listOfFiles)
+{
+  DEBTRACE("HEXABLOCKGUI_Model::open");
+  return SalomeApp_DataModel::open(fileName, study, listOfFiles);
+}
+
+bool HEXABLOCKGUI_Model::save(QStringList& listOfFiles)
+{
+  DEBTRACE("HEXABLOCKGUI_Model::save");
+  return SalomeApp_DataModel::save(listOfFiles);
+}
+
+bool HEXABLOCKGUI_Model::saveAs(const QString& fileName, CAM_Study* study, QStringList& listOfFiles)
+{
+  DEBTRACE("HEXABLOCKGUI_Model::saveAs");
+  return SalomeApp_DataModel::saveAs(fileName, study, listOfFiles);
+}
+
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Model.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Model.hxx
new file mode 100755 (executable)
index 0000000..e427105
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_MODEL_HXX_
+#define _HEXABLOCKGUI_MODEL_HXX_
+
+#include <SalomeApp_DataModel.h>
+
+
+class HEXABLOCKGUI_Model : public SalomeApp_DataModel
+{
+    public:
+      HEXABLOCKGUI_Model(CAM_Module* theModule);
+      virtual ~HEXABLOCKGUI_Model();
+      
+      virtual bool open(const QString& fileName, CAM_Study* study, QStringList listOfFiles);
+      virtual bool save(QStringList& listOfFiles);
+      virtual bool saveAs(const QString& fileName, CAM_Study* study, QStringList& listOfFiles);
+
+    protected:
+
+};
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx
new file mode 100755 (executable)
index 0000000..374d358
--- /dev/null
@@ -0,0 +1,344 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#include "HEXABLOCKGUI_Resource.hxx"
+#include "Resource.hxx"
+#include "HEXABLOCKGUI.hxx"
+#include <SUIT_ResourceMgr.h>
+
+
+
+
+//#define _DEVDEBUG_
+#include "HEXABLOCKGUI_Trace.hxx"
+
+#define RESOURCE_HEXABLOCK "HEXABLOCK"
+
+using namespace HEXABLOCK::GUI;
+
+
+HEXABLOCKGUI_Resource::HEXABLOCKGUI_Resource(SUIT_ResourceMgr* r)
+{
+  DEBTRACE("HEXABLOCKGUI_Resource::HEXABLOCKGUI_Resource");
+  _resource = r;
+}
+
+// Get resources
+// -------------
+
+int HEXABLOCKGUI_Resource::integerValue(const QString& name, const int def) const {
+  return _resource->integerValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+double HEXABLOCKGUI_Resource::doubleValue(const QString& name, const double def) const {
+  return _resource->doubleValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+bool HEXABLOCKGUI_Resource::booleanValue(const QString& name, const bool def) const {
+  return _resource->booleanValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+QFont HEXABLOCKGUI_Resource::fontValue(const QString& name, const QFont def) const {
+  return _resource->fontValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const QColor def) const {
+  return _resource->colorValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const Qt::GlobalColor c) const {
+  QColor col(c);
+  return colorValue(name, col);
+}
+
+QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const int h, const int s, const int v) const {
+  QColor col;
+  col.setHsv(h, s, v);
+  return colorValue(name, col);
+}
+
+QString HEXABLOCKGUI_Resource::stringValue(const QString& name, const QString def) const {
+  return _resource->stringValue(RESOURCE_HEXABLOCK, name, def);
+}
+
+// Set resources
+// -------------
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const int val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const double val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const bool val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const QFont val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const QColor val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+void HEXABLOCKGUI_Resource::setValue( const QString& name, const QString val ) {
+    _resource->setValue(RESOURCE_HEXABLOCK, name, val);
+}
+
+// Create preferences
+// ------------------
+
+void HEXABLOCKGUI_Resource::createPreferences(HEXABLOCKGUI* swm)
+{
+/*
+  DEBTRACE("createPreferences");
+  // --- General tab ---
+  int genTab = swm->addPreference( QObject::tr( "PREF_TAB_GENERAL" ) );
+
+  int componentGroup = swm->addPreference( QObject::tr( "PREF_GROUP_COMPONENT" ), genTab );
+
+  swm->addPreference( QObject::tr( _COMPONENT_INSTANCE_NEW ), componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, _COMPONENT_INSTANCE_NEW );
+  swm->addPreference( "Python Script Font", componentGroup, LightApp_Preferences::Font, RESOURCE_HEXABLOCK, "font" );
+  swm->addPreference( "User catalog", componentGroup, LightApp_Preferences::File, RESOURCE_HEXABLOCK, "userCatalog" );
+  swm->addPreference( "Auto Compute Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "autoComputeLinks" );
+  swm->addPreference( "Simplify Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "simplifyLink" );
+  swm->addPreference( "Better Separation for Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "addRowCols" );
+  swm->addPreference( "Ensure Node Visible When Moved", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "ensureVisibleWhenMoved" );
+  swm->addPreference( "Tabified Panels Up", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "tabPanelsUp" );
+
+  // Link colors
+  int linkTab = swm->addPreference( QObject::tr( "Link colors" ) );
+
+  int idGroup = swm->addPreference( QObject::tr( "PREF_GROUP_GENERAL" ), linkTab );
+  swm->setPreferenceProperty( idGroup, "columns", 1 );
+
+  swm->addPreference( QObject::tr( "Link draw color" ),           idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "link_draw_color" );
+  swm->addPreference( QObject::tr( "Link select color" ),         idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "link_select_color" );
+  swm->addPreference( QObject::tr( "Stream link draw color" ),    idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "stream_link_draw_color" );
+  swm->addPreference( QObject::tr( "Stream link select color" ),  idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "stream_link_select_color" );
+  swm->addPreference( QObject::tr( "Control link draw color" ),   idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "control_link_draw_color" );
+  swm->addPreference( QObject::tr( "Control link select color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "control_link_select_color" );
+  swm->addPreference( QObject::tr( "Emphasis link color" ),       idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "emphasizeBrushColor" );
+
+  swm->addPreference( QObject::tr( "link pen darkness" ),         idGroup, LightApp_Preferences::Integer, RESOURCE_HEXABLOCK, "link_pen_darkness" );
+
+  // --- nodes without color states ---
+  int nodeTab = swm->addPreference( QObject::tr( "PREF_TAB_NODE" ) );
+
+  int nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_SCENE" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_BLOC" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_NODE" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_HEADER" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_CONTROL" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_PORT" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab , "columns", 2);
+
+  swm->addPreference( QObject::tr( "Pen"        ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_pen     );
+  swm->addPreference( QObject::tr( "Brush"      ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_brush   );
+  swm->addPreference( QObject::tr( "High pen"   ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_hiPen   );
+  swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_hiBrush );
+
+  nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_DRAG" ), nodeTab );
+  swm->setPreferenceProperty(nodeSubtab, "columns", 1);
+
+  swm->addPreference( QObject::tr( "On dragging"), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, __dragOver );
+
+  // --- Color of state of nodes ---
+  int stateTab = swm->addPreference( QObject::tr( "PREF_TAB_STATE" ) );
+
+  int editGroup = swm->addPreference( QObject::tr( "PREF_GROUP_EDIT" ), stateTab );
+  swm->setPreferenceProperty( editGroup, "columns", 1 );
+
+  swm->addPreference( QObject::tr( _editedNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _editedNodeBrushColor );
+  swm->addPreference( QObject::tr( _normalNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _normalNodeBrushColor );
+  swm->addPreference( QObject::tr( _runNodeBrushColor    ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _runNodeBrushColor    );
+  swm->addPreference( QObject::tr( _validNodeColor       ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _validNodeColor       );
+  swm->addPreference( QObject::tr( _invalidNodeColor     ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _invalidNodeColor     );
+
+  int runGroup = swm->addPreference( QObject::tr( "PREF_GROUP_RUN" ), stateTab );
+  swm->setPreferenceProperty( runGroup, "columns", 2 );
+
+  swm->addPreference( QObject::tr( _NOTYETINITIALIZED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _NOTYETINITIALIZED );
+  swm->addPreference( QObject::tr( _INITIALISED       ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INITIALISED       );
+  swm->addPreference( QObject::tr( _RUNNING           ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _RUNNING           );
+  swm->addPreference( QObject::tr( _WAITINGTASKS      ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _WAITINGTASKS      );
+  swm->addPreference( QObject::tr( _PAUSED            ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _PAUSED            );
+  swm->addPreference( QObject::tr( _FINISHED          ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _FINISHED          );
+  swm->addPreference( QObject::tr( _STOPPED           ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _STOPPED           );
+  swm->addPreference( QObject::tr( _UNKNOWN           ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _UNKNOWN           );
+
+  swm->addPreference( QObject::tr( _UNDEFINED         ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _UNDEFINED         );
+  swm->addPreference( QObject::tr( _INVALID           ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INVALID           );
+  swm->addPreference( QObject::tr( _READY             ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _READY             );
+  swm->addPreference( QObject::tr( _TOLOAD            ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _TOLOAD            );
+  swm->addPreference( QObject::tr( _LOADED            ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _LOADED            );
+  swm->addPreference( QObject::tr( _TOACTIVATE        ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _TOACTIVATE        );
+  swm->addPreference( QObject::tr( _ACTIVATED         ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ACTIVATED         );
+  swm->addPreference( QObject::tr( _DESACTIVATED      ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DESACTIVATED      );
+  swm->addPreference( QObject::tr( _DONE              ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DONE              );
+  swm->addPreference( QObject::tr( _SUSPENDED         ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _SUSPENDED         );
+  swm->addPreference( QObject::tr( _LOADFAILED        ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _LOADFAILED        );
+  swm->addPreference( QObject::tr( _EXECFAILED        ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _EXECFAILED        );
+  swm->addPreference( QObject::tr( _PAUSE             ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _PAUSE             );
+  swm->addPreference( QObject::tr( _INTERNALERR       ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INTERNALERR       );
+  swm->addPreference( QObject::tr( _DISABLED          ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DISABLED          );
+  swm->addPreference( QObject::tr( _FAILED            ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _FAILED            );
+  swm->addPreference( QObject::tr( _ERROR             ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ERROR             );
+  swm->addPreference( QObject::tr( _DEFAULT           ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DEFAULT           );
+*/
+}
+
+void HEXABLOCKGUI_Resource::preferencesChanged()
+{
+  DEBTRACE("preferencesChanged");
+
+  // Notice: it is here for updating the view, etc.
+
+  // General resource
+  Resource::COMPONENT_INSTANCE_NEW = booleanValue(_COMPONENT_INSTANCE_NEW, COMPONENTINSTANCENEW);
+  Resource::pythonfont           = fontValue( "font" ,PYTHONFONT);
+  Resource::userCatalog           = stringValue( "userCatalog" ,USERCATALOG);
+  Resource::autoComputeLinks = booleanValue("autoComputeLinks", AUTOCOMPUTELINKS);
+  Resource::simplifyLink = booleanValue("simplifyLink", SIMPLIFYLINK);
+  Resource::addRowCols = booleanValue("addRowCols", ADDROWCOLS);
+  Resource::ensureVisibleWhenMoved = booleanValue("ensureVisibleWhenMoved", ENSUREVISIBLEWHENMOVED);
+  Resource::tabPanelsUp = booleanValue("tabPanelsUp", TABPANELSUP);
+
+  // Color of state of nodes
+  Resource::editedNodeBrushColor = colorValue(_editedNodeBrushColor, EDITEDNODEBRUSHCOLOR);
+  Resource::normalNodeBrushColor = colorValue(_normalNodeBrushColor, NORMALNODEBRUSHCOLOR);
+  Resource::runNodeBrushColor    = colorValue(_runNodeBrushColor   , RUNNODEBRUSHCOLOR);
+  Resource::validNodeColor       = colorValue(_validNodeColor      , VALIDNODECOLOR);
+  Resource::invalidNodeColor     = colorValue(_invalidNodeColor    , INVALIDNODECOLOR);
+
+  Resource::NOTYETINITIALIZED    = colorValue(_NOTYETINITIALIZED   ,  NOTYETINITIALIZED_);
+  Resource::INITIALISED          = colorValue(_INITIALISED         ,  INITIALISED_);
+  Resource::RUNNING              = colorValue(_RUNNING             , RUNNING_     );
+  Resource::WAITINGTASKS         = colorValue(_WAITINGTASKS        , WAITINGTASKS_);
+  Resource::PAUSED               = colorValue(_PAUSED              , PAUSED_      );
+  Resource::FINISHED             = colorValue(_FINISHED            , FINISHED_    );
+  Resource::STOPPED              = colorValue(_STOPPED             , STOPPED_     );
+  Resource::UNKNOWN              = colorValue(_UNKNOWN             , UNKNOWN_     );
+
+  Resource::UNDEFINED            = colorValue(_UNDEFINED           , UNDEFINED_   );
+  Resource::INVALID              = colorValue(_INVALID             , INVALID_     );
+  Resource::READY                = colorValue(_READY               , READY_       );
+  Resource::TOLOAD               = colorValue(_TOLOAD              , TOLOAD_      );
+  Resource::LOADED               = colorValue(_LOADED              , LOADED_      );
+  Resource::TOACTIVATE           = colorValue(_TOACTIVATE          , TOACTIVATE_  );
+  Resource::ACTIVATED            = colorValue(_ACTIVATED           , ACTIVATED_   );
+  Resource::DESACTIVATED         = colorValue(_DESACTIVATED        , DESACTIVATED_);
+  Resource::DONE                 = colorValue(_DONE                , DONE_        );
+  Resource::SUSPENDED            = colorValue(_SUSPENDED           , SUSPENDED_   );
+  Resource::LOADFAILED           = colorValue(_LOADFAILED          , LOADFAILED_  );
+  Resource::EXECFAILED           = colorValue(_EXECFAILED          , EXECFAILED_  );
+  Resource::PAUSE                = colorValue(_PAUSE               , PAUSE_       );
+  Resource::INTERNALERR          = colorValue(_INTERNALERR         , INTERNALERR_ );
+  Resource::DISABLED             = colorValue(_DISABLED            , DISABLED_    );
+  Resource::FAILED               = colorValue(_FAILED              , FAILED_      );
+  Resource::ERROR                = colorValue(_ERROR               , ERROR_       );
+  Resource::DEFAULT              = colorValue(_DEFAULT             , DEFAULT_     );
+
+  // Color of links
+  Resource::link_draw_color           = colorValue("link_draw_color"          , LINKDRAW_COLOR         );
+  Resource::stream_link_draw_color    = colorValue("stream_link_draw_color"   , STREAMLINKDRAW_COLOR   );
+  Resource::link_select_color         = colorValue("link_select_color"        , LINK_SELECT_COLOR      );
+  Resource::stream_link_select_color  = colorValue("stream_link_select_color" , STREAMLINK_SELECT_COLOR);
+  Resource::control_link_draw_color   = colorValue("control_link_draw_color"  , CTRLLINKDRAW_COLOR     );
+  Resource::control_link_select_color = colorValue("control_link_select_color", CTRLLINK_SELECT_COLOR  );
+  Resource::emphasizeBrushColor       = colorValue("emphasizeBrushColor"      , EMPHASIZEBRUSHCOLOR    );
+
+  Resource::link_pen_darkness = integerValue("link_pen_darkness", LINK_PEN_DARKNESS  );
+
+  // Color of nodes
+  Resource::Scene_pen              = colorValue(_Scene_pen,               Scene_pen_             );
+  Resource::Scene_hiPen            = colorValue(_Scene_hiPen,             Scene_hiPen_           );
+  Resource::Scene_brush            = colorValue(_Scene_brush,             Scene_brush_           );
+  Resource::Scene_hiBrush          = colorValue(_Scene_hiBrush,           Scene_hiBrush_         );
+  Resource::ComposedNode_brush     = colorValue(_ComposedNode_brush,      ComposedNode_brush_    );
+  Resource::ComposedNode_hiBrush   = colorValue(_ComposedNode_hiBrush,    ComposedNode_hiBrush_  );
+  Resource::ComposedNode_pen       = colorValue(_ComposedNode_pen,        ComposedNode_pen_      );
+  Resource::ComposedNode_hiPen     = colorValue(_ComposedNode_hiPen,      ComposedNode_hiPen_    );
+  Resource::ElementaryNode_brush   = colorValue(_ElementaryNode_brush,    ElementaryNode_brush_  );
+  Resource::ElementaryNode_hiBrush = colorValue(_ElementaryNode_hiBrush,  ElementaryNode_hiBrush_);
+  Resource::ElementaryNode_pen     = colorValue(_ElementaryNode_pen,      ElementaryNode_pen_    );
+  Resource::ElementaryNode_hiPen   = colorValue(_ElementaryNode_hiPen,    ElementaryNode_hiPen_  );
+  Resource::Header_brush           = colorValue(_Header_brush,            Header_brush_          );
+  Resource::Header_hiBrush         = colorValue(_Header_hiBrush,          Header_hiBrush_        );
+  Resource::Header_pen             = colorValue(_Header_pen,              Header_pen_            );
+  Resource::Header_hiPen           = colorValue(_Header_hiPen,            Header_hiPen_          );
+  Resource::CtrlPort_brush         = colorValue(_CtrlPort_brush,          CtrlPort_brush_        );
+  Resource::CtrlPort_hiBrush       = colorValue(_CtrlPort_hiBrush,        CtrlPort_hiBrush_      );
+  Resource::CtrlPort_pen           = colorValue(_CtrlPort_pen,            CtrlPort_pen_          );
+  Resource::CtrlPort_hiPen         = colorValue(_CtrlPort_hiPen,          CtrlPort_hiPen_        );
+  Resource::DataPort_brush         = colorValue(_DataPort_brush,          DataPort_brush_        );
+  Resource::DataPort_hiBrush       = colorValue(_DataPort_hiBrush,        DataPort_hiBrush_      );
+  Resource::DataPort_pen           = colorValue(_DataPort_pen,            DataPort_pen_          );
+  Resource::DataPort_hiPen         = colorValue(_DataPort_hiPen,          DataPort_hiPen_        );
+
+  Resource::dragOver               = colorValue(__dragOver,               dragOver_              );
+}
+
+void HEXABLOCKGUI_Resource::preferencesChanged( const QString& sect, const QString& name ) 
+{
+  if( sect==RESOURCE_HEXABLOCK )
+    {
+      preferencesChanged();
+    }
+}
+
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx
new file mode 100755 (executable)
index 0000000..3094241
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_RESOURCE_HXX_
+#define _HEXABLOCKGUI_RESOURCE_HXX_
+
+#include <QtGui>
+
+class HEXABLOCKGUI;
+class SUIT_ResourceMgr;
+
+
+
+class HEXABLOCKGUI_Resource 
+{
+  public:
+    HEXABLOCKGUI_Resource(SUIT_ResourceMgr* r);
+    virtual void createPreferences(HEXABLOCKGUI* swm);
+    virtual void preferencesChanged( const QString& sect, const QString& name );
+    virtual void preferencesChanged();
+
+  protected:
+    int     integerValue( const QString& name, const int    def = 0          ) const;
+    double  doubleValue ( const QString& name, const double def = 0          ) const;
+    bool    booleanValue( const QString& name, const bool   def = false      ) const;
+    QFont   fontValue   ( const QString& name, const QFont  def = QFont()    ) const;
+    QColor  colorValue  ( const QString& name, const QColor def = QColor()   ) const;
+    QColor  colorValue  ( const QString& name, const Qt::GlobalColor c       ) const;
+    QColor  colorValue  ( const QString& name, const int h, const int s, const int v) const;
+    QString stringValue ( const QString& name, const QString def = QString() ) const;
+
+    void setValue( const QString& name, const int     val );
+    void setValue( const QString& name, const double  val );
+    void setValue( const QString& name, const bool    val );
+    void setValue( const QString& name, const QFont   val );
+    void setValue( const QString& name, const QColor  val );
+    void setValue( const QString& name, const QString val );
+
+  protected:
+    SUIT_ResourceMgr* _resource;
+
+};
+
+
+#endif
+
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx
new file mode 100644 (file)
index 0000000..d046bce
--- /dev/null
@@ -0,0 +1,463 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <set>
+
+
+#include <BRepTools.hxx>
+
+
+// VTK includes
+#include <vtkRenderer.h>
+#include <vtkActorCollection.h>
+#include <vtkUnstructuredGrid.h>
+
+
+
+#include <SUIT_Session.h>
+
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
+// #include <SALOME_Actor.h>
+// #include <SALOME_ListIO.hxx>
+// #include <SALOME_ListIteratorOfListIO.hxx>
+
+
+
+#include <OCCViewer_ViewWindow.h>
+
+
+// #include <SALOMEconfig.h>
+// #include "SALOME_Component_i.hxx"
+// #include <omniORB4/CORBA.h>
+
+
+#include <SVTK_ViewManager.h>
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SVTK_Prs.h>
+#include <SALOME_Actor.h>
+#include <VTKViewer_Algorithm.h>
+
+
+#include "GeometryGUI.h"
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
+
+
+#include "HEXABLOCKGUI.hxx"
+#include "HEXABLOCKGUI_SalomeTools.hxx"
+
+
+
+//#define _DEVDEBUG_
+using namespace std;
+// using namespace HEXABLOCK::GUI;
+
+
+
+namespace HEXABLOCK{
+
+  namespace GUI{
+
+SUIT_Study* GetActiveStudy()
+{
+  SUIT_Application* app = SUIT_Session::session()->activeApplication();
+  if (app)
+    return app->activeStudy();
+  else
+    return NULL;
+}
+
+
+_PTR(Study) GetActiveStudyDocument()
+{
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
+  if (aStudy)
+    return aStudy->studyDS();
+  else
+    return _PTR(Study)();
+}
+
+
+CORBA::Object_var corbaObj( _PTR(SObject) theSO )
+{
+  //std::cout<< "corbaObj( _PTR(SObject) theSO )" << std::endl;
+  CORBA::Object_var aCorbaObj = CORBA::Object::_nil();
+  if ( theSO ) {
+    //std::cout<< "theSO" << std::endl;
+    std::string aValue = theSO->GetIOR();
+    //std::cout<< "aValue" << std::endl;
+    if (strcmp(aValue.c_str(), "") != 0) {
+      CORBA::ORB_ptr anORB = SalomeApp_Application::orb();
+      //std::cout<< "anORB" << anORB << std::endl;
+      aCorbaObj = anORB->string_to_object(aValue.c_str());
+      //std::cout<< "aCorbaObj" << aCorbaObj << std::endl;
+//         anDoc = Document::_narrow(aCorbaObj);
+    }
+  }
+  return aCorbaObj._retn();
+}
+
+
+CORBA::Object_var corbaObj( const Handle(SALOME_InteractiveObject)& theIO )
+{
+  CORBA::Object_var aCorbaObj = CORBA::Object::_nil();
+
+  if ( !theIO.IsNull() && theIO->hasEntry() ){
+    _PTR(Study)   aStudy = GetActiveStudyDocument();
+    _PTR(SObject) aSObj  = aStudy->FindObjectID(theIO->getEntry());
+    aCorbaObj = corbaObj(aSObj);
+  }
+  return aCorbaObj._retn();
+}
+
+/*
+std::string name( _PTR(SObject) theSO ) 
+{
+  std::cout << "name( _PTR(SObject) theSO )"<< theSO;
+  std::string aResName;
+  if ( theSO )
+  {
+    _PTR(GenericAttribute) anAttr;
+    _PTR(AttributeName)    aNameAttr;
+    if ( theSO->FindAttribute( anAttr, "AttributeName" ) )
+    {
+      std::cout << "FindAttribute";
+      aNameAttr = anAttr;
+      std::cout << "aNameAttr = anAttr";
+      aResName = aNameAttr->Value().c_str();
+    }
+  }
+  return aResName;
+}
+
+
+std::string name( const std::string& entry )
+{
+  std::cout << "name( const std::string& entry )"<< entry;
+  std::string aResName;
+
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+  if ( appStudy ){
+    std::cout << "appStudy => "<< appStudy ;
+    _PTR(Study) aStudy = appStudy->studyDS();
+    std::cout << "aStudy=> "<< appStudy ;
+    _PTR(SObject) obj( aStudy->FindObjectID( entry ) );
+    std::cout << "obj=> "<< obj;
+    aResName = name( obj );
+  }
+
+  return aResName;
+}
+*/
+
+
+
+SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry)
+{
+//     SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(theWindow);
+  SALOME_Actor *foundActor = NULL;
+  vtkActor     *aVTKActor  = NULL; 
+  Handle(SALOME_InteractiveObject) anIO;
+  vtkRenderer *aRenderer = theVtkViewWindow->getRenderer();
+  VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+  vtkActorCollection *aCollection = aCopy.GetActors();
+  aCollection->InitTraversal();
+  while( aVTKActor = aCollection->GetNextActor() ){
+//         if ( anAct->IsA("GEOM_Actor") ) std::cout<<"is an actor"<< std::endl;
+    foundActor = dynamic_cast<SALOME_Actor*>( aVTKActor );
+    if ( foundActor && foundActor->hasIO() ){
+        anIO = foundActor->getIO();
+        if( anIO->hasEntry() && strcmp(anIO->getEntry(), theEntry) == 0 )
+          return foundActor;
+    }
+  }
+
+  return NULL; // no actor found
+}
+
+
+
+
+/*
+SVTK_ViewWindow* GetActiveVTKViewWindow()
+{
+    SVTK_ViewWindow* aVtkView = NULL;
+    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+        ( SUIT_Session::session()->activeApplication() );
+    if (anApp)
+      aVtkView = dynamic_cast<SVTK_ViewWindow*>(anApp->desktop()->activeWindow());
+    return aVtkView;
+}
+
+//       SUIT_ViewManager* aViewManager =
+//         anApp->getViewManager(SVTK_Viewer::Type(), createIfNotFound);
+//       if (aViewManager) {
+//         if (SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView()) {
+//           if (SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
+//             aViewWindow->raise();
+//             aViewWindow->setFocus();
+//             return aView;
+//           }
+//         }
+//       }
+
+
+SOCC_ViewWindow* GetActiveOCCViewWindow()
+{
+  SOCC_ViewWindow* anOccView = NULL;
+    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+        (SUIT_Session::session()->activeApplication());
+    if (anApp)
+      anOccView = dynamic_cast<SOCC_ViewWindow*>(anApp->desktop()->activeWindow());
+
+
+  OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anApp->desktop()->activeWindow() );
+  std::cout << "aOCCFrame => "<< aOCCFrame;
+
+    return anOccView ;
+}
+
+
+OCCViewer_ViewWindow* GetActiveOCCViewerWindow()
+{
+  OCCViewer_ViewWindow* aOCCFrame = NULL;
+  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+    (SUIT_Session::session()->activeApplication());
+  if (anApp) aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anApp->desktop()->activeWindow() );
+  std::cout << "aOCCFrame => "<< aOCCFrame;
+  return aOCCFrame;
+}
+
+
+
+int GetNameOfSelectedNodes( SVTK_ViewWindow *theWindow,
+                            const Handle(SALOME_InteractiveObject)& theIO,
+                            QString& theName )
+{
+    SVTK_Selector* theSelector = theWindow->GetSelector();
+    theName = "";
+    TColStd_IndexedMapOfInteger aMapIndex;
+    theSelector->GetIndex(theIO,aMapIndex);
+
+    for( int i = 1; i <= aMapIndex.Extent(); i++ )
+      theName += QString(" %1").arg(aMapIndex(i));
+
+    return aMapIndex.Extent();
+}
+*/
+
+
+int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,
+                               const Handle(SALOME_InteractiveObject)& theIO,
+                               QString& theName )
+{
+    SVTK_Selector* theSelector = theWindow->GetSelector();
+    theName = "";
+    TColStd_IndexedMapOfInteger aMapIndex;
+    theSelector->GetIndex(theIO,aMapIndex);
+
+    typedef std::set<int> TIdContainer;
+    std::set<int> anIdContainer;
+    for( int i = 1; i <= aMapIndex.Extent(); i++)
+      anIdContainer.insert(aMapIndex(i));
+
+    std::set<int>::const_iterator anIter = anIdContainer.begin();
+    for( ; anIter != anIdContainer.end(); anIter++)
+      theName += QString(" %1").arg(*anIter);
+
+    //std::cout << "GetNameOfSelectedElements name =>" << theName.toStdString() << std::endl;
+    return aMapIndex.Extent();
+}
+
+string shape2string( const TopoDS_Shape& aShape )
+{
+  ostringstream streamShape;
+//   string  strShape;
+  BRepTools::Write(aShape, streamShape);
+//   BRepTools::Write(aShape, strShape);
+
+  return streamShape.str();
+}
+
+
+
+
+
+// SALOME_View* LightApp_Displayer::GetActiveView()
+// {
+//   SUIT_Session* session = SUIT_Session::session();
+//   if (  SUIT_Application* app = session->activeApplication() ) {
+//     if ( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) ) {
+//       if( SUIT_ViewManager* vman = sApp->activeViewManager() ) {
+//         if ( SUIT_ViewModel* vmod = vman->getViewModel() )
+//           return dynamic_cast<SALOME_View*>( vmod );
+//       }
+//     }
+//   }
+//   return 0;
+// }
+
+
+
+MyGEOM_Displayer::MyGEOM_Displayer( SalomeApp_Study* app ):
+GEOM_Displayer( app )
+{
+}
+
+MyGEOM_Displayer::~MyGEOM_Displayer()
+{
+}
+
+SALOME_Prs* MyGEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj )
+{
+  //std::cout << "MyGEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj )" << std::endl;
+  if ( theObj->_is_nil() )
+    return 0;
+
+  SALOME_View*      view = NULL;
+  SUIT_ViewManager* vman = HEXABLOCKGUI::currentOccView->getViewManager();
+  SUIT_ViewModel* vmodel = NULL;
+  if ( vman )
+    vmodel = vman->getViewModel();
+  if ( vmodel )
+    view = dynamic_cast<SALOME_View*>(vmodel);
+
+  myViewFrame = view ;//GetActiveView();
+  if ( myViewFrame == 0 )
+    return 0;
+
+  SALOME_Prs* aPrs = myViewFrame->CreatePrs();
+  if ( aPrs == 0 )
+    return 0;
+
+  internalReset();
+  setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), theObj ) );
+  myType = theObj->GetType();
+
+  // Update presentation
+  UpdatePrs( aPrs );
+
+  return aPrs;
+}
+
+} //namespace GUI{
+
+}//namespace HEXABLOCK{
+
+//////////////////////////////////////////////////////////////////////////
+
+
+//   SUIT_Study* GetActiveStudy();
+//   std::string name( _PTR(SObject) theSO );
+//   std::string name( const std::string& entry );
+//   SVTK_ViewWindow* GetActiveVTKViewWindow();
+//   SOCC_ViewWindow* GetActiveOCCViewWindow();
+//   OCCViewer_ViewWindow* GetActiveOCCViewerWindow();
+//   int GetNameOfSelectedNodes( SVTK_ViewWindow *theWindow,
+//                               const Handle(SALOME_InteractiveObject)& theIO,
+//                               QString& theName );
+
+//   QString addInStudy   ( GEOM::GEOM_Object_ptr o, const char* theName )
+//   {
+//     QString res;
+// 
+//     std::cout << "getStudyId()  => " << getStudyId() << std::endl;
+//     std::cout << "getStudy()  => "   << getStudy() << std::endl;
+// 
+//     openCommand();
+//     res = GEOMBase_Helper::addInStudy(o, theName);
+//     std::cout << "addInStudy => " << res.toStdString() << std::endl;
+//     commitCommand();
+//     return res; 
+//   }
+// 
+// 
+// // displayPreview( obj, true, activate, false, lineWidth, displayMode, color );
+//   void displayPreview( GEOM::GEOM_Object_ptr obj, 
+//                                  const bool   append = false, 
+//                                  const bool   activate = false, 
+//                                  const bool   update = true,
+//                                  const double lineWidth = -1, 
+//                                  const int    displayMode = -1,
+//                                  const int    color  = -1 )
+//   {
+//     std::cout << "AAAAAAAAAA => "     <<  std::endl;
+// //     GEOM::GEOM_ITransformOperations_var anOp =
+// //         getGeomEngine()->GetITransformOperations(getStudyId());
+// //     GEOM::GEOM_Object_ptr obj2 = anOp->TranslateDXDYDZ (obj, 100, 100, 100);
+// 
+//     GEOM::GEOM_IBasicOperations_var anOp =
+//         getGeomEngine()->GetIBasicOperations(getStudyId());
+//       std::cout << "BBBBBBBBBB => "     <<  std::endl;
+//     GEOM::GEOM_Object_ptr obj2 = anOp->MakePointXYZ (100, 125, 150);
+// 
+//     std::cout << "obj2->GetEntry() => "     << obj2->GetEntry()<< std::endl;
+//     std::cout << "obj2->GetStudyID() => "   << obj2->GetStudyID()<< std::endl;
+//     std::cout << "obj2->GetType() => "      << obj2->GetType()<< std::endl;
+//     std::cout << "obj2->GetShapeType() => " << obj2->GetShapeType()<< std::endl;
+// 
+//     QString res = addInStudy   ( obj2, "trans");
+//     std::cout << "trans  => "   << res.toStdString() << std::endl;
+// 
+//     globalSelection(); // close local contexts, if any
+//     localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+//     GEOMBase_Helper::activate( 39);//GEOM_MARKER );
+// 
+// //     getDisplayer()->SetColor( Quantity_NOC_RED );
+// //     getDisplayer()->SetColor( Quantity_NOC_CYAN1 );
+// 
+//     // set width of displayed shape
+// //     getDisplayer()->SetWidth( (lineWidth == -1)?8:lineWidth );
+// 
+//     GEOMBase_Helper::displayPreview( obj2,
+//                                      true, //append,
+//                                      true, //activate,
+//                                      update,
+//                                      8,//lineWidth,
+//                                      displayMode,
+//                                      Quantity_NOC_CYAN1);//Quantity_NOC_RED);//color );
+//     
+// 
+//   }
+// 
+//   void erase( GEOM::GEOM_Object_ptr obj, const bool d = true)
+//   {
+//     GEOMBase_Helper::erase( obj, d);
+//   }
+
+
+
+// TopoDS_Shape GEOMBase::GetShapeFromIOR(QString IOR)
+// {
+//   TopoDS_Shape result;
+//   if(IOR.trimmed().isEmpty())
+//     return result;
+// 
+//   CORBA::Object_var obj = SalomeApp_Application::orb()->string_to_object(IOR.toLatin1().data());
+//   if(CORBA::is_nil(obj))
+//     return result;
+//   GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( obj );
+//   if (GeomObject->_is_nil())
+//     return result;
+// 
+//   result = GEOM_Client().GetShape(GeometryGUI::GetGeomGen(), GeomObject);
+//   return result;
+// }
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx
new file mode 100644 (file)
index 0000000..71738cc
--- /dev/null
@@ -0,0 +1,85 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _HEXABLOCKGUI_SALOMETOOLS_HXX_
+#define _HEXABLOCKGUI_SALOMETOOLS_HXX_
+
+
+#include <SalomeApp_Application.h>
+#include <SALOME_Actor.h>
+#include <SALOME_ListIO.hxx>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+
+#include "GEOM_Client.hxx"
+// #include "GEOMBase_Helper.h"
+#include "GEOM_Displayer.h"
+
+
+
+#include <TopoDS_Shape.hxx>
+#include <SALOME_Actor.h>
+#include <SVTK_ViewWindow.h>
+
+
+
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+
+  SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry );
+  _PTR(Study)   GetActiveStudyDocument();
+  CORBA::Object_var corbaObj( _PTR(SObject) theSO );
+  CORBA::Object_var corbaObj( const Handle(SALOME_InteractiveObject)& theIO );
+  int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,/* SVTK_Selector* theSelector,*/
+                                 const Handle(SALOME_InteractiveObject)& theIO,
+                                 QString& theName );
+  std::string shape2string( const TopoDS_Shape& aShape );
+
+
+  
+  class MyGEOM_Displayer : public GEOM_Displayer
+  {
+    public:
+      MyGEOM_Displayer( SalomeApp_Study* app );
+      virtual ~MyGEOM_Displayer();
+
+
+    SALOME_Prs* BuildPrs( GEOM::GEOM_Object_ptr theObj );
+
+//   int aPrevDispMode = getDisplayer()->SetDisplayMode( displayMode );
+//   getDisplayer()->SetToActivate( activate );
+//   getDisplayer()->SetName( objStr.in() );
+//   SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object );
+
+
+
+
+  };
+
+
+
+
+
+
+  }
+}
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.cxx
new file mode 100755 (executable)
index 0000000..9b7a2e1
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cstdlib>
+#include <iostream>
+#include <sstream>
+
+#include "HEXABLOCKGUI_Trace.hxx"
+
+
+#ifdef WNT
+#include <process.h>
+#define getpid _getpid
+#else
+#include <unistd.h>
+#endif
+
+namespace HEXABLOCK{
+  namespace GUI{
+    int traceLevel=0;
+  }
+}
+
+void AttachDebugger()
+{
+  if(getenv ("HEXABLOCKDEBUGGER"))
+    {
+      std::stringstream exec;
+      exec << "$HEXABLOCKDEBUGGER " << getpid() << "&";
+      std::cerr << exec.str() << std::endl;
+      system(exec.str().c_str());
+      while(1);
+    }
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.hxx
new file mode 100755 (executable)
index 0000000..cb929f8
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __HEXABLOCKGUI_TRACE_HXX__
+#define __HEXABLOCKGUI_TRACE_HXX__
+
+#include <iostream>
+#include <sstream>
+
+#include "HEXABLOCKGUI_Export.hxx"
+#include "HEXABLOCKGUI_Exception.hxx"
+
+#ifdef _DEVDEBUG_
+#define DEBTRACE(msg) {std::cerr<<std::flush<<__FILE__<<" ["<<__LINE__<<"] : "<<msg<<std::endl<<std::flush;}
+#else
+#define DEBTRACE(msg)
+#endif
+
+namespace HEXABLOCK {
+  namespace GUI {
+    extern HEXABLOCKGUI_EXPORT int traceLevel;
+  }
+}
+
+//! HEXABLOCKTRACE macro for dynamic trace: print only if HEXABLOCK_TRACELEVEL environment variable is set and level is less than  its value
+#define HEXABLOCKTRACE(level,msg) {if(HEXABLOCK::GUI::traceLevel >=level)std::cerr<<__FILE__<<" ["<<__LINE__<<"] : "<<msg<<std::endl;}
+
+//! HASSERT macro is always defined, used like assert, but throw a HEXABLOCKGUI::GUI::Exception instead of abort
+
+#define HASSERT(val) {if(!(val)){std::stringstream mess; mess<<__FILE__<<" ["<<__LINE__<<"] : assertion "<<#val<<" failed"; throw HEXABLOCK::GUI::Exception(mess.str());}}
+
+void AttachDebugger();
+
+#endif
diff --git a/src/HEXABLOCKGUI/Hexa_QTD.ui b/src/HEXABLOCKGUI/Hexa_QTD.ui
new file mode 100755 (executable)
index 0000000..85f2389
--- /dev/null
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HexaDialog</class>
+ <widget class="QDialog" name="HexaDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>217</width>
+    <height>387</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Hexahedron Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="title">
+      <string>Result Name</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_15">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Hexa</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <item>
+       <widget class="QRadioButton" name="quads_rb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Quads</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="vertices_rb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Vertices</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QListWidget" name="quads_lw">
+        <property name="toolTip">
+         <string>Select a quad</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QListWidget" name="vertices_lw">
+        <property name="toolTip">
+         <string>Select a vertex</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>quads_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>quads_lw</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>74</x>
+     <y>45</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>220</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>quads_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>vertices_lw</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>95</x>
+     <y>45</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>435</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>vertices_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>vertices_lw</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>252</x>
+     <y>45</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>435</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>vertices_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>quads_lw</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>252</x>
+     <y>45</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>258</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/JoinQuad_QTD.ui b/src/HEXABLOCKGUI/JoinQuad_QTD.ui
new file mode 100644 (file)
index 0000000..bdd0f8d
--- /dev/null
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>JoinQuadDialog</class>
+ <widget class="QDialog" name="JoinQuadDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>256</width>
+    <height>440</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Join Quad(s) Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox_8">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>From</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <item row="0" column="0" colspan="2">
+       <widget class="QGroupBox" name="groupBox_5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="title">
+         <string>Quadrangle(s)</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_4">
+         <item row="0" column="0" rowspan="2">
+          <widget class="QListWidget" name="quads_lw">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Expanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string extracomment="select quad"/>
+           </property>
+           <property name="statusTip">
+            <string/>
+           </property>
+           <property name="whatsThis">
+            <string/>
+           </property>
+           <property name="selectionMode">
+            <enum>QAbstractItemView::MultiSelection</enum>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>Point a</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="vex0_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Point b</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="vex2_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>To</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Quadrangle</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="quad_dest_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Point a</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="vex1_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_7">
+        <property name="text">
+         <string>Point b</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="vex3_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Grid</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QSpinBox" name="nb_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Law_QTD.ui b/src/HEXABLOCKGUI/Law_QTD.ui
new file mode 100644 (file)
index 0000000..5e33574
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LawDialog</class>
+ <widget class="QDialog" name="LawDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>282</width>
+    <height>168</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Law</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>name :</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>nb nodes</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="nb_nodes_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>coefficient</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="coeff_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>kind : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QComboBox" name="kind_cb">
+        <item>
+         <property name="text">
+          <string>Uniform</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Arithmetic</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Geometric</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeCartesian_QTD.ui b/src/HEXABLOCKGUI/MakeCartesian_QTD.ui
new file mode 100644 (file)
index 0000000..6ebaeea
--- /dev/null
@@ -0,0 +1,450 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeCartesianDialog</class>
+ <widget class="QDialog" name="MakeCartesianDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>232</width>
+    <height>540</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Cartesian Grid Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox_6">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Make cartesian</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_7">
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( 1 vector )</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( 3 vector )</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QWidget" name="widget_3" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <property name="labelAlignment">
+          <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>Vertex </string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="vex_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>Vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vec_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="2">
+          <layout class="QFormLayout" name="formLayout_3">
+           <property name="labelAlignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+           <property name="formAlignment">
+            <set>Qt::AlignJustify|Qt::AlignTop</set>
+           </property>
+           <property name="topMargin">
+            <number>8</number>
+           </property>
+           <item row="0" column="0">
+            <widget class="QLabel" name="label_12">
+             <property name="text">
+              <string>n (x)</string>
+             </property>
+             <property name="alignment">
+              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QSpinBox" name="nx_spb_rb0">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1">
+            <widget class="QSpinBox" name="ny_spb_rb0">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="1">
+            <widget class="QSpinBox" name="nz_spb_rb0">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="label_13">
+             <property name="text">
+              <string>n (y)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
+            <widget class="QLabel" name="label_14">
+             <property name="text">
+              <string>n (z)</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <property name="labelAlignment">
+          <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Vertex </string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="vex_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Vector(x)</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vec_x_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Vector(y)</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="vec_y_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Vector(z)</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="vec_z_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0" colspan="2">
+          <layout class="QFormLayout" name="formLayout_4">
+           <property name="labelAlignment">
+            <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+           </property>
+           <property name="topMargin">
+            <number>8</number>
+           </property>
+           <item row="0" column="0">
+            <widget class="QLabel" name="label_5">
+             <property name="text">
+              <string>n (x)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QSpinBox" name="nx_spb_rb1">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1">
+            <widget class="QSpinBox" name="ny_spb_rb1">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="1">
+            <widget class="QSpinBox" name="nz_spb_rb1">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximum">
+              <number>1000000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="label_6">
+             <property name="text">
+              <string>n (y)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
+            <widget class="QLabel" name="label_7">
+             <property name="text">
+              <string>n (z)</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>122</x>
+     <y>47</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>123</x>
+     <y>106</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>164</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>246</x>
+     <y>240</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>334</x>
+     <y>47</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>328</x>
+     <y>240</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>343</x>
+     <y>55</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>343</x>
+     <y>208</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeCylinder_QTD.ui b/src/HEXABLOCKGUI/MakeCylinder_QTD.ui
new file mode 100644 (file)
index 0000000..1d6861e
--- /dev/null
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeCylinderDialog</class>
+ <widget class="QDialog" name="MakeCylinderDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>190</width>
+    <height>238</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Cylinder construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Cylinder</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="cyl_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Vector</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QSpinBox" name="nr_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>n (radial)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>n (heigth)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="QSpinBox" name="na_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>3</number>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="1">
+       <widget class="QSpinBox" name="nl_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>n (angular)</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeCylinders_QTD.ui b/src/HEXABLOCKGUI/MakeCylinders_QTD.ui
new file mode 100644 (file)
index 0000000..38c0d4b
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeCylindersDialog</class>
+ <widget class="QDialog" name="MakeCylindersDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>212</width>
+    <height>104</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Cylinders Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::ExpandingFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Cylinder1</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="cyl1_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Cylinder2</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="cyl2_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeCylindrical_QTD.ui b/src/HEXABLOCKGUI/MakeCylindrical_QTD.ui
new file mode 100644 (file)
index 0000000..1e38434
--- /dev/null
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeCylindricalDialog</class>
+ <widget class="QDialog" name="MakeCylindricalDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>245</width>
+    <height>464</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Cylinder Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_4">
+      <item>
+       <widget class="QGroupBox" name="groupBox_4">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_2">
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <widget class="QLabel" name="label">
+             <property name="text">
+              <string>Vertex </string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="pt_le">
+             <property name="maximumSize">
+              <size>
+               <width>127</width>
+               <height>16777215</height>
+              </size>
+             </property>
+             <property name="readOnly">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_3">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_2">
+           <item>
+            <widget class="QLabel" name="label_2">
+             <property name="text">
+              <string>Vector(x)</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="vec_x_le">
+             <property name="maximumSize">
+              <size>
+               <width>127</width>
+               <height>16777215</height>
+              </size>
+             </property>
+             <property name="readOnly">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_4">
+           <item>
+            <widget class="QLabel" name="label_4">
+             <property name="text">
+              <string>Vector(z)</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="vec_z_le">
+             <property name="maximumSize">
+              <size>
+               <width>127</width>
+               <height>16777215</height>
+              </size>
+             </property>
+             <property name="readOnly">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_2">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>dr:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QDoubleSpinBox" name="dr_spb">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>1.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QDoubleSpinBox" name="da_spb">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>360.000000000000000</double>
+           </property>
+           <property name="singleStep">
+            <double>10.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>360.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QDoubleSpinBox" name="dl_spb">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>1.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>da:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>dl:</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_5">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QFormLayout" name="formLayout_3">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>nr:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="nr_spb">
+           <property name="maximum">
+            <number>1000000</number>
+           </property>
+           <property name="value">
+            <number>2</number>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QSpinBox" name="na_spb">
+           <property name="maximum">
+            <number>1000000</number>
+           </property>
+           <property name="value">
+            <number>6</number>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QSpinBox" name="nl_spb">
+           <property name="maximum">
+            <number>1000000</number>
+           </property>
+           <property name="value">
+            <number>10</number>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>na:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="label_10">
+           <property name="text">
+            <string>nl:</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="fill_cb">
+        <property name="text">
+         <string>fill</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeGrid_QTD.ui b/src/HEXABLOCKGUI/MakeGrid_QTD.ui
new file mode 100644 (file)
index 0000000..f10ed72
--- /dev/null
@@ -0,0 +1,1145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeGridDialog</class>
+ <widget class="QDialog" name="MakeGridDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>338</width>
+    <height>1042</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>16777215</width>
+    <height>16777215</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Grid Construction</string>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>false</bool>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAsNeeded</enum>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>-82</y>
+        <width>301</width>
+        <height>1231</height>
+       </rect>
+      </property>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QGroupBox" name="groupBox">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>5</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>Make Grid</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetDefaultConstraint</enum>
+          </property>
+          <item>
+           <widget class="QRadioButton" name="rb0">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Cartesian</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="rb1">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Cylindrical</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="rb2">
+            <property name="text">
+             <string>Spherical</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QGroupBox" name="groupBox_2">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>5</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>Arguments</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_3">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetDefaultConstraint</enum>
+          </property>
+          <item>
+           <widget class="QWidget" name="cartesian_widget" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>152</height>
+             </size>
+            </property>
+            <layout class="QFormLayout" name="formLayout">
+             <property name="sizeConstraint">
+              <enum>QLayout::SetDefaultConstraint</enum>
+             </property>
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+             </property>
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_8">
+               <property name="text">
+                <string>Vertex :  </string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="vex_le_rb0">
+               <property name="maximumSize">
+                <size>
+                 <width>127</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_9">
+               <property name="text">
+                <string>Vector : </string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QLineEdit" name="vec_le_rb0">
+               <property name="maximumSize">
+                <size>
+                 <width>127</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_12">
+               <property name="text">
+                <string>n (x) : </string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QSpinBox" name="nx_spb_rb0">
+               <property name="minimum">
+                <number>1</number>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_13">
+               <property name="text">
+                <string>n (y) :</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QSpinBox" name="ny_spb_rb0">
+               <property name="minimum">
+                <number>1</number>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="0">
+              <widget class="QLabel" name="label_14">
+               <property name="text">
+                <string>n (z) : </string>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="1">
+              <widget class="QSpinBox" name="nz_spb_rb0">
+               <property name="minimum">
+                <number>1</number>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QWidget" name="cylindrical_widget" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_26">
+             <item row="1" column="0">
+              <widget class="QGroupBox" name="groupBox_3">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="title">
+                <string>Grid</string>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_5">
+                <item row="0" column="0">
+                 <widget class="QRadioButton" name="uniform_rb">
+                  <property name="text">
+                   <string>regular</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QRadioButton" name="random_rb">
+                  <property name="text">
+                   <string>irregular</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0" colspan="2">
+                 <widget class="QTabWidget" name="random_param_w">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="currentIndex">
+                   <number>0</number>
+                  </property>
+                  <widget class="QWidget" name="ext_radius_tab">
+                   <attribute name="title">
+                    <string>radius</string>
+                   </attribute>
+                   <layout class="QGridLayout" name="gridLayout_2">
+                    <item row="0" column="0">
+                     <widget class="QPushButton" name="add_radius_pb">
+                      <property name="enabled">
+                       <bool>true</bool>
+                      </property>
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>+</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="1" rowspan="4">
+                     <widget class="QListWidget" name="radius_lw"/>
+                    </item>
+                    <item row="1" column="0">
+                     <widget class="QPushButton" name="del_radius_pb">
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>-</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="2" column="0">
+                     <spacer name="verticalSpacer">
+                      <property name="orientation">
+                       <enum>Qt::Vertical</enum>
+                      </property>
+                      <property name="sizeHint" stdset="0">
+                       <size>
+                        <width>20</width>
+                        <height>139</height>
+                       </size>
+                      </property>
+                     </spacer>
+                    </item>
+                   </layout>
+                  </widget>
+                  <widget class="QWidget" name="ext_angle_tab">
+                   <attribute name="title">
+                    <string>angle</string>
+                   </attribute>
+                   <layout class="QGridLayout" name="gridLayout_3">
+                    <item row="0" column="0">
+                     <widget class="QPushButton" name="add_angle_pb">
+                      <property name="enabled">
+                       <bool>true</bool>
+                      </property>
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>+</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="1" rowspan="3">
+                     <widget class="QListWidget" name="angle_lw"/>
+                    </item>
+                    <item row="1" column="0">
+                     <widget class="QPushButton" name="del_angle_pb">
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>-</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="2" column="0">
+                     <spacer name="verticalSpacer_2">
+                      <property name="orientation">
+                       <enum>Qt::Vertical</enum>
+                      </property>
+                      <property name="sizeHint" stdset="0">
+                       <size>
+                        <width>20</width>
+                        <height>139</height>
+                       </size>
+                      </property>
+                     </spacer>
+                    </item>
+                   </layout>
+                  </widget>
+                  <widget class="QWidget" name="ext_height_tab">
+                   <attribute name="title">
+                    <string>height</string>
+                   </attribute>
+                   <layout class="QGridLayout" name="gridLayout_4">
+                    <item row="0" column="0">
+                     <widget class="QPushButton" name="add_height_pb">
+                      <property name="enabled">
+                       <bool>true</bool>
+                      </property>
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>+</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="1" rowspan="3">
+                     <widget class="QListWidget" name="height_lw">
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="1" column="0">
+                     <widget class="QPushButton" name="del_height_pb">
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="text">
+                       <string>-</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="2" column="0">
+                     <spacer name="verticalSpacer_3">
+                      <property name="orientation">
+                       <enum>Qt::Vertical</enum>
+                      </property>
+                      <property name="sizeHint" stdset="0">
+                       <size>
+                        <width>20</width>
+                        <height>139</height>
+                       </size>
+                      </property>
+                     </spacer>
+                    </item>
+                   </layout>
+                  </widget>
+                 </widget>
+                </item>
+                <item row="2" column="0" colspan="2">
+                 <widget class="QWidget" name="uniform_param_w" native="true">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <layout class="QVBoxLayout" name="verticalLayout">
+                   <item>
+                    <widget class="QGroupBox" name="groupBox_6">
+                     <property name="sizePolicy">
+                      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                       <horstretch>0</horstretch>
+                       <verstretch>0</verstretch>
+                      </sizepolicy>
+                     </property>
+                     <property name="minimumSize">
+                      <size>
+                       <width>0</width>
+                       <height>0</height>
+                      </size>
+                     </property>
+                     <property name="title">
+                      <string>radius</string>
+                     </property>
+                     <layout class="QFormLayout" name="formLayout_2">
+                      <item row="0" column="0">
+                       <widget class="QLabel" name="label_5">
+                        <property name="text">
+                         <string>size : </string>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="0" column="1">
+                       <widget class="QDoubleSpinBox" name="dr_spb_rb1">
+                        <property name="decimals">
+                         <number>6</number>
+                        </property>
+                        <property name="maximum">
+                         <double>1000000000.000000000000000</double>
+                        </property>
+                        <property name="value">
+                         <double>1.000000000000000</double>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="1">
+                       <widget class="QSpinBox" name="nr_spb_rb1">
+                        <property name="minimum">
+                         <number>1</number>
+                        </property>
+                        <property name="maximum">
+                         <number>1000000</number>
+                        </property>
+                        <property name="value">
+                         <number>1</number>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="0">
+                       <widget class="QLabel" name="label_10">
+                        <property name="text">
+                         <string>count : </string>
+                        </property>
+                       </widget>
+                      </item>
+                     </layout>
+                    </widget>
+                   </item>
+                   <item>
+                    <widget class="QGroupBox" name="groupBox_8">
+                     <property name="sizePolicy">
+                      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                       <horstretch>0</horstretch>
+                       <verstretch>0</verstretch>
+                      </sizepolicy>
+                     </property>
+                     <property name="title">
+                      <string>angle</string>
+                     </property>
+                     <layout class="QFormLayout" name="formLayout_5">
+                      <item row="0" column="0">
+                       <widget class="QLabel" name="label_6">
+                        <property name="text">
+                         <string>value :</string>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="0" column="1">
+                       <widget class="QDoubleSpinBox" name="da_spb_rb1">
+                        <property name="decimals">
+                         <number>6</number>
+                        </property>
+                        <property name="maximum">
+                         <double>360.000000000000000</double>
+                        </property>
+                        <property name="singleStep">
+                         <double>10.000000000000000</double>
+                        </property>
+                        <property name="value">
+                         <double>360.000000000000000</double>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="1">
+                       <widget class="QSpinBox" name="na_spb_rb1">
+                        <property name="minimum">
+                         <number>3</number>
+                        </property>
+                        <property name="maximum">
+                         <number>1000000</number>
+                        </property>
+                        <property name="value">
+                         <number>3</number>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="0">
+                       <widget class="QLabel" name="label_11">
+                        <property name="text">
+                         <string>count : </string>
+                        </property>
+                       </widget>
+                      </item>
+                     </layout>
+                    </widget>
+                   </item>
+                   <item>
+                    <widget class="QGroupBox" name="groupBox_7">
+                     <property name="sizePolicy">
+                      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                       <horstretch>0</horstretch>
+                       <verstretch>0</verstretch>
+                      </sizepolicy>
+                     </property>
+                     <property name="title">
+                      <string>height</string>
+                     </property>
+                     <layout class="QFormLayout" name="formLayout_6">
+                      <item row="0" column="0">
+                       <widget class="QLabel" name="label_7">
+                        <property name="text">
+                         <string>size : </string>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="0" column="1">
+                       <widget class="QDoubleSpinBox" name="dl_spb_rb1">
+                        <property name="decimals">
+                         <number>6</number>
+                        </property>
+                        <property name="maximum">
+                         <double>1000000000.000000000000000</double>
+                        </property>
+                        <property name="value">
+                         <double>1.000000000000000</double>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="1">
+                       <widget class="QSpinBox" name="nl_spb_rb1">
+                        <property name="minimum">
+                         <number>1</number>
+                        </property>
+                        <property name="maximum">
+                         <number>1000000</number>
+                        </property>
+                        <property name="value">
+                         <number>1</number>
+                        </property>
+                       </widget>
+                      </item>
+                      <item row="2" column="0">
+                       <widget class="QLabel" name="label_15">
+                        <property name="text">
+                         <string>count : </string>
+                        </property>
+                       </widget>
+                      </item>
+                     </layout>
+                    </widget>
+                   </item>
+                  </layout>
+                 </widget>
+                </item>
+                <item row="3" column="0">
+                 <widget class="QCheckBox" name="fill_cb_rb1">
+                  <property name="text">
+                   <string>fill</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="4" column="0">
+                 <spacer name="verticalSpacer_5">
+                  <property name="orientation">
+                   <enum>Qt::Vertical</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>20</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="0" column="0">
+              <widget class="QGroupBox" name="groupBox_4">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="title">
+                <string>Cylinder</string>
+               </property>
+               <layout class="QFormLayout" name="formLayout_4">
+                <property name="sizeConstraint">
+                 <enum>QLayout::SetDefaultConstraint</enum>
+                </property>
+                <property name="fieldGrowthPolicy">
+                 <enum>QFormLayout::ExpandingFieldsGrow</enum>
+                </property>
+                <item row="1" column="0">
+                 <widget class="QLabel" name="label">
+                  <property name="text">
+                   <string>center </string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QLineEdit" name="center_le_rb1">
+                  <property name="maximumSize">
+                   <size>
+                    <width>127</width>
+                    <height>16777215</height>
+                   </size>
+                  </property>
+                  <property name="toolTip">
+                   <string>Select a point (vertex)
+</string>
+                  </property>
+                  <property name="readOnly">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QLabel" name="label_2">
+                  <property name="text">
+                   <string>base</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="1">
+                 <widget class="QLineEdit" name="base_le_rb1">
+                  <property name="maximumSize">
+                   <size>
+                    <width>127</width>
+                    <height>16777215</height>
+                   </size>
+                  </property>
+                  <property name="toolTip">
+                   <string>Select a vector</string>
+                  </property>
+                  <property name="readOnly">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="3" column="0">
+                 <widget class="QLabel" name="label_4">
+                  <property name="text">
+                   <string>vector</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="3" column="1">
+                 <widget class="QLineEdit" name="height_le_rb1">
+                  <property name="maximumSize">
+                   <size>
+                    <width>127</width>
+                    <height>16777215</height>
+                   </size>
+                  </property>
+                  <property name="toolTip">
+                   <string>Select a vector</string>
+                  </property>
+                  <property name="readOnly">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QWidget" name="spherical_widget" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>130</height>
+             </size>
+            </property>
+            <layout class="QFormLayout" name="formLayout_3">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
+                <string>Vertex </string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="vex_le_rb2">
+               <property name="maximumSize">
+                <size>
+                 <width>127</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_16">
+               <property name="text">
+                <string>Radius</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="radius_spb_rb2">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_17">
+               <property name="text">
+                <string>nb</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QSpinBox" name="nb_spb_rb2">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="minimum">
+                <number>1</number>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_18">
+               <property name="text">
+                <string>k</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QDoubleSpinBox" name="k_spb_rb2">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="2" column="0">
+        <spacer name="verticalSpacer_4">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>cylindrical_widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>231</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>571</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>cartesian_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>231</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>190</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>spherical_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>231</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>938</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>cylindrical_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>345</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>571</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>cartesian_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>345</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>190</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>spherical_widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>345</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>938</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>cartesian_widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>95</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>190</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>cylindrical_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>95</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>571</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>spherical_widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>95</x>
+     <y>56</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>208</x>
+     <y>938</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>uniform_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>random_param_w</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>135</x>
+     <y>450</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>224</x>
+     <y>539</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>random_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>random_param_w</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>313</x>
+     <y>450</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>224</x>
+     <y>539</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>uniform_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>uniform_param_w</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>135</x>
+     <y>450</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>224</x>
+     <y>724</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>random_rb</sender>
+   <signal>clicked()</signal>
+   <receiver>uniform_param_w</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>313</x>
+     <y>450</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>224</x>
+     <y>724</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeHemiSphere_QTD.ui b/src/HEXABLOCKGUI/MakeHemiSphere_QTD.ui
new file mode 100644 (file)
index 0000000..28e7897
--- /dev/null
@@ -0,0 +1,603 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeHemiSphereDialog</class>
+ <widget class="QDialog" name="MakeHemiSphereDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>367</width>
+    <height>440</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>HemiSphere Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAsNeeded</enum>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents_2">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>330</width>
+        <height>688</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QGroupBox" name="groupBox_3">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="title">
+          <string>Result Name</string>
+         </property>
+         <layout class="QFormLayout" name="formLayout">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_15">
+            <property name="text">
+             <string> Name</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="name_le">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>127</width>
+              <height>16777215</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox">
+         <property name="title">
+          <string>Arguments</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <item>
+           <widget class="QGroupBox" name="groupBox_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string>Sphere</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>center</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="sphere_center_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string extracomment="select vertex"/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_11">
+               <property name="text">
+                <string>external radius</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="sphere_radext_spb">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+               <property name="value">
+                <double>1.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="int_rad_label">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="text">
+                <string>internal radius</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QDoubleSpinBox" name="sphere_radint_spb">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+               <property name="value">
+                <double>1.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QCheckBox" name="sphere_rind_cb">
+               <property name="text">
+                <string>rind</string>
+               </property>
+               <property name="checked">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="groupBox_4">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string>Hole</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_3">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
+                <string>axis(z)</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="hole_axis_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string extracomment="select vector"/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_6">
+               <property name="text">
+                <string>radius</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="hole_rad_spb">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+               <property name="value">
+                <double>1.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="groupBox_7">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string>Cross section</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_6">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_7">
+               <property name="text">
+                <string>point</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="cross_pt_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string extracomment="select vertex"/>
+               </property>
+               <property name="statusTip">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_4">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="text">
+                <string>vector</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QLineEdit" name="cross_vec_le">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string extracomment="select vector "/>
+               </property>
+               <property name="statusTip">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="groupBox_5">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string>Radial section</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>start vector</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="radial_vec_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string extracomment="select a vector"/>
+               </property>
+               <property name="statusTip">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="angle_label">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="text">
+                <string>angle</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="radial_angle_spb">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="decimals">
+                <number>6</number>
+               </property>
+               <property name="maximum">
+                <double>360.000000000000000</double>
+               </property>
+               <property name="value">
+                <double>180.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0" colspan="2">
+              <widget class="QCheckBox" name="radial_partial_cb">
+               <property name="text">
+                <string>partial</string>
+               </property>
+               <property name="checked">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="groupBox_6">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string>Grid</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_4">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_8">
+               <property name="text">
+                <string>n (radial)</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QSpinBox" name="ngrid_rad_spb">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_9">
+               <property name="text">
+                <string>n (angular)</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QSpinBox" name="ngrid_ang_spb">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>3</number>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_10">
+               <property name="text">
+                <string>n (height)</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QSpinBox" name="ngrid_height_spb">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximum">
+                <number>1000000</number>
+               </property>
+               <property name="value">
+                <number>1</number>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>radial_partial_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>radial_angle_spb</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>217</x>
+     <y>416</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>140</x>
+     <y>417</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sphere_rind_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>sphere_radint_spb</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>226</x>
+     <y>195</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>161</x>
+     <y>196</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>hole_axis_le</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>cross_vec_le</receiver>
+   <slot>setText(QString)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>265</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>390</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cross_vec_le</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>hole_axis_le</receiver>
+   <slot>setText(QString)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>390</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>265</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sphere_rind_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>int_rad_label</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>226</x>
+     <y>195</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>78</x>
+     <y>196</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>radial_partial_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>angle_label</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>217</x>
+     <y>416</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>65</x>
+     <y>417</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakePipe_QTD.ui b/src/HEXABLOCKGUI/MakePipe_QTD.ui
new file mode 100644 (file)
index 0000000..b2b5b9a
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakePipeDialog</class>
+ <widget class="QDialog" name="MakePipeDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>195</width>
+    <height>220</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Pipe Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::ExpandingFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Pipe</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="pipe_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Vector</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>n (radial)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QSpinBox" name="nr_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>n (angular)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="QSpinBox" name="na_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>3</number>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>n (heigth)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="1">
+       <widget class="QSpinBox" name="nl_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakePipes_QTD.ui b/src/HEXABLOCKGUI/MakePipes_QTD.ui
new file mode 100644 (file)
index 0000000..40d7a7e
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakePipesDialog</class>
+ <widget class="QDialog" name="MakePipesDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>190</width>
+    <height>104</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Pipes Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::ExpandingFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Pipe1</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="pipe1_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Pipe2</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="pipe2_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeRind_QTD.ui b/src/HEXABLOCKGUI/MakeRind_QTD.ui
new file mode 100644 (file)
index 0000000..524e775
--- /dev/null
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeRindDialog</class>
+ <widget class="QDialog" name="MakeRindDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>324</width>
+    <height>440</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Rind Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="title">
+      <string>Result Name</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_15">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0" colspan="2">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>center</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="center_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QLineEdit" name="vz_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="2">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>radext</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2">
+       <widget class="QDoubleSpinBox" name="radext_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="2">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>radint</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="2">
+       <widget class="QDoubleSpinBox" name="radint_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0" colspan="2">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>radhole</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="2">
+       <widget class="QDoubleSpinBox" name="radhole_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" colspan="2">
+       <widget class="QLabel" name="label_7">
+        <property name="text">
+         <string>plorig</string>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="2">
+       <widget class="QLineEdit" name="plorig_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="0" colspan="2">
+       <widget class="QLabel" name="label_8">
+        <property name="text">
+         <string>nrad</string>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="2">
+       <widget class="QSpinBox" name="nrad_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="9" column="0" colspan="2">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string>nang</string>
+        </property>
+       </widget>
+      </item>
+      <item row="9" column="2">
+       <widget class="QSpinBox" name="nang_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>3</number>
+        </property>
+       </widget>
+      </item>
+      <item row="10" column="0" colspan="2">
+       <widget class="QLabel" name="label_10">
+        <property name="text">
+         <string>nhaut</string>
+        </property>
+       </widget>
+      </item>
+      <item row="10" column="2">
+       <widget class="QSpinBox" name="nhaut_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="11" column="0">
+       <widget class="QLabel" name="angle_label">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="text">
+         <string>angle</string>
+        </property>
+       </widget>
+      </item>
+      <item row="11" column="2">
+       <widget class="QDoubleSpinBox" name="angle_spb">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>180.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>vx</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="vx_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>vz</string>
+        </property>
+       </widget>
+      </item>
+      <item row="11" column="3">
+       <widget class="QCheckBox" name="partial_cb">
+        <property name="text">
+         <string>Partial</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>partial_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>angle_spb</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>291</x>
+     <y>210</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>190</x>
+     <y>392</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>partial_cb</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>angle_label</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>285</x>
+     <y>391</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>43</x>
+     <y>392</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeSpherical_QTD.ui b/src/HEXABLOCKGUI/MakeSpherical_QTD.ui
new file mode 100644 (file)
index 0000000..4564b4a
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeSphericalDialog</class>
+ <widget class="QDialog" name="MakeSphericalDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>267</width>
+    <height>217</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Sphere Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Vertex </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="vex_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Vector</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="QDoubleSpinBox" name="k_spb">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QSpinBox" name="nb_spb">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>k</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>nb</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MakeTranslation_QTD.ui b/src/HEXABLOCKGUI/MakeTranslation_QTD.ui
new file mode 100644 (file)
index 0000000..46d24b4
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MakeTranslationDialog</class>
+ <widget class="QDialog" name="MakeTranslationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>355</width>
+    <height>295</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Translation Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Translate</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>Elements : </string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="elt_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>Vector : </string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="vec_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="2" column="0">
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>40</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>MakeTranslationDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>MakeTranslationDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Makefile.am b/src/HEXABLOCKGUI/Makefile.am
new file mode 100755 (executable)
index 0000000..4fe6038
--- /dev/null
@@ -0,0 +1,219 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+# salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+SUBDIRS = MyDlgRef
+
+# header files 
+salomeinclude_HEADERS = \
+       HEXABLOCKGUI_Export.hxx \
+       HEXABLOCKGUI.hxx
+
+# Libraries targets
+lib_LTLIBRARIES = libHEXABLOCK.la
+
+dist_libHEXABLOCK_la_SOURCES = \
+    Resource.hxx \
+    Resource.cxx \
+    HEXABLOCKGUI_Exception.hxx \
+    HEXABLOCKGUI_Exception.cxx \
+    HEXABLOCKGUI_Trace.hxx \
+    HEXABLOCKGUI_Trace.cxx \
+    HEXABLOCKGUI_Resource.hxx \
+    HEXABLOCKGUI_Resource.cxx \
+    HEXABLOCKGUI_DocumentGraphicView.hxx \
+    HEXABLOCKGUI_DocumentGraphicView.cxx \
+    HEXABLOCKGUI_DocumentModel.hxx \
+    HEXABLOCKGUI_DocumentModel.cxx \
+    HEXABLOCKGUI_DocumentSelectionModel.hxx \
+    HEXABLOCKGUI_DocumentSelectionModel.cxx \
+    HEXABLOCKGUI_DocumentItem.hxx \
+    HEXABLOCKGUI_DocumentItem.cxx \
+    HEXABLOCKGUI_DocumentDelegate.hxx \
+    HEXABLOCKGUI_DocumentDelegate.cxx \
+    HEXABLOCKGUI_DocumentPanel.hxx \
+    HEXABLOCKGUI_DocumentPanel.cxx \
+    HEXABLOCKGUI_SalomeTools.hxx \
+    HEXABLOCKGUI_SalomeTools.cxx \
+    HEXABLOCKGUI.hxx \
+    HEXABLOCKGUI.cxx \
+    kmodelindexproxymapper.hxx \
+    kmodelindexproxymapper.cxx \
+    klinkitemselectionmodel.hxx \
+    klinkitemselectionmodel.cxx \
+    MyGEOMBase_Helper.hxx \
+    MyGEOMBase_Helper.cxx \
+    MyGEOMBase_Skeleton.hxx \
+    MyGEOMBase_Skeleton.cxx \
+    MyBasicGUI_PointDlg.hxx \
+    MyBasicGUI_PointDlg.cxx
+
+
+UIC_FILES = \
+       ui_Vertex_QTD.h \
+       ui_Edge_QTD.h \
+       ui_Quad_QTD.h \
+       ui_Hexa_QTD.h \
+       ui_Vector_QTD.h \
+       ui_Cylinder_QTD.h \
+       ui_Pipe_QTD.h \
+       ui_MakeGrid_QTD.h \
+       ui_MakeCylinder_QTD.h \
+       ui_MakePipe_QTD.h \
+       ui_MakeCylinders_QTD.h \
+       ui_MakePipes_QTD.h \
+       ui_RemoveHexa_QTD.h \
+       ui_PrismQuad_QTD.h \
+       ui_JoinQuad_QTD.h \
+       ui_Merge_QTD.h \
+       ui_Disconnect_QTD.h \
+       ui_CutEdge_QTD.h \
+       ui_Transformation_QTD.h \
+       ui_Symmetry_QTD.h \
+       ui_Group_QTD.h \
+       ui_Law_QTD.h \
+       ui_Propagation_QTD.h \
+       ui_QuadAssoc_QTD.h \
+       ui_EdgeAssoc_QTD.h \
+       ui_QuadRevolution_QTD.h \
+       ui_MakeRind_QTD.h \
+       ui_ReplaceHexa_QTD.h \
+       ui_MakeHemiSphere_QTD.h
+
+
+# MOC pre-processing
+MOC_FILES = \
+    HEXABLOCKGUI_moc.cxx \
+    HEXABLOCKGUI_DocumentGraphicView_moc.cxx \
+    HEXABLOCKGUI_DocumentPanel_moc.cxx \
+    HEXABLOCKGUI_DocumentDelegate_moc.cxx \
+    HEXABLOCKGUI_DocumentSelectionModel_moc.cxx \
+    HEXABLOCKGUI_DocumentModel_moc.cxx \
+    kmodelindexproxymapper_moc.cxx \
+    klinkitemselectionmodel_moc.cxx \
+    MyBasicGUI_PointDlg_moc.cxx \
+    MyGEOMBase_Skeleton_moc.cxx
+
+nodist_libHEXABLOCK_la_SOURCES = $(MOC_FILES) \
+                       $(UIC_FILES)
+
+libHEXABLOCK_la_CXXFLAGS = \
+       $(THREAD_DEF) \
+       $(PYTHON_CPPFLAGS) \
+       $(OMNIORB_CXXFLAGS) \
+       $(OMNIORB_INCLUDES) \
+       $(LIBXML_INCLUDES) \
+       $(BOOST_CPPFLAGS) \
+       $(CAS_CPPFLAGS) \
+       $(VTK_INCLUDES) \
+       $(KERNEL_CXXFLAGS) \
+       $(GUI_CXXFLAGS) \
+       $(GEOM_CXXFLAGS) \
+       -I$(srcdir)/../HEXABLOCK \
+       -I$(srcdir)/../HEXABLOCK_I \
+       -I$(top_builddir) \
+       -I../../idl \
+       $(qt4_cppflags) \
+       $(qsci4_cppflags) \
+       -I$(srcdir)/../HEXABLOCKGUI/MyDlgRef \
+       -I$(top_builddir)/src/HEXABLOCKGUI/MyDlgRef
+
+
+
+libHEXABLOCK_la_LDFLAGS  = \
+       ./MyDlgRef/libMyDlgRef.la \
+       ../../idl/libSalomeIDLHEXABLOCK.la \
+       ../HEXABLOCK_I/libHEXABLOCKEngine.la \
+       ../HEXABLOCK/libHEXABLOCKimpl.la \
+        -L$(GUI_ROOT_DIR)/lib/salome -lEvent -L$(KERNEL_ROOT_DIR)/lib/salome \
+        $(qt4_ldflags) $(qsci4_ldflags) \
+       $(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA \
+       $(GUI_LDFLAGS) \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM -lGEOMBase -lBasicGUI \
+       -lSalomeApp
+
+
+libHEXABLOCK_la_LIBADD  = \
+       $(qt4_libs) $(qsci4_libs) \
+       -lSalomeApp
+
+BUILT_SOURCES = $(UIC_FILES)
+
+# resources files
+ICONS =  \
+       resources/SalomeApp.xml \
+       resources/HEXABLOCKCatalog.xml \
+       resources/ModuleHexablock.png \
+       resources/new_document.png \
+       resources/load_document.png \
+       resources/save_document.png \
+       resources/add_vertex.png \
+       resources/add_edge.png \
+       resources/add_quad.png \
+       resources/add_hexa.png \
+       resources/add_vector.png \
+       resources/add_cylinder.png \
+       resources/add_pipe.png \
+       resources/make_grid.png \
+       resources/make_cylinder.png \
+       resources/make_pipe.png \
+       resources/make_cylinders.png \
+       resources/make_pipes.png \
+       resources/remove_hexa.png \
+       resources/prism_quad.png \
+       resources/join_quad.png \
+       resources/merge.png \
+       resources/disconnect.png \
+       resources/cut_edge.png \
+       resources/make_transformation.png \
+       resources/make_symmetry.png \
+       resources/perform_transformation.png \
+       resources/perform_symmetry.png \
+       resources/assoc_vertex.png \
+       resources/assoc_edge.png \
+       resources/assoc_quad.png \
+       resources/add_group.png \
+       resources/remove_group.png \
+       resources/add_law.png \
+       resources/remove_law.png \
+       resources/set_propagation.png \
+       resources/compute_mesh.png \
+       resources/point2.png \
+       resources/pointonedge.png \
+       resources/select1.png \
+       resources/point3.png \
+       resources/point_line_intersection.png  \
+       resources/pointonface.png \
+       resources/line.png \
+       resources/build_wire.png \
+       resources/quad_revolution.png \
+       resources/replace_hexa.png \
+       resources/make_hemisphere.png
+
+QMFILES = \
+       HEXABLOCK_msg_en.qm \
+       HEXABLOCK_msg_fr.qm \
+       HEXABLOCK_icons.qm
+
+dist_salomeres_DATA = ${ICONS}
+
+nodist_salomeres_DATA = $(QMFILES)
diff --git a/src/HEXABLOCKGUI/MergeEdges_QTD.ui b/src/HEXABLOCKGUI/MergeEdges_QTD.ui
new file mode 100644 (file)
index 0000000..38ecb87
--- /dev/null
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MergeEdgesDialog</class>
+ <widget class="QDialog" name="MergeEdgesDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>431</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Merge Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>MergeEdges</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>Edge 1</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="e0_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>Edge 2</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="e1_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QLabel" name="label_3">
+          <property name="text">
+           <string>Vertex 1</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="v0_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <widget class="QLabel" name="label_4">
+          <property name="text">
+           <string>Vertex 2</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="v1_le">
+          <property name="minimumSize">
+           <size>
+            <width>127</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>220</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MergeVertices_QTD.ui b/src/HEXABLOCKGUI/MergeVertices_QTD.ui
new file mode 100644 (file)
index 0000000..e256ea5
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MergeVerticesDialog</class>
+ <widget class="QDialog" name="MergeVerticesDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>304</width>
+    <height>360</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>MergeVertices</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>Vertex 1</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="v0_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>Vertex 2</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="v1_le">
+          <property name="maximumSize">
+           <size>
+            <width>127</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="readOnly">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="2" column="0">
+       <spacer name="verticalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>261</width>
+          <height>207</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Merge_QTD.ui b/src/HEXABLOCKGUI/Merge_QTD.ui
new file mode 100644 (file)
index 0000000..0f9e932
--- /dev/null
@@ -0,0 +1,499 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MergeDialog</class>
+ <widget class="QDialog" name="MergeDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>254</width>
+    <height>524</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string> Merge Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Merge</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Vertex</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Edge</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb2">
+        <property name="text">
+         <string>Quad</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>vertex 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="v0_le_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>vertex 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="v1_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>edge 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="e0_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>edge 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="e1_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>vertex 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="v0_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>vertex 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="v1_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_3" native="true">
+        <layout class="QFormLayout" name="formLayout_3">
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="q0_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="q1_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="v0_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="label_10">
+           <property name="text">
+            <string>vertex 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QLineEdit" name="v1_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="0">
+          <widget class="QLabel" name="label_11">
+           <property name="text">
+            <string>vertex 3</string>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="QLineEdit" name="v2_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="0">
+          <widget class="QLabel" name="label_12">
+           <property name="text">
+            <string>vertex 4</string>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="1">
+          <widget class="QLineEdit" name="v3_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>quad 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>quad 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>vertex 1</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>76</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>181</x>
+     <y>180</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>41</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>73</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>153</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>143</x>
+     <y>109</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>197</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>218</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>182</x>
+     <y>38</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>190</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>238</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>271</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>268</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>255</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>250</x>
+     <y>111</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx
new file mode 100644 (file)
index 0000000..327b66f
--- /dev/null
@@ -0,0 +1,1474 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MyBasicGUI_PointDlg.hxx"
+
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
+#include <GeometryGUI.h>
+#include <GEOMBase.h>
+
+#include "MyDlgRef.hxx"
+
+#include <GEOMImpl_Types.hxx>
+
+#include <QApplication>
+#include <QButtonGroup>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QRadioButton>
+#include <QMenu>
+#include <QTimer>
+
+#include <gp_Pnt.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopoDS.hxx>
+#include <BRep_Tool.hxx>
+#include <TopExp.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+
+
+#include <VTKViewer_ViewModel.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SalomeApp_Tools.h>
+#include <SalomeApp_Study.h>
+
+#include "HEXABLOCKGUI_DocumentModel.hxx"
+#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
+#include "HEXABLOCKGUI_DocumentItem.hxx"
+#include "HEXABLOCKGUI_SalomeTools.hxx"
+#include "HEXABLOCKGUI.hxx"
+
+#define PARAM_VALUE 0
+#define COORD_VALUE 1
+#define LENGTH_VALUE 2
+
+#define GEOM_POINT_XYZ    0
+#define GEOM_POINT_REF    1
+#define GEOM_POINT_EDGE   2
+#define GEOM_POINT_INTINT 3
+#define GEOM_POINT_SURF   4
+
+#define SPACING 6
+#define MARGIN  9
+
+using namespace HEXABLOCK::GUI;
+
+Q_DECLARE_METATYPE(QModelIndex);
+Q_DECLARE_METATYPE(HEXABLOCK::GUI::HexaTreeRole);
+
+enum { SelectEdge, SelectWire };
+
+//=================================================================================
+// class    : MyBasicGUI_PointDlg()
+// purpose  : Constructs a MyBasicGUI_PointDlg which is a child of 'parent', with the
+//            name 'name' and widget flags set to 'f'.
+//            The dialog will by default be modeless, unless you set 'modal' to
+//            TRUE to construct a modal dialog.
+//=================================================================================
+MyBasicGUI_PointDlg::MyBasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
+                                      bool modal, Qt::WindowFlags fl)
+  : MyGEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
+    myBusy (false),
+    _documentModel(0),
+    _patternDataSelectionModel(0),
+    _mgr(0),
+    _vtkVm(0),
+    _occVm(0),
+    _currentObj(0),
+    _selectionMutex(false)
+{
+  QWidget* w = centralWidget();
+  QString objectName = w->objectName();
+  QString className = w->metaObject()->className();
+  MESSAGE("*  centralWidget() " << w );
+  MESSAGE("*  centralWidget()->objectName() is "<< objectName.toStdString() ); //toStdString()
+  MESSAGE("*  centralWidget()->metaObject()->className() is "<< className.toStdString() );
+;
+  SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+  QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_POINT")));
+  QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_POINT_EDGE")));
+  QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
+  QPixmap image3 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_POINT_REF")));
+  QPixmap image4 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_POINT_LINES")));
+  QPixmap image5 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_POINT_FACE")));
+  QPixmap image6 (aResMgr->loadPixmap("GEOM", tr("ICO_LINE")));
+  QPixmap image7 (aResMgr->loadPixmap("GEOM", tr("ICO_WIRE")));
+
+//   setWindowTitle(tr("GEOM_POINT_TITLE"));
+  setWindowTitle( tr("Vertex Association") );
+  setMinimumWidth(260);
+
+
+
+
+  mainFrame()->GroupConstructors->setTitle(tr("GEOM_POINTS"));
+  mainFrame()->RadioButton1->setIcon(image0);
+  mainFrame()->RadioButton2->setIcon(image3);
+  mainFrame()->RadioButton3->setIcon(image1);
+  mainFrame()->RadioButton4->show();
+  mainFrame()->RadioButton4->setIcon(image4);
+  mainFrame()->RadioButton5->show();
+  mainFrame()->RadioButton5->setIcon(image5);
+
+  myParamGroup = new QGroupBox(centralWidget());
+  myParamCoord = new QButtonGroup(myParamGroup);
+  QHBoxLayout* boxLayout = new QHBoxLayout(myParamGroup);
+  boxLayout->setMargin(MARGIN); boxLayout->setSpacing(SPACING);
+  QRadioButton* btn = new QRadioButton(tr("GEOM_PARAM_VALUE"), myParamGroup);
+  myParamCoord->addButton(btn, PARAM_VALUE);
+  boxLayout->addWidget(btn);
+  btn = new QRadioButton(tr("GEOM_LENGTH_VALUE"), myParamGroup);
+  myParamCoord->addButton(btn, LENGTH_VALUE);
+  boxLayout->addWidget(btn);
+  btn = new QRadioButton(tr("GEOM_COORD_VALUE"), myParamGroup);
+  myParamCoord->addButton(btn, COORD_VALUE);
+  boxLayout->addWidget(btn);
+  myParamCoord->setExclusive(true);
+  myParamCoord->button(PARAM_VALUE)->setChecked(true);
+
+  GroupXYZ = new DlgRef_3Spin(centralWidget());
+  GroupXYZ->GroupBox1->setTitle(tr("GEOM_COORDINATES"));
+  GroupXYZ->TextLabel1->setText(tr("GEOM_X"));
+  GroupXYZ->TextLabel2->setText(tr("GEOM_Y"));
+  GroupXYZ->TextLabel3->setText(tr("GEOM_Z"));
+
+  GroupOnCurve = new DlgRef_2Sel1Spin(centralWidget());
+  GroupOnCurve->GroupBox1->setTitle(tr("GEOM_POINT_ON_EDGE"));
+  GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE"));
+  GroupOnCurve->TextLabel2->setText(tr("GEOM_START_POINT"));
+  GroupOnCurve->TextLabel3->setText(tr("GEOM_PARAMETER"));
+  GroupOnCurve->PushButton1->setIcon(image2);
+  GroupOnCurve->PushButton2->setIcon(image2);
+
+  GroupOnSurface = new DlgRef_1Sel2Spin(centralWidget());
+  GroupOnSurface->GroupBox1->setTitle(tr("GEOM_POINT_ON_FACE"));
+  GroupOnSurface->TextLabel1->setText(tr("GEOM_FACE"));
+  GroupOnSurface->TextLabel2->setText(tr("GEOM_UPARAMETER"));
+  GroupOnSurface->TextLabel3->setText(tr("GEOM_VPARAMETER"));
+  GroupOnSurface->PushButton1->setIcon(image2);
+
+  GroupRefPoint = new DlgRef_1Sel3Spin(centralWidget());
+  GroupRefPoint->GroupBox1->setTitle(tr("GEOM_REF_POINT"));
+  GroupRefPoint->TextLabel1->setText(tr("GEOM_POINT"));
+  GroupRefPoint->PushButton1->setIcon(image2);
+  GroupRefPoint->TextLabel2->setText(tr("GEOM_DX"));
+  GroupRefPoint->TextLabel3->setText(tr("GEOM_DY"));
+  GroupRefPoint->TextLabel4->setText(tr("GEOM_DZ"));
+
+  /* popup menu for line intersect buttons */
+  myBtnPopup = new QMenu(this);
+  QIcon ico_line = QIcon(image6);
+  QIcon ico_wire = QIcon(image7);
+  myActions[myBtnPopup->addAction(ico_line, tr("GEOM_EDGE"))] = SelectEdge;
+  myActions[myBtnPopup->addAction(ico_wire, tr("GEOM_WIRE"))] = SelectWire;
+
+  GroupLineIntersection = new DlgRef_2Sel(centralWidget());
+  GroupLineIntersection->GroupBox1->setTitle(tr("GEOM_LINE_INTERSECTION"));
+  GroupLineIntersection->TextLabel1->setText(tr("GEOM_LINE1"));
+  GroupLineIntersection->TextLabel2->setText(tr("GEOM_LINE2"));
+  GroupLineIntersection->PushButton1->setIcon(image2);
+  GroupLineIntersection->PushButton1->setMenu(myBtnPopup);
+  GroupLineIntersection->PushButton2->setIcon(image2);
+  GroupLineIntersection->PushButton2->setMenu(myBtnPopup);
+  GroupLineIntersection->LineEdit2->setEnabled(false);
+
+  myCoordGrp = new QGroupBox(tr("GEOM_COORDINATES_RES"), centralWidget());
+  QGridLayout* myCoordGrpLayout = new QGridLayout(myCoordGrp);
+  myCoordGrpLayout->addWidget(new QLabel(tr("GEOM_X"), myCoordGrp), 0, 0);
+  myX = new QLineEdit(myCoordGrp);
+  myCoordGrpLayout->addWidget(myX, 0, 1);
+  myCoordGrpLayout->addWidget(new QLabel(tr("GEOM_Y"), myCoordGrp), 1, 0);
+  myY = new QLineEdit(myCoordGrp);
+  myCoordGrpLayout->addWidget(myY, 1, 1);
+  myCoordGrpLayout->addWidget(new QLabel(tr("GEOM_Z"), myCoordGrp), 2, 0);
+  myZ = new QLineEdit(myCoordGrp);
+  myCoordGrpLayout->addWidget(myZ, 2, 1);
+
+  QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+  layout->setMargin(0); layout->setSpacing(6);
+  layout->addWidget(myParamGroup);
+  layout->addWidget(GroupXYZ);
+  layout->addWidget(GroupOnCurve);
+  layout->addWidget(GroupOnSurface);
+  layout->addWidget(GroupRefPoint);
+  layout->addWidget(GroupLineIntersection);
+  layout->addWidget(myCoordGrp);
+
+
+  myX->setReadOnly(true);
+  myY->setReadOnly(true);
+  myZ->setReadOnly(true);
+
+  myX->setEnabled(false);
+  myY->setEnabled(false);
+  myZ->setEnabled(false);
+
+  QPalette aPal = myX->palette();
+  aPal.setColor(QPalette::Disabled, QPalette::Text, QColor(0, 0, 0));
+  myX->setPalette(aPal);
+  myY->setPalette(aPal);
+  myZ->setPalette(aPal);
+
+  setHelpFileName("gui_asso_quad_to_geom.html#associate-to-a-vertex-of-the-geometry");/*"create_point_page.html"*/
+
+  Init();
+
+  /* HEXABLOCK */
+  _initInputWidget();
+  _initViewManager();
+  /* HEXABLOCK */
+}
+
+
+//=================================================================================
+// function : ~MyBasicGUI_PointDlg()
+// purpose  : Destructor
+//=================================================================================
+MyBasicGUI_PointDlg::~MyBasicGUI_PointDlg()
+{
+}
+
+
+
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::Init()
+{
+  MESSAGE("MyBasicGUI_PointDlg::Init() ");
+
+  GroupOnCurve->LineEdit1->setReadOnly(true);
+  GroupOnCurve->LineEdit2->setReadOnly(true);
+  GroupOnSurface->LineEdit1->setReadOnly(true);
+  GroupRefPoint->LineEdit1->setReadOnly(true);
+  GroupLineIntersection->LineEdit1->setReadOnly(true);
+  GroupLineIntersection->LineEdit2->setReadOnly(true);
+  GroupLineIntersection->LineEdit1->setEnabled(true);
+  GroupLineIntersection->LineEdit2->setEnabled(false);
+
+  myEdge.nullify();
+  myFace.nullify();
+  myRefPoint.nullify();
+  myLine1.nullify();
+  myLine2.nullify();
+  myNeedType = TopAbs_VERTEX;
+
+  myEditCurrentArgument = 0;
+
+  /* Get setting of step value from file configuration */
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
+
+  /* min, max, step and decimals for spin boxes */
+  initSpinBox(GroupXYZ->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision");
+  initSpinBox(GroupXYZ->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision");
+  initSpinBox(GroupXYZ->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision");
+  GroupXYZ->SpinBox_DX->setValue(0.0);
+  GroupXYZ->SpinBox_DY->setValue(0.0);
+  GroupXYZ->SpinBox_DZ->setValue(0.0);
+
+  initSpinBox(GroupRefPoint->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision");
+  initSpinBox(GroupRefPoint->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision");
+  initSpinBox(GroupRefPoint->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision");
+  GroupRefPoint->SpinBox_DX->setValue(0.0);
+  GroupRefPoint->SpinBox_DY->setValue(0.0);
+  GroupRefPoint->SpinBox_DZ->setValue(0.0);
+
+  step = 0.1;
+
+  initSpinBox(GroupOnCurve->SpinBox_DX, 0., 1., step, "parametric_precision");
+  GroupOnCurve->SpinBox_DX->setValue(0.5);
+
+  initSpinBox(GroupOnSurface->SpinBox_DX, 0., 1., step, "parametric_precision");
+  GroupOnSurface->SpinBox_DX->setValue(0.5);
+  initSpinBox(GroupOnSurface->SpinBox_DY, 0., 1., step, "parametric_precision");
+  GroupOnSurface->SpinBox_DY->setValue(0.5);
+
+  MESSAGE("MyBasicGUI_PointDlg::Init() : myGeomGUI " << myGeomGUI);
+  /* signals and slots connections */
+  if ( myGeomGUI ){
+    connect(myGeomGUI,      SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+    connect(myGeomGUI,      SIGNAL(SignalCloseAllDialogs()),        this, SLOT(ClickOnCancel()));
+  }
+  //connect(buttonOk(),     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+  connect(buttonApply(),  SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+  connect(this,           SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
+
+  connect(myParamCoord,   SIGNAL(buttonClicked(int)), this, SLOT(ClickParamCoord(int)));
+
+  connect(GroupOnCurve->PushButton1,          SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupOnCurve->PushButton2,          SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupOnSurface->PushButton1,        SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupLineIntersection->PushButton1, SIGNAL(pressed()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupLineIntersection->PushButton2, SIGNAL(pressed()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(myBtnPopup, SIGNAL(triggered(QAction*)), this, SLOT(onBtnPopup(QAction*)));
+
+  connect(GroupOnCurve->SpinBox_DX,   SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupOnSurface->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupOnSurface->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupXYZ->SpinBox_DX,       SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupXYZ->SpinBox_DY,       SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupXYZ->SpinBox_DZ,       SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupRefPoint->SpinBox_DX,  SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupRefPoint->SpinBox_DY,  SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(GroupRefPoint->SpinBox_DZ,  SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+
+  if ( myGeomGUI ){
+    connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this,  SLOT(SetDoubleSpinBoxStep(double)));
+
+    connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+            this,  SLOT(SelectionIntoArgument()));
+  }
+
+  initName(tr("GEOM_VERTEX"));
+
+  ConstructorsClicked(0);
+}
+
+//=================================================================================
+// function : SetDoubleSpinBoxStep()
+// purpose  : Double spin box management
+//=================================================================================
+void MyBasicGUI_PointDlg::SetDoubleSpinBoxStep(double step)
+{
+  GroupOnCurve->SpinBox_DX->setSingleStep(step);
+  GroupXYZ->SpinBox_DX->setSingleStep(step);
+  GroupXYZ->SpinBox_DY->setSingleStep(step);
+  GroupXYZ->SpinBox_DZ->setSingleStep(step);
+  GroupRefPoint->SpinBox_DX->setSingleStep(step);
+  GroupRefPoint->SpinBox_DY->setSingleStep(step);
+  GroupRefPoint->SpinBox_DZ->setSingleStep(step);
+}
+
+
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose  : Radio button management
+//=================================================================================
+void MyBasicGUI_PointDlg::ConstructorsClicked(int constructorId)
+{
+//   HEXABLOCKGUI::currentOccView->raise();
+//   HEXABLOCKGUI::currentOccView->setFocus();
+  MESSAGE("MyBasicGUI_PointDlg::ConstructorsClicked("<< constructorId << ")");
+  switch (constructorId) {
+  case GEOM_POINT_XYZ:
+    {
+      globalSelection(); // close local contexts, if any
+      myNeedType = TopAbs_VERTEX;
+      localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+
+      GroupRefPoint->hide();
+      GroupOnCurve->hide();
+      GroupLineIntersection->hide();
+      GroupOnSurface->hide();
+      myCoordGrp->hide();
+      myParamGroup->hide();
+      GroupXYZ->show();
+      break;
+    }
+  case GEOM_POINT_REF:
+    {
+      globalSelection(); // close local contexts, if any
+      myNeedType = TopAbs_VERTEX;
+      localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+
+      myEditCurrentArgument = GroupRefPoint->LineEdit1;
+      //myEditCurrentArgument->setText("");
+      //myRefPoint.nullify();
+      GroupRefPoint->PushButton1->setDown(true);
+      myParamGroup->hide();
+      GroupXYZ->hide();
+      GroupOnCurve->hide();
+      GroupLineIntersection->hide();
+      GroupOnSurface->hide();
+      GroupRefPoint->show();
+      myCoordGrp->show();
+      break;
+    }
+  case GEOM_POINT_EDGE:
+    {
+      globalSelection(); // close local contexts, if any
+      myNeedType = TopAbs_EDGE;
+      localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+
+      myEditCurrentArgument = GroupOnCurve->LineEdit1;
+//      myEditCurrentArgument->setText("");
+//      myEdge.nullify();
+//      myRefPoint.nullify();
+      GroupOnCurve->PushButton1->setDown(true);
+      GroupRefPoint->hide();
+      GroupLineIntersection->hide();
+      GroupOnSurface->hide();
+      myParamGroup->show();
+      myParamCoord->button(LENGTH_VALUE)->show();
+      myParamCoord->button(PARAM_VALUE)->setChecked(true);
+      GroupOnCurve->show();
+      myCoordGrp->show();
+      updateParamCoord(false);
+      break;
+    }
+  case GEOM_POINT_INTINT:
+    {
+      globalSelection(); // close local contexts, if any
+      myNeedType = TopAbs_EDGE;
+      localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+
+      myEditCurrentArgument = GroupLineIntersection->LineEdit1;
+//      GroupLineIntersection->LineEdit1->setText("");
+//      GroupLineIntersection->LineEdit2->setText("");
+      GroupLineIntersection->LineEdit1->setEnabled(true);
+      GroupLineIntersection->LineEdit2->setEnabled(false);
+//      myLine1.nullify();
+//      myLine2.nullify();
+      GroupLineIntersection->PushButton1->setDown(true);
+      GroupLineIntersection->PushButton2->setDown(false);
+      myParamGroup->hide();
+      GroupXYZ->hide();
+      GroupRefPoint->hide();
+      GroupOnCurve->hide();
+      GroupOnSurface->hide();
+      myCoordGrp->hide();
+      GroupLineIntersection->show();
+      break;
+    }
+  case GEOM_POINT_SURF:
+    {
+      globalSelection(); // close local contexts, if any
+      myNeedType = TopAbs_FACE;
+      localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+
+      myEditCurrentArgument = GroupOnSurface->LineEdit1;
+      //myEditCurrentArgument->setText("");
+      //myFace.nullify();
+      GroupOnSurface->PushButton1->setDown(true);
+      GroupRefPoint->hide();
+      GroupOnCurve->hide();
+      GroupLineIntersection->hide();
+      myParamGroup->show();
+      myParamCoord->button(LENGTH_VALUE)->hide();
+      myParamCoord->button(PARAM_VALUE)->setChecked(true);
+      GroupOnSurface->show();
+      myCoordGrp->show();
+      updateParamCoord(false);
+      break;
+    }
+  }
+
+//  myX->setText("");
+//  myY->setText("");
+//  myZ->setText("");
+
+  QTimer::singleShot(50, this, SLOT(updateSize()));
+
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::ClickOnOk()
+{
+  setIsApplyAndClose(true);
+  if (onAccept())
+    ClickOnCancel();
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+bool MyBasicGUI_PointDlg::ClickOnApply()
+{
+  if (!onAccept())
+    return false;
+
+  initName();
+  ConstructorsClicked(getConstructorId());
+
+  return true;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed (for constructors not using local context)
+//=================================================================================
+void MyBasicGUI_PointDlg::SelectionIntoArgument()
+{
+       MESSAGE("MyBasicGUI_PointDlg::SelectionIntoArgument() myGeomGUI : "<< myGeomGUI);
+
+       GEOM::GeomObjPtr aSelectedObject = getSelected(myNeedType);
+       TopoDS_Shape aShape;
+       if (!aSelectedObject || !GEOMBase::GetShape(aSelectedObject.get(), aShape) || aShape.IsNull())
+               return;
+
+       erasePreview();
+       const int id = getConstructorId();
+
+       if ((id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF)
+                       && myEditCurrentArgument != 0)
+       {
+               myEditCurrentArgument->setText("");
+               myX->setText("");
+               myY->setText("");
+               myZ->setText("");
+               myFace.nullify();
+               if (myEditCurrentArgument == GroupOnCurve->LineEdit1)
+                       myEdge.nullify();
+               else if (myEditCurrentArgument == GroupOnCurve->LineEdit2)
+                       myRefPoint.nullify();
+       }
+       else if (id == GEOM_POINT_INTINT) {
+               myEditCurrentArgument->setText("");
+               if (myEditCurrentArgument == GroupLineIntersection->LineEdit1)
+                       myLine1.nullify();
+               else if (myEditCurrentArgument == GroupLineIntersection->LineEdit2)
+                       myLine2.nullify();
+       }
+
+       QString aName = GEOMBase::GetName(aSelectedObject.get());
+       myBusy = true;
+       if (id == GEOM_POINT_XYZ) {
+               gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShape));
+               GroupXYZ->SpinBox_DX->setValue(aPnt.X());
+               GroupXYZ->SpinBox_DY->setValue(aPnt.Y());
+               GroupXYZ->SpinBox_DZ->setValue(aPnt.Z());
+       }
+       else if (id == GEOM_POINT_REF) {
+               myRefPoint = aSelectedObject;
+               GroupRefPoint->LineEdit1->setText(aName);
+       }
+       else if (id == GEOM_POINT_EDGE) {
+               myEditCurrentArgument->setText(aName);
+               if (myEditCurrentArgument == GroupOnCurve->LineEdit1) {
+                       myEdge = aSelectedObject;
+                       if (myEdge && !myRefPoint) {
+                               GroupOnCurve->PushButton2->click();
+                       }
+               }
+               else if (myEditCurrentArgument == GroupOnCurve->LineEdit2) {
+                       myRefPoint = aSelectedObject;
+                       if (myRefPoint && !myEdge) {
+                               GroupOnCurve->PushButton1->click();
+                       }
+               }
+       }
+       else if (id == GEOM_POINT_INTINT) {
+               myEditCurrentArgument->setText(aName);
+               if (myEditCurrentArgument == GroupLineIntersection->LineEdit1) {
+                       myLine1 = aSelectedObject;
+                       if (!myLine2) {
+                               GroupLineIntersection->PushButton2->setMenu(0);
+                               GroupLineIntersection->PushButton2->click();
+                               GroupLineIntersection->PushButton2->setDown(true);
+                               GroupLineIntersection->PushButton2->setMenu(myBtnPopup);
+                       }
+               }
+               else if (myEditCurrentArgument == GroupLineIntersection->LineEdit2) {
+                       myLine2 = aSelectedObject;
+                       if (!myLine1) {
+                               GroupLineIntersection->PushButton1->setMenu(0);
+                               GroupLineIntersection->PushButton1->click();
+                               GroupLineIntersection->PushButton1->setDown(true);
+                               GroupLineIntersection->PushButton1->setMenu(myBtnPopup);
+                       }
+               }
+       }
+       else if (id == GEOM_POINT_SURF) {
+               myFace = aSelectedObject;
+               GroupOnSurface->LineEdit1->setText(aName);
+       }
+       myBusy = false;
+
+
+       displayPreview(true);
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if (send == GroupRefPoint->PushButton1) {
+    GroupRefPoint->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupRefPoint->LineEdit1;
+    globalSelection(); // close local contexts, if any
+    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+  }
+  else if (send == GroupOnCurve->PushButton1) {
+    GroupOnCurve->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupOnCurve->LineEdit1;
+    globalSelection(); // close local contexts, if any
+    myNeedType = TopAbs_EDGE;
+    localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+    GroupOnCurve->PushButton2->setDown(false);
+    GroupOnCurve->LineEdit1->setEnabled(true);
+    GroupOnCurve->LineEdit2->setEnabled(false);
+  }
+  else if (send == GroupOnCurve->PushButton2) {
+    GroupOnCurve->LineEdit2->setFocus();
+    myEditCurrentArgument = GroupOnCurve->LineEdit2;
+    globalSelection(); // close local contexts, if any
+    myNeedType = TopAbs_VERTEX;
+    localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+    GroupOnCurve->PushButton1->setDown(false);
+    GroupOnCurve->LineEdit2->setEnabled(true);
+    GroupOnCurve->LineEdit1->setEnabled(false);
+  }
+  else if (send == GroupOnSurface->PushButton1)
+  {
+    GroupOnSurface->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupOnSurface->LineEdit1;
+    globalSelection(); // close local contexts, if any
+    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE);
+  }
+  else if (send == GroupLineIntersection->PushButton1) {
+    GroupLineIntersection->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupLineIntersection->LineEdit1;
+    GroupLineIntersection->PushButton2->setDown(false);
+    GroupLineIntersection->LineEdit1->setEnabled(true);
+    GroupLineIntersection->LineEdit2->setEnabled(false);
+  }
+  else if (send == GroupLineIntersection->PushButton2) {
+    GroupLineIntersection->LineEdit2->setFocus();
+    myEditCurrentArgument = GroupLineIntersection->LineEdit2;
+    GroupLineIntersection->PushButton1->setDown(false);
+    GroupLineIntersection->LineEdit1->setEnabled(false);
+    GroupLineIntersection->LineEdit2->setEnabled(true);
+  }
+  send->setDown(true);
+
+  if ((send == GroupLineIntersection->PushButton1 ||
+         send == GroupLineIntersection->PushButton2) && !myBusy)
+    SelectionIntoArgument();
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  : to reactivate this dialog box when mouse enter onto the window
+//=================================================================================
+void MyBasicGUI_PointDlg::enterEvent(QEvent*)
+{
+  MESSAGE( "MyBasicGUI_PointDlg::enterEvent() ");
+  if (!mainFrame()->GroupConstructors->isEnabled())
+    ActivateThisDialog();
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::ActivateThisDialog()
+{
+  MESSAGE( "MyBasicGUI_PointDlg::ActivateThisDialog() ");
+  MyGEOMBase_Skeleton::ActivateThisDialog();
+
+  if ( myGeomGUI ){
+    connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+            this, SLOT(SelectionIntoArgument()));
+  }
+  ConstructorsClicked(getConstructorId());
+}
+
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose  : public slot to deactivate if active
+//=================================================================================
+void MyBasicGUI_PointDlg::DeactivateActiveDialog()
+{
+  MESSAGE( "MyBasicGUI_PointDlg::DeactivateActiveDialog() ");
+  // myGeomGUI->SetState(-1);
+  MyGEOMBase_Skeleton::DeactivateActiveDialog();
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
+{
+  displayPreview(true);
+}
+
+//=================================================================================
+// function : CheckBoxClicked()
+// purpose  : Check Boxes Management
+//=================================================================================
+void MyBasicGUI_PointDlg::CheckBoxClicked(int  State)
+{
+  displayPreview(true);
+}
+
+
+//=================================================================================
+// funcion  : getParameter()
+// purpose  :
+//=================================================================================
+double MyBasicGUI_PointDlg::getParameter() const
+{
+  return GroupOnCurve->SpinBox_DX->value();
+}
+
+
+//=================================================================================
+// funcion  : getUParameter()
+// purpose  :
+//=================================================================================
+double MyBasicGUI_PointDlg::getUParameter() const
+{
+  return GroupOnSurface->SpinBox_DX->value();
+}
+
+
+//=================================================================================
+// funcion  : getVParameter()
+// purpose  :
+//=================================================================================
+double MyBasicGUI_PointDlg::getVParameter() const
+{
+  return GroupOnSurface->SpinBox_DY->value();
+}
+
+
+//=================================================================================
+// function : OnPointSelected
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::OnPointSelected(const gp_Pnt& thePnt)
+{
+  if (getConstructorId() == GEOM_POINT_XYZ) {
+    GroupXYZ->SpinBox_DX->setValue(thePnt.X());
+    GroupXYZ->SpinBox_DY->setValue(thePnt.Y());
+    GroupXYZ->SpinBox_DZ->setValue(thePnt.Z());
+
+    displayPreview(true);
+  }
+}
+
+//=================================================================================
+// function : createOperation
+// purpose  :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr MyBasicGUI_PointDlg::createOperation()
+{
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations(getStudyId());
+}
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool MyBasicGUI_PointDlg::isValid(QString& msg)
+{
+  bool ok = false;
+  switch (getConstructorId()) {
+  case GEOM_POINT_XYZ :
+    ok = GroupXYZ->SpinBox_DX->isValid(msg, !IsPreview()) &&
+         GroupXYZ->SpinBox_DY->isValid(msg, !IsPreview()) &&
+         GroupXYZ->SpinBox_DZ->isValid(msg, !IsPreview());
+    break;
+  case GEOM_POINT_REF:
+    ok = GroupRefPoint->SpinBox_DX->isValid(msg, !IsPreview()) &&
+         GroupRefPoint->SpinBox_DY->isValid(msg, !IsPreview()) &&
+         GroupRefPoint->SpinBox_DZ->isValid(msg, !IsPreview()) &&
+         myRefPoint;
+    break;
+  case GEOM_POINT_EDGE:
+    if (myParamCoord->checkedId() == PARAM_VALUE || myParamCoord->checkedId() == LENGTH_VALUE)
+      ok = GroupOnCurve->SpinBox_DX->isValid(msg, !IsPreview());
+    else
+      ok = GroupXYZ->SpinBox_DX->isValid(msg, !IsPreview()) &&
+           GroupXYZ->SpinBox_DY->isValid(msg, !IsPreview()) &&
+           GroupXYZ->SpinBox_DZ->isValid(msg, !IsPreview());
+    ok = myEdge && ok;
+    break;
+  case GEOM_POINT_INTINT:
+    ok = myLine1 && myLine2;
+    break;
+  case GEOM_POINT_SURF:
+    if (myParamCoord->checkedId() == PARAM_VALUE)
+      ok = GroupOnSurface->SpinBox_DX->isValid(msg, !IsPreview()) &&
+           GroupOnSurface->SpinBox_DY->isValid(msg, !IsPreview());
+    else
+      ok = GroupXYZ->SpinBox_DX->isValid(msg, !IsPreview()) &&
+           GroupXYZ->SpinBox_DY->isValid(msg, !IsPreview()) &&
+           GroupXYZ->SpinBox_DZ->isValid(msg, !IsPreview());
+    ok = myFace && ok;
+    break;
+  default:
+    break;
+  }
+  return ok;
+}
+
+//=================================================================================
+// function : execute
+// purpose  :
+//=================================================================================
+bool MyBasicGUI_PointDlg::execute(ObjectList& objects)
+{
+  bool res = false;
+
+  GEOM::GEOM_Object_var anObj;
+  QStringList aParameters;
+
+  GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow(getOperation());
+
+  switch (getConstructorId()) {
+  case GEOM_POINT_XYZ :
+    {
+      double x = GroupXYZ->SpinBox_DX->value();
+      double y = GroupXYZ->SpinBox_DY->value();
+      double z = GroupXYZ->SpinBox_DZ->value();
+
+      aParameters << GroupXYZ->SpinBox_DX->text();
+      aParameters << GroupXYZ->SpinBox_DY->text();
+      aParameters << GroupXYZ->SpinBox_DZ->text();
+
+      anObj = anOper->MakePointXYZ(x, y, z);
+      res = true;
+      break;
+    }
+  case GEOM_POINT_REF :
+    {
+      double dx = GroupRefPoint->SpinBox_DX->value();
+      double dy = GroupRefPoint->SpinBox_DY->value();
+      double dz = GroupRefPoint->SpinBox_DZ->value();
+
+      aParameters << GroupRefPoint->SpinBox_DX->text();
+      aParameters << GroupRefPoint->SpinBox_DY->text();
+      aParameters << GroupRefPoint->SpinBox_DZ->text();
+
+      anObj = anOper->MakePointWithReference(myRefPoint.get(), dx, dy, dz);
+      res = true;
+      break;
+    }
+  case GEOM_POINT_EDGE :
+    {
+      if (myParamCoord->checkedId() == PARAM_VALUE) {
+        anObj = anOper->MakePointOnCurve(myEdge.get(), getParameter());
+        aParameters<<GroupOnCurve->SpinBox_DX->text();
+      }
+      else if (myParamCoord->checkedId() == LENGTH_VALUE) {
+        anObj = anOper->MakePointOnCurveByLength(myEdge.get(), getParameter(), myRefPoint.get());
+        aParameters<<GroupOnCurve->SpinBox_DX->text();
+      }
+      else if (myParamCoord->checkedId() == COORD_VALUE) {
+        double x = GroupXYZ->SpinBox_DX->value();
+        double y = GroupXYZ->SpinBox_DY->value();
+        double z = GroupXYZ->SpinBox_DZ->value();
+
+        aParameters << GroupXYZ->SpinBox_DX->text();
+        aParameters << GroupXYZ->SpinBox_DY->text();
+        aParameters << GroupXYZ->SpinBox_DZ->text();
+
+        anObj = anOper->MakePointOnCurveByCoord(myEdge.get(), x, y, z);
+      }
+      res = true;
+      break;
+    }
+  case GEOM_POINT_INTINT :
+    anObj = anOper->MakePointOnLinesIntersection(myLine1.get(), myLine2.get());
+    if (!anObj->_is_nil()) {
+      QString aName = getNewObjectName();
+      if (anObj->GetShapeType() == GEOM::COMPOUND && aName.startsWith("Vertex"))
+        initName(tr("GEOM_COMPOUND"));
+      else if (anObj->GetShapeType() == GEOM::VERTEX && aName.startsWith("Compound"))
+        initName(tr("GEOM_VERTEX"));
+    }
+    res = true;
+    break;
+  case GEOM_POINT_SURF :
+    {
+      if (myParamCoord->checkedId() == PARAM_VALUE) {
+        anObj = anOper->MakePointOnSurface(myFace.get(), getUParameter(), getVParameter());
+        aParameters<<GroupOnSurface->SpinBox_DX->text();
+        aParameters<<GroupOnSurface->SpinBox_DY->text();
+      } else {
+        double x = GroupXYZ->SpinBox_DX->value();
+        double y = GroupXYZ->SpinBox_DY->value();
+        double z = GroupXYZ->SpinBox_DZ->value();
+
+        aParameters << GroupXYZ->SpinBox_DX->text();
+        aParameters << GroupXYZ->SpinBox_DY->text();
+        aParameters << GroupXYZ->SpinBox_DZ->text();
+
+        anObj = anOper->MakePointOnSurfaceByCoord(myFace.get(), x, y, z);
+      }
+      res = true;
+      break;
+    }
+  }
+
+  const int id = getConstructorId();
+  if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ ||
+                                           id == GEOM_POINT_REF ||
+                                           id == GEOM_POINT_EDGE ||
+                                           id == GEOM_POINT_SURF)) {
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+  }
+
+  if (id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF) {
+    TopoDS_Shape aShape;
+    if (GEOMBase::GetShape(anObj, aShape) && !aShape.IsNull() &&
+         aShape.ShapeType() == TopAbs_VERTEX) {
+      gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShape));
+      SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+      int aPrecision = resMgr->integerValue("Geometry", "length_precision", 6);
+      myX->setText(DlgRef::PrintDoubleValue(aPnt.X(), aPrecision));
+      myY->setText(DlgRef::PrintDoubleValue(aPnt.Y(), aPrecision));
+      myZ->setText(DlgRef::PrintDoubleValue(aPnt.Z(), aPrecision));
+    }
+    else {
+      myX->setText("");
+      myY->setText("");
+      myZ->setText("");
+    }
+  }
+
+  if (!anObj->_is_nil()) {
+    objects.push_back(anObj._retn());
+  }
+
+  return res;
+}
+
+//=================================================================================
+// function : addSubshapeToStudy
+// purpose  : virtual method to add new SubObjects if local selection
+//=================================================================================
+void MyBasicGUI_PointDlg::addSubshapesToStudy()
+{
+  switch (getConstructorId()) {
+  case GEOM_POINT_REF:
+    GEOMBase::PublishSubObject(myRefPoint.get());
+    break;
+  case GEOM_POINT_EDGE:
+    GEOMBase::PublishSubObject(myEdge.get());
+    break;
+  case GEOM_POINT_INTINT:
+    GEOMBase::PublishSubObject(myLine1.get());
+    GEOMBase::PublishSubObject(myLine2.get());
+    break;
+  case GEOM_POINT_SURF:
+    GEOMBase::PublishSubObject(myFace.get());
+    break;
+  default:
+    break;
+  }
+}
+
+//=================================================================================
+// function : ClickParamCoord()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::ClickParamCoord(int id)
+{
+  updateParamCoord(true);
+  displayPreview(true);
+}
+
+//=================================================================================
+// function : updateParamCoord
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::updateParamCoord(bool theIsUpdate)
+{
+  bool isParam = myParamCoord->checkedId() == PARAM_VALUE;
+  bool isLength = myParamCoord->checkedId() == LENGTH_VALUE;
+
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
+
+  const int id = getConstructorId();
+  if (id == GEOM_POINT_EDGE) {
+    GroupOnCurve->TextLabel2->setVisible(isLength);
+    GroupOnCurve->PushButton2->setVisible(isLength);
+    GroupOnCurve->LineEdit2->setVisible(isLength);
+    GroupOnCurve->TextLabel3->setVisible(isParam || isLength);
+    GroupOnCurve->SpinBox_DX->setVisible(isParam || isLength);
+    if (isParam){
+      initSpinBox(GroupOnCurve->SpinBox_DX, 0., 1., 0.1, "parametric_precision");
+      GroupOnCurve->SpinBox_DX->setValue(0.5);
+      GroupOnCurve->TextLabel3->setText(tr("GEOM_PARAMETER"));
+    }
+    else if (isLength){
+      initSpinBox(GroupOnCurve->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision");
+      GroupOnCurve->SpinBox_DX->setValue(0.0);
+      GroupOnCurve->TextLabel3->setText(tr("GEOM_LENGTH"));
+    }
+  }
+  else if (id == GEOM_POINT_SURF) {
+    GroupOnSurface->TextLabel2->setShown(isParam);
+    GroupOnSurface->TextLabel3->setShown(isParam);
+    GroupOnSurface->SpinBox_DX->setShown(isParam);
+    GroupOnSurface->SpinBox_DY->setShown(isParam);
+  }
+
+  GroupXYZ->setShown(!isParam && !isLength);
+
+  if (theIsUpdate)
+    QTimer::singleShot(50, this, SLOT(updateSize()));
+}
+
+//=================================================================================
+// function : onBtnPopup()
+// purpose  :
+//=================================================================================
+void MyBasicGUI_PointDlg::onBtnPopup(QAction* a)
+{
+  globalSelection(); // close local contexts, if any
+  myNeedType = myActions[a] == SelectEdge ? TopAbs_EDGE : TopAbs_WIRE;
+  localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+}
+
+//=================================================================================
+// function : updateSize
+// purpose  : adjust dialog size to minimum
+//=================================================================================
+void MyBasicGUI_PointDlg::updateSize()
+{
+  qApp->processEvents();
+  updateGeometry();
+  resize(minimumSizeHint());
+}
+
+
+
+
+
+/*
+      HEXABLOCK
+*/
+
+
+
+void MyBasicGUI_PointDlg::setDocumentModel( HEXABLOCK::GUI::DocumentModel* m)
+{
+  _documentModel = m;
+}
+
+void MyBasicGUI_PointDlg::setPatternDataSelectionModel( HEXABLOCK::GUI::PatternDataSelectionModel* s)
+{
+  _patternDataSelectionModel = s;
+}
+
+void MyBasicGUI_PointDlg::_initInputWidget()
+{
+
+//   QVBoxLayout* mainLayout = new QVBoxLayout( centralWidget() );
+//   setLayout( mainLayout );
+//   QHBoxLayout* up   = new QHBoxLayout( centralWidget() );
+//   QVBoxLayout* down = new QVBoxLayout( centralWidget() );
+
+//   QGroupBox *GroupBoxName = new QGroupBox(centralWidget());
+//   GroupBoxName->setObjectName(QString::fromUtf8("GroupBoxName"));
+//   GroupBoxName->setTitle("Vertex");
+//   QHBoxLayout *hboxLayout1 = new QHBoxLayout(GroupBoxName);
+//   hboxLayout1->setSpacing(6);
+//   hboxLayout1->setContentsMargins(9, 9, 9, 9);
+//   hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
+//   QLabel *NameLabel = new QLabel(GroupBoxName);
+//   NameLabel->setObjectName(QString::fromUtf8("NameLabel"));
+//   NameLabel->setWordWrap(false);
+//   NameLabel->setText( "Name : " );
+//   hboxLayout1->addWidget( NameLabel );
+//   mainFrame()->_vertex_le = new QLineEdit( GroupBoxName );
+//   mainFrame()->_vertex_le->setObjectName(QString::fromUtf8("mainFrame()->_vertex_le"));
+//   hboxLayout1->addWidget(mainFrame()->_vertex_le);
+//
+//   layout()->addWidget( GroupBoxName );
+
+
+
+  QRegExp rx("");
+  QValidator *validator = new QRegExpValidator(rx, this);
+
+//   setProperty( "HexaWidgetType",  QVariant::fromValue(HEXABLOCK::GUI::VERTEX_TREE) );
+//   installEventFilter(this);
+
+  mainFrame()->_vertex_le->setProperty( "HexaWidgetType",  QVariant::fromValue(HEXABLOCK::GUI::VERTEX_TREE) );
+  mainFrame()->_vertex_le->installEventFilter(this);
+  mainFrame()->_vertex_le->setValidator( validator );
+}
+
+void MyBasicGUI_PointDlg::_initViewManager()
+{
+  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+  _mgr   = dynamic_cast<LightApp_SelectionMgr*>( anApp->selectionMgr() );
+  _vtkVm = anApp->getViewManager( SVTK_Viewer::Type(),      true );
+  _occVm = anApp->getViewManager( OCCViewer_Viewer::Type(), true );
+  SUIT_ViewManager* activeVm = anApp->activeViewManager();
+  onWindowActivated ( activeVm );
+}
+
+
+// bool MyBasicGUI_PointDlg::_onSelectionChanged( const QItemSelection& sel, QLineEdit*  le )
+// {
+//   MESSAGE("HexaBaseDialog::_onSelectionChanged(const QItemSelection& sel, QLineEdit*  le)");
+//   MESSAGE("*  le is "<< le->objectName().toStdString() );
+//   QModelIndexList l = sel.indexes();
+//   if ( l.count() == 0 ) return false;
+//
+//   //type from selection (first)
+//   QModelIndex selected = l[0];
+//   int selType = selected.data(HEXABLOCK::GUI::HEXA_TREE_ROLE).toInt();
+//
+//   //type of widget
+//   QVariant v = le->property("HexaWidgetType");
+//   if ( !v.isValid() ) return false;
+//   HexaWidgetType wType = v.value<HexaWidgetType>();
+//
+//   // check selection compatibility between selection and widget
+//   if ( selType != wType ){
+//     MESSAGE("*  bad selection : " << selType << " is not  " << wType );
+//     SUIT_MessageBox::information( 0,
+//       tr("HEXA_INFO"),
+//       tr("Bad selection type: please select a %1").arg( _strHexaWidgetType[wType]) );
+//     return false;
+//   }
+//
+//   //fill the lineEdit if selection is OK
+//   le->setText( selected.data().toString() );// name
+//   le->setProperty("QModelIndex",  QVariant::fromValue(selected) );
+//   MESSAGE("}");
+//   return true;
+// }
+
+
+
+void MyBasicGUI_PointDlg::onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel )
+{
+  MESSAGE( "HexaBaseDialog::onSelectionChanged(){" );
+  QString className = metaObject()->className();
+  MESSAGE( "*  I am                          : " << className.toStdString() );
+  MESSAGE( "*  sender is                     : " << sender() );
+  QItemSelectionModel* selector = dynamic_cast<QItemSelectionModel*>(sender());
+  MESSAGE( "*  selector           : " << selector);
+
+  foreach( const QModelIndex& isel, sel.indexes() ){
+    MESSAGE("*  selected : " << isel.data().toString().toStdString());
+  }
+  foreach( const QModelIndex& iunsel, unsel.indexes() ){
+    MESSAGE("*  unselected : " << iunsel.data().toString().toStdString());
+  }
+  if ( _selectionMutex ) return;
+  if ( _currentObj != mainFrame()->_vertex_le ) return;
+
+  bool selOk = false;
+
+  QModelIndexList l = sel.indexes();
+  if ( l.count() != 0 ){
+    //type from selection (first)
+    QModelIndex selected = l[0];
+    int selType = selected.data(HEXABLOCK::GUI::HEXA_TREE_ROLE).toInt();
+    // check selection compatibility between selection and widget
+    if ( selType == HEXABLOCK::GUI::VERTEX_TREE ){
+      mainFrame()->_vertex_le->setText( selected.data().toString() );// name
+      mainFrame()->_vertex_le->setProperty("QModelIndex",  QVariant::fromValue(selected) );
+      selOk = true;
+    } else {
+      _patternDataSelectionModel->clearSelection();
+      MESSAGE("*  bad selection : " << selType << " is not  " << HEXABLOCK::GUI::VERTEX_TREE );
+      SUIT_MessageBox::information( 0,
+        tr("HEXA_INFO"),
+        tr("Bad selection type: please select a %1").arg( "VERTEX" ) );
+    }
+  }
+  MESSAGE("}");
+}
+
+
+void MyBasicGUI_PointDlg::onWindowActivated(SUIT_ViewManager* vm)
+{
+  MESSAGE( "getConstructorId()"<< getConstructorId() );
+  SUIT_ViewWindow* v = vm->getActiveView();
+  QString vmType = vm->getType();
+  if ( (vmType == SVTK_Viewer::Type()) || (vmType == VTKViewer_Viewer::Type()) ){
+    mainFrame()->_vertex_le->setFocus();
+  } else if ( vmType == OCCViewer_Viewer::Type() ){
+//     lines_lw->setFocus();
+//     ConstructorsClicked(0);
+    MESSAGE( "getConstructorId()"<< getConstructorId() );
+    ConstructorsClicked( getConstructorId() );
+  }
+}
+
+
+
+bool MyBasicGUI_PointDlg::eventFilter(QObject *obj, QEvent *event)
+{
+
+  if ( (event->type() != QEvent::FocusIn)
+    or (obj != mainFrame()->_vertex_le) ){
+    return MyGEOMBase_Skeleton::eventFilter(obj, event);
+  }
+
+  MESSAGE("MyBasicGUI_PointDlg::eventFilter{");
+
+  QVariant       vxVariant;
+  QModelIndex    vxIndex;
+
+  _currentObj = obj;
+//   HEXABLOCKGUI::currentVtkView->raise();
+  _patternDataSelectionModel->setVertexSelection();
+
+  vxVariant = mainFrame()->_vertex_le->property("QModelIndex");
+  if ( !vxVariant.isValid() ) {
+         return MyGEOMBase_Skeleton::eventFilter(obj, event);
+  }
+  vxIndex = vxVariant.value<QModelIndex>();
+  _selectionMutex = true;
+  MESSAGE("*  selecting the element         : " << vxIndex.data().toString().toStdString());
+  MESSAGE("*  _patternDataSelectionModel    : " << _patternDataSelectionModel );
+  _patternDataSelectionModel->select( vxIndex, QItemSelectionModel::Clear );
+  _patternDataSelectionModel->select( vxIndex, QItemSelectionModel::Select );
+  _selectionMutex = false;
+  MESSAGE("}");
+  return false;
+}
+
+
+void MyBasicGUI_PointDlg::hideEvent ( QHideEvent * event )
+{
+  MESSAGE("MyBasicGUI_PointDlg::hideEvent(){");
+  disconnect( _patternDataSelectionModel, SIGNAL( selectionChanged ( const QItemSelection &, const QItemSelection &) ),
+                this,                     SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+  disconnect(  HEXABLOCKGUI::selectionMgr() , SIGNAL(currentSelectionChanged()), this, SLOT(onCurrentSelectionChanged()) );
+  disconnect( _vtkVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+  disconnect( _occVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+  _documentModel->allowEdition();
+  DeactivateActiveDialog();
+  MyGEOMBase_Skeleton::hideEvent( event );
+  MESSAGE("}");
+}
+
+void MyBasicGUI_PointDlg::showEvent( QShowEvent * event )
+{
+  MESSAGE("MyBasicGUI_PointDlg::showEvent(){");
+  _documentModel->disallowEdition();
+  //     _patternDataSelectionModel->clearSelection();
+  connect( _patternDataSelectionModel, SIGNAL( selectionChanged ( const QItemSelection &, const QItemSelection &) ),
+              this,                    SLOT( onSelectionChanged(const QItemSelection &, const QItemSelection &) ) );
+  connect( _mgr, SIGNAL(currentSelectionChanged()), this, SLOT(onCurrentSelectionChanged()) );
+  connect( _vtkVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+  connect( _occVm, SIGNAL( activated(SUIT_ViewManager*) ), this, SLOT( onWindowActivated(SUIT_ViewManager*) ) );
+
+
+  SalomeApp_Application* app = (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() );
+
+  MESSAGE( "XXXXXXXXXXX   myGeomGUI  => " << myGeomGUI );
+  if ( !myGeomGUI && app )
+    myGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
+
+  MESSAGE( "YYYYYYYYYYYYY myGeomGUI  => " << myGeomGUI );
+
+  ActivateThisDialog();
+  MyGEOMBase_Skeleton::showEvent ( event );
+  MESSAGE("}");
+}
+
+
+
+
+bool MyBasicGUI_PointDlg::onAccept( const bool publish, const bool useTransaction )
+{
+  MESSAGE("MyBasicGUI_PointDlg::onAccept()");
+
+  GEOM::GEOM_Object_ptr newVertex;
+  QString               newVertexEntry;
+  QString               newVertexName;
+  QString               newVertexBrep;
+
+
+
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+  if ( !appStudy ) return false;
+  _PTR(Study) aStudy = appStudy->studyDS();
+
+  bool aLocked = (_PTR(AttributeStudyProperties) (aStudy->GetProperties()))->IsLocked();
+  if ( aLocked ) {
+    MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked");
+    SUIT_MessageBox::warning ( (QWidget*)SUIT_Session::session()->activeApplication()->desktop(),
+                               QObject::tr("WRN_WARNING"),
+                               QObject::tr("WRN_STUDY_LOCKED"),
+                               QObject::tr("BUT_OK") );
+    return false;
+  }
+
+  QString msg;
+  if ( !isValid( msg ) ) {
+    showError( msg );
+    return false;
+  }
+
+  erasePreview( false );
+
+  bool result = false;
+
+  try {
+    if ( ( !publish && !useTransaction ) || openCommand() ) {
+      SUIT_OverrideCursor wc;
+      SUIT_Session::session()->activeApplication()->putInfo( "" );
+      ObjectList objects;
+      if ( !execute( objects ) || !getOperation()->IsDone() ) {
+        wc.suspend();
+        abortCommand();
+        showError();
+      }
+      else {
+        addSubshapesToStudy(); // add Subshapes if local selection
+        const int nbObjs = objects.size();
+        QStringList anEntryList;
+        int aNumber = 1;
+        for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) {
+          GEOM::GEOM_Object_var obj=*it;
+          if ( publish ) {
+            QString aName = getNewObjectName();
+            if ( nbObjs > 1 ) {
+              if (aName.isEmpty())
+                aName = getPrefix(obj);
+              if (nbObjs <= 30) {
+                // Try to find a unique name
+                aName = GEOMBase::GetDefaultName(aName, extractPrefix());
+              } else {
+                // Don't check name uniqueness in case of numerous objects
+                aName = aName + "_" + QString::number(aNumber++);
+              }
+            } else {
+              // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
+              if ( aName.isEmpty() )
+                aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
+            }
+            anEntryList << addInStudy( obj, aName.toLatin1().constData() );
+
+            newVertex      = obj;
+            newVertexEntry = anEntryList[0];
+            TopoDS_Shape aShape;
+            GEOMBase::GetShape( newVertex, aShape );
+            if ( !aShape.IsNull() ){
+              MESSAGE("!aShape.IsNull()");
+              newVertexName = GEOMBase::GetName( newVertex );
+              MESSAGE("newVertexName "<< newVertexName.toStdString());
+              newVertexBrep = HEXABLOCK::GUI::shape2string( aShape ).c_str();
+            }
+
+            // updateView=false
+            display( obj, false );
+#ifdef WITHGENERICOBJ
+            // obj has been published in study. Its refcount has been incremented.
+            // It is safe to decrement its refcount
+            // so that it will be destroyed when the entry in study will be removed
+            obj->UnRegister();
+#endif
+          }
+          else {
+            // asv : fix of PAL6454. If publish==false, then the original shape
+            // was modified, and need to be re-cached in GEOM_Client before redisplay
+//             clearShapeBuffer( obj );
+            // withChildren=true, updateView=false
+            redisplay( obj, true, false );
+          }
+        }
+
+        if ( nbObjs ) {
+          commitCommand();
+          updateObjBrowser();
+          if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
+            if( LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp ) ){
+              aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() );
+            }
+            anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
+          }
+          result = true;
+        }
+        else
+          abortCommand();
+      }
+    }
+  }
+  catch( const SALOME::SALOME_Exception& e ) {
+    SalomeApp_Tools::QtCatchCorbaException( e );
+    abortCommand();
+  }
+
+  updateViewer();
+
+  if (result){
+    SUIT_OverrideCursor wc;
+    if ( !_documentModel )             return false;
+    if ( !_patternDataSelectionModel ) return false;
+    const HEXABLOCK::GUI::PatternDataModel* patternDataModel = dynamic_cast<const HEXABLOCK::GUI::PatternDataModel*>( _patternDataSelectionModel->model() );
+    if ( !patternDataModel ) return false;
+    _currentObj = NULL;
+
+    QVariant v = mainFrame()->_vertex_le->property("QModelIndex");
+    if ( !v.isValid() ) return false;
+    QModelIndex iVertex = patternDataModel->mapToSource( v.value<QModelIndex>() );
+
+    if ( iVertex.isValid() ){
+      HEXABLOCK::GUI::DocumentModel::GeomObj aPoint;
+      aPoint.name  = newVertexName;
+      aPoint.entry = newVertexEntry;
+      aPoint.brep  = newVertexBrep;
+      MESSAGE(" aPoint.name"  <<  aPoint.name.toStdString() );
+      MESSAGE(" aPoint.entry" <<  aPoint.entry.toStdString() );
+      MESSAGE(" aPoint.brep"  <<  aPoint.brep.toStdString() );
+      _documentModel->addAssociation( iVertex, aPoint );
+      // to select/highlight result
+//       _patternDataSelectionModel->clearSelection();
+//       mainFrame()->_vertex_le->setFocus();
+
+//       globalSelection();
+//       localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+      _patternDataSelectionModel->select( patternDataModel->mapFromSource(iVertex), QItemSelectionModel::Clear );
+      _patternDataSelectionModel->select( patternDataModel->mapFromSource(iVertex), QItemSelectionModel::Select );
+      _currentObj = NULL;
+      result = true;
+    } else  {
+      SUIT_MessageBox::critical( this, tr( "ERR_ERROR" ), tr( "CANNOT MAKE VERTEX ASSOCIATION" ) );
+      return false;
+    }
+  }
+
+
+  return result;
+}
+
diff --git a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx
new file mode 100755 (executable)
index 0000000..ad5ac32
--- /dev/null
@@ -0,0 +1,182 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#ifndef MYBASICGUI_POINTDLG_H
+#define MYBASICGUI_POINTDLG_H
+
+
+
+
+#include "MyGEOMBase_Skeleton.hxx"
+#include "GEOM_GenericObjPtr.h"
+#include <QMap>
+
+class DlgRef_2Sel1Spin;
+class DlgRef_3Spin;
+class DlgRef_2Sel;
+class DlgRef_1Sel3Spin;
+class DlgRef_1Sel2Spin;
+
+class QLineEdit;
+class QGroupBox;
+class QButtonGroup;
+class QMenu;
+class QAction;
+
+class gp_Pnt;
+
+#include <QItemSelection>
+#include <SUIT_ViewManager.h>
+#include <SUIT_Session.h>
+#include <OCCViewer_ViewWindow.h>
+#include <OCCViewer_ViewManager.h>
+// #include <VTKViewer_ViewModel.h>
+
+
+
+#include "SVTK_Selection.h"
+#include <SVTK_ViewModel.h>
+namespace HEXABLOCK
+{
+  namespace GUI
+  {
+    class DocumentModel;
+    class PatternDataSelectionModel;
+//   }
+// }
+
+
+//=================================================================================
+// class    : MyBasicGUI_PointDlg
+// purpose  :
+//=================================================================================
+typedef class MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
+{ 
+  Q_OBJECT
+
+public:
+  MyBasicGUI_PointDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
+  ~MyBasicGUI_PointDlg();
+
+  bool                               acceptMouseEvent() const { return ( getConstructorId() == 0 );  }
+  void                               OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
+
+protected:
+  // redefined from GEOMBase_Helper
+
+  virtual GEOM::GEOM_IOperations_ptr createOperation();
+  virtual bool                       isValid( QString& );
+  virtual bool                       execute( ObjectList& );
+  virtual void                       addSubshapesToStudy();
+
+private:
+  void                               Init();
+  void                               enterEvent( QEvent* );
+  double                             getParameter() const;
+  double                             getUParameter() const;
+  double                             getVParameter() const;
+  void                               updateParamCoord(bool theIsUpdate);
+
+private:
+  GEOM::GeomObjPtr                   myEdge;
+  GEOM::GeomObjPtr                   myFace;
+  GEOM::GeomObjPtr                   myRefPoint; 
+  GEOM::GeomObjPtr                   myLine1; 
+  GEOM::GeomObjPtr                   myLine2;
+
+  bool                               myBusy;
+
+  DlgRef_3Spin*                      GroupXYZ;
+  DlgRef_1Sel3Spin*                  GroupRefPoint;
+  DlgRef_2Sel1Spin*                  GroupOnCurve;
+  DlgRef_2Sel*                       GroupLineIntersection;
+  DlgRef_1Sel2Spin*                  GroupOnSurface;
+  
+  QGroupBox*                         myCoordGrp;
+  QLineEdit*                         myX;
+  QLineEdit*                         myY;
+  QLineEdit*                         myZ;
+
+  
+
+  QGroupBox*                         myParamGroup;
+  QButtonGroup*                      myParamCoord;
+
+  QMenu*                             myBtnPopup;
+  QMap<QAction*, int>                myActions;
+
+  TopAbs_ShapeEnum                   myNeedType;
+  
+private slots:
+  void                               ClickOnOk();
+  bool                               ClickOnApply();
+  void                               ActivateThisDialog();
+  void                               DeactivateActiveDialog();
+  void                               SelectionIntoArgument();
+  void                               SetEditCurrentArgument();
+  void                               ConstructorsClicked( int );
+  void                               ValueChangedInSpinBox( double );
+  void                               SetDoubleSpinBoxStep( double );
+  void                               ClickParamCoord( int );
+  void                               CheckBoxClicked( int );
+  void                               onBtnPopup( QAction* );
+  void                               updateSize();
+
+
+
+
+// HEXABLOCK
+public:
+  void setDocumentModel( HEXABLOCK::GUI::DocumentModel* m );
+  void setPatternDataSelectionModel( HEXABLOCK::GUI::PatternDataSelectionModel* s );
+
+  bool onAccept( const bool publish = true, const bool useTransaction = true );
+
+
+protected:
+  virtual bool eventFilter( QObject *obj, QEvent *event );
+  virtual void hideEvent ( QHideEvent * event );
+  virtual void showEvent ( QShowEvent * event );
+  void _initInputWidget();
+  void _initViewManager();
+
+protected slots:
+  void onSelectionChanged(  const QItemSelection& sel, const QItemSelection& unsel );
+  void onWindowActivated( SUIT_ViewManager* vm );
+
+
+private:
+  HEXABLOCK::GUI::DocumentModel*              _documentModel;
+  HEXABLOCK::GUI::PatternDataSelectionModel*  _patternDataSelectionModel;
+  LightApp_SelectionMgr*                      _mgr;
+  SUIT_ViewManager*                           _vtkVm;
+  SUIT_ViewManager*                           _occVm;
+//   QLineEdit*                                  _vertex_le;
+
+  QObject*                                    _currentObj;
+  bool                                        _selectionMutex;
+
+
+} VertexAssocDialog;
+
+  }
+}
+
+#endif // MYBASICGUI_POINTDLG_H
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef.cxx b/src/HEXABLOCKGUI/MyDlgRef/DlgRef.cxx
new file mode 100755 (executable)
index 0000000..ef714ed
--- /dev/null
@@ -0,0 +1,853 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#include "DlgRef.hxx"
+
+//////////////////////////////////////////
+// DlgRef_1List1Spin1Btn
+//////////////////////////////////////////
+
+DlgRef_1List1Spin1Btn::DlgRef_1List1Spin1Btn( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1List1Spin1Btn::~DlgRef_1List1Spin1Btn()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1List
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check1List::DlgRef_1Sel1Check1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check1List::~DlgRef_1Sel1Check1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1Sel
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check1Sel::DlgRef_1Sel1Check1Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check1Sel::~DlgRef_1Sel1Check1Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check::DlgRef_1Sel1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check::~DlgRef_1Sel1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1List1Check3Btn
+//////////////////////////////////////////
+
+DlgRef_1Sel1List1Check3Btn::DlgRef_1Sel1List1Check3Btn( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1List1Check3Btn::~DlgRef_1Sel1List1Check3Btn()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel1Spin1Check::DlgRef_1Sel1Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Spin1Check::~DlgRef_1Sel1Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel1Spin::DlgRef_1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Spin::~DlgRef_1Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin1View1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel2Spin1View1Check::DlgRef_1Sel2Spin1View1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel2Spin1View1Check::~DlgRef_1Sel2Spin1View1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel2Spin::DlgRef_1Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel2Spin::~DlgRef_1Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Check
+//////////////////////////////////////////
+
+DlgRef_1Sel3Check::DlgRef_1Sel3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Check::~DlgRef_1Sel3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel3Spin::DlgRef_1Sel3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Spin::~DlgRef_1Sel3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel3Spin1Check::DlgRef_1Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Spin1Check::~DlgRef_1Sel3Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin2Check
+//////////////////////////////////////////
+
+DlgRef_1Sel4Spin2Check::DlgRef_1Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel4Spin2Check::~DlgRef_1Sel4Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Spin
+//////////////////////////////////////////
+
+DlgRef_1Spin::DlgRef_1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Spin::~DlgRef_1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel
+//////////////////////////////////////////
+
+DlgRef_1Sel::DlgRef_1Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel::~DlgRef_1Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1SelExt
+//////////////////////////////////////////
+
+DlgRef_1SelExt::DlgRef_1SelExt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1SelExt::~DlgRef_1SelExt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1List1Check::DlgRef_2Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List1Check::~DlgRef_2Sel1List1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1List2Check::DlgRef_2Sel1List2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List2Check::~DlgRef_2Sel1List2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List
+//////////////////////////////////////////
+
+DlgRef_2Sel1List::DlgRef_2Sel1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List::~DlgRef_2Sel1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin2Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1Spin2Check::DlgRef_2Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1Spin2Check::~DlgRef_2Sel1Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel1Spin::DlgRef_2Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1SpinInt
+//////////////////////////////////////////
+
+DlgRef_2Sel1SpinInt::DlgRef_2Sel1SpinInt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1SpinInt::~DlgRef_2Sel1SpinInt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2List
+//////////////////////////////////////////
+
+DlgRef_2Sel2List::DlgRef_2Sel2List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2List::~DlgRef_2Sel2List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin1Check::~DlgRef_2Sel2Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin3Check
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin3Check::DlgRef_2Sel2Spin3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin3Check::~DlgRef_2Sel2Spin3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin::DlgRef_2Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin::~DlgRef_2Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin2Rb
+//////////////////////////////////////////
+
+DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel3Spin::DlgRef_2Sel3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel3Spin::~DlgRef_2Sel3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel4Spin1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel
+//////////////////////////////////////////
+
+DlgRef_2Sel::DlgRef_2Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel::~DlgRef_2Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2SelExt
+//////////////////////////////////////////
+
+DlgRef_2SelExt::DlgRef_2SelExt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2SelExt::~DlgRef_2SelExt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Spin
+//////////////////////////////////////////
+
+DlgRef_2Spin::DlgRef_2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Spin::~DlgRef_2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Check
+//////////////////////////////////////////
+
+DlgRef_3Check::DlgRef_3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Check::~DlgRef_3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Radio
+//////////////////////////////////////////
+
+DlgRef_3Radio::DlgRef_3Radio( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Radio::~DlgRef_3Radio()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Radio1Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_3Radio1Sel1Spin::DlgRef_3Radio1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Radio1Sel1Spin::~DlgRef_3Radio1Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Check
+//////////////////////////////////////////
+
+DlgRef_3Sel1Check::DlgRef_3Sel1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel1Check::~DlgRef_3Sel1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_3Sel1Spin::DlgRef_3Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel1Spin::~DlgRef_3Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_3Sel2Spin::DlgRef_3Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel2Spin::~DlgRef_3Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_3Sel3Spin1Check::DlgRef_3Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check()
+{
+}
+
+void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 7;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin2Check
+//////////////////////////////////////////
+
+DlgRef_3Sel3Spin2Check::DlgRef_3Sel3Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel3Spin2Check::~DlgRef_3Sel3Spin2Check()
+{
+}
+
+void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 8;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel4Spin2Check
+//////////////////////////////////////////
+
+DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel4Spin2Check::~DlgRef_3Sel4Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel
+//////////////////////////////////////////
+
+DlgRef_3Sel::DlgRef_3Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel::~DlgRef_3Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_3Spin1Check::DlgRef_3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Spin1Check::~DlgRef_3Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Spin
+//////////////////////////////////////////
+
+DlgRef_3Spin::DlgRef_3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Spin::~DlgRef_3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List1Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1List1Check::DlgRef_4Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1List1Check::~DlgRef_4Sel1List1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List
+//////////////////////////////////////////
+
+DlgRef_4Sel1List::DlgRef_4Sel1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1List::~DlgRef_4Sel1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1Spin2Check::DlgRef_4Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1Spin2Check::~DlgRef_4Sel1Spin2Check()
+{
+}
+
+void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 6;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin3Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1Spin3Check::DlgRef_4Sel1Spin3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1Spin3Check::~DlgRef_4Sel1Spin3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_6Sel
+//////////////////////////////////////////
+
+DlgRef_6Sel::DlgRef_6Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_6Sel::~DlgRef_6Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_Skeleton
+//////////////////////////////////////////
+
+DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_Skeleton::~DlgRef_Skeleton()
+{
+}
+
+//////////////////////////////////////////
+// Utility functions
+//////////////////////////////////////////
+
+QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
+{
+  const double prec = 1e-12;
+  
+  if ( qAbs(theValue) < prec )
+    return "0";
+
+  QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) );
+
+  if ( prec > 0 ) {
+    int p = 0;
+    while ( p < thePrecision ) {
+      QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) );
+      double v = aRes.toDouble();
+      double err = qAbs( theValue - v );
+      if ( err > 0 && err <= prec )
+        break;
+    }
+  }
+
+  // remove trailing zeroes
+
+  QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), 
+                                                      QLocale().exponential().toUpper() ) );
+
+  int idx = aRes.indexOf( expre );
+  QString aResExp = "";
+  if ( idx >= 0 ) {
+    aResExp = aRes.mid( idx );
+    aRes = aRes.left( idx );
+  }
+
+  if ( aRes.contains( QLocale().decimalPoint() ) )
+    aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) );
+
+  return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
+}
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef.hxx b/src/HEXABLOCKGUI/MyDlgRef/DlgRef.hxx
new file mode 100644 (file)
index 0000000..cc94b7b
--- /dev/null
@@ -0,0 +1,899 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#ifndef GEOM_DLGREF_HXX
+#define GEOM_DLGREF_HXX
+
+#if defined WIN32
+#  if defined DLGREF_EXPORTS || defined DlgRef_EXPORTS
+#    define DLGREF_EXPORT __declspec( dllexport )
+#  else
+#    define DLGREF_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define DLGREF_EXPORT
+#endif
+
+//////////////////////////////////////////
+// DlgRef_1List1Spin1Btn
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1List1Spin1Btn_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget, 
+                                            public Ui::DlgRef_1List1Spin1Btn_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1List1Spin1Btn( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1List1Spin1Btn();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check1List_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget, 
+                                             public Ui::DlgRef_1Sel1Check1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check1Sel_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget, 
+                                            public Ui::DlgRef_1Sel1Check1Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check1Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check1Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1Check : public QWidget, 
+                                        public Ui::DlgRef_1Sel1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1List1Check3Btn
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget, 
+                                                 public Ui::DlgRef_1Sel1List1Check3Btn_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1List1Check3Btn( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1List1Check3Btn();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel1Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin1View1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel2Spin1View1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel2Spin1View1Check : public QWidget, 
+                                                  public Ui::DlgRef_1Sel2Spin1View1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel2Spin1View1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel2Spin1View1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel2Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel3Check : public QWidget, 
+                                        public Ui::DlgRef_1Sel3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Check();
+};
+
+
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel3Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel3Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel4Spin2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel4Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel4Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel4Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel4Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel4Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel4Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel4Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel4Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel5Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel5Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel5Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel5Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel5Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel5Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel5Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel5Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel5Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel5Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Spin : public QWidget, 
+                                   public Ui::DlgRef_1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel : public QWidget, 
+                                   public Ui::DlgRef_1Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_1SelExt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1SelExt_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1SelExt : public QWidget, 
+                                     public Ui::DlgRef_1SelExt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1SelExt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1SelExt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1List1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1List1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1List2Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1List2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1List : public QWidget, 
+                                       public Ui::DlgRef_2Sel1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1Spin2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1SpinInt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1SpinInt_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1SpinInt : public QWidget, 
+                                          public Ui::DlgRef_2Sel1SpinInt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1SpinInt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1SpinInt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2List_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel2List : public QWidget, 
+                                       public Ui::DlgRef_2Sel2List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2List();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel2Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel2Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin3Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel2Spin3Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel2Spin3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin2Rb
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel3Spin2Rb_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel3Spin2Rb : public QWidget, 
+                                          public Ui::DlgRef_2Sel3Spin2Rb_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel3Spin2Rb( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel3Spin2Rb();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel3Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel3Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel4Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel4Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel4Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel4Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel4Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel4Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel : public QWidget, 
+                                  public Ui::DlgRef_2Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_2SelExt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2SelExt_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2SelExt : public QWidget, 
+                                     public Ui::DlgRef_2SelExt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2SelExt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2SelExt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Spin : public QWidget, 
+                                   public Ui::DlgRef_2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Check : public QWidget, 
+                                    public Ui::DlgRef_3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Radio
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Radio_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Radio : public QWidget, 
+                                    public Ui::DlgRef_3Radio_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Radio( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Radio();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Radio1Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Radio1Sel1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Radio1Sel1Spin : public QWidget, 
+                                             public Ui::DlgRef_3Radio1Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Radio1Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Radio1Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel1Check : public QWidget, 
+                                        public Ui::DlgRef_3Sel1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_3Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel2Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_3Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel3Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel3Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel3Spin1Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel3Spin2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel3Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel3Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel3Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel3Spin2Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel4Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel4Spin2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel4Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel4Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel4Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Sel : public QWidget, 
+                                  public Ui::DlgRef_3Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Spin1Check : public QWidget, 
+                                         public Ui::DlgRef_3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Spin : public QWidget, 
+                                   public Ui::DlgRef_3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1List1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_4Sel1List1Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1List1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1List1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1List1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1List_QTD.h"
+
+class DLGREF_EXPORT DlgRef_4Sel1List : public QWidget, 
+                                       public Ui::DlgRef_4Sel1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1Spin2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_4Sel1Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1Spin2Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1Spin3Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_4Sel1Spin3Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1Spin3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1Spin3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1Spin3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_6Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_6Sel_QTD.h"
+
+class DLGREF_EXPORT DlgRef_6Sel : public QWidget, 
+                                  public Ui::DlgRef_6Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_6Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_6Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_Skeleton
+//////////////////////////////////////////
+
+#include "ui_DlgRef_Skeleton_QTD.h"
+
+class DLGREF_EXPORT DlgRef_Skeleton : public QWidget, 
+                                      public Ui::DlgRef_Skeleton_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_Skeleton();
+};
+
+//////////////////////////////////////////
+// Utility functions
+//////////////////////////////////////////
+
+namespace DlgRef
+{
+  DLGREF_EXPORT QString PrintDoubleValue( double, int = 16 );
+};
+
+#endif // GEOM_DLGREF_H
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1List1Spin1Btn_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1List1Spin1Btn_QTD.ui
new file mode 100755 (executable)
index 0000000..4982dca
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1List1Spin1Btn_QTD</class>
+ <widget class="QWidget" name="DlgRef_1List1Spin1Btn_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>213</width>
+    <height>116</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0" rowspan="4">
+       <widget class="QTreeWidget" name="ListView1">
+        <column>
+         <property name="text">
+          <string notr="true">1</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Expanding</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>16</width>
+          <height>120</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="SpinBox1">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>ListView1</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>PushButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1List_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1List_QTD.ui
new file mode 100755 (executable)
index 0000000..a1d5853
--- /dev/null
@@ -0,0 +1,122 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel1Check1List_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1Check1List_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>94</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>ComboBox1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1Sel_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check1Sel_QTD.ui
new file mode 100755 (executable)
index 0000000..a8b9443
--- /dev/null
@@ -0,0 +1,148 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel1Check1Sel_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1Check1Sel_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>99</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>5</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>5</hsizetype>
+       <vsizetype>5</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="3" column="0" colspan="3" >
+       <widget class="QWidget" native="1" name="Box" />
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="1" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..ca24f20
--- /dev/null
@@ -0,0 +1,91 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>155</width>
+    <height>64</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1List1Check3Btn_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1List1Check3Btn_QTD.ui
new file mode 100755 (executable)
index 0000000..562f2ce
--- /dev/null
@@ -0,0 +1,154 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel1List1Check3Btn_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1List1Check3Btn_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>180</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="2" rowspan="3" column="0" colspan="2" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" >
+       <widget class="QPushButton" name="PushButton4" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>ListView1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>PushButton4</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..57ae745
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel1Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>207</width>
+    <height>93</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel1Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..2cebc84
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel1Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel1Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>74</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin1View1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin1View1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..1a71d85
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel2Spin1View1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel2Spin1View1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>176</width>
+    <height>227</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="3" column="0" colspan="3">
+       <widget class="QTextBrowser" name="TextBrowser1"/>
+      </item>
+      <item row="2" column="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox2">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox1">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox1">
+        <property name="text">
+         <string>Check</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>TextBrowser1</tabstop>
+  <tabstop>CheckBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel2Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..b390119
--- /dev/null
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel2Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel2Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>101</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Check_QTD.ui
new file mode 100755 (executable)
index 0000000..bcc2e30
--- /dev/null
@@ -0,0 +1,107 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel3Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel3Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>155</width>
+    <height>114</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton3" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton2" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>CheckButton2</tabstop>
+  <tabstop>CheckButton3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..fa397a4
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel3Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel3Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>147</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="2">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel3Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..cc07af0
--- /dev/null
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel3Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel3Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>128</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..e387687
--- /dev/null
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel4Spin2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel4Spin2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>193</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_SC">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>SpinBox_SC</tabstop>
+  <tabstop>CheckBox1</tabstop>
+  <tabstop>CheckBox2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel4Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..cc6e51b
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel4Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel4Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>323</width>
+    <height>123</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel6">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_S">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="3">
+       <widget class="QGroupBox" name="groupBox">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QHBoxLayout">
+         <property name="spacing">
+          <number>6</number>
+         </property>
+         <property name="margin">
+          <number>9</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="TextLabel3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>TL3</string>
+           </property>
+           <property name="wordWrap">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="TextLabel4">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>TL4</string>
+           </property>
+           <property name="wordWrap">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="TextLabel5">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>TL5</string>
+           </property>
+           <property name="wordWrap">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>SpinBox_S</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..3fe2c7c
--- /dev/null
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel5Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel5Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>204</width>
+    <height>163</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QPushButton" name="PushButton1">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="LineEdit1"/>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel7">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL7</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QComboBox" name="ComboBox1"/>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <layout class="QGridLayout">
+        <item row="0" column="0">
+         <widget class="QLabel" name="TextLabel2">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL2</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2">
+         <widget class="QLabel" name="TextLabel3">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL3</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox2">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="TextLabel5">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL5</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2">
+         <widget class="QLabel" name="TextLabel6">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL6</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox5">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="TextLabel4">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL4</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2" colspan="2">
+         <widget class="QCheckBox" name="CheckBox1">
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="SalomeApp_IntSpinBox" name="SpinBox1">
+          <property name="maximum">
+           <number>1000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="SalomeApp_IntSpinBox" name="SpinBox4">
+          <property name="maximum">
+           <number>1000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="SalomeApp_IntSpinBox" name="SpinBox3">
+          <property name="maximum">
+           <number>1000000</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>ComboBox1</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>SpinBox4</tabstop>
+  <tabstop>SpinBox5</tabstop>
+  <tabstop>SpinBox3</tabstop>
+  <tabstop>CheckBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel5Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..8d19cdf
--- /dev/null
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Sel5Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel5Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>208</width>
+    <height>130</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="1" column="0" colspan="3">
+       <layout class="QGridLayout">
+        <property name="margin">
+         <number>0</number>
+        </property>
+        <property name="spacing">
+         <number>6</number>
+        </property>
+        <item row="2" column="0">
+         <widget class="QLabel" name="TextLabel4">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL4</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2">
+         <widget class="QLabel" name="TextLabel3">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL3</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox5">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="0">
+         <widget class="QLabel" name="TextLabel2">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL2</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox1">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2">
+         <widget class="QLabel" name="TextLabel6">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL6</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox2">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox3">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="SalomeApp_DoubleSpinBox" name="SpinBox4">
+          <property name="decimals">
+           <number>6</number>
+          </property>
+          <property name="maximum">
+           <double>1000000000.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="TextLabel5">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text">
+           <string>TL5</string>
+          </property>
+          <property name="wordWrap">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>SpinBox4</tabstop>
+  <tabstop>SpinBox5</tabstop>
+  <tabstop>SpinBox3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1SelExt_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1SelExt_QTD.ui
new file mode 100755 (executable)
index 0000000..6b285a1
--- /dev/null
@@ -0,0 +1,94 @@
+<ui version="4.0" >
+ <class>DlgRef_1SelExt_QTD</class>
+ <widget class="QWidget" name="DlgRef_1SelExt_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>155</width>
+    <height>51</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>7</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="1" column="0" colspan="3" >
+       <widget class="QWidget" native="1" name="Box" />
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Sel_QTD.ui
new file mode 100755 (executable)
index 0000000..ffcb8aa
--- /dev/null
@@ -0,0 +1,91 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>155</width>
+    <height>45</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>7</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_1Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..cbf89a1
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>111</width>
+    <height>43</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..4633930
--- /dev/null
@@ -0,0 +1,153 @@
+<ui version="4.0" >
+ <class>DlgRef_2Sel1List1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1List1Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>211</width>
+    <height>121</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>0</number>
+   </property>
+   <property name="verticalSpacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..8cc018c
--- /dev/null
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel1List2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1List2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>127</width>
+    <height>140</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="QComboBox" name="ComboBox1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>CheckButton2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1List_QTD.ui
new file mode 100755 (executable)
index 0000000..53ba9da
--- /dev/null
@@ -0,0 +1,152 @@
+<ui version="4.0" >
+ <class>DlgRef_2Sel1List_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1List_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>100</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..e35fec1
--- /dev/null
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel1Spin2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1Spin2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>170</width>
+    <height>124</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3">
+       <widget class="QCheckBox" name="CheckButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="3" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>CheckButton2</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1SpinInt_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1SpinInt_QTD.ui
new file mode 100755 (executable)
index 0000000..c14fb7a
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel1SpinInt_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1SpinInt_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>105</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DX">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::NoFrame</enum>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Plain</enum>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel1Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..3835c2e
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel1Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>105</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::NoFrame</enum>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Plain</enum>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2List_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2List_QTD.ui
new file mode 100755 (executable)
index 0000000..b54bca5
--- /dev/null
@@ -0,0 +1,166 @@
+<ui version="4.0" >
+ <class>DlgRef_2Sel2List_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel2List_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>128</width>
+    <height>144</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="TextLabel4" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox2" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..4107b05
--- /dev/null
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel2Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel2Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>151</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="4" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DY">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin3Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin3Check_QTD.ui
new file mode 100755 (executable)
index 0000000..28fb859
--- /dev/null
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel2Spin3Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel2Spin3Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>197</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox3">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>CheckBox1</tabstop>
+  <tabstop>CheckBox2</tabstop>
+  <tabstop>CheckBox3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel2Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..56bbbfd
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel2Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel2Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>132</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin2Rb_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin2Rb_QTD.ui
new file mode 100755 (executable)
index 0000000..19df9b9
--- /dev/null
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel3Spin2Rb_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel3Spin2Rb_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>256</width>
+    <height>135</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>DlgRef_2Sel3Spin2Rb_QTD</string>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" colspan="3">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" colspan="3">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QRadioButton" name="RadioButton1">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QRadioButton" name="RadioButton2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="3">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="4">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>RadioButton1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>RadioButton2</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel3Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..111c095
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel3Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel3Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>159</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel4Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel4Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..fb294c2
--- /dev/null
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel4Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel4Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>205</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="4" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DY2">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX2">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DY1">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX1">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="TextLabel6">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX1</tabstop>
+  <tabstop>SpinBox_DY1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>SpinBox_DX2</tabstop>
+  <tabstop>SpinBox_DY2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2SelExt_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2SelExt_QTD.ui
new file mode 100755 (executable)
index 0000000..a5ab1a4
--- /dev/null
@@ -0,0 +1,132 @@
+<ui version="4.0" >
+ <class>DlgRef_2SelExt_QTD</class>
+ <widget class="QWidget" name="DlgRef_2SelExt_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>155</width>
+    <height>80</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>7</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="2" column="0" colspan="3" >
+       <widget class="QWidget" native="1" name="Box" />
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Sel_QTD.ui
new file mode 100755 (executable)
index 0000000..753d958
--- /dev/null
@@ -0,0 +1,129 @@
+<ui version="4.0" >
+ <class>DlgRef_2Sel_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>74</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>7</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_2Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..74e340d
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>114</width>
+    <height>70</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Check_QTD.ui
new file mode 100755 (executable)
index 0000000..aa9a707
--- /dev/null
@@ -0,0 +1,69 @@
+<ui version="4.0" >
+ <class>DlgRef_3Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>118</width>
+    <height>88</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="1" column="0" >
+       <widget class="QRadioButton" name="RadioButton2" >
+        <property name="text" >
+         <string>RadioButton2</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QRadioButton" name="RadioButton1" >
+        <property name="text" >
+         <string>RadioButton1</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QRadioButton" name="RadioButton3" >
+        <property name="text" >
+         <string>RadioButton3</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>RadioButton1</tabstop>
+  <tabstop>RadioButton2</tabstop>
+  <tabstop>RadioButton3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..e17614e
--- /dev/null
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Radio1Sel1Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Radio1Sel1Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>357</width>
+    <height>131</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>357</width>
+       <height>131</height>
+      </size>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="3" column="0" colspan="4">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QRadioButton" name="RadioButton1">
+          <property name="text">
+           <string>RadioButton1</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QRadioButton" name="RadioButton2">
+          <property name="text">
+           <string>RadioButton2</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QRadioButton" name="RadioButton3">
+          <property name="text">
+           <string>RadioButton3</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="6" column="3">
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>256</width>
+          <height>19</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1" colspan="3">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Radio_QTD.ui
new file mode 100755 (executable)
index 0000000..e55899e
--- /dev/null
@@ -0,0 +1,75 @@
+<ui version="4.0" >
+ <class>DlgRef_3Radio_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Radio_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>335</width>
+    <height>44</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QHBoxLayout" >
+      <item>
+       <widget class="QRadioButton" name="RadioButton1" >
+        <property name="text" >
+         <string>RadioButton1</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RadioButton2" >
+        <property name="text" >
+         <string>RadioButton2</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RadioButton3" >
+        <property name="text" >
+         <string>RadioButton3</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>RadioButton1</tabstop>
+  <tabstop>RadioButton2</tabstop>
+  <tabstop>RadioButton3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..91d9258
--- /dev/null
@@ -0,0 +1,182 @@
+<ui version="4.0" >
+ <class>DlgRef_3Sel1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel1Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>126</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>5</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>5</hsizetype>
+       <vsizetype>5</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="3" column="0" colspan="3" >
+       <widget class="QCheckBox" name="CheckButton1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" >
+       <widget class="QLineEdit" name="LineEdit3" />
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel1Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..067340a
--- /dev/null
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Sel1Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel1Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>136</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="LineEdit3"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel2Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel2Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..199727b
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Sel2Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel2Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>120</width>
+    <height>177</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="LineEdit3"/>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..d31515e
--- /dev/null
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Sel3Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel3Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>216</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="6" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox1">
+        <property name="text">
+         <string>Check</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox1">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox3">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox2">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="LineEdit3"/>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="TextLabel6">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>SpinBox3</tabstop>
+  <tabstop>CheckBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel3Spin2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..103fdec
--- /dev/null
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Sel3Spin2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel3Spin2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>120</width>
+    <height>242</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="LineEdit3"/>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox1">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox2">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="TextLabel6">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox3">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckBox2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>SpinBox3</tabstop>
+  <tabstop>CheckBox1</tabstop>
+  <tabstop>CheckBox2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel4Spin2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel4Spin2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..80035d4
--- /dev/null
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Sel4Spin2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel4Spin2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>255</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="7" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DY2">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX2">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_IntSpinBox" name="SpinBox_DY1">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX1">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="TextLabel6">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0">
+       <widget class="QLabel" name="TextLabel7">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL7</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="LineEdit3"/>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="8" column="0" colspan="3">
+       <widget class="QCheckBox" name="CheckButton2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>SalomeApp_IntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">SalomeApp_IntSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>SpinBox_DX1</tabstop>
+  <tabstop>SpinBox_DY1</tabstop>
+  <tabstop>CheckButton1</tabstop>
+  <tabstop>SpinBox_DX2</tabstop>
+  <tabstop>SpinBox_DY2</tabstop>
+  <tabstop>CheckButton2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Sel_QTD.ui
new file mode 100755 (executable)
index 0000000..b16200b
--- /dev/null
@@ -0,0 +1,167 @@
+<ui version="4.0" >
+ <class>DlgRef_3Sel_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Sel_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>103</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>7</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" >
+       <widget class="QLineEdit" name="LineEdit3" />
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..0fa2adb
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>114</width>
+    <height>116</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="3" column="0" colspan="2">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_3Spin_QTD.ui
new file mode 100755 (executable)
index 0000000..3aafa4a
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Spin_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Spin_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>114</width>
+    <height>97</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List1Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List1Check_QTD.ui
new file mode 100755 (executable)
index 0000000..516d9a2
--- /dev/null
@@ -0,0 +1,244 @@
+<ui version="4.0" >
+ <class>DlgRef_4Sel1List1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_4Sel1List1Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>216</width>
+    <height>187</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="4" column="1" >
+       <widget class="QPushButton" name="PushButton4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" >
+       <widget class="QLineEdit" name="LineEdit4" />
+      </item>
+      <item row="3" column="1" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="TextLabel4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="4" column="0" >
+       <widget class="QLabel" name="TextLabel5" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" >
+       <widget class="QLineEdit" name="LineEdit3" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="2" >
+       <widget class="QCheckBox" name="CheckBox1" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="2" >
+       <widget class="QPushButton" name="PushButton5" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>PushButton4</tabstop>
+  <tabstop>LineEdit4</tabstop>
+  <tabstop>CheckBox1</tabstop>
+  <tabstop>PushButton5</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1List_QTD.ui
new file mode 100755 (executable)
index 0000000..5388836
--- /dev/null
@@ -0,0 +1,228 @@
+<ui version="4.0" >
+ <class>DlgRef_4Sel1List_QTD</class>
+ <widget class="QWidget" name="DlgRef_4Sel1List_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>158</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" >
+       <widget class="QPushButton" name="PushButton4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" >
+       <widget class="QLineEdit" name="LineEdit4" />
+      </item>
+      <item row="3" column="1" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="TextLabel4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="4" column="0" >
+       <widget class="QLabel" name="TextLabel5" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" >
+       <widget class="QLineEdit" name="LineEdit3" />
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QComboBox" name="ComboBox1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>ComboBox1</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>PushButton4</tabstop>
+  <tabstop>LineEdit4</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin2Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin2Check_QTD.ui
new file mode 100755 (executable)
index 0000000..fa1361c
--- /dev/null
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_4Sel1Spin2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_4Sel1Spin2Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>225</width>
+    <height>306</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit5"/>
+      </item>
+      <item row="0" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="3" column="1">
+       <widget class="QPushButton" name="PushButton5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit4"/>
+      </item>
+      <item row="1" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="6" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton4</tabstop>
+  <tabstop>LineEdit4</tabstop>
+  <tabstop>PushButton5</tabstop>
+  <tabstop>LineEdit5</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin3Check_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_4Sel1Spin3Check_QTD.ui
new file mode 100755 (executable)
index 0000000..1828502
--- /dev/null
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_4Sel1Spin3Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_4Sel1Spin3Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>225</width>
+    <height>306</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="8" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit5"/>
+      </item>
+      <item row="0" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="3" column="1">
+       <widget class="QPushButton" name="PushButton5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="PushButton4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit4"/>
+      </item>
+      <item row="1" column="2" colspan="2">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="6" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton1">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" colspan="4">
+       <widget class="QCheckBox" name="CheckButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+     <zorder>CheckButton3</zorder>
+     <zorder>SpinBox_DX</zorder>
+     <zorder>TextLabel3</zorder>
+     <zorder>TextLabel5</zorder>
+     <zorder>TextLabel4</zorder>
+     <zorder>TextLabel2</zorder>
+     <zorder>TextLabel1</zorder>
+     <zorder>PushButton2</zorder>
+     <zorder>LineEdit5</zorder>
+     <zorder>LineEdit1</zorder>
+     <zorder>PushButton5</zorder>
+     <zorder>PushButton4</zorder>
+     <zorder>PushButton1</zorder>
+     <zorder>LineEdit4</zorder>
+     <zorder>LineEdit2</zorder>
+     <zorder>CheckButton1</zorder>
+     <zorder>CheckButton2</zorder>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton4</tabstop>
+  <tabstop>LineEdit4</tabstop>
+  <tabstop>PushButton5</tabstop>
+  <tabstop>LineEdit5</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>CheckButton1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_6Sel_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_6Sel_QTD.ui
new file mode 100755 (executable)
index 0000000..22ce904
--- /dev/null
@@ -0,0 +1,281 @@
+<ui version="4.0" >
+ <class>DlgRef_6Sel_QTD</class>
+ <widget class="QWidget" name="DlgRef_6Sel_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>156</width>
+    <height>190</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>7</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="5" column="2" >
+       <widget class="QLineEdit" name="LineEdit6" />
+      </item>
+      <item row="4" column="2" >
+       <widget class="QLineEdit" name="LineEdit5" />
+      </item>
+      <item row="3" column="2" >
+       <widget class="QLineEdit" name="LineEdit4" />
+      </item>
+      <item row="2" column="2" >
+       <widget class="QLineEdit" name="LineEdit3" />
+      </item>
+      <item row="1" column="2" >
+       <widget class="QLineEdit" name="LineEdit2" />
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="5" column="1" >
+       <widget class="QPushButton" name="PushButton6" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" >
+       <widget class="QPushButton" name="PushButton5" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" >
+       <widget class="QPushButton" name="PushButton4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="PushButton3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="PushButton2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" >
+       <widget class="QLabel" name="TextLabel6" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL6</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel3" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" >
+       <widget class="QLabel" name="TextLabel5" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="TextLabel4" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>PushButton3</tabstop>
+  <tabstop>LineEdit3</tabstop>
+  <tabstop>PushButton4</tabstop>
+  <tabstop>LineEdit4</tabstop>
+  <tabstop>PushButton5</tabstop>
+  <tabstop>LineEdit5</tabstop>
+  <tabstop>PushButton6</tabstop>
+  <tabstop>LineEdit6</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/DlgRef_Skeleton_QTD.ui b/src/HEXABLOCKGUI/MyDlgRef/DlgRef_Skeleton_QTD.ui
new file mode 100755 (executable)
index 0000000..406a6b6
--- /dev/null
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MyDlgRef_Skeleton_QTD</class>
+ <widget class="QWidget" name="MyDlgRef_Skeleton_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>297</width>
+    <height>396</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAsNeeded</enum>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>275</width>
+        <height>322</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QGroupBox" name="groupBox_2">
+         <property name="title">
+          <string>Vertex of the model</string>
+         </property>
+         <layout class="QFormLayout" name="formLayout">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_15">
+            <property name="text">
+             <string>Name</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="_vertex_le">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox">
+         <property name="title">
+          <string>Point of the geometry</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout">
+          <item>
+           <widget class="QGroupBox" name="GroupConstructors">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string/>
+            </property>
+            <layout class="QHBoxLayout">
+             <item>
+              <widget class="QRadioButton" name="RadioButton1">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QRadioButton" name="RadioButton2">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QRadioButton" name="RadioButton3">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QRadioButton" name="RadioButton4">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QRadioButton" name="RadioButton5">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="GroupBoxName">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="title">
+             <string/>
+            </property>
+            <layout class="QHBoxLayout">
+             <property name="spacing">
+              <number>6</number>
+             </property>
+             <property name="margin">
+              <number>9</number>
+             </property>
+             <item>
+              <widget class="QLabel" name="NameLabel">
+               <property name="text">
+                <string/>
+               </property>
+               <property name="wordWrap">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QLineEdit" name="ResultName"/>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QWidget" name="GroupMedium" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="GroupBoxPublish">
+            <property name="title">
+             <string/>
+            </property>
+            <layout class="QVBoxLayout">
+             <item>
+              <widget class="QCheckBox" name="CheckBoxRestoreSS">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QCheckBox" name="CheckBoxAddPrefix">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QCheckBox" name="CheckBoxPreview">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <spacer name="verticalSpacer_2">
+            <property name="orientation">
+             <enum>Qt::Vertical</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>10</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="GroupButtons">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QHBoxLayout">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="buttonApply">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>&amp;Close</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>CheckBoxRestoreSS</tabstop>
+  <tabstop>CheckBoxAddPrefix</tabstop>
+  <tabstop>CheckBoxPreview</tabstop>
+  <tabstop>RadioButton1</tabstop>
+  <tabstop>RadioButton2</tabstop>
+  <tabstop>RadioButton3</tabstop>
+  <tabstop>RadioButton4</tabstop>
+  <tabstop>RadioButton5</tabstop>
+  <tabstop>ResultName</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/MyDlgRef/Makefile.am b/src/HEXABLOCKGUI/MyDlgRef/Makefile.am
new file mode 100755 (executable)
index 0000000..46e96a4
--- /dev/null
@@ -0,0 +1,113 @@
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# GEOM DLGREF : 
+# File    : Makefile.am
+# Author  : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
+# Package : MyDlgRef
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# Libraries targets
+lib_LTLIBRARIES = libMyDlgRef.la
+
+# Sources files
+dist_libMyDlgRef_la_SOURCES =  \
+       MyDlgRef.hxx            \
+       MyDlgRef.cxx
+
+MOC_FILES =                    \
+       MyDlgRef_moc.cxx
+
+UIC_FILES =                                    \
+       ui_DlgRef_1List1Spin1Btn_QTD.h          \
+       ui_DlgRef_1Sel1Check1List_QTD.h         \
+       ui_DlgRef_1Sel1Check1Sel_QTD.h          \
+       ui_DlgRef_1Sel1Check_QTD.h              \
+       ui_DlgRef_1Sel1List1Check3Btn_QTD.h     \
+       ui_DlgRef_1Sel1Spin1Check_QTD.h         \
+       ui_DlgRef_1Sel1Spin_QTD.h               \
+       ui_DlgRef_1Sel2Spin1View1Check_QTD.h    \
+       ui_DlgRef_1Sel2Spin_QTD.h               \
+       ui_DlgRef_1Sel3Check_QTD.h              \
+       ui_DlgRef_1Sel3Spin_QTD.h               \
+       ui_DlgRef_1Sel3Spin1Check_QTD.h         \
+       ui_DlgRef_1Sel4Spin2Check_QTD.h         \
+       ui_DlgRef_1Sel4Spin_QTD.h               \
+       ui_DlgRef_1Sel5Spin1Check_QTD.h         \
+       ui_DlgRef_1Sel5Spin_QTD.h               \
+       ui_DlgRef_1Sel_QTD.h                    \
+       ui_DlgRef_1SelExt_QTD.h                 \
+       ui_DlgRef_1Spin_QTD.h                   \
+       ui_DlgRef_2Sel1List1Check_QTD.h         \
+       ui_DlgRef_2Sel1List2Check_QTD.h         \
+       ui_DlgRef_2Sel1List_QTD.h               \
+       ui_DlgRef_2Sel1Spin2Check_QTD.h         \
+       ui_DlgRef_2Sel1Spin_QTD.h               \
+       ui_DlgRef_2Sel1SpinInt_QTD.h            \
+       ui_DlgRef_2Sel2List_QTD.h               \
+       ui_DlgRef_2Sel2Spin1Check_QTD.h         \
+       ui_DlgRef_2Sel2Spin3Check_QTD.h         \
+       ui_DlgRef_2Sel2Spin_QTD.h               \
+       ui_DlgRef_2Sel3Spin2Rb_QTD.h            \
+       ui_DlgRef_2Sel3Spin_QTD.h               \
+       ui_DlgRef_2Sel4Spin1Check_QTD.h         \
+       ui_DlgRef_2Sel_QTD.h                    \
+       ui_DlgRef_2SelExt_QTD.h                 \
+       ui_DlgRef_2Spin_QTD.h                   \
+       ui_DlgRef_3Check_QTD.h                  \
+       ui_DlgRef_3Radio_QTD.h                  \
+       ui_DlgRef_3Radio1Sel1Spin_QTD.h         \
+       ui_DlgRef_3Sel1Check_QTD.h              \
+       ui_DlgRef_3Sel1Spin_QTD.h               \
+       ui_DlgRef_3Sel2Spin_QTD.h               \
+       ui_DlgRef_3Sel3Spin1Check_QTD.h         \
+       ui_DlgRef_3Sel3Spin2Check_QTD.h         \
+       ui_DlgRef_3Sel4Spin2Check_QTD.h         \
+       ui_DlgRef_3Sel_QTD.h                    \
+       ui_DlgRef_3Spin1Check_QTD.h             \
+       ui_DlgRef_3Spin_QTD.h                   \
+       ui_DlgRef_4Sel1List1Check_QTD.h         \
+       ui_DlgRef_4Sel1List_QTD.h               \
+       ui_DlgRef_4Sel1Spin2Check_QTD.h         \
+       ui_DlgRef_4Sel1Spin3Check_QTD.h         \
+       ui_DlgRef_6Sel_QTD.h                    \
+       ui_DlgRef_Skeleton_QTD.h
+
+ADVANCED_UIC_FILES  = 
+##@@ insert new functions before this line @@ do not remove this line @@##
+
+UIC_FILES += $(ADVANCED_UIC_FILES)
+
+BUILT_SOURCES = $(UIC_FILES)
+
+nodist_libMyDlgRef_la_SOURCES =        \
+       $(MOC_FILES)            \
+       $(UIC_FILES)
+
+# additional information to compile and link file
+
+libMyDlgRef_la_CPPFLAGS =              \
+       $(QT_INCLUDES)          \
+       $(GUI_CXXFLAGS)
+
+libMyDlgRef_la_LDFLAGS  =              \
+       $(STDLIB)               \
+       $(QT_MT_LIBS)           \
+       $(GUI_LDFLAGS) -lqtx -lSalomeApp
diff --git a/src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.cxx b/src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.cxx
new file mode 100755 (executable)
index 0000000..3ca7ac3
--- /dev/null
@@ -0,0 +1,853 @@
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library 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
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#include "MyDlgRef.hxx"
+
+//////////////////////////////////////////
+// DlgRef_1List1Spin1Btn
+//////////////////////////////////////////
+
+DlgRef_1List1Spin1Btn::DlgRef_1List1Spin1Btn( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1List1Spin1Btn::~DlgRef_1List1Spin1Btn()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1List
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check1List::DlgRef_1Sel1Check1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check1List::~DlgRef_1Sel1Check1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1Sel
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check1Sel::DlgRef_1Sel1Check1Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check1Sel::~DlgRef_1Sel1Check1Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel1Check::DlgRef_1Sel1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Check::~DlgRef_1Sel1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1List1Check3Btn
+//////////////////////////////////////////
+
+DlgRef_1Sel1List1Check3Btn::DlgRef_1Sel1List1Check3Btn( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1List1Check3Btn::~DlgRef_1Sel1List1Check3Btn()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel1Spin1Check::DlgRef_1Sel1Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Spin1Check::~DlgRef_1Sel1Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel1Spin::DlgRef_1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel1Spin::~DlgRef_1Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin1View1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel2Spin1View1Check::DlgRef_1Sel2Spin1View1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel2Spin1View1Check::~DlgRef_1Sel2Spin1View1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel2Spin::DlgRef_1Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel2Spin::~DlgRef_1Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Check
+//////////////////////////////////////////
+
+DlgRef_1Sel3Check::DlgRef_1Sel3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Check::~DlgRef_1Sel3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel3Spin::DlgRef_1Sel3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Spin::~DlgRef_1Sel3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel3Spin1Check::DlgRef_1Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel3Spin1Check::~DlgRef_1Sel3Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin2Check
+//////////////////////////////////////////
+
+DlgRef_1Sel4Spin2Check::DlgRef_1Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel4Spin2Check::~DlgRef_1Sel4Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin
+//////////////////////////////////////////
+
+DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Spin
+//////////////////////////////////////////
+
+DlgRef_1Spin::DlgRef_1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Spin::~DlgRef_1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1Sel
+//////////////////////////////////////////
+
+DlgRef_1Sel::DlgRef_1Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel::~DlgRef_1Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_1SelExt
+//////////////////////////////////////////
+
+DlgRef_1SelExt::DlgRef_1SelExt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1SelExt::~DlgRef_1SelExt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1List1Check::DlgRef_2Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List1Check::~DlgRef_2Sel1List1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1List2Check::DlgRef_2Sel1List2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List2Check::~DlgRef_2Sel1List2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List
+//////////////////////////////////////////
+
+DlgRef_2Sel1List::DlgRef_2Sel1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1List::~DlgRef_2Sel1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin2Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1Spin2Check::DlgRef_2Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1Spin2Check::~DlgRef_2Sel1Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel1Spin::DlgRef_2Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel1SpinInt
+//////////////////////////////////////////
+
+DlgRef_2Sel1SpinInt::DlgRef_2Sel1SpinInt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel1SpinInt::~DlgRef_2Sel1SpinInt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2List
+//////////////////////////////////////////
+
+DlgRef_2Sel2List::DlgRef_2Sel2List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2List::~DlgRef_2Sel2List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin1Check::~DlgRef_2Sel2Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin3Check
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin3Check::DlgRef_2Sel2Spin3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin3Check::~DlgRef_2Sel2Spin3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin::DlgRef_2Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin::~DlgRef_2Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin2Rb
+//////////////////////////////////////////
+
+DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin
+//////////////////////////////////////////
+
+DlgRef_2Sel3Spin::DlgRef_2Sel3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel3Spin::~DlgRef_2Sel3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel4Spin1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Sel
+//////////////////////////////////////////
+
+DlgRef_2Sel::DlgRef_2Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel::~DlgRef_2Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2SelExt
+//////////////////////////////////////////
+
+DlgRef_2SelExt::DlgRef_2SelExt( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2SelExt::~DlgRef_2SelExt()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_2Spin
+//////////////////////////////////////////
+
+DlgRef_2Spin::DlgRef_2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Spin::~DlgRef_2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Check
+//////////////////////////////////////////
+
+DlgRef_3Check::DlgRef_3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Check::~DlgRef_3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Radio
+//////////////////////////////////////////
+
+DlgRef_3Radio::DlgRef_3Radio( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Radio::~DlgRef_3Radio()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Radio1Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_3Radio1Sel1Spin::DlgRef_3Radio1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Radio1Sel1Spin::~DlgRef_3Radio1Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Check
+//////////////////////////////////////////
+
+DlgRef_3Sel1Check::DlgRef_3Sel1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel1Check::~DlgRef_3Sel1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_3Sel1Spin::DlgRef_3Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel1Spin::~DlgRef_3Sel1Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel2Spin
+//////////////////////////////////////////
+
+DlgRef_3Sel2Spin::DlgRef_3Sel2Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel2Spin::~DlgRef_3Sel2Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_3Sel3Spin1Check::DlgRef_3Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check()
+{
+}
+
+void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 7;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin2Check
+//////////////////////////////////////////
+
+DlgRef_3Sel3Spin2Check::DlgRef_3Sel3Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel3Spin2Check::~DlgRef_3Sel3Spin2Check()
+{
+}
+
+void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 8;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel4Spin2Check
+//////////////////////////////////////////
+
+DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel4Spin2Check::~DlgRef_3Sel4Spin2Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Sel
+//////////////////////////////////////////
+
+DlgRef_3Sel::DlgRef_3Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Sel::~DlgRef_3Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_3Spin1Check::DlgRef_3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Spin1Check::~DlgRef_3Spin1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_3Spin
+//////////////////////////////////////////
+
+DlgRef_3Spin::DlgRef_3Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Spin::~DlgRef_3Spin()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List1Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1List1Check::DlgRef_4Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1List1Check::~DlgRef_4Sel1List1Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List
+//////////////////////////////////////////
+
+DlgRef_4Sel1List::DlgRef_4Sel1List( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1List::~DlgRef_4Sel1List()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1Spin2Check::DlgRef_4Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1Spin2Check::~DlgRef_4Sel1Spin2Check()
+{
+}
+
+void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
+{
+  const int maxRows = 6;
+  
+  if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
+    int c = gridLayout1->count();
+    for ( int i = 0; i < c; i++ ) {
+      QWidget* w = gridLayout1->itemAt( i )->widget();
+      int row, col, rowspan, colspan;
+      gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
+      if ( w && row >= fromRow && row <= toRow )
+        w->setVisible( toShow );
+    }
+  }
+}
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin3Check
+//////////////////////////////////////////
+
+DlgRef_4Sel1Spin3Check::DlgRef_4Sel1Spin3Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_4Sel1Spin3Check::~DlgRef_4Sel1Spin3Check()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_6Sel
+//////////////////////////////////////////
+
+DlgRef_6Sel::DlgRef_6Sel( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_6Sel::~DlgRef_6Sel()
+{
+}
+
+//////////////////////////////////////////
+// DlgRef_Skeleton
+//////////////////////////////////////////
+
+MyDlgRef_Skeleton::MyDlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+MyDlgRef_Skeleton::~MyDlgRef_Skeleton()
+{
+}
+
+//////////////////////////////////////////
+// Utility functions
+//////////////////////////////////////////
+
+QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
+{
+  const double prec = 1e-12;
+  
+  if ( qAbs(theValue) < prec )
+    return "0";
+
+  QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) );
+
+  if ( prec > 0 ) {
+    int p = 0;
+    while ( p < thePrecision ) {
+      QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) );
+      double v = aRes.toDouble();
+      double err = qAbs( theValue - v );
+      if ( err > 0 && err <= prec )
+        break;
+    }
+  }
+
+  // remove trailing zeroes
+
+  QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), 
+                                                      QLocale().exponential().toUpper() ) );
+
+  int idx = aRes.indexOf( expre );
+  QString aResExp = "";
+  if ( idx >= 0 ) {
+    aResExp = aRes.mid( idx );
+    aRes = aRes.left( idx );
+  }
+
+  if ( aRes.contains( QLocale().decimalPoint() ) )
+    aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) );
+
+  return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
+}
diff --git a/src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.hxx b/src/HEXABLOCKGUI/MyDlgRef/MyDlgRef.hxx
new file mode 100644 (file)
index 0000000..e80fd32
--- /dev/null
@@ -0,0 +1,899 @@
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library 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
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#ifndef MYGEOM_MYDLGREF_HXX
+#define MYGEOM_MYDLGREF_HXX
+
+#if defined WIN32
+#  if defined MYMYDLGREF_EXPORTS || defined DlgRef_EXPORTS
+#    define MYDLGREF_EXPORT __declspec( dllexport )
+#  else
+#    define MYDLGREF_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define MYDLGREF_EXPORT
+#endif
+
+//////////////////////////////////////////
+// DlgRef_1List1Spin1Btn
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1List1Spin1Btn_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget, 
+                                            public Ui::DlgRef_1List1Spin1Btn_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1List1Spin1Btn( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1List1Spin1Btn();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check1List_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget, 
+                                             public Ui::DlgRef_1Sel1Check1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check1Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check1Sel_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget, 
+                                            public Ui::DlgRef_1Sel1Check1Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check1Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check1Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1Check : public QWidget, 
+                                        public Ui::DlgRef_1Sel1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1List1Check3Btn
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget, 
+                                                 public Ui::DlgRef_1Sel1List1Check3Btn_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1List1Check3Btn( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1List1Check3Btn();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel1Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel1Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin1View1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel2Spin1View1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel2Spin1View1Check : public QWidget, 
+                                                  public Ui::DlgRef_1Sel2Spin1View1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel2Spin1View1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel2Spin1View1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel2Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel3Check : public QWidget, 
+                                        public Ui::DlgRef_1Sel3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Check();
+};
+
+
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel3Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel3Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel3Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel3Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel4Spin2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel4Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel4Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel4Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel4Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel4Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel4Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel4Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel4Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel4Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel5Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel5Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel5Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel5Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel5Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel5Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel5Spin : public QWidget, 
+                                       public Ui::DlgRef_1Sel5Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel5Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel5Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Spin : public QWidget, 
+                                   public Ui::DlgRef_1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1Sel : public QWidget, 
+                                   public Ui::DlgRef_1Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_1SelExt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1SelExt_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_1SelExt : public QWidget, 
+                                     public Ui::DlgRef_1SelExt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1SelExt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1SelExt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1List1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1List1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1List2Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1List2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1List : public QWidget, 
+                                       public Ui::DlgRef_2Sel1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1Spin2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel1Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel1SpinInt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1SpinInt_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel1SpinInt : public QWidget, 
+                                          public Ui::DlgRef_2Sel1SpinInt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel1SpinInt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel1SpinInt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2List_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel2List : public QWidget, 
+                                       public Ui::DlgRef_2Sel2List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2List();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel2Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel2Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin3Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel2Spin3Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel2Spin3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin2Rb
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel3Spin2Rb_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel3Spin2Rb : public QWidget, 
+                                          public Ui::DlgRef_2Sel3Spin2Rb_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel3Spin2Rb( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel3Spin2Rb();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel3Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel3Spin : public QWidget, 
+                                       public Ui::DlgRef_2Sel3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel4Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel4Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel4Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_2Sel4Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel4Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel4Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Sel : public QWidget, 
+                                  public Ui::DlgRef_2Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_2SelExt
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2SelExt_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2SelExt : public QWidget, 
+                                     public Ui::DlgRef_2SelExt_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2SelExt( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2SelExt();
+};
+
+//////////////////////////////////////////
+// DlgRef_2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_2Spin : public QWidget, 
+                                   public Ui::DlgRef_2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Check : public QWidget, 
+                                    public Ui::DlgRef_3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Radio
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Radio_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Radio : public QWidget, 
+                                    public Ui::DlgRef_3Radio_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Radio( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Radio();
+};
+
+//////////////////////////////////////////
+// DlgRef_1Sel3Radio1Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Radio1Sel1Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Radio1Sel1Spin : public QWidget, 
+                                             public Ui::DlgRef_3Radio1Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Radio1Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Radio1Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel1Check : public QWidget, 
+                                        public Ui::DlgRef_3Sel1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel1Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel1Spin : public QWidget, 
+                                       public Ui::DlgRef_3Sel1Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel1Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel2Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel2Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel2Spin : public QWidget, 
+                                       public Ui::DlgRef_3Sel2Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel2Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel2Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel3Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel3Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel3Spin1Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel3Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel3Spin2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel3Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel3Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel3Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel3Spin2Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel4Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel4Spin2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel4Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_3Sel4Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel4Spin2Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Sel_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Sel : public QWidget, 
+                                  public Ui::DlgRef_3Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Spin1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Spin1Check : public QWidget, 
+                                         public Ui::DlgRef_3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Spin1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_3Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Spin_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_3Spin : public QWidget, 
+                                   public Ui::DlgRef_3Spin_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Spin();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1List1Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_4Sel1List1Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1List1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1List1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1List1Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1List
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1List_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_4Sel1List : public QWidget, 
+                                       public Ui::DlgRef_4Sel1List_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1List( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1List();
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1Spin2Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_4Sel1Spin2Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1Spin2Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1Spin2Check();
+
+  void ShowRows( int, int, bool = true );
+};
+
+//////////////////////////////////////////
+// DlgRef_4Sel1Spin2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_4Sel1Spin3Check_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_4Sel1Spin3Check : public QWidget, 
+                                             public Ui::DlgRef_4Sel1Spin3Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_4Sel1Spin3Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_4Sel1Spin3Check();
+};
+
+//////////////////////////////////////////
+// DlgRef_6Sel
+//////////////////////////////////////////
+
+#include "ui_DlgRef_6Sel_QTD.h"
+
+class MYDLGREF_EXPORT DlgRef_6Sel : public QWidget, 
+                                  public Ui::DlgRef_6Sel_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_6Sel( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_6Sel();
+};
+
+//////////////////////////////////////////
+// DlgRef_Skeleton
+//////////////////////////////////////////
+
+#include "ui_DlgRef_Skeleton_QTD.h"
+
+class MYDLGREF_EXPORT MyDlgRef_Skeleton : public QWidget, 
+                                      public Ui::MyDlgRef_Skeleton_QTD
+{
+  Q_OBJECT
+
+public:
+  MyDlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~MyDlgRef_Skeleton();
+};
+
+//////////////////////////////////////////
+// Utility functions
+//////////////////////////////////////////
+
+namespace DlgRef
+{
+  MYDLGREF_EXPORT QString PrintDoubleValue( double, int = 16 );
+};
+
+#endif // GEOM_MYDLGREF_H
diff --git a/src/HEXABLOCKGUI/MyGEOMBase_Helper.cxx b/src/HEXABLOCKGUI/MyGEOMBase_Helper.cxx
new file mode 100644 (file)
index 0000000..d8228fb
--- /dev/null
@@ -0,0 +1,1343 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MyGEOMBase_Helper.hxx"
+#include "GEOMBase.h"
+#include "GEOM_Operation.h"
+
+#include <GeometryGUI.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_ViewModel.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+
+#include <SalomeApp_Module.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <LightApp_SelectionMgr.h>
+#include <LightApp_DataOwner.h>
+#include <SalomeApp_Tools.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+#include <SALOME_Prs.h>
+
+#include <OCCViewer_ViewModel.h>
+#include <SVTK_ViewModel.h>
+
+#include <TColStd_MapOfInteger.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+
+//To disable automatic genericobj management, the following line should be commented.
+//Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
+#define WITHGENERICOBJ
+
+//================================================================
+// Function : getActiveView
+// Purpose  : Get active view window, returns 0 if no open study frame
+//================================================================
+static SUIT_ViewWindow* getActiveView()
+{
+  SUIT_Study* activeStudy = SUIT_Session::session()->activeApplication()->activeStudy();
+  if ( activeStudy )
+    return SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+
+  return 0;
+}
+
+
+//================================================================
+// Function : getGeomEngine
+// Purpose  : Static method
+//================================================================
+GEOM::GEOM_Gen_ptr MyGEOMBase_Helper::getGeomEngine()
+{
+  return GeometryGUI::GetGeomGen();
+}
+
+//================================================================
+// Function : MyGEOMBase_Helper
+// Purpose  :
+//================================================================
+MyGEOMBase_Helper::MyGEOMBase_Helper( SUIT_Desktop* desktop )
+  : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ),
+    myIsApplyAndClose( false ), myIsOptimizedBrowsing( false )
+{
+}
+
+//================================================================
+// Function : ~MyGEOMBase_Helper
+// Purpose  :
+//================================================================
+MyGEOMBase_Helper::~MyGEOMBase_Helper()
+{
+  MESSAGE("DESSSSSSSSSSTTTRRRRUUUCCCCCCCCCCCTTTTOOOOORRRRR");
+  //rnv: Fix for the "IPAL21922 : WinTC5.1.4: incorrect quit salome"
+  if ( !SUIT_Session::session()->activeApplication() || !SUIT_Session::session()->activeApplication()->desktop() )
+    return;
+
+  if ( myPreview.size() )
+    erasePreview();
+  if ( hasCommand() )
+    abortCommand();
+//   SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+//   if (app) {
+//     GeometryGUI* aGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
+//     if(aGeomGUI)
+//       globalSelection(aGeomGUI->getLocalSelectionMode() , true );
+//   }
+
+  if (myDisplayer)
+    delete myDisplayer;
+  if ( !CORBA::is_nil( myOperation ) )
+    myOperation->UnRegister();
+}
+
+//================================================================
+// Function : display
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::display( const ObjectList& objList, const bool updateView )
+{
+  ObjectList::const_iterator it;
+  for ( it = objList.begin(); it != objList.end(); it++ ) {
+    display( *it, false );
+  }
+  if ( !objList.empty() && updateView )
+    getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function  : display
+// Purpose   : Display object.
+// Important : Object must be already in study
+//================================================================
+void MyGEOMBase_Helper::display( GEOM::GEOM_Object_ptr object, const bool updateView )
+{
+  // Unset color of shape ( this color may be set during preview displaying )
+  // Default color will be used
+  getDisplayer()->UnsetColor();
+  getDisplayer()->UnsetWidth();
+
+  // Enable activisation of selection
+  getDisplayer()->SetToActivate( true );
+
+  // Display object
+  getDisplayer()->Display( object, updateView );
+}
+
+//================================================================
+// Function : erase
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::erase( const ObjectList& objList, const bool updateView )
+{
+  ObjectList::const_iterator it = objList.begin();
+  for ( ; it != objList.end(); it++ ) {
+    erase( *it, false );
+  }
+  if ( !objList.empty() && updateView )
+    getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function : erase
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView )
+{
+  if ( !object->_is_nil() ) {
+    QString entry = getEntry( object );
+    getDisplayer()->Erase( new SALOME_InteractiveObject(
+      entry.toLatin1().constData(), 
+      "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
+  }
+}
+
+//================================================================
+// Function : redisplay
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::redisplay( const ObjectList& objList,
+                                 const bool withChildren,
+                                 const bool updateView )
+{
+  ObjectList::const_iterator it = objList.begin();
+  for ( ; it != objList.end(); it++ ) {
+    redisplay( *it, withChildren, false );
+  }
+  if ( !objList.empty() && updateView )
+    getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function : redisplay
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object,
+                                 const bool withChildren,
+                                 const bool updateView )
+{
+  if ( !object->_is_nil() ) {
+    // Unset color of shape ( this color may be set during preview displaying )
+    // Default color will be used
+    getDisplayer()->UnsetColor();
+    getDisplayer()->UnsetWidth();
+
+    // Enable activisation of selection
+    getDisplayer()->SetToActivate( true );
+
+    QString entry = getEntry( object );
+    getDisplayer()->Redisplay(new SALOME_InteractiveObject
+                              (entry.toLatin1().constData(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
+  }
+
+  if ( withChildren ) {
+    SalomeApp_Study* aDoc = getStudy();
+    if ( aDoc && aDoc->studyDS() ) {
+      _PTR(Study) aStudy = aDoc->studyDS();
+      CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(object);
+      _PTR(SObject) aSObj (aStudy->FindObjectIOR(std::string(objStr.in())));
+      if ( aSObj  ) {
+        _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
+        for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
+          GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow
+            (GeometryGUI::ClientSObjectToObject(anIt->Value()));
+          if ( !CORBA::is_nil( aChild ) ) {
+            if ( !aChild->_is_nil() ) {
+              QString entry = getEntry( aChild );
+              getDisplayer()->Redisplay( new SALOME_InteractiveObject(
+                entry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
+            }
+          }
+        }
+      }
+    }
+  }
+
+  if ( updateView )
+    getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function : displayPreview
+// Purpose  : Method for displaying preview based on execute() results
+//================================================================
+void MyGEOMBase_Helper::displayPreview( const bool   display,
+                                     const bool   activate,
+                                      const bool   update,
+                                      const bool   toRemoveFromEngine,
+                                      const double lineWidth,
+                                      const int    displayMode,
+                                      const int    color )
+{
+  if(!display) {
+    erasePreview( update );
+    return;
+  }
+  
+  isPreview = true;
+  QString msg;
+  if ( !isValid( msg ) )
+  {
+    erasePreview( update );
+    isPreview = false;
+    return;
+  }
+
+  erasePreview( false );
+
+  try {
+    SUIT_OverrideCursor wc;
+    ObjectList objects;
+    if ( !execute( objects ) || !getOperation()->IsDone() ) {
+      wc.suspend();
+    }
+    else {
+      for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it )
+      {
+            GEOM::GEOM_Object_var obj=*it;
+        displayPreview( obj, true, activate, false, lineWidth, displayMode, color );
+        if ( toRemoveFromEngine )
+              obj->UnRegister();
+      }
+    }
+  }
+  catch( const SALOME::SALOME_Exception& e ) {
+    SalomeApp_Tools::QtCatchCorbaException( e );
+  }
+
+  isPreview = false;
+
+  if ( update )
+    updateViewer();
+}
+
+//================================================================
+// Function : displayPreview
+// Purpose  : Method for displaying preview of resulting shape
+//================================================================
+void MyGEOMBase_Helper::displayPreview( GEOM::GEOM_Object_ptr object,
+                                      const bool            append,
+                                      const bool            activate,
+                                      const bool            update,
+                                      const double          lineWidth,
+                                      const int             displayMode,
+                                      const int             color )
+{
+  // Set color for preview shape
+  getDisplayer()->SetColor( color == -1 ? Quantity_NOC_VIOLET : color );
+
+  // set width of displayed shape
+  getDisplayer()->SetWidth( lineWidth );
+
+  // set display mode of displayed shape
+  int aPrevDispMode = getDisplayer()->SetDisplayMode( displayMode );
+
+  // Disable activation of selection
+  getDisplayer()->SetToActivate( activate );
+
+  // Make a reference to GEOM_Object
+  CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string( object );
+  getDisplayer()->SetName( objStr.in() );
+
+  // Build prs
+  SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object );
+  if ( aPrs == 0 || aPrs->IsNull() )
+    return;
+
+  // Display prs
+  displayPreview( aPrs, append, update );
+
+  getDisplayer()->UnsetName();
+  getDisplayer()->UnsetColor();
+  getDisplayer()->SetDisplayMode( aPrevDispMode );
+
+  // Enable activation of displayed objects
+  getDisplayer()->SetToActivate( true );
+}
+
+//================================================================
+// Function : displayPreview
+// Purpose  : Method for displaying arbitrary preview objects (not limited to shapes)
+//================================================================
+void MyGEOMBase_Helper::displayPreview( const SALOME_Prs* prs,
+                                      const bool        append,
+                                      const bool        update )
+{
+  if ( !append )
+    erasePreview( false );
+
+  // remember current view frame to make correct erase preview later
+  myViewWindow = getActiveView();
+
+  if ( myViewWindow == 0 )
+    return;
+
+  // Display prs
+  SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
+  if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
+       aViewManager->getType() == SVTK_Viewer::Type() )
+    {
+      SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
+      SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
+      if (aView)
+        aView->Display( prs );
+    }
+
+  // Add prs to the preview list
+  myPreview.push_back( (SALOME_Prs*)prs );
+
+  // Update viewer
+  if ( update )
+    getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function : erasePreview
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::erasePreview( const bool update )
+{
+  // check view frame where the preview was displayed
+  bool vfOK = checkViewWindow() && myViewWindow;
+  // Iterate through presentations and delete them
+  for ( PrsList::iterator anIter = myPreview.begin(); anIter != myPreview.end(); ++anIter ) {
+    if ( vfOK )
+      {
+         SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
+         if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
+              aViewManager->getType() == SVTK_Viewer::Type() )
+           {
+             SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
+             SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
+             if (aView)
+               aView->Erase( *anIter, true );
+           }
+      }
+    delete *anIter;
+  }
+  myPreview.clear();
+
+  // Update viewer
+  if ( update )
+    updateViewer();
+}
+
+//================================================================
+// Function  : localSelection
+// Purpose   : Activate selection of objects of a given type
+// IMPORTANT : Works after localSelection( ... ) method call only
+//================================================================
+void MyGEOMBase_Helper::activate( const int theType )
+{
+  if (!getStudy()) return;
+  _PTR(Study) aStudy = getStudy()->studyDS();
+  _PTR(SComponent) aGeom ( aStudy->FindComponent( "GEOM" ) );
+  if ( !aGeom )
+    return;
+
+  SALOME_ListIO aList;
+  _PTR(ChildIterator) anIter ( aStudy->NewChildIterator( aGeom ) );
+  for ( ; anIter->More(); anIter->Next() )
+  {
+    _PTR(SObject) aSO ( anIter->Value() );
+    if ( aSO )
+    {
+      _PTR(SObject) aRefSO;
+      if ( !aSO->ReferencedObject( aRefSO ) )
+      {
+        GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow
+          (GeometryGUI::ClientSObjectToObject(aSO));
+        if ( !anObj->_is_nil() && anObj->GetType() == theType )
+          aList.Append( new SALOME_InteractiveObject( aSO->GetID().c_str(), "GEOM", aSO->GetName().c_str()) );
+      }
+    }
+  }
+
+  getDisplayer()->LocalSelection( aList, 0 );
+}
+
+//================================================================
+// Function : localSelection
+// Purpose  : Activate selection of subshapes in accordance with mode
+//            theMode is from TopAbs_ShapeEnum
+//================================================================
+void MyGEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMode )
+{
+  SALOME_ListIO aListOfIO;
+
+  ObjectList::const_iterator anIter = theObjs.begin();
+  for ( ; anIter != theObjs.end(); ++anIter )
+  {
+    GEOM::GEOM_Object_ptr anObj = *anIter;
+    if ( anObj->_is_nil() )
+      continue;
+    QString anEntry = getEntry( anObj );
+    if ( anEntry != "" )
+      aListOfIO.Append( new SALOME_InteractiveObject(
+        anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
+  }
+
+  getDisplayer()->LocalSelection( aListOfIO, theMode );
+}
+
+//================================================================
+// Function : localSelection
+// Purpose  : Activate selection of subshapes in accordance with mode
+//            theMode is from TopAbs_ShapeEnum
+//================================================================
+void MyGEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode )
+{
+  // If object is null local selection for all objects is activated
+  if ( obj->_is_nil() ) {
+    getDisplayer()->LocalSelection( Handle(SALOME_InteractiveObject)(), mode );
+    return;
+  }
+
+  ObjectList objList;
+  objList.push_back( obj );
+  localSelection( objList, mode );
+}
+
+
+//================================================================
+// Function : globalSelection
+// Purpose  : Activate selection of subshapes. Set selection filters
+//            in accordance with mode. theMode is from GEOMImpl_Types
+//================================================================
+void MyGEOMBase_Helper::globalSelection( const int theMode, const bool update )
+{
+  getDisplayer()->GlobalSelection( theMode, update );
+}
+
+//================================================================
+// Function : globalSelection
+// Purpose  : Activate selection of subshapes. Set selection filters
+//            in accordance with mode. theMode is from GEOMImpl_Types
+//================================================================
+void MyGEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes,
+                                       const bool update )
+{
+  getDisplayer()->GlobalSelection( theModes, update );
+}
+
+//================================================================
+// Function : globalSelection
+// Purpose  : Activate selection of subshapes. Set selection filters
+//            in accordance with mode. theMode is from GEOMImpl_Types
+//================================================================
+void MyGEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes,
+                                       const QList<int>& subShapes,
+                                       const bool update )
+{
+  getDisplayer()->GlobalSelection( theModes, update, &subShapes );
+}
+
+//================================================================
+// Function : addInStudy
+// Purpose  : Add object in study
+//================================================================
+QString MyGEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theName )
+{
+  if ( !hasCommand() )
+    return QString();
+
+  _PTR(Study) aStudy = getStudy()->studyDS();
+  if ( !aStudy || theObj->_is_nil() )
+    return QString();
+
+  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
+
+  GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj );
+
+  SALOMEDS::SObject_var aSO =
+    getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj);
+
+  QString anEntry;
+  if ( !aSO->_is_nil() )
+    anEntry = aSO->GetID();
+
+  // Each dialog is responsible for this method implementation,
+  // default implementation does nothing
+  restoreSubShapes(aStudyDS, aSO);
+  aSO->UnRegister();
+
+  return anEntry;
+}
+
+//================================================================
+// Function : restoreSubShapes
+// Purpose  : restore tree of argument's sub-shapes under the resulting shape
+//================================================================
+void MyGEOMBase_Helper::restoreSubShapes (SALOMEDS::Study_ptr   /*theStudy*/,
+                                        SALOMEDS::SObject_ptr /*theSObject*/)
+{
+  // do nothing by default
+
+  // example of implementation in particular dialog:
+  // GEOM::ListOfGO anArgs;
+  // anArgs.length(0); // empty list means that all arguments should be restored
+  // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+  //                                     /*theFindMethod=*/GEOM::FSM_GetInPlace,
+  //                                     /*theInheritFirstArg=*/false);
+}
+
+//================================================================
+// Function : updateObjBrowser
+// Purpose  : Update object browser
+//================================================================
+void MyGEOMBase_Helper::updateObjBrowser() const
+{
+  SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
+  if (app) {
+    CAM_Module* module = app->module( "Geometry" );
+    SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>( module );
+    if ( appMod ) {
+      appMod->updateObjBrowser( true );
+    }
+  }
+}
+
+//================================================================
+// Function : updateViewer
+// Purpose  : Update active 3D view
+//================================================================
+void MyGEOMBase_Helper::updateViewer()
+{
+  getDisplayer()->UpdateViewer();
+}
+
+//================================================================
+// Function : getStudyId
+// Purpose  : Get study Id
+//================================================================
+int MyGEOMBase_Helper::getStudyId() const
+{
+  int anId = -1;
+  if ( getStudy() )
+    anId = getStudy()->id();
+  return anId;
+}
+
+//================================================================
+// Function : getStudy
+// Purpose  : Returns the active study. It is recommended to use
+//            this method instead of direct desktop->getActiveStudy() calls
+//================================================================
+SalomeApp_Study* MyGEOMBase_Helper::getStudy() const
+{
+  SUIT_Desktop* aDesktop = getDesktop();
+  if (!aDesktop)
+    return 0;
+
+  QList<SUIT_Application*> anAppList = SUIT_Session::session()->applications();
+
+  SUIT_Application* anApp = 0;
+  QListIterator<SUIT_Application*> it( anAppList );
+  while ( it.hasNext() )
+    {
+      anApp = it.next();
+      if ( anApp && anApp->desktop() == aDesktop )
+        break;
+    }
+
+  return dynamic_cast<SalomeApp_Study*>(anApp->activeStudy());
+}
+
+//================================================================
+// Function : getEntry
+// Purpose  :
+//================================================================
+QString MyGEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
+{
+  SalomeApp_Study* study = getStudy();
+  if ( study )  {
+    QString objIOR = GEOMBase::GetIORFromObject( object );
+    if ( objIOR != "" ) {
+      _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toLatin1().constData() ) );
+      if ( SO )
+        return QString::fromStdString(SO->GetID());
+    }
+  }
+  return "";
+}
+
+//================================================================
+// Function : getDisplayer
+// Purpose  :
+//================================================================
+GEOM_Displayer* MyGEOMBase_Helper::getDisplayer()
+{
+  if ( !myDisplayer )
+    myDisplayer = new GEOM_Displayer( getStudy() );
+  return myDisplayer;
+}
+
+//================================================================
+// Function : clearShapeBuffer
+// Purpose  :
+//================================================================
+void MyGEOMBase_Helper::clearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
+{
+  if ( CORBA::is_nil( theObj ) )
+    return;
+
+  CORBA::String_var IOR = SalomeApp_Application::orb()->object_to_string( theObj );
+  TCollection_AsciiString asciiIOR( (char *)IOR.in() );
+  GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
+
+  if ( !getStudy() || !getStudy()->studyDS() )
+    return;
+
+  _PTR(Study) aStudy = getStudy()->studyDS();
+  _PTR(SObject) aSObj ( aStudy->FindObjectIOR( std::string( IOR ) ) );
+  if ( !aSObj )
+    return;
+
+  _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
+  for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
+    _PTR(GenericAttribute) anAttr;
+    if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) {
+      _PTR(AttributeIOR) anIOR ( anAttr );
+      TCollection_AsciiString asciiIOR( (char*)anIOR->Value().c_str() );
+      GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
+    }
+  }
+}
+
+//================================================================
+// Function : openCommand
+// Purpose  :
+//================================================================
+bool MyGEOMBase_Helper::openCommand()
+{
+  bool res = false;
+  if ( !getStudy() || hasCommand() )
+    return res;
+
+  GEOM::GEOM_IOperations_var anOp = GEOM::GEOM_IOperations::_narrow( getOperation() );
+  if ( !anOp->_is_nil() ) {
+    myCommand = new GEOM_Operation( SUIT_Session::session()->activeApplication(), anOp.in() );
+    myCommand->start();
+    res = true;
+  }
+
+  return res;
+}
+
+//================================================================
+// Function : abortCommand
+// Purpose  :
+//================================================================
+bool MyGEOMBase_Helper::abortCommand()
+{
+  if ( !hasCommand() )
+    return false;
+
+  myCommand->abort();
+  delete myCommand; // I don't know where to delete this object here ?
+  myCommand = 0;
+
+  return true;
+}
+
+//================================================================
+// Function : commitCommand
+// Purpose  :
+//================================================================
+bool MyGEOMBase_Helper::commitCommand( const char* )
+{
+  if ( !hasCommand() )
+    return false;
+
+  myCommand->commit();
+  delete myCommand; // I don't know where to delete this object here ?
+  myCommand = 0;
+
+  return true;
+}
+
+//================================================================
+// Function : hasCommand
+// Purpose  :
+//================================================================
+bool MyGEOMBase_Helper::hasCommand() const
+{
+  return (bool)myCommand;
+}
+
+//================================================================
+// Function : getOperation
+// Purpose  :
+//================================================================
+GEOM::GEOM_IOperations_ptr MyGEOMBase_Helper::getOperation()
+{
+  if ( myOperation->_is_nil() )
+    myOperation = createOperation();
+
+  return myOperation;
+}
+
+
+
+//================================================================
+// Function : checkViewWindow
+// Purpose  :
+//================================================================
+bool MyGEOMBase_Helper::checkViewWindow()
+{
+  if ( myViewWindow ){
+    QList<SUIT_ViewWindow*> aViewWindowsList = SUIT_Session::session()->activeApplication()->desktop()->windows();
+    QListIterator<SUIT_ViewWindow*> it( aViewWindowsList );
+    while ( it.hasNext() )
+      {
+        if ( myViewWindow == it.next() )
+          return true;
+      }
+  }
+  myViewWindow = 0;
+  return false;
+}
+
+//================================================================
+// Function : onAccept
+// Purpose  : This method should be called from dialog's slots onOk() and onApply()
+//            It perfroms user input validation, then it
+//            performs a proper operation and manages transactions, etc.
+//================================================================
+bool MyGEOMBase_Helper::onAccept( const bool publish, const bool useTransaction )
+{
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+  if ( !appStudy ) return false;
+  _PTR(Study) aStudy = appStudy->studyDS();
+
+  bool aLocked = (_PTR(AttributeStudyProperties) (aStudy->GetProperties()))->IsLocked();
+  if ( aLocked ) {
+    MESSAGE("MyGEOMBase_Helper::onAccept - ActiveStudy is locked");
+    SUIT_MessageBox::warning ( (QWidget*)SUIT_Session::session()->activeApplication()->desktop(),
+                               QObject::tr("WRN_WARNING"),
+                               QObject::tr("WRN_STUDY_LOCKED"),
+                               QObject::tr("BUT_OK") );
+    return false;
+  }
+
+  QString msg;
+  if ( !isValid( msg ) ) {
+    showError( msg );
+    return false;
+  }
+
+  erasePreview( false );
+
+  bool result = false;
+
+  try {
+    if ( ( !publish && !useTransaction ) || openCommand() ) {
+      SUIT_OverrideCursor wc;
+      SUIT_Session::session()->activeApplication()->putInfo( "" );
+      ObjectList objects;
+      if ( !execute( objects ) || !getOperation()->IsDone() ) {
+        wc.suspend();
+        abortCommand();
+        showError();
+      }
+      else {
+        addSubshapesToStudy(); // add Subshapes if local selection
+        const int nbObjs = objects.size();
+        QStringList anEntryList;
+        int aNumber = 1;
+        for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) {
+          GEOM::GEOM_Object_var obj=*it;
+          if ( publish ) {
+            QString aName = getNewObjectName();
+            if ( nbObjs > 1 ) {
+              if (aName.isEmpty())
+                aName = getPrefix(obj);
+              if (nbObjs <= 30) {
+                // Try to find a unique name
+                aName = GEOMBase::GetDefaultName(aName, extractPrefix());
+              } else {
+                // Don't check name uniqueness in case of numerous objects
+                aName = aName + "_" + QString::number(aNumber++);
+              }
+            } else {
+              // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
+              if ( aName.isEmpty() )
+                aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
+            }
+            anEntryList << addInStudy( obj, aName.toLatin1().constData() );
+            // updateView=false
+            display( obj, false );
+#ifdef WITHGENERICOBJ
+            // obj has been published in study. Its refcount has been incremented.
+            // It is safe to decrement its refcount
+            // so that it will be destroyed when the entry in study will be removed
+            obj->UnRegister();
+#endif
+          }
+          else {
+            // asv : fix of PAL6454. If publish==false, then the original shape
+            // was modified, and need to be re-cached in GEOM_Client before redisplay
+            clearShapeBuffer( obj );
+            // withChildren=true, updateView=false
+            redisplay( obj, true, false );
+          }
+        }
+
+        if ( nbObjs ) {
+          commitCommand();
+          updateObjBrowser();
+          if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
+            if( LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp ) )
+              aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() );
+            anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
+          }
+          result = true;
+        }
+        else
+          abortCommand();
+      }
+    }
+  }
+  catch( const SALOME::SALOME_Exception& e ) {
+    SalomeApp_Tools::QtCatchCorbaException( e );
+    abortCommand();
+  }
+
+  updateViewer();
+
+  return result;
+}
+
+
+//================================================================
+// Function : showError
+// Purpose  : Shows a message box with infromation about an error taken from getOperation()->GetErrorCode()
+//================================================================
+void MyGEOMBase_Helper::showError()
+{
+  QString msg;
+  if ( !getOperation()->_is_nil() )
+    msg = QObject::tr( getOperation()->GetErrorCode() );
+
+  if ( msg.isEmpty() )
+    msg = QObject::tr( "GEOM_PRP_ABORT" );
+
+  SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
+                             QObject::tr( "GEOM_ERROR_STATUS" ),
+                             msg,
+                             QObject::tr( "BUT_OK" ) );
+}
+
+//================================================================
+// Function : showError
+// Purpose  : Shows a error message followed by <msg>
+//================================================================
+void MyGEOMBase_Helper::showError( const QString& msg )
+{
+  QString str( QObject::tr( "GEOM_INCORRECT_INPUT" ) );
+  if ( !msg.isEmpty() )
+    str += "\n" + msg;
+  SUIT_MessageBox::critical(SUIT_Session::session()->activeApplication()->desktop(), QObject::tr( "GEOM_ERROR" ), str, QObject::tr( "BUT_OK" ) );
+}
+
+//////////////////////////////////////////////////////////////////
+// Virtual methods to be redefined in dialogs
+//////////////////////////////////////////////////////////////////
+
+//================================================================
+// Function : createOperation
+// Purpose  : Redefine this method to return proper IOperation reference
+//================================================================
+GEOM::GEOM_IOperations_ptr MyGEOMBase_Helper::createOperation()
+{
+  GEOM::GEOM_IOperations_var aNilOp;
+  return aNilOp._retn();
+}
+
+//================================================================
+// Function : isValid
+// Purpose  : Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+//================================================================
+bool MyGEOMBase_Helper::isValid( QString& )
+{
+  return true;
+}
+
+//================================================================
+// Function : execute
+// Purpose  : This method is called by onAccept().
+//            It should perform the required operation and put all new or modified objects into
+//            <objects> argument.Should return <false> if some error occurs during its execution.
+//================================================================
+bool MyGEOMBase_Helper::execute( ObjectList& objects )
+{
+  return false;
+}
+
+//================================================================
+// Function : getFather
+// Purpose  : This method is called by addInStudy(). It should return a father object
+//            for <theObj> or a nil reference if <theObj> should be published
+//            as a top-level object.
+//================================================================
+GEOM::GEOM_Object_ptr MyGEOMBase_Helper::getFather( GEOM::GEOM_Object_ptr theObj )
+{
+  return GEOM::GEOM_Object::_nil();
+}
+
+//================================================================
+// Function : getNewObjectName
+// Purpose  : Redefine this method to return proper name for a new object
+//================================================================
+QString MyGEOMBase_Helper::getNewObjectName() const
+{
+  return QString::null;
+}
+
+//================================================================
+// Function : extractPrefix
+// Purpose  : Redefine this method to return \c true if necessary
+//            to extract prefix when generating new name for the
+//            object(s) being created
+//================================================================
+bool MyGEOMBase_Helper::extractPrefix() const
+{
+  return false;
+}
+
+//================================================================
+// Function : getPrefix
+// Purpose  : Get prefix for name of created object
+//================================================================
+QString MyGEOMBase_Helper::getPrefix( GEOM::GEOM_Object_ptr theObj ) const
+{
+  if ( !myPrefix.isEmpty() || theObj->_is_nil() )
+    return myPrefix;
+
+  GEOM::shape_type aType = theObj->GetShapeType();
+
+  switch ( aType )
+  {
+    case GEOM::VERTEX   : return QObject::tr( "GEOM_VERTEX" );
+    case GEOM::EDGE     : return QObject::tr( "GEOM_EDGE" );
+    case GEOM::WIRE     : return QObject::tr( "GEOM_WIRE" );
+    case GEOM::FACE     : return QObject::tr( "GEOM_FACE" );
+    case GEOM::SHELL    : return QObject::tr( "GEOM_SHELL" );
+    case GEOM::SOLID    : return QObject::tr( "GEOM_SOLID" );
+    case GEOM::COMPSOLID: return QObject::tr( "GEOM_COMPOUNDSOLID" );
+    case GEOM::COMPOUND : return QObject::tr( "GEOM_COMPOUND" );
+    default : return "";
+  }
+}
+
+//================================================================
+// Function : getDesktop
+// Purpose  : Returns myDesktop field. Initialized in constructor,
+//            usually as dynamic_cast<SUIT_Desktop*>(parentWidget())
+//================================================================
+SUIT_Desktop* MyGEOMBase_Helper::getDesktop() const
+{
+  return myDesktop;
+}
+
+//================================================================
+// Function : selectObjects
+// Purpose  : Selects list of objects
+//================================================================
+bool MyGEOMBase_Helper::selectObjects( ObjectList& objects )
+{
+  SUIT_DataOwnerPtrList aList;
+  ObjectList::iterator anIter;
+  for ( anIter = objects.begin(); anIter != objects.end(); ++anIter )
+  {
+    QString anEntry = getEntry( *anIter );
+    LightApp_DataOwner* anOwher = new LightApp_DataOwner( anEntry );
+    aList.append( anOwher );
+  }
+
+  SUIT_Session* session = SUIT_Session::session();
+  SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
+  if ( !app )
+    return false;
+
+  LightApp_SelectionMgr* aMgr = app->selectionMgr();
+  if ( !aMgr )
+    return false;
+
+  aMgr->setSelected( aList, false );
+
+  return true;
+}
+
+//================================================================
+// Function : findObjectInFather
+// Purpose  : It should return an object if its founded in study or
+//            return Null object if the object is not founded
+//================================================================
+GEOM::GEOM_Object_ptr MyGEOMBase_Helper::findObjectInFather (GEOM::GEOM_Object_ptr theFather,
+                                                           const QString& theName)
+{
+  SalomeApp_Application* app =
+    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  _PTR(Study) aDStudy = appStudy->studyDS();
+  QString IOR = GEOMBase::GetIORFromObject( theFather );
+  _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toLatin1().constData() ) );
+
+  bool inStudy = false;
+  GEOM::GEOM_Object_var aReturnObject;
+  for (_PTR(ChildIterator) iit (aDStudy->NewChildIterator( SObj )); iit->More() && !inStudy; iit->Next()) {
+    _PTR(SObject) child (iit->Value());
+    QString aChildName = child->GetName().c_str();
+    if (aChildName == theName) {
+      inStudy = true;
+      CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(iit->Value());
+      aReturnObject = GEOM::GEOM_Object::_narrow( corbaObj );
+    }
+  }
+  if (inStudy)
+    return aReturnObject._retn();
+  
+  return GEOM::GEOM_Object::_nil();
+}
+
+//================================================================
+// Function : findObjectInFather
+// Purpose  : It should return an object if its founded in study or
+//            return Null object if the object is not founded
+//================================================================
+GEOM::GEOM_Object_ptr MyGEOMBase_Helper::findObjectInFather( GEOM::GEOM_Object_ptr theFather,
+                                                           int theIndex )
+{
+  GEOM::GEOM_Object_var object;
+  bool found = false;
+  
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+  if ( study ) {
+    _PTR(Study) studyDS = study->studyDS();
+    QString IOR = GEOMBase::GetIORFromObject( theFather );
+    _PTR(SObject) sobject( studyDS->FindObjectIOR( IOR.toLatin1().constData() ) );
+    if ( sobject ) {
+      _PTR(ChildIterator) it( studyDS->NewChildIterator( sobject ) );
+      for ( ; it->More() && !found; it->Next() ) {
+       GEOM::GEOM_Object_var cobject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( it->Value() ) );
+       if ( !CORBA::is_nil( cobject ) ) {
+         GEOM::ListOfLong_var indices = cobject->GetSubShapeIndices();
+         int length = indices->length();
+         for ( int i = 0; i < length && !found; i++ ) {
+           if ( indices[i] == theIndex ) {
+             object = cobject;
+             found = true;
+           }
+         }
+       }
+      }
+    }
+  }
+  
+  return object._retn();
+}
+
+//================================================================
+// Function : addSubshapesToStudy
+// Purpose  : Virtual method to add subshapes if needs
+//================================================================
+void MyGEOMBase_Helper::addSubshapesToStudy()
+{
+  //Impemented in Dialogs, called from Accept method
+}
+
+//================================================================
+// Function : getSelected
+// Purpose  : Get selected object by specified type
+//
+// Returns valid object if only one object of the specified type is selected
+// (no matter global or local selection is activated). If \a type is TopAbs_SHAPE,
+// geometrical object of any valid type is expected.
+// 
+// \param type type of the object to be obtained from selection
+// \return selected geometrical object or nil object if selection is not satisfactory
+//================================================================
+GEOM::GeomObjPtr MyGEOMBase_Helper::getSelected( TopAbs_ShapeEnum type )
+{
+  QList<TopAbs_ShapeEnum> types;
+  types << type;
+  return getSelected( types );
+}
+
+//================================================================
+// Function : getSelected
+// Purpose  : Get selected object by specified types
+//
+// Returns valid object if only one object of the specified type is selected
+// (no matter global or local selection is activated). The list of allowed
+// shape types is passed via \a types. If \a types includes TopAbs_SHAPE,
+// geometrical object of any valid type is expected.
+// 
+// \param types list of allowed shape types for the objects to be obtained from selection
+// \return selected geometrical object or nil object if selection is not satisfactory
+//================================================================
+GEOM::GeomObjPtr MyGEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEnum>& types )
+{
+  QList<GEOM::GeomObjPtr> selected = getSelected( types, 1 );
+  return selected.count() > 0 ? selected[0] : GEOM::GeomObjPtr();
+}
+
+//================================================================
+// Function : getSelected
+// Purpose  : Get selected object(s) by specified type
+//
+// Returns list of selected objects if selection satisfies specifies selection options.
+// (no matter global or local selection is activated). If \a type is TopAbs_SHAPE,
+// geometrical objects of any valid type are expected.
+//
+// The \a type parameter specifies allowed type of the object(s) being selected.
+// The \a count parameter specifies exact number of the objects to be retrieved from selection.
+// The \a strict parameter specifies policy being applied to the selection. 
+// If \a count < 0, then any number of the selected objects is valid (including 0).
+// In this case, if \a strict is \c true (default), all selected objects should satisfy
+// the specified \a type.
+// If \a count > 0, only specified number of the objects is retrieved from the selection.
+// In this case, if \a strict is \c true (default), function returns empty list if total number of selected
+// objects does not correspond to the \a count parameter. Otherwise (if \a strict is \c false),
+// function returns valid list of objects if at least \a count objects satisfy specified \a type.
+// 
+// \param type type of the object(s) to be obtained from selection
+// \param count number of items to be retrieved from selection
+// \param strict selection policy
+// \return list of selected geometrical objects or empty list if selection is not satisfactory
+//================================================================
+QList<GEOM::GeomObjPtr> MyGEOMBase_Helper::getSelected( TopAbs_ShapeEnum type, int count, bool strict )
+{
+  QList<TopAbs_ShapeEnum> types;
+  types << type;
+  return getSelected( types, count, strict );
+}
+
+static bool typeInList( TopAbs_ShapeEnum type, const QList<TopAbs_ShapeEnum>& types )
+{
+  bool ok = false;
+  for ( int i = 0; i < types.count() && !ok; i++ )
+    ok = types[i] == TopAbs_SHAPE || types[i] == type;
+  return ok;
+}
+
+//================================================================
+// Function : getSelected
+// Purpose  : Get selected objects by specified types
+//
+// Returns list of selected objects if selection satisfies specifies selection options.
+// (no matter global or local selection is activated). If \a types includes TopAbs_SHAPE,
+// geometrical objects of any valid type are expected.
+//
+// The \a types parameter specifies allowed types of the object(s) being selected.
+// The \a count parameter specifies exact number of the objects to be retrieved from selection.
+// The \a strict parameter specifies policy being applied to the selection. 
+// If \a count < 0, then any number of the selected objects is valid (including 0).
+// In this case, if \a strict is \c true (default), all selected objects should satisfy
+// the specified \a type.
+// If \a count > 0, only specified number of the objects is retrieved from the selection.
+// In this case, if \a strict is \c true (default), function returns empty list if total number of selected
+// objects does not correspond to the \a count parameter. Otherwise (if \a strict is \c false),
+// function returns valid list of objects if at least \a count objects satisfy specified \a type.
+// 
+// \param types list of allowed shape types for the objects to be obtained from selection
+// \param count number of items to be retrieved from selection
+// \param strict selection policy
+// \return list of selected geometrical objects or empty list if selection is not satisfactory
+//================================================================
+QList<GEOM::GeomObjPtr> MyGEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEnum>& types, int count, bool strict )
+{
+  SUIT_Session* session = SUIT_Session::session();
+  QList<GEOM::GeomObjPtr> result;
+
+  SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
+  if ( app ) {
+    LightApp_SelectionMgr* selMgr = app->selectionMgr();
+    if ( selMgr ) {
+      SALOME_ListIO selected;
+      selMgr->selectedObjects( selected );
+      SALOME_ListIteratorOfListIO it( selected );
+      bool stopped = false;
+      for ( ; it.More() && !stopped; it.Next() ) {
+       Handle(SALOME_InteractiveObject) IO = it.Value();
+       GEOM::GeomObjPtr object = GEOMBase::ConvertIOinGEOMObject( IO );
+       if ( object ) {
+         TColStd_IndexedMapOfInteger subShapes;
+         selMgr->GetIndexes( IO, subShapes );
+         int nbSubShapes = subShapes.Extent();
+         if ( nbSubShapes == 0 ) {
+           // global selection
+           if ( typeInList( (TopAbs_ShapeEnum)(object->GetShapeType()), types ) ) {
+             result << object;
+             if ( count > 0 ) {
+               if ( strict && result.count() > count ) {
+                 result.clear();
+                 stopped = true;
+               }
+               else if ( !strict && result.count() == count )
+                 stopped = true;
+             }
+           }
+           else if ( strict ) {
+             result.clear();
+             stopped = true;
+           }
+         }
+         else {
+           // local selection
+           for ( int i = 1; i <= nbSubShapes && !stopped; i++ ) {
+             int idx = subShapes( i );
+             GEOM::GeomObjPtr subShape = findObjectInFather( object.get(), idx );
+             if ( !subShape ) {
+               // sub-shape is not yet published in the study
+               GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+               subShape.take( shapesOp->GetSubShape( object.get(), idx ) ); // take ownership!
+             }
+             if ( typeInList( (TopAbs_ShapeEnum)(subShape->GetShapeType()), types ) ) {
+               result << subShape;
+               if ( count > 0 ) {
+                 if ( strict && result.count() > count ) {
+                   result.clear();
+                   stopped = true;
+                 }
+                 else if ( !strict && result.count() == count )
+                   stopped = true;
+               }
+             }
+             else if ( strict ) {
+               result.clear();
+               stopped = true;
+             }
+           }
+         }
+       }
+      }
+    }
+  }
+  return result;
+}
+
+//================================================================
+// Function : setIsApplyAndClose
+// Purpose  : Set value of the flag indicating that the dialog is
+//            accepted by Apply & Close button
+//================================================================
+void MyGEOMBase_Helper::setIsApplyAndClose( const bool theFlag )
+{
+  myIsApplyAndClose = theFlag;
+}
+
+//================================================================
+// Function : isApplyAndClose
+// Purpose  : Get value of the flag indicating that the dialog is
+//            accepted by Apply & Close button
+//================================================================
+bool MyGEOMBase_Helper::isApplyAndClose() const
+{
+  return myIsApplyAndClose;
+}
+
+//================================================================
+// Function : setIsOptimizedBrowsing
+// Purpose  : Set value of the flag switching to optimized
+//            browsing mode (to select the first published
+//            object only)
+//================================================================
+void MyGEOMBase_Helper::setIsOptimizedBrowsing( const bool theFlag )
+{
+  myIsOptimizedBrowsing = theFlag;
+}
+
+//================================================================
+// Function : isOptimizedBrowsing
+// Purpose  : Get value of the flag switching to optimized
+//            browsing mode (to select the first published
+//            object only)
+//================================================================
+bool MyGEOMBase_Helper::isOptimizedBrowsing() const
+{
+  return myIsOptimizedBrowsing;
+}
diff --git a/src/HEXABLOCKGUI/MyGEOMBase_Helper.hxx b/src/HEXABLOCKGUI/MyGEOMBase_Helper.hxx
new file mode 100644 (file)
index 0000000..4bfdab2
--- /dev/null
@@ -0,0 +1,205 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MYGEOMBASE_HELPER_HXX
+#define MYGEOMBASE_HELPER_HXX
+
+#include "GEOM_GEOMBase.hxx"
+#include "GEOM_GenericObjPtr.h"
+
+#include <GEOM_Displayer.h>
+#include <SALOME_ListIO.hxx>
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
+
+#include <QString>
+#include <QMap>
+
+#include <list>
+
+typedef std::list<GEOM::GEOM_Object_ptr> ObjectList;
+
+class SalomeApp_Study;
+class SUIT_Desktop;
+class SUIT_ViewWindow;
+class SALOME_Prs;
+class GEOM_Operation;
+class TColStd_MapOfInteger;
+
+//================================================================
+// Class       : MyGEOMBase_Helper
+// Description : Helper class for dialog box development, can be used as 
+//               the second base class for dialog boxes. Contains convenient methods
+//               performing common operations (display/erase, selection activation,
+//               publication in a study, transaction management)
+//================================================================
+class GEOMBASE_EXPORT MyGEOMBase_Helper
+{
+public:
+  MyGEOMBase_Helper( SUIT_Desktop* );
+  virtual ~MyGEOMBase_Helper();
+
+protected:
+  static GEOM::GEOM_Gen_ptr getGeomEngine();
+
+  void display         ( const ObjectList&, const bool = true );
+  void display         ( GEOM::GEOM_Object_ptr, const bool = true );
+  void erase           ( const ObjectList&, const bool = true );
+  void erase           ( GEOM::GEOM_Object_ptr, const bool = true );
+  void redisplay       ( const ObjectList&, const bool = true, const bool = true );
+  void redisplay       ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
+
+  virtual void displayPreview ( const bool   display,
+                               const bool   activate = false, 
+                                const bool   update = true,
+                                const bool   toRemoveFromEngine = true,
+                                const double lineWidth = -1, 
+                                const int    displayMode = -1,
+                                const int    color  = -1 );
+  // This is the easiest way to show preview. It is based on execute() method.
+  // It removes temporary GEOM::GEOM_Objects automatically.
+
+  virtual void displayPreview  ( GEOM::GEOM_Object_ptr obj, 
+                                 const bool   append = false, 
+                                 const bool   activate = false, 
+                                 const bool   update = true,
+                                 const double lineWidth = -1, 
+                                 const int    displayMode = -1,
+                                 const int    color  = -1 );
+  void displayPreview  ( const SALOME_Prs* prs, 
+                         const bool append = false, 
+                         const bool = true );
+  void erasePreview    ( const bool = true );
+
+  void localSelection( const ObjectList&, const int );
+  void localSelection( GEOM::GEOM_Object_ptr, const int );
+  void activate( const int );
+  void globalSelection( const int = GEOM_ALLOBJECTS, const bool = false  );
+  void globalSelection( const TColStd_MapOfInteger&, const bool = false );
+  void globalSelection( const TColStd_MapOfInteger&, const QList<int>& ,const bool = false );
+  void updateViewer    ();
+
+  void prepareSelection( const ObjectList&, const int );
+  void prepareSelection( GEOM::GEOM_Object_ptr, const int );
+
+  QString addInStudy   ( GEOM::GEOM_Object_ptr, const char* theName ); 
+
+  bool openCommand     ();
+  bool abortCommand    ();
+  bool commitCommand   ( const char* = 0 );
+  bool hasCommand      () const;
+
+  void updateObjBrowser() const;
+  int  getStudyId      () const;
+  SalomeApp_Study* getStudy  () const;
+  bool checkViewWindow ();
+
+  bool onAccept( const bool publish = true, const bool useTransaction = true );
+  // This method should be called from "OK" button handler.
+  // <publish> == true means that objects returned by execute() 
+  // should be published in a study.
+
+  void showError();
+  // Shows a message box with infromation about an error taken from getOperation()->GetErrorCode()
+  void showError( const QString& msg );
+  // Shows a error message followed by <msg>
+
+  GEOM::GEOM_IOperations_ptr getOperation();
+  // If <myOperation> is nil --> calls createOperation() and put the result
+  // into <myOperation> and returns it;
+  // otherwise, simply returns <myOperation>
+
+  inline void setPrefix( const QString& prefix ) { myPrefix = prefix; }
+  QString getPrefix( GEOM::GEOM_Object_ptr = GEOM::GEOM_Object::_nil() ) const;
+  
+  bool selectObjects( ObjectList& objects );
+  // Selects list of objects 
+
+  ////////////////////////////////////////////////////////////////////////////
+  // Virtual methods, to be redefined in dialog classes
+  ////////////////////////////////////////////////////////////////////////////
+
+  virtual GEOM::GEOM_IOperations_ptr createOperation();
+  // This method should be redefined in dialog boxes so as to return 
+  // proper GEOM_IOperation interface.
+  // Returns nil reference by default
+
+  virtual bool isValid( QString& msg );
+  // Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+
+  virtual bool execute( ObjectList& objects );
+  // This method is called by onAccept(). 
+  // It should perform the required operation and put all new or modified objects into 
+  // <objects> argument.Should return <false> if some error occurs during its execution. 
+
+  virtual void restoreSubShapes( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject );
+  // This method is called by addInStudy().
+
+  virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj );
+  // This method is called by addInStudy(). It should return a father object
+  // for <theObj> or a nil reference if <theObj> should be published
+  // as a top-level object.
+
+  virtual QString getNewObjectName() const; 
+  virtual bool extractPrefix() const;
+  virtual void addSubshapesToStudy();
+
+  GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, const QString& theName );
+  GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, int theIndex );
+  // These methods are used to find published sub-object (sub-shape) in the parent object (main shape)
+
+  GEOM::GeomObjPtr        getSelected( TopAbs_ShapeEnum type );
+  GEOM::GeomObjPtr        getSelected( const QList<TopAbs_ShapeEnum>& types );
+  QList<GEOM::GeomObjPtr> getSelected( TopAbs_ShapeEnum type, int count, bool strict = true );
+  QList<GEOM::GeomObjPtr> getSelected( const QList<TopAbs_ShapeEnum>& types, int count, bool strict = true );
+
+  void SetIsPreview(const bool thePreview) {isPreview = thePreview;}
+  bool IsPreview() {return isPreview;}
+
+  GEOM_Displayer*             getDisplayer();
+  SUIT_Desktop*               getDesktop() const;
+
+  virtual void                setIsApplyAndClose( const bool theFlag );
+  virtual bool                isApplyAndClose() const;
+
+  virtual void                setIsOptimizedBrowsing( const bool theFlag );
+  virtual bool                isOptimizedBrowsing() const;
+
+private:
+  QString                     getEntry( GEOM::GEOM_Object_ptr ) const;
+  void                        clearShapeBuffer( GEOM::GEOM_Object_ptr );
+
+private:
+  typedef std::list<SALOME_Prs*> PrsList;
+
+  PrsList                     myPreview;
+  GEOM_Displayer*             myDisplayer;
+  GEOM_Operation*             myCommand;
+  GEOM::GEOM_IOperations_var  myOperation;
+  SUIT_ViewWindow*            myViewWindow;
+  QString                     myPrefix;
+  bool                        isPreview;
+  SALOME_ListIO               mySelected;
+  SUIT_Desktop*               myDesktop;
+  bool                        myIsApplyAndClose;
+  bool                        myIsOptimizedBrowsing;
+
+};
+
+#endif // GEOMBASE_HELPER_HXX
diff --git a/src/HEXABLOCKGUI/MyGEOMBase_Skeleton.cxx b/src/HEXABLOCKGUI/MyGEOMBase_Skeleton.cxx
new file mode 100755 (executable)
index 0000000..b7690c9
--- /dev/null
@@ -0,0 +1,433 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MyGEOMBase_Skeleton.hxx"
+#include "GEOMBase.h"
+
+#include "MyDlgRef.hxx"
+#include <GeometryGUI.h>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_Study.h>
+#include <LightApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+
+#include <QKeyEvent>
+#include <QSpinBox>
+#include <QDoubleSpinBox>
+
+//=================================================================================
+// class    : MyGEOMBase_Skeleton()
+// purpose  : Constructs a MyGEOMBase_Skeleton which is a child of 'parent', with the
+//            name 'name' and widget flags set to 'f'.
+//            The dialog will by default be modeless, unless you set 'modal' to
+//            true to construct a modal dialog.
+//=================================================================================
+MyGEOMBase_Skeleton::MyGEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* parent,
+                                      bool modal, Qt::WindowFlags fl )
+  : QDialog( parent, fl ),
+    MyGEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
+    myGeomGUI( theGeometryGUI ),
+    myRBGroup( 0 )
+{
+//   setAttribute( Qt::WA_DeleteOnClose );
+
+  setModal( modal );
+  MESSAGE("MyGEOMBase_Skeleton::MyGEOMBase_Skeleton()");
+
+  myMainFrame = new MyDlgRef_Skeleton( this );
+  QVBoxLayout* topLayout = new QVBoxLayout( this );
+  topLayout->setMargin( 0 ); topLayout->setSpacing( 0 );
+  topLayout->addWidget( myMainFrame );
+
+  myMainFrame->GroupBoxName->setTitle( tr( "GEOM_RESULT_NAME_GRP" ) );
+  myMainFrame->NameLabel->setText( tr( "GEOM_RESULT_NAME_LBL" ) );
+
+  myMainFrame->GroupBoxPublish->setTitle( tr( "GEOM_PUBLISH_RESULT_GRP" ) );
+  myMainFrame->CheckBoxRestoreSS->setText( tr( "GEOM_RESTORE_SUB_SHAPES" ) );
+  myMainFrame->CheckBoxAddPrefix->setText( tr( "GEOM_RSS_ADD_FREFIX" ) );
+  myMainFrame->CheckBoxPreview->setText( tr("GEOM_PREVIEW") );
+
+  buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) );
+  //buttonOk()->setText( tr( "GEOM_BUT_APPLY_AND_CLOSE" ) );
+  buttonApply()->setText( tr( "GEOM_BUT_APPLY" ) );
+  buttonHelp()->setText( tr( "GEOM_BUT_HELP" ) );
+
+  myRBGroup = new QButtonGroup( this );
+  myRBGroup->addButton( myMainFrame->RadioButton1, 0 );
+  myRBGroup->addButton( myMainFrame->RadioButton2, 1 );
+  myRBGroup->addButton( myMainFrame->RadioButton3, 2 );
+  myRBGroup->addButton( myMainFrame->RadioButton4, 3 );
+  myRBGroup->addButton( myMainFrame->RadioButton5, 4 );
+
+  connect( myRBGroup, SIGNAL( buttonClicked( int ) ), this, SIGNAL( constructorsClicked( int ) ) );
+
+  Init();
+}
+
+//=================================================================================
+// function : ~MyGEOMBase_Skeleton()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MyGEOMBase_Skeleton::~MyGEOMBase_Skeleton()
+{
+  if ( myGeomGUI )
+    myGeomGUI->SetActiveDialogBox( 0 );
+}
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::Init()
+{
+  SalomeApp_Application* app = (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() );
+  if ( !myGeomGUI && app )
+    myGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
+
+  /* init variables */
+  if ( myGeomGUI )
+    myGeomGUI->SetActiveDialogBox( this );
+
+  /* signals and slots connections */
+  connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
+  if ( myGeomGUI ) {
+    connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
+    connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( ClickOnCancel() ) );
+  }
+
+  // connect help button on a private slot that displays help information
+  connect( buttonHelp(), SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
+
+  connect( myMainFrame->CheckBoxPreview, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
+
+  /* displays Dialog */
+  myMainFrame->RadioButton1->setChecked( true );
+  myMainFrame->RadioButton4->hide();
+  myMainFrame->RadioButton5->hide();
+
+  myMainFrame->CheckBoxRestoreSS->setChecked( false );
+  myMainFrame->CheckBoxAddPrefix->setChecked( true );
+
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  bool aPrv = (resMgr == 0) ? false : resMgr->booleanValue( "Geometry", "geom_preview", false );
+
+  myMainFrame->CheckBoxPreview->setChecked( aPrv );
+  myMainFrame->GroupBoxPublish->hide();
+}
+
+//=================================================================================
+// function : initSpinBox()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox,
+                                     int min,  int max, int step )
+{
+  spinBox->setRange( min, max );
+  spinBox->setSingleStep( step );
+}
+
+//=================================================================================
+// function : initSpinBox()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
+                                     double min,  double max,
+                                     double step, const char* quantity )
+{
+  // Obtain precision from preferences
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  int aPrecision = resMgr->integerValue( "Geometry", quantity, 6 );
+
+  spinBox->setPrecision( aPrecision );
+  spinBox->setDecimals( qAbs( aPrecision ) ); // it's necessary to set decimals before the range setting,
+                                    // by default Qt rounds boundaries to 2 decimals at setRange
+  spinBox->setRange( min, max );
+  spinBox->setSingleStep( step );
+
+  // Add a hint for the user saying how to tune precision
+  QString userPropName = QObject::tr( QString( "GEOM_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+  spinBox->setProperty( "validity_tune_hint",
+                        QVariant( QObject::tr( "GEOM_PRECISION_HINT" ).arg( userPropName ) ) );
+}
+
+//=================================================================================
+// function : updateAttributes()
+// purpose  : Workaround for Translation and Rotation operations with unchecked option "Create a copy".
+//            In this case PublishInStudy isn't called, so we need to update object's attributes manually
+//=================================================================================
+void MyGEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
+                                          const QStringList& theParameters)
+{
+  SALOMEDS::Study_var aStudy = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS());
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(theObj->GetStudyEntry());
+  SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
+  SALOMEDS::AttributeString_var aStringAttrib = SALOMEDS::AttributeString::_narrow(anAttr);
+
+  std::string aValue = aStringAttrib->Value();
+  if( aValue != "" )
+    aValue += "|";
+  for( int i = 0, n = theParameters.count(); i < n; i++ ) {
+    std::string aParameter = theParameters[i].toStdString();
+    if(aStudy->IsVariable(aParameter.c_str()))
+      aValue += aParameter;
+    if(i != n-1)
+      aValue += ":";
+  }
+  aStringAttrib->SetValue(aValue.c_str());
+}
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::ClickOnCancel()
+{
+  close();
+}
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::LineEditReturnPressed()
+{
+  if (!myEditCurrentArgument)
+    return;
+
+  /* User name of object input management                          */
+  /* If successfull the selection is changed and signal emitted... */
+  /* so SelectionIntoArgument() is automatically called.           */
+  const QString objectUserName = myEditCurrentArgument->text();
+  QWidget* thisWidget = (QWidget*)this;
+
+  SALOME_ListIO aList;
+  LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
+  if (aSelMgr)
+    aSelMgr->selectedObjects(aList);
+  if (GEOMBase::SelectionByNameInDialogs(thisWidget, objectUserName, aList))
+    myEditCurrentArgument->setText(objectUserName);
+}
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::DeactivateActiveDialog()
+{
+  this->setEnabled( false );
+  globalSelection();
+  if ( myGeomGUI ) {
+    myGeomGUI->SetActiveDialogBox( 0 );
+    disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
+  }
+  erasePreview();
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::ActivateThisDialog()
+{
+  /* Emit a signal to deactivate the active dialog */
+  if ( myGeomGUI ) myGeomGUI->EmitSignalDeactivateDialog();
+  this->setEnabled( true );
+  if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( (QDialog*)this );
+  return;
+}
+
+//=================================================================================
+// function : closeEvent()
+// purpose  : same than click on cancel button
+//=================================================================================
+void MyGEOMBase_Skeleton::closeEvent( QCloseEvent* e )
+{
+  if ( myGeomGUI ) {
+    disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
+    myGeomGUI->getApp()->updateActions();
+  }
+  QDialog::closeEvent( e );
+}
+
+//=================================================================================
+// function : initName()
+// purpose  : initialize the Name field with a string "thePrefix_X" (Vertex_3)
+//=================================================================================
+void MyGEOMBase_Skeleton::initName( const QString& thePrefix )
+{
+  if ( !thePrefix.isNull() )
+    setPrefix( thePrefix );
+  myMainFrame->ResultName->setText( GEOMBase::GetDefaultName( getPrefix() ) );
+}
+
+//=================================================================================
+// function : getNewObjectName()
+// purpose  : returns contents of Name field
+//=================================================================================
+QString MyGEOMBase_Skeleton::getNewObjectName() const
+{
+  return myMainFrame->ResultName->text();
+}
+
+//=================================================================================
+// function : getConstructorId()
+// purpose  :
+//=================================================================================
+int MyGEOMBase_Skeleton::getConstructorId() const
+{
+  if ( myRBGroup )
+    return myRBGroup->checkedId();
+  return -1;
+}
+
+//=================================================================================
+// function : setConstructorId( id )
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::setConstructorId( const int id )
+{
+  if ( myRBGroup && myRBGroup->button( id ) )
+    myRBGroup->button( id )->setChecked( true );
+}
+
+//=================================================================================
+// function : unsetConstructorId
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::unsetConstructorId()
+{
+  // 0020428: EDF 906 GEOM : Performance for Group creation in GEOM
+  // uncheck all buttons
+  // workaround, because setChecked( false ) does not result in Qt4
+  bool isExclusive = myRBGroup->exclusive();
+  myRBGroup->setExclusive( false );
+  QList<QAbstractButton*> btnList = myRBGroup->buttons();
+  for ( int j = 0; j < 2; j++ )
+  {
+    QList<QAbstractButton*>::const_iterator it = btnList.constBegin();
+    for ( ; it != btnList.constEnd(); ++it )
+      (*it)->setCheckable( j == 1 );
+  }
+  myRBGroup->setExclusive( isExclusive );
+}
+
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::ClickOnHelp()
+{
+  LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
+  if ( app )
+    app->onHelpContextModule( myGeomGUI ? app->moduleName( myGeomGUI->moduleName() ) : QString(""), myHelpFileName );
+  else {
+    QString platform;
+#ifdef WIN32
+    platform = "winapplication";
+#else
+    platform = "application";
+#endif
+    SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ),
+                              QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
+                              arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ),
+                              QObject::tr( "BUT_OK" ) );
+  }
+}
+
+//=================================================================================
+//  function : setHelpFileName()
+//  purpose  : set name for help file html
+//=================================================================================
+void MyGEOMBase_Skeleton::setHelpFileName( const QString& theName )
+{
+  myHelpFileName = theName;
+}
+
+MyDlgRef_Skeleton* MyGEOMBase_Skeleton::mainFrame()
+{
+  return myMainFrame;
+}
+
+QWidget* MyGEOMBase_Skeleton::centralWidget()
+{
+  return myMainFrame->GroupMedium;
+}
+
+QPushButton* MyGEOMBase_Skeleton::buttonCancel() const
+{
+  return myMainFrame->buttonCancel;
+}
+
+/*QPushButton* MyGEOMBase_Skeleton::buttonOk() const
+{
+  return myMainFrame->buttonOk;
+}*/
+
+QPushButton* MyGEOMBase_Skeleton::buttonApply() const
+{
+  return myMainFrame->buttonApply;
+}
+
+QPushButton* MyGEOMBase_Skeleton::buttonHelp() const
+{
+  return myMainFrame->buttonHelp;
+}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void MyGEOMBase_Skeleton::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Qt::Key_F1 ) {
+    e->accept();
+    ClickOnHelp();
+  }
+}
+
+
+//=================================================================================
+// function : showOnlyPreviewControl()
+// purpose  : display only CheckBoxPreview check box,
+//            hide CheckBoxRestoreSS and CheckBoxAddPrefix
+//=================================================================================
+void MyGEOMBase_Skeleton::showOnlyPreviewControl(){
+  mainFrame()->GroupBoxPublish->show();
+  mainFrame()->CheckBoxRestoreSS->hide();
+  mainFrame()->CheckBoxAddPrefix->hide();
+}
+
+//=================================================================================
+// function : processPreview()
+// purpose  : Display preview if CheckBoxPreview is checked
+//=================================================================================
+void MyGEOMBase_Skeleton::processPreview() {
+  displayPreview(mainFrame()->CheckBoxPreview->isChecked());
+}
diff --git a/src/HEXABLOCKGUI/MyGEOMBase_Skeleton.hxx b/src/HEXABLOCKGUI/MyGEOMBase_Skeleton.hxx
new file mode 100755 (executable)
index 0000000..76defa6
--- /dev/null
@@ -0,0 +1,113 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MYGEOMBASE_SKELETON_H
+#define MYGEOMBASE_SKELETON_H
+
+#include "GEOM_GEOMBase.hxx"
+#include "MyGEOMBase_Helper.hxx"
+
+#include <QDialog>
+
+class SalomeApp_DoubleSpinBox;
+class GeometryGUI;
+class MyDlgRef_Skeleton;
+class QSpinBox;
+class QDoubleSpinBox;
+class QLineEdit;
+class QButtonGroup;
+class QPushButton;
+
+#ifndef COORD_MIN
+#  define COORD_MIN -1e+15
+#  define COORD_MAX +1e+15
+#  define MAX_NUMBER 100000
+#  define DBL_DIGITS_DISPLAY 16
+#endif // COORD_MIN
+
+class GEOMBASE_EXPORT MyGEOMBase_Skeleton : public QDialog, public MyGEOMBase_Helper
+{
+  Q_OBJECT
+
+public:
+    MyGEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
+    ~MyGEOMBase_Skeleton();
+
+private:
+    void Init();
+
+protected:
+    void                initSpinBox( QSpinBox*, int, int, int = 1 );
+    void                initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
+
+    void                updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
+
+    void                closeEvent( QCloseEvent* );
+    void                keyPressEvent( QKeyEvent* );
+
+    /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
+     */
+    void                initName( const QString& = QString() );
+
+    /*! returns contents of "Name" field
+     */
+    virtual QString getNewObjectName() const;
+
+    /*! returns id of a selected "constructor" radio button or '-1' in case of error
+     */
+    int                 getConstructorId() const;
+    /*! set selected "constructor" radio button id
+     */
+    void                setConstructorId( const int );
+    /*! unset selection on all "constructor" radio buttons
+     */
+    void                unsetConstructorId();
+
+    void                showOnlyPreviewControl();
+
+    void                setHelpFileName( const QString& );
+
+    MyDlgRef_Skeleton*    mainFrame();
+    QWidget*            centralWidget();
+    QPushButton*        buttonCancel() const;
+    //QPushButton*        buttonOk() const;
+    QPushButton*        buttonApply() const;
+    QPushButton*        buttonHelp() const;
+
+protected:
+    QLineEdit*          myEditCurrentArgument; //!< Current LineEdit
+    GeometryGUI*        myGeomGUI;             //!< reference GEOM GUI
+    QString             myHelpFileName;        //!< Associated HTML help file name
+
+    QButtonGroup*       myRBGroup;             //!< radio button group
+    MyDlgRef_Skeleton*    myMainFrame;           //!< dialog box's mainframe widgetx
+
+protected slots:
+    virtual void        ClickOnCancel();
+    virtual void        processPreview();
+    void                LineEditReturnPressed();
+    void                DeactivateActiveDialog();
+    void                ActivateThisDialog();
+    void                ClickOnHelp();
+
+signals:
+    void                constructorsClicked( int );
+};
+
+#endif // MYGEOMBASE_SKELETON_H
diff --git a/src/HEXABLOCKGUI/Pipe_QTD.ui b/src/HEXABLOCKGUI/Pipe_QTD.ui
new file mode 100644 (file)
index 0000000..cd5fa44
--- /dev/null
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PipeDialog</class>
+ <widget class="QDialog" name="PipeDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>297</width>
+    <height>241</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Pipe Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Point</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QLineEdit" name="vex_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Vector</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QLineEdit" name="vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>internal radius</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QDoubleSpinBox" name="ir_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_1">
+        <property name="text">
+         <string>external radius</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="QDoubleSpinBox" name="er_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>2.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>height</string>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="1">
+       <widget class="QDoubleSpinBox" name="h_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/PrismQuad_QTD.ui b/src/HEXABLOCKGUI/PrismQuad_QTD.ui
new file mode 100644 (file)
index 0000000..daa9ece
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PrismQuadDialog</class>
+ <widget class="QDialog" name="PrismQuadDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>318</width>
+    <height>381</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Prism Quad(s) Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QGroupBox" name="groupBox">
+        <property name="title">
+         <string>Quad(s)</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0" rowspan="2">
+          <widget class="QListWidget" name="quads_lw"/>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_3">
+        <property name="title">
+         <string>Direction</string>
+        </property>
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="vec_le">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>nb</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="nb_spb">
+           <property name="maximum">
+            <number>1000000</number>
+           </property>
+           <property name="value">
+            <number>1</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Propagation_QTD.ui b/src/HEXABLOCKGUI/Propagation_QTD.ui
new file mode 100644 (file)
index 0000000..d56c98e
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PropagationDialog</class>
+ <widget class="QDialog" name="PropagationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>196</width>
+    <height>297</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Propagation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QGroupBox" name="groupBox_2">
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>131</height>
+         </size>
+        </property>
+        <property name="title">
+         <string>Propagation(s)</string>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_3">
+         <item>
+          <widget class="QListWidget" name="propagations_lw"/>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_3">
+        <property name="title">
+         <string>Law</string>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_4">
+         <item>
+          <widget class="QLineEdit" name="law_le">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="way_cb">
+        <property name="text">
+         <string>way</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::NoButton</set>
+     </property>
+     <property name="centerButtons">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PropagationDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>403</x>
+     <y>725</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PropagationDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>403</x>
+     <y>725</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/QuadAssoc_QTD.ui b/src/HEXABLOCKGUI/QuadAssoc_QTD.ui
new file mode 100644 (file)
index 0000000..e302fa9
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QuadAssocDialog</class>
+ <widget class="QDialog" name="QuadAssocDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>260</width>
+    <height>280</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>260</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Quad Association</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QGroupBox" name="groupBox_4">
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>58</height>
+         </size>
+        </property>
+        <property name="title">
+         <string>Quad</string>
+        </property>
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLineEdit" name="quad_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox">
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>156</height>
+         </size>
+        </property>
+        <property name="title">
+         <string>Face(s)</string>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <widget class="QListWidget" name="faces_lw">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/QuadRevolution_QTD.ui b/src/HEXABLOCKGUI/QuadRevolution_QTD.ui
new file mode 100644 (file)
index 0000000..406af8f
--- /dev/null
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QuadRevolutionDialog</class>
+ <widget class="QDialog" name="QuadRevolutionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>279</width>
+    <height>451</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Quad(s) Revolution</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Result Name</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_15">
+        <property name="text">
+         <string> Name :          </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0" colspan="2">
+       <widget class="QLabel" name="quadsLabel">
+        <property name="text">
+         <string>Quads : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" rowspan="2">
+       <widget class="QListWidget" name="quads_lw"/>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Center : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="center_pt_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="toolTip">
+         <string>Select a vertex
+</string>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Axis     :</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QLineEdit" name="axis_vec_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="toolTip">
+         <string>Select a vector
+</string>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QPushButton" name="add_angle_pb">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>+</string>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0">
+       <widget class="QPushButton" name="del_angle_pb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>-</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Angles : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="0">
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>45</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="4" column="2" rowspan="5">
+       <widget class="QListWidget" name="angles_lw"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Quad_QTD.ui b/src/HEXABLOCKGUI/Quad_QTD.ui
new file mode 100755 (executable)
index 0000000..dd0c95f
--- /dev/null
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QuadDialog</class>
+ <widget class="QDialog" name="QuadDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>255</width>
+    <height>437</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Quad Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Quad</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>vertices</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>edges</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2">
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Vertex 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="v0_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Vertex 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="v1_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Vertex 3</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="v2_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Vertex 4</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="v3_le_rb0">
+           <property name="minimumSize">
+            <size>
+             <width>127</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>edge 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="e0_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>edge 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="e1_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>edge 3</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="e2_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>edge 4</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="e3_le_rb1">
+           <property name="minimumSize">
+            <size>
+             <width>127</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>86</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>85</x>
+     <y>106</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>174</x>
+     <y>50</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>192</x>
+     <y>263</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>297</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>310</x>
+     <y>264</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>353</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>351</x>
+     <y>110</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/RemoveHexa_QTD.ui b/src/HEXABLOCKGUI/RemoveHexa_QTD.ui
new file mode 100644 (file)
index 0000000..703a519
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>RemoveHexaDialog</class>
+ <widget class="QDialog" name="RemoveHexaDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>225</width>
+    <height>103</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Remove Hexa</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Hexa</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="hexa_le">
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="readOnly">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2">
+       <widget class="QCheckBox" name="connected_cb">
+        <property name="text">
+         <string>including connected hexa</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/ReplaceHexa_QTD.ui b/src/HEXABLOCKGUI/ReplaceHexa_QTD.ui
new file mode 100644 (file)
index 0000000..12ac32d
--- /dev/null
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ReplaceHexaDialog</class>
+ <widget class="QDialog" name="ReplaceHexaDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>229</width>
+    <height>459</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Replace Hexahedron</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Result Name</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_15">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QGroupBox" name="groupBox_5">
+        <property name="title">
+         <string>Quad(s) source</string>
+        </property>
+        <layout class="QFormLayout" name="formLayout_4">
+         <item row="0" column="0" colspan="2">
+          <widget class="QListWidget" name="quads_lw">
+           <property name="toolTip">
+            <string>Select hexa</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Point a</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="p1_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>Point b</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="p2_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>Point c</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="p3_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_2">
+        <property name="title">
+         <string>Quad destination</string>
+        </property>
+        <layout class="QFormLayout" name="formLayout_3">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::ExpandingFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Point a</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="c1_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Point b</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="c2_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Point c</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="c3_le">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>Select vertex</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/Resource.cxx b/src/HEXABLOCKGUI/Resource.cxx
new file mode 100755 (executable)
index 0000000..137107e
--- /dev/null
@@ -0,0 +1,147 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "Resource.hxx"
+
+using namespace HEXABLOCK::GUI;
+
+// Statics for general resources
+// -----------------------------
+
+bool Resource::COMPONENT_INSTANCE_NEW = COMPONENTINSTANCENEW;
+QString Resource::userCatalog = USERCATALOG;
+bool Resource::addRowCols = ADDROWCOLS;
+bool Resource::straightLinks = STRAIGHTLINKS;
+bool Resource::autoComputeLinks = AUTOCOMPUTELINKS;
+bool Resource::simplifyLink = SIMPLIFYLINK;
+bool Resource::ensureVisibleWhenMoved = ENSUREVISIBLEWHENMOVED;
+
+// Statics for color of states
+// ---------------------------
+
+QColor Resource::editedNodeBrushColor = EDITEDNODEBRUSHCOLOR;
+QColor Resource::normalNodeBrushColor = NORMALNODEBRUSHCOLOR;
+QColor Resource::runNodeBrushColor    = RUNNODEBRUSHCOLOR;
+QColor Resource::validNodeColor       = VALIDNODECOLOR;
+QColor Resource::invalidNodeColor     = INVALIDNODECOLOR;
+
+QColor Resource::emphasizeBrushColor  = EMPHASIZEBRUSHCOLOR;
+
+QColor Resource::NOTYETINITIALIZED    = NOTYETINITIALIZED_;
+QColor Resource::INITIALISED          = INITIALISED_;
+QColor Resource::RUNNING              = RUNNING_;
+QColor Resource::WAITINGTASKS         = WAITINGTASKS_;
+QColor Resource::PAUSED               = PAUSED_;
+QColor Resource::FINISHED             = FINISHED_;
+QColor Resource::STOPPED              = STOPPED_;
+QColor Resource::UNKNOWN              = UNKNOWN_;
+
+QColor Resource::UNDEFINED            = UNDEFINED_;
+QColor Resource::INVALID              = INVALID_;
+QColor Resource::READY                = READY_;
+QColor Resource::TOLOAD               = TOLOAD_;
+QColor Resource::LOADED               = LOADED_;
+QColor Resource::TOACTIVATE           = TOACTIVATE_;
+QColor Resource::ACTIVATED            = ACTIVATED_;
+QColor Resource::DESACTIVATED         = DESACTIVATED_;
+QColor Resource::DONE                 = DONE_;
+QColor Resource::SUSPENDED            = SUSPENDED_;
+QColor Resource::LOADFAILED           = LOADFAILED_;
+QColor Resource::EXECFAILED           = EXECFAILED_;
+QColor Resource::PAUSE                = PAUSE_;
+QColor Resource::INTERNALERR          = INTERNALERR_;
+QColor Resource::DISABLED             = DISABLED_;
+QColor Resource::FAILED               = FAILED_;
+QColor Resource::ERROR                = ERROR_;
+QColor Resource::DEFAULT              = DEFAULT_;
+
+// Statics for color of links
+// --------------------------
+
+QFont  Resource::pythonfont = PYTHONFONT;
+
+QColor Resource::link_draw_color           = LINKDRAW_COLOR;
+QColor Resource::stream_link_draw_color    = STREAMLINKDRAW_COLOR;
+QColor Resource::stream_link_select_color  = STREAMLINK_SELECT_COLOR;
+QColor Resource::link_select_color         = LINK_SELECT_COLOR;
+QColor Resource::control_link_select_color = CTRLLINK_SELECT_COLOR;
+QColor Resource::control_link_draw_color   = CTRLLINKDRAW_COLOR;
+
+int Resource::link_pen_darkness            = LINK_PEN_DARKNESS;
+
+// Statics for color of nodes
+// --------------------------
+
+QColor Resource::Scene_pen              = Scene_pen_;
+QColor Resource::Scene_hiPen            = Scene_hiPen_;
+QColor Resource::Scene_brush            = Scene_brush_;
+QColor Resource::Scene_hiBrush          = Scene_hiBrush_;
+QColor Resource::ComposedNode_brush     = ComposedNode_brush_;
+QColor Resource::ComposedNode_hiBrush   = ComposedNode_hiBrush_;
+QColor Resource::ComposedNode_pen       = ComposedNode_pen_;
+QColor Resource::ComposedNode_hiPen     = ComposedNode_hiPen_;
+QColor Resource::ElementaryNode_brush   = ElementaryNode_brush_;
+QColor Resource::ElementaryNode_hiBrush = ElementaryNode_hiBrush_;
+QColor Resource::ElementaryNode_pen     = ElementaryNode_pen_;
+QColor Resource::ElementaryNode_hiPen   = ElementaryNode_hiPen_;
+QColor Resource::Header_brush           = Header_brush_;
+QColor Resource::Header_hiBrush         = Header_hiBrush_;
+QColor Resource::Header_pen             = Header_pen_;
+QColor Resource::Header_hiPen           = Header_hiPen_;
+QColor Resource::CtrlPort_brush         = CtrlPort_brush_;
+QColor Resource::CtrlPort_hiBrush       = CtrlPort_hiBrush_;
+QColor Resource::CtrlPort_pen           = CtrlPort_pen_;
+QColor Resource::CtrlPort_hiPen         = CtrlPort_hiPen_;
+QColor Resource::DataPort_brush         = DataPort_brush_;
+QColor Resource::DataPort_hiBrush       = DataPort_hiBrush_;
+QColor Resource::DataPort_pen           = DataPort_pen_;
+QColor Resource::DataPort_hiPen         = DataPort_hiPen_;
+
+QColor Resource::dragOver               = dragOver_;
+
+// Statics for geometry values for nodes
+// -------------------------------------
+
+int Resource::CtrlPort_Width  = 24;
+int Resource::CtrlPort_Height = 20;
+int Resource::DataPort_Width  = 72;
+int Resource::DataPort_Height = 25;
+
+int Resource::Thickness       =  1;
+
+int Resource::Border_Margin   =  4;
+int Resource::Space_Margin    =  2;
+
+int Resource::Line_Space      =  2;
+int Resource::Line_Width      =  2;
+
+int Resource::Text_DX         =  3;
+
+int Resource::Corner_Margin   = ( Resource::Border_Margin + Resource::Space_Margin );
+int Resource::Header_Height   = ( Resource::Corner_Margin + Resource::CtrlPort_Height + Resource::Line_Space + Resource::Line_Width + Resource::Line_Space );
+int Resource::Radius          =  3;
+
+bool Resource::tabPanelsUp = TABPANELSUP;
+
+// Constructor
+// -----------
+
+Resource::Resource()
+{
+}
diff --git a/src/HEXABLOCKGUI/Resource.hxx b/src/HEXABLOCKGUI/Resource.hxx
new file mode 100755 (executable)
index 0000000..284348e
--- /dev/null
@@ -0,0 +1,303 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _RESOURCE_HXX_
+#define _RESOURCE_HXX_
+
+#include "HEXABLOCKGUI_Export.hxx"
+
+#include <QColor>
+#include <QFont>
+
+// Define the general names of the resources
+// -----------------------------------------
+
+#define _COMPONENT_INSTANCE_NEW "COMPONENT_INSTANCE_NEW"
+
+// Define the names of the resources for colors
+// --------------------------------------------
+
+#define _editedNodeBrushColor "editedNodeBrushColor"
+#define _normalNodeBrushColor "normalNodeBrushColor"
+#define _runNodeBrushColor    "runNodeBrushColor"
+#define _validNodeColor       "validNodeColor"
+#define _invalidNodeColor     "invalidNodeColor"
+
+#define _NOTYETINITIALIZED    "NOTYETINITIALIZED"
+#define _INITIALISED          "INITIALISED"
+#define _RUNNING              "RUNNING"
+#define _WAITINGTASKS         "WAITINGTASKS"
+#define _PAUSED               "PAUSED"
+#define _FINISHED             "FINISHED"
+#define _STOPPED              "STOPPED"
+#define _UNKNOWN              "UNKNOWN"
+
+#define _UNDEFINED            "UNDEFINED"
+#define _INVALID              "INVALID"
+#define _READY                "READY"
+#define _TOLOAD               "TOLOAD"
+#define _LOADED               "LOADED"
+#define _TOACTIVATE           "TOACTIVATE"
+#define _ACTIVATED            "ACTIVATED"
+#define _DESACTIVATED         "DESACTIVATED"
+#define _DONE                 "DONE"
+#define _SUSPENDED            "SUSPENDED"
+#define _LOADFAILED           "LOADFAILED"
+#define _EXECFAILED           "EXECFAILED"
+#define _PAUSE                "PAUSE"
+#define _INTERNALERR          "INTERNALERR"
+#define _DISABLED             "DISABLED"
+#define _FAILED               "FAILED"
+#define _ERROR                "ERROR"
+#define _DEFAULT              "DEFAULT"
+
+#define _Scene_pen              "Scene_pen"
+#define _Scene_hiPen            "Scene_hiPen"
+#define _Scene_brush            "Scene_brush"
+#define _Scene_hiBrush          "Scene_hiBrush"
+#define _ComposedNode_brush     "ComposedNode_brush"
+#define _ComposedNode_hiBrush   "ComposedNode_hiBrush"
+#define _ComposedNode_pen       "ComposedNode_pen"
+#define _ComposedNode_hiPen     "ComposedNode_hiPen"
+#define _ElementaryNode_brush   "ElementaryNode_brush"
+#define _ElementaryNode_hiBrush "ElementaryNode_hiBrush"
+#define _ElementaryNode_pen     "ElementaryNode_pen"
+#define _ElementaryNode_hiPen   "ElementaryNode_hiPen"
+#define _Header_brush           "Header_brush"
+#define _Header_hiBrush         "Header_hiBrush"
+#define _Header_pen             "Header_pen"
+#define _Header_hiPen           "Header_hiPen"
+#define _CtrlPort_brush         "CtrlPort_brush"
+#define _CtrlPort_hiBrush       "CtrlPort_hiBrush"
+#define _CtrlPort_pen           "CtrlPort_pen"
+#define _CtrlPort_hiPen         "CtrlPort_hiPen"
+#define _DataPort_brush         "DataPort_brush"
+#define _DataPort_hiBrush       "DataPort_hiBrush"
+#define _DataPort_pen           "DataPort_pen"
+#define _DataPort_hiPen         "DataPort_hiPen"
+
+#define __dragOver       "dragOver"
+
+// Default values
+// --------------
+
+#define COMPONENTINSTANCENEW    true
+#define PYTHONFONT              QFont("Courier")
+#define USERCATALOG             "HEXABLOCKUserCatalog.xml"
+#define ADDROWCOLS              true
+#define STRAIGHTLINKS           false
+#define AUTOCOMPUTELINKS        true
+#define SIMPLIFYLINK            true
+#define ENSUREVISIBLEWHENMOVED  true
+#define TABPANELSUP             true
+
+#define EDITEDNODEBRUSHCOLOR    QColor(255, 255, 190)
+#define NORMALNODEBRUSHCOLOR    QColor(230, 235, 255)
+#define RUNNODEBRUSHCOLOR       QColor(205, 218, 255)
+#define VALIDNODECOLOR          QColor(128, 255, 128)
+#define INVALIDNODECOLOR        QColor(255, 128, 128)
+
+#define EMPHASIZEBRUSHCOLOR     QColor(  0, 255,   0)
+
+#define NOTYETINITIALIZED_      QColor(255, 243, 205)
+#define INITIALISED_            QColor(230, 255, 205)
+#define RUNNING_                QColor(205, 255, 218)
+#define WAITINGTASKS_           QColor(205, 255, 255)
+#define PAUSED_                 QColor(205, 218, 255)
+#define FINISHED_               QColor(230, 205, 255)
+#define STOPPED_                QColor(255, 205, 243)
+#define UNKNOWN_                QColor(255, 205, 205)
+
+#define UNDEFINED_      Qt::lightGray
+#define INVALID_        Qt::red
+#define READY_          Qt::gray
+#define TOLOAD_         Qt::darkYellow
+#define LOADED_         Qt::darkMagenta
+#define TOACTIVATE_     Qt::darkCyan
+#define ACTIVATED_      Qt::darkBlue
+#define DESACTIVATED_   Qt::gray
+#define DONE_           Qt::darkGreen
+#define SUSPENDED_      Qt::gray
+#define LOADFAILED_     QColor(255, 0, 170)
+#define EXECFAILED_     QColor(255, 85, 0)
+#define PAUSE_          QColor(0, 255, 255)
+#define INTERNALERR_    QColor(255, 0, 85)
+#define DISABLED_       QColor(255, 170, 0)
+#define FAILED_         QColor(170,  85, 0)
+#define ERROR_          QColor(255, 0, 0)
+#define DEFAULT_        Qt::lightGray
+
+#define LINKDRAW_COLOR            QColor(  0,   0, 192)
+#define LINK_SELECT_COLOR         QColor(192, 192, 255)
+#define STREAMLINKDRAW_COLOR      QColor(192, 192,   0)
+#define STREAMLINK_SELECT_COLOR   QColor(255, 255, 192)
+#define CTRLLINKDRAW_COLOR        QColor(192,   0, 192)
+#define CTRLLINK_SELECT_COLOR     QColor(255, 192, 255)
+#define LINK_PEN_DARKNESS         150
+
+#define Scene_pen_              QColor(  0,   0, 128)
+#define Scene_hiPen_            QColor(  0,   0, 190)
+#define Scene_brush_            QColor(128, 128, 128)
+#define Scene_hiBrush_          QColor(190, 190, 190)
+#define ComposedNode_brush_     QColor(213, 213, 213)
+#define ComposedNode_hiBrush_   QColor(225, 225, 225)
+#define ComposedNode_pen_       QColor(120, 120, 120)
+#define ComposedNode_hiPen_     QColor( 60,  60,  60)
+#define ElementaryNode_brush_   QColor(189, 230, 185)
+#define ElementaryNode_hiBrush_ QColor(209, 255, 205)
+#define ElementaryNode_pen_     QColor( 15, 180,   0)
+#define ElementaryNode_hiPen_   QColor( 11, 128,   0)
+#define Header_brush_           QColor(215, 220, 238)
+#define Header_hiBrush_         QColor(161, 178, 238)
+#define Header_pen_             QColor(120, 120, 120)
+#define Header_hiPen_           QColor( 60,  60,  60)
+#define CtrlPort_brush_         QColor(205, 210, 227)
+#define CtrlPort_hiBrush_       QColor(161, 176, 227)
+#define CtrlPort_pen_           QColor(120, 120, 120)
+#define CtrlPort_hiPen_         QColor( 60,  60,  60)
+#define DataPort_brush_         QColor(158, 227, 151)
+#define DataPort_hiBrush_       QColor(127, 227, 116)
+#define DataPort_pen_           QColor( 15, 180,   0)
+#define DataPort_hiPen_         QColor( 11, 128,   0)
+
+#define dragOver_               QColor(255,   0,   0)
+
+// Define Resource class
+// ---------------------
+
+namespace HEXABLOCK {
+  namespace GUI {
+    class HEXABLOCKGUI_EXPORT Resource {
+      public:
+        Resource();
+
+      public:
+        // General resource
+        static bool COMPONENT_INSTANCE_NEW;
+        static QString userCatalog;
+        static bool addRowCols;
+        static bool straightLinks;
+        static bool autoComputeLinks;
+        static bool simplifyLink;
+        static bool ensureVisibleWhenMoved;
+
+        // Colors of state of nodes
+        static QColor editedNodeBrushColor;
+        static QColor normalNodeBrushColor;
+        static QColor runNodeBrushColor;
+        static QColor validNodeColor;
+        static QColor invalidNodeColor;
+
+        static QColor emphasizeBrushColor;
+
+        static QColor NOTYETINITIALIZED;
+        static QColor INITIALISED;
+        static QColor RUNNING;
+        static QColor WAITINGTASKS;
+        static QColor PAUSED;
+        static QColor FINISHED;
+        static QColor STOPPED;
+        static QColor UNKNOWN;
+
+        static QColor UNDEFINED;
+        static QColor INVALID;
+        static QColor READY;
+        static QColor TOLOAD;
+        static QColor LOADED;
+        static QColor TOACTIVATE;
+        static QColor ACTIVATED;
+        static QColor DESACTIVATED;
+        static QColor DONE;
+        static QColor SUSPENDED;
+        static QColor LOADFAILED;
+        static QColor EXECFAILED;
+        static QColor PAUSE;
+        static QColor INTERNALERR;
+        static QColor DISABLED;
+        static QColor FAILED;
+        static QColor ERROR;
+        static QColor DEFAULT;
+
+        // Python font
+        static QFont  pythonfont;
+
+        // Link colors
+        static QColor link_draw_color;
+        static QColor stream_link_draw_color;
+        static QColor link_select_color;
+        static QColor stream_link_select_color;
+        static QColor control_link_draw_color;
+        static QColor control_link_select_color;
+
+        static int link_pen_darkness;
+
+        // Node colors
+        static QColor Scene_pen;
+        static QColor Scene_hiPen;
+        static QColor Scene_brush;
+        static QColor Scene_hiBrush;
+        static QColor ComposedNode_brush;
+        static QColor ComposedNode_hiBrush;
+        static QColor ComposedNode_pen;
+        static QColor ComposedNode_hiPen;
+        static QColor ElementaryNode_brush;
+        static QColor ElementaryNode_hiBrush;
+        static QColor ElementaryNode_pen;
+        static QColor ElementaryNode_hiPen;
+        static QColor Header_brush;
+        static QColor Header_hiBrush;
+        static QColor Header_pen;
+        static QColor Header_hiPen;
+        static QColor CtrlPort_brush;
+        static QColor CtrlPort_hiBrush;
+        static QColor CtrlPort_pen;
+        static QColor CtrlPort_hiPen;
+        static QColor DataPort_brush;
+        static QColor DataPort_hiBrush;
+        static QColor DataPort_pen;
+        static QColor DataPort_hiPen;
+
+        static QColor dragOver;
+
+        // Node parameters
+        static int CtrlPort_Width;
+        static int CtrlPort_Height;
+        static int DataPort_Width;
+        static int DataPort_Height;
+
+        static int Thickness;
+
+        static int Border_Margin;
+        static int Space_Margin;
+
+        static int Line_Space;
+        static int Line_Width;
+
+        static int Text_DX;
+
+        static int Corner_Margin;
+        static int Header_Height;
+        static int Radius;
+
+        static bool tabPanelsUp;
+    };
+  }
+}
+
+#endif
diff --git a/src/HEXABLOCKGUI/Symmetry_QTD.ui b/src/HEXABLOCKGUI/Symmetry_QTD.ui
new file mode 100644 (file)
index 0000000..391b69b
--- /dev/null
@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SymmetryDialog</class>
+ <widget class="QDialog" name="SymmetryDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>244</width>
+    <height>466</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>5</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Symmetry Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>50</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>50</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Make</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Point</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Line</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QRadioButton" name="rb2">
+        <property name="text">
+         <string>Plan</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="minimumSize">
+      <size>
+       <width>5</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::ExpandingFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="elts_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vex_le_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="elts_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vex_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="vec_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>vector</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_3" native="true">
+        <layout class="QFormLayout" name="formLayout_3">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="elts_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vex_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="vec_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>76</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>181</x>
+     <y>180</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>41</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>73</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>153</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>143</x>
+     <y>109</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>197</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>218</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>182</x>
+     <y>38</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>190</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>238</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>271</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>268</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>255</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>250</x>
+     <y>111</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Transformation_QTD.ui b/src/HEXABLOCKGUI/Transformation_QTD.ui
new file mode 100644 (file)
index 0000000..2a175b9
--- /dev/null
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TransformationDialog</class>
+ <widget class="QDialog" name="TransformationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>312</width>
+    <height>483</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Transform Operation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Make</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Translation</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Scale</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Rotation</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::ExpandingFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="elts_le_rb0">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="vec_le_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="elts_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="vex_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>k</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QDoubleSpinBox" name="k_spb">
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>1.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_3" native="true">
+        <layout class="QFormLayout" name="formLayout_3">
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="elts_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>vertex</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="vex_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>vector</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="vec_le_rb2">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>angle</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QDoubleSpinBox" name="angle_spb">
+           <property name="wrapping">
+            <bool>false</bool>
+           </property>
+           <property name="prefix">
+            <string/>
+           </property>
+           <property name="suffix">
+            <string/>
+           </property>
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="maximum">
+            <double>360.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>360.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>elements</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>76</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>181</x>
+     <y>180</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>41</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>73</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>153</x>
+     <y>51</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>143</x>
+     <y>109</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>197</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>218</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>182</x>
+     <y>38</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>190</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_3</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>238</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>271</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>268</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb2</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>255</x>
+     <y>48</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>250</x>
+     <y>111</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Vector_QTD.ui b/src/HEXABLOCKGUI/Vector_QTD.ui
new file mode 100644 (file)
index 0000000..1b9eef8
--- /dev/null
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VectorDialog</class>
+ <widget class="QDialog" name="VectorDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>284</width>
+    <height>359</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Vector Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Vector</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <item>
+       <widget class="QRadioButton" name="rb0">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( dx, dy, dz )</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="rb1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>( vertex + vertex )</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2">
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QFormLayout" name="formLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>dx : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QDoubleSpinBox" name="dx_spb_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="minimum">
+            <double>-1000000000.000000000000000</double>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>0.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>dy : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QDoubleSpinBox" name="dy_spb_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="minimum">
+            <double>-1000000000.000000000000000</double>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>dz : </string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QDoubleSpinBox" name="dz_spb_rb0">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="decimals">
+            <number>6</number>
+           </property>
+           <property name="minimum">
+            <double>-1000000000.000000000000000</double>
+           </property>
+           <property name="maximum">
+            <double>1000000000.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QWidget" name="widget_2" native="true">
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Point 1</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="v0_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>Point 2</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="v1_le_rb1">
+           <property name="maximumSize">
+            <size>
+             <width>127</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="readOnly">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>75</x>
+     <y>46</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>75</x>
+     <y>107</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb0</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>236</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>251</x>
+     <y>43</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>253</x>
+     <y>242</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb1</sender>
+   <signal>clicked()</signal>
+   <receiver>widget</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>222</x>
+     <y>47</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>210</x>
+     <y>111</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/HEXABLOCKGUI/Vertex_QTD.ui b/src/HEXABLOCKGUI/Vertex_QTD.ui
new file mode 100755 (executable)
index 0000000..9ec0f48
--- /dev/null
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VertexDialog</class>
+ <widget class="QDialog" name="VertexDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>260</width>
+    <height>160</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>260</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>16777215</width>
+    <height>16777215</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Vertex Construction</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetDefaultConstraint</enum>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Arguments</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::ExpandingFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string> Name </string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="name_le">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>127</width>
+          <height>16777215</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>x : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="x_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>y : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="y_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>z : </string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QDoubleSpinBox" name="z_spb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx b/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx
new file mode 100644 (file)
index 0000000..d41011c
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+    Copyright (C) 2010 Klarälvdalens Datakonsult AB,
+        a KDAB Group company, info@kdab.net,
+        author Stephen Kelly <stephen@kdab.com>
+
+    This library is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Library General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    This library 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 Library General Public
+    License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to the
+    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+*/
+
+#include <QtCore/QObject>
+#include "klinkitemselectionmodel.hxx"
+// #include "klinkitemselectionmodel_p.hxx"
+
+#include "kmodelindexproxymapper.hxx"
+
+// #include "kdebug.h"
+
+#include <QItemSelection>
+
+#include <iostream>
+
+
+KLinkItemSelectionModel::KLinkItemSelectionModel(QAbstractItemModel *model, QItemSelectionModel *proxySelector, QObject *parent)
+        : QItemSelectionModel(model, parent),
+        d_ptr(new KLinkItemSelectionModelPrivate(this, model, proxySelector))
+{
+    connect(proxySelector, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(sourceSelectionChanged(QItemSelection, QItemSelection)));
+}
+
+KLinkItemSelectionModel::~KLinkItemSelectionModel()
+{
+    delete d_ptr;
+}
+
+void KLinkItemSelectionModel::select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
+{
+    //std::cout<<"KLinkItemSelectionModel::select(const QModelIndex &index"<<std::endl;
+    Q_D(KLinkItemSelectionModel);
+    // When an item is removed, the current index is set to the top index in the model.
+    // That causes a selectionChanged signal with a selection which we do not want.
+    if (d->m_ignoreCurrentChanged) {
+        return;
+    }
+    QItemSelectionModel::select(index, command);
+    if (index.isValid())
+        d->m_linkedItemSelectionModel->select(d->m_indexMapper->mapSelectionLeftToRight(QItemSelection(index, index)), command);
+    else {
+        d->m_linkedItemSelectionModel->clearSelection();
+    }
+}
+
+// // QAbstractProxyModel::mapSelectionFromSource creates invalid ranges to we filter
+// // those out manually in a loop. Hopefully fixed in Qt 4.7.2, so we ifdef it out.
+// // http://qt.gitorious.org/qt/qt/merge_requests/2474
+// // http://qt.gitorious.org/qt/qt/merge_requests/831
+// #if QT_VERSION < 0x040702
+// #define RANGE_FIX_HACK
+// #endif
+// 
+// #ifdef RANGE_FIX_HACK
+// static QItemSelection klink_removeInvalidRanges(const QItemSelection &selection)
+// {
+//   QItemSelection result;
+//   Q_FOREACH(const QItemSelectionRange &range, selection)
+//   {
+//     if (!range.isValid())
+//       continue;
+//     result << range;
+//   }
+//   return result;
+// }
+// #endif
+
+void KLinkItemSelectionModel::select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
+{
+  std::cout<<"KLinkItemSelectionModel::select(const QItemSelection &selection"<<std::endl;
+
+  Q_FOREACH(const QItemSelectionRange &range, selection){
+//     if (range.isEmpty()){
+//       std::cout<<"range    EMPTY"<<std::endl;
+//     } else {
+//       std::cout<<"range    NOT EMPTY"<<std::endl;
+//     }
+    if (range.isValid()){
+      std::cout<<"range    VALID"<<std::endl;
+      std::cout<<"count           =>"<<range.indexes().count()<<std::endl;
+      Q_FOREACH(const QModelIndex &i, range.indexes())
+        std::cout<< " KLinkItemSelectionModel::select =====> " << i.data().toString().toStdString() << std::endl;
+    } else {
+      std::cout<<"range    NOT VALID"<<std::endl;
+    }
+  }
+
+
+    Q_D(KLinkItemSelectionModel);
+    d->m_ignoreCurrentChanged = true;
+#ifdef RANGE_FIX_HACK
+    QItemSelection _selection = klink_removeInvalidRanges(selection);
+#else
+    QItemSelection _selection = selection;
+#endif
+    QItemSelectionModel::select(_selection, command);
+    Q_ASSERT(d->assertSelectionValid(_selection));
+    QItemSelection mappedSelection = d->m_indexMapper->mapSelectionLeftToRight(_selection);
+    Q_ASSERT(d->assertSelectionValid(mappedSelection));
+    d->m_linkedItemSelectionModel->select(mappedSelection, command);
+    d->m_ignoreCurrentChanged = false;
+}
+
+
+
+// #include "klinkitemselectionmodel_moc.cxx"
+// #include "klinkitemselectionmodel.moc"
+
diff --git a/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx b/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx
new file mode 100644 (file)
index 0000000..b49219b
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+    Copyright (C) 2010 Klarälvdalens Datakonsult AB,
+        a KDAB Group company, info@kdab.net,
+        author Stephen Kelly <stephen@kdab.com>
+
+    This library is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Library General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    This library 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 Library General Public
+    License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to the
+    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+*/
+
+#ifndef KLINKITEMSELECTIONMODEL_H
+#define KLINKITEMSELECTIONMODEL_H
+
+#include <QtCore/QObject>
+#include <QtGui/QItemSelectionModel>
+#include <QtGui/QAbstractProxyModel>
+
+#include <iostream>
+
+// #include "kdeui_export.h"
+// #include "klinkitemselectionmodel_p.hxx"
+
+#include "kmodelindexproxymapper.hxx"
+
+class KLinkItemSelectionModelPrivate;
+
+class KLinkItemSelectionModel : public QItemSelectionModel
+{
+    Q_OBJECT
+public:
+    KLinkItemSelectionModel(QAbstractItemModel *targetModel, QItemSelectionModel *linkedItemSelectionModel, QObject *parent = 0);
+    ~KLinkItemSelectionModel();
+    /* reimp */ void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command);
+    /* reimp */ void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command);
+
+protected:
+    KLinkItemSelectionModelPrivate * const d_ptr;
+
+private:
+    Q_DECLARE_PRIVATE(KLinkItemSelectionModel)
+    Q_PRIVATE_SLOT( d_func(), void sourceSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected))
+
+};
+
+
+// QAbstractProxyModel::mapSelectionFromSource creates invalid ranges to we filter
+// those out manually in a loop. Hopefully fixed in Qt 4.7.2, so we ifdef it out.
+// http://qt.gitorious.org/qt/qt/merge_requests/2474
+// http://qt.gitorious.org/qt/qt/merge_requests/831
+#if QT_VERSION < 0x040702
+#define RANGE_FIX_HACK
+#endif
+
+#ifdef RANGE_FIX_HACK
+static QItemSelection klink_removeInvalidRanges(const QItemSelection &selection)
+{
+//   std::cout<< " klink_removeInvalidRanges " << std::endl;
+  QItemSelection result;
+  Q_FOREACH(const QItemSelectionRange &range, selection)
+  {
+
+    Q_FOREACH(const QModelIndex &i, range.indexes ())
+    {
+//       std::cout<< " =====> " << i.data().toString().toStdString() << std::endl;
+    }
+    if (!range.isValid())
+      continue;
+//     std::cout<< " is VALID !!"<< std::endl;
+    result << range;
+  }
+  return result;
+}
+#endif
+
+
+class KLinkItemSelectionModelPrivate
+{
+public:
+    KLinkItemSelectionModelPrivate(KLinkItemSelectionModel *proxySelectionModel, QAbstractItemModel *model,
+                                    QItemSelectionModel *linkedItemSelectionModel)
+      : q_ptr(proxySelectionModel),
+        m_model(model),
+        m_linkedItemSelectionModel(linkedItemSelectionModel),
+        m_ignoreCurrentChanged(false),
+        m_indexMapper(new KModelIndexProxyMapper(model, linkedItemSelectionModel->model(), proxySelectionModel))
+    {
+    }
+
+    Q_DECLARE_PUBLIC(KLinkItemSelectionModel)
+    KLinkItemSelectionModel * const q_ptr;
+
+
+    bool assertSelectionValid(const QItemSelection &selection) const {
+      foreach(const QItemSelectionRange &range, selection) {
+//         if (!range.isValid()) {
+//           kDebug() << selection;
+//         }
+        
+        Q_ASSERT(range.isValid());
+      }
+      return true;
+    }
+
+void sourceSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
+{
+
+    
+    Q_Q(KLinkItemSelectionModel);
+#ifdef RANGE_FIX_HACK
+//     std::cout<<"XXXXXXXXXXXXX  sourceSelectionChanged!!!!!!!! RANGE_FIX_HACK"<<std::endl;
+    QItemSelection _selected = klink_removeInvalidRanges(selected);
+    QItemSelection _deselected = klink_removeInvalidRanges(deselected);
+#else
+//     std::cout<<"XXXXXXXXXXXXX  sourceSelectionChanged!!!!!!!! "<<std::endl;
+    QItemSelection _selected = selected;
+    QItemSelection _deselected = deselected;
+#endif
+    Q_ASSERT(assertSelectionValid(_selected));
+    Q_ASSERT(assertSelectionValid(_deselected));
+
+//     std::cout << "XXXXXXXXXXXXX  _selected.count() "   << _selected.count() << std::endl;
+//     std::cout << "XXXXXXXXXXXXX  _deselected.count() " << _deselected.count() << std::endl;
+
+    const QItemSelection mappedDeselection = m_indexMapper->mapSelectionRightToLeft(_deselected);
+    const QItemSelection mappedSelection   = m_indexMapper->mapSelectionRightToLeft(_selected);
+
+//     const QItemSelection mappedDeselection = _deselected;
+//     const QItemSelection mappedSelection   = _selected;
+
+//     std::cout << "XXXXXXXXXXXXX  mappedSelection.count() "   << mappedSelection.count() << std::endl;
+//     std::cout << "XXXXXXXXXXXXX  mappedDeselection.count() " << mappedDeselection.count() << std::endl;
+
+    q->QItemSelectionModel::select(mappedDeselection, QItemSelectionModel::Deselect);
+    q->QItemSelectionModel::select(mappedSelection, QItemSelectionModel::Select);
+
+//     q->select(mappedDeselection, QItemSelectionModel::Deselect);
+//     q->select(mappedSelection, QItemSelectionModel::Select);
+
+
+}
+
+    QAbstractItemModel * const m_model;
+    QItemSelectionModel * const m_linkedItemSelectionModel;
+    bool m_ignoreCurrentChanged;
+    KModelIndexProxyMapper * const m_indexMapper;
+};
+
+
+
+#endif
diff --git a/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx b/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx
new file mode 100644 (file)
index 0000000..a215ae0
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+    Copyright (C) 2010 Klarälvdalens Datakonsult AB,
+        a KDAB Group company, info@kdab.net,
+        author Stephen Kelly <stephen@kdab.com>
+
+    This library is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Library General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    This library 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 Library General Public
+    License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to the
+    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+*/
+
+#include "kmodelindexproxymapper.hxx"
+
+#include <QtCore/QAbstractItemModel>
+#include <QtCore/QWeakPointer>
+#include <QtGui/QAbstractProxyModel>
+#include <QtGui/QItemSelectionModel>
+
+// #include "kdebug.h"
+
+class KModelIndexProxyMapperPrivate
+{
+  KModelIndexProxyMapperPrivate(const QAbstractItemModel *leftModel, const QAbstractItemModel *rightModel, KModelIndexProxyMapper *qq)
+    : q_ptr(qq), m_leftModel(leftModel), m_rightModel(rightModel)
+  {
+    createProxyChain();
+  }
+
+  void createProxyChain();
+  bool assertValid();
+
+  bool assertSelectionValid(const QItemSelection &selection) const {
+    foreach(const QItemSelectionRange &range, selection) {
+      if (!range.isValid()) {
+//         kDebug() << selection << m_leftModel << m_rightModel << m_proxyChainDown << m_proxyChainUp;
+      }
+      Q_ASSERT(range.isValid());
+    }
+    return true;
+  }
+
+  Q_DECLARE_PUBLIC(KModelIndexProxyMapper)
+  KModelIndexProxyMapper * const q_ptr;
+
+  QList<QWeakPointer<const QAbstractProxyModel> > m_proxyChainUp;
+  QList<QWeakPointer<const QAbstractProxyModel> > m_proxyChainDown;
+
+  QWeakPointer<const QAbstractItemModel> m_leftModel;
+  QWeakPointer<const QAbstractItemModel> m_rightModel;
+};
+
+
+/*
+
+  The idea here is that <tt>this</tt> selection model and proxySelectionModel might be in different parts of the
+  proxy chain. We need to build up to two chains of proxy models to create mappings between them.
+
+  Example 1:
+
+     Root model
+          |
+        /    \
+    Proxy 1   Proxy 3
+       |       |
+    Proxy 2   Proxy 4
+
+  Need Proxy 1 and Proxy 2 in one chain, and Proxy 3 and 4 in the other.
+
+  Example 2:
+
+     Root model
+          |
+        Proxy 1
+          |
+        Proxy 2
+        /     \
+    Proxy 3   Proxy 6
+       |       |
+    Proxy 4   Proxy 7
+       |
+    Proxy 5
+
+  We first build the chain from 1 to 5, then start building the chain from 7 to 1. We stop when we find that proxy 2 is
+  already in the first chain.
+
+  Stephen Kelly, 30 March 2010.
+*/
+
+void KModelIndexProxyMapperPrivate::createProxyChain()
+{
+  QWeakPointer<const QAbstractItemModel> targetModel = m_rightModel;
+
+  if (!targetModel)
+    return;
+
+  if (m_leftModel == targetModel)
+    return;
+
+  QList<QWeakPointer<const QAbstractProxyModel> > proxyChainDown;
+  QWeakPointer<const QAbstractProxyModel> selectionTargetProxyModel = qobject_cast<const QAbstractProxyModel*>(targetModel.data());
+  while( selectionTargetProxyModel )
+  {
+    proxyChainDown.prepend( selectionTargetProxyModel );
+
+    selectionTargetProxyModel = qobject_cast<const QAbstractProxyModel*>(selectionTargetProxyModel.data()->sourceModel());
+
+    if (selectionTargetProxyModel.data() == m_leftModel.data())
+    {
+      m_proxyChainDown = proxyChainDown;
+      return;
+    }
+  }
+
+  QWeakPointer<const QAbstractItemModel> sourceModel = m_leftModel;
+  QWeakPointer<const QAbstractProxyModel> sourceProxyModel = qobject_cast<const QAbstractProxyModel*>(sourceModel.data());
+
+  while(sourceProxyModel)
+  {
+    m_proxyChainUp.append(sourceProxyModel);
+
+    sourceProxyModel = qobject_cast<const QAbstractProxyModel*>(sourceProxyModel.data()->sourceModel());
+
+    const int targetIndex = proxyChainDown.indexOf(sourceProxyModel);
+
+    if (targetIndex != -1)
+    {
+      m_proxyChainDown = proxyChainDown.mid(targetIndex + 1, proxyChainDown.size());
+      return;
+    }
+  }
+  m_proxyChainDown = proxyChainDown;
+  Q_ASSERT(assertValid());
+}
+
+bool KModelIndexProxyMapperPrivate::assertValid()
+{
+  if ( m_proxyChainDown.isEmpty())
+  {
+    Q_ASSERT( !m_proxyChainUp.isEmpty() );
+    Q_ASSERT( m_proxyChainUp.last().data()->sourceModel() == m_rightModel.data() );
+  }
+  else if ( m_proxyChainUp.isEmpty())
+  {
+    Q_ASSERT( !m_proxyChainDown.isEmpty() );
+    Q_ASSERT( m_proxyChainDown.first().data()->sourceModel() == m_leftModel.data() );
+  } else {
+    Q_ASSERT( m_proxyChainDown.first().data()->sourceModel() == m_proxyChainUp.last().data()->sourceModel() );
+  }
+  return true;
+}
+
+KModelIndexProxyMapper::KModelIndexProxyMapper(const QAbstractItemModel* leftModel, const QAbstractItemModel* rightModel, QObject* parent)
+  : QObject(parent), d_ptr( new KModelIndexProxyMapperPrivate(leftModel, rightModel, this) )
+{
+
+}
+
+KModelIndexProxyMapper::~KModelIndexProxyMapper()
+{
+  delete d_ptr;
+}
+
+QModelIndex KModelIndexProxyMapper::mapLeftToRight(const QModelIndex& index) const
+{
+  const QItemSelection selection = mapSelectionLeftToRight(QItemSelection(index, index));
+  if (selection.isEmpty())
+    return QModelIndex();
+
+  return selection.indexes().first();
+}
+
+QModelIndex KModelIndexProxyMapper::mapRightToLeft(const QModelIndex& index) const
+{
+  const QItemSelection selection = mapSelectionRightToLeft(QItemSelection(index, index));
+  if (selection.isEmpty())
+    return QModelIndex();
+
+  return selection.indexes().first();
+}
+
+// QAbstractProxyModel::mapSelectionFromSource creates invalid ranges to we filter
+// those out manually in a loop. Hopefully fixed in Qt 4.7.2, so we ifdef it out.
+// http://qt.gitorious.org/qt/qt/merge_requests/2474
+// http://qt.gitorious.org/qt/qt/merge_requests/831
+#if QT_VERSION < 0x040702
+#define RANGE_FIX_HACK
+#endif
+
+#ifdef RANGE_FIX_HACK
+static QItemSelection removeInvalidRanges(const QItemSelection &selection)
+{
+  QItemSelection result;
+  Q_FOREACH(const QItemSelectionRange &range, selection)
+  {
+    if (!range.isValid())
+      continue;
+    result << range;
+  }
+  return result;
+}
+#endif
+
+QItemSelection KModelIndexProxyMapper::mapSelectionLeftToRight(const QItemSelection& selection) const
+{
+  Q_D(const KModelIndexProxyMapper);
+
+  if (selection.isEmpty())
+    return QItemSelection();
+
+//   if (selection.first().model() != d->m_leftModel.data())
+//     kDebug() << "FAIL" << selection.first().model() << d->m_leftModel.data() << d->m_rightModel.data();
+  Q_ASSERT(selection.first().model() == d->m_leftModel.data());
+
+  QItemSelection seekSelection = selection;
+  Q_ASSERT(d->assertSelectionValid(seekSelection));
+  QListIterator<QWeakPointer<const QAbstractProxyModel> > iUp(d->m_proxyChainUp);
+
+  while (iUp.hasNext())
+  {
+    const QWeakPointer<const QAbstractProxyModel> proxy = iUp.next();
+    if (!proxy.data())
+      return QItemSelection();
+    seekSelection = proxy.data()->mapSelectionToSource(seekSelection);
+
+#ifdef RANGE_FIX_HACK
+    seekSelection = removeInvalidRanges(seekSelection);
+#endif
+    Q_ASSERT(d->assertSelectionValid(seekSelection));
+  }
+
+  QListIterator<QWeakPointer<const QAbstractProxyModel> > iDown(d->m_proxyChainDown);
+
+  while (iDown.hasNext())
+  {
+    const QWeakPointer<const QAbstractProxyModel> proxy = iDown.next();
+    if (!proxy.data())
+      return QItemSelection();
+    seekSelection = proxy.data()->mapSelectionFromSource(seekSelection);
+
+#ifdef RANGE_FIX_HACK
+    seekSelection = removeInvalidRanges(seekSelection);
+#endif
+    Q_ASSERT(d->assertSelectionValid(seekSelection));
+  }
+
+  Q_ASSERT( ( !seekSelection.isEmpty() && seekSelection.first().model() == d->m_rightModel.data() ) || true );
+  return seekSelection;
+}
+
+QItemSelection KModelIndexProxyMapper::mapSelectionRightToLeft(const QItemSelection& selection) const
+{
+  Q_D(const KModelIndexProxyMapper);
+
+  if (selection.isEmpty())
+    return QItemSelection();
+
+//   if (selection.first().model() != d->m_rightModel.data())
+//     kDebug() << "FAIL" << selection.first().model() << d->m_leftModel.data() << d->m_rightModel.data();
+  Q_ASSERT(selection.first().model() == d->m_rightModel.data());
+
+  QItemSelection seekSelection = selection;
+  Q_ASSERT(d->assertSelectionValid(seekSelection));
+  QListIterator<QWeakPointer<const QAbstractProxyModel> > iDown(d->m_proxyChainDown);
+
+  iDown.toBack();
+  while (iDown.hasPrevious())
+  {
+    const QWeakPointer<const QAbstractProxyModel> proxy = iDown.previous();
+    if (!proxy.data())
+      return QItemSelection();
+    seekSelection = proxy.data()->mapSelectionToSource(seekSelection);
+
+#ifdef RANGE_FIX_HACK
+    seekSelection = removeInvalidRanges(seekSelection);
+#endif
+    Q_ASSERT(d->assertSelectionValid(seekSelection));
+  }
+
+  QListIterator<QWeakPointer<const QAbstractProxyModel> > iUp(d->m_proxyChainUp);
+
+  iUp.toBack();
+  while (iUp.hasPrevious())
+  {
+    const QWeakPointer<const QAbstractProxyModel> proxy = iUp.previous();
+    if (!proxy.data())
+      return QItemSelection();
+    seekSelection = proxy.data()->mapSelectionFromSource(seekSelection);
+
+#ifdef RANGE_FIX_HACK
+    seekSelection = removeInvalidRanges(seekSelection);
+#endif
+    Q_ASSERT(d->assertSelectionValid(seekSelection));
+  }
+
+  Q_ASSERT( ( !seekSelection.isEmpty() && seekSelection.first().model() == d->m_leftModel.data() ) || true );
+  return seekSelection;
+}
+
+// #include "kmodelindexproxymapper_moc.cxx"
+// #include "kmodelindexproxymapper.moc"
\ No newline at end of file
diff --git a/src/HEXABLOCKGUI/kmodelindexproxymapper.hxx b/src/HEXABLOCKGUI/kmodelindexproxymapper.hxx
new file mode 100644 (file)
index 0000000..3a81de1
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+    Copyright (C) 2010 Klarälvdalens Datakonsult AB,
+        a KDAB Group company, info@kdab.net,
+        author Stephen Kelly <stephen@kdab.com>
+
+    This library is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Library General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    This library 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 Library General Public
+    License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to the
+    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+*/
+
+#ifndef KMODELINDEXPROXYMAPPER_H
+#define KMODELINDEXPROXYMAPPER_H
+
+#include <QObject>
+
+// #include "kdeui_export.h"
+
+class QAbstractItemModel;
+class QModelIndex;
+class QItemSelection;
+class KModelIndexProxyMapperPrivate;
+
+class KModelIndexProxyMapper : public QObject
+{
+  Q_OBJECT
+public:
+  KModelIndexProxyMapper(const QAbstractItemModel *leftModel, const QAbstractItemModel *rightModel, QObject* parent = 0);
+
+  ~KModelIndexProxyMapper();
+
+  QModelIndex mapLeftToRight(const QModelIndex &index) const;
+
+  QModelIndex mapRightToLeft(const QModelIndex &index) const;
+
+  QItemSelection mapSelectionLeftToRight(const QItemSelection &selection) const;
+
+  QItemSelection mapSelectionRightToLeft(const QItemSelection &selection) const;
+
+private:
+  //@cond PRIVATE
+  Q_DECLARE_PRIVATE(KModelIndexProxyMapper)
+  KModelIndexProxyMapperPrivate * const d_ptr;
+  //@endcond
+};
+
+#endif
+
diff --git a/src/HEXABLOCKGUI/resources/ExecHEXABLOCK.png b/src/HEXABLOCKGUI/resources/ExecHEXABLOCK.png
new file mode 100755 (executable)
index 0000000..16a20c1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/ExecHEXABLOCK.png differ
diff --git a/src/HEXABLOCKGUI/resources/HEXABLOCKCatalog.xml.in b/src/HEXABLOCKGUI/resources/HEXABLOCKCatalog.xml.in
new file mode 100755 (executable)
index 0000000..e94fe6a
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version='1.0' encoding='us-ascii' ?>
+<!--
+  Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library 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
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http:www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+-->
+<!-- XML component catalog -->
+<begin-catalog>
+
+<!-- Path prefix information -->
+
+<path-prefix-list>
+</path-prefix-list>
+
+<!-- Component list -->
+<component-list>
+        <component>
+                <!-- Component identification -->
+                <component-name>HEXABLOCK</component-name>
+               <component-username>HEXABLOCK TUI</component-username>
+                <component-type>Data</component-type>
+                <component-author>CS</component-author>
+                <component-version>@VERSION@</component-version>
+                <component-comment>CEA - RD</component-comment>
+                <component-multistudy>1</component-multistudy>
+                <component-icone>ModuleHexablock.png</component-icone>
+                <constraint>'linux' ~ OS</constraint>
+       
+       </component>
+</component-list>
+</begin-catalog>
diff --git a/src/HEXABLOCKGUI/resources/HEXABLOCK_icons.ts b/src/HEXABLOCKGUI/resources/HEXABLOCK_icons.ts
new file mode 100755 (executable)
index 0000000..69dafca
--- /dev/null
@@ -0,0 +1,208 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library 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
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ICON_NEW_DOCUMENT</source>
+            <translation>new_document.png</translation>
+        </message>
+        <message>
+            <source>ICON_LOAD_DOCUMENT</source>
+            <translation>load_document.png</translation>
+        </message>
+        <message>
+            <source>ICON_SAVE_DOCUMENT</source>
+            <translation>save_document.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_VERTEX</source>
+            <translation>add_vertex.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_EDGE</source>
+            <translation>add_edge.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_QUAD</source>
+            <translation>add_quad.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_HEXA</source>
+            <translation>add_hexa.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_VECTOR</source>
+            <translation>add_vector.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_CYLINDER</source>
+            <translation>add_cylinder.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_PIPE</source>
+            <translation>add_pipe.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_GRID</source>
+            <translation>make_grid.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_CYLINDER</source>
+            <translation>make_cylinder.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_PIPE</source>
+            <translation>make_pipe.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_CYLINDERS</source>
+            <translation>make_cylinders.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_PIPES</source>
+            <translation>make_pipes.png</translation>
+        </message>
+        <message>
+            <source>ICON_REMOVE_HEXA</source>
+            <translation>remove_hexa.png</translation>
+        </message>
+        <message>
+            <source>ICON_PRISM_QUAD</source>
+            <translation>prism_quad.png</translation>
+        </message>
+        <message>
+            <source>ICON_JOIN_QUAD</source>
+            <translation>join_quad.png</translation>
+        </message>
+        <message>
+            <source>ICON_MERGE</source>
+            <translation>merge.png</translation>
+        </message>
+        <message>
+            <source>ICON_DISCONNECT</source>
+            <translation>disconnect.png</translation>
+        </message>
+        <message>
+            <source>ICON_CUT_EDGE</source>
+            <translation>cut_edge.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_TRANSFORMATION</source>
+            <translation>make_transformation.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_SYMMETRY</source>
+            <translation>make_symmetry.png</translation>
+        </message>
+        <message>
+            <source>ICON_PERFORM_TRANSFORMATION</source>
+            <translation>perform_transformation.png</translation>
+        </message>
+        <message>
+            <source>ICON_PERFORM_SYMMETRY</source>
+            <translation>perform_symmetry.png</translation>
+        </message>
+        <message>
+            <source>ICON_VERTEX_ASSOCIATION</source>
+            <translation>assoc_vertex.png</translation>
+        </message>
+        <message>
+            <source>ICON_EDGE_ASSOCIATION</source>
+            <translation>assoc_edge.png</translation>
+        </message>
+        <message>
+            <source>ICON_QUAD_ASSOCIATION</source>
+            <translation>assoc_quad.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_GROUP</source>
+            <translation>add_group.png</translation>
+        </message>
+        <message>
+            <source>ICON_REMOVE_GROUP</source>
+            <translation>remove_group.png</translation>
+        </message>
+        <message>
+            <source>ICON_ADD_LAW</source>
+            <translation>add_law.png</translation>
+        </message>
+        <message>
+            <source>ICON_REMOVE_LAW</source>
+            <translation>remove_law.png</translation>
+        </message>
+        <message>
+            <source>ICON_SET_PROPAGATION</source>
+            <translation>set_propagation.png</translation>
+        </message>
+        <message>
+            <source>ICON_COMPUTE_MESH</source>
+            <translation>compute_mesh.png</translation>
+        </message>
+        <message>
+            <source>ICON_QUAD_REVOLUTION</source>
+            <translation>quad_revolution.png</translation>
+        </message>
+        <message>
+            <source>ICON_REPLACE_HEXA</source>
+            <translation>replace_hexa.png</translation>
+        </message>
+        <message>
+            <source>ICON_MAKE_HEMISPHERE</source>
+            <translation>make_hemisphere.png</translation>
+        </message>
+
+        <message>
+            <source>ICON_DLG_POINT</source>
+            <translation>point2.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_POINT_EDGE</source>
+            <translation>pointonedge.png</translation>
+        </message>
+        <message>
+            <source>ICON_SELECT</source>
+            <translation>select1.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_POINT_REF</source>
+            <translation>point3.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_POINT_LINES</source>
+            <translation>point_line_intersection.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_POINT_FACE</source>
+            <translation>pointonface.png</translation>
+        </message>
+        <message>
+            <source>ICO_LINE</source>
+            <translation>line.png</translation>
+        </message>
+        <message>
+            <source>ICO_WIRE</source>
+            <translation>build_wire.png</translation>
+        </message>
+
+    </context>
+</TS>
diff --git a/src/HEXABLOCKGUI/resources/HEXABLOCK_msg_en.ts b/src/HEXABLOCKGUI/resources/HEXABLOCK_msg_en.ts
new file mode 100755 (executable)
index 0000000..9cc0fc8
--- /dev/null
@@ -0,0 +1,1369 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_GB">
+<context>
+    <name>HEXABLOCK::GUI::ComputeMeshDialog</name>
+    <message>
+        <source>Compute mesh</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::CutEdgeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT CUT EDGE</source>
+        <translation>Cannot cut edge</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::CylinderDialog</name>
+    <message>
+        <source>Cylinder Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD CYLINDER</source>
+        <translation>Cannot add cylinder</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::DisconnectDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT DISCONNECT</source>
+        <translation>Cannot disconnect</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::DocumentModel</name>
+    <message>
+        <source>TREE_ITEM_VERTEX</source>
+        <translation>Vertices</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_EDGE</source>
+        <translation>Edges</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_QUAD</source>
+        <translation>Quadrangles</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_HEXA</source>
+        <translation>Hexahedra</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_VECTOR</source>
+        <translation>Vectors</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_CYLINDER</source>
+        <translation>Cylinders</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_PIPE</source>
+        <translation>Pipes</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_ELEMENT</source>
+        <translation>Elements</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_CROSSELEMENT</source>
+        <translation>Cross Elements</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_GROUP</source>
+        <translation>Groups</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_LAW</source>
+        <translation>Laws</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_PROPAGATION</source>
+        <translation>Propagations</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::EdgeAssocDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE EDGE ASSOCIATION</source>
+        <translation>Cannot make edge association</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::EdgeDialog</name>
+    <message>
+        <source>Edge Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD EDGE</source>
+        <translation>Cannot build edge</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::GroupDialog</name>
+    <message>
+        <source>Group Construction</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Group Modification</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Group Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD GROUP</source>
+        <translation>Cannot add group</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::HexaBaseDialog</name>
+    <message>
+        <source>VERTEX</source>
+        <translation>Vertex</translation>
+    </message>
+    <message>
+        <source>EDGE</source>
+        <translation>Edge</translation>
+    </message>
+    <message>
+        <source>QUAD</source>
+        <translation>Quadrangle</translation>
+    </message>
+    <message>
+        <source>HEXA</source>
+        <translation>Hexahedron</translation>
+    </message>
+    <message>
+        <source>VECTOR</source>
+        <translation>Vector</translation>
+    </message>
+    <message>
+        <source>CYLINDER</source>
+        <translation>Cylinder</translation>
+    </message>
+    <message>
+        <source>PIPE</source>
+        <translation>Pipe</translation>
+    </message>
+    <message>
+        <source>ELEMENTS</source>
+        <translation>Elements</translation>
+    </message>
+    <message>
+        <source>CROSSELEMENTS</source>
+        <translation>Cross Elements</translation>
+    </message>
+    <message>
+        <source>GROUP</source>
+        <translation>Group</translation>
+    </message>
+    <message>
+        <source>LAW</source>
+        <translation>Law</translation>
+    </message>
+    <message>
+        <source>PROPAGATION</source>
+        <translation>Propagation</translation>
+    </message>
+    <message>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Apply And Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Apply</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>%1: Bad type selected
+Please select a %2.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::HexaDialog</name>
+    <message>
+        <source>Hexahedron Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD HEXA</source>
+        <translation>Cannot build hexahedra</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::JoinQuadDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT JOIN QUAD(S)</source>
+        <translation>Cannot join quadrangle(s)</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::LawDialog</name>
+    <message>
+        <source>Law Construction</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Law Modification</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD LAW</source>
+        <translation>Cannot add law</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeCylinderDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE CYLINDER</source>
+        <translation>Cannot make cylinder</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeCylindersDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE CYLINDERS</source>
+        <translation>Cannot make cylinders</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeGridDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE GRID</source>
+        <translation>Cannot make grid</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeHemiSphereDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE RIND</source>
+        <translation>Cannot make hemisphere</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakePipeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE PIPE</source>
+        <translation>Cannot make pipe</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakePipesDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE PIPES</source>
+        <translation>Cannot make pipes</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeSymmetryDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE TRANSFORMATION</source>
+        <translation>Cannot make symmetry</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeTransformationDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE TRANSFORMATION</source>
+        <translation>Cannot make transformation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MergeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MERGE</source>
+        <translation>Cannot merge</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MyBasicGUI_PointDlg</name>
+    <message>
+        <source>ICON_DLG_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_SELECT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_REF</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_LINES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_FACE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICO_LINE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICO_WIRE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Vertex Association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINTS</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PARAM_VALUE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LENGTH_VALUE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COORD_VALUE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COORDINATES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_X</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_Y</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_Z</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINT_ON_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_START_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINT_ON_FACE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_FACE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_UPARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_VPARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_REF_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_DX</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_DY</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_DZ</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LINE_INTERSECTION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LINE1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LINE2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COORDINATES_RES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_VERTEX</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUND</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LENGTH</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation type="unfinished">HexaBlock</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE VERTEX ASSOCIATION</source>
+        <translation>Cannot make vertex association</translation>
+    </message>
+    <message>
+        <source>Bad selection type: please select a %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PerformSymmetryDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT PERFORM SYMMETRY</source>
+        <translation>Cannot perform symmetry</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PerformTransformationDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation type="unfinished">Error</translation>
+    </message>
+    <message>
+        <source>CANNOT PERFORM TRANSFORMATION</source>
+        <translation>Cannot perform transformation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PipeDialog</name>
+    <message>
+        <source>Pipe Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD PIPE</source>
+        <translation>Cannot add pipe</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PrismQuadDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT PRISM QUAD(S)</source>
+        <translation>Cannot prism quadrangle(s)</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PropagationDialog</name>
+    <message>
+        <source>Propagation Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Propagation Modification</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Propagation Setting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT SET PROPAGATION</source>
+        <translation>Cannot set propagation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::QuadDialog</name>
+    <message>
+        <source>Quad Information</source>
+        <translation>Quadrangle information</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD QUAD</source>
+        <translation>Cannot build quadrangle</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::QuadRevolutionDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE QUAD REVOLUTION</source>
+        <translation>Cannot make revolution</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::RemoveHexaDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE HEXA</source>
+        <translation>Cannot remove hexahedra</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::ReplaceHexaDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT REPLACE HEXA</source>
+        <translation>Cannot replace hexahedra</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::VectorDialog</name>
+    <message>
+        <source>Vector Information</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD VECTOR</source>
+        <translation>Cannot build vector</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::VertexDialog</name>
+    <message>
+        <source>Vertex Construction</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Vertex Modification</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>VERTEX UPDATE/CONSTRUCTION</source>
+        <translation>Vertext Update/Construction</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCKGUI</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>Create a new document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_NEW_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>New Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Load a document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_LOAD_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Load Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Save the document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_SAVE_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Save Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a vertex</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_VERTEX</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Vertex</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new vertex</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create an edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a quadrangle</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Quadrangle</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new quadrangle</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create an hexahedron</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Hexahedron</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new hexahedron</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a vector</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_VECTOR</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Vector</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new vector</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a cylinder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_CYLINDER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Cylinder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new cylinder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a pipe</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_PIPE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Pipe</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Create a new pipe</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make a grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_GRID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make a cylinder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_CYLINDER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Cylinder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make a pipe</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_PIPE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Pipe</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make cylinders</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_CYLINDERS</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Cylinders</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make pipes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_PIPES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Pipes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make an hemisphere</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_HEMISPHERE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Hemisphere</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove hexahedra</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove Hexahedra</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Prism quadrangles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PRISM_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Prism Quadrangles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Join quadrangles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_JOIN_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Join Quadrangles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Join quadrangles with hexahedra</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Merge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MERGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Disconnect</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DISCONNECT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Disconnect edges, vertexes or quadrangles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Cut edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_CUT_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Cut Edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make transformation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_TRANSFORMATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Transformation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make symmetry</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_SYMMETRY</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Symmetry</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Perform transformation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PERFORM_TRANSFORMATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Perform Transformation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Perform symmetry</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PERFORM_SYMMETRY</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Perform Symmetry</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Replace hexahedron</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REPLACE_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Replace Hexahedron</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Quad revolution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_QUAD_REVOLUTION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Quad Revolution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make vertex association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_VERTEX_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Vertex association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make edge association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_EDGE_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Edge Association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make quadrangle association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_QUAD_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Make Quadrangle Association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add a group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_GROUP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove a group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_GROUP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add a law</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_LAW</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Add Law</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove a law</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_LAW</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Remove Law</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Set propagation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_SET_PROPAGATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Set Propagation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Compute mesh</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_COMPUTE_MESH</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Compute Mesh</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>MEN_FILE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>HEXABLOCK</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Model</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Association</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Groups</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Mesh</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>HexaBlock Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Open HexaBlock Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>XML-Files (*.xml);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Save HexaBlock Document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE %1</source>
+        <translation>Cannot remove %1</translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>GROUP REMOVED</source>
+        <translation>Group removed</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE GROUP</source>
+        <translation>Cannot remove group</translation>
+    </message>
+    <message>
+        <source>LAW REMOVED</source>
+        <translation>Law removed</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE LAW</source>
+        <translation>Cannot remove law</translation>
+    </message>
+    <message>
+        <source>PLEASE SELECT A PROPAGATION</source>
+        <translation>Please select a propagation</translation>
+    </message>
+    <message>
+        <source>ASSOCIATION CLEARED</source>
+        <translation>association cleared</translation>
+    </message>
+</context>
+<context>
+    <name>MyGEOMBase_Skeleton</name>
+    <message>
+        <source>GEOM_RESULT_NAME_GRP</source>
+        <translation>Result name</translation>
+    </message>
+    <message>
+        <source>GEOM_RESULT_NAME_LBL</source>
+        <translation>Name</translation>
+    </message>
+    <message>
+        <source>GEOM_PUBLISH_RESULT_GRP</source>
+        <translation>Advanced options</translation>
+    </message>
+    <message>
+        <source>GEOM_RESTORE_SUB_SHAPES</source>
+        <translation>Set presentation parameters and sub-shapes from arguments</translation>
+    </message>
+    <message>
+        <source>GEOM_RSS_ADD_FREFIX</source>
+        <translation>Add prefix to names of restored sub-shapes</translation>
+    </message>
+    <message>
+        <source>GEOM_PREVIEW</source>
+        <translation>Preview</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_CLOSE</source>
+        <translation>Close</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_APPLY_AND_CLOSE</source>
+        <translation>Apply and Close</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_APPLY</source>
+        <translation>Apply</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_HELP</source>
+        <translation>Help</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <source>XML_FILES_FILTER</source>
+        <translation>XML Files</translation>
+    </message>
+    <message>
+        <source>ALL_FILES_FILTER</source>
+        <translation>All files</translation>
+    </message>
+    <message>
+        <source>WRN_WARNING</source>
+        <translation>Warning</translation>
+    </message>
+    <message>
+        <source>EXTERNAL_BROWSER_CANNOT_SHOW_PAGE</source>
+        <translation>External browser &apos;%1&apos; cannot show help page &apos;%2&apos;. Do you want to change it in preferences?</translation>
+    </message>
+    <message>
+        <source>BUT_OK</source>
+        <translation>OK</translation>
+    </message>
+    <message>
+        <source>WRN_STUDY_LOCKED</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRP_DONE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRP_ABORT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_ERROR_STATUS</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_INCORRECT_INPUT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_ERROR</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_VERTEX</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_WIRE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_FACE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_SHELL</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_SOLID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUNDSOLID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUND</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRECISION_HINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
diff --git a/src/HEXABLOCKGUI/resources/HEXABLOCK_msg_fr.ts b/src/HEXABLOCKGUI/resources/HEXABLOCK_msg_fr.ts
new file mode 100755 (executable)
index 0000000..6432157
--- /dev/null
@@ -0,0 +1,1370 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+    <name>HEXABLOCK::GUI::ComputeMeshDialog</name>
+    <message>
+        <source>Compute mesh</source>
+        <translation>Calculer</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::CutEdgeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT CUT EDGE</source>
+        <translation>Impossible de couper l&apos;arête</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::CylinderDialog</name>
+    <message>
+        <source>Cylinder Information</source>
+        <translation>Information sur le cylindre</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD CYLINDER</source>
+        <translation>Impossible d&apos;ajouter le cylindre</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::DisconnectDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT DISCONNECT</source>
+        <translation>Impossible de déconnecter</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::DocumentModel</name>
+    <message>
+        <source>TREE_ITEM_VERTEX</source>
+        <translation>Sommets</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_EDGE</source>
+        <translation>Arêtes</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_QUAD</source>
+        <translation>Quadrangles</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_HEXA</source>
+        <translation>Hexaèdres</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_VECTOR</source>
+        <translation>Vecteurs</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_CYLINDER</source>
+        <translation>Cylindres</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_PIPE</source>
+        <translation>Tuyaux</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_ELEMENT</source>
+        <translation>Eléments</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_CROSSELEMENT</source>
+        <translation>Eléments de croix</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_GROUP</source>
+        <translation>Groupes</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_LAW</source>
+        <translation>Lois</translation>
+    </message>
+    <message>
+        <source>TREE_ITEM_PROPAGATION</source>
+        <translation>Propagations</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::EdgeAssocDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE EDGE ASSOCIATION</source>
+        <translation>Impossible d&apos;associer les arêtes</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::EdgeDialog</name>
+    <message>
+        <source>Edge Information</source>
+        <translation>Information sur l&apos;arête</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD EDGE</source>
+        <translation>Impossible de construire l&apos;arête</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::GroupDialog</name>
+    <message>
+        <source>Group Construction</source>
+        <translation>Création d&apos;un groupe</translation>
+    </message>
+    <message>
+        <source>Group Modification</source>
+        <translation>Modification d&apos;un groupe</translation>
+    </message>
+    <message>
+        <source>Group Information</source>
+        <translation>Information sur le groupe</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD GROUP</source>
+        <translation>Impossible d&apos;ajouter le groupe</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::HexaBaseDialog</name>
+    <message>
+        <source>VERTEX</source>
+        <translation>Sommet</translation>
+    </message>
+    <message>
+        <source>EDGE</source>
+        <translation>Arête</translation>
+    </message>
+    <message>
+        <source>QUAD</source>
+        <translation>Quadrangle</translation>
+    </message>
+    <message>
+        <source>HEXA</source>
+        <translation>Hexaèdre</translation>
+    </message>
+    <message>
+        <source>VECTOR</source>
+        <translation>Vecteur</translation>
+    </message>
+    <message>
+        <source>CYLINDER</source>
+        <translation>Cylindre</translation>
+    </message>
+    <message>
+        <source>PIPE</source>
+        <translation>Tuyau</translation>
+    </message>
+    <message>
+        <source>ELEMENTS</source>
+        <translation>Eléments</translation>
+    </message>
+    <message>
+        <source>CROSSELEMENTS</source>
+        <translation>Eléments de croix</translation>
+    </message>
+    <message>
+        <source>GROUP</source>
+        <translation>Groupe</translation>
+    </message>
+    <message>
+        <source>LAW</source>
+        <translation>Loi</translation>
+    </message>
+    <message>
+        <source>PROPAGATION</source>
+        <translation>Propagation</translation>
+    </message>
+    <message>
+        <source>Close</source>
+        <translation>Fermer</translation>
+    </message>
+    <message>
+        <source>Help</source>
+        <translation>Aide</translation>
+    </message>
+    <message>
+        <source>Apply And Close</source>
+        <translation>Appliquer et Fermer</translation>
+    </message>
+    <message>
+        <source>Apply</source>
+        <translation>Appliquer</translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>%1: Bad type selected
+Please select a %2.</source>
+        <translation>%1 : Mauvais type sélectionné
+Choisissez un(e) %2.</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::HexaDialog</name>
+    <message>
+        <source>Hexahedron Information</source>
+        <translation>Information sur l&apos;hexaèdre</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD HEXA</source>
+        <translation>Impossible de construire l&apos;hexaèdre</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::JoinQuadDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT JOIN QUAD(S)</source>
+        <translation>Impossible de joindre les quadrangles</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::LawDialog</name>
+    <message>
+        <source>Law Construction</source>
+        <translation>Création d&apos;une loi</translation>
+    </message>
+    <message>
+        <source>Law Modification</source>
+        <translation>Modification de la loi</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD LAW</source>
+        <translation>Impossible d&apos;ajouter la loi</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeCylinderDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE CYLINDER</source>
+        <translation>Impossible de créer le cylindre</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeCylindersDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE CYLINDERS</source>
+        <translation>Impossible de créer les cylindres</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeGridDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE GRID</source>
+        <translation>Impossible de créer la grille</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeHemiSphereDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE RIND</source>
+        <translation>Impossible de créer l&apos;hémisphère</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakePipeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE PIPE</source>
+        <translation>Impossible de créer le tuyau</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakePipesDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE PIPES</source>
+        <translation>Impossible de créer les tuyaux</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeSymmetryDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE TRANSFORMATION</source>
+        <translation>Impossible de réaliser la symétrie</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MakeTransformationDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE TRANSFORMATION</source>
+        <translation>Impossible de réaliser la transformation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MergeDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MERGE</source>
+        <translation>Impossible de fusionner</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::MyBasicGUI_PointDlg</name>
+    <message>
+        <source>ICON_DLG_POINT</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_EDGE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICON_SELECT</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_REF</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_LINES</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICON_DLG_POINT_FACE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICO_LINE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>ICO_WIRE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>Vertex Association</source>
+        <translation>Associer sommets</translation>
+    </message>
+    <message>
+        <source>GEOM_POINTS</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GEOM_PARAM_VALUE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GEOM_LENGTH_VALUE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GEOM_COORD_VALUE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GEOM_COORDINATES</source>
+        <translation>coordonnées</translation>
+    </message>
+    <message>
+        <source>GEOM_X</source>
+        <translation>X</translation>
+    </message>
+    <message>
+        <source>GEOM_Y</source>
+        <translation>Y</translation>
+    </message>
+    <message>
+        <source>GEOM_Z</source>
+        <translation>Z</translation>
+    </message>
+    <message>
+        <source>GEOM_POINT_ON_EDGE</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GEOM_EDGE</source>
+        <translation>Arête</translation>
+    </message>
+    <message>
+        <source>GEOM_START_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINT_ON_FACE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_FACE</source>
+        <translation>Face</translation>
+    </message>
+    <message>
+        <source>GEOM_UPARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_VPARAMETER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_REF_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_POINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_DX</source>
+        <translation>Dx</translation>
+    </message>
+    <message>
+        <source>GEOM_DY</source>
+        <translation>Dy</translation>
+    </message>
+    <message>
+        <source>GEOM_DZ</source>
+        <translation>Dz</translation>
+    </message>
+    <message>
+        <source>GEOM_LINE_INTERSECTION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LINE1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LINE2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COORDINATES_RES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_VERTEX</source>
+        <translation>Sommet</translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUND</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_LENGTH</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE VERTEX ASSOCIATION</source>
+        <translation>Impossible d&apos;associer les sommets</translation>
+    </message>
+    <message>
+        <source>Bad selection type: please select a %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PerformSymmetryDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT PERFORM SYMMETRY</source>
+        <translation>Impossible de réaliser la symétrie</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PerformTransformationDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT PERFORM TRANSFORMATION</source>
+        <translation>Impossible de réaliser la transformation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PipeDialog</name>
+    <message>
+        <source>Pipe Information</source>
+        <translation>Information sur le tuyau</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT ADD PIPE</source>
+        <translation>Impossible d&apos;ajouter le tuyau</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PrismQuadDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT PRISM QUAD(S)</source>
+        <translation>Impossible d&apos;extruder le(s) quadrangle(s)</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::PropagationDialog</name>
+    <message>
+        <source>Propagation Information</source>
+        <translation>Information sur la propagation</translation>
+    </message>
+    <message>
+        <source>Propagation Modification</source>
+        <translation>Modification de la propagation</translation>
+    </message>
+    <message>
+        <source>Propagation Setting</source>
+        <translation>Paramètres de la propagation</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT SET PROPAGATION</source>
+        <translation>Impossible d&apos;appliquer la propagation</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::QuadDialog</name>
+    <message>
+        <source>Quad Information</source>
+        <translation>Information du quadrangle</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD QUAD</source>
+        <translation>Impossible de construire le quadrangle</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::QuadRevolutionDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT MAKE QUAD REVOLUTION</source>
+        <translation>Impossible d&apos;effectuer la révolution</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::RemoveHexaDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE HEXA</source>
+        <translation>Impossible de supprimer l&apos;hexaèdre</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::ReplaceHexaDialog</name>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT REPLACE HEXA</source>
+        <translation>Impossible de remplacer l&apos;hexaèdre</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::VectorDialog</name>
+    <message>
+        <source>Vector Information</source>
+        <translation>Information sur le vecteur</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT BUILD VECTOR</source>
+        <translation>Impossible de créer le vecteur</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCK::GUI::VertexDialog</name>
+    <message>
+        <source>Vertex Construction</source>
+        <translation>Création d&apos;un sommet</translation>
+    </message>
+    <message>
+        <source>Vertex Modification</source>
+        <translation>Modification d&apos;un sommet</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>VERTEX UPDATE/CONSTRUCTION</source>
+        <translation>Création/Mise à jour d&apos;un sommet</translation>
+    </message>
+</context>
+<context>
+    <name>HEXABLOCKGUI</name>
+    <message>
+        <source>Create a new document</source>
+        <translation>Créer un document</translation>
+    </message>
+    <message>
+        <source>New Document</source>
+        <translation>Nouveau</translation>
+    </message>
+    <message>
+        <source>Load a document</source>
+        <translation>Ouvrir un document</translation>
+    </message>
+    <message>
+        <source>Load Document</source>
+        <translation>Ouvrir</translation>
+    </message>
+    <message>
+        <source>Save the document</source>
+        <translation>Enregistrer le document</translation>
+    </message>
+    <message>
+        <source>Save Document</source>
+        <translation>Enregistrer</translation>
+    </message>
+    <message>
+        <source>Create a vertex</source>
+        <translation>Créer un sommet</translation>
+    </message>
+    <message>
+        <source>Add Vertex</source>
+        <translation>Ajouter sommet</translation>
+    </message>
+    <message>
+        <source>Create a new vertex</source>
+        <translation>Créer un nouveau sommet</translation>
+    </message>
+    <message>
+        <source>Create an edge</source>
+        <translation>Créer une arête</translation>
+    </message>
+    <message>
+        <source>Add Edge</source>
+        <translation>Ajouter arête</translation>
+    </message>
+    <message>
+        <source>Create a new edge</source>
+        <translation>Créer une nouvelle arête</translation>
+    </message>
+    <message>
+        <source>Create a quadrangle</source>
+        <translation>Créer un quadrangle</translation>
+    </message>
+    <message>
+        <source>Add Quadrangle</source>
+        <translation>Ajouter quadrangle</translation>
+    </message>
+    <message>
+        <source>Create a new quadrangle</source>
+        <translation>Créer un nouveau quadrangle</translation>
+    </message>
+    <message>
+        <source>Create an hexahedron</source>
+        <translation>Créer un hexaèdre</translation>
+    </message>
+    <message>
+        <source>Add Hexahedron</source>
+        <translation>Ajouter hexaèdre</translation>
+    </message>
+    <message>
+        <source>Create a new hexahedron</source>
+        <translation>Créer un nouveau hexaèdre</translation>
+    </message>
+    <message>
+        <source>Create a vector</source>
+        <translation>Créer un vecteur</translation>
+    </message>
+    <message>
+        <source>Add Vector</source>
+        <translation>Ajouter vecteur</translation>
+    </message>
+    <message>
+        <source>Create a new vector</source>
+        <translation>Créer un nouveau vecteur</translation>
+    </message>
+    <message>
+        <source>Create a cylinder</source>
+        <translation>Créer un cylindre</translation>
+    </message>
+    <message>
+        <source>Add Cylinder</source>
+        <translation>Ajouter cylindre</translation>
+    </message>
+    <message>
+        <source>Create a new cylinder</source>
+        <translation>Créer un nouveau cylindre</translation>
+    </message>
+    <message>
+        <source>Create a pipe</source>
+        <translation>Créer un tuyau</translation>
+    </message>
+    <message>
+        <source>Add Pipe</source>
+        <translation>Ajouter tuyau</translation>
+    </message>
+    <message>
+        <source>Create a new pipe</source>
+        <translation>Créer un nouveau tuyau</translation>
+    </message>
+    <message>
+        <source>Make a grid</source>
+        <translation>Créer une grille</translation>
+    </message>
+    <message>
+        <source>Make Grid</source>
+        <translation>Créer grille</translation>
+    </message>
+    <message>
+        <source>Make a cylinder</source>
+        <translation>Créer un cylindre</translation>
+    </message>
+    <message>
+        <source>Make Cylinder</source>
+        <translation>Créer cylindre</translation>
+    </message>
+    <message>
+        <source>Make a pipe</source>
+        <translation>Créer un tuyau</translation>
+    </message>
+    <message>
+        <source>Make Pipe</source>
+        <translation>Créer tuyau</translation>
+    </message>
+    <message>
+        <source>Make cylinders</source>
+        <translation>Créer des cylindres</translation>
+    </message>
+    <message>
+        <source>Make Cylinders</source>
+        <translation>Créer cylindres</translation>
+    </message>
+    <message>
+        <source>Make pipes</source>
+        <translation>Créer des tuyaux</translation>
+    </message>
+    <message>
+        <source>Make Pipes</source>
+        <translation>Créer tuyaux</translation>
+    </message>
+    <message>
+        <source>Make an hemisphere</source>
+        <translation>Créer une hémisphère</translation>
+    </message>
+    <message>
+        <source>Make Hemisphere</source>
+        <translation>Créer hémisphère</translation>
+    </message>
+    <message>
+        <source>Remove hexahedra</source>
+        <translation>Supprimer des hexaèdres</translation>
+    </message>
+    <message>
+        <source>Remove Hexahedra</source>
+        <translation>Supprimer hexaèdres</translation>
+    </message>
+    <message>
+        <source>Prism quadrangles</source>
+        <translation>Extruder des quadrangles</translation>
+    </message>
+    <message>
+        <source>Prism Quadrangles</source>
+        <translation>Extruder quadrangles</translation>
+    </message>
+    <message>
+        <source>Join quadrangles</source>
+        <translation>Joindre des quadrangles</translation>
+    </message>
+    <message>
+        <source>Join Quadrangles</source>
+        <translation>Joindre quadrangles</translation>
+    </message>
+    <message>
+        <source>Join quadrangles with hexahedra</source>
+        <translation>Joindre des quadrangles par des hexaèdres</translation>
+    </message>
+    <message>
+        <source>Merge</source>
+        <translation>Fusionner</translation>
+    </message>
+    <message>
+        <source>Disconnect</source>
+        <translation>Déconnecter</translation>
+    </message>
+    <message>
+        <source>Disconnect edges, vertexes or quadrangles</source>
+        <translation>Déconnecter des arêtes, des sommets ou des quadrangles</translation>
+    </message>
+    <message>
+        <source>Cut edge</source>
+        <translation>Couper les arêtes</translation>
+    </message>
+    <message>
+        <source>Cut Edge</source>
+        <translation>Couper arêtes</translation>
+    </message>
+    <message>
+        <source>Make transformation</source>
+        <translation>Créer par transformation</translation>
+    </message>
+    <message>
+        <source>Make Transformation</source>
+        <translation>Créer un élément par transformation</translation>
+    </message>
+    <message>
+        <source>Make symmetry</source>
+        <translation>Créer par symétrie</translation>
+    </message>
+    <message>
+        <source>Make Symmetry</source>
+        <translation>Créer un élément par symétrie</translation>
+    </message>
+    <message>
+        <source>Perform transformation</source>
+        <translation>Transformer un élément</translation>
+    </message>
+    <message>
+        <source>Perform Transformation</source>
+        <translation>Transformer élément</translation>
+    </message>
+    <message>
+        <source>Perform symmetry</source>
+        <translation>Appliquer une symétrie à un élément</translation>
+    </message>
+    <message>
+        <source>Perform Symmetry</source>
+        <translation>Appliquer symétrie</translation>
+    </message>
+    <message>
+        <source>Replace hexahedron</source>
+        <translation>Remplacer un hexaèdre</translation>
+    </message>
+    <message>
+        <source>Replace Hexahedron</source>
+        <translation>Remplacer hexaèdre</translation>
+    </message>
+    <message>
+        <source>Quad revolution</source>
+        <translation>Révolution</translation>
+    </message>
+    <message>
+        <source>Quad Revolution</source>
+        <translation>Révolution</translation>
+    </message>
+    <message>
+        <source>Make vertex association</source>
+        <translation>Associer des sommets</translation>
+    </message>
+    <message>
+        <source>Make Vertex association</source>
+        <translation>Associer sommets</translation>
+    </message>
+    <message>
+        <source>Make edge association</source>
+        <translation>Associer des arêtes</translation>
+    </message>
+    <message>
+        <source>Make Edge Association</source>
+        <translation>Associer arêtes</translation>
+    </message>
+    <message>
+        <source>Make quadrangle association</source>
+        <translation>Associer des quadrangles</translation>
+    </message>
+    <message>
+        <source>Make Quadrangle Association</source>
+        <translation>Associer quadrangles</translation>
+    </message>
+    <message>
+        <source>Add a group</source>
+        <translation>Ajouter un groupe</translation>
+    </message>
+    <message>
+        <source>Add Group</source>
+        <translation>Ajouter groupe</translation>
+    </message>
+    <message>
+        <source>Remove a group</source>
+        <translation>Supprimer un groupe</translation>
+    </message>
+    <message>
+        <source>Remove Group</source>
+        <translation>Supprimer groupe</translation>
+    </message>
+    <message>
+        <source>Add a law</source>
+        <translation>Ajouter une loi</translation>
+    </message>
+    <message>
+        <source>Add Law</source>
+        <translation>Ajouter loi</translation>
+    </message>
+    <message>
+        <source>Remove a law</source>
+        <translation>Supprimer une loi</translation>
+    </message>
+    <message>
+        <source>Remove Law</source>
+        <translation>Supprimer loi</translation>
+    </message>
+    <message>
+        <source>Set propagation</source>
+        <translation>Propager une loi de discrétisation</translation>
+    </message>
+    <message>
+        <source>Set Propagation</source>
+        <translation>Propager loi</translation>
+    </message>
+    <message>
+        <source>Compute mesh</source>
+        <translation>Calculer</translation>
+    </message>
+    <message>
+        <source>Compute Mesh</source>
+        <translation>Calculer</translation>
+    </message>
+    <message>
+        <source>HEXABLOCK</source>
+        <translation>HexaBlock</translation>
+    </message>
+    <message>
+        <source>Document</source>
+        <translation>Document</translation>
+    </message>
+    <message>
+        <source>Model</source>
+        <translation>Modèle</translation>
+    </message>
+    <message>
+        <source>Association</source>
+        <translation>Association</translation>
+    </message>
+    <message>
+        <source>Groups</source>
+        <translation>Groupes</translation>
+    </message>
+    <message>
+        <source>Mesh</source>
+        <translation>Maillage</translation>
+    </message>
+    <message>
+        <source>HexaBlock Toolbar</source>
+        <translation>Barre d&apos;outils de HexaBlock</translation>
+    </message>
+    <message>
+        <source>Open HexaBlock Document</source>
+        <translation>Ouvrir un document HexaBlock</translation>
+    </message>
+    <message>
+        <source>XML-Files (*.xml);;All Files (*)</source>
+        <translation>Fichiers XML (*.xml);;Tous les fichiers (*)</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE %1</source>
+        <translation>Impossible de supprimer %1</translation>
+    </message>
+    <message>
+        <source>HEXA_INFO</source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>GROUP REMOVED</source>
+        <translation>Groupe supprimé</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE GROUP</source>
+        <translation>Impossible de supprimer le groupe</translation>
+    </message>
+    <message>
+        <source>LAW REMOVED</source>
+        <translation>Loi supprimée</translation>
+    </message>
+    <message>
+        <source>CANNOT REMOVE LAW</source>
+        <translation>Impossible de supprimer la loi</translation>
+    </message>
+    <message>
+        <source>PLEASE SELECT A PROPAGATION</source>
+        <translation>Veuillez choisir une propagation</translation>
+    </message>
+    <message>
+        <source>ASSOCIATION CLEARED</source>
+        <translation>Association supprimée</translation>
+    </message>
+    <message>
+        <source>Save HexaBlock Document</source>
+        <translation>Enregistrer le document HexaBlock</translation>
+    </message>
+    <message>
+        <source>ICON_NEW_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_LOAD_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_SAVE_DOCUMENT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_VERTEX</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_VECTOR</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_CYLINDER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_PIPE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_GRID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_CYLINDER</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_PIPE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_CYLINDERS</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_PIPES</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_HEMISPHERE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PRISM_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_JOIN_QUAD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MERGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_DISCONNECT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_CUT_EDGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_TRANSFORMATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_MAKE_SYMMETRY</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PERFORM_TRANSFORMATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_PERFORM_SYMMETRY</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REPLACE_HEXA</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_QUAD_REVOLUTION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_VERTEX_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_EDGE_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_QUAD_ASSOCIATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_GROUP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_GROUP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_ADD_LAW</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_REMOVE_LAW</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_SET_PROPAGATION</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>ICON_COMPUTE_MESH</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>MEN_FILE</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>MyGEOMBase_Skeleton</name>
+    <message>
+        <source>GEOM_RESULT_NAME_GRP</source>
+        <translation>Nom du résultat</translation>
+    </message>
+    <message>
+        <source>GEOM_RESULT_NAME_LBL</source>
+        <translation>Nom</translation>
+    </message>
+    <message>
+        <source>GEOM_PUBLISH_RESULT_GRP</source>
+        <translation>Options avancées</translation>
+    </message>
+    <message>
+        <source>GEOM_RESTORE_SUB_SHAPES</source>
+        <translation>Récupérer les groupes et les sous-objets</translation>
+    </message>
+    <message>
+        <source>GEOM_RSS_ADD_FREFIX</source>
+        <translation>Ajouter un préfixe aux noms des sous-objets restaurés</translation>
+    </message>
+    <message>
+        <source>GEOM_PREVIEW</source>
+        <translation>Prévisualiser</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_CLOSE</source>
+        <translation>Fermer</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_APPLY_AND_CLOSE</source>
+        <translation>Appliquer et fermer</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_APPLY</source>
+        <translation>Appliquer</translation>
+    </message>
+    <message>
+        <source>GEOM_BUT_HELP</source>
+        <translation>Aide</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <source>XML_FILES_FILTER</source>
+        <translation>Fichiers XML</translation>
+    </message>
+    <message>
+        <source>ALL_FILES_FILTER</source>
+        <translation>Tous les fichiers</translation>
+    </message>
+    <message>
+        <source>WRN_WARNING</source>
+        <translation>Attention</translation>
+    </message>
+    <message>
+        <source>EXTERNAL_BROWSER_CANNOT_SHOW_PAGE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>BUT_OK</source>
+        <translation>OK</translation>
+    </message>
+    <message>
+        <source>WRN_STUDY_LOCKED</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRP_DONE</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRP_ABORT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_ERROR_STATUS</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_INCORRECT_INPUT</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>GEOM_VERTEX</source>
+        <translation>Sommet</translation>
+    </message>
+    <message>
+        <source>GEOM_EDGE</source>
+        <translation>Arête</translation>
+    </message>
+    <message>
+        <source>GEOM_WIRE</source>
+        <translation>Contour</translation>
+    </message>
+    <message>
+        <source>GEOM_FACE</source>
+        <translation>Face</translation>
+    </message>
+    <message>
+        <source>GEOM_SHELL</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_SOLID</source>
+        <translation>Solide</translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUNDSOLID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_COMPOUND</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>GEOM_PRECISION_HINT</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
diff --git a/src/HEXABLOCKGUI/resources/ModuleHexablock.png b/src/HEXABLOCKGUI/resources/ModuleHexablock.png
new file mode 100755 (executable)
index 0000000..84d4eb1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/ModuleHexablock.png differ
diff --git a/src/HEXABLOCKGUI/resources/SalomeApp.xml.in b/src/HEXABLOCKGUI/resources/SalomeApp.xml.in
new file mode 100755 (executable)
index 0000000..f4a4691
--- /dev/null
@@ -0,0 +1,38 @@
+<!--
+  Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library 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
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http:www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+-->
+<document>
+  <section name="HEXABLOCK">
+    <!-- Major module parameters -->
+    <parameter name="name"          value="HexaBlock"/>
+    <parameter name="icon"          value="ModuleHexablock.png"/>
+    <parameter name="version"       value="@VERSION@"/>        
+    <parameter name="documentation" value="hexablock_help"/>
+  </section>
+  <section name="hexablock_help" >
+    <parameter name="sub_menu"          value="%1 module"/>
+    <parameter name="User's Guide"      value="${HEXABLOCK_ROOT_DIR}/share/doc/salome/gui/HEXABLOCK/index.html"/>
+  </section>
+  <section name="resources">
+    <!-- Module resources -->
+    <parameter name="HEXABLOCK" value="${HEXABLOCK_ROOT_DIR}/share/salome/resources/hexablock"/>
+  </section>
+</document>
diff --git a/src/HEXABLOCKGUI/resources/add_cylinder.png b/src/HEXABLOCKGUI/resources/add_cylinder.png
new file mode 100644 (file)
index 0000000..b982e25
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_cylinder.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_edge.png b/src/HEXABLOCKGUI/resources/add_edge.png
new file mode 100644 (file)
index 0000000..33e8ed7
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_edge.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_group.png b/src/HEXABLOCKGUI/resources/add_group.png
new file mode 100644 (file)
index 0000000..fcb484c
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_group.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_hexa.png b/src/HEXABLOCKGUI/resources/add_hexa.png
new file mode 100644 (file)
index 0000000..861343b
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_hexa.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_law.png b/src/HEXABLOCKGUI/resources/add_law.png
new file mode 100644 (file)
index 0000000..6bd1db6
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_law.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_pipe.png b/src/HEXABLOCKGUI/resources/add_pipe.png
new file mode 100644 (file)
index 0000000..5c562a9
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_pipe.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_quad.png b/src/HEXABLOCKGUI/resources/add_quad.png
new file mode 100644 (file)
index 0000000..84c4867
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_quad.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_vector.png b/src/HEXABLOCKGUI/resources/add_vector.png
new file mode 100644 (file)
index 0000000..feecb59
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_vector.png differ
diff --git a/src/HEXABLOCKGUI/resources/add_vertex.png b/src/HEXABLOCKGUI/resources/add_vertex.png
new file mode 100644 (file)
index 0000000..60e7957
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/add_vertex.png differ
diff --git a/src/HEXABLOCKGUI/resources/assoc_edge.png b/src/HEXABLOCKGUI/resources/assoc_edge.png
new file mode 100644 (file)
index 0000000..6990fcf
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/assoc_edge.png differ
diff --git a/src/HEXABLOCKGUI/resources/assoc_quad.png b/src/HEXABLOCKGUI/resources/assoc_quad.png
new file mode 100644 (file)
index 0000000..24dad63
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/assoc_quad.png differ
diff --git a/src/HEXABLOCKGUI/resources/assoc_vertex.png b/src/HEXABLOCKGUI/resources/assoc_vertex.png
new file mode 100644 (file)
index 0000000..334473d
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/assoc_vertex.png differ
diff --git a/src/HEXABLOCKGUI/resources/build_wire.png b/src/HEXABLOCKGUI/resources/build_wire.png
new file mode 100755 (executable)
index 0000000..52d8ff8
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/build_wire.png differ
diff --git a/src/HEXABLOCKGUI/resources/compute_mesh.png b/src/HEXABLOCKGUI/resources/compute_mesh.png
new file mode 100644 (file)
index 0000000..9b485e9
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/compute_mesh.png differ
diff --git a/src/HEXABLOCKGUI/resources/cut_edge.png b/src/HEXABLOCKGUI/resources/cut_edge.png
new file mode 100644 (file)
index 0000000..b460f73
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/cut_edge.png differ
diff --git a/src/HEXABLOCKGUI/resources/disconnect.png b/src/HEXABLOCKGUI/resources/disconnect.png
new file mode 100644 (file)
index 0000000..8eaba52
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/disconnect.png differ
diff --git a/src/HEXABLOCKGUI/resources/join_quad.png b/src/HEXABLOCKGUI/resources/join_quad.png
new file mode 100644 (file)
index 0000000..187cf8c
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/join_quad.png differ
diff --git a/src/HEXABLOCKGUI/resources/line.png b/src/HEXABLOCKGUI/resources/line.png
new file mode 100755 (executable)
index 0000000..6176fb6
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/line.png differ
diff --git a/src/HEXABLOCKGUI/resources/load_document.png b/src/HEXABLOCKGUI/resources/load_document.png
new file mode 100755 (executable)
index 0000000..ccb7377
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/load_document.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_cylinder.png b/src/HEXABLOCKGUI/resources/make_cylinder.png
new file mode 100644 (file)
index 0000000..1f2b6dc
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_cylinder.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_cylinders.png b/src/HEXABLOCKGUI/resources/make_cylinders.png
new file mode 100644 (file)
index 0000000..f4a579f
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_cylinders.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_grid.png b/src/HEXABLOCKGUI/resources/make_grid.png
new file mode 100644 (file)
index 0000000..7497d76
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_grid.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_hemisphere.png b/src/HEXABLOCKGUI/resources/make_hemisphere.png
new file mode 100644 (file)
index 0000000..9277d35
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_hemisphere.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_pipe.png b/src/HEXABLOCKGUI/resources/make_pipe.png
new file mode 100644 (file)
index 0000000..04fe38f
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_pipe.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_pipes.png b/src/HEXABLOCKGUI/resources/make_pipes.png
new file mode 100644 (file)
index 0000000..e005070
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_pipes.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_symmetry.png b/src/HEXABLOCKGUI/resources/make_symmetry.png
new file mode 100644 (file)
index 0000000..8f29775
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_symmetry.png differ
diff --git a/src/HEXABLOCKGUI/resources/make_transformation.png b/src/HEXABLOCKGUI/resources/make_transformation.png
new file mode 100644 (file)
index 0000000..b595304
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/make_transformation.png differ
diff --git a/src/HEXABLOCKGUI/resources/merge.png b/src/HEXABLOCKGUI/resources/merge.png
new file mode 100644 (file)
index 0000000..daf2951
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/merge.png differ
diff --git a/src/HEXABLOCKGUI/resources/new_document.png b/src/HEXABLOCKGUI/resources/new_document.png
new file mode 100755 (executable)
index 0000000..d0c02e1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/new_document.png differ
diff --git a/src/HEXABLOCKGUI/resources/perform__transformation.png b/src/HEXABLOCKGUI/resources/perform__transformation.png
new file mode 100644 (file)
index 0000000..7905fa1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/perform__transformation.png differ
diff --git a/src/HEXABLOCKGUI/resources/perform_symmetry.png b/src/HEXABLOCKGUI/resources/perform_symmetry.png
new file mode 100644 (file)
index 0000000..e33daed
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/perform_symmetry.png differ
diff --git a/src/HEXABLOCKGUI/resources/perform_transformation.png b/src/HEXABLOCKGUI/resources/perform_transformation.png
new file mode 100644 (file)
index 0000000..b781662
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/perform_transformation.png differ
diff --git a/src/HEXABLOCKGUI/resources/point2.png b/src/HEXABLOCKGUI/resources/point2.png
new file mode 100755 (executable)
index 0000000..bdd5659
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/point2.png differ
diff --git a/src/HEXABLOCKGUI/resources/point3.png b/src/HEXABLOCKGUI/resources/point3.png
new file mode 100755 (executable)
index 0000000..de84d96
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/point3.png differ
diff --git a/src/HEXABLOCKGUI/resources/point_line_intersection.png b/src/HEXABLOCKGUI/resources/point_line_intersection.png
new file mode 100755 (executable)
index 0000000..82071b1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/point_line_intersection.png differ
diff --git a/src/HEXABLOCKGUI/resources/pointonedge.png b/src/HEXABLOCKGUI/resources/pointonedge.png
new file mode 100755 (executable)
index 0000000..a6541d8
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/pointonedge.png differ
diff --git a/src/HEXABLOCKGUI/resources/pointonface.png b/src/HEXABLOCKGUI/resources/pointonface.png
new file mode 100755 (executable)
index 0000000..fa0f8cb
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/pointonface.png differ
diff --git a/src/HEXABLOCKGUI/resources/prism_quad.png b/src/HEXABLOCKGUI/resources/prism_quad.png
new file mode 100644 (file)
index 0000000..99c9177
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/prism_quad.png differ
diff --git a/src/HEXABLOCKGUI/resources/quad_revolution.png b/src/HEXABLOCKGUI/resources/quad_revolution.png
new file mode 100644 (file)
index 0000000..81f5d46
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/quad_revolution.png differ
diff --git a/src/HEXABLOCKGUI/resources/remove_group.png b/src/HEXABLOCKGUI/resources/remove_group.png
new file mode 100644 (file)
index 0000000..1fc5b80
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/remove_group.png differ
diff --git a/src/HEXABLOCKGUI/resources/remove_hexa.png b/src/HEXABLOCKGUI/resources/remove_hexa.png
new file mode 100644 (file)
index 0000000..02b7a10
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/remove_hexa.png differ
diff --git a/src/HEXABLOCKGUI/resources/remove_law.png b/src/HEXABLOCKGUI/resources/remove_law.png
new file mode 100644 (file)
index 0000000..3ceacd8
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/remove_law.png differ
diff --git a/src/HEXABLOCKGUI/resources/replace_hexa.png b/src/HEXABLOCKGUI/resources/replace_hexa.png
new file mode 100644 (file)
index 0000000..2aa297c
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/replace_hexa.png differ
diff --git a/src/HEXABLOCKGUI/resources/save_document.png b/src/HEXABLOCKGUI/resources/save_document.png
new file mode 100755 (executable)
index 0000000..7491f8d
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/save_document.png differ
diff --git a/src/HEXABLOCKGUI/resources/select1.png b/src/HEXABLOCKGUI/resources/select1.png
new file mode 100755 (executable)
index 0000000..ecb252a
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/select1.png differ
diff --git a/src/HEXABLOCKGUI/resources/set_propagation.png b/src/HEXABLOCKGUI/resources/set_propagation.png
new file mode 100644 (file)
index 0000000..69a88a1
Binary files /dev/null and b/src/HEXABLOCKGUI/resources/set_propagation.png differ
diff --git a/src/HEXABLOCK_I/HEXABLOCK.cxx b/src/HEXABLOCK_I/HEXABLOCK.cxx
new file mode 100755 (executable)
index 0000000..8959a5e
--- /dev/null
@@ -0,0 +1,833 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+
+
+static bool db = false;
+
+
+
+// #include <Basics_Utils.hxx>
+// 
+// #include <TDF_Tool.hxx>
+// #include <TDF_Data.hxx>
+// #include <TDF_Reference.hxx>
+// #include <TDF_LabelSequence.hxx>
+// #include <TDataStd_Integer.hxx>
+// #include <TDataStd_ChildNodeIterator.hxx>
+// #include <TFunction_Driver.hxx>
+// #include <TFunction_DriverTable.hxx>
+// #include <TDataStd_HArray1OfByte.hxx>
+// #include <TDataStd_ByteArray.hxx>
+// #include <TDataStd_UAttribute.hxx>
+// #include <TDF_ChildIterator.hxx>
+// #include <TDataStd_Comment.hxx>
+// #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
+
+////////////
+
+
+
+
+
+
+#include <TCollection_AsciiString.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+
+
+#include <Geom_Curve.hxx>
+
+#include <gp_Pnt.hxx>
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
+
+#include "SALOME_NamingService.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "Utils_ExceptHandlers.hxx"
+#include "HexElements_grid.cxx"
+
+
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include "HexDocument_impl.hxx"
+#include <string>
+
+// #include "SALOMEDS_Tool.hxx"
+// #include "SALOMEDSImpl_TMPFile.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+
+// Static variables definition
+PortableServer::POA_var HEXABLOCK_Gen_i::_poa;
+HEXABLOCK_Gen_i*        HEXABLOCK_Gen_i::_HEXABLOCKGen = NULL;
+SALOME_LifeCycleCORBA*  HEXABLOCK_Gen_i::_lcc = NULL;
+GEOM::GEOM_Gen_var      HEXABLOCK_Gen_i::_geomGen = GEOM::GEOM_Gen::_nil();
+// GEOM_Client*            HEXABLOCK_Gen_i::_geomClient = NULL;
+CORBA::ORB_var          HEXABLOCK_Gen_i::_orb;
+SALOME_NamingService*   HEXABLOCK_Gen_i::_ns = NULL;
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+
+HEXABLOCK_Gen_i::HEXABLOCK_Gen_i(CORBA::ORB_ptr orb,
+       PortableServer::POA_ptr poa,
+       PortableServer::ObjectId * contId, 
+       const char *instanceName, 
+       const char *interfaceName) :
+  Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+{
+  MESSAGE("activate object");
+  _thisObj = this ;
+  _poa = PortableServer::POA::_duplicate(poa);
+  _orb = CORBA::ORB::_duplicate(orb);
+  _id = _poa->activate_object(_thisObj);
+  _engine_cpp = new HEXA_NS::Hex;
+  _geomClient = NULL;
+  _HEXABLOCKGen = this;
+  MESSAGE("ALRRRRRIGHTTTTT");
+}
+
+//=============================================================================
+/*!
+ *  GetServant [ static ]
+ *
+ *  Get servant of the CORBA object
+ */
+//=============================================================================
+
+PortableServer::ServantBase_var HEXABLOCK_Gen_i::GetServant( CORBA::Object_ptr theObject )
+{
+  if( CORBA::is_nil( theObject ) || CORBA::is_nil( GetPOA() ) )
+    return NULL;
+  try {
+    PortableServer::Servant aServant = GetPOA()->reference_to_servant( theObject );
+    return aServant;
+  } 
+  catch (...) {
+    INFOS( "GetServant - Unknown exception was caught!!!" ); 
+    return NULL;
+  }
+}
+
+
+
+//=============================================================================
+//  destructor
+//=============================================================================
+HEXABLOCK_Gen_i::~HEXABLOCK_Gen_i()
+{
+}
+
+
+
+
+//=============================================================================
+/*!
+ *  DumpPython
+ */
+//=============================================================================
+Engines::TMPFile* HEXABLOCK_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
+                                             CORBA::Boolean /*isPublished*/,
+                                             CORBA::Boolean /*isMultiFile*/,
+                                             CORBA::Boolean& isValidScript)
+{
+  MESSAGE("DumpPython DumpPython DumpPython DumpPython");
+  std::cout << "DumpPython DumpPython DumpPython DumpPython" << std::endl;
+  isValidScript = true;  // to avoid dump python operation failing
+  Engines::TMPFile_var aStreamFile = new Engines::TMPFile(0);
+  return aStreamFile._retn(); 
+}
+//   SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
+//   if(CORBA::is_nil(aStudy))
+//     return new Engines::TMPFile(0);   
+// 
+//   SALOMEDS::SObject_var aSO = aStudy->FindComponent(ComponentDataType());
+//   if(CORBA::is_nil(aSO))
+//     return new Engines::TMPFile(0);  
+// 
+//   TObjectData objData;
+//   std::vector<TObjectData> objectDataVec;
+// 
+//   TVariablesList aVariableMap;
+// 
+//   SALOMEDS::ChildIterator_var Itr = aStudy->NewChildIterator(aSO);
+//   for(Itr->InitEx(true); Itr->More(); Itr->Next()) {
+//     SALOMEDS::SObject_var aValue = Itr->Value();
+//     CORBA::String_var IOR = aValue->GetIOR();
+//     if(strlen(IOR.in()) > 0) {
+//       CORBA::Object_var obj = _orb->string_to_object(IOR);
+//       GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_narrow(obj);
+//       if(!CORBA::is_nil(GO)) {
+//         CORBA::String_var aName       = aValue->GetName();
+//         CORBA::String_var anEntry     = GO->GetEntry();
+//         CORBA::String_var aStudyEntry = aValue->GetID();
+//         objData._name       = aName.in();
+//         objData._entry      = anEntry.in();
+//         objData._studyEntry = aStudyEntry.in();
+//     objectDataVec.push_back( objData );
+// 
+//     //Find attribute with list of used notebook variables
+//     SALOMEDS::GenericAttribute_var anAttr;
+//     SALOMEDS::AttributeString_var anAttrStr;
+//     if(aValue->FindAttribute(anAttr,"AttributeString")){
+//       anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
+//       SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value());
+//       ObjectStates* aStates = new ObjectStates();
+//       for(int i = 0; i < aSections->length(); i++) {
+//         TState aState;
+//         SALOMEDS::ListOfStrings aListOfVars = aSections[i];
+//         for(int j = 0; j < aListOfVars.length(); j++) {
+//           bool isVar = aStudy->IsVariable(aListOfVars[j].in());
+//           TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar );
+//           aState.push_back(aVar);
+//         }
+//         aStates->AddState(aState);
+//       }
+//       aVariableMap.insert(std::make_pair(TCollection_AsciiString(anEntry),aStates));
+//     }
+//       }
+//     }
+//   }
+//   
+//   TCollection_AsciiString aScript;
+//   aScript += _impl->DumpPython(aStudy->StudyId(), objectDataVec, aVariableMap, isPublished, isValidScript);
+// 
+//   if (isPublished)
+//   {
+//     //Output the script that sets up the visual parameters.
+//     char* script = aStudy->GetDefaultScript(ComponentDataType(), "\t");
+//     if (script && strlen(script) > 0) {
+//       aScript += "\n\t### Store presentation parameters of displayed objects\n";
+//       aScript += script;
+//       CORBA::string_free(script);
+//     }
+//   }
+// 
+//   aScript += "\n\tpass\n";
+// 
+//   int aLen = aScript.Length(); 
+//   unsigned char* aBuffer = new unsigned char[aLen+1];
+//   strcpy((char*)aBuffer, aScript.ToCString());
+// 
+//   CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
+//   Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); 
+// 
+//   return aStreamFile._retn(); 
+// }
+
+
+
+
+void HEXABLOCK_Gen_i::test()
+{
+  MESSAGE("HEEEEEEEEEEEEEEYYYYYYYYYYY");
+}
+
+CORBA::Long HEXABLOCK_Gen_i::countDocument()
+{
+    CORBA::Long nbDocument = _engine_cpp->countDocument();
+//     CORBA::Long nbDocument = 333;
+    return nbDocument;
+}
+
+Document_ptr HEXABLOCK_Gen_i::getDocument(CORBA::Long i)
+{
+    HEXA_NS::Document *doc=_engine_cpp->getDocument(i);
+    if ( doc == NULL ) return Document::_nil();
+    Document_impl *servantCorba = new Document_impl( GetPOA(), doc );
+    return servantCorba->_this();
+}
+
+void HEXABLOCK_Gen_i::removeDocument(HEXABLOCK_ORB::Document_ptr docIn)
+{
+  Document_impl* docServant = ::DownCast<Document_impl*>( docIn );
+  ASSERT( docServant );
+  if ( docServant ) {
+    HEXA_NS::Document* doc = docServant->GetImpl();
+    _engine_cpp->removeDocument( doc );
+  }
+}
+
+
+Document_ptr HEXABLOCK_Gen_i::addDocument(const char* name)
+{
+   // HEXA_NS::Document *doc=_engine_cpp->addDocument (name);
+   // Document_impl *servantCorba=new Document_impl( GetPOA(), doc);
+   // return servantCorba->_this();
+
+   return createDocInStudy(name);
+}
+
+
+
+Document_ptr HEXABLOCK_Gen_i::loadDocument(const char* xmlFilename)
+{
+    HEXA_NS::Document *doc=_engine_cpp->loadDocument(xmlFilename);
+    Document_impl *servantCorba=new Document_impl( GetPOA(), doc );
+    return servantCorba->_this();
+}
+
+GEOM_Client* HEXABLOCK_Gen_i::getGeomClient()
+{
+  // create shape reader if necessary
+  if ( _geomClient == NULL ) 
+    _geomClient = new GEOM_Client(GetContainerRef());
+  ASSERT( _geomClient);
+  return _geomClient;
+}
+
+
+TopoDS_Shape HEXABLOCK_Gen_i::geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject)
+{
+  TopoDS_Shape S;
+  if ( !theGeomObject->_is_nil() ){
+    _geomClient = getGeomClient();
+
+    if(CORBA::is_nil(_geomGen)) {
+      Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
+      _geomGen=GEOM::GEOM_Gen::_narrow(temp);
+    }
+    if ( _geomClient != NULL  && !_geomGen->_is_nil () )
+      S = _geomClient->GetShape( _geomGen, theGeomObject );
+  }
+  return S;
+}
+
+
+
+
+
+// HEXABLOCK_ORB::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   HEXABLOCK_ORB::GEOM_Object_var aShapeObj;
+//   if ( !theShape.IsNull() ) {
+//     _geomClient = getGeomClient();//new GEOM_Client(GetContainerRef());
+//     TCollection_AsciiString IOR;
+//     bool found = _geomClient->Find(theShape, IOR);
+//     if (found){
+//       CORBA::Object_var obj = _orb->string_to_object( IOR.ToCString() );
+//       aShapeObj = HEXABLOCK_ORB::GEOM_Object::_narrow ( obj );
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+
+
+// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeFace( const TopoDS_Shape& theShape )
+// {
+//   ASSERT ( theShape.ShapeType() == TopAbs_FACE );
+// 
+//   int theStudyID = 0;
+//   GEOM::GEOM_Object_var result; 
+//   
+// // PrimOp   = self.GetI3DPrimOperations 
+// // GEOM_IShapesOperations
+//   return result._retn();
+// }
+
+// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeEdge( const TopoDS_Shape& theShape )
+// {
+//   ASSERT ( theShape.ShapeType() == TopAbs_EDGE );
+//   int theStudyID = 0;
+//   GEOM::GEOM_Object_var result;
+//   GEOM::GEOM_Object_var p1;
+//   GEOM::GEOM_Object_var p2;
+// 
+//   if ( CORBA::is_nil(_geomGen) ) { //_geomGen->_is_nil() 
+//     Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
+//     _geomGen=GEOM::GEOM_Gen::_narrow(temp);
+//   }
+//   GEOM::GEOM_IBasicOperations_var     aBasicOp  = _geomGen->GetIBasicOperations(theStudyID);
+//   GEOM::GEOM_IShapesOperations_var    aShapesOp = _geomGen->GetIShapesOperations(theStudyID);
+// 
+//   TopoDS_Edge anEdge = TopoDS::Edge( theShape );
+//   double f, l;
+//   Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, f, l);
+// 
+//   gp_Pnt aCurveStart = aCurve->Value( f );
+//   gp_Pnt aCurveEnd   = aCurve->Value( l );
+// 
+//   double x1, y1, z1;
+//   double x2, y2, z2;
+// 
+//   x1 = aCurveStart.X(); y1 = aCurveStart.Y(); z1 = aCurveStart.Z();
+//   x2 = aCurveEnd.X();   y2 = aCurveEnd.Y(); z2 = aCurveEnd.Z();
+//   p1= aBasicOp->MakePointXYZ(x1, y1, z1);
+//   p2= aBasicOp->MakePointXYZ(x2, y2, z2);
+//   result = aShapesOp->MakeEdge(p1, p2);
+// 
+//   return result._retn();
+// }
+
+// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeVertex( const TopoDS_Shape& theShape )
+// {
+//   ASSERT ( theShape.ShapeType() == TopAbs_VERTEX );
+// 
+//   int theStudyID = 0;
+//   GEOM::GEOM_Object_var result;
+// 
+//   TopoDS_Vertex aPoint;
+//   aPoint      = TopoDS::Vertex( theShape );
+//   gp_Pnt aPnt = BRep_Tool::Pnt( aPoint );
+//   double x = aPnt.X();
+//   double y = aPnt.Y();
+//   double z = aPnt.Z();
+// 
+//   GEOM::GEOM_IBasicOperations_var aBasicOp = _geomGen->GetIBasicOperations(theStudyID);
+//   result = aBasicOp->MakePointXYZ(x, y, z);
+// 
+//   return result._retn();
+// }
+
+
+// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   std::cout << "XXXXXXXX shapeToGeomObject "<< std::endl;
+//   GEOM::GEOM_Object_var aShapeObj;
+//   if ( !theShape.IsNull() ) {
+//     switch ( theShape.ShapeType() ){
+//       case TopAbs_VERTEX: aShapeObj = _makeVertex( theShape ); break;
+// //       case TopAbs_FACE:   aShapeObj = _makeFace( theShape ); break; //CS_TODO
+//       case TopAbs_EDGE:   aShapeObj = _makeEdge( theShape ); break;
+//       default: throw (SALOME_Exception(LOCALIZED("shapeToGeomObject : shape type not supported")));
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+
+
+
+GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::brepToGeomObject(const std::string& theBrep)
+{
+  int theStudyID = 0; //CS_TODO
+  GEOM::GEOM_Object_var aShapeObj;
+
+  if ( CORBA::is_nil(_geomGen) ){
+    Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
+    _geomGen=GEOM::GEOM_Gen::_narrow(temp);
+  }
+  GEOM::GEOM_IInsertOperations_var aInsOp = _geomGen->GetIInsertOperations(theStudyID);
+
+  // char *tmpname = strdup("HexaAssocXXXXXX");   // killed by Abu 
+  char tmpname [32];                              // Abu 11/07
+  sprintf (tmpname, "/tmp/tmpHexaAsso%dXXXXXX", getpid()); // Abu 11/07
+  // strcpy (tmpname, "HexaAssocXXXXXX");   // killed by Abu 
+
+  int fd = mkstemp( tmpname );
+  if ( fd != -1 )
+     {
+     ofstream tmpfile( tmpname );
+     tmpfile << theBrep;
+     tmpfile.close();
+     aShapeObj = aInsOp->ImportFile( tmpname, "BREP" );
+     close(fd);
+     unlink(tmpname);
+     }
+
+  return aShapeObj._retn();
+}
+
+
+
+
+
+
+// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   GEOM::GEOM_Object_var aShapeObj;
+//   std::cout<<"shapeToGeomObject "<<std::endl;
+//   if ( !theShape.IsNull() ) {
+//     std::cout<<"shapeToGeomObject !theShape.IsNull()"<<std::endl;
+//     _geomClient = getGeomClient();//new GEOM_Client(GetContainerRef());
+//     TCollection_AsciiString IOR;
+//     bool found = _geomClient->Find(theShape, IOR);
+//     std::cout<<"shapeToGeomObject found"<<found<<std::endl;
+//     if (found){
+//       CORBA::Object_var obj = _orb->string_to_object( IOR.ToCString() );
+//       aShapeObj = GEOM::GEOM_Object::_narrow ( obj );
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+
+StudyContext* HEXABLOCK_Gen_i::GetCurrentStudyContext()
+{
+  if ( !CORBA::is_nil( myCurrentStudy ) &&
+      myStudyContextMap.find( GetCurrentStudyID() ) != myStudyContextMap.end() )
+    return myStudyContextMap[ myCurrentStudy->StudyId() ];
+  else
+    return 0;
+}
+
+int HEXABLOCK_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
+{
+  StudyContext* myStudyContext = GetCurrentStudyContext();
+  if ( myStudyContext && !CORBA::is_nil( theObject )) {
+    CORBA::String_var iorString = GetORB()->object_to_string( theObject );
+    return myStudyContext->addObject( string( iorString.in() ) );
+  }
+  return 0;
+}
+
+
+// SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
+//      throw ( SALOME::SALOME_Exception )
+
+
+char* HEXABLOCK_Gen_i::ComponentDataType()
+{
+//   if(MYDEBUG) MESSAGE( "HEXABLOCK_Gen_i::ComponentDataType" );
+  return CORBA::string_dup( "HEXABLOCK" );
+}
+
+
+
+// SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode)
+//   throw(SALOME_Exception)
+// {
+//   Unexpect aCatch(SalomeException);
+//   MESSAGE("SMESH_Gen::CreateMesh");
+// 
+//   // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
+//   StudyContextStruct *aStudyContext = GetStudyContext(theStudyId);
+// 
+//   // create a new SMESH_mesh object
+//   SMESH_Mesh *aMesh = new SMESH_Mesh(_localId++,
+//                                      theStudyId,
+//                                      this,
+//                                      theIsEmbeddedMode,
+//                                      aStudyContext->myDocument);
+//   aStudyContext->mapMesh[_localId] = aMesh;
+// 
+//   return aMesh;
+// }
+
+
+
+
+Document_ptr HEXABLOCK_Gen_i::createDoc (const char* name)
+                              throw ( SALOME::SALOME_Exception )
+{
+  Unexpect aCatch(SALOME_SalomeException);
+//   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::createMesh" );
+
+  // Get or create the GEOM_Client instance
+  try {
+    HEXA_NS::Document *d   = _engine_cpp->addDocument (name);
+    Document_impl *docImpl = new Document_impl( GetPOA(), d );
+
+    // activate the CORBA servant of Mesh
+    Document_var docServant = Document::_narrow( docImpl->_this() );
+    /* int nextId = */    RegisterObject( docServant );
+//     if(MYDEBUG) MESSAGE( "Add mesh to map with id = "<< nextId);
+    return docServant._retn();
+  }
+  catch (SALOME_Exception& S_ex) {
+//     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+  return Document::_nil();
+}
+
+Document_ptr HEXABLOCK_Gen_i::createDocInStudy (const char* name)
+                              throw ( SALOME::SALOME_Exception )
+{
+  Unexpect aCatch(SALOME_SalomeException);
+//   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" );
+  // create mesh
+  Document_var doc = this->createDoc (name);
+
+  // publish mesh in the study
+  if ( CanPublishInStudy( doc ) ) {
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    aStudyBuilder->NewCommand();  // There is a transaction
+    SALOMEDS::SObject_var aSO = PublishDoc( myCurrentStudy, doc.in() );
+    aStudyBuilder->CommitCommand();
+//     if ( !aSO->_is_nil() ) {
+//       // Update Python script
+//       TPythonDump() << aSO << " = " << this << ".CreateEmptyMesh()";
+//     }
+  }
+
+  return doc._retn();
+}
+
+
+
+
+SALOME_LifeCycleCORBA*  HEXABLOCK_Gen_i::GetLCC() {
+  if ( _lcc == NULL ) {
+    _lcc = new SALOME_LifeCycleCORBA( GetNS() );
+  }
+  return _lcc;
+}
+
+SALOME_NamingService* HEXABLOCK_Gen_i::GetNS()
+{
+  if ( _ns == NULL ) {
+    _ns = SINGLETON_<SALOME_NamingService>::Instance();
+    ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
+    _ns->init_orb( _orb );
+  }
+  return _ns;
+}
+
+
+
+int HEXABLOCK_Gen_i::GetCurrentStudyID()
+{
+  return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
+}
+
+
+void HEXABLOCK_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy )
+{
+  /*int curStudyId = */     GetCurrentStudyID();
+  myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy );
+  // create study context, if it doesn't exist and set current study
+  int studyId = GetCurrentStudyID();
+  if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) {
+    myStudyContextMap[ studyId ] = new StudyContext;
+  }
+
+//   // myCurrentStudy may be nil
+//   if ( !CORBA::is_nil( myCurrentStudy ) ) {
+//     SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+//     if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() )
+//       aStudyBuilder->LoadWith( myCurrentStudy->FindComponent( "GEOM" ), GetGeomEngine() );
+// 
+//     // NPAL16168, issue 0020210
+//     // Let meshes update their data depending on GEOM groups that could change
+//     if ( curStudyId != studyId )
+//     {
+//       //SALOMEDS::SComponent_var me =  PublishComponent( myCurrentStudy );
+//       SALOMEDS::SComponent_var me = SALOMEDS::SComponent::_narrow
+//         ( myCurrentStudy->FindComponent( ComponentDataType() ) );
+//       if ( !me->_is_nil() ) {
+//         SALOMEDS::ChildIterator_var anIter = myCurrentStudy->NewChildIterator( me );
+//         for ( ; anIter->More(); anIter->Next() ) {
+//           SALOMEDS::SObject_var so = anIter->Value();
+//           CORBA::Object_var    ior = SObjectToObject( so );
+//           if ( SMESH_Mesh_i*  mesh = SMESH::DownCast<SMESH_Mesh_i*>( ior ))
+//             mesh->CheckGeomGroupModif();
+//         }
+//       }
+//     }
+//   }
+}
+
+
+
+
+
+
+TopoDS_Shape string2shape( const string& brep )
+{
+  TopoDS_Shape shape;
+
+//   istringstream streamBrep(brep.c_str());
+  istringstream streamBrep(brep);
+//   char* chaine = new char[brep.size()];
+//   strcpy(chaine, brep.c_str()); 
+//   istringstream streamBrep( chaine );
+
+  BRep_Builder aBuilder;
+  BRepTools::Read(shape, streamBrep, aBuilder);
+//   BRepTools::Read(shape, brep, aBuilder);
+  return shape;
+}
+
+// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf )
+// {
+//   TopoDS_Shape shape;
+//   std::istrstream streamBrep(buf,sizebuf);
+//   BRep_Builder aBuilder;
+//   BRepTools::Read(shape, streamBrep, aBuilder);
+//   return(shape);
+// }
+
+// ===================================================== shape2string
+string shape2string( const TopoDS_Shape& aShape )
+{
+  ostringstream streamShape;
+//   string  strShape;
+  BRepTools::Write(aShape, streamShape);
+//   BRepTools::Write(aShape, strShape);
+
+  return streamShape.str();
+}
+// ===================================================== HEXABLOCKEngine_factory
+extern "C"
+{
+  PortableServer::ObjectId * HEXABLOCKEngine_factory(
+                              CORBA::ORB_ptr orb,
+                              PortableServer::POA_ptr poa, 
+                              PortableServer::ObjectId * contId,
+                              const char *instanceName, 
+                              const char *interfaceName)
+  {
+    MESSAGE("PortableServer::ObjectId * HEXABLOCKEngine_factory()");
+    SCRUTE(interfaceName);
+    HEXABLOCK_Gen_i *myHEXABLOCK 
+      = new HEXABLOCK_Gen_i(orb, poa, contId, instanceName, interfaceName);
+    return myHEXABLOCK->getId() ;
+  }
+}
+// ------------------------------------------------------------------------
+// 
+//                 Heritage de  SALOMEDSImpl_Driver
+//
+// ------------------------------------------------------------------------
+//
+/* ***********************************************************************
+// ========================================================= GetIOR
+std::string HEXABLOCK_Gen_i::GetIOR()
+{
+   return "";
+}
+   *********************************************************************** */
+// =========================================================== SaveASCII
+SALOMEDS::TMPFile* HEXABLOCK_Gen_i::SaveASCII (
+                                          const SALOMEDS::SComponent_ptr compo,
+                                          const char* theURL,
+                                          bool isMultiFile)
+{
+   SALOMEDS::TMPFile* fic =  Save (compo, theURL, isMultiFile);
+   return fic;
+}
+// =========================================================== LoadASCII
+CORBA::Boolean HEXABLOCK_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr compo,
+                           const SALOMEDS::TMPFile& theStream,
+                           const char* theURL,
+                           bool isMultiFile)
+{
+   bool rep = Load (compo, theStream, theURL, isMultiFile);
+   return rep;
+}
+// =========================================================== Close
+void HEXABLOCK_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "Close" << endl;
+}
+// =================================================== IORToLocalPersistentID
+char* HEXABLOCK_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                               const char* IORString,
+                               CORBA::Boolean isMultiFile,
+                               CORBA::Boolean isASCII)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "IORToLocalPersistentID" << endl;
+   static char empty [8] = "";
+   return empty;
+}
+// =================================================== LocalPersistentIDToIOR
+char* HEXABLOCK_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                               const char* aLocalPersistentID,
+                               CORBA::Boolean isMultiFile,
+                               CORBA::Boolean isASCII)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "LocalPersistentIDToIOR" << endl;
+   static char empty [8] = "";
+   return empty;
+}
+//   
+// =========================================================== CanCopy
+CORBA::Boolean HEXABLOCK_Gen_i::CanCopy (SALOMEDS::SObject_ptr theObject)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "CanCopy" << endl;
+   return false;
+}
+// =========================================================== CopyFrom
+SALOMEDS::TMPFile* HEXABLOCK_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, 
+                                             CORBA::Long& theObjectID)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "CopyFrom" << endl;
+   return NULL;
+}
+// =========================================================== CanPaste
+CORBA::Boolean HEXABLOCK_Gen_i:: CanPaste (const char* theComponentName, 
+                                           CORBA::Long theObjectID)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "CanPaste" << endl;
+   return false;
+}
+// =========================================================== PasteInto
+SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PasteInto(const SALOMEDS::TMPFile& fic,
+                                  CORBA::Long theObjectID,
+                                  SALOMEDS::SObject_ptr theObject)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "PasteInto" << endl;
+   return NULL;
+}
+// ======================================================== CanPublishInStudy
+// bool HEXABLOCK_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
+// {
+   // return NULL;
+// }
+// =========================================================== CanPaste
+SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PublishInStudy (SALOMEDS::Study_ptr stud,
+                                       SALOMEDS::SObject_ptr theSObject,
+                                       CORBA::Object_ptr theObject,
+                                       const char* theName) 
+        throw (SALOME::SALOME_Exception) 
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "PublishInStudy" << endl;
+   return NULL;
+}
+// =========================================================== Save
+SALOMEDS::TMPFile* HEXABLOCK_Gen_i::Save( 
+                                     const SALOMEDS::SComponent_ptr compo,
+                                     const char* theURL,
+                                     bool isMultiFile)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "Save" << endl;
+   return NULL;
+}
+// =========================================================== Load
+CORBA::Boolean HEXABLOCK_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
+                      const SALOMEDS::TMPFile& theStream,
+                      const char* theURL,
+                      bool isMultiFile)
+{
+   if (db) cout << " +++++++ Je suis passe par  HEXABLOCK_Gen_i::"
+        << "Load" << endl;
+
+   return false;
+}
diff --git a/src/HEXABLOCK_I/HEXABLOCK.hxx b/src/HEXABLOCK_I/HEXABLOCK.hxx
new file mode 100755 (executable)
index 0000000..6a7b164
--- /dev/null
@@ -0,0 +1,411 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef _HEXABLOCK_HXX_
+#define _HEXABLOCK_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HEXABLOCK_Gen)
+#include "SALOME_Component_i.hxx"
+//  #include "SALOMEDSImpl_TMPFile.hxx"
+//  #include "SALOMEDSImpl_SComponent.hxx"
+
+
+
+#include <sstream>
+
+
+#include <TopoDS_Shape.hxx>
+#include "GEOM_Client.hxx"
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class SALOME_LifeCycleCORBA;
+class SALOME_NamingService;
+
+
+
+
+
+// ===========================================================
+// Study context - stores study-connected objects references
+// ==========================================================
+class StudyContext
+{
+public:
+  // constructor
+  StudyContext() {}
+  // destructor
+  ~StudyContext()
+  {
+    mapIdToIOR.clear();
+    mapIdToId.clear();
+  }
+  // register object in the internal map and return its id
+  int addObject( string theIOR )
+  {
+    int nextId = getNextId();
+    mapIdToIOR[ nextId ]  = theIOR;
+    return nextId;
+  }
+  // find the object id in the internal map by the IOR
+  int findId( string theIOR )
+  {
+    map<int, string>::iterator imap;
+    for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) {
+      if ( imap->second == theIOR )
+        return imap->first;
+    }
+    return 0;
+  }
+  // get object's IOR by id
+  string getIORbyId( const int theId )
+  {
+    if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() )
+      return mapIdToIOR[ theId ];
+    return string( "" );
+  }
+  // get object's IOR by old id
+  string getIORbyOldId( const int theOldId )
+  {
+    if ( mapIdToId.find( theOldId ) != mapIdToId.end() )
+      return getIORbyId( mapIdToId[ theOldId ] );
+    return string( "" );
+  }
+  // maps old object id to the new one (used when restoring data)
+  void mapOldToNew( const int oldId, const int newId ) {
+    mapIdToId[ oldId ] = newId;
+  }
+  // get old id by a new one
+  int getOldId( const int newId ) {
+    map<int, int>::iterator imap;
+    for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) {
+      if ( imap->second == newId )
+        return imap->first;
+    }
+    return 0;
+  }
+
+private:
+  // get next free object identifier
+  int getNextId()
+  {
+    int id = 1;
+    while( mapIdToIOR.find( id ) != mapIdToIOR.end() )
+      id++;
+    return id;
+  }
+
+  map<int, string> mapIdToIOR;      // persistent-to-transient map
+  map<int, int>    mapIdToId;       // used to translate object from persistent to transient form
+};
+
+
+
+class HEXABLOCK_Gen_i: public POA_HEXABLOCK_ORB::HEXABLOCK_Gen,
+                       public Engines_Component_i 
+{
+public:
+    HEXABLOCK_Gen_i( CORBA::ORB_ptr orb,
+            PortableServer::POA_ptr poa,
+            PortableServer::ObjectId * contId, 
+            const char *instanceName, 
+            const char *interfaceName);
+  // Get object of the CORBA reference
+    static CORBA::ORB_var GetORB() { return _orb;}
+    static PortableServer::POA_var GetPOA() { return _poa;}
+    static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject );
+
+    virtual ~HEXABLOCK_Gen_i();
+
+    void test();
+    ::CORBA::Long countDocument();
+    Document_ptr getDocument(::CORBA::Long i);
+    void removeDocument(Document_ptr d); //CS_TODO
+    Document_ptr addDocument  (const char* name);
+    Document_ptr loadDocument (const char* xmlFilename);
+
+    GEOM_Client* getGeomClient();
+    TopoDS_Shape geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject);
+//     GEOM::GEOM_Object_ptr shapeToGeomObject(const TopoDS_Shape& theShape );
+    GEOM::GEOM_Object_ptr brepToGeomObject(const std::string& theBrep);
+    static SALOME_LifeCycleCORBA*  GetLCC();
+    static SALOME_NamingService* GetNS();
+    static HEXABLOCK_Gen_i* GetHEXABLOCKGen() { return _HEXABLOCKGen;}
+
+
+    virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
+                                         CORBA::Boolean isPublished,
+                                         CORBA::Boolean isMultiFile,
+                                         CORBA::Boolean& isValidScript);
+
+  void SetCurrentStudy( SALOMEDS::Study_ptr theStudy );
+  int GetCurrentStudyID();
+  StudyContext* GetCurrentStudyContext();
+  std::string /*void */SetName( SALOMEDS::SObject_ptr theSObject,
+                const char*           theName,
+                const char*           theDefaultName );
+  int   RegisterObject(CORBA::Object_ptr theObject);
+//   SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh() throw ( SALOME::SALOME_Exception )
+  char* ComponentDataType();
+  
+
+  bool CanPublishInStudy(CORBA::Object_ptr theIOR);
+  SALOMEDS::SComponent_ptr PublishComponent(SALOMEDS::Study_ptr theStudy);
+  static SALOMEDS::SObject_ptr ObjectToSObject(SALOMEDS::Study_ptr theStudy, CORBA::Object_ptr   theObject);
+  
+  SALOMEDS::SObject_ptr PublishDoc( SALOMEDS::Study_ptr   theStudy,
+                                    Document_ptr          theDoc,
+                                    const char*           theName = 0);
+
+
+
+  Document_ptr createDoc(const char* name) 
+               throw ( SALOME::SALOME_Exception );
+  Document_ptr createDocInStudy(const char* name)
+               throw ( SALOME::SALOME_Exception );
+
+  //-----------------------------------------------------------------------//
+  // Inherited methods from SALOMEDS::Driver                               //
+  //-----------------------------------------------------------------------//
+
+public :
+  SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
+                          const char* theURL,
+                          bool isMultiFile);
+
+  SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                               const char* theURL,
+                               bool isMultiFile);
+
+  CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
+                      const SALOMEDS::TMPFile& theStream,
+                      const char* theURL,
+                      bool isMultiFile);
+
+  CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
+                           const SALOMEDS::TMPFile& theStream,
+                           const char* theURL,
+                           bool isMultiFile);
+
+  void Close(SALOMEDS::SComponent_ptr theComponent);
+  // char* ComponentDataType();  Deja la 
+
+  CORBA::Boolean CanCopy  (SALOMEDS::SObject_ptr theObject);
+  CORBA::Boolean CanPaste (const char* theComponentName, 
+                           CORBA::Long theObjectID);
+
+  SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, 
+                              CORBA::Long& theObjectID);
+
+  SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
+                                  CORBA::Long theObjectID,
+                                  SALOMEDS::SObject_ptr theObject);
+  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
+                                       SALOMEDS::SObject_ptr theSObject,
+                                       CORBA::Object_ptr theObject,
+                                       const char* theName) throw (SALOME::SALOME_Exception) ;
+
+
+  char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                               const char* IORString,
+                               CORBA::Boolean isMultiFile,
+                               CORBA::Boolean isASCII);
+  char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                               const char* aLocalPersistentID,
+                               CORBA::Boolean isMultiFile,
+                               CORBA::Boolean isASCII);
+
+
+#if 0
+  virtual std::string GetIOR();
+
+  /*******************
+  virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& compo,
+                                     const std::string& theURL,
+                                     long& theStreamLength,
+                                     bool isMultiFile);
+
+  virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& compo,
+                                          const std::string& theURL,
+                                          long& theStreamLength,
+                                          bool isMultiFile);
+  *********************/
+  
+  virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
+                                  const char* theURL,
+                                  bool isMultiFile);
+
+
+  virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                               const char* theURL,
+                               bool isMultiFile);
+
+
+  
+  virtual bool Load(const SALOMEDSImpl_SComponent& compo,
+                    const unsigned char* theStream,
+                    const long theStreamLength,
+                    const std::string& theURL,
+                    bool isMultiFile);
+
+  virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent,
+                         const unsigned char* theStream,
+                         const long theStreamLength,
+                         const std::string& theURL,
+                         bool isMultiFile);
+
+  virtual void Close(const SALOMEDSImpl_SComponent& theComponent);
+  // virtual std::string ComponentDataType();
+
+  virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
+                                             const std::string& IORString,
+                                             bool isMultiFile,
+                                             bool isASCII);
+
+  virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject,
+                                             const std::string& aLocalPersistentID,
+                                             bool isMultiFile,
+                                             bool isASCII);
+
+  virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject);
+
+  virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject, 
+                                         int& theObjectID,
+                                         long& theStreamLength);
+  
+  virtual bool CanPaste(const std::string& theComponentName, int theObjectID);
+
+  virtual std::string PasteInto(const unsigned char* theStream,
+                                const long theStreamLength,
+                                int theObjectID,
+                                const SALOMEDSImpl_SObject& theObject);
+
+  virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy, 
+                                           bool isPublished, 
+                                           bool isMultiFile,
+                                           bool& isValidScript,
+                                           long& theStreamLength);
+#endif
+private :
+   HEXA_NS::Hex* _engine_cpp;
+   GEOM_Client*  _geomClient;
+
+
+  static PortableServer::POA_var _poa;// POA reference
+  static GEOM::GEOM_Gen_var      _geomGen;
+  static SALOME_LifeCycleCORBA*  _lcc;
+  static CORBA::ORB_var          _orb;
+  static SALOME_NamingService*   _ns;
+  static HEXABLOCK_Gen_i*        _HEXABLOCKGen;
+
+
+  GEOM::GEOM_Object_ptr _makeVertex( const TopoDS_Shape& theShape );
+  GEOM::GEOM_Object_ptr _makeEdge( const TopoDS_Shape& theShape );
+
+  map<int, StudyContext*>   myStudyContextMap;  // Map of study context objects
+  SALOMEDS::Study_var       myCurrentStudy;     // Current study
+
+};
+
+extern "C"
+    PortableServer::ObjectId * HEXABLOCKEngine_factory(
+      CORBA::ORB_ptr orb,
+      PortableServer::POA_ptr poa,
+      PortableServer::ObjectId * contId,
+      const char *instanceName,
+      const char *interfaceName
+    );
+
+
+template<class T>
+  T
+  DownCast(CORBA::Object_ptr theArg)
+  {
+    return dynamic_cast<T>(HEXABLOCK_Gen_i::GetServant(theArg).in());
+  }
+
+
+
+
+
+TopoDS_Shape string2shape( const string& brep );
+
+
+string shape2string( const TopoDS_Shape& aShape );
+
+
+
+
+#endif
+
+
+// 1) Séquence de code convertissant une chaîne au format BREP vers un TopoDS_Shape
+// 
+// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf )
+// {
+//   TopoDS_Shape shape;
+//   std::istrstream streamBrep(buf,sizebuf);
+//   BRep_Builder aBuilder;
+//   BRepTools::Read(shape, streamBrep, aBuilder);
+//   return(shape);
+// }
+// 
+// 2) Séquence de code convertissant un TopoDS_Shape en une chaîne au format BREP
+// 
+// char* SHAPE_TO_STRING( TopoDS_Shape aShape, int& sizebuf )
+// {
+//  ostrstream streamShape;
+//  BRepTools::Write(aShape, streamShape);
+//  sizebuf = streamShape.pcount();
+//  char* buf = new char [sizebuf];
+//  char* valueOfStream = streamShape.str();
+//  memcpy(buf, valueOfStream, size);
+//  return buf;
+// }
+// 
+// 3) Séquence de code accédant aux coordonnées d'un TopoDS_Shape qui est un Vertex
+// 
+// bool SHAPE_TO_COORD(TopoDS_Shape aShape, double& x, double& y, double& z)
+// {
+//   if ( aShape.ShapeType() == TopAbs_VERTEX ) {
+//       TopoDS_Vertex aPoint;
+//        aPoint = TopoDS::Vertex( aShape );
+//       gp_Pnt aPnt = BRep_Tool::Pnt( aPoint );
+//       x = aPnt.X();
+//       y = aPnt.Y();
+//       z = aPnt.Z();
+//        return(1);
+//    } else {
+//        return(0);
+//   };
+// }
+// 
+// 4) Séquence de code créant un TopoDS_Shape à partir de coordonnées
+// 
+// TopoDS_Shape COORD_TO_SHAPE(double x, double y, double z)
+// {
+//       gp_Pnt aPnt(x, y, z);
+//       BRepBuilderAPI_MakeVertex mkVertex (aPnt);
+//      TopoDS_Vertex aVertex = TopoDS::Vertex(mkVertex.Shape());
+//       return aVertex;
+// }
diff --git a/src/HEXABLOCK_I/HEXABLOCK_1.cxx b/src/HEXABLOCK_I/HEXABLOCK_1.cxx
new file mode 100644 (file)
index 0000000..26491b5
--- /dev/null
@@ -0,0 +1,1268 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#include "HEXABLOCK.hxx"
+// #include "SMESH_Mesh_i.hxx"
+// #include "SMESH_Hypothesis_i.hxx"
+// #include "SMESH_Algo_i.hxx"
+// #include "SMESH_Group_i.hxx"
+// #include "SMESH_subMesh_i.hxx"
+
+#include "SALOME_NamingService.hxx"
+
+#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
+
+#include "utilities.h"
+#include "Utils_ExceptHandlers.hxx"
+
+#include <TCollection_AsciiString.hxx>
+
+// #ifdef _DEBUG_
+// static int MYDEBUG = 0;
+// static int VARIABLE_DEBUG = 0;
+// #else
+// static int MYDEBUG = 0;
+// static int VARIABLE_DEBUG = 0;
+// #endif
+
+static int MYDEBUG = 1;
+
+
+using namespace HEXABLOCK_ORB;
+
+
+//=============================================================================
+/*!
+ *  Get...Tag [ static ]
+ *
+ *  Methods which determine SMESH data model structure
+ */
+//=============================================================================
+
+// long SMESH_Gen_i::GetHypothesisRootTag()
+// {
+//   return SMESH::Tag_HypothesisRoot;
+// }
+// 
+// long SMESH_Gen_i::GetAlgorithmsRootTag()
+// {
+//   return SMESH::Tag_AlgorithmsRoot;
+// }
+// 
+// long SMESH_Gen_i::GetRefOnShapeTag()
+// {
+//   return SMESH::Tag_RefOnShape;
+// }
+// 
+// long SMESH_Gen_i::GetRefOnAppliedHypothesisTag()
+// {
+//   return SMESH::Tag_RefOnAppliedHypothesis;
+// }
+// 
+// long SMESH_Gen_i::GetRefOnAppliedAlgorithmsTag()
+// {
+//   return SMESH::Tag_RefOnAppliedAlgorithms;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnVertexTag()
+// {
+//   return SMESH::Tag_SubMeshOnVertex;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnEdgeTag()
+// {
+//   return SMESH::Tag_SubMeshOnEdge;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnFaceTag()
+// {
+//   return SMESH::Tag_SubMeshOnFace;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnSolidTag()
+// {
+//   return SMESH::Tag_SubMeshOnSolid;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnCompoundTag()
+// {
+//   return SMESH::Tag_SubMeshOnCompound;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnWireTag()
+// {
+//   return SMESH::Tag_SubMeshOnWire;
+// }
+// 
+// long SMESH_Gen_i::GetSubMeshOnShellTag()
+// {
+//   return SMESH::Tag_SubMeshOnShell;
+// }
+// 
+// long SMESH_Gen_i::GetNodeGroupsTag()
+// {
+//   return SMESH::Tag_NodeGroups;
+// }
+// 
+// long SMESH_Gen_i::GetEdgeGroupsTag()
+// {
+//   return SMESH::Tag_EdgeGroups;
+// }
+// 
+// long SMESH_Gen_i::GetFaceGroupsTag()
+// {
+//   return SMESH::Tag_FaceGroups;
+// }
+// 
+// long SMESH_Gen_i::GetVolumeGroupsTag()
+// {
+//   return SMESH::Tag_VolumeGroups;
+// }
+// 
+// long SMESH_Gen_i::Get0DElementsGroupsTag()
+// {
+//   return SMESH::Tag_0DElementsGroups;
+// }
+
+
+//=============================================================================
+/*!
+ *  SMESH_Gen_i::CanPublishInStudy
+ *
+ *  Returns true if object can be published in the study
+ */
+//=============================================================================
+bool HEXABLOCK_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
+{
+  if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(myCurrentStudy));
+  if(CORBA::is_nil(myCurrentStudy))
+    return false;
+  
+  Document_var aDoc       = Document::_narrow(theIOR);
+  if( !aDoc->_is_nil() )
+    return true;
+
+//   SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow(theIOR);
+//   if( !aSubMesh->_is_nil() )
+//     return true;
+// 
+//   SMESH::SMESH_Hypothesis_var aHyp  = SMESH::SMESH_Hypothesis::_narrow(theIOR);
+//   if( !aHyp->_is_nil() )
+//     return true;
+// 
+//   SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(theIOR);
+//   if( !aGroup->_is_nil() )
+//     return true;
+
+  if(MYDEBUG) MESSAGE("CanPublishInStudy--CANT");
+  return false;
+}
+
+//=======================================================================
+//function : ObjectToSObject
+//purpose  : 
+//=======================================================================
+
+SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::ObjectToSObject( SALOMEDS::Study_ptr theStudy,
+                                                  CORBA::Object_ptr   theObject )
+{
+  SALOMEDS::SObject_var aSO;
+  if ( !CORBA::is_nil( theStudy ) && !CORBA::is_nil( theObject ))
+  {
+    CORBA::String_var objStr = HEXABLOCK_Gen_i::GetORB()->object_to_string( theObject );
+    aSO = theStudy->FindObjectIOR( objStr.in() );
+  }
+  return aSO._retn();
+}
+
+//=======================================================================
+//function : objectToServant
+//purpose  : 
+//=======================================================================
+
+// template<typename T> static inline T* objectToServant( CORBA::Object_ptr theIOR )
+// {
+//   return dynamic_cast<T*>( SMESH_Gen_i::GetServant( theIOR ).in() );
+// }
+
+//=======================================================================
+//function : ShapeToGeomObject
+//purpose  : 
+//=======================================================================
+
+// GEOM::GEOM_Object_ptr SMESH_Gen_i::ShapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   GEOM::GEOM_Object_var aShapeObj;
+//   if ( !theShape.IsNull() ) {
+//     GEOM_Client* aClient = GetShapeReader();
+//     TCollection_AsciiString IOR;
+//     if ( aClient && aClient->Find( theShape, IOR ))
+//     {
+//       CORBA::Object_var obj = GetORB()->string_to_object( IOR.ToCString() );
+//       aShapeObj = GEOM::GEOM_Object::_narrow ( obj );
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+//=======================================================================
+//function : GeomObjectToShape
+//purpose  : 
+//=======================================================================
+
+// TopoDS_Shape SMESH_Gen_i::GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject)
+// {
+//   TopoDS_Shape S;
+//   if ( !theGeomObject->_is_nil() ) {
+//     GEOM_Client* aClient = GetShapeReader();
+//     GEOM::GEOM_Gen_ptr aGeomEngine = GetGeomEngine();
+//     if ( aClient && !aGeomEngine->_is_nil () )
+//       S = aClient->GetShape( aGeomEngine, theGeomObject );
+//   }
+//   return S;
+// }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//=======================================================================
+//function : publish
+//purpose  : 
+//=======================================================================
+
+static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr   theStudy,
+                                     CORBA::Object_ptr     theIOR,
+                                     SALOMEDS::SObject_ptr theFatherObject,
+                                     const int             theTag = 0,
+                                     const char*           thePixMap = 0,
+                                     const bool            theSelectable = true)
+{
+  SALOMEDS::SObject_var SO = HEXABLOCK_Gen_i::ObjectToSObject( theStudy, theIOR );
+  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  if ( SO->_is_nil() ) {
+    if ( theTag == 0 )
+      SO = aStudyBuilder->NewObject( theFatherObject );
+    else if ( !theFatherObject->FindSubObject( theTag, SO ))
+      SO = aStudyBuilder->NewObjectToTag( theFatherObject, theTag );
+  }
+
+  SALOMEDS::GenericAttribute_var anAttr;
+  if ( !CORBA::is_nil( theIOR )) {
+    anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeIOR" );
+    CORBA::String_var objStr = HEXABLOCK_Gen_i::GetORB()->object_to_string( theIOR );
+    SALOMEDS::AttributeIOR::_narrow(anAttr)->SetValue( objStr.in() );
+  }
+
+  if ( thePixMap ) {
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( SO, "AttributePixMap" );
+    SALOMEDS::AttributePixMap_var pm = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    pm->SetPixMap( thePixMap );
+  }
+
+//   if ( !theSelectable ) {
+//     anAttr   = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeSelectable" );
+//     SALOMEDS::AttributeSelectable::_narrow( anAttr )->SetSelectable( false );
+//   }
+  return SO._retn();
+}
+
+
+//=======================================================================
+//function : setName
+//purpose  : 
+//=======================================================================
+std::string HEXABLOCK_Gen_i::SetName( SALOMEDS::SObject_ptr theSObject,
+                         const char*           theName,
+                         const char*           theDefaultName )
+{
+  std::string attrName;
+  if ( !theSObject->_is_nil() ) {
+    SALOMEDS::StudyBuilder_var aStudyBuilder = theSObject->GetStudy()->NewBuilder();
+    SALOMEDS::GenericAttribute_var anAttr =
+      aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" );
+    SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
+    if ( theName && strlen( theName ) != 0 )
+//       aNameAttr->SetValue( theName );
+      attrName = theName;
+    else {
+      CORBA::String_var curName = CORBA::string_dup( aNameAttr->Value() );
+      if ( strlen( curName ) == 0 ) {
+        TCollection_AsciiString aName( (char*) theDefaultName );
+        aName += TCollection_AsciiString("_") + TCollection_AsciiString( theSObject->Tag() );
+        attrName = aName.ToCString();
+//         aNameAttr->SetValue( aName.ToCString() );
+      }
+    }
+    aNameAttr->SetValue( attrName.c_str() );
+  }
+  return attrName;
+}
+
+//=======================================================================
+//function : SetPixMap
+//purpose  : 
+//=======================================================================
+// void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,
+//                             const char*           thePixMap)
+// {
+//   if ( !theSObject->_is_nil() && thePixMap && strlen( thePixMap ))
+//   {
+//     SALOMEDS::Study_var aStudy = theSObject->GetStudy();
+//     SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+//     SALOMEDS::GenericAttribute_var anAttr =
+//       aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributePixMap" );
+//     SALOMEDS::AttributePixMap_var aPMAttr = SALOMEDS::AttributePixMap::_narrow( anAttr );
+//     aPMAttr->SetPixMap( thePixMap );
+//   }
+// }
+
+//=======================================================================
+//function : addReference
+//purpose  : 
+//=======================================================================
+
+// static void addReference (SALOMEDS::Study_ptr   theStudy,
+//                           SALOMEDS::SObject_ptr theSObject,
+//                           CORBA::Object_ptr     theToObject,
+//                           int                   theTag = 0)
+// {
+//   SALOMEDS::SObject_var aToObjSO = SMESH_Gen_i::ObjectToSObject( theStudy, theToObject );
+//   if ( !aToObjSO->_is_nil() && !theSObject->_is_nil() ) {
+//     SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+//     SALOMEDS::SObject_var aReferenceSO;
+//     if ( !theTag ) {
+//       // check if the reference to theToObject already exists
+//       // and find a free label for the reference object
+//       bool isReferred = false;
+//       int tag = 1;
+//       SALOMEDS::ChildIterator_var anIter = theStudy->NewChildIterator( theSObject );
+//       for ( ; !isReferred && anIter->More(); anIter->Next(), ++tag ) {
+//         if ( anIter->Value()->ReferencedObject( aReferenceSO )) {
+//           if ( strcmp( aReferenceSO->GetID(), aToObjSO->GetID() ) == 0 )
+//             isReferred = true;
+//         }
+//         else if ( !theTag ) {
+//           SALOMEDS::GenericAttribute_var anAttr;
+//           if ( !anIter->Value()->FindAttribute( anAttr, "AttributeIOR" ))
+//             theTag = tag;
+//         }
+//       }
+//       if ( isReferred )
+//         return;
+//       if ( !theTag )
+//         theTag = tag;
+//     }
+//     if ( !theSObject->FindSubObject( theTag, aReferenceSO ))
+//       aReferenceSO = aStudyBuilder->NewObjectToTag( theSObject, theTag );
+//     aStudyBuilder->Addreference( aReferenceSO, aToObjSO );
+//   }
+// }
+
+//=============================================================================
+/*!
+ *  SMESH_Gen_i::PublishInStudy
+ *
+ *  Publish object in the study
+ */
+//=============================================================================
+
+// SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PublishInStudy( SALOMEDS::Study_ptr   theStudy,
+//                                                  SALOMEDS::SObject_ptr theSObject,
+//                                                  CORBA::Object_ptr     theIOR,
+//                                                  const char*           theName )
+//      throw (SALOME::SALOME_Exception)
+// {
+//   Unexpect aCatch(SALOME_SalomeException);
+//   SALOMEDS::SObject_var aSO;
+//   if ( CORBA::is_nil( theStudy ) || CORBA::is_nil( theIOR ))
+//     return aSO._retn();
+//   if(MYDEBUG) MESSAGE("PublishInStudy");
+// 
+//   // Publishing a mesh
+// //   SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR );
+//   HEXABLOCK_Gen_i::Document_var aDoc = HEXABLOCK_Gen_i::Document::_narrow( theIOR );
+//   if( !aDoc->_is_nil() )
+//     aSO = PublishDoc( theStudy, aDoc, theName );
+// 
+// //   // Publishing a sub-mesh
+// //   SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( theIOR );
+// //   if( aSO->_is_nil() && !aSubMesh->_is_nil() ) {
+// //     GEOM::GEOM_Object_var aShapeObject = aSubMesh->GetSubShape();
+// //     aMesh = aSubMesh->GetFather();
+// //     aSO = PublishSubMesh( theStudy, aMesh, aSubMesh, aShapeObject, theName );
+// //   }
+// // 
+// //   // Publishing a hypothesis or algorithm
+// //   SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( theIOR );
+// //   if ( aSO->_is_nil() && !aHyp->_is_nil() )
+// //     aSO = PublishHypothesis( theStudy, aHyp );
+// // 
+// //   // Publishing a group
+// //   SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(theIOR);
+// //   if ( aSO->_is_nil() && !aGroup->_is_nil() ) {
+// //     GEOM::GEOM_Object_var aShapeObject;
+// //     aMesh = aGroup->GetMesh();
+// //     aSO = PublishGroup( theStudy, aMesh, aGroup, aShapeObject, theName );
+// //   }
+//   if(MYDEBUG) MESSAGE("PublishInStudy_END");
+// 
+//   return aSO._retn();
+// }
+
+// =======================================================================
+// function : PublishComponent
+// purpose  : 
+// =======================================================================
+SALOMEDS::SComponent_ptr HEXABLOCK_Gen_i::PublishComponent(SALOMEDS::Study_ptr theStudy)
+{
+  if ( CORBA::is_nil( theStudy ))
+    return SALOMEDS::SComponent::_nil();
+  if(MYDEBUG) MESSAGE("PublishComponent");
+
+  SALOMEDS::SComponent_var father =
+    SALOMEDS::SComponent::_narrow( theStudy->FindComponent( ComponentDataType() ) );
+  if ( !CORBA::is_nil( father ) )
+    return father._retn();
+  MESSAGE("AAAAAAAAAAA");
+
+  SALOME_ModuleCatalog::ModuleCatalog_var aCat =
+    SALOME_ModuleCatalog::ModuleCatalog::_narrow( GetNS()->Resolve("/Kernel/ModulCatalog") );
+  if ( CORBA::is_nil( aCat ) )
+    return father._retn();
+  MESSAGE("BBBBBBBBBBB");
+
+  SALOME_ModuleCatalog::Acomponent_var aComp = aCat->GetComponent( ComponentDataType() );
+  if ( CORBA::is_nil( aComp ) )
+    return father._retn();
+  MESSAGE("CCCCCCCCCCC");
+
+  SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder(); 
+  SALOMEDS::GenericAttribute_var anAttr;
+  SALOMEDS::AttributePixMap_var  aPixmap;
+
+  father  = aStudyBuilder->NewComponent( ComponentDataType() );
+  aStudyBuilder->DefineComponentInstance( father, HEXABLOCK_Gen_i::_this() );
+//   aStudyBuilder->DefineComponentInstance( father, _orb->object_to_string( HEXABLOCK_Gen_i::_this() ) );
+
+//   MESSAGE("PublishComponent-- _orb->object_to_string( this ) =>"<< _orb->object_to_string( this ) );
+  MESSAGE("PublishComponent-- HEXABLOCK_Gen_i::_this() =>"<< HEXABLOCK_Gen_i::_this() );
+
+  anAttr  = aStudyBuilder->FindOrCreateAttribute( father, "AttributePixMap" );
+  aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+  aPixmap ->SetPixMap( "ICON_OBJBROWSER_HEXABLOCK" );
+  SetName( father, aComp->componentusername(), "HEXABLOCK" );
+  if(MYDEBUG) MESSAGE("PublishComponent--END");
+
+  return father._retn();
+}
+
+
+
+
+
+
+// bool HEXABLOCKGUI::createSComponent() //addComponent
+// {
+//   DEBTRACE("HEXABLOCKGUI::createSComponent");
+//   _PTR(Study)            aStudy = (( SalomeApp_Study* )(getApp()->activeStudy()))->studyDS();
+//   _PTR(StudyBuilder)     aBuilder (aStudy->NewBuilder());
+//   _PTR(GenericAttribute) anAttr;
+//   _PTR(AttributeName)    aName;
+// 
+//   // --- Find or create "HEXABLOCK" SComponent in the study
+//   _PTR(SComponent) aComponent = aStudy->FindComponent("HEXABLOCK");
+//   if ( !aComponent )
+//     {
+//       aComponent = aBuilder->NewComponent("HEXABLOCK");
+//       anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
+//       aName = _PTR(AttributeName) (anAttr);
+//       aName->SetValue(getApp()->moduleTitle("HEXABLOCK").toStdString());
+//       
+//       anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap");
+//       _PTR(AttributePixMap) aPixmap(anAttr);
+//       aPixmap->SetPixMap("share/salome/resources/hexablock/ModuleHexablock.png");
+//       
+//       aBuilder->DefineComponentInstance(aComponent, getApp()->defaultEngineIOR().toStdString());
+// 
+//       DEBTRACE("HEXABLOCKGUI::createSComponent defaultEngineIOR=>"<<getApp()->defaultEngineIOR().toStdString());
+// //       SalomeApp_DataModel::synchronize( aComponent, HEXABLOCKGUI::activeStudy() );
+//       return true;
+//     }
+//   return false;
+// }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
+//                                                  SALOMEDS::SObject_ptr theSObject,
+//                                                  CORBA::Object_ptr theObject,
+//                                                  const char* theName) throw (SALOME::SALOME_Exception)
+// {
+//   Unexpect aCatch(SALOME_SalomeException);
+//   SALOMEDS::SObject_var aResultSO;
+//   if(CORBA::is_nil(theObject) || theStudy->_is_nil()) return aResultSO;
+// 
+// 
+//   GEOM::GEOM_Object_var aShape = GEOM::GEOM_Object::_narrow(theObject);
+//   if(aShape->_is_nil()) return aResultSO;
+// 
+//   SALOMEDS::GenericAttribute_var anAttr;
+//   SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder();
+// 
+//   SALOMEDS::SComponent_var       aFather = theStudy->FindComponent("GEOM");
+//   if (aFather->_is_nil()) {
+//     aFather = aStudyBuilder->NewComponent("GEOM");
+//     anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributeName");
+//     SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
+//     aName->SetValue("Geometry");
+//     aName->UnRegister();
+//     anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributePixMap");
+//     SALOMEDS::AttributePixMap_var aPixMap=SALOMEDS::AttributePixMap::_narrow(anAttr);
+//     aPixMap->SetPixMap("ICON_OBJBROWSER_Geometry");
+//     aPixMap->UnRegister();
+//     aStudyBuilder->DefineComponentInstance(aFather, (GEOM::GEOM_Gen_var)GEOM_Gen::_this());
+//   }
+//   if (aFather->_is_nil()) return aResultSO;
+// 
+//   if (CORBA::is_nil(theSObject)) {
+//     aResultSO = aStudyBuilder->NewObject(aFather);
+//   } else {
+//     if (!theSObject->ReferencedObject(aResultSO))
+//       aResultSO = SALOMEDS::SObject::_duplicate(theSObject); //SRN: Added Aug 24,2004 : for  the method AddInStudy with theFather argumenet != NULL
+//       //THROW_SALOME_CORBA_EXCEPTION("Publish in study supervision graph error",SALOME::BAD_PARAM);
+//   }
+//   CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject);
+//   aResultSO->SetAttrString("AttributeIOR",aGeomObjIOR);
+// 
+//   TCollection_AsciiString aShapeName("Shape_");
+// 
+//   CORBA::Long mytype=aShape->GetType();
+//   if ( mytype == GEOM_GROUP ) {
+//     GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations( theStudy->StudyId() );
+//     switch ( (TopAbs_ShapeEnum)anOp->GetType( aShape ) ) {
+//     case TopAbs_VERTEX:
+//       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_PNT" );
+//       aShapeName = "Group_Of_Vertices_";
+//       break;
+//     case TopAbs_EDGE:
+//       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_EDGE");
+//       aShapeName = "Group_Of_Edges_";
+//       break;
+//     case TopAbs_FACE:
+//       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_FACE");
+//       aShapeName = "Group_Of_Faces_";
+//       break;
+//     case TopAbs_SOLID:
+//       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_SOLID");
+//       aShapeName = "Group_Of_Solids_";
+//       break;
+//     }
+//   } else if ( mytype == GEOM_MARKER ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS");
+//     aShapeName = "LocalCS_";
+//   } else if ( mytype > ADVANCED_BASE ) {
+//     char buf[20];
+//     sprintf( buf, "%d", aShape->GetType() );
+//     std::string advId = "ICON_OBJBROWSER_ADVANCED_"; advId += buf;
+//     aResultSO->SetAttrString("AttributePixMap",advId.c_str());
+//     aShapeName = "Advanced_";
+//   } else {
+//     GEOM::shape_type myshapetype=aShape->GetShapeType();
+//     if ( myshapetype == GEOM::COMPOUND ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPOUND" );
+//     aShapeName = "Compound_";
+//   } else if ( myshapetype == GEOM::COMPSOLID ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPSOLID");
+//     aShapeName = "Compsolid_";
+//   } else if ( myshapetype == GEOM::SOLID ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SOLID");
+//     aShapeName = "Solid_";
+//   } else if ( myshapetype == GEOM::SHELL ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SHELL");
+//     aShapeName = "Shell_";
+//   } else if ( myshapetype == GEOM::FACE ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_FACE");
+//     aShapeName = "Face_";
+//   } else if ( myshapetype == GEOM::WIRE ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_WIRE");
+//     aShapeName = "Wire_";
+//   } else if ( myshapetype == GEOM::EDGE ) {
+//     aResultSO->SetAttrString("AttributePixMap", "ICON_OBJBROWSER_EDGE");
+//     aShapeName = "Edge_";
+//   } else if ( myshapetype == GEOM::VERTEX ) {
+//     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_VERTEX" );
+//     aShapeName = "Vertex_";
+//   }
+//   }
+//   //if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
+//   //else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName));
+// 
+//   // BEGIN: try to find existed name for current shape
+//   bool HasName = false;
+//   // recieve current TopoDS shape
+//   CORBA::String_var entry = aShape->GetEntry();
+//   Handle(GEOM_Object) aGShape = _impl->GetObject(aShape->GetStudyID(), entry);
+//   TopoDS_Shape TopoSh = aGShape->GetValue();
+//   // find label of main shape
+//   GEOM::GEOM_Object_var aMainSh = aShape;
+//   while( !aMainSh->IsMainShape() ) {
+//     aMainSh = aMainSh->GetMainShape();
+//   }
+//   entry = aMainSh->GetEntry();
+//   Handle(GEOM_Object) anObj = _impl->GetObject(aMainSh->GetStudyID(), entry);
+//   TDF_Label aMainLbl = anObj->GetFunction(1)->GetNamingEntry();
+// 
+//   // check all named shapes using iterator
+//   TDF_ChildIDIterator anIt (aMainLbl, TNaming_NamedShape::GetID(), Standard_True);
+// 
+//   for (; anIt.More() && !HasName; anIt.Next()) {
+//     Handle(TNaming_NamedShape) anAttr =
+//       Handle(TNaming_NamedShape)::DownCast(anIt.Value());
+//     if (anAttr.IsNull()) continue;
+//     TopoDS_Shape S = anAttr->Get();
+//     if (S.IsEqual(TopoSh)) {
+//       TDF_Label L = anAttr->Label();
+//       Handle(TDataStd_Name) aName;
+//       if (L.FindAttribute(TDataStd_Name::GetID(), aName)) {
+//         aShapeName = aName->Get();
+//         HasName = true;
+//       }
+//     }
+//   }
+//   // END: try to find existed name for current shape
+// 
+//   
+//   aResultSO->SetAttrString("AttributeString",aVars.ToCString());
+// 
+//   aFather->UnRegister();
+// 
+//   //Set a name of the GEOM object
+//   aShape->SetName(aShapeName.ToCString());
+// 
+//   return aResultSO._retn();
+// }
+
+
+
+
+
+//=============================================================================
+/*!
+ *  findMaxChildTag [ static internal ]
+ *
+ *  Finds maximum child tag for the given object
+ */
+//=============================================================================
+
+static long findMaxChildTag( SALOMEDS::SObject_ptr theSObject )
+{
+  long aTag = 0;
+  if ( !theSObject->_is_nil() ) {
+    SALOMEDS::Study_var aStudy = theSObject->GetStudy();
+    if ( !aStudy->_is_nil() ) {
+      SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator( theSObject );
+      for ( ; anIter->More(); anIter->Next() ) {
+        long nTag = anIter->Value()->Tag();
+        if ( nTag > aTag )
+          aTag = nTag;
+      }
+    }
+  }
+  return aTag;
+}
+
+//=======================================================================
+//function : PublishMesh
+//purpose  : 
+//=======================================================================
+SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PublishDoc ( SALOMEDS::Study_ptr     theStudy,
+                                              Document_ptr theDoc,
+                                              const char*             theName)
+{
+  if ( CORBA::is_nil( theStudy ) ||
+       CORBA::is_nil( theDoc ))
+    return SALOMEDS::SComponent::_nil();
+  if(MYDEBUG) MESSAGE("PublishMesh--IN");
+
+  // find or publish a mesh
+
+  SALOMEDS::SObject_var aDocSO = ObjectToSObject( theStudy, theDoc );
+  if ( aDocSO->_is_nil() )
+  {
+    SALOMEDS::SComponent_var father = PublishComponent( theStudy );
+    if ( father->_is_nil() )
+      return aDocSO._retn();
+
+    // Find correct free tag
+    long aTag = findMaxChildTag( father.in() );
+//     if ( aTag <= GetAlgorithmsRootTag() )
+//       aTag = GetAlgorithmsRootTag() + 1;
+//     else
+//       aTag++;
+    aTag++;
+
+    aDocSO = publish (theStudy, theDoc, father, aTag);//, "ICON_DOC_TREE_MESH_WARN" );
+    if ( aDocSO->_is_nil() )
+      return aDocSO._retn();
+  }
+  std::string docName = SetName( aDocSO, theName, theDoc->getName()); // Bph 
+  // theDoc->setName( docName.c_str() );                              // Abu
+
+  // Add shape reference
+//   GEOM::GEOM_Object_var aShapeObject = theMesh->GetShapeToMesh();
+//   if ( !CORBA::is_nil( aShapeObject )) {
+//     addReference( theStudy, aMeshSO, aShapeObject, GetRefOnShapeTag() );
+// 
+//     // Publish global hypotheses
+// 
+//     SMESH::ListOfHypothesis_var hypList = theMesh->GetHypothesisList( aShapeObject );
+//     for ( int i = 0; i < hypList->length(); i++ ) {
+//       SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
+//       PublishHypothesis( theStudy, aHyp );
+//       AddHypothesisToShape( theStudy, theMesh, aShapeObject, aHyp );
+//     }
+//   }
+// 
+//   // Publish submeshes
+// 
+//   SMESH_Mesh_i* mesh_i = objectToServant<SMESH_Mesh_i>( theMesh );
+//   if ( !mesh_i )
+//     return aMeshSO._retn();
+//   map<int, SMESH_subMesh_i*>& subMap = mesh_i->_mapSubMesh_i;
+//   map<int, SMESH_subMesh_i*>::iterator subIt = subMap.begin();
+//   for ( ; subIt != subMap.end(); subIt++ ) {
+//     SMESH::SMESH_subMesh_ptr aSubMesh = (*subIt).second->_this();
+//     if ( !CORBA::is_nil( aSubMesh )) {
+//       aShapeObject = aSubMesh->GetSubShape();
+//       PublishSubMesh( theStudy, theMesh, aSubMesh, aShapeObject );
+//     }
+//   }
+// 
+//   // Publish groups
+//   const map<int, SMESH::SMESH_GroupBase_ptr>& grMap = mesh_i->getGroups();
+//   map<int, SMESH::SMESH_GroupBase_ptr>::const_iterator it = grMap.begin();
+//   for ( ; it != grMap.end(); it++ )
+//   {
+//     SMESH::SMESH_GroupBase_ptr aGroup = (*it).second;
+//     if ( !aGroup->_is_nil() ) {
+//       GEOM::GEOM_Object_var  aShapeObj;
+//       SMESH::SMESH_GroupOnGeom_var aGeomGroup =
+//         SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+//       if ( !aGeomGroup->_is_nil() )
+//         aShapeObj = aGeomGroup->GetShape();
+//       PublishGroup( theStudy, theMesh, aGroup, aShapeObj );
+//     }
+//   }
+
+  if(MYDEBUG) MESSAGE("PublishDoc_END");
+  return aDocSO._retn();
+}
+
+//=======================================================================
+//function : PublishSubMesh
+//purpose  : 
+//=======================================================================
+
+// SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theStudy,
+//                                                    SMESH::SMESH_Mesh_ptr    theMesh,
+//                                                    SMESH::SMESH_subMesh_ptr theSubMesh,
+//                                                    GEOM::GEOM_Object_ptr    theShapeObject,
+//                                                    const char*              theName)
+// {
+//   if (theStudy->_is_nil() || theMesh->_is_nil() ||
+//       theSubMesh->_is_nil() || theShapeObject->_is_nil() )
+//     return SALOMEDS::SObject::_nil();
+// 
+//   SALOMEDS::SObject_var aSubMeshSO = ObjectToSObject( theStudy, theSubMesh );
+//   if ( aSubMeshSO->_is_nil() )
+//   {
+//     SALOMEDS::SObject_var aMeshSO = ObjectToSObject( theStudy, theMesh );
+//     if ( aMeshSO->_is_nil() ) {
+//       aMeshSO = PublishMesh( theStudy, theMesh );
+//       if ( aMeshSO->_is_nil())
+//         return SALOMEDS::SObject::_nil();
+//     }
+//     // Find submesh sub-tree tag
+//     long aRootTag;
+//     const char* aRootName = "";
+//     switch ( theShapeObject->GetShapeType() ) {
+//     case GEOM::VERTEX:
+//       aRootTag  = GetSubMeshOnVertexTag();
+//       aRootName = "SubMeshes on Vertex";
+//       break;
+//     case GEOM::EDGE:
+//       aRootTag  = GetSubMeshOnEdgeTag();
+//       aRootName = "SubMeshes on Edge";
+//       break;
+//     case GEOM::WIRE:
+//       aRootTag  = GetSubMeshOnWireTag();
+//       aRootName = "SubMeshes on Wire";
+//       break;
+//     case GEOM::FACE:
+//       aRootTag  = GetSubMeshOnFaceTag();
+//       aRootName = "SubMeshes on Face";    
+//       break;
+//     case GEOM::SHELL:
+//       aRootTag  = GetSubMeshOnShellTag();
+//       aRootName = "SubMeshes on Shell";   
+//       break;
+//     case GEOM::SOLID:
+//       aRootTag  = GetSubMeshOnSolidTag();
+//       aRootName = "SubMeshes on Solid";
+//       break;
+//     default:
+//       aRootTag  = GetSubMeshOnCompoundTag();
+//       aRootName = "SubMeshes on Compound";
+//       break;
+//     }
+// 
+//     // Find or create submesh root
+//     SALOMEDS::SObject_var aRootSO = publish (theStudy, CORBA::Object::_nil(),
+//                                              aMeshSO, aRootTag, 0, false );
+//     SetName( aRootSO, aRootName );
+// 
+//     // Add new submesh to corresponding sub-tree
+//     aSubMeshSO = publish (theStudy, theSubMesh, aRootSO, 0, "ICON_SMESH_TREE_MESH_WARN");
+//     if ( aSubMeshSO->_is_nil() )
+//       return aSubMeshSO._retn();
+//   }
+//   SetName( aSubMeshSO, theName, "SubMesh" );
+// 
+//   // Add reference to theShapeObject
+// 
+//   addReference( theStudy, aSubMeshSO, theShapeObject, 1 );
+// 
+//   // Publish hypothesis
+// 
+//   SMESH::ListOfHypothesis * hypList = theMesh->GetHypothesisList( theShapeObject );
+//   if ( hypList )
+//     for ( int i = 0; i < hypList->length(); i++ ) {
+//       SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( (*hypList)[ i ]);
+//       PublishHypothesis( theStudy, aHyp );
+//       AddHypothesisToShape( theStudy, theMesh, theShapeObject, aHyp );
+//     }
+// 
+//   return aSubMeshSO._retn();
+// }
+
+//=======================================================================
+//function : PublishGroup
+//purpose  : 
+//=======================================================================
+
+// SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy,
+//                                                  SMESH::SMESH_Mesh_ptr  theMesh,
+//                                                  SMESH::SMESH_GroupBase_ptr theGroup,
+//                                                  GEOM::GEOM_Object_ptr  theShapeObject,
+//                                                  const char*            theName)
+// {
+//   if (theStudy->_is_nil() || theMesh->_is_nil() || theGroup->_is_nil() )
+//     return SALOMEDS::SObject::_nil();
+// 
+//   SALOMEDS::SObject_var aGroupSO = ObjectToSObject( theStudy, theGroup );
+//   if ( aGroupSO->_is_nil() )
+//   {
+//     SALOMEDS::SObject_var aMeshSO = ObjectToSObject( theStudy, theMesh );
+//     if ( aMeshSO->_is_nil() ) {
+//       aMeshSO = PublishInStudy( theStudy, SALOMEDS::SObject::_nil(), theMesh, "");
+//       if ( aMeshSO->_is_nil())
+//         return SALOMEDS::SObject::_nil();
+//     }
+//     int aType = (int)theGroup->GetType();
+//     const char* aRootNames[] = {
+//       "Compound Groups", "Groups of Nodes", "Groups of Edges",
+//       "Groups of Faces", "Groups of Volumes", "Groups of 0D Elements" };
+// 
+//     // Currently, groups with heterogenous content are not supported
+//     if ( aType != SMESH::ALL ) {
+//       long aRootTag = GetNodeGroupsTag() + aType - 1;
+// 
+//       // Find or create groups root
+//       SALOMEDS::SObject_var aRootSO = publish (theStudy, CORBA::Object::_nil(),
+//                                                aMeshSO, aRootTag, 0, false );
+//       if ( aType < 6 )
+//         SetName( aRootSO, aRootNames[aType] );
+// 
+//       // Add new group to corresponding sub-tree
+//       aGroupSO = publish (theStudy, theGroup, aRootSO, 0, "ICON_SMESH_TREE_GROUP" );
+//     }
+//     if ( aGroupSO->_is_nil() )
+//       return aGroupSO._retn();
+//   }
+// 
+//   SetName( aGroupSO, theName, "Group" );
+// 
+//   //Add reference to geometry
+//   if ( !theShapeObject->_is_nil() )
+//     addReference( theStudy, aGroupSO, theShapeObject, 1 );
+// 
+//   return aGroupSO._retn();
+// }
+
+//=======================================================================
+//function : PublishHypothesis
+//purpose  : 
+//=======================================================================
+
+// SALOMEDS::SObject_ptr
+//   SMESH_Gen_i::PublishHypothesis (SALOMEDS::Study_ptr         theStudy,
+//                                   SMESH::SMESH_Hypothesis_ptr theHyp,
+//                                   const char*                 theName)
+// {
+//   if(MYDEBUG) MESSAGE("PublishHypothesis")
+//   if (theStudy->_is_nil() || theHyp->_is_nil())
+//     return SALOMEDS::SObject::_nil();
+// 
+//   SALOMEDS::SObject_var aHypSO = ObjectToSObject( theStudy, theHyp );
+//   if ( aHypSO->_is_nil() )
+//   {
+//     SALOMEDS::SComponent_var father = PublishComponent( theStudy );
+//     if ( father->_is_nil() )
+//       return aHypSO._retn();
+// 
+//     //Find or Create Hypothesis root
+//     bool isAlgo = ( !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil() );
+//     int aRootTag = isAlgo ? GetAlgorithmsRootTag() : GetHypothesisRootTag();
+//     SALOMEDS::SObject_var aRootSO =
+//       publish (theStudy, CORBA::Object::_nil(),father, aRootTag,
+//                isAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
+//     SetName( aRootSO, isAlgo ?  "Algorithms" : "Hypotheses" );
+// 
+//     // Add New Hypothesis
+//     string aPmName = isAlgo ? "ICON_SMESH_TREE_ALGO_" : "ICON_SMESH_TREE_HYPO_";
+//     aPmName += theHyp->GetName();
+//     // prepend plugin name to pixmap name
+//     string pluginName = myHypCreatorMap[string(theHyp->GetName())]->GetModuleName();
+//     if ( pluginName != "StdMeshers" )
+//       aPmName = pluginName + "::" + aPmName;
+//     aHypSO = publish( theStudy, theHyp, aRootSO, 0, aPmName.c_str() );
+//   }
+// 
+//   if ( !aHypSO->_is_nil() ) {
+//     CORBA::String_var aHypName = CORBA::string_dup( theHyp->GetName() );
+//     SetName( aHypSO, theName, aHypName );
+//   }
+// 
+//   if(MYDEBUG) MESSAGE("PublishHypothesis--END")
+//   return aHypSO._retn();
+// }
+
+//=======================================================================
+//function : GetMeshOrSubmeshByShape
+//purpose  : 
+//=======================================================================
+
+// SALOMEDS::SObject_ptr
+//   SMESH_Gen_i::GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr   theStudy,
+//                                         SMESH::SMESH_Mesh_ptr theMesh,
+//                                         GEOM::GEOM_Object_ptr theShape)
+// {
+//   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape")
+//   SALOMEDS::SObject_var aMeshOrSubMesh;
+//   if (theMesh->_is_nil() || ( theShape->_is_nil() && theMesh->HasShapeToMesh()))
+//     return aMeshOrSubMesh._retn();
+//   
+//   TopoDS_Shape aShape;
+//   if(theMesh->HasShapeToMesh())
+//     aShape = GeomObjectToShape( theShape );
+//   else
+//     aShape = SMESH_Mesh::PseudoShape();
+// 
+//   SMESH_Mesh_i* mesh_i = objectToServant<SMESH_Mesh_i>( theMesh );
+// 
+//   if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) {
+//     SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
+//     if ( aShape.IsSame( meshDS->ShapeToMesh() ))
+//       aMeshOrSubMesh = ObjectToSObject( theStudy, theMesh );
+//     else {
+//       int shapeID = meshDS->ShapeToIndex( aShape );
+//       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
+//       if ( !aSubMesh->_is_nil() )
+//         aMeshOrSubMesh = ObjectToSObject( theStudy, aSubMesh );
+//     }
+//   }
+//   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END")
+//   return aMeshOrSubMesh._retn();
+// }
+
+//=======================================================================
+//function : AddHypothesisToShape
+//purpose  : 
+//=======================================================================
+
+// bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
+//                                        SMESH::SMESH_Mesh_ptr       theMesh,
+//                                        GEOM::GEOM_Object_ptr       theShape,
+//                                        SMESH::SMESH_Hypothesis_ptr theHyp)
+// {
+//   if(MYDEBUG) MESSAGE("AddHypothesisToShape")
+//   if (theStudy->_is_nil() || theMesh->_is_nil() ||
+//       theHyp->_is_nil() || (theShape->_is_nil()
+//                             && theMesh->HasShapeToMesh()) )
+//     return false;
+// 
+//   SALOMEDS::SObject_var aMeshSO = ObjectToSObject( theStudy, theMesh );
+//   if ( aMeshSO->_is_nil() )
+//     aMeshSO = PublishMesh( theStudy, theMesh );
+//   SALOMEDS::SObject_var aHypSO = PublishHypothesis( theStudy, theHyp );
+//   if ( aMeshSO->_is_nil() || aHypSO->_is_nil())
+//     return false;
+// 
+//   // Find a mesh or submesh refering to theShape
+//   SALOMEDS::SObject_var aMeshOrSubMesh =
+//     GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
+//   if ( aMeshOrSubMesh->_is_nil() )
+//   {
+//     // publish submesh
+//     TopoDS_Shape aShape = GeomObjectToShape( theShape );
+//     SMESH_Mesh_i* mesh_i = objectToServant<SMESH_Mesh_i>( theMesh );
+//     if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) {
+//       SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
+//       int shapeID = meshDS->ShapeToIndex( aShape );
+//       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
+//       aMeshOrSubMesh = PublishSubMesh( theStudy, theMesh, aSubMesh, theShape );
+//     }
+//     if ( aMeshOrSubMesh->_is_nil() )
+//       return false;
+//   }
+// 
+//   //Find or Create Applied Hypothesis root
+//   bool aIsAlgo = !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil();
+//   SALOMEDS::SObject_var AHR =
+//     publish (theStudy, CORBA::Object::_nil(), aMeshOrSubMesh,
+//              aIsAlgo ? GetRefOnAppliedAlgorithmsTag() : GetRefOnAppliedHypothesisTag(),
+//              aIsAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
+//   SetName( AHR, aIsAlgo ? "Applied algorithms" : "Applied hypotheses" );
+//   if ( AHR->_is_nil() )
+//     return false;
+// 
+//   addReference( theStudy, AHR, theHyp );
+//   if(MYDEBUG) MESSAGE("AddHypothesisToShape--END")
+//   return true;
+// }
+
+//=======================================================================
+//function : RemoveHypothesisFromShape
+//purpose  : 
+//=======================================================================
+
+// bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy,
+//                                             SMESH::SMESH_Mesh_ptr       theMesh,
+//                                             GEOM::GEOM_Object_ptr       theShape,
+//                                             SMESH::SMESH_Hypothesis_ptr theHyp)
+// {
+//   if (theStudy->_is_nil() || theMesh->_is_nil() ||
+//       theHyp->_is_nil() || (theShape->_is_nil()
+//                             && theMesh->HasShapeToMesh()))
+//     return false;
+// 
+//   SALOMEDS::SObject_var aHypSO = ObjectToSObject( theStudy, theHyp );
+//   if ( aHypSO->_is_nil() )
+//     return false;
+// 
+//   // Find a mesh or submesh refering to theShape
+//   SALOMEDS::SObject_var aMeshOrSubMesh =
+//     GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
+//   if ( aMeshOrSubMesh->_is_nil() )
+//     return false;
+// 
+//   // Find and remove a reference to aHypSO
+//   SALOMEDS::SObject_var aRef, anObj;
+//   CORBA::String_var     anID = CORBA::string_dup( aHypSO->GetID() );
+//   SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator( aMeshOrSubMesh );
+//   for ( it->InitEx( true ); it->More(); it->Next() ) {
+//     anObj = it->Value();
+//     if (anObj->ReferencedObject( aRef ) && strcmp( aRef->GetID(), anID ) == 0 ) {
+//       theStudy->NewBuilder()->RemoveObject( anObj );
+//       break;
+//     }
+//   }
+//   return true;
+// }
+
+//=======================================================================
+//function : UpdateParameters
+//purpose  : 
+//=======================================================================
+// void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters)
+// {
+// 
+//   if(VARIABLE_DEBUG)
+//     cout<<"UpdateParameters : "<<theParameters<<endl;
+//   SALOMEDS::Study_ptr aStudy = GetCurrentStudy();
+//   if(aStudy->_is_nil() || CORBA::is_nil(theObject)) 
+//     return;
+// 
+//   SALOMEDS::SObject_var aSObj =  ObjectToSObject(aStudy,theObject);
+//   if(aSObj->_is_nil())  
+//     return;
+// 
+//   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+// 
+//   SALOMEDS::GenericAttribute_var aFindAttr;
+//   bool hasAttr = aSObj->FindAttribute(aFindAttr, "AttributeString");
+//   if(VARIABLE_DEBUG)
+//     cout<<"Find Attribute "<<hasAttr<<endl;
+// 
+//   SALOMEDS::GenericAttribute_var anAttr;
+//   anAttr = aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString");
+//   SALOMEDS::AttributeString_var aStringAttr = SALOMEDS::AttributeString::_narrow(anAttr);
+// 
+//   CORBA::String_var oldparVar = aStringAttr->Value();
+//   CORBA::String_var inpparVar = ParseParameters(theParameters);
+//   TCollection_AsciiString aNewParams;
+//   TCollection_AsciiString aOldParameters(oldparVar.inout());
+//   TCollection_AsciiString anInputParams(inpparVar.inout());
+//   if(!hasAttr)
+//     aNewParams = anInputParams;
+//   else 
+//     {
+//       int pos = aOldParameters.SearchFromEnd("|");
+//       if(pos==-1) pos = 0;
+//       TCollection_AsciiString previousParamFull(aOldParameters.Split(pos));
+//       TCollection_AsciiString previousParam(previousParamFull);
+//       TCollection_AsciiString theRepet("1");
+//       pos = previousParam.SearchFromEnd(";*=");
+//       if(pos >= 0)
+//         {
+//           theRepet = previousParam.Split(pos+2);
+//           pos = pos-1;
+//           if(pos==-1) pos = 0;
+//           previousParam.Split(pos);
+//         }
+//       if(previousParam == anInputParams)
+//         {
+//           theRepet = theRepet.IntegerValue()+1;
+//           aNewParams = aOldParameters + previousParam + ";*=" + theRepet;
+//         }
+//       else
+//         {
+//           aNewParams = aOldParameters + previousParamFull + "|" + anInputParams;
+//         }
+//     }
+// 
+//   if(VARIABLE_DEBUG)
+//   {
+//     cout<<"Input Parameters : "<<anInputParams<<endl;
+//     cout<<"Old Parameters : "<<aOldParameters<<endl;
+//     cout<<"New Parameters : "<<aNewParams<<endl;
+//   }
+// 
+//   aStringAttr->SetValue( aNewParams.ToCString() );
+// }
+
+//=======================================================================
+//function : ParseParameters
+//purpose  : 
+//=======================================================================
+// char* SMESH_Gen_i::ParseParameters(const char* theParameters)
+// {
+//   //const char* aParameters = theParameters;
+// //   const char* aParameters = CORBA::string_dup(theParameters);
+//   TCollection_AsciiString anInputParams;
+//   SALOMEDS::Study_var aStudy = GetCurrentStudy();
+//   if( !aStudy->_is_nil() ) {
+// //     SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(theParameters);
+// //     for(int j=0;j<aSections->length();j++) {
+// //       SALOMEDS::ListOfStrings aVars= aSections[j];
+// //       for(int i=0;i<aVars.length();i++ ) {
+// //         anInputParams += aStudy->IsVariable(aVars[i].in()) ? 
+// //           TCollection_AsciiString(aVars[i].in()) : TCollection_AsciiString("");
+// //         if(i != aVars.length()-1)
+// //           anInputParams+=":";
+// //       }
+// //       if(j!=aSections->length()-1)
+// //         anInputParams+="|";
+// //     }
+//     TCollection_AsciiString paramStr( theParameters );
+//     static TCollection_AsciiString separators(":|");
+//     int beg = 0, end;
+//     char sep, *pParams = (char*)paramStr.ToCString();
+//     while ( beg < paramStr.Length() )
+//     {
+//       end = beg-1;
+//       while ( ++end < paramStr.Length() )
+//         if ( pParams[end] == ':' || pParams[end] == '|')
+//           break;
+//       if ( end < paramStr.Length())
+//       {
+//         sep = pParams[end];
+//         pParams[end] = '\0';
+//       }
+//       if ( aStudy->IsVariable( pParams+beg ))
+//         anInputParams += pParams+beg;
+//       if ( end < paramStr.Length() )
+//         anInputParams += sep;
+//       else
+//         break;
+//       beg = end + 1;
+//     }
+//   }
+//   return CORBA::string_dup(anInputParams.ToCString());
+// }
+
+//=======================================================================
+//function : GetParameters
+//purpose  : 
+//=======================================================================
+// char* SMESH_Gen_i::GetParameters(CORBA::Object_ptr theObject)
+// {
+//   TCollection_AsciiString aResult;
+// 
+//   SALOMEDS::Study_ptr aStudy = GetCurrentStudy();
+//   SALOMEDS::SObject_var aSObj =  ObjectToSObject(aStudy,theObject);
+// 
+//   if(!aStudy->_is_nil() && 
+//      !CORBA::is_nil(theObject) && 
+//      !aSObj->_is_nil()){
+//     
+//     SALOMEDS::GenericAttribute_var anAttr;
+//     if ( aSObj->FindAttribute(anAttr, "AttributeString")) {
+//       aResult = TCollection_AsciiString(SALOMEDS::AttributeString::_narrow(anAttr)->Value());
+//     }
+//   }
+//   
+//   return CORBA::string_dup( aResult.ToCString() );
+// }
diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.cxx b/src/HEXABLOCK_I/HexCrossElements_impl.cxx
new file mode 100755 (executable)
index 0000000..f89765c
--- /dev/null
@@ -0,0 +1,362 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexCrossElements_impl.hxx"
+#include "HEXABLOCK.hxx"
+
+
+CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp)
+{
+}
+
+
+HEXA_NS::CrossElements* CrossElements_impl::GetImpl()
+{
+  return _crossElements_cpp;
+}
+
+
+Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+  HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+  HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Long CrossElements_impl::crossCylinders(Cylinder_ptr c1In, Cylinder_ptr  c2In)
+throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long result;
+  Cylinder_impl* c1InServant = ::DownCast<Cylinder_impl*>( c1In );
+  Cylinder_impl* c2InServant = ::DownCast<Cylinder_impl*>( c2In );
+
+  ASSERT( c1InServant );
+  ASSERT( c2InServant );
+
+  if ( c1InServant &&  c2InServant ) {
+    HEXA_NS::Cylinder* c1 = c1InServant->GetImpl();
+    HEXA_NS::Cylinder* c2 = c2InServant->GetImpl();
+
+    result = _crossElements_cpp->crossCylinders(c1,c2);
+  }
+  return result;
+
+}
+
+
+
+::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
+  return ret;
+}
+
+
+
+void CrossElements_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _crossElements_cpp->dump();
+}
+
+
+void CrossElements_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _crossElements_cpp->printName();
+}
+
+char* CrossElements_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup( _crossElements_cpp->getName() );
+}
+
+// ========================================================= setName
+void CrossElements_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _crossElements_cpp->setName (name);
+}
+
+// ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countVertex();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countEdge();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countQuad();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countHexa();
+//   return n;
+// }
+// 
+// 
+// 
+// Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n);
+//   Vertex_impl* servantCorba = new Vertex_impl(v);
+//   return servantCorba->_this();
+// }
+// 
+// Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n);
+//   Edge_impl* servantCorba = new Edge_impl(e);
+//   return servantCorba->_this();
+// }
+// 
+// Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n);
+//   Quad_impl* servantCorba = new Quad_impl(q);
+//   return servantCorba->_this();
+// }
+// 
+// Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n);
+//   Hexa_impl* servantCorba = new Hexa_impl(h);
+//   return servantCorba->_this();
+// }
+// 
+// 
+// 
+// ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
+//   return ret;
+// }
+// 
+// 
+// 
+// Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Vertex_ptr result = Vertex::_nil();
+// //   HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(x, y,z);
+//   HEXA_NS::Vertex* v = NULL;
+//   _crossElements_cpp->toto();
+//   if ( v != NULL ){
+//     Vertex_impl* servantCorba = new Vertex_impl(v);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+// {
+//   Hexa_ptr result = Hexa::_nil();
+//   HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z);
+//   if ( h != NULL ){
+//     Hexa_impl* servantCorba = new Hexa_impl(h);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+
+
diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.hxx b/src/HEXABLOCK_I/HexCrossElements_impl.hxx
new file mode 100755 (executable)
index 0000000..87b9438
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexCrossElements_impl__
+#define __HexCrossElements_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(CrossElements)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexCrossElements.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class CrossElements_impl : public POA_HEXABLOCK_ORB::CrossElements,
+                          public SALOME::GenericObj_i
+{
+public:
+    CrossElements_impl(HEXA_NS::CrossElements *ptrCpp);
+    HEXA_NS::CrossElements* GetImpl();
+
+    Vertex_ptr getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Edge_ptr getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Quad_ptr getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Hexa_ptr getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long crossCylinders(Cylinder_ptr cyl1, Cylinder_ptr cyl2) throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+    HEXA_NS::CrossElements *_crossElements_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexCylinder_impl.cxx b/src/HEXABLOCK_I/HexCylinder_impl.cxx
new file mode 100755 (executable)
index 0000000..cb4cd04
--- /dev/null
@@ -0,0 +1,115 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexVector_impl.hxx"
+
+Cylinder_impl::Cylinder_impl( HEXA_NS::Cylinder *ptrCpp ):_cylinder_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Cylinder* Cylinder_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _cylinder_cpp;
+}
+
+
+Vertex_ptr Cylinder_impl::getBase()
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _cylinder_cpp->getBase();
+  if ( v!= NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+
+  return result;
+}
+
+Vector_ptr Cylinder_impl::getDirection()
+  throw (SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  HEXA_NS::Vector* v = _cylinder_cpp->getDirection();
+  if ( v!= NULL ){
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Double Cylinder_impl::getRadius()
+  throw (SALOME::SALOME_Exception)
+{
+ ::CORBA::Double d = _cylinder_cpp->getRadius();
+  return d;
+}
+
+
+::CORBA::Double Cylinder_impl::getHeight()
+  throw (SALOME::SALOME_Exception)
+{
+ ::CORBA::Double d = _cylinder_cpp->getHeight();
+  return d;
+}
+
+
+void Cylinder_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _cylinder_cpp->dump();
+}
+
+
+void Cylinder_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _cylinder_cpp->printName();
+}
+
+
+char* Cylinder_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  char name[12];
+  return CORBA::string_dup( _cylinder_cpp->getName(name) );
+}
+// ========================================================= setName
+void Cylinder_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _cylinder_cpp->setName (name);
+}
+
+// ::CORBA::Long Cylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long ret = _cylinder_cpp->saveVtk( fname );
+//   return ret;
+// }
+
+
diff --git a/src/HEXABLOCK_I/HexCylinder_impl.hxx b/src/HEXABLOCK_I/HexCylinder_impl.hxx
new file mode 100755 (executable)
index 0000000..f4f25e9
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexCylinder_impl__
+#define __HexCylinder_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Cylinder)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexCylinder.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Cylinder_impl : public POA_HEXABLOCK_ORB::Cylinder,
+                   public SALOME::GenericObj_i
+{
+public:
+  Cylinder_impl(HEXA_NS::Cylinder *ptrCpp);
+  HEXA_NS::Cylinder* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Vertex_ptr getBase() throw (SALOME::SALOME_Exception);
+  Vector_ptr getDirection() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception);
+
+//   ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Cylinder *_cylinder_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexDocument_impl.cxx b/src/HEXABLOCK_I/HexDocument_impl.cxx
new file mode 100755 (executable)
index 0000000..77fb534
--- /dev/null
@@ -0,0 +1,2438 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+
+#include "utilities.h"
+
+#include <string>
+
+#include "HEXABLOCK.hxx"
+#include "HexDocument_impl.hxx"
+// 
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexVector_impl.hxx"
+#include "HexElements_impl.hxx"
+#include "HexCrossElements_impl.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexPipe_impl.hxx"
+#include "HexLaw_impl.hxx"
+#include "HexPropagation_impl.hxx"
+#include "HexGroup_impl.hxx"
+#include "HexPipe_impl.hxx"
+
+#include "HexShape.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+
+
+Document_impl::Document_impl( PortableServer::POA_ptr thePOA, HEXA_NS::Document *ptrCpp):
+SALOME::GenericObj_i( thePOA ),
+_document_cpp(ptrCpp)
+{
+}
+
+
+// Document_impl::Document_impl(HEXA_NS::Document *ptrCpp):_document_cpp(ptrCpp)
+// {
+// }
+
+::CORBA::Long Document_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _document_cpp->saveVtk( fname );
+  return ret;
+}
+void Document_impl::purge() throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->purge();
+}
+void Document_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->dump();
+}
+
+HEXA_NS::Document* Document_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp;
+}
+
+::CORBA::Long Document_impl::save(const char* fileName)
+                             throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _document_cpp->save(fileName);
+  return ret;
+}
+
+::CORBA::Long Document_impl::setName(const char* name) 
+                             throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _document_cpp->setName(name);
+  return ret;
+}
+
+void Document_impl::setTolerance(::CORBA::Double tol)
+                    throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->setTolerance(tol);
+}
+
+::CORBA::Double Document_impl::getTolerance() throw (SALOME::SALOME_Exception)
+{
+  return   _document_cpp->getTolerance();
+}
+
+Vertex_ptr Document_impl::addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z)
+  throw(SALOME::SALOME_Exception)
+{
+  Vertex_ptr result   = Vertex::_nil();
+
+  HEXA_NS::Vertex* v  = _document_cpp->addVertex( x, y, z );
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Long Document_impl::countVertex() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countVertex();
+}
+
+Vertex_ptr Document_impl::getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result   = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _document_cpp->getVertex(i);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Vertex_ptr Document_impl::findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _document_cpp->findVertex( x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Document_impl::addEdge(Vertex_ptr v0In, Vertex_ptr v1In)
+  throw(SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Edge* e = _document_cpp->addEdge( v0, v1 );
+    if ( e != NULL ){
+      Edge_impl* servantCorba = new Edge_impl(e);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countEdge() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countEdge();
+}
+
+Edge_ptr Document_impl::getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _document_cpp->getEdge(i);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Document_impl::findEdge(Vertex_ptr p0In, Vertex_ptr p1In)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  Vertex_impl* p0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* p1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( p0InServant );
+  ASSERT( p1InServant );
+
+  if ( p0InServant &&  p1InServant ) {
+    HEXA_NS::Vertex* p0 = p0InServant->GetImpl();
+    HEXA_NS::Vertex* p1 = p1InServant->GetImpl();
+    HEXA_NS::Edge* e = _document_cpp->findEdge( p0, p1 );
+
+    if ( e != NULL ){
+      Edge_impl* servantCorba = new Edge_impl(e);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Quad_ptr Document_impl::addQuad(Edge_ptr e0In, Edge_ptr e1In, Edge_ptr e2In, Edge_ptr e3In)
+throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Edge_impl* e0InServant = ::DownCast<Edge_impl*>( e0In );
+  Edge_impl* e1InServant = ::DownCast<Edge_impl*>( e1In );
+  Edge_impl* e2InServant = ::DownCast<Edge_impl*>( e2In );
+  Edge_impl* e3InServant = ::DownCast<Edge_impl*>( e3In );
+  ASSERT( e0InServant );
+  ASSERT( e1InServant );
+  ASSERT( e2InServant );
+  ASSERT( e3InServant );
+  if ( e0InServant &&  e1InServant && e2InServant &&  e3InServant) {
+    HEXA_NS::Edge* e0 = e0InServant->GetImpl();
+    HEXA_NS::Edge* e1 = e1InServant->GetImpl();
+    HEXA_NS::Edge* e2 = e2InServant->GetImpl();
+    HEXA_NS::Edge* e3 = e3InServant->GetImpl();
+    HEXA_NS::Quad* q = _document_cpp->addQuad( e0, e1, e2, e3 );
+    if ( q !=  NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Quad_ptr Document_impl::addQuadVertices( Vertex_ptr v0In, Vertex_ptr v1In,
+                                 Vertex_ptr v2In, Vertex_ptr v3In )
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2InServant = ::DownCast<Vertex_impl*>( v2In );
+  Vertex_impl* v3InServant = ::DownCast<Vertex_impl*>( v3In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  ASSERT( v2InServant );
+  ASSERT( v3InServant );
+
+  if ( v0InServant &&  v1InServant && v2InServant &&  v3InServant) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2InServant->GetImpl();
+    HEXA_NS::Vertex* v3 = v3InServant->GetImpl();
+    HEXA_NS::Quad* q = _document_cpp->addQuadVertices( v0, v1, v2, v3 );
+    if ( q !=  NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+::CORBA::Long Document_impl::countQuad() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countQuad();
+}
+
+Quad_ptr Document_impl::getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _document_cpp->getQuad(i);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Document_impl::findQuad(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Vertex_impl* p0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* p1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( p0InServant );
+  ASSERT( p1InServant );
+
+  if ( p0InServant &&  p1InServant ) {
+    HEXA_NS::Vertex* p0 = p0InServant->GetImpl();
+    HEXA_NS::Vertex* p1 = p1InServant->GetImpl();
+
+    HEXA_NS::Quad* q = _document_cpp->findQuad( p0, p1 );
+    if ( q != NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Hexa_ptr Document_impl::addHexa(Quad_ptr q0In, Quad_ptr q1In, Quad_ptr q2In, Quad_ptr q3In, Quad_ptr q4In, Quad_ptr q5In)
+  throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q0InServant = ::DownCast<Quad_impl*>( q0In );
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1In );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2In );
+  Quad_impl* q3InServant = ::DownCast<Quad_impl*>( q3In );
+  Quad_impl* q4InServant = ::DownCast<Quad_impl*>( q4In );
+  Quad_impl* q5InServant = ::DownCast<Quad_impl*>( q5In );
+
+  ASSERT( q0InServant );
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+  ASSERT( q3InServant );
+  ASSERT( q4InServant );
+  ASSERT( q5InServant );
+
+  if ( q0InServant &&  q1InServant && q2InServant &&  q3InServant
+        && q4InServant &&  q5InServant ){
+    HEXA_NS::Quad* q0 = q0InServant->GetImpl();
+    HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+    HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+    HEXA_NS::Quad* q3 = q3InServant->GetImpl();
+    HEXA_NS::Quad* q4 = q4InServant->GetImpl();
+    HEXA_NS::Quad* q5 = q5InServant->GetImpl();
+    HEXA_NS::Hexa* h = _document_cpp->addHexa( q0, q1, q2, q3, q4, q5 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+Hexa_ptr Document_impl::addHexaVertices( Vertex_ptr v0In, Vertex_ptr v1In, Vertex_ptr v2In, Vertex_ptr v3In, Vertex_ptr v4In, Vertex_ptr v5In, Vertex_ptr v6In, Vertex_ptr v7In )
+  throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2InServant = ::DownCast<Vertex_impl*>( v2In );
+  Vertex_impl* v3InServant = ::DownCast<Vertex_impl*>( v3In );
+  Vertex_impl* v4InServant = ::DownCast<Vertex_impl*>( v4In );
+  Vertex_impl* v5InServant = ::DownCast<Vertex_impl*>( v5In );
+  Vertex_impl* v6InServant = ::DownCast<Vertex_impl*>( v6In );
+  Vertex_impl* v7InServant = ::DownCast<Vertex_impl*>( v7In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  ASSERT( v2InServant );
+  ASSERT( v3InServant );
+  ASSERT( v4InServant );
+  ASSERT( v5InServant );
+  ASSERT( v6InServant );
+  ASSERT( v7InServant );
+
+  if ( v0InServant &&  v1InServant && v2InServant &&  v3InServant
+        && v4InServant &&  v5InServant && v6InServant &&  v7InServant ){
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2InServant->GetImpl();
+    HEXA_NS::Vertex* v3 = v3InServant->GetImpl();
+    HEXA_NS::Vertex* v4 = v4InServant->GetImpl();
+    HEXA_NS::Vertex* v5 = v5InServant->GetImpl();
+    HEXA_NS::Vertex* v6 = v6InServant->GetImpl();
+    HEXA_NS::Vertex* v7 = v7InServant->GetImpl();
+
+    HEXA_NS::Hexa* h = _document_cpp->addHexaVertices( v0, v1, v2, v3, v4, v5, v6, v7 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result =  servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+::CORBA::Long Document_impl::countHexa() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countHexa();
+}
+
+Hexa_ptr Document_impl::getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  HEXA_NS::Hexa* h = _document_cpp->getHexa(i);
+  if ( h!= NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr Document_impl::findHexa(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Hexa* h = _document_cpp->findHexa( v0, v1 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Vector_ptr Document_impl::addVector( ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz )
+    throw(SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+  HEXA_NS::Vector* v = _document_cpp->addVector( dx, dy, dz );
+
+  if ( v != NULL ){
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vector_ptr Document_impl::addVectorVertices( Vertex_ptr v0In, Vertex_ptr v1In )
+    throw(SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vector* v = _document_cpp->addVectorVertices( v0, v1 );
+    if ( v != NULL ){
+      Vector_impl* servantCorba = new Vector_impl(v);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+// ::CORBA::Long Document_impl::countVector() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countVector();
+// }
+// 
+// Vector_ptr Document_impl::getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Vector* h = _document_cpp->getVector(i);
+//   Vector_impl* servantCorba = new Vector_impl(h);
+//   return servantCorba->_this();
+// }
+
+
+Cylinder_ptr Document_impl::addCylinder( Vertex_ptr baseIn, Vector_ptr directionIn,
+      ::CORBA::Double radius, ::CORBA::Double height)
+throw (SALOME::SALOME_Exception)
+{
+  Cylinder_ptr result = Cylinder::_nil();
+
+  Vertex_impl* baseServant      = ::DownCast<Vertex_impl*>( baseIn );
+  Vector_impl* directionServant = ::DownCast<Vector_impl*>( directionIn );
+  ASSERT( baseServant );
+  ASSERT( directionServant );
+
+  if ( baseServant &&  directionServant ) {
+    HEXA_NS::Vertex* base = baseServant->GetImpl();
+    HEXA_NS::Vector* direction = directionServant->GetImpl();
+    HEXA_NS::Cylinder* c = _document_cpp->addCylinder( base, direction, radius, height );
+    if ( c!= NULL ){
+      Cylinder_impl* servantCorba = new Cylinder_impl(c);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+// ::CORBA::Long Document_impl::countCylinder() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countCylinder();
+// }
+// 
+// 
+// Cylinder_ptr Document_impl::getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Cylinder* c = _document_cpp->getCylinder(i);
+//   Cylinder_impl* servantCorba = new Cylinder_impl(c);
+//   return servantCorba->_this();
+// }
+
+
+Pipe_ptr Document_impl::addPipe( Vertex_ptr baseIn, Vector_ptr directionIn,
+                  ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height)
+throw (SALOME::SALOME_Exception)
+{
+  Pipe_ptr result = Pipe::_nil();
+
+  Vertex_impl* baseServant      = ::DownCast<Vertex_impl*>( baseIn );
+  Vector_impl* directionServant = ::DownCast<Vector_impl*>( directionIn );
+  ASSERT( baseServant );
+  ASSERT( directionServant );
+
+  if ( baseServant &&  directionServant ) {
+    HEXA_NS::Vertex* base = baseServant->GetImpl();
+    HEXA_NS::Vector* direction = directionServant->GetImpl();
+    HEXA_NS::Pipe* c = _document_cpp->addPipe( base, direction, int_radius, ext_radius, height );
+    if ( c!= NULL ){
+      Pipe_impl* servantCorba = new Pipe_impl(c);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+// ::CORBA::Long Document_impl::countPipe() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countPipe();
+// }
+// 
+// Pipe_ptr Document_impl::getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Pipe* p = _document_cpp->getPipe(i);
+//   Pipe_impl* servantCorba = new Pipe_impl(p);
+//   return servantCorba->_this();
+// }
+
+::CORBA::Boolean Document_impl::removeHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception)
+{
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hIn );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    int ok = _document_cpp->removeHexa(h);
+    if ( ok == HOK )
+      return true;
+    else
+      return false;
+  }
+}
+
+
+::CORBA::Boolean Document_impl::removeConnectedHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception)
+{
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hIn );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    int ok = _document_cpp->removeConnectedHexa(h);
+    if ( ok == HOK )
+      return true;
+    else
+      return false; 
+  }
+}
+
+
+Elements_ptr Document_impl::makeCartesian( Vertex_ptr ptIn,
+                            Vector_ptr vxIn, Vector_ptr vyIn, Vector_ptr vzIn,
+                            ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptInServant = ::DownCast<Vertex_impl*>( ptIn);
+  Vector_impl* vxInServant = ::DownCast<Vector_impl*>( vxIn );
+  Vector_impl* vyInServant = ::DownCast<Vector_impl*>( vyIn );
+  Vector_impl* vzInServant = ::DownCast<Vector_impl*>( vzIn );
+  ASSERT( ptInServant );
+  ASSERT( vxInServant );
+  ASSERT( vyInServant );
+  ASSERT( vzInServant );
+
+  if ( ptInServant &&  vxInServant &&  vyInServant && vzInServant ){
+    HEXA_NS::Vertex* pt = ptInServant->GetImpl();
+    HEXA_NS::Vector* vx = vxInServant->GetImpl();
+    HEXA_NS::Vector* vy = vyInServant->GetImpl();
+    HEXA_NS::Vector* vz = vzInServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->makeCartesian(
+        pt,
+        vx, vy, vz,
+        nx, ny, nz );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+
+}
+
+
+
+Elements_ptr Document_impl::makeCartesian1(
+    Vertex_ptr vxIn, 
+    Vector_ptr vr1In,
+    ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz,
+    ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz )
+    throw(SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* vxInServant  = ::DownCast<Vertex_impl*>( vxIn );
+  Vector_impl* vr1InServant = ::DownCast<Vector_impl*>( vr1In );
+  ASSERT( vxInServant );
+  ASSERT( vr1InServant );
+
+  if ( vxInServant &&  vr1InServant ){
+    HEXA_NS::Vertex* vx  = vxInServant->GetImpl();
+    HEXA_NS::Vector* vr1 = vr1InServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->makeCartesian(
+        vx,
+        vr1,
+        px, py, pz,
+        mx, my, mz );
+
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeCylindrical( Vertex_ptr ptIn,
+                              Vector_ptr vexIn, Vector_ptr vezIn,
+                              ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl,
+                              ::CORBA::Long nr,   ::CORBA::Long na, ::CORBA::Long nl,
+                              ::CORBA::Boolean fill)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+  Vector_impl* vexServant = ::DownCast<Vector_impl*>( vexIn );
+  Vector_impl* vezServant = ::DownCast<Vector_impl*>( vezIn );
+  ASSERT( ptServant );
+  ASSERT( vexServant );
+  ASSERT( vezServant );
+
+  if ( ptServant && vexServant && vezServant) {
+    HEXA_NS::Vertex* pt  = ptServant->GetImpl();
+    HEXA_NS::Vector* vex = vexServant->GetImpl();
+    HEXA_NS::Vector* vez = vezServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeCylindrical( pt,
+                                          vex, vez,
+                                          dr, da, dl, nr, na, nl, fill );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+// =================================================== makeCylindricals
+Elements_ptr Document_impl::makeCylindricals (Vertex_ptr ptin, 
+                           Vector_ptr vexin, Vector_ptr vezin,
+        const RealVector& tdr, const RealVector& tda, const RealVector& tdl,
+               ::CORBA::Boolean fill)
+        throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptServant  = ::DownCast<Vertex_impl*>( ptin );
+  Vector_impl* vexServant = ::DownCast<Vector_impl*>( vexin );
+  Vector_impl* vezServant = ::DownCast<Vector_impl*>( vezin );
+
+  ASSERT( ptServant );
+  ASSERT( vexServant );
+  ASSERT( vezServant );
+
+  if ( ptServant==NULL  || vexServant == NULL || vezServant== NULL )
+     return result;
+
+  std::vector <CORBA::Double> cdr, cda, cdl;
+  for ( int nro = 0; nro < tdr.length(); nro++) 
+      cdr.push_back (tdr[nro]);
+
+  for ( int nro = 0; nro < tda.length(); nro++) 
+      cda.push_back (tda[nro]);
+
+  for ( int nro = 0; nro < tdl.length(); nro++) 
+      cdl.push_back (tdl[nro]);
+
+  HEXA_NS::Vertex*  pt  = ptServant->GetImpl();
+  HEXA_NS::Vector*  vex = vexServant->GetImpl();
+  HEXA_NS::Vector*  vez = vezServant->GetImpl();
+  HEXA_NS::Elements* grid = _document_cpp->makeCylindricals ( pt, vex, vez, 
+                                                      cdr, cda, cdl, fill );
+  if ( grid != NULL )
+     {
+     Elements_impl* servantCorba = new Elements_impl (grid);
+     result = servantCorba->_this();
+     }
+
+  return result;
+}
+
+
+
+// Elements_ptr Document_impl::makeSpherical( Vertex_ptr ptIn,
+//     ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz,
+//     ::CORBA::Long n)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+//   ASSERT( ptServant );
+// 
+//   if ( ptServant ) {
+//     HEXA_NS::Vertex* pt = ptServant->GetImpl();
+//     HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt,  dx, dy, dz, n );
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+//   }
+// }
+
+Elements_ptr Document_impl::makeSpherical(
+    Vertex_ptr ptIn,
+    ::CORBA::Double rayon,
+    ::CORBA::Long n,
+    ::CORBA::Double k )
+  throw (SALOME::SALOME_Exception) //CS_TODO
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+  ASSERT( ptServant );
+
+  if ( ptServant ) {
+    HEXA_NS::Vertex* pt = ptServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt, rayon, n, k );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+  
+
+
+// Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, Vector_ptr vrIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Cylinder_impl* cylServant = ::DownCast<Cylinder_impl*>( cylIn );
+  Vector_impl* vrServant = ::DownCast<Vector_impl*>( vrIn );
+  ASSERT( cylServant );
+  ASSERT( vrServant );
+
+  if ( cylServant && vrServant ) {
+    HEXA_NS::Cylinder* cyl  = cylServant->GetImpl();
+    HEXA_NS::Vector* vr     = vrServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeCylinder( cyl, vr,  nr, na, nl );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Elements_ptr Document_impl::makePipe( Pipe_ptr pIn, Vector_ptr vrIn,  
+                         ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+   throw (SALOME::SALOME_Exception)
+{
+   Pipe_impl*   pServant  = ::DownCast<Pipe_impl*>( pIn );
+   Vector_impl* vrServant = ::DownCast<Vector_impl*>( vrIn );
+   ASSERT( pServant );
+   if ( pServant ) {
+     HEXA_NS::Pipe*   p   = pServant ->GetImpl();
+     HEXA_NS::Vector* vr  = vrServant->GetImpl();
+     HEXA_NS::Elements* l = _document_cpp->makePipe( p, vr, nr, na, nl );
+     Elements_impl* servantCorba = new Elements_impl(l);
+     return servantCorba->_this();
+   }
+}
+
+
+CrossElements_ptr Document_impl::makeCylinders(Cylinder_ptr c1In, Cylinder_ptr c2In)
+  throw (SALOME::SALOME_Exception)
+{
+  CrossElements_ptr result = CrossElements::_nil();
+
+  Cylinder_impl* c1Servant = ::DownCast<Cylinder_impl*>( c1In );
+  Cylinder_impl* c2Servant = ::DownCast<Cylinder_impl*>( c2In );
+  ASSERT( c1Servant );
+  ASSERT( c2Servant );
+
+  if ( c1Servant && c2Servant ) {
+    HEXA_NS::Cylinder* c1= c1Servant->GetImpl();
+    HEXA_NS::Cylinder* c2= c2Servant->GetImpl();
+
+    HEXA_NS::CrossElements* l = _document_cpp->makeCylinders(c1,c2);
+    if (l != NULL ){
+      CrossElements_impl* servantCorba = new CrossElements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Elements_ptr Document_impl::makePipes( Pipe_ptr p1In, Pipe_ptr p2In)
+   throw (SALOME::SALOME_Exception)
+{
+   Pipe_impl* p1Servant = ::DownCast<Pipe_impl*>( p1In );
+   Pipe_impl* p2Servant = ::DownCast<Pipe_impl*>( p2In );
+   ASSERT( p1Servant );
+   ASSERT( p2Servant );
+   if ( p1Servant && p2Servant ) {
+     HEXA_NS::Pipe* p1= p1Servant->GetImpl();
+     HEXA_NS::Pipe* p2= p2Servant->GetImpl();
+     HEXA_NS::Elements* l = _document_cpp->makePipes( p1, p2);
+     Elements_impl* servantCorba = new Elements_impl(l);
+     return servantCorba->_this();
+   }
+}
+
+
+
+Elements_ptr Document_impl::prismQuad(Quad_ptr qdIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl* qServant   = ::DownCast<Quad_impl*>( qdIn );
+  Vector_impl* vServant = ::DownCast<Vector_impl*>( vIn );
+  ASSERT( qServant );
+  ASSERT( vServant);
+
+  if ( qServant && vServant ) {
+    HEXA_NS::Quad* qd = qServant->GetImpl();
+    HEXA_NS::Vector* v = vServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->prismQuad(qd, v, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+//CS_Bruno
+
+// // loop on meshes
+//       for ( int i = 0; i < theMeshesArray.length(); i++) {
+//         SMESH::SMESH_Mesh_var anInitMesh = theMeshesArray[i];
+//         if ( !anInitMesh->_is_nil() ) {
+//           SMESH_Mesh_i* anInitImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( anInitMesh ).in() );
+//           if ( anInitImpl ) {
+//             ::SMESH_Mesh& aInitLocMesh = anInitImpl->GetImpl();
+
+Elements_ptr Document_impl::prismQuads(const Quads& qdsIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  HEXA_NS::Quads qds;
+  for ( int i = 0; i < qdsIn.length(); i++) {
+    Quad_impl* qServant = ::DownCast<Quad_impl*>( qdsIn[i] );
+    ASSERT( qServant );
+    HEXA_NS::Quad* qd = qServant->GetImpl();
+    qds.push_back(qd);
+  }
+
+  Vector_impl* vServant = ::DownCast<Vector_impl*>( vIn );
+  ASSERT( vServant);
+
+  if ( vServant ) {
+    HEXA_NS::Vector* v = vServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->prismQuads(qds, v, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+Elements_ptr Document_impl::joinQuad(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl* qaServant = ::DownCast<Quad_impl*>( qaIn );
+  Quad_impl* qbServant = ::DownCast<Quad_impl*>( qbIn );
+
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qaServant );
+  ASSERT( qbServant );
+  ASSERT( va1Servant );
+  ASSERT( vb1Servant );
+  ASSERT( va2Servant );
+  ASSERT( vb2Servant );
+
+  if ( qaServant && qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ){
+    HEXA_NS::Quad* qa = qaServant->GetImpl();
+    HEXA_NS::Quad* qb = qbServant->GetImpl();
+    HEXA_NS::Vertex* va1 = va1Servant->GetImpl();
+    HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl();
+    HEXA_NS::Vertex* va2 = va2Servant->GetImpl();
+    HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->joinQuad(qa, qb, va1, vb1, va2, vb2, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+
+Elements_ptr Document_impl::joinQuads(const Quads& qdsIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl*   qbServant  = ::DownCast<Quad_impl*>( qbIn );
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qbServant );
+  ASSERT( va1Servant );
+  ASSERT( vb1Servant );
+  ASSERT( va2Servant );
+  ASSERT( vb2Servant );
+
+  if ( qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ) {
+    HEXA_NS::Quad*    qb = qbServant->GetImpl();
+    HEXA_NS::Vertex* va1 = va1Servant->GetImpl();
+    HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl();
+    HEXA_NS::Vertex* va2 = va2Servant->GetImpl();
+    HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl();
+
+//     MESSAGE("joinQuads  AAAAAAAAAAAAA");
+    HEXA_NS::Quads qds;
+    for ( int i = 0; i < qdsIn.length(); i++) {
+      Quad_impl* qServant = ::DownCast<Quad_impl*>( qdsIn[i] );
+      ASSERT( qServant );
+      HEXA_NS::Quad* qd = qServant->GetImpl();
+      qds.push_back(qd);
+    }
+
+    HEXA_NS::Elements* l = _document_cpp->joinQuads(qds, qb, va1, vb1, va2, vb2, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+
+
+
+
+::CORBA::Long Document_impl::mergeQuads(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In) throw (SALOME::SALOME_Exception)
+{
+  Quad_impl* qaServant = ::DownCast<Quad_impl*>( qaIn );
+  Quad_impl* qbServant = ::DownCast<Quad_impl*>( qbIn );
+
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qaServant );
+  ASSERT( qbServant );
+  //   ASSERT( va1Servant ); Controle supprime Abu 
+  //   ASSERT( vb1Servant );
+  //   ASSERT( va2Servant );
+  //   ASSERT( vb2Servant );
+
+  if ( qaServant && qbServant)
+     {
+     HEXA_NS::Vertex* va1 = NULL;
+     HEXA_NS::Vertex* vb1 = NULL;
+     HEXA_NS::Vertex* va2 = NULL;
+     HEXA_NS::Vertex* vb2 = NULL;
+
+     if (va1Servant && vb1Servant && va2Servant && vb2Servant )
+        {
+        va1 = va1Servant->GetImpl();
+        vb1 = vb1Servant->GetImpl();
+        va2 = va2Servant->GetImpl();
+        vb2 = vb2Servant->GetImpl();
+        }
+
+    HEXA_NS::Quad* qa = qaServant->GetImpl();
+    HEXA_NS::Quad* qb = qbServant->GetImpl();
+
+    return _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2);
+//     HEXA_NS::Elements* l = _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+  }
+}
+
+
+
+::CORBA::Long Document_impl::mergeEdges(Edge_ptr e1In, Edge_ptr e2In, Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception)
+{
+  Edge_impl* e1Servant = ::DownCast<Edge_impl*>( e1In );
+  Edge_impl* e2Servant = ::DownCast<Edge_impl*>( e2In );
+
+  Vertex_impl* v1Servant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2Servant = ::DownCast<Vertex_impl*>( v2In );
+
+  ASSERT( e1Servant );
+  ASSERT( e2Servant );
+  ASSERT( v1Servant );
+  ASSERT( v2Servant );
+
+  if ( e1Servant && e2Servant && v1Servant && v2Servant ){
+    HEXA_NS::Edge* e1 = e1Servant->GetImpl();
+    HEXA_NS::Edge* e2 = e2Servant->GetImpl();
+
+    HEXA_NS::Vertex* v1 = v1Servant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2Servant->GetImpl();
+
+//     HEXA_NS::Elements* l = _document_cpp->mergeEdges(e1, e2, v1, v2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+
+    return _document_cpp->mergeEdges(e1, e2, v1, v2);
+  }
+}
+
+::CORBA::Long Document_impl::mergeVertices(Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception)
+{
+  Vertex_impl* v1Servant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2Servant = ::DownCast<Vertex_impl*>( v2In );
+
+  ASSERT( v1Servant );
+  ASSERT( v2Servant );
+
+  if ( v1Servant && v2Servant ){
+    HEXA_NS::Vertex* v1 = v1Servant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2Servant->GetImpl();
+
+//     HEXA_NS::Elements* l = _document_cpp->mergeVertices(v1, v2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+    return _document_cpp->mergeVertices(v1, v2);
+  }
+}
+
+
+Elements_ptr Document_impl::disconnectQuad(Hexa_ptr hexIn, Quad_ptr quadIn) 
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+//   Quad_ptr result = Quad::_nil();
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hexIn );
+  Quad_impl* qServant = ::DownCast<Quad_impl*>( quadIn );
+
+  ASSERT( hServant );
+  ASSERT( qServant );
+
+  if ( hServant && qServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Quad* q = qServant->GetImpl();
+
+    HEXA_NS::Elements* elements = _document_cpp->disconnectQuad(h, q);
+    if (elements != NULL ){
+       Elements_impl* servantCorba = new Elements_impl(elements);
+       result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Elements_ptr Document_impl::disconnectEdge(Hexa_ptr hexIn, Edge_ptr edgeIn) 
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hexIn );
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( edgeIn );
+
+  ASSERT( hServant );
+  ASSERT( eServant );
+
+  if ( hServant && eServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Edge* e = eServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->disconnectEdge(h, e);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Elements_ptr Document_impl::disconnectVertex(Hexa_ptr hexIn, Vertex_ptr vxIn) 
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Hexa_impl* hServant   = ::DownCast<Hexa_impl*>( hexIn );
+  Vertex_impl* vServant = ::DownCast<Vertex_impl*>( vxIn );
+
+  ASSERT( hServant );
+  ASSERT( vServant );
+
+  if ( hServant && vServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Vertex* v = vServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->disconnectVertex(h, v);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+// ====================================================== disconnectEdges
+Elements_ptr Document_impl::disconnectEdges (const Hexas& hexas_in, 
+                                             const Edges& edges_in) 
+             throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+   std::vector <HEXA_NS::Hexa*> tab_hexas;
+   for (int i = 0; i < hexas_in.length(); i++) 
+       {
+       Hexa_impl* im_hexa = ::DownCast<Hexa_impl*> ( hexas_in[i] );
+       ASSERT( im_hexa );
+       HEXA_NS::Hexa* un_hexa = im_hexa->GetImpl();
+       tab_hexas.push_back (un_hexa);
+       }
+
+   std::vector <HEXA_NS::Edge*> tab_edges;
+   for (int i = 0; i < edges_in.length(); i++) 
+       {
+       Edge_impl* im_edge = ::DownCast<Edge_impl*> ( edges_in[i] );
+       ASSERT( im_edge );
+       HEXA_NS::Edge* un_edge = im_edge->GetImpl();
+       tab_edges.push_back (un_edge);
+       }
+
+   HEXA_NS::Elements* r = _document_cpp->disconnectEdges (tab_hexas, tab_edges);
+
+   if ( r!= NULL )
+      {
+      Elements_impl* servantCorba = new Elements_impl (r);
+      result = servantCorba->_this();
+      }
+
+  return result;
+}
+// ====================================================== cut
+Elements_ptr Document_impl::cut(Edge_ptr eIn, ::CORBA::Long nb_of_cuts) 
+                            throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( eIn );
+  ASSERT( eServant );
+
+  if ( eServant ){
+    HEXA_NS::Edge* e = eServant->GetImpl();
+    HEXA_NS::Elements* r = _document_cpp->cut(e, nb_of_cuts);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+  ASSERT( lServant );
+  ASSERT( vecServant );
+
+  if ( lServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeTranslation(l, vec);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeRotation(l, p, vec, angle);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+void Document_impl::performTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant  = ::DownCast<Elements_impl*>( lIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( vecServant );
+
+  if ( lServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performTranslation(l, vec);
+  }
+}
+
+
+void Document_impl::performRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performRotation(l, p, vec, angle);
+  }
+}
+
+Group_ptr Document_impl::addHexaGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addQuadGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Group_ptr Document_impl::addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Group_ptr Document_impl::addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::VertexNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Long Document_impl::removeGroup(Group_ptr gIn) throw (SALOME::SALOME_Exception)
+{
+  Group_impl* gInServant = ::DownCast<Group_impl*>( gIn );
+  ASSERT( gInServant );
+
+  if ( gInServant ) {
+    HEXA_NS::Group* g = gInServant->GetImpl();
+    int ok = _document_cpp->removeGroup(g);
+    return ok;
+  }
+}
+
+::CORBA::Long Document_impl::countGroup() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countGroup();
+}
+
+
+Group_ptr Document_impl::getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result  = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->getGroup(i);
+  if ( g != NULL ){ //CS_TODO 
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::findGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result  = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->findGroup(name);
+  if ( g != NULL ){ //CS_TODO 
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Law_ptr Document_impl::addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result  = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->addLaw(name, nb_nodes);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this(); 
+  }
+
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countLaw() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countLaw();
+}
+
+Law_ptr Document_impl::getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->getLaw(i);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+void Document_impl::removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception)
+{
+  Law_impl* lServant = ::DownCast<Law_impl*>(l);
+  ASSERT( lServant );
+  if ( lServant ) {
+    HEXA_NS::Law* l = lServant->GetImpl();
+    _document_cpp->removeLaw(l);
+  }
+}
+
+
+
+Law_ptr Document_impl::findLaw(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result  = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->findLaw(name);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this();
+  }
+
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countPropagation() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countPropagation();
+}
+
+
+Propagation_ptr Document_impl::getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Propagation_ptr result  = Propagation::_nil();
+
+  HEXA_NS::Propagation* p = _document_cpp->getPropagation(i);
+//   //CS_Test
+// 
+//   const HEXA_NS::Edges& edges_cpp = p->getEdges();
+// 
+// //   HEXA_NS::Edges::const_iterator itertest = edges_cpp.begin();
+// //   itertest != edges_cpp.end();
+//   for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin();
+//     iter != edges_cpp.end();
+//         ++iter ){
+//     *iter;
+//   }
+//   //CS_Test
+
+  if ( p != NULL ){
+    Propagation_impl* servantCorba = new Propagation_impl(p);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Propagation_ptr Document_impl::findPropagation(Edge_ptr eIn) throw (SALOME::SALOME_Exception)
+{
+  Propagation_ptr result  = Propagation::_nil();
+
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( eIn );
+  ASSERT( eServant );
+
+  if ( eServant ) {
+    HEXA_NS::Edge* e= eServant->GetImpl();
+
+    HEXA_NS::Propagation* p = _document_cpp->findPropagation(e);
+    if ( p != NULL ){
+      Propagation_impl* servantCorba = new Propagation_impl(p);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+// ======================================================= associateOpenedLine
+::CORBA::Long Document_impl::associateOpenedLine (Edge_ptr   mstart, 
+                            const Edges&          mline, 
+                            GEOM::GEOM_Object_ptr gstart, 
+                            ::CORBA::Double       pstart, 
+                            const Shapes&         gline, 
+                            ::CORBA::Double       pend) 
+                      throw (SALOME::SALOME_Exception)
+{
+   Edge_impl* im_start = ::DownCast<Edge_impl*>( mstart );
+
+   ASSERT ( im_start );
+   if (im_start == NULL)
+      return HERR;
+
+   std::vector <HEXA_NS::Edge*> md_line;
+   for (int i = 0; i < mline.length(); i++) 
+       {
+       Edge_impl* im_edge = ::DownCast<Edge_impl*> ( mline[i] );
+       ASSERT( im_edge );
+       HEXA_NS::Edge* un_edge = im_edge->GetImpl();
+       md_line.push_back (un_edge);
+       }
+
+   TopoDS_Shape shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape(gstart);
+   string       b_rep = shape2string( shape );
+   HEXA_NS::Shape* gg_start = new HEXA_NS::Shape( b_rep );
+
+   std::vector <HEXA_NS::Shape*> gg_line;
+   for (int i = 0; i < gline.length(); i++) 
+       {
+       shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape(gline[i]);
+       b_rep = shape2string( shape );
+       HEXA_NS::Shape* gg_edge = new HEXA_NS::Shape( b_rep );
+       gg_line.push_back (gg_edge);
+       }
+
+                // Call model
+
+  HEXA_NS::Edge* md_start = im_start->GetImpl();
+
+  ::CORBA::Long ier = _document_cpp->associateOpenedLine (md_start, md_line, 
+                                          gg_start, pstart, gg_line, pend);
+  return ier;
+}
+
+// ======================================================= associateClosedLine
+::CORBA::Long Document_impl::associateClosedLine (Vertex_ptr mfirst, 
+                            Edge_ptr                mstart, 
+                            const Edges&            mline, 
+                            GEOM::GEOM_Object_ptr   gstart, 
+                            ::CORBA::Double         pstart, 
+                            ::CORBA::Boolean        inv, 
+                            const Shapes&           gline)
+                      throw (SALOME::SALOME_Exception)
+{
+   std::vector <HEXA_NS::Edge*> md_line;
+   for (int i = 0; i < mline.length(); i++) 
+       {
+       Edge_impl* im_edge = ::DownCast<Edge_impl*> ( mline[i] );
+       ASSERT( im_edge );
+       HEXA_NS::Edge* un_edge = im_edge->GetImpl();
+       md_line.push_back (un_edge);
+       }
+
+   TopoDS_Shape shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape(gstart);
+   string       b_rep = shape2string( shape );
+   HEXA_NS::Shape* gg_start = new HEXA_NS::Shape( b_rep );
+
+   std::vector <HEXA_NS::Shape*> gg_line;
+   for (int i = 0; i < gline.length(); i++) 
+       {
+       shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape(gline[i]);
+       b_rep = shape2string( shape );
+       HEXA_NS::Shape* gg_edge = new HEXA_NS::Shape( b_rep );
+       gg_line.push_back (gg_edge);
+       }
+
+                // Call model
+
+  Edge_impl*   im_start = ::DownCast<Edge_impl*>  ( mstart );
+  Vertex_impl* im_first = ::DownCast<Vertex_impl*>( mfirst );
+
+  HEXA_NS::Vertex* md_first = im_first->GetImpl();
+  HEXA_NS::Edge*   md_start = im_start->GetImpl();
+
+  printf (" +++ HexDocument_impl.cxx : Appel de associateClosedLine \n");
+
+  ::CORBA::Long ier = _document_cpp->associateClosedLine (md_first, md_start, 
+                                     md_line, gg_start, pstart, inv, gg_line);
+  HexDisplay (ier);
+  return ier;
+}
+// ---------------------------------------------- Ajouts Abu Sept 2011
+// ===================================================== setShape
+void Document_impl::setShape (GEOM::GEOM_Object_ptr geom_object)
+  throw(SALOME::SALOME_Exception)
+{
+  TopoDS_Shape shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()
+                       ->geomObjectToShape(geom_object);
+  CORBA::String_var anIOR = HEXABLOCK_Gen_i::GetORB()->object_to_string( geom_object);
+
+  string strBrep = shape2string( shape );
+  std::cout << "setShape ---------> len(strBrep) = "
+            << strBrep.size() << std::endl;
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+
+  s->ior   = anIOR.in(); 
+  s->ident = geom_object->GetStudyEntry();
+
+  std::cout << " ............  Shape creee" << std::endl;
+  _document_cpp->setShape (s);
+  std::cout << " ............  Shape associee" << std::endl;
+}
+// ===================================================== getShape
+GEOM::GEOM_Object_ptr Document_impl::getShape ()
+  throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::Shape* s = _document_cpp->getShape ();
+  CORBA::Object_var corbaObj;
+  GEOM::GEOM_Object_var geomObj; // = new GEOM::GEOM_Object;
+
+  if (s != NULL)
+     {
+     if ( !s->ior.empty() )
+        { // geom object from current session
+        corbaObj = HEXABLOCK_Gen_i::GetORB()->string_to_object( s->ior.c_str() );
+        if ( !CORBA::is_nil( corbaObj ) )
+           {
+           geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+           }
+        } 
+      else  // no geom object => we have to built it
+        {
+        geomObj = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->brepToGeomObject( s->getBrep() );
+        }
+      }
+  return geomObj._retn();
+}
+
+
+/* ***********************************************************
+  GEOM::GEOM_Object_var result; // = new GEOM::GEOM_Object;
+
+  HEXA_NS::Shape* s = _document_cpp->getShape();
+
+  std::cout << "getShape ->" << s << std::endl;
+
+  if (s != NULL)
+     {
+     string strBrep = s->getBrep();
+     std::cout << "getShape -->len (getBrep) = " 
+               << strBrep.size() << std::endl;
+     TopoDS_Shape shape = string2shape( strBrep );
+     std::cout << "getShape -->string2shape->" << std::endl;
+     result = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->shapeToGeomObject(shape);
+     std::cout << "getShape -->GetHEXABLOCKGen--" << std::endl;
+     }
+
+  return result._retn();
+  **************************************************************** */
+// ===================================================== getBrep
+char* Document_impl::getBrep () throw (SALOME::SALOME_Exception)
+{
+   const char* brep = NULL;
+
+   HEXA_NS::Shape* shape = _document_cpp->getShape();
+   if (shape != NULL)
+       {    
+       string b_rep = shape->getBrep();
+       brep = b_rep.c_str();
+       // brep = shape->getBrep().c_str();
+       }    
+     
+  if (brep == NULL)
+      brep = "";
+  return CORBA::string_dup (brep);
+}
+// ===================================================== getName
+char* Document_impl::getName () throw (SALOME::SALOME_Exception)
+{
+  const char* name = _document_cpp->getName();
+  return CORBA::string_dup (name);
+}
+// ===================================================== countUsedVertex
+::CORBA::Long Document_impl::countUsedVertex() 
+         throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countUsedVertex();
+}
+// ===================================================== getUsedVertex
+Vertex_ptr Document_impl::getUsedVertex(::CORBA::Long i) 
+        throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result   = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _document_cpp->getUsedVertex(i);
+  if ( v != NULL )
+     {
+     Vertex_impl* servantCorba = new Vertex_impl(v);
+     result = servantCorba->_this();
+     }
+  return result;
+}
+// ===================================================== countUsedEdge
+::CORBA::Long Document_impl::countUsedEdge() 
+         throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countUsedEdge();
+}
+// ===================================================== getUsedEdge
+Edge_ptr Document_impl::getUsedEdge(::CORBA::Long i) 
+        throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result   = Edge::_nil();
+
+  HEXA_NS::Edge* v = _document_cpp->getUsedEdge(i);
+  if ( v != NULL )
+     {
+     Edge_impl* servantCorba = new Edge_impl(v);
+     result = servantCorba->_this();
+     }
+  return result;
+}
+// ===================================================== countUsedQuad
+::CORBA::Long Document_impl::countUsedQuad() 
+         throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countUsedQuad();
+}
+// ===================================================== getUsedQuad
+Quad_ptr Document_impl::getUsedQuad(::CORBA::Long i) 
+        throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result   = Quad::_nil();
+
+  HEXA_NS::Quad* v = _document_cpp->getUsedQuad(i);
+  if ( v != NULL )
+     {
+     Quad_impl* servantCorba = new Quad_impl(v);
+     result = servantCorba->_this();
+     }
+  return result;
+}
+// ===================================================== countUsedHexa
+::CORBA::Long Document_impl::countUsedHexa() 
+         throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countUsedHexa();
+}
+// ===================================================== getUsedHexa
+Hexa_ptr Document_impl::getUsedHexa(::CORBA::Long i) 
+        throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result   = Hexa::_nil();
+
+  HEXA_NS::Hexa* v = _document_cpp->getUsedHexa(i);
+  if ( v != NULL )
+     {
+     Hexa_impl* servantCorba = new Hexa_impl(v);
+     result = servantCorba->_this();
+     }
+  return result;
+}
+// ===================================================== addHexa5Quads
+Hexa_ptr Document_impl::addHexa5Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, 
+                                       Quad_ptr q4, Quad_ptr q5)
+                        throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1 );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2 );
+  Quad_impl* q3InServant = ::DownCast<Quad_impl*>( q3 );
+  Quad_impl* q4InServant = ::DownCast<Quad_impl*>( q4 );
+  Quad_impl* q5InServant = ::DownCast<Quad_impl*>( q5 );
+
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+  ASSERT( q3InServant );
+  ASSERT( q4InServant );
+  ASSERT( q5InServant );
+
+  if (q1InServant && q2InServant && q3InServant && q4InServant && q5InServant)
+     {
+     HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+     HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+     HEXA_NS::Quad* q3 = q3InServant->GetImpl();
+     HEXA_NS::Quad* q4 = q4InServant->GetImpl();
+     HEXA_NS::Quad* q5 = q5InServant->GetImpl();
+     HEXA_NS::Hexa* h = _document_cpp->addHexa5Quads (q1, q2, q3, q4, q5);
+
+     if ( h != NULL )
+        {
+        Hexa_impl* servantCorba = new Hexa_impl(h);
+        result = servantCorba->_this();
+        }
+     }
+  return result;
+}
+// ===================================================== addHexa4Quads
+Hexa_ptr Document_impl::addHexa4Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, 
+                                       Quad_ptr q4)
+                        throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1 );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2 );
+  Quad_impl* q3InServant = ::DownCast<Quad_impl*>( q3 );
+  Quad_impl* q4InServant = ::DownCast<Quad_impl*>( q4 );
+
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+  ASSERT( q3InServant );
+  ASSERT( q4InServant );
+
+  if (q1InServant && q2InServant && q3InServant && q4InServant)
+     {
+     HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+     HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+     HEXA_NS::Quad* q3 = q3InServant->GetImpl();
+     HEXA_NS::Quad* q4 = q4InServant->GetImpl();
+     HEXA_NS::Hexa* h = _document_cpp->addHexa4Quads (q1, q2, q3, q4);
+
+     if ( h != NULL )
+        {
+        Hexa_impl* servantCorba = new Hexa_impl(h);
+        result = servantCorba->_this();
+        }
+     }
+  return result;
+}
+// ===================================================== addHexa3Quads
+Hexa_ptr Document_impl::addHexa3Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3)
+                        throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1 );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2 );
+  Quad_impl* q3InServant = ::DownCast<Quad_impl*>( q3 );
+
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+  ASSERT( q3InServant );
+
+  if (q1InServant && q2InServant && q3InServant)
+     {
+     HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+     HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+     HEXA_NS::Quad* q3 = q3InServant->GetImpl();
+     HEXA_NS::Hexa* h = _document_cpp->addHexa3Quads (q1, q2, q3);
+
+     if ( h != NULL )
+        {
+        Hexa_impl* servantCorba = new Hexa_impl(h);
+        result = servantCorba->_this();
+        }
+     }
+
+  return result;
+}
+// ===================================================== addHexa2Quads
+Hexa_ptr Document_impl::addHexa2Quads (Quad_ptr q1, Quad_ptr q2)
+                        throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1 );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2 );
+
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+
+  if (q1InServant && q2InServant)
+     {
+     HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+     HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+     HEXA_NS::Hexa* h = _document_cpp->addHexa2Quads (q1, q2);
+
+     if ( h != NULL )
+        {
+        Hexa_impl* servantCorba = new Hexa_impl(h);
+        result = servantCorba->_this();
+        }
+     }
+
+  return result;
+}
+
+// ===================================================== removeQuad
+::CORBA::Boolean Document_impl::removeQuad(Quad_ptr quad) 
+                 throw (SALOME::SALOME_Exception)
+{
+  Quad_impl* hServant = ::DownCast<Quad_impl*>( quad );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Quad* q = hServant->GetImpl();
+    int ok = _document_cpp->removeQuad(q);
+    if ( ok == HOK )
+      return true;
+    else
+      return false;
+  }
+}
+// ===================================================== removeElements
+::CORBA::Boolean Document_impl::removeElements(Elements_ptr bloc) 
+                 throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* hServant = ::DownCast<Elements_impl*>( bloc );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Elements* q = hServant->GetImpl();
+    int ok = _document_cpp->removeElements(q);
+    if ( ok == HOK )
+      return true;
+    else
+      return false;
+  }
+}
+// ===================================================== revolutionQuads
+Elements_ptr Document_impl::revolutionQuads (const Quads& start, 
+                                    Vertex_ptr center, Vector_ptr axis, 
+                                    const RealVector &angles)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+   Vector_impl* v_axis   = ::DownCast<Vector_impl*> (axis);
+   Vertex_impl* v_center = ::DownCast<Vertex_impl*> (center);
+
+   ASSERT (v_axis);
+   ASSERT (v_center);
+
+   if (v_axis==NULL || v_center==NULL)
+      return result;
+
+   HEXA_NS::Quads t_start;
+   for ( int nq = 0; nq < start.length(); nq++) 
+       {
+       Quad_impl* v_quad = ::DownCast<Quad_impl*> (start[nq]);
+       ASSERT( v_quad );
+       HEXA_NS::Quad* i_quad = v_quad->GetImpl();
+       t_start.push_back(i_quad);
+       }
+
+   std::vector <CORBA::Double> t_angles;
+   for ( int na = 0; na < angles.length(); na++) 
+       {
+       CORBA::Double alpha = angles[na];
+       t_angles.push_back (alpha);
+       }
+
+   HEXA_NS::Vector*   i_axis   = v_axis  ->GetImpl();
+   HEXA_NS::Vertex*   i_center = v_center->GetImpl();
+   HEXA_NS::Elements* i_elts   = _document_cpp->revolutionQuads (t_start, 
+                                 i_center, i_axis, t_angles);
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== prismQuadsVec
+Elements_ptr Document_impl::prismQuadsVec (const Quads& start, Vector_ptr dir, 
+                                    const RealVector &thaut, ::CORBA::Long opt)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+   Vector_impl* v_dir  = ::DownCast<Vector_impl*> (dir);
+
+   ASSERT (v_dir);
+
+   if (v_dir==NULL)
+      return result;
+
+   HEXA_NS::Quads t_start;
+   for ( int nq = 0; nq < start.length(); nq++) 
+       {
+       Quad_impl* v_quad = ::DownCast<Quad_impl*> (start[nq]);
+       ASSERT( v_quad );
+       HEXA_NS::Quad* i_quad = v_quad->GetImpl();
+       t_start.push_back(i_quad);
+       }
+
+   std::vector <CORBA::Double> t_haut;
+   for ( int na = 0; na < thaut.length(); na++) 
+       {
+       CORBA::Double alpha = thaut[na];
+       t_haut.push_back (alpha);
+       }
+
+   HEXA_NS::Vector*   i_dir  = v_dir  ->GetImpl();
+   HEXA_NS::Elements* i_elts = _document_cpp->prismQuadsVec (t_start, 
+                                 i_dir, t_haut, opt);
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== makeSphere
+
+Elements_ptr Document_impl::replace (const Quads& pattern, 
+                                     Vertex_ptr p1, Vertex_ptr c1, 
+                                     Vertex_ptr p2, Vertex_ptr c2,
+                                     Vertex_ptr p3, Vertex_ptr c3)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+   Vertex_impl* v_p1 = ::DownCast<Vertex_impl*> (p1);
+   Vertex_impl* v_p2 = ::DownCast<Vertex_impl*> (p2);
+   Vertex_impl* v_p3 = ::DownCast<Vertex_impl*> (p3);
+
+   Vertex_impl* v_c1 = ::DownCast<Vertex_impl*> (c1);
+   Vertex_impl* v_c2 = ::DownCast<Vertex_impl*> (c2);
+   Vertex_impl* v_c3 = ::DownCast<Vertex_impl*> (c3);
+
+   ASSERT (v_p1);    ASSERT (v_p2);    ASSERT (v_p3);
+   ASSERT (v_c1);    ASSERT (v_c2);    ASSERT (v_c3);
+
+   if (   v_c1==NULL || v_c2==NULL || v_c3==NULL
+       || v_p1==NULL || v_p2==NULL || v_p3==NULL)
+      return result;
+
+   HEXA_NS::Quads t_pattern;
+   for ( int nq = 0; nq < pattern.length(); nq++) 
+       {
+       Quad_impl* v_quad = ::DownCast<Quad_impl*> (pattern[nq]);
+       ASSERT( v_quad );
+       HEXA_NS::Quad* i_quad = v_quad->GetImpl();
+       t_pattern.push_back(i_quad);
+       }
+
+
+   HEXA_NS::Vertex*   i_p1 = v_p1->GetImpl();
+   HEXA_NS::Vertex*   i_p2 = v_p2->GetImpl();
+   HEXA_NS::Vertex*   i_p3 = v_p3->GetImpl();
+
+   HEXA_NS::Vertex*   i_c1 = v_c1->GetImpl();
+   HEXA_NS::Vertex*   i_c2 = v_c2->GetImpl();
+   HEXA_NS::Vertex*   i_c3 = v_c3->GetImpl();
+
+   HEXA_NS::Elements* i_elts   = _document_cpp->replace (t_pattern, 
+                                       i_p1, i_c1, i_p2, i_c2, i_p3, i_c3);
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== makeSphere
+Elements_ptr Document_impl::makeSphere (Vertex_ptr center, Vector_ptr vx, 
+                            Vector_ptr vz, ::CORBA::Double radius, 
+                            ::CORBA::Double radhole, Vertex_ptr plorig, 
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+   Vertex_impl* v_center = ::DownCast<Vertex_impl*> (center);
+   Vertex_impl* v_orig   = ::DownCast<Vertex_impl*> (plorig);
+   Vector_impl* v_x      = ::DownCast<Vector_impl*> (vx);
+   Vector_impl* v_z      = ::DownCast<Vector_impl*> (vz);
+
+   ASSERT (v_center);
+   ASSERT (v_orig);
+   ASSERT (v_x);
+   ASSERT (v_z);
+
+   HEXA_NS::Vertex* i_center = v_center->GetImpl();
+   HEXA_NS::Vertex* i_orig   = v_orig  ->GetImpl();
+   HEXA_NS::Vector* i_x      = v_x     ->GetImpl();
+   HEXA_NS::Vector* i_z      = v_z     ->GetImpl();
+
+   HEXA_NS::Elements* i_elts  = _document_cpp->makeSphere (i_center, i_x, i_z,
+                                radius, radhole, i_orig, nrad, nang, nhaut);
+
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== makePartSphere
+Elements_ptr Document_impl::makePartSphere (Vertex_ptr center, Vector_ptr vx, 
+                            Vector_ptr vz, ::CORBA::Double  radius, 
+                            ::CORBA::Double radhole,
+                             Vertex_ptr plorig, ::CORBA::Double angle,
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+
+   Vertex_impl* v_center = ::DownCast<Vertex_impl*> (center);
+   Vertex_impl* v_orig   = ::DownCast<Vertex_impl*> (plorig);
+   Vector_impl* v_x      = ::DownCast<Vector_impl*> (vx);
+   Vector_impl* v_z      = ::DownCast<Vector_impl*> (vz);
+
+   ASSERT (v_center);
+   ASSERT (v_orig);
+   ASSERT (v_x);
+   ASSERT (v_z);
+
+   HEXA_NS::Vertex* i_center = v_center->GetImpl();
+   HEXA_NS::Vertex* i_orig   = v_orig  ->GetImpl();
+   HEXA_NS::Vector* i_x      = v_x     ->GetImpl();
+   HEXA_NS::Vector* i_z      = v_z     ->GetImpl();
+
+   HEXA_NS::Elements* i_elts  = _document_cpp->makePartSphere (i_center, i_x, 
+                      i_z, radius, radhole, i_orig, angle, nrad, nang, nhaut);
+
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== makeRind
+Elements_ptr Document_impl::makeRind (Vertex_ptr center, Vector_ptr vx, 
+                                      Vector_ptr vz, 
+                 ::CORBA::Double  radext, ::CORBA::Double radint, 
+                 ::CORBA::Double radhole, Vertex_ptr plorig, 
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+   Vertex_impl* v_center = ::DownCast<Vertex_impl*> (center);
+   Vertex_impl* v_orig   = ::DownCast<Vertex_impl*> (plorig);
+   Vector_impl* v_x      = ::DownCast<Vector_impl*> (vx);
+   Vector_impl* v_z      = ::DownCast<Vector_impl*> (vz);
+
+   ASSERT (v_center);
+   ASSERT (v_orig);
+   ASSERT (v_x);
+   ASSERT (v_z);
+
+   HEXA_NS::Vertex* i_center = v_center->GetImpl();
+   HEXA_NS::Vertex* i_orig   = v_orig  ->GetImpl();
+   HEXA_NS::Vector* i_x      = v_x     ->GetImpl();
+   HEXA_NS::Vector* i_z      = v_z     ->GetImpl();
+
+   HEXA_NS::Elements* i_elts  = _document_cpp->makeRind (i_center, i_x, i_z, 
+                    radext, radint, radhole, i_orig, nrad, nang, nhaut);
+
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ===================================================== makePartRind
+Elements_ptr Document_impl::makePartRind (Vertex_ptr center, Vector_ptr vx, 
+                                          Vector_ptr vz, 
+                       ::CORBA::Double radext, ::CORBA::Double radint, 
+                       ::CORBA::Double radhole,
+                       Vertex_ptr plorig, ::CORBA::Double angle,
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception)
+{
+   Elements_ptr result = Elements::_nil();
+
+
+   Vertex_impl* v_center = ::DownCast<Vertex_impl*> (center);
+   Vertex_impl* v_orig   = ::DownCast<Vertex_impl*> (plorig);
+   Vector_impl* v_x      = ::DownCast<Vector_impl*> (vx);
+   Vector_impl* v_z      = ::DownCast<Vector_impl*> (vz);
+
+   ASSERT (v_center);
+   ASSERT (v_orig);
+   ASSERT (v_x);
+   ASSERT (v_z);
+
+   HEXA_NS::Vertex* i_center = v_center->GetImpl();
+   HEXA_NS::Vertex* i_orig   = v_orig  ->GetImpl();
+   HEXA_NS::Vector* i_x      = v_x     ->GetImpl();
+   HEXA_NS::Vector* i_z      = v_z     ->GetImpl();
+
+   HEXA_NS::Elements* i_elts = _document_cpp->makePartRind (i_center, i_x, i_z,
+                    radext, radint, radhole, i_orig, angle, nrad, nang, nhaut);
+   if (i_elts != NULL)
+      {
+      Elements_impl* servantCorba = new Elements_impl(i_elts);
+      result = servantCorba->_this();
+      }
+
+   return result;
+}
+// ================================================== makeScale
+Elements_ptr Document_impl::makeScale (Elements_ptr lIn, Vertex_ptr pIn, 
+                                       ::CORBA::Double k)
+                            throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast <Elements_impl*> ( lIn );
+  Vertex_impl*   pServant = ::DownCast <Vertex_impl*>   ( pIn );
+
+  ASSERT (lServant);
+  ASSERT (pServant);
+
+  if ( lServant && pServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeScale(l, p, k);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+// ================================================== makeSymmetryLine
+Elements_ptr Document_impl::makeSymmetryLine (Elements_ptr lIn, Vertex_ptr pIn,
+                                              Vector_ptr vecIn)
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeSymmetryLine(l, p, vec);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+// ================================================== makeSymmetryPlane
+Elements_ptr Document_impl::makeSymmetryPlane (Elements_ptr lIn, Vertex_ptr pIn,
+                                              Vector_ptr vecIn)
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeSymmetryPlane(l, p, vec);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+// ================================================== makeSymmetryPoint
+Elements_ptr Document_impl::makeSymmetryPoint (Elements_ptr lIn, Vertex_ptr pIn)
+             throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+
+  if ( lServant && pServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeSymmetryPoint(l, p);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+// ================================================== performScale
+void Document_impl::performScale (Elements_ptr lIn, Vertex_ptr pIn, 
+                                  ::CORBA::Double k) 
+     throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+
+  if ( lServant && pServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    _document_cpp->performScale (l, p, k);
+  }
+}
+// ================================================== performSymmetryPlane
+void Document_impl::performSymmetryPlane (Elements_ptr lIn, Vertex_ptr pIn, 
+                                          Vector_ptr vecIn) 
+     throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performSymmetryPlane (l, p, vec);
+  }
+}
+// ================================================== performSymmetryLine
+void Document_impl::performSymmetryLine (Elements_ptr lIn, Vertex_ptr pIn, 
+                                          Vector_ptr vecIn) 
+     throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performSymmetryLine (l, p, vec);
+  }
+}
+// ================================================== performSymmetryPoint
+void Document_impl::performSymmetryPoint (Elements_ptr lIn, Vertex_ptr pIn)
+     throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+
+  if ( lServant && pServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    _document_cpp->performSymmetryPoint (l, p);
+  }
+}
+// ================================================== setLevel
+void Document_impl::setLevel(::CORBA::Long debug)
+     throw (SALOME::SALOME_Exception)
+{
+    _document_cpp->setLevel (debug);
+}
+// ================================================== clearAssociation
+void Document_impl::clearAssociation ()
+     throw (SALOME::SALOME_Exception)
+{
+    _document_cpp->clearAssociation ();
+}
diff --git a/src/HEXABLOCK_I/HexDocument_impl.hxx b/src/HEXABLOCK_I/HexDocument_impl.hxx
new file mode 100755 (executable)
index 0000000..9e76f11
--- /dev/null
@@ -0,0 +1,279 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexDocument_impl__
+#define __HexDocument_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Document)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexDocument.hxx"
+
+
+// #define HEXA_NS Hex
+using namespace HEXABLOCK_ORB;
+
+class Document_impl:
+  public POA_HEXABLOCK_ORB::Document,
+  public SALOME::GenericObj_i
+{
+
+public:
+//   Document_impl(HEXA_NS::Document *ptrCpp);
+  Document_impl( PortableServer::POA_ptr thePOA, HEXA_NS::Document *ptrCpp);
+
+  HEXA_NS::Document* GetImpl() throw (SALOME::SALOME_Exception);
+
+  void purge() throw (SALOME::SALOME_Exception);
+  void dump()  throw (SALOME::SALOME_Exception);
+
+  ::CORBA::Long saveVtk (const char* fname)    throw (SALOME::SALOME_Exception);
+  ::CORBA::Long save (const char* fileName)    throw (SALOME::SALOME_Exception);
+  ::CORBA::Long setName (const char* fileName) throw (SALOME::SALOME_Exception);
+   char* getName ()                      throw (SALOME::SALOME_Exception);
+
+
+  void setTolerance(::CORBA::Double tol) throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getTolerance() throw (SALOME::SALOME_Exception);
+  Vertex_ptr addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Vertex_ptr findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  Edge_ptr addEdge(Vertex_ptr v0, Vertex_ptr v1) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception);
+  Edge_ptr getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Edge_ptr findEdge(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception);
+  Quad_ptr addQuad(Edge_ptr e0, Edge_ptr e1, Edge_ptr e2, Edge_ptr e3) throw (SALOME::SALOME_Exception);
+  Quad_ptr addQuadVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception);
+  Quad_ptr getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Quad_ptr findQuad(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexa(Quad_ptr q0, Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4, Quad_ptr q5) throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexaVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3, Vertex_ptr v4, Vertex_ptr v5, Vertex_ptr v6, Vertex_ptr v7) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception);
+  Hexa_ptr getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Hexa_ptr findHexa(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception);
+  Vector_ptr addVector(::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz) throw (SALOME::SALOME_Exception);
+  Vector_ptr addVectorVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countVector() throw (SALOME::SALOME_Exception);
+//   Vector_ptr getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Cylinder_ptr addCylinder(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countCylinder() throw (SALOME::SALOME_Exception);
+//   Cylinder_ptr getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Pipe_ptr addPipe(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countPipe() throw (SALOME::SALOME_Exception);
+//   Pipe_ptr getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean removeHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean removeConnectedHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCartesian(Vertex_ptr pt, Vector_ptr vx, Vector_ptr vy, Vector_ptr vz, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCartesian1(Vertex_ptr v, Vector_ptr v1, ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz, ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeCylindrical(Vertex_ptr pt, Vector_ptr vex, Vector_ptr vez, ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl, ::CORBA::Boolean fill) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeCylindricals (Vertex_ptr pt, Vector_ptr vex, Vector_ptr vez,
+        const RealVector& tdr, const RealVector& tda, const RealVector& tdl,
+               ::CORBA::Boolean fill)
+        throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeSpherical( Vertex_ptr ptIn,
+    ::CORBA::Double rayon, 
+    ::CORBA::Long n,
+    ::CORBA::Double k ) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeCylinder(Cylinder_ptr cyl, Vector_ptr vr, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) throw (SALOME::SALOME_Exception);
+  Elements_ptr makePipe(Pipe_ptr p, Vector_ptr vr, ::CORBA::Long nr, 
+                                 ::CORBA::Long na, ::CORBA::Long nl) 
+                throw (SALOME::SALOME_Exception);
+
+//   Elements_ptr makeCylinders(Cylinder_ptr c1, Cylinder_ptr c2) throw (SALOME::SALOME_Exception);
+    CrossElements_ptr makeCylinders(Cylinder_ptr cyl1, Cylinder_ptr cyl2) throw (SALOME::SALOME_Exception);
+
+   Elements_ptr makePipes(Pipe_ptr p1, Pipe_ptr p2) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr prismQuad(Quad_ptr qd, Vector_ptr v, ::CORBA::Long nb)
+               throw (SALOME::SALOME_Exception);
+  Elements_ptr prismQuads(const Quads& qds, Vector_ptr v, ::CORBA::Long nb)
+               throw (SALOME::SALOME_Exception);
+  Elements_ptr prismQuadsVec(const Quads& qds, Vector_ptr v, 
+                             const RealVector &thaut, ::CORBA::Long opt)
+               throw (SALOME::SALOME_Exception);
+
+  Elements_ptr joinQuad(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+  Elements_ptr joinQuads(const Quads& qds, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+
+  ::CORBA::Long mergeQuads(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long mergeEdges(Edge_ptr e1, Edge_ptr e2, Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long mergeVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr disconnectQuad(Hexa_ptr h, Quad_ptr q) 
+               throw (SALOME::SALOME_Exception);
+  Elements_ptr disconnectEdge(Hexa_ptr h, Edge_ptr e) 
+               throw (SALOME::SALOME_Exception);
+  Elements_ptr disconnectVertex(Hexa_ptr h, Vertex_ptr v) 
+               throw (SALOME::SALOME_Exception);
+
+  Elements_ptr disconnectEdges(const Hexas& th, const Edges& e) 
+               throw (SALOME::SALOME_Exception);
+
+  Elements_ptr cut(Edge_ptr e, ::CORBA::Long nb_of_cuts) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeTranslation(Elements_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+
+Elements_ptr makeRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, 
+                          ::CORBA::Double angle) 
+             throw (SALOME::SALOME_Exception);
+
+Elements_ptr makeScale (Elements_ptr e, Vertex_ptr ver, ::CORBA::Double k) 
+             throw (SALOME::SALOME_Exception);
+Elements_ptr makeSymmetryPoint (Elements_ptr e, Vertex_ptr ver) 
+             throw (SALOME::SALOME_Exception);
+Elements_ptr makeSymmetryLine  (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) 
+             throw (SALOME::SALOME_Exception);
+Elements_ptr makeSymmetryPlane (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec)
+             throw (SALOME::SALOME_Exception);
+
+//   void performTranslation(Element_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+  void performTranslation(Elements_ptr l, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+
+void performRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, ::CORBA::Double angle) throw (SALOME::SALOME_Exception);
+
+void performScale (Elements_ptr e, Vertex_ptr ver, ::CORBA::Double k) 
+     throw (SALOME::SALOME_Exception);
+void performSymmetryPoint (Elements_ptr e, Vertex_ptr ver) 
+     throw (SALOME::SALOME_Exception);
+void performSymmetryLine  (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) 
+     throw (SALOME::SALOME_Exception);
+void performSymmetryPlane (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) 
+     throw (SALOME::SALOME_Exception);
+
+  Group_ptr addHexaGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addQuadGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long removeGroup(Group_ptr g) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countGroup() throw (SALOME::SALOME_Exception);
+  Group_ptr getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Group_ptr findGroup(const char* name) throw (SALOME::SALOME_Exception);
+
+  Law_ptr addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countLaw() throw (SALOME::SALOME_Exception);
+  Law_ptr getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  void removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception);
+  Law_ptr findLaw(const char* name) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countPropagation() throw (SALOME::SALOME_Exception);
+  Propagation_ptr getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Propagation_ptr findPropagation(Edge_ptr e) throw (SALOME::SALOME_Exception);
+
+          // Evols 13/12/2010
+
+ ::CORBA::Long associateOpenedLine (Edge_ptr        mstart, 
+                            const Edges&            mline, 
+                            GEOM::GEOM_Object_ptr   gstart, 
+                            ::CORBA::Double         pstart, 
+                            const Shapes&           gline, 
+                            ::CORBA::Double pend) 
+                      throw (SALOME::SALOME_Exception);
+ ::CORBA::Long associateClosedLine (Vertex_ptr      mfirst, 
+                            Edge_ptr                mstart, 
+                            const Edges&            mline, 
+                            GEOM::GEOM_Object_ptr   gstart, 
+                            ::CORBA::Double         pstart, 
+                            ::CORBA::Boolean        inv, 
+                            const Shapes&           gline)
+                      throw (SALOME::SALOME_Exception);
+
+void setShape (GEOM::GEOM_Object_ptr geom_object)
+                      throw (SALOME::SALOME_Exception);
+GEOM::GEOM_Object_ptr getShape ()
+                      throw (SALOME::SALOME_Exception);
+char*  getBrep ()     throw (SALOME::SALOME_Exception);
+
+          // Evols 05/09/2011
+         //
+  ::CORBA::Long countUsedVertex () throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countUsedEdge   () throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countUsedQuad   () throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countUsedHexa   () throw (SALOME::SALOME_Exception);
+
+  Vertex_ptr getUsedVertex (::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Edge_ptr    getUsedEdge   (::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Quad_ptr    getUsedQuad   (::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Hexa_ptr    getUsedHexa   (::CORBA::Long i) throw (SALOME::SALOME_Exception);
+
+  Hexa_ptr addHexa5Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4, 
+                          Quad_ptr q5)
+           throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexa4Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4)
+           throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexa3Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3)
+           throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexa2Quads (Quad_ptr q1, Quad_ptr q2)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr revolutionQuads (const Quads& start, Vertex_ptr center, 
+                                Vector_ptr axis, const RealVector &angles)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr replace (const Quads& pattern, Vertex_ptr p1, Vertex_ptr c1, 
+                Vertex_ptr p2, Vertex_ptr c2, Vertex_ptr p3, Vertex_ptr c3)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeSphere (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, 
+                         ::CORBA::Double radius, ::CORBA::Double radhole,
+                         Vertex_ptr plorig, 
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makePartSphere (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, 
+                             ::CORBA::Double  radius, ::CORBA::Double radhole,
+                             Vertex_ptr plorig, ::CORBA::Double angle,
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makeRind (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, 
+                       ::CORBA::Double  radext, ::CORBA::Double radint, 
+                       ::CORBA::Double radhole, Vertex_ptr plorig, 
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception);
+
+  Elements_ptr makePartRind (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, 
+                       ::CORBA::Double radext, ::CORBA::Double radint, 
+                       ::CORBA::Double radhole,
+                       Vertex_ptr plorig, ::CORBA::Double angle,
+                 ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut)
+           throw (SALOME::SALOME_Exception);
+public:
+
+  ::CORBA::Boolean removeQuad (Quad_ptr quad) 
+           throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean removeElements (Elements_ptr bloc) 
+           throw (SALOME::SALOME_Exception);
+
+  void setLevel(::CORBA::Long level)       throw (SALOME::SALOME_Exception);
+  void clearAssociation ()                 throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Document *_document_cpp;
+};
+//--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+#endif
diff --git a/src/HEXABLOCK_I/HexEdge_impl.cxx b/src/HEXABLOCK_I/HexEdge_impl.cxx
new file mode 100755 (executable)
index 0000000..83fdc57
--- /dev/null
@@ -0,0 +1,212 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+#include "hexa_base.hxx"
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexShape.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+Edge_impl::Edge_impl( HEXA_NS::Edge *ptrCpp ):
+_edge_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Edge* Edge_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _edge_cpp;
+}
+
+
+::CORBA::Boolean Edge_impl::getWay() throw (SALOME::SALOME_Exception)
+{
+//   bool way = _edge_cpp->getWay();
+//   if ( way == true ) {
+//     return CORBA::TRUE;
+//   else {
+//     return CORBA::FALSE;
+//   }
+  return _edge_cpp->getWay();
+}
+
+
+Vertex_ptr Edge_impl::getVertex(::CORBA::Long n)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _edge_cpp->getVertex(n);
+  if ( v!= NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result ;
+}
+
+
+void Edge_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->dump();
+}
+
+
+void Edge_impl::printName()throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->printName();
+}
+
+char* Edge_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup( _edge_cpp->getName() );
+}
+
+// ========================================================= setName
+void Edge_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->setName (name);
+}
+
+
+
+
+void Edge_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->setScalar(val);
+}
+
+
+::CORBA::Long Edge_impl::addAssociation( GEOM::GEOM_Object_ptr geom_object_1D, double debut, double fin )
+  throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+  TopoDS_Shape aShape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape( geom_object_1D );
+  string      strBrep = shape2string( aShape );
+  CORBA::String_var anIOR = HEXABLOCK_Gen_i::GetORB()->object_to_string( geom_object_1D );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  s->ior   = anIOR.in(); //geom_object_1D->GetStudyEntry(); GetEntry()
+  s->ident = geom_object_1D->GetStudyEntry();
+  s->debut = debut;
+  s->fin   = fin;
+  ok       = _edge_cpp->addAssociation( s );
+
+//   Edge_impl::Assoc assoc;
+//   assoc.geomObj = GEOM::GEOM_Object::_duplicate( geom_object_1D );
+//   assoc.debut   = debut;
+//   assoc.fin     = fin;
+//   _associations.push_back(assoc);
+
+  return ok;
+}
+
+void Edge_impl::clearAssociation()
+      throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->clearAssociation ();
+}
+
+
+
+// EdgeAssociations* Edge_impl::getAssociations() //CS_NOT_SPEC
+//   throw (SALOME::SALOME_Exception)
+// {
+//   HEXABLOCK_ORB::EdgeAssociations* result = new HEXABLOCK_ORB::EdgeAssociations;
+//   result->length( _associations.size() );
+// 
+//   HEXABLOCK_ORB::EdgeAssociation assoc;
+//   CORBA::ULong i = 0;
+//   for ( std::vector<Edge_impl::Assoc>::const_iterator iter = _associations.begin();
+//     iter != _associations.end();
+//         ++iter){
+// //       assoc.geomObj = (*iter).geomObj;
+//       assoc.geomObj = GEOM::GEOM_Object::_duplicate( (*iter).geomObj );
+//       assoc.debut = (*iter).debut;
+//       assoc.fin   = (*iter).fin;
+//       (*result)[i++] = assoc;
+//   }
+//   return result;
+// }
+
+
+
+
+EdgeAssociations* Edge_impl::getAssociations ()
+  throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::EdgeAssociations* result = new HEXABLOCK_ORB::EdgeAssociations;
+//   HEXABLOCK_ORB::GEOM_Object_ptr ge;
+//   GEOM::GEOM_Object_ptr ge;
+  TopoDS_Shape aShape;
+  const std::vector<HEXA_NS::Shape*> shapes = _edge_cpp->getAssociations();
+
+  result->length( shapes.size() );
+  HEXABLOCK_ORB::EdgeAssociation assoc;
+  CORBA::ULong i = 0;
+  CORBA::Object_var corbaObj;
+  GEOM::GEOM_Object_var geomObj;
+
+//   std::cout << "XXXXXXXX shapes "<< shapes.size() << std::endl;
+  for ( std::vector<HEXA_NS::Shape*>::const_iterator iter = shapes.begin();
+       iter != shapes.end();
+        ++iter ){
+//       ge = GEOM::GEOM_Object::_duplicate(HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape )); 
+//       ge = HEXABLOCK_ORB::GEOM_Edge::_duplicate(HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape ));
+//       ge = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
+//       ge->debut( (*iter)->debut );
+//       ge->fin( (*iter)->fin );
+//       assoc.geomObj = GEOM::GEOM_Object::_duplicate( (*iter).geomObj );
+//       aShape = string2shape( (*iter)->getBrep());
+//       assoc.geomObj = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
+
+//       if ( !(*iter)->ior.empty() ){
+//         corbaObj = HEXABLOCK_Gen_i::GetORB()->string_to_object( (*iter)->ior.c_str() );
+//         if ( !CORBA::is_nil( corbaObj ) ){
+//           geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+//           assoc.geomObj = geomObj._retn();
+//           assoc.debut   = (*iter)->debut;
+//           assoc.fin     = (*iter)->fin;
+//           (*result)[ i++ ] = assoc;
+//         }
+//       }
+      assoc.debut   = (*iter)->debut;
+      assoc.fin     = (*iter)->fin;
+
+      if ( !(*iter)->ior.empty() ){ // geom object from current session
+        corbaObj = HEXABLOCK_Gen_i::GetORB()->string_to_object( (*iter)->ior.c_str() );
+        if ( !CORBA::is_nil( corbaObj ) ){
+          geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+          assoc.geomObj = geomObj._retn();
+        }
+      } else { // no geom object => we have to built it
+        assoc.geomObj = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->brepToGeomObject( (*iter)->getBrep() );
+      }
+
+      (*result)[ i++ ] = assoc;
+  }
+  return result;
+}
+
+
diff --git a/src/HEXABLOCK_I/HexEdge_impl.hxx b/src/HEXABLOCK_I/HexEdge_impl.hxx
new file mode 100755 (executable)
index 0000000..7c34a44
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexEdge_impl__
+#define __HexEdge_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Edge)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexEdge.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Edge_impl : public POA_HEXABLOCK_ORB::Edge,
+                 public SALOME::GenericObj_i
+{
+  struct Assoc {
+    GEOM::GEOM_Object_ptr geomObj;
+    double debut;
+    double fin;
+  };
+
+public:
+  Edge_impl(HEXA_NS::Edge *ptrCpp);
+  HEXA_NS::Edge* GetImpl() throw (SALOME::SALOME_Exception);
+
+  ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+//   void setAssociation(GEOM::GEOM_Object_ptr geom_object_1D) throw (SALOME::SALOME_Exception);
+//   GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+  ::CORBA::Long addAssociation( GEOM::GEOM_Object_ptr geom_object_1D, double debut, double fin ) //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+  void clearAssociation() throw (SALOME::SALOME_Exception);
+
+  EdgeAssociations* getAssociations () //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Edge*      _edge_cpp;
+  std::vector<Assoc>  _associations;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexElements_impl.cxx b/src/HEXABLOCK_I/HexElements_impl.cxx
new file mode 100755 (executable)
index 0000000..3058215
--- /dev/null
@@ -0,0 +1,313 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "hexa_base.hxx"
+#include "HexElements_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+
+
+Elements_impl::Elements_impl( HEXA_NS::Elements *ptrCpp ):_elements_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Elements* Elements_impl::GetImpl()
+{
+  return _elements_cpp;
+}
+
+::CORBA::Long Elements_impl::countVertex() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countVertex();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countEdge() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countEdge();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countQuad() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countQuad();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countHexa() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countHexa();
+  return n;
+}
+
+::CORBA::Long Elements_impl::findVertex( Vertex_ptr pIn ) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n;
+  Vertex_impl* pInServant = ::DownCast<Vertex_impl*>( pIn );
+  ASSERT( pInServant );
+  HEXA_NS::Vertex* p = pInServant->GetImpl();
+  n = _elements_cpp->findVertex( p );
+  return n;
+}
+
+
+
+Vertex_ptr Elements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result  = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _elements_cpp->getVertex(n);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Elements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result  = Edge::_nil();
+
+  HEXA_NS::Edge* e = _elements_cpp->getEdge(n);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Elements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _elements_cpp->getQuad(n);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Hexa_ptr Elements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  HEXA_NS::Hexa* h = _elements_cpp->getHexa(n);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Long Elements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _elements_cpp->saveVtk( fname );
+  return ret;
+}
+
+
+void Elements_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _elements_cpp->dump();
+}
+
+
+void Elements_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _elements_cpp->printName();
+}
+
+char* Elements_impl::getName() throw (SALOME::SALOME_Exception)
+{
+   return CORBA::string_dup( _elements_cpp->getName() );
+}
+
+// ========================================================= setName
+void Elements_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _elements_cpp->setName (name);
+}
+
+
+
+
+Vertex_ptr Elements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+  HEXA_NS::Vertex* v = _elements_cpp->getVertexIJK(x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeI(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeJ(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeK(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Elements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadIJ(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr Elements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadIK(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr Elements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadJK(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr Elements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+  HEXA_NS::Hexa* h = _elements_cpp->getHexaIJK(x, y, z);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+// ================================================== clearAssociation
+void Elements_impl::clearAssociation ()
+     throw (SALOME::SALOME_Exception)
+{
+    _elements_cpp->clearAssociation ();
+}
+
+// Quad_ptr Elements_impl::getQuad1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+// 
+// //   EnumCoord k;
+// //   HEXA_NS::EnumCoord k_cpp;
+//   HEXA_NS::EnumCoord dir_cpp;
+// 
+//   switch (dirIn) {
+//     case DIR_X : dir_cpp = HEXA_NS::dir_x; break;
+//     case DIR_Y : dir_cpp = HEXA_NS::dir_y; break;
+//     case DIR_Z : dir_cpp = HEXA_NS::dir_z; break;
+//     case DIM3:   dir_cpp = HEXA_NS::DIM3; break;
+//   }
+// 
+//   HEXA_NS::Quad* q = _elements_cpp->getQuad(dir_cpp, nx, ny, nz);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+// 
+//   return result;
+// }
+// 
+// Edge_ptr Elements_impl::getEdge1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+// 
+// //   EnumCoord k;
+// //   HEXA_NS::EnumCoord k_cpp;
+//   HEXA_NS::EnumCoord dir_cpp;
+// 
+//   switch (dirIn) {
+//     case DIR_X : dir_cpp = HEXA_NS::dir_x; break;
+//     case DIR_Y : dir_cpp = HEXA_NS::dir_y; break;
+//     case DIR_Z : dir_cpp = HEXA_NS::dir_z; break;
+//     case DIM3:   dir_cpp = HEXA_NS::DIM3; break;
+//   }
+// 
+//   HEXA_NS::Edge* e = _elements_cpp->getEdge(dir_cpp, nx, ny, nz);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+// 
+//   return result;
+// }
+
diff --git a/src/HEXABLOCK_I/HexElements_impl.hxx b/src/HEXABLOCK_I/HexElements_impl.hxx
new file mode 100755 (executable)
index 0000000..f8443b9
--- /dev/null
@@ -0,0 +1,84 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexElements_impl__
+#define __HexElements_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Elements)
+// #include CORBA_SERVER_HEADER(Vertex)
+// #include CORBA_SERVER_HEADER(Edge)
+// #include CORBA_SERVER_HEADER(Quad)
+// #include CORBA_SERVER_HEADER(Hexa)
+
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexElements.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Elements_impl : public POA_HEXABLOCK_ORB::Elements,
+                     public SALOME::GenericObj_i
+{
+public:
+    Elements_impl(HEXA_NS::Elements *ptrCpp);
+    HEXA_NS::Elements* GetImpl();
+
+    ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long findVertex( Vertex_ptr p ) throw (SALOME::SALOME_Exception);
+    Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Hexa_ptr getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+
+    Vertex_ptr getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Edge_ptr getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Quad_ptr getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Hexa_ptr getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+//     Quad_ptr getQuad1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception);
+// 
+//     Edge_ptr getEdge1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+    void  dump()                             throw (SALOME::SALOME_Exception);
+    void  printName()                        throw (SALOME::SALOME_Exception);
+    char* getName()                          throw (SALOME::SALOME_Exception);
+    void  setName (const char* name)         throw (SALOME::SALOME_Exception);
+    void  clearAssociation ()                throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Elements *_elements_cpp;
+//   void *_elements_cpp;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexGroup_impl.cxx b/src/HEXABLOCK_I/HexGroup_impl.cxx
new file mode 100755 (executable)
index 0000000..d675f21
--- /dev/null
@@ -0,0 +1,161 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexEltBase.hxx"
+#include "HexGroup.hxx"
+
+#include "HexElements_impl.hxx"
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexGroup_impl.hxx"
+
+Group_impl::Group_impl( HEXA_NS::Group *ptrCpp ):_group_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Group* Group_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _group_cpp;
+}
+
+char* Group_impl::getName() throw (SALOME::SALOME_Exception)
+{
+   return CORBA::string_dup (_group_cpp->getName());
+}
+
+void Group_impl::setName(const char* name) throw (SALOME::SALOME_Exception)
+{
+  _group_cpp->setName( name );
+}
+
+
+GroupKind Group_impl::getKind() throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::EnumGroup k = _group_cpp->getKind();
+
+  switch (k){
+    case HEXA_NS::HexaCell:  return HEXA_GROUP;
+    case HEXA_NS::QuadCell:  return QUAD_GROUP;
+    case HEXA_NS::EdgeCell:  return EDGE_GROUP;
+    case HEXA_NS::HexaNode:  return HEXANODE_GROUP;
+    case HEXA_NS::QuadNode:  return QUADNODE_GROUP;
+    case HEXA_NS::EdgeNode:  return EDGENODE_GROUP;
+    case HEXA_NS::VertexNode:  return VERTEXNODE_GROUP;
+    default : ASSERT(false);
+  }
+}
+
+
+::CORBA::Long  Group_impl::addElement(Element_ptr eIn) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+  Vertex_impl* vInServant = ::DownCast<Vertex_impl*>( eIn );
+  Edge_impl*   eInServant = ::DownCast<Edge_impl*>( eIn );
+  Quad_impl*   qInServant = ::DownCast<Quad_impl*>( eIn );
+  Hexa_impl*   hInServant = ::DownCast<Hexa_impl*>( eIn );
+
+  ASSERT( vInServant or eInServant or qInServant or hInServant );
+  HEXA_NS::EltBase* e = NULL;
+  if ( vInServant ) {
+    e = vInServant->GetImpl();
+  } else if ( eInServant ) {
+    e = eInServant->GetImpl();
+  } else if ( qInServant ) {
+    e = qInServant->GetImpl();
+  } else if ( hInServant ) {
+    e = hInServant->GetImpl();
+  }
+  ok = _group_cpp->addElement(e);
+
+  return ok;
+}
+
+
+::CORBA::Long Group_impl::countElement() throw (SALOME::SALOME_Exception)
+{
+  return _group_cpp->countElement();
+}
+
+
+Element_ptr Group_impl::getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::EltBase* elt = _group_cpp->getElement(index);
+
+  HEXA_NS::Vertex* v = dynamic_cast<HEXA_NS::Vertex*>(elt);
+  HEXA_NS::Edge* e   = dynamic_cast<HEXA_NS::Edge*>(elt);
+  HEXA_NS::Quad* q   = dynamic_cast<HEXA_NS::Quad*>(elt);
+  HEXA_NS::Hexa* h   = dynamic_cast<HEXA_NS::Hexa*>(elt);
+
+  ASSERT( v or e or q or h );
+
+  if (v){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    return servantCorba->_this();
+  } else if (e){
+    Edge_impl*   servantCorba = new Edge_impl(e);
+    return servantCorba->_this();
+  } else if (q){
+    Quad_impl*   servantCorba = new Quad_impl(q);
+    return servantCorba->_this();
+  } else if (h){
+    Hexa_impl*   servantCorba = new Hexa_impl(h);
+    return servantCorba->_this();
+  } else {
+    return Element::_nil();
+  }
+}
+
+
+::CORBA::Long Group_impl::removeElement(Element_ptr eIn) 
+                          throw (SALOME::SALOME_Exception)
+{
+  Vertex_impl* vInServant = ::DownCast<Vertex_impl*>( eIn );
+  Edge_impl*   eInServant = ::DownCast<Edge_impl*  >( eIn );
+  Quad_impl*   qInServant = ::DownCast<Quad_impl*  >( eIn );
+  Hexa_impl*   hInServant = ::DownCast<Hexa_impl*  >( eIn );
+
+  ASSERT( vInServant or eInServant or qInServant or hInServant );
+  HEXA_NS::EltBase* elt = NULL;
+  if (vInServant != NULL)
+       elt = vInServant->GetImpl();
+  else if (eInServant != NULL) 
+       elt = eInServant->GetImpl();
+  else if (qInServant != NULL)
+       elt = qInServant->GetImpl();
+  else if (hInServant != NULL)
+       elt = hInServant->GetImpl();
+
+  ::CORBA::Long ier = _group_cpp->removeElement (elt);
+  return ier;
+}
+
+void Group_impl::clearElement() throw (SALOME::SALOME_Exception)
+{
+  _group_cpp->clearElement();
+}
+
diff --git a/src/HEXABLOCK_I/HexGroup_impl.hxx b/src/HEXABLOCK_I/HexGroup_impl.hxx
new file mode 100755 (executable)
index 0000000..7800c71
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexGroup_impl__
+#define __HexGroup_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Group)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexGroup.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+class Group_impl : public POA_HEXABLOCK_ORB::Group,
+                  public SALOME::GenericObj_i
+{
+  public:
+    Group_impl(HEXA_NS::Group *ptrCpp);
+    HEXA_NS::Group* GetImpl() throw (SALOME::SALOME_Exception);
+
+    char* getName() throw (SALOME::SALOME_Exception);
+    void setName(const char* name) throw (SALOME::SALOME_Exception);
+    GroupKind getKind() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long addElement(Element_ptr e) throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countElement() throw (SALOME::SALOME_Exception);
+    Element_ptr getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception);
+    ::CORBA::Long removeElement(Element_ptr elt) throw (SALOME::SALOME_Exception);
+    void clearElement() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Group *_group_cpp;
+};
+
+
+// class HexaGroup_impl : public Group_impl {};
+// class QuadGroup_impl : public Group_impl {};
+// class EdgeGroup_impl : public Group_impl {};
+// class HexaNodeGroup_impl : public Group_impl {};
+// class QuadNodeGroup_impl : public Group_impl {};
+// class EdgeNodeGroup_impl : public Group_impl {};
+// class VertexNodeGroup_impl : public Group_impl {};
+
+
+#endif
diff --git a/src/HEXABLOCK_I/HexHexa_impl.cxx b/src/HEXABLOCK_I/HexHexa_impl.cxx
new file mode 100755 (executable)
index 0000000..1b5c79c
--- /dev/null
@@ -0,0 +1,107 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexVertex_impl.hxx"
+
+Hexa_impl::Hexa_impl( HEXA_NS::Hexa *ptrCpp ):_hexa_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Hexa* Hexa_impl::GetImpl()
+    throw (SALOME::SALOME_Exception)
+{
+  return _hexa_cpp;
+}
+
+Quad_ptr Hexa_impl::getQuad(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _hexa_cpp->getQuad(n);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Hexa_impl::getEdge(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _hexa_cpp->getEdge(n);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vertex_ptr Hexa_impl::getVertex(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+void Hexa_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->setScalar(val);
+}
+
+void Hexa_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->dump();
+}
+
+
+void Hexa_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->printName();
+}
+
+
+char* Hexa_impl::getName() throw (SALOME::SALOME_Exception)
+{
+   return CORBA::string_dup( _hexa_cpp->getName() );
+}
+
+// ========================================================= setName
+void Hexa_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->setName (name);
+}
diff --git a/src/HEXABLOCK_I/HexHexa_impl.hxx b/src/HEXABLOCK_I/HexHexa_impl.hxx
new file mode 100755 (executable)
index 0000000..58e5964
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexHexa_impl__
+#define __HexHexa_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Hexa)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexHexa.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Hexa_impl : public POA_HEXABLOCK_ORB::Hexa,
+                   public SALOME::GenericObj_i
+{
+public:
+  Hexa_impl(HEXA_NS::Hexa *ptrCpp);
+  HEXA_NS::Hexa* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val ) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Hexa *_hexa_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexLaw_impl.cxx b/src/HEXABLOCK_I/HexLaw_impl.cxx
new file mode 100755 (executable)
index 0000000..560236e
--- /dev/null
@@ -0,0 +1,104 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexLaw_impl.hxx"
+
+Law_impl::Law_impl( HEXA_NS::Law *ptrCpp ):_law_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Law* Law_impl::GetImpl()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp;
+}
+
+// HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n);
+//   Vertex_impl* servantCorba = new Vertex_impl(v);
+//   return servantCorba->_this();
+
+
+void Law_impl::setName(const char* name)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setName(name);
+}
+
+char* Law_impl::getName()
+throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup( _law_cpp->getName() );
+}
+
+void Law_impl::setNodes(::CORBA::Long n)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setNodes(n);
+}
+
+::CORBA::Long Law_impl::getNodes()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp->getNodes();
+}
+
+void Law_impl::setKind( HEXABLOCK_ORB::KindLaw kIn )
+throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::KindLaw k_impl;
+  switch (kIn) {
+    case HEXABLOCK_ORB::UNIFORM    : k_impl = HEXA_NS::Uniform; break;
+    case HEXABLOCK_ORB::ARITHMETIC : k_impl = HEXA_NS::Arithmetic;  break;
+    case HEXABLOCK_ORB::GEOMETRIC  : k_impl = HEXA_NS::Geometric;   break;
+  }
+  _law_cpp->setKind(k_impl);
+}
+
+HEXABLOCK_ORB::KindLaw Law_impl::getKind()
+throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::KindLaw k;
+  HEXA_NS::KindLaw k_cpp = _law_cpp->getKind();
+  switch (k_cpp) {
+    case HEXA_NS::Uniform :    k = HEXABLOCK_ORB::UNIFORM; break;
+    case HEXA_NS::Arithmetic : k = HEXABLOCK_ORB::ARITHMETIC; break;
+    case HEXA_NS::Geometric :  k = HEXABLOCK_ORB::GEOMETRIC; break;
+    default :                  ASSERT( false ); break;
+  }
+  return k;
+}
+
+
+void Law_impl::setCoefficient(::CORBA::Double c)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setCoefficient(c);
+}
+
+::CORBA::Double Law_impl::getCoefficient()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp->getCoefficient();
+}
diff --git a/src/HEXABLOCK_I/HexLaw_impl.hxx b/src/HEXABLOCK_I/HexLaw_impl.hxx
new file mode 100755 (executable)
index 0000000..88be9ea
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Law_impl__
+#define __Law_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Law)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexLaw.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+
+class Law_impl : public POA_HEXABLOCK_ORB::Law,
+                   public SALOME::GenericObj_i
+{
+public:
+  Law_impl(HEXA_NS::Law *ptrCpp);
+  HEXA_NS::Law* GetImpl() throw (SALOME::SALOME_Exception);
+
+  void setName(const char* name) throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void setNodes(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long getNodes() throw (SALOME::SALOME_Exception);
+  void setKind(KindLaw k) throw (SALOME::SALOME_Exception);
+  KindLaw getKind() throw (SALOME::SALOME_Exception);
+  void setCoefficient(::CORBA::Double c) throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getCoefficient() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Law *_law_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexPipe_impl.cxx b/src/HEXABLOCK_I/HexPipe_impl.cxx
new file mode 100755 (executable)
index 0000000..14a4041
--- /dev/null
@@ -0,0 +1,105 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexVector_impl.hxx"
+#include "HexPipe_impl.hxx"
+
+Pipe_impl::Pipe_impl( HEXA_NS::Pipe *ptrCpp ):_pipe_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Pipe* Pipe_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _pipe_cpp;
+}
+
+Vertex_ptr Pipe_impl::getBase() throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _pipe_cpp->getBase();
+  if ( v!= NULL ){  
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vector_ptr Pipe_impl::getDirection() throw (SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  HEXA_NS::Vector* v = _pipe_cpp->getDirection();
+
+  if ( v!= NULL ){  
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Double Pipe_impl::getInternal_radius() throw (SALOME::SALOME_Exception)
+{
+//   ::CORBA::Double d = _pipe_cpp->getInternal_radius(); CS_TODO
+  ::CORBA::Double d = _pipe_cpp->getInternalRadius();
+  return d;
+}
+
+::CORBA::Double Pipe_impl::getRadius() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double d = _pipe_cpp->getRadius();
+  return d;
+}
+
+::CORBA::Double Pipe_impl::getHeight() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double d = _pipe_cpp->getHeight();
+  return d;
+}
+
+
+void Pipe_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _pipe_cpp->dump();
+}
+
+
+void Pipe_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _pipe_cpp->printName();
+}
+
+
+char* Pipe_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup( _pipe_cpp->getName() );
+}
+// ========================================================= setName
+void Pipe_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _pipe_cpp->setName (name);
+}
diff --git a/src/HEXABLOCK_I/HexPipe_impl.hxx b/src/HEXABLOCK_I/HexPipe_impl.hxx
new file mode 100755 (executable)
index 0000000..aff3735
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexPipe_impl__
+#define __HexPipe_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Pipe)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexPipe.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Pipe_impl : public POA_HEXABLOCK_ORB::Pipe,
+                 public SALOME::GenericObj_i
+{
+public:
+  Pipe_impl(HEXA_NS::Pipe *ptrCpp);
+  HEXA_NS::Pipe* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Vertex_ptr getBase() throw (SALOME::SALOME_Exception);
+  Vector_ptr getDirection() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getInternal_radius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Pipe *_pipe_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexPropagation_impl.cxx b/src/HEXABLOCK_I/HexPropagation_impl.cxx
new file mode 100755 (executable)
index 0000000..49af3b5
--- /dev/null
@@ -0,0 +1,131 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+
+#include "hexa_base.hxx"
+#include "HexPropagation_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexLaw_impl.hxx"
+
+Propagation_impl::Propagation_impl( HEXA_NS::Propagation *ptrCpp ):_propagation_cpp(ptrCpp)
+{
+}
+
+
+
+HEXA_NS::Propagation* Propagation_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _propagation_cpp;
+}
+
+
+HEXABLOCK_ORB::Edges* Propagation_impl::getEdges() throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::Edges* result = new HEXABLOCK_ORB::Edges;
+
+  const HEXA_NS::Edges& edges_cpp = _propagation_cpp->getEdges();
+//   HEXA_NS::Edges edges_cpp = _propagation_cpp->getEdges();
+  std::cout<<"XX edges_cpp.size() ->"<<edges_cpp.size()<<std::endl;
+
+  CORBA::ULong i = 0;
+  result->length( edges_cpp.size() );
+//   HEXA_NS::Edges::const_iterator itertest = edges_cpp.begin();
+//   itertest != edges_cpp.end();
+  for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin();
+       iter != edges_cpp.end();
+        ++iter){
+//       printf ("     (");
+//       (*iter)->getVertex (0)->printName (", ");
+//       (*iter)->getVertex (1)->printName (")\n");
+      Edge_impl *servantEdge = new Edge_impl( *iter );
+      (*result)[ i++ ] = servantEdge->_this();
+
+  }
+  return result;
+}
+
+
+// HEXABLOCK_ORB::Ways* Propagation_impl::getWays() throw (SALOME::SALOME_Exception)
+// {
+//   HEXABLOCK_ORB::Ways* result = new HEXABLOCK_ORB::Ways;
+//   const vector<bool>& ways_cpp = _propagation_cpp->getWays();
+// 
+//   CORBA::ULong i = 0;
+//   result->length( ways_cpp.size() );
+//   for ( vector<bool>::const_iterator iter = ways_cpp.begin();
+//     iter != ways_cpp.end(); ++iter ){
+//     (*result)[ i++ ] = *iter;
+// //     if (*iter == true ) {
+// //       (*result)[ i++ ] = ::CORBA::TRUE;
+// //     } else {
+// //       (*result)[ i++ ] = ::CORBA::FALSE;
+// //     }
+//   }
+//   return result;
+// 
+// }
+
+void Propagation_impl::setLaw(HEXABLOCK_ORB::Law_ptr lawIn) throw (SALOME::SALOME_Exception)
+{
+  Law_impl* lawInServant = ::DownCast<Law_impl*>( lawIn );
+  ASSERT( lawInServant );
+
+  if ( lawInServant ){
+    HEXA_NS::Law* law = lawInServant->GetImpl();
+    _propagation_cpp->setLaw(law);
+  }
+}
+
+HEXABLOCK_ORB::Law_ptr Propagation_impl::getLaw() throw (SALOME::SALOME_Exception)
+{
+    Law_ptr result = Law::_nil();
+    HEXA_NS::Law* l = _propagation_cpp->getLaw();
+
+    if ( l != NULL ){
+      Law_impl* servantCorba = new Law_impl(l);
+      result = servantCorba->_this();
+    }
+    return result;
+}
+
+
+
+void Propagation_impl::setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception)
+{
+  _propagation_cpp->setWay(w);
+}
+
+
+
+::CORBA::Boolean Propagation_impl::getWay() throw (SALOME::SALOME_Exception)
+{
+//   bool way = _propagation_cpp->getWay();
+//   if ( way == true ) {
+//     return CORBA::TRUE;
+//   else {
+//     return CORBA::FALSE;
+//   }
+  return _propagation_cpp->getWay();
+}
+
diff --git a/src/HEXABLOCK_I/HexPropagation_impl.hxx b/src/HEXABLOCK_I/HexPropagation_impl.hxx
new file mode 100755 (executable)
index 0000000..3b5abfc
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __Propagation_impl__
+#define __Propagation_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Propagation)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexPropagation.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Propagation_impl : public POA_HEXABLOCK_ORB::Propagation,
+                   public SALOME::GenericObj_i
+{
+public:
+  Propagation_impl(HEXA_NS::Propagation *ptrCpp);
+  HEXA_NS::Propagation* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Edges* getEdges() throw (SALOME::SALOME_Exception);
+//   Ways* getWays() throw (SALOME::SALOME_Exception);
+
+  void setLaw(Law_ptr l) throw (SALOME::SALOME_Exception);
+  Law_ptr getLaw() throw (SALOME::SALOME_Exception);
+  void setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception);
+
+
+private:
+  HEXA_NS::Propagation *_propagation_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexQuad_impl.cxx b/src/HEXABLOCK_I/HexQuad_impl.cxx
new file mode 100755 (executable)
index 0000000..7ba12d2
--- /dev/null
@@ -0,0 +1,184 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexShape.hxx"
+
+Quad_impl::Quad_impl( HEXA_NS::Quad *ptrCpp ):_quad_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Quad* Quad_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _quad_cpp;
+}
+
+Edge_ptr Quad_impl::getEdge(::CORBA::Long n)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _quad_cpp->getEdge( n );
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Vertex_ptr Quad_impl::getVertex(::CORBA::Long n)
+   throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _quad_cpp->getVertex( n );
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+
+
+::CORBA::Long Quad_impl::addAssociation( GEOM::GEOM_Object_ptr geom_object_2D)
+  throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+
+  TopoDS_Shape aShape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape( geom_object_2D );
+  string      strBrep = shape2string( aShape );
+
+  CORBA::String_var anIOR = HEXABLOCK_Gen_i::GetORB()->object_to_string( geom_object_2D );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  s->ior     = anIOR.in();
+  s->ident   = geom_object_2D->GetStudyEntry();
+
+  ok = _quad_cpp->addAssociation( s );
+//   _associations.push_back(GEOM::GEOM_Object::_duplicate( geom_object_2D ));
+  return ok;
+}
+
+void Quad_impl::clearAssociation()
+      throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->clearAssociation ();
+}
+
+
+
+GEOM::ListOfGO* Quad_impl::getAssociations() //CS_NOT_SPEC
+  throw (SALOME::SALOME_Exception)
+// {
+//   GEOM::ListOfGO* result = new GEOM::ListOfGO;
+//   result->length( _associations.size() );
+// 
+//   CORBA::ULong i = 0;
+//   for ( std::vector<GEOM::GEOM_Object_ptr>::const_iterator iter = _associations.begin();
+//     iter != _associations.end();
+//         ++iter){
+// //       (*result)[i++] = *iter;
+//       (*result)[i++] = GEOM::GEOM_Object::_duplicate( *iter );
+//   }
+//   return result;
+// }
+{
+  TopoDS_Shape aShape;
+  const std::vector<HEXA_NS::Shape*> shapes = _quad_cpp->getAssociations();
+
+  GEOM::ListOfGO* result = new GEOM::ListOfGO;
+  result->length( shapes.size() );
+
+  CORBA::Object_var     corbaObj;
+  GEOM::GEOM_Object_var geomObj;
+  HEXABLOCK_ORB::EdgeAssociation assoc;
+  CORBA::ULong i = 0;
+  for ( std::vector<HEXA_NS::Shape*>::const_iterator iter = shapes.begin();
+       iter != shapes.end();
+        ++iter ){
+      if ( !(*iter)->ior.empty() ){ // geom object from current session
+        corbaObj = HEXABLOCK_Gen_i::GetORB()->string_to_object( (*iter)->ior.c_str() );
+        if ( !CORBA::is_nil( corbaObj ) ){
+          geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+        }
+      } else { // no geom object => we have to built it
+        geomObj = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->brepToGeomObject( (*iter)->getBrep() );
+      }
+      (*result)[ i++ ] = geomObj._retn();
+  }
+
+  return result;
+}
+
+
+
+
+
+
+
+
+// void Quad_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_2D) throw (SALOME::SALOME_Exception)
+// {
+// }
+// 
+// GEOM::GEOM_Object_ptr Quad_impl::getAssociation() throw (SALOME::SALOME_Exception)
+// {
+// }
+// 
+// void Quad_impl::removeAssociation() throw (SALOME::SALOME_Exception)
+// {
+// }
+
+void Quad_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->setScalar(val);
+}
+
+void Quad_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->dump();
+}
+
+
+void Quad_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->printName();
+}
+
+char* Quad_impl::getName() throw (SALOME::SALOME_Exception)
+{
+ return CORBA::string_dup( _quad_cpp->getName() );
+}
+// ========================================================= setName
+void Quad_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->setName (name);
+}
diff --git a/src/HEXABLOCK_I/HexQuad_impl.hxx b/src/HEXABLOCK_I/HexQuad_impl.hxx
new file mode 100755 (executable)
index 0000000..c481293
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexQuad_impl__
+#define __HexQuad_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GEOM_Gen)
+#include CORBA_SERVER_HEADER(Quad)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexQuad.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Quad_impl : public POA_HEXABLOCK_ORB::Quad,
+                 public SALOME::GenericObj_i
+{
+public:
+  Quad_impl(HEXA_NS::Quad *ptrCpp);
+  HEXA_NS::Quad* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+//   void setAssociation(GEOM::GEOM_Object_ptr geom_object_2D) throw (SALOME::SALOME_Exception);
+//   GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+  ::CORBA::Long addAssociation ( GEOM::GEOM_Object_ptr geom_object_2D) //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+  GEOM::ListOfGO* getAssociations () //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+
+
+  void clearAssociation() throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Quad *_quad_cpp;
+//   std::vector<GEOM::GEOM_Object_ptr> _associations;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexVector_impl.cxx b/src/HEXABLOCK_I/HexVector_impl.cxx
new file mode 100755 (executable)
index 0000000..f331a5d
--- /dev/null
@@ -0,0 +1,89 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVector_impl.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+Vector_impl::Vector_impl( HEXA_NS::Vector *ptrCpp ):_vector_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Vector* Vector_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _vector_cpp;
+}
+
+::CORBA::Double Vector_impl::getDX() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dx = _vector_cpp->getDx();
+  return dx;
+}
+::CORBA::Double Vector_impl::getDY() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dy = _vector_cpp->getDy();
+  return dy;
+}
+::CORBA::Double Vector_impl::getDZ() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dz = _vector_cpp->getDz();
+  return dz;
+}
+
+
+void Vector_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _vector_cpp->dump();
+}
+
+
+void Vector_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _vector_cpp->printName();
+}
+
+// ========================================================= getName
+char* Vector_impl::getName() throw (SALOME::SALOME_Exception)
+{
+   return CORBA::string_dup( _vector_cpp->getName() );
+}
+// ========================================================= setName
+void Vector_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _vector_cpp->setName (name);
+}
+// ========================================================= getNorm
+::CORBA::Double Vector_impl::getNorm() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double val = _vector_cpp->getNorm();
+  return val;
+}
+// ========================================================= getAngleX
+::CORBA::Double Vector_impl::getAngleX() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double val = _vector_cpp->getAngleX();
+  return val;
+}
diff --git a/src/HEXABLOCK_I/HexVector_impl.hxx b/src/HEXABLOCK_I/HexVector_impl.hxx
new file mode 100755 (executable)
index 0000000..56eae41
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexVector_impl__
+#define __HexVector_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Vector)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexVector.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Vector_impl : public POA_HEXABLOCK_ORB::Vector,
+                   public SALOME::GenericObj_i
+{
+public:
+   Vector_impl(HEXA_NS::Vector *ptrCpp);
+   HEXA_NS::Vector* GetImpl() throw (SALOME::SALOME_Exception);
+
+   ::CORBA::Double getDX() throw(SALOME::SALOME_Exception);
+   ::CORBA::Double getDY() throw(SALOME::SALOME_Exception);
+   ::CORBA::Double getDZ() throw(SALOME::SALOME_Exception);
+   void dump() throw (SALOME::SALOME_Exception);
+   void printName() throw (SALOME::SALOME_Exception);
+   char* getName() throw (SALOME::SALOME_Exception);
+   void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+   ::CORBA::Double getNorm   () throw (SALOME::SALOME_Exception);
+   ::CORBA::Double getAngleX () throw (SALOME::SALOME_Exception);
+
+private:
+    HEXA_NS::Vector *_vector_cpp;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexVertex_impl.cxx b/src/HEXABLOCK_I/HexVertex_impl.cxx
new file mode 100755 (executable)
index 0000000..94c5780
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexShape.hxx"
+
+Vertex_impl::Vertex_impl( HEXA_NS::Vertex *ptrCpp ):
+_vertex_cpp( ptrCpp )
+// _association( GEOM::GEOM_Object::_nil() )
+{
+}
+
+HEXA_NS::Vertex* Vertex_impl::GetImpl()
+{
+  return _vertex_cpp;
+}
+
+CORBA::Double Vertex_impl::getX() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getX();
+}
+
+CORBA::Double Vertex_impl::getY() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getY();
+}
+
+CORBA::Double Vertex_impl::getZ() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getZ();
+}
+
+
+void Vertex_impl::setX( CORBA::Double x ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setX(x);
+}
+void Vertex_impl::setY(  CORBA::Double y ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setY(y);
+}
+
+void Vertex_impl::setZ(  CORBA::Double z ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setZ(z);
+}
+
+
+void Vertex_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_vertex)
+  throw (SALOME::SALOME_Exception)
+{
+  TopoDS_Shape shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->geomObjectToShape(geom_object_vertex);
+//   HEXABLOCK::HEXABLOCK* gen = HEXABLOCK::GetHEXABLOCKGen();
+//   TopoDS_Shape shape = gen->geomObjectToShape(geom_object_vertex);
+  string strBrep = shape2string( shape );
+  CORBA::String_var anIOR = HEXABLOCK_Gen_i::GetORB()->object_to_string( geom_object_vertex );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  s->ior   = anIOR.in(); 
+  s->ident = geom_object_vertex->GetStudyEntry(); //geom_object_vertex->GetEntry()
+  _vertex_cpp->setAssociation(s);
+
+//   _association = GEOM::GEOM_Object::_duplicate( geom_object_vertex );
+}
+
+
+GEOM::GEOM_Object_ptr Vertex_impl::getAssociation()
+  throw (SALOME::SALOME_Exception)
+{
+//   GEOM::GEOM_Object_var result = GEOM::GEOM_Object::_nil();
+//   GEOM::GEOM_Object_ptr result = GEOM::GEOM_Object::_nil();
+  GEOM::GEOM_Object_var geomObj; // = new GEOM::GEOM_Object;
+  CORBA::Object_var corbaObj;
+
+  HEXA_NS::Shape* s = _vertex_cpp->getAssociation();
+  if (s != NULL){
+      if ( !s->ior.empty() ){ // geom object from current session
+        corbaObj = HEXABLOCK_Gen_i::GetORB()->string_to_object( s->ior.c_str() );
+        if ( !CORBA::is_nil( corbaObj ) ){
+          geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+        }
+      } else { // no geom object => we have to built it
+          geomObj = HEXABLOCK_Gen_i::GetHEXABLOCKGen()->brepToGeomObject( s->getBrep() );
+      }
+  }
+
+  return geomObj._retn();
+}
+
+
+void Vertex_impl::clearAssociation()
+      throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->clearAssociation ();
+}
+
+
+void Vertex_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setScalar(val);
+}
+
+void Vertex_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->dump();
+}
+
+
+void Vertex_impl::printName()throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->printName();
+}
+
+
+char* Vertex_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup( _vertex_cpp->getName() );
+}
+// ========================================================= setName
+void Vertex_impl::setName(const char* name) 
+     throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setName (name);
+}
diff --git a/src/HEXABLOCK_I/HexVertex_impl.hxx b/src/HEXABLOCK_I/HexVertex_impl.hxx
new file mode 100755 (executable)
index 0000000..6d6da51
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HexVertex_impl__
+#define __HexVertex_impl__
+
+// #include <TopoDS_Shape.hxx>
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Vertex)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+
+#include "hexa_base.hxx"
+#include "HexVertex.hxx"
+
+class Vertex_impl : public POA_HEXABLOCK_ORB::Vertex,
+                   public SALOME::GenericObj_i
+{
+public:
+  Vertex_impl(HEXA_NS::Vertex *ptrCpp);
+  HEXA_NS::Vertex* GetImpl();
+
+  ::CORBA::Double getX() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getY() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getZ() throw (SALOME::SALOME_Exception);
+  void setX(::CORBA::Double x) throw (SALOME::SALOME_Exception);
+  void setY(::CORBA::Double y) throw (SALOME::SALOME_Exception);
+  void setZ(::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  void setAssociation(GEOM::GEOM_Object_ptr geom_object_vertex) throw (SALOME::SALOME_Exception);
+  GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+  void clearAssociation() throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void  setName (const char* name) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Vertex* _vertex_cpp;
+//   GEOM::GEOM_Object_ptr _association;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/Makefile.am b/src/HEXABLOCK_I/Makefile.am
new file mode 100755 (executable)
index 0000000..679c294
--- /dev/null
@@ -0,0 +1,91 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  File   : Makefile.in
+#  Author : , CEA
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+salomeinclude_HEADERS = \
+       HEXABLOCK.hxx \
+       HexCrossElements_impl.hxx \
+       HexCylinder_impl.hxx \
+       HexDocument_impl.hxx \
+       HexEdge_impl.hxx \
+       HexElements_impl.hxx \
+       HexGroup_impl.hxx \
+       HexHexa_impl.hxx \
+       HexLaw_impl.hxx \
+       HexPipe_impl.hxx \
+       HexPropagation_impl.hxx \
+       HexQuad_impl.hxx \
+       HexVector_impl.hxx \
+       HexVertex_impl.hxx
+
+# Scripts to be installed
+dist_salomescript_PYTHON = hexablock.py
+
+# Libraries targets
+# SD/Propagation/HexPropagation.cxx \
+# SD/Law/HexLaw.cxx \
+#
+lib_LTLIBRARIES = libHEXABLOCKEngine.la
+dist_libHEXABLOCKEngine_la_SOURCES = \
+       HexVertex_impl.cxx \
+       HexEdge_impl.cxx \
+       HexQuad_impl.cxx \
+       HexHexa_impl.cxx \
+       HexVector_impl.cxx \
+       HexElements_impl.cxx \
+       HexCrossElements_impl.cxx \
+       HexCylinder_impl.cxx \
+       HexPipe_impl.cxx \
+       HexPropagation_impl.cxx \
+       HexLaw_impl.cxx \
+       HexGroup_impl.cxx \
+       HexDocument_impl.cxx \
+       HEXABLOCK.cxx \
+       HEXABLOCK_1.cxx
+
+
+
+libHEXABLOCKEngine_la_CPPFLAGS = \
+       $(CORBA_CXXFLAGS) \
+       $(CORBA_INCLUDES) \
+       $(KERNEL_CXXFLAGS) \
+       $(GEOM_CXXFLAGS) \
+       $(CAS_CPPFLAGS) \
+       -I$(srcdir)/../HEXABLOCK \
+       -I$(top_builddir)/idl \
+       -I$(top_builddir)/salome_adm/unix
+
+libHEXABLOCKEngine_la_LDFLAGS = \
+       ../../idl/libSalomeIDLHEXABLOCK.la \
+       ../HEXABLOCK/libHEXABLOCKimpl.la \
+       $(KERNEL_LDFLAGS) -lOpUtil -lSalomeNS -lSalomeContainer -lSalomeGenericObj -lSalomeLifeCycleCORBA \
+       $(CAS_LDPATH) \
+        $(GEOM_LDFLAGS) -lGEOMClient
+
diff --git a/src/HEXABLOCK_I/hexablock.py b/src/HEXABLOCK_I/hexablock.py
new file mode 100755 (executable)
index 0000000..a99d685
--- /dev/null
@@ -0,0 +1,188 @@
+# -*- coding: latin-1 -*-
+
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS - 2011-2012 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# =============================================================================================
+
+import salome
+import smesh
+
+from HEXABLOCK_ORB import *
+import HEXABLOCKPlugin
+
+geompy = smesh.geompy
+
+# Load HEXABLOCK componant
+# ------------------------
+
+component = salome.lcc.FindOrLoadComponent("FactoryServer", "HEXABLOCK")
+component = component._narrow(HEXABLOCK_Gen)
+
+for k in dir(component):
+    if k[0] == '_':
+        continue
+    globals()[k] = getattr(component, k)
+
+del k
+
+# Add laws on propagations based on min or max segment length
+# -----------------------------------------------------------
+
+def addLaws(doc, lg, lgmax=True):
+    laws = {}
+    n = doc.countPropagation()
+    for i in xrange(n):
+        p = doc.getPropagation(i)
+        if lgmax:
+            m = 0
+        else:
+            m = (max)
+        for e in p.getEdges():
+            a = e.getAssociations()
+
+            if a == []:
+                vam = e.getVertex(0)
+                vag = vam.getAssociation()
+                if vag == None:
+                    vax = vam.getX()
+                    vay = vam.getY()
+                    vaz = vam.getZ()
+                else:
+                    vax, vay, vaz = geompy.PointCoordinates(vag)
+
+                vbm = e.getVertex(1)
+                vbg = vbm.getAssociation()
+                if vbg == None:
+                    vbx = vbm.getX()
+                    vby = vbm.getY()
+                    vbz = vbm.getZ()
+                else:
+                    vbx, vby, vbz = geompy.PointCoordinates(vbg)
+
+                l = ( (vbx-vax)**2 + (vby-vay)**2 + (vbz-vaz)**2 )**0.5
+
+            else:
+                l = 0.0
+                for gdf in a:
+                    le, su, vo = geompy.BasicProperties(gdf.geomObj)
+                    l += le * (gdf.fin - gdf.debut)
+
+            if ( lgmax and l>m ) or ( (not lgmax) and l<m ):
+                m = l
+
+        nn = m / lg
+        if lgmax and (int(nn) != nn):
+            nn = int(nn)
+        else:
+            nn = int(nn) - 1
+
+        try:
+            law = laws[nn]
+        except:
+            law = doc.addLaw("u_"+str(nn), nn)
+            laws[nn] = law
+
+        p.setLaw(law)
+
+# Display informations about a document
+# -------------------------------------
+
+def dump(doc, mesh=None, full=False):
+    if full:
+        hn = doc.countUsedHexa()
+        print "Model dump: number of hexas: ", hn
+        for hi in xrange(hn):
+            hh = doc.getUsedHexa(hi)
+            print "  hexa: ", hi, "name: ", hh.getName()
+            for fi in xrange(6):
+                ff = hh.getQuad(fi)
+                fa = ff.getAssociations()
+                print "    quadrangle: ", fi, "name: ", ff.getName(), " associated: ", fa!=[]
+                for ei in xrange(4):
+                    ee = ff.getEdge(ei)
+                    ea = ee.getAssociations()
+                    print "      edge: ", ei, "name: ", ee.getName(), " associated: ", ea!=[]
+                    for vi in xrange(2):
+                        vv = ee.getVertex(vi)
+                        va = vv.getAssociation()
+                        print "        vertex: ", vi, "name: ", vv.getName(), " associated: ", va!=None
+                        print "          model: x= ", vv.getX(), " y= ", vv.getY(), " z= ", vv.getZ()
+                        if va!=None:
+                            x, y, z = geompy.PointCoordinates(va)
+                            print "          assoc: x= ", x, " y= ", y, " z= ", z
+
+    uv = doc.countUsedVertex()
+    ue = doc.countUsedEdge()
+    uq = doc.countUsedQuad()
+    uh = doc.countUsedHexa()
+
+    print "Model vertices    number: ", uv
+    print "Model edges       number: ", ue
+    print "Model quadrangles number: ", uq
+    print "Model blocks      number: ", uh
+
+    if mesh != None:
+        print "Mesh nodes       number: ", mesh.NbNodes()
+        print "Mesh segments    number: ", mesh.NbEdges()
+        print "Mesh quadrangles number: ", mesh.NbQuadrangles()
+        print "Mesh hexas       number: ", mesh.NbHexas()
+
+    return uv, ue, uq, uh
+
+# Mesh a document
+# ---------------
+
+def mesh(doc, name=None, dim=3, container="FactoryServer"):
+    study = salome.myStudy
+
+    if type(doc) == type(""):
+        sobject = study.FindObjectID(doc)
+        builder = study.NewBuilder()
+        ok, ior = builder.FindAttribute(sobject, "AttributeIOR")
+        obj = salome.orb.string_to_object(ior.Value())
+        doc = obj._narrow(Document)
+
+    shape = doc.getShape()
+    if shape == None:
+        shape = geompy.MakeBox(0, 0, 0,  1, 1, 1)
+
+    if (name == None) or (name == ""):
+        name = doc.getName()
+
+    geompy.addToStudy(shape, name)
+    component = salome.lcc.FindOrLoadComponent(container, "SMESH")
+    component.init_smesh(study, geompy.geom)
+    meshexa = component.Mesh(shape)
+
+    so = "libHexaBlockEngine.so"
+
+    algo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(component, "HEXABLOCK_3D", so)
+    meshexa.mesh.AddHypothesis(shape, algo)
+
+    hypo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(component, "HEXABLOCK_Parameters", so)
+    meshexa.mesh.AddHypothesis(shape, hypo)
+
+    hypo.SetDocument(doc)
+    hypo.SetDimension(dim)
+
+    meshexa.Compute()
+
+    return meshexa
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100755 (executable)
index 0000000..57d9a60
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+DIST_SUBDIRS = HEXABLOCK \
+       HEXABLOCK_I \
+       HEXABLOCKGUI \
+       TEST_PY \
+       TEST_CPP
+
+SUBDIRS = HEXABLOCK \
+       HEXABLOCK_I \
+       HEXABLOCKGUI \
+       TEST_PY
+
+if CPPUNIT_IS_OK
+  SUBDIRS += TEST_CPP
+endif
diff --git a/src/TEST_CPP/HexEdgeTest.cxx b/src/TEST_CPP/HexEdgeTest.cxx
new file mode 100755 (executable)
index 0000000..e147054
--- /dev/null
@@ -0,0 +1,70 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/extensions/HelperMacros.h>
+#include "hexa_base.hxx"
+#include "HexEdge.hxx"
+#include "HexEdgeTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( EdgeTest );
+
+
+EdgeTest::EdgeTest(void)
+{
+  _myHexEngine = new HEXA_NS::Hex();
+  _myDoc= _myHexEngine->addDocument();
+}
+
+EdgeTest::~EdgeTest(void)
+{
+  delete _myDoc;
+  delete _myHexEngine; //CS_TODO : Bug
+}
+
+
+void EdgeTest::TestGetVertex(void)
+{
+  HEXA_NS::Vertex *myVertex0 = NULL;
+  HEXA_NS::Vertex *myVertex1 = NULL;
+
+  // first vertex of the edge
+//   double x0Value = 1.;
+//   double y0Value = 5.;
+//   double z0Value = 3.;
+//   myVertex0 = _myDoc->addVertex( x0Value, y0Value, z0Value );
+  myVertex0 = _myDoc->addVertex( 1., 5., 3. );
+
+  // second vertex of the edge
+  myVertex1 = _myDoc->addVertex( 8., 4., 6.);
+
+  HEXA_NS::Edge *myEdge = _myDoc->addEdge( myVertex0, myVertex1 );
+
+  // Testing first Vertex
+  HEXA_NS::Vertex *docVertex0 = myEdge->getVertex(0);
+  CPPUNIT_ASSERT(  docVertex0->getX() == myVertex0->getX() );
+  CPPUNIT_ASSERT(  docVertex0->getY() == myVertex0->getY() );
+  CPPUNIT_ASSERT(  docVertex0->getZ() == myVertex0->getZ() );
+
+  // Testing second Vertex
+  HEXA_NS::Vertex *docVertex1 = myEdge->getVertex(1);
+  CPPUNIT_ASSERT(  docVertex1->getX() == myVertex1->getX() );
+  CPPUNIT_ASSERT(  docVertex1->getY() == myVertex1->getY() );
+  CPPUNIT_ASSERT(  docVertex1->getZ() == myVertex1->getZ() );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
diff --git a/src/TEST_CPP/HexEdgeTest.hxx b/src/TEST_CPP/HexEdgeTest.hxx
new file mode 100755 (executable)
index 0000000..7df05d3
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __EdgeTest__
+#define __EdgeTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+
+class EdgeTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( EdgeTest );
+  CPPUNIT_TEST( TestGetVertex );
+  CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    EdgeTest(void);
+    ~EdgeTest(void);
+
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+    void TestGetVertex(void);
+
+  private:
+    HEXA_NS::Hex *_myHexEngine;
+    HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/HexVertexTest.cxx b/src/TEST_CPP/HexVertexTest.cxx
new file mode 100755 (executable)
index 0000000..d6ee33a
--- /dev/null
@@ -0,0 +1,73 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/extensions/HelperMacros.h>
+#include "hexa_base.hxx"
+#include "HexVertex.hxx"
+#include "HexVertexTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( VertexTest );
+
+
+VertexTest::VertexTest(void)
+{
+  _myHexEngine = new HEXA_NS::Hex();
+  _myDoc= _myHexEngine->addDocument();
+}
+
+VertexTest::~VertexTest(void)
+{
+  delete _myDoc;
+  delete _myHexEngine; //CS_TODO : Bug
+}
+
+
+void VertexTest::TestGetX(void)
+{
+  double xValue = 1.;
+//   std::cout<<"Hellllllooooooo TestGetX";
+
+//   HEXA_NS::Vertex myVertex( xValue, 8. ,4. );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( xValue, 8. ,4. );
+
+  CPPUNIT_ASSERT(  myVertex->getX() == xValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
+
+void VertexTest::TestGetY(void)
+{
+  double yValue = 8.;
+//   HEXA_NS::Vertex myVertex( 1. ,yValue ,4. );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,yValue ,4. );
+
+  CPPUNIT_ASSERT(  myVertex->getY() == yValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
+
+
+void VertexTest::TestGetZ(void)
+{
+  double zValue = 1.;
+
+//   HEXA_NS::Vertex myVertex( 1. ,8. ,zValue );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,8. ,zValue );
+
+  CPPUNIT_ASSERT(  myVertex->getZ() == zValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
diff --git a/src/TEST_CPP/HexVertexTest.hxx b/src/TEST_CPP/HexVertexTest.hxx
new file mode 100755 (executable)
index 0000000..c9447d7
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __VertexTest__
+#define __VertexTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+
+class VertexTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( VertexTest );
+  CPPUNIT_TEST( TestGetX );
+  CPPUNIT_TEST( TestGetY );
+  CPPUNIT_TEST( TestGetZ );
+  CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    VertexTest(void);
+    ~VertexTest(void);
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+    
+    void TestGetX(void);
+    void TestGetY(void);
+    void TestGetZ(void);
+  private:
+    HEXA_NS::Hex *_myHexEngine;
+    HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/Makefile.am b/src/TEST_CPP/Makefile.am
new file mode 100755 (executable)
index 0000000..715ef28
--- /dev/null
@@ -0,0 +1,206 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+# salomeinclude_HEADERS= ../SD/VertexTest.hxx
+
+# Scripts to be installed
+
+
+#
+# ===============================================================
+# Local definitions
+# ===============================================================
+#
+
+# This directory defines the subdirectory src in the top source directory.
+# RPATH=../..
+RPATH=..
+
+
+# This local variable defines the list of CPPFLAGS common to all target in this package.
+COMMON_CPPFLAGS = \
+       @CPPUNIT_INCLUDES@ \
+       -I$(srcdir)/$(RPATH)/HEXABLOCK/ \
+       -I$(top_builddir)/idl \
+       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+
+
+# This local variable defines the list of dependant libraries common to all target in this package.
+COMMON_LIBS =\
+       @CPPUNIT_LIBS@ \
+       $(RPATH)/HEXABLOCK/libHEXABLOCKimpl.la \
+       $(KERNEL_LDFLAGS) \
+       -lSalomeGenericObj
+
+# ===============================================================
+# Libraries targets
+#      HexVertexTest.cxx \
+#      HexEdgeTest.cxx \
+# ===============================================================
+lib_LTLIBRARIES = libHEXABLOCKTest.la
+libHEXABLOCKTest_la_SOURCES  = \
+       test_unit.hxx           \
+       test_hexa1.cxx              \
+       test_tools.cxx              \
+       test_quads.cxx              \
+       ModelTest.cxx ModelTest.hxx
+
+libHEXABLOCKTest_la_CPPFLAGS = $(COMMON_CPPFLAGS)
+libHEXABLOCKTest_la_LDFLAGS  = -no-undefined -version-info=0:0:0
+libHEXABLOCKTest_la_LIBADD    = $(COMMON_LIBS)
+
+
+# ===============================================================
+# Executables targets
+# ===============================================================
+bin_PROGRAMS = Test_HEXABLOCK
+Test_HEXABLOCK_SOURCES  = Test_HEXABLOCK.cxx
+Test_HEXABLOCK_CPPFLAGS = $(COMMON_CPPFLAGS)
+Test_HEXABLOCK_LDADD    = \
+       libHEXABLOCKTest.la \
+       ../HEXABLOCK/libHEXABLOCKimpl.la \
+       $(COMMON_LIBS)
+
+UNIT_TEST_PROG = ./Test_HEXABLOCK
+
+check : tests
+
+clean-local:
+       -rm -fr *.vtk *.xml *.brep
+
+# bin_PROGRAMS = bielle 
+#      test_hexa1 \
+#      test_cartesi1 \
+#      test_clone \
+#      test_cyl \
+#      test_decoupage \
+#      test_find \
+#      test_gen_xml \
+#      test_joint \
+#      test_propagation \
+#      test_separ \
+#      tuyau
+#      test_lecture
+
+
+# UNIT TEST
+# test_cartesi1_SOURCES  = test_cartesi1.cpp   
+# test_cartesi1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cartesi1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_clone_SOURCES  = test_clone.cpp
+# test_clone_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_clone_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_cyl_SOURCES  = test_cyl.cpp
+# test_cyl_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cyl_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_decoupage_SOURCES  = test_decoupage.cpp
+# test_decoupage_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_decoupage_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_find_SOURCES  = test_find.cpp
+# test_find_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_find_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_gen_xml_SOURCES  = test_gen_xml.cpp
+# test_gen_xml_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_gen_xml_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_joint_SOURCES  = test_joint.cpp
+# test_joint_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_joint_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_lecture_SOURCES  = test_lecture.cpp
+# test_lecture_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_lecture_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_propagation_SOURCES  = test_propagation.cpp
+# test_propagation_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_propagation_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# 
+# test_separ_SOURCES  = test_separ.cpp
+# test_separ_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_separ_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
+# test_hexa1_SOURCES  = test_hexa1.cpp
+# test_hexa1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_hexa1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./test_hexa1
+
+# libHEXATest.la \
+# USER CASE
+# bielle_SOURCES  = bielle.cpp
+# bielle_CPPFLAGS = $(COMMON_CPPFLAGS)
+# bielle_LDADD    = \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# tuyau_SOURCES  = tuyau.cpp
+# tuyau_CPPFLAGS = $(COMMON_CPPFLAGS)
+# tuyau_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
diff --git a/src/TEST_CPP/Makefile.orig.am b/src/TEST_CPP/Makefile.orig.am
new file mode 100755 (executable)
index 0000000..54b04b5
--- /dev/null
@@ -0,0 +1,206 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+# salomeinclude_HEADERS= ../SD/VertexTest.hxx
+
+# Scripts to be installed
+
+
+#
+# ===============================================================
+# Local definitions
+# ===============================================================
+#
+
+# This directory defines the subdirectory src in the top source directory.
+# RPATH=../..
+RPATH=..
+
+
+# This local variable defines the list of CPPFLAGS common to all target in this package.
+COMMON_CPPFLAGS = \
+       @CPPUNIT_INCLUDES@ \
+       -I$(srcdir)/$(RPATH)/HEXA/ \
+       -I$(top_builddir)/idl \
+       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+
+
+# This local variable defines the list of dependant libraries common to all target in this package.
+COMMON_LIBS =\
+       @CPPUNIT_LIBS@ \
+       $(RPATH)/HEXA/libHEXAimpl.la \
+       $(KERNEL_LDFLAGS) \
+       -lSalomeGenericObj
+
+# ===============================================================
+# Libraries targets
+# ===============================================================
+#      HexVertexTest.cxx \
+#      HexEdgeTest.cxx
+#
+# lib_LTLIBRARIES = libHEXATest.la
+# libHEXATest_la_SOURCES  = \
+#      test_hexa1.cxx
+# 
+# 
+# libHEXATest_la_CPPFLAGS = $(COMMON_CPPFLAGS)
+# libHEXATest_la_LDFLAGS  = -no-undefined -version-info=0:0:0
+# libHEXATest_la_LIBADD    = $(COMMON_LIBS)
+
+#
+# ===============================================================
+# Executables targets
+# ===============================================================
+#
+# bin_PROGRAMS = TestHEXA
+# TestHEXA_SOURCES  = TestHEXA.cxx
+# TestHEXA_CPPFLAGS = $(COMMON_CPPFLAGS)
+# TestHEXA_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./TestHEXA
+# 
+# 
+
+
+bin_PROGRAMS = bielle 
+#      test_hexa1 \
+#      test_cartesi1 \
+#      test_clone \
+#      test_cyl \
+#      test_decoupage \
+#      test_find \
+#      test_gen_xml \
+#      test_joint \
+#      test_propagation \
+#      test_separ \
+#      tuyau
+#      test_lecture
+
+
+# UNIT TEST
+# test_cartesi1_SOURCES  = test_cartesi1.cpp   
+# test_cartesi1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cartesi1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_clone_SOURCES  = test_clone.cpp
+# test_clone_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_clone_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_cyl_SOURCES  = test_cyl.cpp
+# test_cyl_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cyl_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_decoupage_SOURCES  = test_decoupage.cpp
+# test_decoupage_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_decoupage_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_find_SOURCES  = test_find.cpp
+# test_find_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_find_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_gen_xml_SOURCES  = test_gen_xml.cpp
+# test_gen_xml_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_gen_xml_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_joint_SOURCES  = test_joint.cpp
+# test_joint_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_joint_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_lecture_SOURCES  = test_lecture.cpp
+# test_lecture_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_lecture_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_propagation_SOURCES  = test_propagation.cpp
+# test_propagation_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_propagation_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# 
+# test_separ_SOURCES  = test_separ.cpp
+# test_separ_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_separ_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
+# test_hexa1_SOURCES  = test_hexa1.cpp
+# test_hexa1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_hexa1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./test_hexa1
+
+# libHEXATest.la \
+# USER CASE
+bielle_SOURCES  = bielle.cpp
+bielle_CPPFLAGS = $(COMMON_CPPFLAGS)
+bielle_LDADD    = \
+       ../HEXA/libHEXAimpl.la \
+       $(COMMON_LIBS)
+
+# tuyau_SOURCES  = tuyau.cpp
+# tuyau_CPPFLAGS = $(COMMON_CPPFLAGS)
+# tuyau_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
diff --git a/src/TEST_CPP/ModelTest.cxx b/src/TEST_CPP/ModelTest.cxx
new file mode 100755 (executable)
index 0000000..28da605
--- /dev/null
@@ -0,0 +1,1087 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/extensions/HelperMacros.h>
+
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+#include "HexMatrix.hxx"
+
+#include "ModelTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( ModelTest );
+
+
+ModelTest::ModelTest(void)
+{
+//   _myHexEngine = new HEXA_NS::Hex();
+//   _myDoc= _myHexEngine->addDocument();
+}
+
+ModelTest::~ModelTest(void)
+{
+//   delete _myDoc;
+//   delete _myHexEngine; //CS_TODO : Crash
+}
+
+
+// ======================================================== print_propagations
+void ModelTest::_print_propagations (Hex::Document* doc)
+{
+   int nb = doc->countPropagation ();
+   HexDisplay (nb);
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+           Hex::Edge*   edge = table [ned];
+           Hex::Vertex* v0   = edge->getVertex (0);
+           Hex::Vertex* v1   = edge->getVertex (1);
+
+           if (way)
+              {
+              printf ("     (");
+              v0->printName (", ");
+              v1->printName (")\n");
+              }
+          else
+              {
+              v1->printName (", ");
+              v0->printName (")\n");
+              printf ("     (");
+              }
+           }
+       }
+}
+// // ======================================================== Test_sphere
+// void ModelTest::Test_sphere ()
+// {
+//    Hex::Hex mon_ex;
+//    Hex::Document* doc = mon_ex.addDocument ();
+//    Hex::Vertex*  orig = doc->addVertex (0,0,0);
+// 
+//    int    ncouches = 1;
+//    double k = 0.8;
+//    Hex::Vector*   decal  = doc->addVector (1,1,1);
+//    Hex::Elements* sphere = doc->makeSpherical (orig, decal, ncouches, k);
+// 
+//    for (int nc=0 ; nc <= ncouches ; nc++)
+//        {
+//        Hex::Hexa* cell = sphere->getStrate (nc, Hex::Q_A);
+//        cell->remove ();
+//        // sphere->getStrate (nc, Hex::Q_A)->remove ();
+//        // sphere->getStrate (nc, Hex::Q_B)->remove ();
+//        }
+// 
+//    sphere->saveVtk ("sphere.vtk");
+//    CPPUNIT_ASSERT( true );
+// }
+// ======================================================== Test_cartesi1
+void ModelTest::Test_cartesi1 ()
+{
+   
+   const int size_x = 15;
+   const int size_y = 12;
+   const int size_z = 8;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   //  print_propagations (doc);
+
+   for (int nz=0; nz<size_z ; nz++)
+       for (int ny=nz+1; ny<size_y-nz-1 ; ny++)
+           for (int nx=nz+1; nx<size_x-nz-1 ; nx++)
+               {
+               Hex::Hexa* cell = grid->getHexaIJK (nx, ny, nz);
+               cell->remove ();
+               }
+   
+   doc->setLevel (1);
+   _print_propagations (doc);
+   grid->saveVtk ("grid_cart.vtk");
+
+   // doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== afficher
+#define Afficher(elt) _afficher (#elt, elt)
+int ModelTest::_afficher (cpchar nom, Hex::EltBase* elt)
+{
+   if (elt==NULL)
+      {
+      printf (" .... %s = 0x0\n", nom);
+      return HOK;
+      }
+
+   printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt->getId());
+   return HOK;
+}
+// ======================================================== Test_find
+void ModelTest::Test_find ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   grid->saveVtk ("mini1.vtk");
+   doc->dump ();
+
+   Hex::Vertex *v00, *v02, *v06, *v08, *v10, *v22, *v26;
+
+   Afficher ( v00 = doc->findVertex (0, 0, 0));
+   Afficher ( v02 = doc->findVertex (1, 1, 0));
+   Afficher ( v06 = doc->findVertex (1, 1, 1));
+   Afficher ( v08 = doc->findVertex (2, 1, 0));
+   Afficher ( v10 = doc->findVertex (2, 1, 1));
+   Afficher ( v22 = doc->findVertex (2, 1, 2));
+   Afficher ( v26 = doc->findVertex (2, 2, 2));
+
+   printf ("\n");
+
+   Afficher (doc->findEdge (v06, v10));
+   Afficher (doc->findEdge (v10, v06));
+   printf ("\n");
+
+   Afficher (doc->findQuad (v02, v10));
+   Afficher (doc->findQuad (v06, v08));
+   Afficher (doc->findQuad (v02, v06));
+
+   printf ("\n");
+   Afficher (doc->findHexa (v00, v06));
+   Afficher (doc->findHexa (v06, v26));
+   Afficher (doc->findHexa (v26, v06));
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_joint
+void ModelTest::Test_joint ()
+{
+   
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   Hex::Vertex*   orig2 = doc->addVertex  (dimx/2.0,0,8);
+   Hex::Vector*   vectj = doc->addVector (0,1,0);
+   Hex::Vector*   vecti = doc->addVector (1,0,0);
+   Hex::Elements* grid2 = doc->makeCylindrical (orig2, vecti, vectj, 
+                   1, 180, 1,        dimz,dimy,dimx);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quad* cible = grid2->getQuadJK (dimz, mx, my); 
+
+
+   Hex::Vertex* v1 = prems->getVertex (0);
+   Hex::Vertex* v2 = cible->getVertex (0);
+   Hex::Vertex* v3 = prems->getVertex (1);
+   Hex::Vertex* v4 = cible->getVertex (3);
+
+   Hex::Quads liste;
+   Hex::Quads miroir;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   // Hex::Elements* joint = 
+   //
+   doc->joinQuads  (liste, cible, v1, v2, v3, v4, 5);
+   doc->saveVtk ("joint.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_prism
+void ModelTest::Test_prism ()
+{
+   
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   doc->prismQuads  (liste, dir, 5);
+   doc->saveVtk ("prisme.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+// ======================================================== Test_prism2
+void ModelTest::Test_prism2 ()
+{
+    
+    const int dimx = 11;
+    const int dimy = 11;
+    const int dimz = 2;
+    
+    Hex::Hex mon_ex;
+    Hex::Document* doc = mon_ex.addDocument ("foo");
+    
+    Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+    Hex::Vector* dir   = doc->addVector (1,1,1);
+    
+    Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+    
+    int mx = dimx/2;
+    int my = dimy/2;
+    Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+    Hex::Elements*  prism = doc->prismQuad(prems, dir, 5);
+
+    int nbHexa = prism->countHexa();
+    std::cout << "nbHexa " << nbHexa << std::endl;
+    Hex::Hexa*     hp1 = prism->getHexa(1);
+    std::cout << "getHexa(1) " << hp1 << std::endl;
+    Hex::Vertex*   hp1_v0 = hp1->getVertex(0);
+    std::cout << "getVertex ->" << hp1_v0 << std::endl;
+    Hex::Shape* s = new Hex::Shape("la shape");
+    std::cout << "new Hex::Shape->" << s << std::endl;
+    hp1_v0->setAssociation(s);
+    std::cout <<  "setAssociation ->" << std::endl;
+    doc->saveVtk ("prisme2.vtk");
+
+    CPPUNIT_ASSERT( true );
+}
+
+
+
+
+
+
+
+
+// ======================================================== Test_hexa1
+void ModelTest::Test_hexa1 ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_decoupage
+void ModelTest::Test_decoupage ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+   Hex::Edge*     arete = grid->getEdgeK (0, 0, 0);
+
+   doc ->dump ();
+   doc ->saveVtk ("no_decoupe.vtk");
+/* Hex::Elements* grid2 = */  doc->cut (arete, 1);
+
+   doc ->dump ();
+   doc ->saveVtk ("decoupe.vtk");
+   // doc ->saveFile ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_gen_xml
+void ModelTest::Test_gen_xml ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Hexa*   cell    = grid->getHexa (0);
+   Hex::Quad*   face    = cell->getQuad (0);
+   Hex::Edge*   arete   = cell->getEdge (0);
+   Hex::Vertex* noeud   = cell->getVertex (0);
+
+   Hex::Shape* shape1 = new Hex::Shape("riri");
+   Hex::Shape* shape2 = new Hex::Shape("fifi");
+   Hex::Shape* shape3 = new Hex::Shape("loulou");
+
+   noeud->setAssociation (shape1);
+   arete->setAssociation (shape2);
+   face ->setAssociation (shape3);
+
+   Hex::Law* law1 = doc->addLaw("loi1", 1);
+   Hex::Law* law2 = doc->addLaw("loi2", 2);
+   Hex::Law* law3 = doc->addLaw("loi3", 3);
+
+   law1->setKind (Hex::Uniform);
+   law2->setKind (Hex::Arithmetic);
+   law3->setKind (Hex::Geometric);
+
+   Hex::Propagation* prop1 = doc->getPropagation (0);
+   Hex::Propagation* prop2 = doc->getPropagation (1);
+   Hex::Propagation* prop3 = doc->getPropagation (2);
+
+   prop1->setLaw (law1);
+   prop2->setLaw (law2);
+   prop3->setLaw (law3);
+
+   prop1->setWay (true);
+   prop2->setWay (false);
+   prop3->setWay (true);
+
+   doc ->saveVtk ("mini.vtk");
+   doc ->save ("Essai");
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_relecture
+void ModelTest::Test_relecture ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.loadDocument ("Essai");
+
+   doc ->dump ();
+   doc ->saveVtk ("restore.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+// ======================================================== Test_clone
+void ModelTest::Test_clone ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   bond  = doc->addVector (0, 0, 7);
+   Hex::Elements* grid2 = doc->makeTranslation (grid, bond);
+
+   doc ->saveVtk ("clonage.vtk");
+   doc ->dump();
+
+   HexDump (grid2->getHexa      (1));
+   HexDump (grid2->getHexaIJK   (1,1,1));
+   HexDump (grid2->getVertexIJK (1,1,1));
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_separ
+void ModelTest::Test_separ ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->saveVtk ("separ.vtk");
+   doc ->dump();
+
+   CPPUNIT_ASSERT( true );
+}
+// // ======================================================== Test_cyl_karima
+// void ModelTest::Test_cyl_karima ()
+// {
+//    
+//    Hex::Hex mon_ex;
+//    Hex::Document* doc = mon_ex.addDocument ("foo");
+// 
+//    Hex::Vertex* c2 = doc->addVertex (0,0,0);
+//    Hex::Vector* dz = doc->addVector (0,0,1);
+//    Hex::Vector* dx = doc->addVector (1,0,0);
+// 
+//    double dr = 4.12;
+// 
+//    double a2 = 180;
+//    int    l2 = 70;
+// 
+//    int nr2 = 5;
+//    int na2 = 5;
+//    int nl2 = 1;
+// 
+// /* Hex::Elements* cyl2 = */ doc->makeCylindrical (c2, dx, dz, dr, a2, l2, 
+//                                                   nr2, na2, nl2, false );
+//    doc->saveVtk ("cyl_karima.vtk");
+//    // doc->dump ();
+// 
+//    CPPUNIT_ASSERT( true );
+// }
+// ================================================== Test_grille_cyl
+void ModelTest::Test_grille_cyl ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (10, 0,0);
+
+   Hex::Vertex* orig3 = doc->addVertex ( 0,10,0);
+   Hex::Vertex* orig4 = doc->addVertex (10,10,0);
+
+   Hex::Vertex* orig5 = doc->addVertex ( 0,20,0);
+   Hex::Vertex* orig6 = doc->addVertex (10,20,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 5;
+   nl = 1;
+
+   doc->makeCylindrical(orig1,vx,vz,dr, 360, dl,nr,4,nl, true);
+   doc->makeCylindrical(orig2,vx,vz,dr, 360, dl,nr,8,nl, true);
+   doc->makeCylindrical(orig3,vx,vz,dr, 270, dl,nr,8,nl, true);
+   doc->makeCylindrical(orig6,vx,vz,dr, 360, dl,nr,6,nl, true);
+   doc->makeCylindrical(orig4,vx,vz,dr, 270, dl,nr,7,nl, true);
+   doc->makeCylindrical(orig5,vx,vz,dr, 360, dl,nr,5,nl, true);
+   doc->saveVtk ("cylindres.vtk");
+   // doc->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ===================================================== Test_cylinder
+void ModelTest::Test_cylinder ()
+{
+   
+   int    nvtk    = 0;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig1 = doc->addVertex (0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (50,0,0);
+   Hex::Vector* vz    = doc->addVector (0,0,1);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+
+   int nr  = 4;
+   int nri = 3;
+   int nre = nr;
+   int na = 9;
+   int nl = 5;
+
+   Hex::Cylinder* cyl  = doc->addCylinder   (orig1, vz, nr, nl);
+   Hex::Pipe*     pipe = doc->addPipe       (orig2, vz, nri, nre, nl);
+
+   doc->makeCylinder (cyl,  vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   doc->makePipe     (pipe, vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+
+void ModelTest::myTest_croix ()
+{
+  Hex::Hex mon_ex;
+  Hex::Document* doc = mon_ex.addDocument ("foo");
+
+
+//   Hex::Vector* dx1 = doc->addVector( -1, 0, 0 );
+//   Hex::Vector* dz1 = doc->addVector( 0, 0, 1 );
+//   
+//   Hex::Vertex* c_pte_1 = doc->addVertex ( 195., 0., 220. );
+//   Hex::Vertex* c_grd_1 = doc->addVertex ( 300., 0., 400. );
+//   Hex::Cylinder* cyl_pte_1 = doc->addCylinder( c_pte_1 , dz1 , 25 , 360 );
+//   Hex::Cylinder* cyl_grd_1 = doc->addCylinder( c_grd_1 , dx1 , 50 , 140 );
+//   Hex::CrossElements* cross1 = doc->makeCylinders( cyl_pte_1 , cyl_grd_1 );
+
+  Hex::Vector* dx2 = doc->addVector(-1, 0, 0 );
+  Hex::Vector* dz2 = doc->addVector( 0, 0, 1 );
+  
+  Hex::Vertex* c_pte_2 = doc->addVertex( 110., 0. , 400. );
+  Hex::Vertex* c_grd_2 = doc->addVertex( 0.  , 0. , 0. );
+
+  Hex::Cylinder* cyl_pte_2 = doc->addCylinder( c_pte_2 , dx2 , 50, 220 );
+  Hex::Cylinder* cyl_grd_2 = doc->addCylinder( c_grd_2 , dz2 , 100, 800 );
+  Hex::CrossElements* cross2    = doc->makeCylinders( cyl_pte_2, cyl_grd_2 );
+
+
+/*
+  Hex::Vector* dx2 = doc->addVector( 1, 0, 0 );
+  Hex::Vector* dz2 = doc->addVector( 0, 0, 1 );
+
+  Hex::Vertex* c_pte_2 = doc->addVertex( -130. , 0. , 400. );
+  Hex::Vertex* c_grd_2 = doc->addVertex( 0. , 0. , 0. );
+
+  Hex::Cylinder* cyl_pte_2 = doc->addCylinder( c_pte_2 , dx2 , 50, 260 );
+  Hex::Cylinder* cyl_grd_2 = doc->addCylinder( c_grd_2 , dz2 , 100, 800 );
+
+  Hex::CrossElements* cross2 = doc->makeCylinders( cyl_pte_2, cyl_grd_2 );*/
+  doc->saveVtk ("/tmp/ffffffff.vtk");
+  doc->dump ();
+
+  CPPUNIT_ASSERT( true );
+}
+
+
+
+
+// ======================================================== Test_croix
+void ModelTest::Test_croix ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nr1 = 2;
+   int nl1 = 10;
+   int nr2 = 1;
+   int nl2 = 10;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, nr1, nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, nr2, nl2);
+   Hex::CrossElements* grid = doc->makeCylinders (cyl1, cyl2);
+
+   grid->dump();
+   grid->dumpVertex();
+
+#if 0
+   for (int ny=0; ny<Hex::S_MAXI; ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 5)->remove ();
+
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 3)->remove ();
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 5)->remove ();
+
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 2)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 3)->remove ();
+       }
+
+   /*********************************
+   grid->getHexaIJK (Hex::Cyl2, 0, 3, 1)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 1)->remove ();
+
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 3)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 1)->remove ();
+    ********************************* */
+#endif
+
+   doc->saveVtk ("croix.vtk");
+   doc->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_pipes
+void ModelTest::Test_pipes ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   double h1  = 10, h2  = 10;
+   double ri1 = 1,  ri2 = 1.5;
+   double re1 = 2,  re2 = 3;
+
+   Hex::Pipe* pipe1  = doc->addPipe (ori1, vz, ri1, re1, h1);
+   Hex::Pipe* pipe2  = doc->addPipe (ori2, vx, ri2, re2, h2);
+   Hex::CrossElements* grid = doc->makePipes (pipe1, pipe2);
+
+   grid->dump();
+   grid->dumpVertex();
+
+   doc->saveVtk ("pipes.vtk");
+   doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_lorraine
+void ModelTest::Test_lorraine()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vertex* ori3 = doc->addVertex ( 0,0,12);
+   Hex::Vertex* ori4 = doc->addVertex (-5,0,17);
+
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nl1 = 10;
+   int nl2 = 10;
+
+   double rsmall = 1;
+   double rmoy   = 2;
+   double rbig   = 3;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, rmoy,   nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, rsmall, nl2);
+
+   Hex::Cylinder* cyl3  = doc->addCylinder (ori3, vz, rmoy, nl1);
+   Hex::Cylinder* cyl4  = doc->addCylinder (ori4, vx, rbig, nl2);
+
+   Hex::CrossElements* grid1 = doc->makeCylinders (cyl1, cyl2);
+   Hex::CrossElements* grid2 = doc->makeCylinders (cyl4, cyl3);
+
+#define Imprimer(x) printf (#x " = ") ; if (x) x->dump() ; else printf ("NULL\n")
+   const int nx_int = 0;
+   const int nx_ext = 1;
+
+   //           vc2 = grid1->getVertexIJK (Hex::Cyl2, 0,0,0);
+   //           vc3 = grid2->getVertexIJK (Hex::Cyl1, 0,0,0);
+                                     //    Cyl     i     j     k
+   Hex::Quad* qb = grid1-> getQuadIJ (Hex::Cyl2, nx_ext, Hex::S_E, 4);
+   Hex::Quad* qh = grid2-> getQuadIJ (Hex::Cyl1, nx_ext, Hex::S_N, 0); 
+
+   Hex::Vertex* vb0 = qb->getVertex (3);
+   Hex::Vertex* vb1 = qb->getVertex (2);
+   Hex::Vertex* vh0 = qh->getVertex (0);
+   Hex::Vertex* vh1 = qh->getVertex (1);
+
+   vb0 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_E,  4);  // cible
+   vb1 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_NE, 4);
+   vh0 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_N,  0);   // depart
+   vh1 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_NW, 0);
+
+   Imprimer (vh0);
+   Imprimer (vh1);
+   Imprimer (vb0);
+   Imprimer (vb1);
+
+   // qb->remove ();
+   // qh->remove ();
+   Hex::Quads hliste;
+
+   hliste.push_back (qh);
+   for (int ny=1; ny<Hex::S_MAXI; ny++)
+       {
+       int ns = (ny + Hex::S_N) MODULO Hex::S_MAXI;
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_ext, ns, 0)); 
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_int, ny, 0)); 
+
+   doc->joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, 5);
+   doc->saveVtk ("lorraine.vtk");
+   // doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_disconnect
+void ModelTest::Test_disconnect ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex*   orig2 = doc->addVertex (4,0,0);
+   Hex::Vertex*   orig3 = doc->addVertex (8,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+   Hex::Elements* grid3 = doc->makeCartesian (orig3, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa3 = grid3->getHexaIJK   (1,1,0);
+
+   Hex::Quad* quad  = grid1->getQuadJK  (1,1,0);
+   Hex::Edge* edge  = grid2->getEdgeK   (1,2,0);
+   Hex::Vertex* vertex = grid3->getVertexIJK (1,1,1);
+
+   quad->setScalar   (5);
+   edge->setScalar   (5);
+   vertex->setScalar (5);
+
+   doc->saveVtk ("Test_disco", nvtk);
+   doc->disconnectQuad (hexa1, quad);
+
+   hexa1 ->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->disconnectEdge (hexa2, edge);
+
+   hexa2->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->disconnectVertex (hexa3, vertex);
+
+   hexa3->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->dumpPropagation ();
+   // doc->dump  ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_propagation
+void ModelTest::Test_propagation ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex*   orig = doc->addVertex (0,0,0);
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   //  Hex::Elements* grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   int nb = doc->countPropagation ();
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           if (way)
+              {
+              printf ("     (");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf ("     (");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+
+   doc->dump  ();
+   doc->saveVtk ("Test_propagation.vtk");
+   doc->save    ("Test_propagation");
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_move
+void ModelTest::Test_move ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   enhaut  = doc->addVector (0, 0, 5);
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+   // Hex::Vector*   agauche = doc->addVector (0, 5, 0);
+
+   Hex::Matrix matrice;
+   matrice.defTranslation (enhaut);
+
+   Hex::Hexa* cube    = grid->getHexa (1);
+   Hex::Quad* dessous = cube->getQuad (Hex::Q_A);
+   dessous->dump();
+   
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   /* Hex::Elements* grid3 = doc->makeTranslation (grid, agauche); */
+   Hex::Hexa* cube2     = grid2->getHexa (1);
+
+   doc ->saveVtk ("move0.vtk");
+
+   cube ->disconnectQuad (dessous);
+   cube ->transform (&matrice);
+   cube2->transform (&matrice);
+
+   doc ->saveVtk ("move1.vtk");
+   doc ->dump();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_deux_cyl
+void ModelTest::Test_deux_cyl ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,-5);
+   Hex::Vertex* orig2 = doc->addVertex (-5,0,0);
+
+   Hex::Vector* vx = doc->addVector (1,0,0);
+   Hex::Vector* vy = doc->addVector (0,1,0);
+   Hex::Vector* vz = doc->addVector (0,0,1);
+
+   double dr = 1;
+   double da = 360; // degres
+   double dl = 1.0;
+   int    nr = 2;
+   int    na = 6;
+   int    nl = 10;
+
+   /* Hex::Elements* cyl1 = */ doc->makeCylindrical(orig1, vy,vz, dr, da, 
+                                       dl,nr,na,nl);
+
+   /* Hex::Elements* cyl2 = */ doc->makeCylindrical(orig2, vz,vx, dr/2, da, 
+                                       dl,nr,na,nl);
+   doc->saveVtk ("deux_cylindres.vtk");
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_move2
+void ModelTest::Test_transfo ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   int    nvtk    = 0;
+   cpchar fic_vtk = "transfo";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ("foo");
+   doc ->setLevel (1);
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x, size_y,
+                                                        size_z);
+   if (grid==NULL)
+      CPPUNIT_ASSERT( false );
+
+   orig->setScalar(2);
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   if (grid2==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid3  = doc->makeScale (grid2, orig, 2);
+   if (grid3==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid4 = doc->makeRotation (grid2, orig, dir, 45);
+   if (grid4==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid5 = doc->makeSymmetryPoint (grid4, orig);
+   if (grid5==NULL)
+      CPPUNIT_ASSERT( false );
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector* dir1  = doc->addVector (1,0,0);
+   Hex::Elements* grid6 = doc->makeSymmetryLine (grid4, orig, dir1);
+   if (grid6==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(3);
+   grid6->getHexa(0)->getVertex(0)->setScalar(3);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(0);
+   grid6->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid7 = doc->makeSymmetryLine (grid2, orig, dir1);
+   if (grid7==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid7->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid7->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid8 = doc->makeSymmetryPlane (grid2, orig, dir1);
+   if (grid8==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid8->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid8->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid9 = doc->makeSymmetryPlane (grid3, orig, dir);
+   if (grid9==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid3->getHexa(0)->getVertex(0)->setScalar(4);
+   grid9->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid9->getHexa(0)->removeConnected ();
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+
+
+
diff --git a/src/TEST_CPP/ModelTest.hxx b/src/TEST_CPP/ModelTest.hxx
new file mode 100755 (executable)
index 0000000..f75314d
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __ModelTest__
+#define __ModelTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+// #include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexEltBase.hxx"
+
+class ModelTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( ModelTest );
+    CPPUNIT_TEST( myTest_croix);
+    CPPUNIT_TEST( Test_croix);
+    CPPUNIT_TEST( Test_disconnect);
+    CPPUNIT_TEST( Test_joint);
+    CPPUNIT_TEST( Test_prism);
+    CPPUNIT_TEST( Test_cylinder);
+    CPPUNIT_TEST( Test_find);
+    CPPUNIT_TEST( Test_lorraine);
+    CPPUNIT_TEST( Test_propagation);
+    CPPUNIT_TEST( Test_cartesi1);
+    CPPUNIT_TEST( Test_decoupage);
+    CPPUNIT_TEST( Test_grille_cyl);
+    CPPUNIT_TEST( Test_pipes);
+    CPPUNIT_TEST( Test_separ);
+    CPPUNIT_TEST( Test_clone);
+    CPPUNIT_TEST( Test_deux_cyl);
+    CPPUNIT_TEST( Test_hexa1);
+    CPPUNIT_TEST( Test_prism2);
+    CPPUNIT_TEST( Test_transfo);
+    CPPUNIT_TEST( Test_hexa1);
+    CPPUNIT_TEST( Test_move);
+    CPPUNIT_TEST( Test_gen_xml);
+    CPPUNIT_TEST( Test_relecture);
+    CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    ModelTest(void);
+    ~ModelTest(void);
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+
+//     void Test_bielle();
+    void myTest_croix();
+    void Test_croix();
+    void Test_disconnect();
+    void Test_joint();
+    void Test_prism();
+//     void Test_bride();
+    void Test_cylinder();
+    void Test_find();
+    void Test_lorraine();
+    void Test_propagation();
+//     void Test_bug1();
+//     void Test_debride();
+    void Test_gen_xml();
+    void Test_move();
+    void Test_relecture();
+    void Test_cartesi1();
+    void Test_decoupage();
+    void Test_grille_cyl();
+    void Test_pipes();
+    void Test_separ();
+    void Test_clone();
+    void Test_deux_cyl();
+    void Test_hexa1();
+    void Test_prism2();
+    void Test_transfo();
+
+  private:
+    int _afficher (cpchar nom, Hex::EltBase* elt);
+    void _print_propagations (Hex::Document* doc);
+//     HEXA_NS::Hex *_myHexEngine;
+//     HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/Test_HEXABLOCK.cxx b/src/TEST_CPP/Test_HEXABLOCK.cxx
new file mode 100755 (executable)
index 0000000..ab912d5
--- /dev/null
@@ -0,0 +1,167 @@
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/TestResult.h>
+#include <cppunit/TestResultCollector.h>
+#include <cppunit/TestRunner.h>
+#include <cppunit/XmlOutputter.h>
+
+#include "test_unit.hxx"
+
+#define TestUnit(call) display(#call); ier=call(nbargs,tabargs); display(ier)
+
+static int    total_tests  = 0;
+static int    total_errors = 0;
+static cpchar test_name    = "Unknown";
+
+static void display (cpchar name);
+static void display (int ier);
+
+// ============================================================== Main
+int main (int nbargs, cpchar tabargs [])
+{
+   int ier;
+
+   goto_workspace ();
+
+   TestUnit (test_sphere );
+   TestUnit (test_joint );
+   TestUnit (test_prism );
+   TestUnit (test_revolution9 );
+   TestUnit (test_revolution );
+   TestUnit (test_coude );
+   TestUnit (test_count );
+   TestUnit (test_decoupage );
+   TestUnit (test_gen_xml );
+   TestUnit (test_string_xml );
+   ///   TestUnit (test_relecture );
+   TestUnit (test_spherical);
+   TestUnit (test_grille_cyl );
+   TestUnit (test_cylindrical );
+   TestUnit (test_cylinder );
+   TestUnit (test_xml_cylinder );
+   TestUnit (test_pipe );
+   TestUnit (test_joint2 );
+   TestUnit (test_croix );
+   TestUnit (test_pipes );
+   TestUnit (test_lorraine);
+   TestUnit (test_disconnect2 );
+   TestUnit (test_disconnect4 );
+   TestUnit (test_disconnect1 );
+   TestUnit (test_disconnect3 );
+   TestUnit (test_disconnect );
+   TestUnit (test_transfo2 );
+   TestUnit (test_transfo );
+   TestUnit (test_copy_document );
+   TestUnit (test_cylindricals );
+                 // Dans test_quads
+   TestUnit (test_hexa_quads_5 );
+   TestUnit (test_hexa_quads_ab );
+   TestUnit (test_hexa_quads_ac );
+   TestUnit (test_hexa_quads_ace );
+   TestUnit (test_hexa_quads_acd );
+   TestUnit (test_hexa_quads_abcd );
+   TestUnit (test_hexa_quads_abce );
+   TestUnit (test_cramer );
+   TestUnit (test_hexa_quads_ac1 );
+   TestUnit (test_asso_grid );
+   TestUnit (test_piquage );
+   TestUnit (test_replace );
+   TestUnit (test_hemispheres );
+
+   free_workspace ();
+
+   cout << "========================================= " 
+        << endl;
+   cout << "==== End of tests : Number of Errors = " << total_errors << " / " << total_tests
+        << endl;
+   cout << "========================================= " 
+        << endl;
+
+   return total_errors==0 ? 0 : 1;
+}
+
+// ============================================================== main-type
+int main_standard (int argc, char* argv[])
+{
+       // Retrieve test path from command line first argument. Default to "" which resolve
+       // to the top level suite.
+       std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
+       
+       // Create the event manager and test controller
+       CPPUNIT_NS::TestResult controller;
+       
+       // Add a listener that collects test result
+       CPPUNIT_NS::TestResultCollector result;
+       
+       controller.addListener( &result );
+       
+       // Add a listener that print dots as test run.
+       CPPUNIT_NS::BriefTestProgressListener progress;
+       
+       controller.addListener( &progress );
+       
+       // Add the top suite to the test runner
+       CPPUNIT_NS::TestRunner runner;
+       runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
+       runner.run( controller );
+       
+       // Print test in a compiler compatible format.
+       CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
+       outputter.write();
+       
+       // Uncomment this for XML output
+       std::ofstream file( "cppunit-report.xml" );
+       
+       CPPUNIT_NS::XmlOutputter xml( &result, file );
+       
+       xml.write();
+       
+       file.close();
+       
+       return result.wasSuccessful() ? 0 : 1;
+}
+// ============================================================= display name
+void display (cpchar nom)
+{
+   test_name = nom;
+   cout << endl;
+   cout << "========================================= Run "
+        << test_name << endl;
+}
+// ============================================================= display ier
+void display (int result)
+{
+   cout << ".........................................."
+        << " End of " << test_name;
+   total_tests++;
+   if (result==0)
+      {
+      cout << ", Successfull";
+      }
+   else {
+      cout << ", Code error = " << result;
+      total_errors++;
+   };
+   cout << endl;
+   
+}
diff --git a/src/TEST_CPP/test_hexa1.cxx b/src/TEST_CPP/test_hexa1.cxx
new file mode 100755 (executable)
index 0000000..84217fd
--- /dev/null
@@ -0,0 +1,1940 @@
+
+// C++ : Tests unitaires
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "test_unit.hxx"
+
+#include "test_unit.hxx"
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+#include "HexMatrix.hxx"
+#include "HexCramer.hxx"
+#include "HexGroup.hxx"
+
+
+#include <cstdlib>
+
+static int nbr_vtk = 0;
+static cpchar case_name = "hexa";
+static Hex::Document*   docu = NULL;
+
+// ======================================================== print_propagations
+void print_propagations (Hex::Document* doc)
+{
+   int nb = doc->countPropagation ();
+   HexDisplay (nb);
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+           Hex::Edge*   edge = table [ned];
+           Hex::Vertex* v0   = edge->getVertex (0);
+           Hex::Vertex* v1   = edge->getVertex (1);
+
+           if (way)
+              {
+              printf ("     (");
+              v0->printName (", ");
+              v1->printName (")\n");
+              }
+          else
+              {
+              v1->printName (", ");
+              v0->printName (")\n");
+              printf ("     (");
+              }
+           }
+       }
+}
+// ======================================================== save_vtk
+void save_vtk ()
+{
+   if (docu==NULL)
+      return;
+
+   docu->saveVtk (case_name, nbr_vtk);
+}
+// ======================================================== remove_hexa
+void remove_hexa (Hex::Hexa* hexa)
+{
+   if (hexa==NULL)
+      return;
+
+   hexa->remove();
+
+   if (docu==NULL)
+      return;
+
+   docu->saveVtk (case_name, nbr_vtk);
+}
+// ======================================================== test_sphere
+int test_sphere (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex*  orig = doc->addVertex (0,0,0);
+
+   int    ncouches = 0;
+   double k      = 1;
+   double rayon  = 1;
+   Hex::Elements* sphere = doc->makeSpherical (orig, rayon, ncouches, k);
+
+   if (ncouches>0)
+      {
+   for (int nc=0 ; nc <= ncouches ; nc++)
+       {
+       Hex::Hexa* cell = sphere->getStrate (nc, Hex::Q_A);
+       if (nc==0)
+          cell->dumpFull();
+       cell->remove ();
+       // sphere->getStrate (nc, Hex::Q_A)->remove ();
+       // sphere->getStrate (nc, Hex::Q_B)->remove ();
+       }
+       }
+
+   sphere->saveVtk ("sphere.vtk");
+   return HOK;
+}
+// ======================================================== test_cartesi1
+int test_cartesi1 ()
+{
+   const int size_x = 15;
+   const int size_y = 12;
+   const int size_z = 8;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   //  print_propagations (doc);
+
+   for (int nz=0; nz<size_z ; nz++)
+       for (int ny=nz+1; ny<size_y-nz-1 ; ny++)
+           for (int nx=nz+1; nx<size_x-nz-1 ; nx++)
+               {
+               Hex::Hexa* cell = grid->getHexaIJK (nx, ny, nz);
+               cell->remove ();
+               }
+   
+   doc->setLevel (1);
+   print_propagations (doc);
+   grid->saveVtk ("grid_cart.vtk");
+
+   // doc->dump ();
+   return HOK;
+}
+// ======================================================== afficher
+#define Afficher(elt) afficher (#elt, elt)
+int afficher (cpchar nom, Hex::EltBase* elt)
+{
+   if (elt==NULL)
+      {
+      printf (" .... %s = 0x0\n", nom);
+      return HOK;
+      }
+
+   printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt->getId());
+   return HOK;
+}
+// ======================================================== test_find
+int test_find ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   grid->saveVtk ("mini1.vtk");
+   doc->dump ();
+
+   Hex::Vertex *v00, *v02, *v06, *v08, *v10, *v22, *v26;
+
+   Afficher ( v00 = doc->findVertex (0, 0, 0));
+   Afficher ( v02 = doc->findVertex (1, 1, 0));
+   Afficher ( v06 = doc->findVertex (1, 1, 1));
+   Afficher ( v08 = doc->findVertex (2, 1, 0));
+   Afficher ( v10 = doc->findVertex (2, 1, 1));
+   Afficher ( v22 = doc->findVertex (2, 1, 2));
+   Afficher ( v26 = doc->findVertex (2, 2, 2));
+
+   printf ("\n");
+
+   Afficher (doc->findEdge (v06, v10));
+   Afficher (doc->findEdge (v10, v06));
+   printf ("\n");
+
+   Afficher (doc->findQuad (v02, v10));
+   Afficher (doc->findQuad (v06, v08));
+   Afficher (doc->findQuad (v02, v06));
+
+   printf ("\n");
+   Afficher (doc->findHexa (v00, v06));
+   Afficher (doc->findHexa (v06, v26));
+   Afficher (doc->findHexa (v26, v06));
+
+   return HOK;
+}
+// ======================================================== test_joint
+int test_joint (int nbargs, cpchar tabargs[])
+{
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   Hex::Vertex*   orig2 = doc->addVertex  (dimx/2.0,0,8);
+   Hex::Vector*   vectj = doc->addVector (0,1,0);
+   Hex::Vector*   vecti = doc->addVector (1,0,0);
+   Hex::Elements* grid2 = doc->makeCylindrical (orig2, vecti, vectj, 
+                   1, 180, 1,        dimz,dimy,dimx);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quad* cible = grid2->getQuadJK (dimz, mx, my); 
+
+   Hex::Vertex* v1 = prems->getVertex (0);
+   Hex::Vertex* v3 = prems->getVertex (1);
+
+   Hex::Vertex* v2 = cible->getVertex (1);
+   Hex::Vertex* v4 = cible->getVertex (2);
+
+   // v1->setScalar (3);
+   // v2->setScalar (3);
+   // v3->setScalar (6);
+   // v4->setScalar (6);
+
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   doc->saveVtk ("joint1.vtk");
+   const int hauteur = 5;
+   Hex::Elements* joint = doc->joinQuads(liste, cible, v1,v2,v3,v4, hauteur);
+   // for (int nh=0 ; nh<hauteur ; nh++) joint->getHexa(nh)->setScalar (5);
+
+   int nbr_joint_vertex =  joint->countVertex ();
+   int nbr_surf_vertex  =  nbr_joint_vertex/(hauteur+1);
+
+   HexDisplay (nbr_joint_vertex);
+   HexDisplay (nbr_surf_vertex);
+
+   int indice0 = joint->findVertex (v1);
+   HexDisplay (indice0);
+
+   for (int nh=0 ; nh<nbr_surf_vertex ; nh++) 
+       joint->getVertex(nh)->setScalar (5);
+
+   for (int nh=0 ; nh<=hauteur ; nh++) 
+       joint->getVertex(nh*nbr_surf_vertex)->setScalar (3);
+
+   doc->saveVtk ("joint2.vtk");
+   return HOK;
+}
+// ======================================================== test_prism
+int test_prism (int nbargs, cpchar tabargs[])
+{
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0,0,0);
+   Hex::Vector* dir1  = doc->addVector ( 1,1,1);
+   Hex::Vector* dir2  = doc->addVector ( 1,1,-1);
+
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir1, dimx,dimy,dimz);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quads liste1, liste2;
+
+   liste1.push_back (grid1->getQuadIJ (mx, my, dimz)); 
+   liste2.push_back (grid1->getQuadIJ (mx, my, 0)); 
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          {
+          liste1.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+          liste2.push_back (grid1->getQuadIJ (nx, my, 0)); 
+          }
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          {
+          liste1.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+          liste2.push_back (grid1->getQuadIJ (mx, ny, 0)); 
+          }
+
+   Hex::RealVector tlen;
+   double dh = 2;
+   for (int nro=0; nro<5; nro++)
+       {
+       dh = 2*dh + 1;
+       tlen.push_back (dh);
+       }
+   
+   const int nbiter = 5;
+   doc->saveVtk ("prisme1.vtk");
+   Hex::Elements* prisme2 = doc->prismQuads    (liste2, dir2, nbiter);
+   doc->saveVtk ("prisme2.vtk");
+
+   Hex::Elements* prisme1 = doc->prismQuadsVec (liste1, dir1, tlen, 0);
+
+   PutData (liste1.size());
+   PutData (tlen.size());
+   PutData (prisme1->countHexa());
+   PutData (prisme1->countQuad());
+   PutData (prisme1->countEdge());
+   PutData (prisme1->countVertex());
+   
+   for (int nro=0 ; nro <nbiter  ; nro++)
+       {
+       Hex::Hexa* cell = prisme2-> getHexa (nbiter+nro);
+       cell->setScalar (5);
+       }
+
+   doc->saveVtk ("prisme3.vtk");
+   return HOK;
+}
+// ======================================================== test_revolution9
+int test_revolution9 (int nbargs, cpchar tabargs[])
+{
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   prems -> setScalar (5);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          {
+          Hex::Quad* cell = grid1->getQuadIJ (nx, my, dimz); 
+          liste.push_back (cell);
+          cell -> setScalar (5);
+          }
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          {
+          Hex::Quad* cell = grid1->getQuadIJ (mx, ny, dimz); 
+          liste.push_back (cell);
+          cell -> setScalar (5);
+          }
+
+   Hex::Vertex* center = doc->addVertex (0, -10, 0);
+   Hex::Vector* axis   = doc->addVector (1,   0, 0);
+   Hex::RealVector  angles;
+
+   Hex::Vector*   dir1  = doc->addVector (10,0.3,0.3);
+   Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1);
+   Hex::Hexa*     cell  = grid2->getHexaIJK (0,0,0);
+   cell->setScalar (5);
+
+   doc->saveVtk ("revolution1.vtk");
+
+   double alpha = 5;
+   int niter    = 5;
+   double coeff = 1.5;
+   for (int na=0 ; na<niter ; na++)
+       {
+       angles.push_back (alpha);
+       alpha *= coeff;
+       }
+   for (int na=1 ; na<niter ; na++)
+       {
+       alpha /= coeff;
+       angles.push_back (alpha);
+       }
+
+   Hex::Elements* bloc = doc->revolutionQuads  (liste, center, axis, angles);
+   if (bloc != NULL)
+       doc->saveVtk ("revolution2.vtk");
+
+   return HOK;
+}
+// ======================================================== test_revolution
+int test_revolution (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori = doc->addVertex (0,0,0);
+   Hex::Vector* vx  = doc->addVector (1,0,0);
+   Hex::Vector* vz  = doc->addVector (0,0,1);
+
+   int dr = 1;
+   int da = 360;
+   int dl = 1;
+
+   int nr = 1;
+   int na = 6;
+   int nl = 1;
+
+   Hex::Elements* grid = doc->makeCylindrical (ori, vx,vz, dr,da,dl, 
+                                               nr,na,nl, false);
+
+   Hex::Quads liste;
+   for (int nx=0; nx<nr; nx++)
+       for (int ny=0; ny<na; ny++)
+           {
+           Hex::Quad* cell = grid->getQuadIJ (nx, ny, nl); 
+           liste.push_back (cell);
+           cell -> setScalar (5);
+           }
+
+   Hex::Vertex* center = doc->addVertex (0, -10, 0);
+   Hex::Vector* axis   = doc->addVector (1, 0, 0);
+   Hex::RealVector  angles;
+
+   Hex::Vector*   dir1  = doc->addVector (10,0.3,0.3);
+   Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1);
+   Hex::Hexa*     cell  = grid2->getHexaIJK (0,0,0);
+   cell->setScalar (5);
+
+   doc->saveVtk ("revolution1.vtk");
+
+   double alpha = 5;
+   int niter    = 5;
+   double coeff = 1.5;
+   for (int na=0 ; na<niter ; na++)
+       {
+       angles.push_back (alpha);
+       alpha *= coeff;
+       }
+   for (int na=1 ; na<niter ; na++)
+       {
+       alpha /= coeff;
+       angles.push_back (alpha);
+       }
+
+   Hex::Elements* bloc = doc->revolutionQuads  (liste, center, axis, angles);
+   if (bloc != NULL)
+       doc->saveVtk ("revolution2.vtk");
+
+   return HOK;
+}
+// ======================================================== test_coude
+int test_coude (int nbargs, cpchar tabargs[])
+{
+#if 0
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   //   grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+   double dr = 1;
+   int    dl = 5;
+   int    nr = 4;
+   int    na = 8;
+
+   Hex::Elements* grid1 = doc->makeCylindrical (orig1, vx,vz,dr,360, dl,
+                                                nr, 10, nl, false);
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   prems -> setScalar (5);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          {
+          Hex::Quad* cell = grid1->getQuadIJ (nx, my, dimz); 
+          liste.push_back (cell);
+          cell -> setScalar (5);
+          }
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          {
+          Hex::Quad* cell = grid1->getQuadIJ (mx, ny, dimz); 
+          liste.push_back (cell);
+          cell -> setScalar (5);
+          }
+
+
+   Hex::Vertex* center = doc->addVertex (0, -10, 0);
+   Hex::Vector* axis   = doc->addVector (1, 0, 0);
+   Hex::RealVector  angles;
+
+   Hex::Vector*   dir1  = doc->addVector (10,0.3,0.3);
+   Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1);
+   Hex::Hexa*     cell  = grid2->getHexaIJK (0,0,0);
+   cell->setScalar (5);
+
+   doc->saveVtk ("revolution1.vtk");
+
+   double alpha = 5;
+   int niter    = 5;
+   double coeff = 1.5;
+   for (int na=0 ; na<niter ; na++)
+       {
+       angles.push_back (alpha);
+       alpha *= coeff;
+       }
+   for (int na=1 ; na<niter ; na++)
+       {
+       alpha /= coeff;
+       angles.push_back (alpha);
+       }
+
+   Hex::Elements* bloc = doc->revolutionQuads  (liste, center, axis, angles);
+   if (bloc != NULL)
+       doc->saveVtk ("revolution2.vtk");
+#endif
+   return HOK;
+}
+// ======================================================== test_count
+int test_count (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+   Hex::Vector* vz    = doc->addVector (0,0,1);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 3;
+
+   Hex::Elements* c1;
+
+   c1 = doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, 10, nl, false);
+
+   HexDisplay (doc->countVertex ());
+   HexDisplay (doc->countUsedVertex ());
+   doc ->saveVtk ("hexa1.vtk");
+
+   return HOK;
+}
+// ======================================================== test_decoupage
+int test_decoupage (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+   Hex::Edge*     arete = grid->getEdgeK (0, 0, 0);
+
+   //  doc ->dump ();
+   int nvtk=0;
+   doc ->saveVtk ("decoupe", nvtk);
+/* Hex::Elements* grid2 = */  doc->cut (arete, 1);
+
+   ///  doc ->dump ();
+   doc ->saveVtk ("decoupe", nvtk);
+
+   return HOK;
+}
+// ======================================================== test_gen_xml
+int test_gen_xml (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Hexa*   cell    = grid->getHexa (0);
+   Hex::Quad*   face    = cell->getQuad (0);
+   Hex::Edge*   arete   = cell->getEdge (0);
+   Hex::Vertex* noeud   = cell->getVertex (0);
+
+   Hex::Shape* shape1 = new Hex::Shape("riri");
+   Hex::Shape* shape2 = new Hex::Shape("fifi");
+   Hex::Shape* shape3 = new Hex::Shape("loulou");
+
+   noeud->setAssociation (shape1);
+   arete->setAssociation (shape2);
+   face ->setAssociation (shape3);
+
+   Hex::Law* law1 = doc->addLaw("loi1", 1);
+   Hex::Law* law2 = doc->addLaw("loi2", 2);
+   Hex::Law* law3 = doc->addLaw("loi3", 3);
+
+   law1->setKind (Hex::Uniform);
+   law2->setKind (Hex::Arithmetic);
+   law3->setKind (Hex::Geometric);
+
+   Hex::Propagation* prop1 = doc->getPropagation (0);
+   Hex::Propagation* prop2 = doc->getPropagation (1);
+   Hex::Propagation* prop3 = doc->getPropagation (2);
+
+   prop1->setLaw (law1);
+   prop2->setLaw (law2);
+   prop3->setLaw (law3);
+
+   prop1->setWay (true);
+   prop2->setWay (false);
+   prop3->setWay (true);
+
+   doc ->saveVtk ("mini.vtk");
+   doc ->save ("Essai");
+
+   return HOK;
+}
+// ======================================================== test_string_xml
+int test_string_xml (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Hexa*   cell    = grid->getHexa (0);
+   Hex::Quad*   face    = cell->getQuad (0);
+   Hex::Edge*   arete   = cell->getEdge (0);
+   Hex::Vertex* noeud   = cell->getVertex (0);
+
+   Hex::Shape* shape1 = new Hex::Shape("riri");
+   Hex::Shape* shape2 = new Hex::Shape("fifi");
+   Hex::Shape* shape3 = new Hex::Shape("loulou");
+
+   noeud->setAssociation (shape1);
+   arete->setAssociation (shape2);
+   face ->setAssociation (shape3);
+
+   Hex::Law* law1 = doc->addLaw("loi1", 1);
+   Hex::Law* law2 = doc->addLaw("loi2", 2);
+   Hex::Law* law3 = doc->addLaw("loi3", 3);
+
+   law1->setKind (Hex::Uniform);
+   law2->setKind (Hex::Arithmetic);
+   law3->setKind (Hex::Geometric);
+
+   Hex::Propagation* prop1 = doc->getPropagation (0);
+   Hex::Propagation* prop2 = doc->getPropagation (1);
+   Hex::Propagation* prop3 = doc->getPropagation (2);
+
+   prop1->setLaw (law1);
+   prop2->setLaw (law2);
+   prop3->setLaw (law3);
+
+   prop1->setWay (true);
+   prop2->setWay (false);
+   prop3->setWay (true);
+
+   doc ->saveVtk ("mini.vtk");
+   doc ->save ("Essai");
+
+   cpchar flux = doc ->getXml ();
+   Hex::Document* docbis = mon_ex.addDocument ();
+   docbis->setXml  (flux);
+   docbis->saveVtk ("clone.vtk");
+
+   return HOK;
+}
+// ======================================================== test_relecture
+int test_relecture (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   cpchar nomdoc = "Essai";
+   if (nbargs>1) 
+      nomdoc = tabargs[1];
+   Hex::Document* doc = mon_ex.loadDocument (nomdoc);
+
+/*********************
+   Hex::Vertex* v4 = doc->findVertex (80.0, 0.0,  0.0);
+   Hex::Vertex* v5 = doc->findVertex (80.0, 0.0, 40.0);
+   Hex::Edge*   e4 = doc->findEdge   (v4, v5);
+
+   HexDump (v4);
+   HexDump (v5);
+   HexDump (e4);
+
+   e4->setScalar (5);
+***********************/
+
+   doc ->dump ();
+   doc ->saveVtk ("restore.vtk");
+   doc ->save ("restore");
+
+   // doc ->reorderFaces ();
+   // doc ->dump ();
+
+   // Hex::Elements* grid2 = doc->cut (e4, 2);
+   return HOK;
+}
+// ======================================================== test_clone
+int test_clone ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   bond  = doc->addVector (0, 0, 7);
+   Hex::Elements* grid2 = doc->makeTranslation (grid, bond);
+
+   doc ->saveVtk ("clonage.vtk");
+   doc ->dump();
+
+   HexDump (grid2->getHexa      (1));
+   HexDump (grid2->getHexaIJK   (1,1,1));
+   HexDump (grid2->getVertexIJK (1,1,1));
+
+   return HOK;
+}
+// ======================================================== test_separ
+int test_separ ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->saveVtk ("separ.vtk");
+   doc ->dump();
+
+   return HOK;
+}
+// ======================================================== test_shperical
+int test_spherical (int nbargs, const char* tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   double       rayon  = 1;
+   int          nbr    = 3;
+
+   Hex::Elements* grid = doc->makeSpherical (orig, rayon, nbr);
+
+   int nbhexas = grid->countHexa ();
+   HexDisplay (nbhexas);
+   for (int nro=0 ; nro<nbhexas ; nro +=3)
+       grid->getHexa(nro)->remove();
+   HexDisplay (doc->countHexa ());
+   doc->saveVtk ("shperical.vtk");
+   // doc->dump ();
+
+   return HOK;
+}
+// ================================================== test_grille_cyl
+int test_grille_cyl (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (10, 0,0);
+
+   Hex::Vertex* orig3 = doc->addVertex ( 0,10,0);
+   Hex::Vertex* orig4 = doc->addVertex (10,10,0);
+
+   Hex::Vertex* orig5 = doc->addVertex ( 0,20,0);
+   Hex::Vertex* orig6 = doc->addVertex (10,20,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 3;
+
+   Hex::Elements *c1, *c2, *c3, *c4, *c5, *c6;
+
+   c1 = doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, 4, nl, true);
+   c2 = doc->makeCylindrical (orig2, vx,vz,dr, 360, dl,nr, 8, nl, true);
+   c3 = doc->makeCylindrical (orig3, vx,vz,dr, 270, dl,nr, 8, nl, true);
+   c4 = doc->makeCylindrical (orig4, vx,vz,dr, 270, dl,nr, 7, nl, true);
+   c5 = doc->makeCylindrical (orig5, vx,vz,dr, 360, dl,nr, 5, nl, true);
+   c6 = doc->makeCylindrical (orig6, vx,vz,dr, 360, dl,nr, 6, nl, true);
+
+   int base2 = nr*nl*8;
+   c2->getHexa(base2 + 0)->setScalar (5);
+   c2->getHexa(base2 + 1)->setScalar (5);
+   c2->getHexa(base2 + 2)->setScalar (5);
+
+   doc->saveVtk ("cylindres.vtk");
+   // doc->dump ();
+
+   return HOK;
+}
+// ================================================== test_asso_line
+int test_asso_line (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 3;
+   int    ntheta = 8;
+
+   Hex::Elements *c1 = NULL;
+
+   c1 = doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, ntheta, nl, true);
+
+   Hex::Edges m_line;
+   Hex::Edge* m_start = c1->getEdgeJ (nr, 1, 0);
+
+   for (int na=2 ; na<ntheta ; na++)
+       {
+       Hex::Edge*  arete = c1->getEdgeJ (nr, na, 0);
+       arete->setScalar (5);
+       m_line.push_back (arete);
+       }
+
+   // m_line.push_back (c1->getEdgeJ (nr, 0, 2));
+   // m_line.push_back (NULL);
+   Hex::Shape* gstart = NULL;
+   Hex::Shapes gline;
+   double pstart = 0 , pend = 0;
+
+   int ier = doc-> associateOpenedLine (m_start, m_line, 
+                                        gstart,  pstart, gline, pend);
+   HexDisplay (ier);
+   doc->saveVtk ("asso_line.vtk");
+
+  m_line.push_back (c1->getEdgeJ (nr, 0, 0));
+   Hex::Vertex* m_first = m_start->getVertex (Hex::V_AMONT);
+   ier = doc-> associateClosedLine (m_first, m_start, m_line, 
+                                        gstart, pstart, false, gline);
+   HexDisplay (ier);
+   // doc->dump ();
+
+   return HOK;
+}
+// ===================================================== test_cylindrical
+int test_cylindrical (int nbargs, cpchar tabargs[])
+{
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0, 0, 0);
+   Hex::Vector* vx   = doc->addVector (1, 0, 0);
+   Hex::Vector* vz   = doc->addVector (0, 0, 1);
+
+   double dr = 1;
+   double da = 360;
+   double dl = 1;
+
+   int nr = 1;
+   int na = 8;
+   int nl = 2;
+
+   if (nbargs>1) 
+      {
+      na = atoi (tabargs[1]);
+      HexDisplay (na);
+      if (na <= 2)
+          na = 8;
+      }
+
+   if (nbargs>2) 
+      {
+      da = atof (tabargs[2]);
+      HexDisplay (da);
+      }
+
+   // Hex::Cylinder* cyl  = doc->addCylinder   (orig, vz, nr, nl);
+   // Hex::Elements* grid = doc->makeCylinder (cyl, vx, nr, na, nl);
+   doc->makeCylindrical (orig,vx, vz, dr,da,dl, nr,na, nl, true);
+   doc ->saveVtk (fic_vtk, na);
+   return HOK;
+}
+// ===================================================== test_cylinder
+int test_cylinder (int nbargs, cpchar tabargs[])
+{
+   int    nvtk    = 1;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0, 0, 0);
+   Hex::Vector* vx   = doc->addVector (1, 0, 0);
+   Hex::Vector* vz   = doc->addVector (0, 0, 1);
+
+   double rayon   = 10;
+   double hauteur = 6;
+
+   int nr = 2;
+   int na = 8;
+   int nl = 5;
+
+   Hex::Cylinder* cyl  = doc->addCylinder   (orig, vz, rayon, hauteur);
+   doc->makeCylinder (cyl, vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ===================================================== test_xml_cylinder
+int test_xml_cylinder (int nbargs, cpchar tabargs[])
+{
+   int    nvtk    = 0;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (50,0,0);
+   Hex::Vector* vz    = doc->addVector (0,0,1);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+
+   vx->setName ("vx");
+   vz->setName ("vz");
+   orig1->setName ("orig1");
+   orig2->setName ("orig2");
+
+   int nr  = 4;
+   int nri = 3;
+   int nre = nr;
+   int na = 9;
+   int nl = 5;
+
+   Hex::Cylinder* cyl  = doc->addCylinder   (orig1, vz, nr, nl);
+   Hex::Pipe*     pipe = doc->addPipe       (orig2, vz, nri, nre, nl);
+
+   Hex::Elements* grid = doc->makeCylinder (cyl,  vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Group* groupe = doc->addGroup ("GroupeAMA", Hex::HexaCell);
+   groupe->addElement (grid->getHexaIJK (0,0,0));
+   groupe->addElement (grid->getHexaIJK (1,0,0));
+   groupe->addElement (grid->getHexaIJK (0,1,0));
+   groupe->addElement (grid->getHexaIJK (1,1,0));
+   groupe->addElement (grid->getHexaIJK (2,1,0));
+
+   grid->getHexaIJK  (0,0,0)->setName ("Hexa0");
+   grid->getQuadIJ   (0,0,0)->setName ("QuadIJ0");
+   grid->getEdgeK    (0,0,0)->setName ("EdgeK0");
+
+   doc->makePipe     (pipe, vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+   doc->save ("cylindre");
+
+   return HOK;
+}
+// ===================================================== test_pipe
+int test_pipe (int nbargs, cpchar tabargs[])
+{
+   int    nvtk    = 0;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0, 0,0);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+   Hex::Vector* vy    = doc->addVector (0,1,0);
+
+   int nr  = 1;
+   int nri = 1;
+   int nre = 2;
+   int na = 2;
+   int nl = 1;
+
+   Hex::Pipe*  pipe = doc->addPipe  (orig1, vx, nri, nre, nl);
+   doc->makePipe     (pipe, vy, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   return HOK;
+}
+// ======================================================== del_hexa
+void del_hexa (Hex::CrossElements* gr, int cyl, int ni, int nj, int nk, int dr)
+{
+   Hex::Hexa* hexa = gr->getHexaIJK (cyl, ni, nj, nk);
+   if (hexa!=NULL)
+      {
+      hexa->remove ();
+      if (dr>1)
+          save_vtk ();
+      }
+}
+// ======================================================== del_tranche
+int del_tranche (Hex::CrossElements* grid, int cyl, int ni, int nk, int dr=1)
+{
+   for (int nj = 0 ; nj < 8 ; nj++)
+        del_hexa (grid, cyl, ni, nj, nk, dr);
+
+   if (dr==1)  
+      save_vtk ();
+   printf ("del_tranche (g=%d, i=%d, k=%d) : fic = %d\n", 
+                         cyl, ni, nk, nbr_vtk-1);
+   return nbr_vtk;
+}
+// ======================================================== test_joint2
+int test_joint2 (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   docu = mon_ex.addDocument ();
+   case_name = "pb_joint";
+
+   Hex::Vector* vx    = docu->addVector (1, 0, 0);
+   Hex::Vector* vz    = docu->addVector (0, 0, 1);
+   Hex::Vertex* hori  = docu->addVertex (0, 0, 0);
+
+   double da = 360;
+   double dr = 2;
+   double dl = 1;
+   int    nr = 1;
+   int    na = 8;
+   int    nl = 1;
+   bool   fill = true;
+
+   Hex::Elements *bgrid=NULL, *hgrid=NULL;
+
+   hgrid = docu->makeCylindrical (hori, vx,vz, dr,da,dl, nr,na,nl, fill);
+   docu->dump ();
+   save_vtk ();
+
+   Hex::Vertex* bori  = docu->addVertex (0, 0, -5);
+   bgrid = docu->makeCylindrical (bori, vx,vz, dr,da,dl, nr,na,nl, fill);
+   save_vtk ();
+
+   Hex::Quads qsource, qdest;
+   printf (" Source = ");
+   for (int ny=0 ; ny< na ; ny++)
+       {
+       Hex::Quad* quad = hgrid->getQuadIJ (0, ny, 0);
+       PrintName (quad);
+       qsource.push_back (quad);
+       }
+   printf ("\n          ");
+   for (int ny=0 ; ny<4 ; ny++)
+       {
+       Hex::Quad* quad = hgrid->getKerHQuad (ny);
+       PrintName (quad);
+       qsource.push_back (quad);
+       }
+   printf ("\n");
+
+
+   printf (" Cible  = ");
+   for (int ny=0 ; ny< na ; ny++)
+       {
+       Hex::Quad* quad = bgrid->getQuadIJ (0, ny, 1);
+       PrintName (quad);
+       qdest.push_back (quad);
+       }
+   printf ("\n          ");
+   for (int ny=0 ; ny<4 ; ny++)
+       {
+       Hex::Quad* quad = bgrid->getKerHQuad (ny+4);
+       PrintName (quad);
+       qdest.push_back (quad);
+       }
+   printf ("\n");
+   docu ->setLevel (1);
+   Hex::Quad*   cible = bgrid->getQuadIJ    (0, 1, 1);
+   Hex::Vertex* vc1   = bgrid->getVertexIJK (0, 1, 1);
+   Hex::Vertex* vc2   = bgrid->getVertexIJK (1, 1, 1);
+
+   Hex::Vertex* vs1 = hgrid->getVertexIJK (0, 0, 0);
+   Hex::Vertex* vs2 = hgrid->getVertexIJK (1, 0, 0);
+
+   docu->joinQuads (qsource, cible, vs1, vc1, vs2, vc2, 1);
+   save_vtk ();
+
+   return HOK;
+}
+// ======================================================== test_croix
+int test_croix (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   docu = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = docu->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = docu->addVertex (-5,0,5);
+   Hex::Vector* vz   = docu->addVector ( 0,0,1);
+   Hex::Vector* vx   = docu->addVector ( 1,0,0);
+
+   double r1 = 2;
+   double r2 = 3;
+   double l2 = 10;
+   double l1 = 10;
+
+   Hex::Cylinder*      cyl1 = docu->addCylinder (ori1, vz, r1, l1);
+   Hex::Cylinder*      cyl2 = docu->addCylinder (ori2, vx, r2, l2);
+   Hex::CrossElements* grid = docu->makeCylinders (cyl1, cyl2);
+
+   case_name = "croix";
+   save_vtk ();
+
+   del_tranche (grid, 0, 1, 0);
+   del_tranche (grid, 0, 1, 5);
+
+   del_tranche (grid, 1, 1, 0);
+   del_tranche (grid, 1, 1, 3);
+
+   del_tranche (grid, 1, 0, 0);
+   del_tranche (grid, 1, 0, 3);
+                                  // Le trognon
+   del_tranche (grid, 0, 0, 0);
+   del_tranche (grid, 0, 0, 5);
+   del_tranche (grid, 0, 0, 1);
+   del_tranche (grid, 0, 0, 2);
+   del_tranche (grid, 0, 0, 3);
+   del_tranche (grid, 0, 0, 4);
+                                  // Partie critique
+
+   del_tranche (grid, 1, 1, 1, 2);
+
+   del_tranche (grid, 0, 1, 1, 2);
+   del_tranche (grid, 0, 1, 4, 2);
+   del_tranche (grid, 0, 1, 3, 2);
+   del_tranche (grid, 0, 1, 2, 2);
+
+   del_tranche (grid, 1, 1, 2, 2);
+   return HOK;
+}
+// ======================================================== test_pipes
+int test_pipes (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+// double h1  =  5, ri1 = 1, re1 = 2;
+   double h1  = 10, ri1 = 1, re1 = 2;
+   double h2  = 10, ri2 = 2, re2 = 3;
+
+   Hex::Pipe* pipe1  = doc->addPipe (ori1, vz, ri1, re1, h1);
+   Hex::Pipe* pipe2  = doc->addPipe (ori2, vx, ri2, re2, h2);
+   Hex::CrossElements* grid = doc->makePipes (pipe1, pipe2);
+
+   case_name = "pipe";
+   docu      = doc;
+   save_vtk ();
+
+   del_tranche (grid, 0, 1, 0);
+   del_tranche (grid, 0, 1, 5);
+
+   del_tranche (grid, 1, 1, 0);
+   del_tranche (grid, 1, 1, 3);
+                                  // Partie critique
+
+   del_tranche (grid, 1, 1, 1, 2);
+
+   del_tranche (grid, 0, 1, 1, 2);
+   del_tranche (grid, 0, 1, 4, 2);
+   del_tranche (grid, 0, 1, 3, 2);
+   del_tranche (grid, 0, 1, 2, 2);
+
+   del_tranche (grid, 1, 1, 2, 2);
+   /* ***************************************************
+
+   int nbz [2] =  { 8, 4 };
+   int ni = 1;
+   for (int cyl = 0 ; cyl < 2 ; cyl++)
+       for (int nk = 0 ; nk < nbz[cyl] ; nk++)
+       for (int nj = 0 ; nj < 4 ; nj++)
+           {
+           int jj = nj;
+           if (cyl==0) jj = (jj+6) MODULO 8 ;
+           Hex::Hexa* hexa = grid->getHexaIJK (cyl, ni, jj, nk);
+           if (hexa!=NULL)
+              {
+              hexa->remove ();
+              doc->saveVtk (case_name,  nbr_vtk);
+              }
+           }
+      *************************************************** */
+   return HOK;
+}
+// ======================================================== test_lorraine
+int test_lorraine(int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vertex* ori3 = doc->addVertex ( 0,0,12);
+   Hex::Vertex* ori4 = doc->addVertex (-5,0,17);
+
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nl1 = 10;
+   int nl2 = 10;
+
+   double rsmall = 1;
+   double rmoy   = 2;
+   double rbig   = 3;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, rmoy,   nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, rsmall, nl2);
+
+   Hex::Cylinder* cyl3  = doc->addCylinder (ori3, vz, rmoy, nl1);
+   Hex::Cylinder* cyl4  = doc->addCylinder (ori4, vx, rbig, nl2);
+
+   Hex::CrossElements* grid1 = doc->makeCylinders (cyl1, cyl2);
+   Hex::CrossElements* grid2 = doc->makeCylinders (cyl4, cyl3);
+
+#define Imprimer(x) printf (#x " = ") ; if (x) x->dump() ; else printf ("NULL\n")
+   const int nx_int = 0;
+   const int nx_ext = 1;
+
+   //           vc2 = grid1->getVertexIJK (Hex::CylBig, 0,0,0);
+   //           vc3 = grid2->getVertexIJK (Hex::CylSmall, 0,0,0);
+                                     //    Cyl     i     j     k
+   Hex::Quad* qb = grid1-> getQuadIJ (Hex::CylBig, nx_ext, Hex::S_E, 4);
+   Hex::Quad* qh = grid2-> getQuadIJ (Hex::CylSmall, nx_ext, Hex::S_N, 0); 
+
+   Hex::Vertex* vb0 = qb->getVertex (3);
+   Hex::Vertex* vb1 = qb->getVertex (2);
+   Hex::Vertex* vh0 = qh->getVertex (0);
+   Hex::Vertex* vh1 = qh->getVertex (1);
+
+   vb0 = grid1->getVertexIJK (Hex::CylBig, 2, Hex::S_E,  4);  // cible
+   vb1 = grid1->getVertexIJK (Hex::CylBig, 2, Hex::S_NE, 4);
+   vh0 = grid2->getVertexIJK (Hex::CylSmall, 2, Hex::S_N,  0);   // depart
+   vh1 = grid2->getVertexIJK (Hex::CylSmall, 2, Hex::S_NW, 0);
+
+   Imprimer (vh0);
+   Imprimer (vh1);
+   Imprimer (vb0);
+   Imprimer (vb1);
+
+   // qb->remove ();
+   // qh->remove ();
+   Hex::Quads hliste;
+
+   hliste.push_back (qh);
+   for (int ny=1; ny<Hex::S_MAXI; ny++)
+       {
+       int ns = (ny + Hex::S_N) MODULO Hex::S_MAXI;
+       hliste.push_back (grid2->getQuadIJ (Hex::CylSmall, nx_ext, ns, 0)); 
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       hliste.push_back (grid2->getQuadIJ (Hex::CylSmall, nx_int, ny, 0)); 
+
+   int hauteur = 3;
+   doc->joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, hauteur);
+   doc->saveVtk ("lorraine.vtk");
+
+   // doc->dump ();
+   return HOK;
+}
+// ======================================================== test_disconnect2
+// === Disconnect Edge seul
+int test_disconnect2 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig2 = doc->addVertex (0,0,0);
+   Hex::Vector*   dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+
+   doc->dump ();
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,0);
+   Hex::Edge* edge  = grid2->getEdgeK   (1,2,0);
+
+   hexa2->setScalar  (2);
+   edge->setScalar   (5);
+
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->setLevel (4);
+
+   Hex::Elements* disco_edges =  doc->disconnectEdge (hexa2, edge);
+   HexDisplay (disco_edges->countVertex());
+   HexDisplay (disco_edges->countEdge());
+   HexDisplay (disco_edges->countQuad());
+   HexDisplay (disco_edges->countHexa());
+
+   // hexa2->transform (&matrice);
+ /**********************************
+   for (int ns=0; ns<disco_edges->countVertex(); ns++)
+       {
+       Hex::Vertex* sommet = disco_edges->getVertex(ns);
+       sommet->setX (sommet->getX()+0.5);
+       sommet->setY (sommet->getY()+0.5);
+       }
+   ********************************* */
+
+   doc->saveVtk ("test_disco", nvtk);
+   doc->save ("test_disco");
+   doc->dump ();
+   hexa2->dumpFull ();
+
+   doc->setLevel (4);
+   return HOK;
+}
+// ======================================================== test_disconnect4
+// === Disconnect Edges
+int test_disconnect4 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 5;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig2 = doc->addVertex (0,0,0);
+   Hex::Vector*   dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+
+   // doc->dump ();
+
+   int nvtk = 0;
+   doc->setLevel (1);
+
+   Hex::Hexas t_hexas;
+   Hex::Edges t_edges;
+   for (int nk=0 ; nk< size_z; nk++)
+       {
+       Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,nk);
+       Hex::Edge* edge  = grid2->getEdgeK   (1,2,nk);
+
+       hexa2->setScalar  (2);
+       edge->setScalar   (5);
+       t_hexas.push_back (hexa2);
+       t_edges.push_back (edge);
+
+       doc->setLevel (4);
+
+       }
+
+   doc->saveVtk ("test_disco", nvtk);
+   Hex::Elements* disco_edges =  doc->disconnectEdges (t_hexas, t_edges);
+   doc->saveVtk ("test_disco", nvtk);
+   // doc->dump ();
+   // hexa2->dumpFull ();
+
+   doc->setLevel (4);
+   return HOK;
+}
+// ======================================================== test_disconnect
+// ==== Disconnect Quad
+int test_disconnect1 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+   Hex::Vector*   dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Quad* quad  = grid1->getQuadJK  (1,1,0);
+
+   quad->setScalar   (5);
+
+   doc->saveVtk ("test_disco", nvtk);
+   doc->disconnectQuad (hexa1, quad);
+   // hexa1 ->transform (&matrice);
+   doc->saveVtk ("test_disco", nvtk);
+
+   // doc->dumpPropagation ();
+   // doc->dump  ();
+
+   doc->save  ("disco_all");
+   return HOK;
+}
+// ======================================================== test_disconnect3
+// ==== disconnectVertex
+int test_disconnect3 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+
+   Hex::Vector*   dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Vertex* vertex = grid1->getVertexIJK (1,1,1);
+
+   vertex->setScalar (5);
+
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->disconnectVertex (hexa1, vertex);
+   // hexa1->transform (&matrice);
+   doc->saveVtk ("test_disco", nvtk);
+
+   // doc->dumpPropagation ();
+   // doc->dump  ();
+
+   doc->save  ("disco_all");
+   return HOK;
+}
+// ======================================================== contraction
+void contraction (Hex::Hexa* hexa, Hex::Elements* grid)
+{
+   return;
+   Hex::Real3 cg = { 0, 0, 0 };
+
+   for (int nro=0; nro<Hex::HV_MAXI ; nro++)
+       {
+       cg [0] += hexa->getVertex(nro)->getX()/Hex::HV_MAXI; 
+       cg [1] += hexa->getVertex(nro)->getY()/Hex::HV_MAXI; 
+       cg [2] += hexa->getVertex(nro)->getZ()/Hex::HV_MAXI; 
+       }
+
+   int nbvertex = grid->countVertex();
+   const double coeff = 0.5;
+   for (int nro=0; nro<nbvertex ; nro++)
+       {
+       Hex::Vertex* pv = grid->getVertex(nro);
+       Hex::Real3 pold = { pv->getX(), pv->getY(), pv->getZ() };
+       Hex::Real3 pnew;
+       for (int dd=0; dd<3 ; dd++)
+           pnew [dd] = cg[dd] + coeff * (pold[dd]-cg[dd]);
+
+       pv->setX (pnew[0]);
+       pv->setY (pnew[1]);
+       pv->setZ (pnew[2]);
+       }
+}
+// ======================================================== test_disconnect
+// ==== Les 3 disconnect
+int test_disconnect (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex*   orig2 = doc->addVertex (4,0,0);
+   Hex::Vertex*   orig3 = doc->addVertex (8,0,0);
+
+   Hex::Vector*   dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+   Hex::Elements* grid3 = doc->makeCartesian (orig3, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa3 = grid3->getHexaIJK (1,1,0);
+
+   Hex::Quad* quad  = grid1->getQuadJK  (1,1,0);
+   Hex::Edge* edge  = grid2->getEdgeK   (1,2,0);
+   Hex::Vertex* vertex = grid3->getVertexIJK (1,1,1);
+
+   quad->setScalar   (5);
+   edge->setScalar   (5);
+   vertex->setScalar (5);
+
+   doc->saveVtk ("test_disco", nvtk);
+   doc->disconnectQuad (hexa1, quad);
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->disconnectEdge (hexa2, edge);
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->disconnectVertex (hexa3, vertex);
+   doc->saveVtk ("test_disco", nvtk);
+
+   // doc->dumpPropagation ();
+   // doc->dump  ();
+
+   doc->save  ("disco_all");
+   return HOK;
+}
+// ======================================================== test_propagation
+int test_propagation ()
+{
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig = doc->addVertex (0,0,0);
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   //  Hex::Elements* grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   int nb = doc->countPropagation ();
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           if (way)
+              {
+              printf ("     (");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf ("     (");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+
+   doc->dump  ();
+   doc->saveVtk ("test_propagation.vtk");
+   doc->save ("test_propagation");
+
+   return HOK;
+}
+// ======================================================== test_move
+int test_move ()
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   enhaut  = doc->addVector (0, 0, 5);
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+   // Hex::Vector*   agauche = doc->addVector (0, 5, 0);
+
+   Hex::Matrix matrice;
+   matrice.defTranslation (enhaut);
+
+   Hex::Hexa* cube    = grid->getHexa (1);
+   Hex::Quad* dessous = cube->getQuad (Hex::Q_A);
+   dessous->dump();
+   
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   /* Hex::Elements* grid3 = doc->makeTranslation (grid, agauche); */
+   Hex::Hexa* cube2     = grid2->getHexa (1);
+
+   doc ->saveVtk ("move0.vtk");
+
+   cube ->disconnectQuad (dessous);
+   cube ->transform (&matrice);
+   cube2->transform (&matrice);
+
+   doc ->saveVtk ("move1.vtk");
+   doc ->dump();
+
+   return HOK;
+}
+// ======================================================== test_transfo2
+int test_transfo2 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   int    nvtk    = 0;
+   cpchar fic_vtk = "transfo";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   doc ->setLevel (1);
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x, size_y,
+                                                        size_z);
+   if (grid==NULL)
+      return HERR;
+
+   orig->setScalar(2);
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   if (grid2==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid3  = doc->makeScale (grid2, orig, 2);
+   if (grid3==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid4 = doc->makeRotation (grid2, orig, dir, 45);
+   if (grid4==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid5 = doc->makeSymmetryPoint (grid4, orig);
+   if (grid5==NULL)
+      return HERR;
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector* dir1  = doc->addVector (1,0,0);
+   Hex::Elements* grid6 = doc->makeSymmetryLine (grid4, orig, dir1);
+   if (grid6==NULL)
+      return HERR;
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(3);
+   grid6->getHexa(0)->getVertex(0)->setScalar(3);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(0);
+   grid6->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid7 = doc->makeSymmetryLine (grid2, orig, dir1);
+   if (grid7==NULL)
+      return HERR;
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid7->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid7->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid8 = doc->makeSymmetryPlane (grid2, orig, dir1);
+   if (grid8==NULL)
+      return HERR;
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid8->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid8->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid9 = doc->makeSymmetryPlane (grid3, orig, dir);
+   if (grid9==NULL)
+      return HERR;
+
+   grid3->getHexa(0)->getVertex(0)->setScalar(4);
+   grid9->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid9->getHexa(0)->removeConnected ();
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   return HOK;
+}
+// ======================================================== test_transfo
+int test_transfo (int nbargs, cpchar tabargs[])
+{
+   int    nvtk    = 0;
+   cpchar fic_vtk = "transfo";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   doc ->setLevel (1);
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+   double dr = 1;
+   double da = 360;
+   double dl = 1;
+   int nr = 3;
+   int na = 8;
+   int nl = 3;
+   Hex::Elements* grid = doc->makeCylindrical (orig, vx,vz, dr, da, dl,
+                                                            nr, na, nl, false);
+   if (grid==NULL)
+      return HERR;
+
+   doc ->saveVtk (fic_vtk, nvtk);
+   Hex::Vector*   devant  = doc->addVector (10, 0, 0);
+
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   if (grid2==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   return HOK;
+}
+// ======================================================== test_copy_document
+int test_copy_document (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.loadDocument ("Essai");
+   doc ->saveVtk ("restore1.vtk");
+
+   Hex::Document* clone = doc->copyDocument();
+   clone->saveVtk ("restore2.vtk");
+
+   return HOK;
+}
+// ======================================================== test_remove
+int test_remove ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig  = doc->addVertex (0,0,0);
+   Hex::Vertex* orig1 = doc->addVertex (6,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+   Hex::Elements* grid  = doc->makeCartesian (orig, dir,  size_x,size_y,size_z);
+   doc->makeCartesian (orig1, dir, 1,1,1);
+   doc->saveVtk ("removeConn1.vtk");
+
+   Echo ("--------- Avant destruction");
+   HexDisplay (doc->countVertex ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countUsedVertex ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedHexa ());
+
+
+   doc->removeConnectedHexa (grid->getHexaIJK (0,0,0));
+
+   Echo ("--------- Apres destruction");
+   HexDisplay (doc->countVertex ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countHexa ());
+
+   HexDisplay (doc->countUsedVertex ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedHexa ());
+   doc->saveVtk ("removeConn2.vtk");
+
+   return HOK;
+}
+// ================================================== init_vec
+void init_vec (Hex::RealVector& tab, double n0=0, double n1=0, double n2=0, 
+               double n3=0, double n4=0, double n5=0, double n6=0, 
+               double n7=0, double n8=0, double n9=0, double n10=0,
+               double n11=0, double n12=0, double n13=0, double n14=0, 
+               double n15=0, double n16=0)
+{
+   if (n0>0.0) tab.push_back (n0);
+   if (n1>0.0) tab.push_back (n1);
+   if (n2>0.0) tab.push_back (n2);
+   if (n3>0.0) tab.push_back (n3);
+   if (n4>0.0) tab.push_back (n4);
+   if (n5>0.0) tab.push_back (n5);
+   if (n6>0.0) tab.push_back (n6);
+   if (n7>0.0) tab.push_back (n7);
+   if (n8>0.0) tab.push_back (n8);
+   if (n9>0.0) tab.push_back (n9);
+
+   if (n10>0.0) tab.push_back (n10);
+   if (n11>0.0) tab.push_back (n11);
+   if (n12>0.0) tab.push_back (n12);
+   if (n13>0.0) tab.push_back (n13);
+   if (n14>0.0) tab.push_back (n14);
+   if (n15>0.0) tab.push_back (n15);
+   if (n16>0.0) tab.push_back (n16);
+}
+// ================================================== test_cylindricals
+int test_cylindricals (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0, 0, 0);
+   Hex::Vector* vz   = doc->addVector (0, 0, 1);
+   Hex::Vector* vx   = doc->addVector (1 ,0, 0);
+
+   Hex::RealVector tdr, tda, tdl;
+
+   /******************
+   init_vec (tdr, 2, 1, 0.5);
+   init_vec (tda, 40, 35, 30, 25, 20, 15, 10, 5, 
+                   5, 10, 15, 20, 25, 30, 35, 40);
+   init_vec (tdl, 1, 2, 3 );
+
+   init_vec (tdr, 1, 1, 1, 1);
+   init_vec (tda, 45,45, 45,45, 45,45, 45,45 );
+   init_vec (tdl, 1, 1, 1 );
+
+    ****************** */
+
+
+   init_vec (tdr, 1, 2, 1, 2);
+   init_vec (tda, 20, 20, 20 );
+   init_vec (tdl, 1 );
+
+   Hex::Elements* grid=doc->makeCylindricals (orig, vx,vz, tdr,tda,tdl, false);
+
+   doc->saveVtk ("cylindricals.vtk");
+   doc->dump();
+   grid->clearAssociation();
+   doc->clearAssociation();
+   return HOK;
+}
+// ======================================================== test_hexa
+int test_hexa (int nbargs, cpchar tabargs[])
+{
+   goto_workspace ();
+   int ier = test_cylindricals (nbargs, tabargs);
+   ier = test_transfo (nbargs, tabargs);
+   free_workspace ();
+
+   return ier;
+}
diff --git a/src/TEST_CPP/test_quads.cxx b/src/TEST_CPP/test_quads.cxx
new file mode 100755 (executable)
index 0000000..d1347bb
--- /dev/null
@@ -0,0 +1,823 @@
+
+// C++ : Tests unitaires sur les creations h'hexaedres
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "Hex.hxx"
+
+#include <unistd.h>
+
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexCramer.hxx"
+
+// ======================================================== test_hexa_quads_5
+int test_hexa_quads_5 (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 3;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_5";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,1,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qb->setScalar (5);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   qb->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa5Quads (qa, qc, qd, qe, qf);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_ab
+int test_hexa_quads_ab (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 3;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_ab";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (0, 0, 1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qc->remove ();
+   qd->remove ();
+   qe->remove ();
+   qf->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa2Quads (qa, qb);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_ac
+int test_hexa_quads_ac (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_ac";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,0,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qb->remove ();
+   qc->remove ();
+   qd->remove ();
+   qf->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa2Quads (qa, qe);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   HexDisplay (doc->countUsedHexa ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_ace
+int test_hexa_quads_ace (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_ace";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,0,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qb->remove ();
+   qf->remove ();
+   qc->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa3Quads (qa, qd, qe);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   HexDisplay (doc->countUsedHexa ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_acd
+int test_hexa_quads_acd (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_acd";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,0,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qb->remove ();
+   qc->remove ();
+   qd->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa3Quads (qa, qe, qf);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   HexDisplay (doc->countUsedHexa ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_abcd
+int test_hexa_quads_abcd (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 1;
+   const int size_z = 3;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, vx, vy, vz, 
+                                              size_x,size_y,size_z);
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_abcd";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,0,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qc->remove ();
+   qd->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa4Quads (qa, qe, qf, qb);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   HexDisplay (doc->countUsedHexa ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ====================================================== test_hexa_quads_abce
+int test_hexa_quads_abce (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, 
+                                            size_x,size_y,size_z);
+   int nvtk = 0;
+   cpchar fic_vtk = "HexaQuad_abce";
+   doc->saveVtk (fic_vtk, nvtk);
+
+   Hex::Hexa* hexa = grid->getHexaIJK (1,0,1);
+
+   Hex::Quad* qa = hexa->getQuad (Hex::Q_A);
+   Hex::Quad* qb = hexa->getQuad (Hex::Q_B);
+   Hex::Quad* qc = hexa->getQuad (Hex::Q_C);
+   Hex::Quad* qd = hexa->getQuad (Hex::Q_D);
+   Hex::Quad* qe = hexa->getQuad (Hex::Q_E);
+   Hex::Quad* qf = hexa->getQuad (Hex::Q_F);
+
+   qc->remove ();
+   qb->remove ();
+   doc->saveVtk (fic_vtk, nvtk);
+
+   doc->addHexa4Quads (qa, qe, qf, qd);
+   doc->saveVtk (fic_vtk, nvtk);
+
+   grid->remove ();
+   HexDisplay (doc->countHexa ());
+   HexDisplay (doc->countQuad ());
+   HexDisplay (doc->countEdge ());
+   HexDisplay (doc->countVertex ());
+
+   HexDisplay (doc->countUsedHexa ());
+   HexDisplay (doc->countUsedQuad ());
+   HexDisplay (doc->countUsedEdge ());
+   HexDisplay (doc->countUsedVertex ());
+
+   doc->saveVtk (fic_vtk, nvtk);
+   return HOK;
+}
+// ======================================================== test_cramer
+int test_cramer (int nbargs, cpchar tabargs[])
+{
+   double matrice [] = { 2, 7, 1, 
+                         0, 3, 0,
+                         1, 9, 5 };
+   double second  [] = { 1, 1, 1 };
+
+   Hex::Real3  solution;
+   Hex::Cramer systeme(3);
+
+   int ier = systeme.resoudre (matrice, second, solution);
+   HexDisplay (ier);
+   cout << endl;
+   cout << " Second membre = (" << second[Hex::dir_x] << ", "
+        << second[Hex::dir_y] << ", " << second[Hex::dir_z] << ")" 
+        << endl;
+
+   cout << " Solution      = (" << solution[Hex::dir_x] << ", "
+        << solution[Hex::dir_y] << ", " << solution[Hex::dir_z] << ")" 
+        << endl;
+
+   Hex::Real3 produit;
+   systeme.multiply (solution, produit);
+   cout << " Produit       = (" << produit[Hex::dir_x] << ", "
+        << produit[Hex::dir_y] << ", " << produit[Hex::dir_z] << ")" 
+        << endl;
+
+   return HOK;
+}
+// ====================================================== test_hexa_quads_ac1
+int test_hexa_quads_ac1 (int nbargs, cpchar tabargs[])
+{
+   int nbtraces = 0;
+   cout << "test_hexa_quads_ac1, trace nro " << ++nbtraces <<endl;
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ace = doc->addVertex (0,0,0);
+   Hex::Vertex* acf = doc->addVertex (1,0,0);
+
+   /****************************************
+   Hex::Vertex* ade = doc->addVertex (0,1,0);
+   Hex::Vertex* adf = doc->addVertex (1,1,0);
+
+   Hex::Vertex* bce = doc->addVertex (0,0,1);
+   Hex::Vertex* bcf = doc->addVertex (1,0,1);
+   Hex::Vertex* bde = doc->addVertex (0,1,1);
+   Hex::Vertex* bdf = doc->addVertex (1,1,1);
+   *****************************************/
+
+   Hex::Vertex* ade = doc->addVertex (-2,2,0);
+   Hex::Vertex* adf = doc->addVertex ( 2,1,0);
+   Hex::Vertex* bce = doc->addVertex ( 1,0,1);
+   Hex::Vertex* bcf = doc->addVertex ( 2,0,1);
+
+   Hex::Edge* ac = doc->addEdge (ace, acf);
+   Hex::Edge* af = doc->addEdge (adf, acf);
+   Hex::Edge* ad = doc->addEdge (ade, adf);
+   Hex::Edge* ae = doc->addEdge (ace, ade);
+
+   Hex::Edge* bc = doc->addEdge (bce, bcf);
+   // Hex::Edge* bf = doc->addEdge (bdf, bcf);
+   // Hex::Edge* bd = doc->addEdge (bde, bdf);
+   // Hex::Edge* be = doc->addEdge (bce, bde);
+
+   Hex::Edge* ce = doc->addEdge (ace, bce);
+   Hex::Edge* cf = doc->addEdge (acf, bcf);
+   // Hex::Edge* de = doc->addEdge (ade, bde);
+   // Hex::Edge* df = doc->addEdge (adf, bdf);
+
+   Hex::Quad* qa = doc->addQuad (ac, af, ad, ae);
+   Hex::Quad* qc = doc->addQuad (ac, cf, bc, ce);
+
+   /* Hex::Hexa* hexa = */  doc->addHexa2Quads (qa, qc);
+
+   // doc->dump();
+   doc->saveVtk ("hexa_quads.vtk");
+   return HOK;
+}
+// ======================================================== test_part_rind
+int test_part_rind (int& nvtk)
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* center  = doc->addVertex (0,0,0);
+   Hex::Real    radius  = 8;
+   Hex::Real    radint  = 7;
+   Hex::Vertex* orig    = NULL;
+   Hex::Vector* vz      = doc->addVector (0,0,1);
+   Hex::Vector* vx      = doc->addVector (1,0,0);
+   Hex::Real    angle   = 90;
+   Hex::Real    radhole = 1;
+   int nrad  = 3;
+   int nang  = 4;
+   int nhaut = 8;
+
+   Hex::Elements* grid = doc->makePartRind (center, vx, vz, radius, radint, 
+                                      radhole, orig, angle, nrad, nang, nhaut);
+   if (grid!=NULL)
+       doc->saveVtk ("makeSphere", nvtk);
+   return HOK;
+}
+// ======================================================== test_rind
+int test_rind (int& nvtk)
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* center  = doc->addVertex (0,0,0);
+   Hex::Real    radius  = 8;
+   Hex::Real    radint  = 7;
+   Hex::Vertex* orig    = doc->addVertex (0,0,0);
+   Hex::Vector* vz      = doc->addVector (0,1,1);
+   Hex::Vector* vx      = doc->addVector (1,0,0);
+   Hex::Real    radhole = 1;
+   int nrad  = 3;
+   int nang  = 16;
+   int nhaut = 8;
+
+   Hex::Elements* grid = doc->makeRind (center, vx, vz, radius, radint, 
+                                      radhole, orig, nrad, nang, nhaut);
+   if (grid!=NULL)
+       doc->saveVtk ("makeSphere", nvtk);
+   return HOK;
+}
+// ======================================================== test_part_sphere
+int test_part_sphere (int& nvtk)
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* center  = doc->addVertex (0,0,0);
+   Hex::Real    radius  = 8;
+   Hex::Vertex* orig    = doc->addVertex (0,0,-4);
+   Hex::Vector* vz      = doc->addVector (0,0,1);
+   Hex::Vector* vx      = doc->addVector (1,0,0);
+   Hex::Real    angle   = 90;
+   Hex::Real    radhole = 1;
+   int nrad  = 3;
+   int nang  = 4;
+   int nhaut = 8;
+
+   Hex::Elements* grid = doc->makePartSphere (center, vx, vz, radius, 
+                                      radhole, orig, angle, nrad, nang, nhaut);
+   if (grid!=NULL)
+       doc->saveVtk ("makeSphere", nvtk);
+   return HOK;
+}
+// ======================================================== test_sphere
+int test_sphere (int& nvtk)
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* center  = doc->addVertex (0,0,0);
+   Hex::Real    radius  = 8;
+   Hex::Vertex* orig    = doc->addVertex (0,0,0);
+   Hex::Vector* vz      = doc->addVector (0,0,1);
+   Hex::Vector* vx      = doc->addVector (1,0,0);
+   Hex::Real    radhole = 1;
+   int nrad  = 3;
+   int nang  = 16;
+   int nhaut = 8;
+
+   Hex::Elements* grid = doc->makeSphere (center, vx, vz, radius, 
+                                      radhole, orig, nrad, nang, nhaut);
+   if (grid!=NULL)
+       doc->saveVtk ("makeSphere", nvtk);
+   return HOK;
+}
+// ================================================== test_asso_grid
+int test_asso_grid (int nbargs, cpchar tabargs[])
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 3;
+   int    na = 8;
+
+   Hex::Elements *c1 = NULL;
+
+   c1 = doc->makeCylindrical (orig1, vx,vz,dr, 300, dl, nr, na, nl, false);
+   for (int ned=0 ; ned<na ; ned++)
+       { 
+       Hex::Edge* edge = c1->getEdgeJ (nr, ned, 1);
+       if (edge != NULL)
+          edge->setScalar (5);
+       else 
+          printf (" ... c1->getEdgeJ (nr, %d, 1) = NULL\n", ned);
+       }
+
+   doc->saveVtk ("asso_grid.vtk");
+
+   return HOK;
+}
+// ======================================================== test_piquage
+int test_piquage (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 3;
+   const int size_z = 3;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid    = doc->makeCartesian (orig, vx, vy, vz, 
+                                                size_x,size_y,size_z);
+
+   double dr = 1;
+   double dl = 1;
+
+   int nr = 1;
+   int na = 4;
+   int nl = 1;
+
+   Hex::Vertex*   orig2 = doc->addVertex (0,0,5);
+   Hex::Elements* grid2 = doc->makeCylindrical (orig2, vx,vz,
+                                                dr, 360, dl, nr, na, nl, false);
+
+   Hex::Vertex* c1 = grid->getVertexIJK (1, 2, size_z);
+   Hex::Vertex* c2 = grid->getVertexIJK (1, 1, size_z);
+   Hex::Vertex* c3 = grid->getVertexIJK (2, 1, size_z);
+
+   Hex::Vertex* p1 = grid2->getVertexIJK (1, 0, 1);
+   Hex::Vertex* p2 = grid2->getVertexIJK (1, 1, 1);
+   Hex::Vertex* p3 = grid2->getVertexIJK (1, 2, 1);
+
+   c1->setScalar (4);
+   c2->setScalar (6);
+   c3->setScalar (6);
+
+   p1->setScalar (4);
+   p2->setScalar (6);
+   p3->setScalar (6);
+
+   int nvtk=0;
+   doc->saveVtk ("piquage", nvtk);
+
+   Hex::Quads qpattern;
+   for (int ny=0; ny<4 ; ny++)
+       {
+       Hex::Quad* quad = grid2->getQuadIJ (0, ny, 1);
+       quad->setScalar(5);
+       qpattern.push_back (quad);
+       }
+   
+   doc->saveVtk ("piquage", nvtk);
+   doc->replace (qpattern, p1,c1, p2,c2, p3,c3);
+
+   doc->saveVtk ("piquage", nvtk);
+
+   return HOK;
+}
+// ======================================================== test_replace
+int test_replace (int nbargs, cpchar tabargs[])
+{
+   const int size_x = 3;
+   const int size_y = 3;
+   const int size_z = 3;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* vx   = doc->addVector (1,0,0);
+   Hex::Vector* vy   = doc->addVector (0,1,0);
+   Hex::Vector* vz   = doc->addVector (0,0,1);
+
+   Hex::Elements* grid    = doc->makeCartesian (orig, vx, vy, vz, 
+                                                size_x,size_y,size_z);
+
+   Hex::Vertex* c1 = grid->getVertexIJK (1, 2, size_z);
+   Hex::Vertex* c2 = grid->getVertexIJK (1, 1, size_z);
+   Hex::Vertex* c3 = grid->getVertexIJK (2, 1, size_z);
+
+   Hex::Vertex* pa1 = doc->addVertex (-1, -1);
+   Hex::Vertex* pb1 = doc->addVertex ( 1, -1);
+   Hex::Vertex* pc1 = doc->addVertex ( 1,  1);
+   Hex::Vertex* pd1 = doc->addVertex (-1,  1);
+
+   Hex::Vertex* pa2 = doc->addVertex (-2, -2);
+   Hex::Vertex* pb2 = doc->addVertex ( 2, -2);
+   Hex::Vertex* pc2 = doc->addVertex ( 2,  2);
+   Hex::Vertex* pd2 = doc->addVertex (-2,  2);
+
+   Hex::Edge* edab1 = doc->addEdge (pa1, pb1);
+   Hex::Edge* edbc1 = doc->addEdge (pb1, pc1);
+   Hex::Edge* edcd1 = doc->addEdge (pc1, pd1);
+   Hex::Edge* edda1 = doc->addEdge (pd1, pa1);
+
+   Hex::Edge* edab2 = doc->addEdge (pa2, pb2);
+   Hex::Edge* edbc2 = doc->addEdge (pb2, pc2);
+   Hex::Edge* edcd2 = doc->addEdge (pc2, pd2);
+   Hex::Edge* edda2 = doc->addEdge (pd2, pa2);
+
+   Hex::Edge* edaa = doc->addEdge (pa1, pa2);
+   Hex::Edge* edbb = doc->addEdge (pb1, pb2);
+   Hex::Edge* edcc = doc->addEdge (pc1, pc2);
+   Hex::Edge* eddd = doc->addEdge (pd1, pd2);
+
+   Hex::Quads qpattern;
+   // qpattern.push_back (doc->addQuad (edab1, edbc1, edcd1, edda1));
+   qpattern.push_back (doc->addQuad (edab1, edbb,  edab2, edaa));
+   qpattern.push_back (doc->addQuad (edbc1, edcc,  edbc2, edbb));
+   qpattern.push_back (doc->addQuad (edcd1, eddd,  edcd2, edcc));
+   qpattern.push_back (doc->addQuad (edda1, edaa,  edda2, eddd));
+
+   doc->saveVtk ("replace0.vtk");
+
+   doc->replace (qpattern, pd2,c1, pa2,c2, pb2,c3);
+
+   c1->setScalar (4);
+   c2->setScalar (6);
+   c3->setScalar (6);
+   doc->saveVtk ("replace1.vtk");
+
+   return HOK;
+}
+// ======================================================== test_hemispheres
+int test_hemispheres (int nbargs, cpchar tabargs[])
+{
+   int nvtk = 0;
+   test_sphere      (nvtk);
+   test_rind        (nvtk);
+   test_part_rind   (nvtk);
+   test_part_sphere (nvtk);
+   return HOK;
+}
+// ======================================================== test_quads
+int test_quads (int nbargs, cpchar tabargs[])
+{
+   cpchar option = "?";
+   cpchar appel  = strrchr (tabargs[0], '/');
+   if (appel != NULL)
+      appel += 1;
+   else 
+      {
+      appel  = strrchr (tabargs[0], '\\');
+      if (appel!=NULL)
+         appel += 1;
+      else 
+         appel = tabargs[0];
+      }
+
+   if (nbargs>1) 
+      option = tabargs[1];
+
+   if (Cestegal (option, "-ab") || Cestegal (option, "-AB"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_ab \n");
+      test_hexa_quads_ab (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-ac1") || Cestegal (option, "-AC1"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_ac1 \n");
+      test_hexa_quads_ac1 (nbargs, tabargs);
+      }
+   else if (Cestegal (option, "-ac") || Cestegal (option, "-AC"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_ac \n");
+      test_hexa_quads_ac (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-ace") || Cestegal (option, "-ACE"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_ace \n");
+      test_hexa_quads_ace (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-acd") || Cestegal (option, "-ACD"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_acd \n");
+      test_hexa_quads_acd (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-abcd") || Cestegal (option, "-ABCD"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_abcd \n");
+      test_hexa_quads_abcd (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-abce") || Cestegal (option, "-ABCE"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_abce \n");
+      test_hexa_quads_abce (nbargs, tabargs);
+      }
+
+   else if (Cestegal (option, "-5") || Cestegal (option, "-abcde")
+                                   || Cestegal (option, "-ABCDE"))
+      {
+      printf (" __________________ Appel de test_hexa_quads_abcde \n");
+      test_hexa_quads_5 (nbargs, tabargs);
+      }
+
+   else 
+      {
+      printf (" +++ Veuillez indiquer votre cas-test en argument SVP\n");
+      printf (" +++ Creation d'un hexadedre a partir de quadrangles :\n");
+      printf (" %s -ab   : A partir des quadrangles A et B (opposes)\n", appel);
+      printf (" %s -ac   : A partir des quadrangles A et C (diedre)\n",  appel);
+      printf (" %s -acd  : A partir des quadrangles A, C et D (triedre)\n", 
+              appel);
+      printf (" %s -ace  : A partir des quadrangles A, C et E (en U)\n", 
+              appel);
+      printf (" %s -acbd : A partir des quadrangles A, B, C et D (tunnel)\n", 
+              appel);
+      printf (" %s -acbe : A partir des quadrangles A, B, C et E (but)\n", 
+              appel);
+      printf (" %s -5    : A partir de 5 quadrangles (boite sans couvercle)\n", 
+              appel);
+      }
+
+   return HOK;
+}
diff --git a/src/TEST_CPP/test_tools.cxx b/src/TEST_CPP/test_tools.cxx
new file mode 100755 (executable)
index 0000000..1b6c61f
--- /dev/null
@@ -0,0 +1,59 @@
+
+// C++ : Outils communs aux tests unitaires
+
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library 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
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ 
+//  or email : webmaster.salome@opencascade.com
+
+
+#include "test_unit.hxx"
+
+#include <string>
+#include <cstdlib>
+#include <unistd.h>
+
+static int nbr_vtk = 0;
+static cpchar case_name = "hexa";
+static Hex::Document*   docu = NULL;
+
+static string workspace = "/tmp/test_hexablock";
+
+// ======================================================== call_system 
+void call_system (const string&  command)
+{
+   system (command.c_str());
+}
+// ======================================================== goto_workspace
+void goto_workspace ()
+{
+   string rmdir = "rm -rf ";
+   string mkdir = "mkdir -p ";
+
+   call_system (rmdir + workspace);
+   call_system (mkdir + workspace);
+
+   chdir (workspace.c_str());
+}
+// ======================================================== free_workspace
+void free_workspace ()
+{
+   string chmod = "chmod 777 ";
+
+   call_system (chmod + workspace);
+   call_system (chmod + workspace + "/*");
+}
diff --git a/src/TEST_CPP/test_unit.hxx b/src/TEST_CPP/test_unit.hxx
new file mode 100644 (file)
index 0000000..6b20060
--- /dev/null
@@ -0,0 +1,76 @@
+
+// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _TEST_UNIT_H_
+#define _TEST_UNIT_H_
+
+#include "hexa_base.hxx"
+
+void goto_workspace ();
+void free_workspace ();
+
+int test_sphere (int nbargs, cpchar tabargs[]);
+int test_joint (int nbargs, cpchar tabargs[]);
+int test_prism (int nbargs, cpchar tabargs[]);
+int test_revolution9 (int nbargs, cpchar tabargs[]);
+int test_revolution (int nbargs, cpchar tabargs[]);
+int test_coude (int nbargs, cpchar tabargs[]);
+int test_count (int nbargs, cpchar tabargs[]);
+int test_decoupage (int nbargs, cpchar tabargs[]);
+int test_gen_xml (int nbargs, cpchar tabargs[]);
+int test_string_xml (int nbargs, cpchar tabargs[]);
+int test_relecture (int nbargs, cpchar tabargs[]);
+int test_spherical (int nbargs, const char* tabargs[]);
+int test_grille_cyl (int nbargs, cpchar tabargs[]);
+int test_asso_line (int nbargs, cpchar tabargs[]);
+int test_cylindrical (int nbargs, cpchar tabargs[]);
+int test_cylinder (int nbargs, cpchar tabargs[]);
+int test_xml_cylinder (int nbargs, cpchar tabargs[]);
+int test_pipe (int nbargs, cpchar tabargs[]);
+int test_joint2 (int nbargs, cpchar tabargs[]);
+int test_croix (int nbargs, cpchar tabargs[]);
+int test_pipes (int nbargs, cpchar tabargs[]);
+int test_lorraine(int nbargs, cpchar tabargs[]);
+int test_disconnect2 (int nbargs, cpchar tabargs[]);
+int test_disconnect4 (int nbargs, cpchar tabargs[]);
+int test_disconnect1 (int nbargs, cpchar tabargs[]);
+int test_disconnect3 (int nbargs, cpchar tabargs[]);
+int test_disconnect (int nbargs, cpchar tabargs[]);
+int test_transfo2 (int nbargs, cpchar tabargs[]);
+int test_transfo (int nbargs, cpchar tabargs[]);
+int test_copy_document (int nbargs, cpchar tabargs[]);
+int test_cylindricals (int nbargs, cpchar tabargs[]);
+int test_hexa (int nbargs, cpchar tabargs[]);
+                 // Dans test_quads
+int test_hexa_quads_5 (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_ab (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_ac (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_ace (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_acd (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_abcd (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_abce (int nbargs, cpchar tabargs[]);
+int test_cramer (int nbargs, cpchar tabargs[]);
+int test_hexa_quads_ac1 (int nbargs, cpchar tabargs[]);
+int test_asso_grid (int nbargs, cpchar tabargs[]);
+int test_piquage (int nbargs, cpchar tabargs[]);
+int test_replace (int nbargs, cpchar tabargs[]);
+int test_hemispheres (int nbargs, cpchar tabargs[]);
+int test_quads (int nbargs, cpchar tabargs[]);
+#endif
diff --git a/src/TEST_PY/INTER_3_CYLINDRE.py b/src/TEST_PY/INTER_3_CYLINDRE.py
new file mode 100755 (executable)
index 0000000..4b0c43d
--- /dev/null
@@ -0,0 +1,415 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import os
+import SALOME
+import geompy
+import smesh
+import hexablock
+import math
+
+
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/tees.brep")
+#===================================================================
+#               LE MODELE:
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+doc = hexablock.addDocument("cylindres")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+CYL1 = 0
+CYL2 = 1
+
+
+S_E    = 0
+S_NE   = 1
+S_N    = 2
+S_NW   = 3
+S_W    = 4
+S_SW   = 5
+S_S    = 6
+S_SE   = 7
+S_MAXI = 8
+
+##dy = doc.addVector ( 0, 1, 0 )
+dx1 = doc.addVector( -1, 0, 0 )
+dz1 = doc.addVector( 0, 0, 1 )
+
+
+c_pte_1 = doc.addVertex ( 190., 0., 220. )
+c_grd_1 = doc.addVertex ( 300., 0., 400. )
+cyl_pte_1 = doc.addCylinder( c_pte_1 , dz1 , 20 , 360 ) #580-220
+cyl_grd_1 = doc.addCylinder( c_grd_1 , dx1 , 50 , 140 )
+cross1 = doc.makeCylinders( cyl_pte_1 , cyl_grd_1 )
+
+
+dx2 = doc.addVector( -1, 0, 0 )
+dz2 = doc.addVector( 0, 0, 1 )
+c_pte_2 = doc.addVertex( 110. , 0. , 400. )
+c_grd_2 = doc.addVertex( 0. , 0. , 0. )
+
+cyl_pte_2 = doc.addCylinder( c_pte_2 , dx2 , 50, 220 )
+cyl_grd_2 = doc.addCylinder( c_grd_2 , dz2 , 100, 800 )
+cross2    = doc.makeCylinders( cyl_pte_2, cyl_grd_2 )
+
+# Qq constantes
+coul1 = 5
+coul2 = 3
+
+# Pour les bicylindres
+xhint   = 0   # indice x pour les hexa interieurs
+xhext   = 1   # indice x pour les hexa exterieurs
+xvint   = 0   # indice x pour les vertex interieurs
+xvext   = 2   # indice x pour les vertex exterieurs
+zbas    = 0
+zhhaut1  = 5   # hauteur max quad  petit cylindre
+zhhaut2  = 3   # hauteur max quad  gros cylindre
+zvhaut1  = 6   # hauteur max vertex du petit  cylindre
+zvhaut2  = 4   # hauteur max vertex du gros  cylindre
+
+# La jointure
+hQuads = []
+for ny in range(8):
+    hQuads+=[cross2.getQuadIJ(CYL1, xhext, ny, zbas)]
+
+for ny in range(4):
+    hQuads+=[cross2.getQuadIJ(CYL1, xhint, ny, zbas)]
+
+qstart0 = cross2.getQuadIJ (CYL1, xhext, S_E, zbas)
+qtarget = cross1.getQuadIJ (CYL2, xhext, S_S, zvhaut2)
+
+vb0 = qtarget.getVertex (0)
+vb1 = qtarget.getVertex (1)
+vh0 = qstart0.getVertex (0)
+vh1 = qstart0.getVertex (1)
+
+hauteur = 3
+joint = doc.joinQuads (hQuads, qtarget, vh0,vb0, vh1,vb1, hauteur)
+
+# Elimination bout en trop
+for ny in range(8):
+    h = cross2.getHexaIJK (CYL1, xhext, ny, zhhaut1)
+    doc.removeHexa(h)
+    if ny<4:
+        h = cross2.getHexaIJK (CYL1, xhint, ny, zhhaut1)
+        doc.removeHexa(h)
+
+
+#===================================================================
+# Recuperation edges du model pour l'association
+#===================================================================
+
+##=========================
+##       EDGES
+##=========================
+### BIG CYLINDER
+top_BIG    = []
+bottom_BIG = []
+for ny in range(8):
+    bottom_BIG += [ cross2.getEdgeJ(CYL2, 2, ny, 0) ]
+
+for ny in range(8):
+    top_BIG += [ cross2.getEdgeJ(CYL2, 2, ny, zvhaut2) ]
+
+### MEDIUM CYLINDER
+left_MEDIUM_BIG = []
+right_MEDIUM    = []
+
+for ny in range(8):
+    left_MEDIUM_BIG += [cross2.getEdgeJ (CYL1, 2, ny, 1)]
+
+for ny in range(8):
+    right_MEDIUM += [ cross1.getEdgeJ (CYL2, 2, ny, 0) ]
+
+### SMALL CYLINDER
+top_SMALL           = []
+top_SMALL_MEDIUM    = []
+bottom_SMALL_MEDIUM = []
+bottom_SMALL        = []
+
+for ny in range(8):
+    top_SMALL += [ cross1.getEdgeJ(CYL1, 2, ny, zvhaut1) ]
+for ny in range(8):
+    top_SMALL_MEDIUM += [ cross1.getEdgeJ(CYL1, 2, ny, zvhaut1-1) ]
+for ny in range(8):
+    bottom_SMALL_MEDIUM += [ cross1.getEdgeJ(CYL1, 2, ny, 1) ]
+for ny in range(8):
+    bottom_SMALL += [ cross1.getEdgeJ(CYL1, 2, ny, 0) ]
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des �l�ments de la geometrie tuyau pour l'association
+#===================================================================
+tees_ = geompy.Import(BREP_PATH, "BREP")
+
+##=========================
+##       EDGES
+##=========================
+all_edges_ = geompy.SubShapeAllSorted( tees_ , geompy.ShapeType["EDGE"] )
+
+### BIG CYLINDER
+top_BIG_    = all_edges_[1]
+bottom_BIG_ = all_edges_[0]
+
+### MEDIUM CYLINDER
+left_MEDIUM_BIG_ = [ all_edges_[3], all_edges_[5] , all_edges_[4], all_edges_[2], ]
+right_MEDIUM_    = all_edges_[20]
+
+### SMALL CYLINDER
+top_SMALL_            = all_edges_[13]
+top_SMALL_MEDIUM_     = [ all_edges_[11], all_edges_[16] ]
+bottom_SMALL_MEDIUM_  = [ all_edges_[10], all_edges_[9], all_edges_[14], all_edges_[15] ]
+bottom_SMALL_         = all_edges_[12]
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          EDGES
+##===========================================
+def associateEdges( edges, edges_, i_assoc, oppositeWay = False ):
+    nb_points = float( len(i_assoc) )
+    #print "nb_points ", nb_points
+    for i, i_ in i_assoc.items():
+        e  = edges[i]
+        e0 = e.getVertex(0)
+        e1 = e.getVertex(1)
+
+        if oppositeWay:
+            u0 = (i_+1.)/nb_points
+            u1 = i_/nb_points
+            e.addAssociation( edges_ , u1, u0 )
+        else:
+            u0 = i_/nb_points
+            u1 = (i_+1.)/nb_points
+            e.addAssociation( edges_ , u0, u1 )
+
+        e0_ = geompy.MakeVertexOnCurve( edges_, u0 )
+        e1_ = geompy.MakeVertexOnCurve( edges_, u1 )
+        e0.setAssociation( e0_ )
+        e1.setAssociation( e1_ )
+
+
+
+## BIG CYLINDER
+assoc   = { 4:0, 5:1, 6:2, 7:3, 0:4, 1:5, 2:6, 3:7 }
+associateEdges( top_BIG   , top_BIG_,    assoc )
+associateEdges( bottom_BIG, bottom_BIG_, assoc )
+
+## SMALL CYLINDER
+assoc = { 4:6, 5:7, 6:0, 7:1, 0:2, 1:3, 2:4, 3:5 }
+associateEdges( top_SMALL   , top_SMALL_,    assoc )
+associateEdges( bottom_SMALL, bottom_SMALL_, assoc )
+
+
+## SMALL-MEDIUM CYLINDER
+
+### Top ( un peu 'touchy' )
+e = top_SMALL_MEDIUM[0]
+e_0  = e.getVertex(0)
+e_0_ = geompy.MakeVertexOnCurve( top_SMALL_MEDIUM_[0], 0.)
+e_0.setAssociation( e_0_ )
+top_SMALL_MEDIUM_0_vertices_ = [ e_0_ ]
+
+for i, e in enumerate( top_SMALL_MEDIUM[0:6] ):
+    e_1 = e.getVertex(1)
+    e_1_ = geompy.MakeVertexOnCurve( top_SMALL_MEDIUM_[0], (i+1.)/6.)
+    e_1.setAssociation( e_1_ )
+    top_SMALL_MEDIUM_0_vertices_ += [ e_1_ ]
+
+partition_ = geompy.MakePartition( [ top_SMALL_MEDIUM_[0] ],
+    top_SMALL_MEDIUM_0_vertices_, [], [], geompy.ShapeType["EDGE"], 0, [], 0 )
+top_SMALL_MEDIUM_0_edges_ = geompy.SubShapeAllSorted( partition_, geompy.ShapeType["EDGE"] )
+
+
+assoc = { 0:2, 1:0, 2:1, 3:3, 4:4, 5:5 }
+for i,i_ in assoc.items():
+    e  = top_SMALL_MEDIUM[i]
+    e_ = top_SMALL_MEDIUM_0_edges_[i_]
+    e.addAssociation( e_, 0., 1. )
+
+assoc = { 6:0, 7:1 }
+associateEdges( top_SMALL_MEDIUM, top_SMALL_MEDIUM_[1], assoc )
+
+
+### Bottom
+assocs = [ { 0:1, 1:0  }, { 2:1, 3:0 },  { 4:0, 5:1 }, { 6:0, 7:1 } ] # 4 edges
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[0], assocs[0], True )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[1], assocs[1], True )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[2], assocs[2] )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[3], assocs[3] )
+
+
+
+## MEDIUM CYLINDER
+assocs = [ { 0:0, 1:1  }, { 2:0, 3:1 },  { 4:1, 5:0 }, { 6:1, 7:0 } ]
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[0], assocs[0] )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[1], assocs[1] )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[2], assocs[2], True )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[3], assocs[3], True )
+
+assoc = { 0:3, 1:2, 2:1, 3:0, 4:7, 5:6, 6:5, 7:4 }
+associateEdges( right_MEDIUM, right_MEDIUM_,  assoc , True )
+
+
+
+#allfaces_ = geompy.SubShapeAllSorted(tees_, geompy.ShapeType["FACE"])
+#for i,f in enumerate( allfaces_ ):
+    #geompy.addToStudy( f,   "allfaces"+str(i) )
+
+#for ny in range(8):
+    #q = cross2.getQuadJK(CYL2,2,ny,0)
+    #q.addAssociation( allfaces_[2] )
+
+#for ny in range(8):
+    #q = cross2.getQuadJK(CYL2,2,ny,1)
+    #if q:
+        #q.addAssociation( allfaces_[2] )
+
+
+
+
+##==========================================================
+##       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+##==========================================================
+geompy.addToStudy( tees_,           "Tees" )
+
+#### BIG CYLINDER
+geompy.addToStudy( top_BIG_,        "top_BIG" )
+geompy.addToStudy( bottom_BIG_,     "bottom_BIG" )
+
+#### SMALL CYLINDER
+geompy.addToStudy( top_SMALL_,       "top_SMALL" )
+for i,e in enumerate(top_SMALL_MEDIUM_):
+    geompy.addToStudy( e, "top_SMALL_MEDIUM"+str(i) )
+for i,e in enumerate(top_SMALL_MEDIUM_0_edges_):
+    geompy.addToStudy( e, "top_SMALL_MEDIUM_0_edges_"+str(i) )
+for i,e in enumerate(bottom_SMALL_MEDIUM_):
+    geompy.addToStudy( e, "bottom_SMALL_MEDIUM"+str(i) )
+geompy.addToStudy( bottom_SMALL_,    "bottom_SMALL" )
+
+#### MEDIUM CYLINDER
+geompy.addToStudy( right_MEDIUM_,    "right_MEDIUM" )
+for i,e in enumerate(left_MEDIUM_BIG_):
+    geompy.addToStudy( e,   "left_MEDIUM_BIG"+str(i) )
+
+
+
+#====================================
+# CREATION GROUPES DU MAILLAGE
+#====================================
+
+#On definit 3 groupes de mailles
+
+#groupe d edges (aretes)
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+
+##====================================
+## CREATION MAILLAGE
+##====================================
+
+
+##====================================
+## Definir une loi de discretisation
+##====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+#Law = doc.addLaw( "Uniform" , 8 )
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+try:
+    mesh = hexablock.mesh(doc, "Inter_3_Cylindre")
+#    mesh = .hexablock.mesh(doc, "Inter_3_Cylindre:quads", 2)
+except SALOME.SALOME_Exception, ex:
+    print "Mesh computation failed, exception caught:"
+    print "    ", ex.details.text
+except:
+    import traceback
+    print "Mesh computation failed, exception caught:"
+    traceback.print_exc()
+
+
+print "Nombre d'hexaedres:", mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:", mesh.NbEdges()
+print "Nombre de noeuds:", mesh.NbNodes()
+
+
+
+
+
+
diff --git a/src/TEST_PY/Makefile.am b/src/TEST_PY/Makefile.am
new file mode 100755 (executable)
index 0000000..87385ed
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+
+# Scripts to be installed
+# dist_salomescript_PYTHON = TestHEXA.py
+dist_salomescript_PYTHON = \
+       bielle.py \
+       test_BIELLE_no_assoc.py \
+       test_BIELLE_bad_assoc.py \
+       TUYAU_COURBE.py \
+       test_TUYAU_COURBE_no_assoc.py \
+       test_TUYAU_COURBE_weird_assoc.py \
+       INTER_3_CYLINDRE.py \
+       test_INTER_3_CYLINDRE_no_assoc.py \
+       Test_HEXABLOCK.py \
+       test_HEXABLOCK.py \
+       bride.py \
+       test_distrib.py
+
+dist_salomescript_DATA = \
+       tees.brep \
+       tuyau.brep \
+       crank.stp
+
diff --git a/src/TEST_PY/TUYAU_COURBE.py b/src/TEST_PY/TUYAU_COURBE.py
new file mode 100755 (executable)
index 0000000..51331bf
--- /dev/null
@@ -0,0 +1,790 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+import os
+import geompy
+import smesh
+import hexablock
+import math
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/tuyau.brep")
+
+
+
+
+#===================================================================
+#               LE MODELE:
+#   (Pour le tuyau on doit creer une grille cylindrique)
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+R = 4.5
+r = 4.5
+r_t = 3.6
+h = 75.0
+
+
+#=================================================
+# Creation du document
+#=================================================
+doc = hexablock.addDocument("TUYAU_COURBE")
+
+#=================================================
+# Creation du tuyau (grille cylindrique) dans le document
+#=================================================
+# centre de la grille cylindrique
+c = doc.addVertex(0, 0, 0) 
+
+# vecteurs de la grille cylindrique
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+# taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+model_tuyau_fin = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+# note: on obtient une liste qui contient 4 hexaedres eguaux
+
+
+#===================================================================
+# Recuperation des vertex,edges et quads du model pour l'association
+#
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+#===================================================================
+
+#=========================
+#       VERTEX
+#=========================
+
+# Face du haut 
+#   grand rayon
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+#   petit rayon
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+# Face du bas
+#   grand rayon
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+#   petit rayon
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+# v�rifications
+assert x_mod_h
+assert y_mod_h
+assert z_mod_h
+assert u_mod_h
+
+assert x_mod_h_t
+assert y_mod_h_t
+assert z_mod_h_t
+assert u_mod_h_t
+
+assert x_mod_b
+assert y_mod_b
+assert z_mod_b
+assert u_mod_b
+
+assert x_mod_b_t
+assert y_mod_b_t
+assert z_mod_b_t
+assert u_mod_b_t
+
+
+#=========================
+#       EDGES
+#=========================
+
+# Face du haut
+
+#   grand rayon
+edge_mod_face_h_1_1 = doc.findEdge( y_mod_h , z_mod_h )
+edge_mod_face_h_1_2 = doc.findEdge( z_mod_h , u_mod_h )
+edge_mod_face_h_2_1 = doc.findEdge( y_mod_h,  x_mod_h )
+edge_mod_face_h_2_2 = doc.findEdge( x_mod_h,  u_mod_h )
+
+#   petit rayon
+edge_mod_t_face_h_1_1 = doc.findEdge( y_mod_h_t , z_mod_h_t )
+edge_mod_t_face_h_1_2 = doc.findEdge( z_mod_h_t , u_mod_h_t )
+edge_mod_t_face_h_2_1 = doc.findEdge( y_mod_h_t,  x_mod_h_t )
+edge_mod_t_face_h_2_2 = doc.findEdge( x_mod_h_t,  u_mod_h_t )
+
+
+# Face du bas
+
+#   grand rayon
+edge_mod_face_b_1_1 = doc.findEdge( y_mod_b , z_mod_b )
+edge_mod_face_b_1_2 = doc.findEdge( z_mod_b , u_mod_b )
+edge_mod_face_b_2_1 = doc.findEdge( y_mod_b,  x_mod_b )
+edge_mod_face_b_2_2 = doc.findEdge( x_mod_b,  u_mod_b )
+
+#   petit rayon
+edge_mod_t_face_b_1_1 = doc.findEdge( y_mod_b_t , z_mod_b_t )
+edge_mod_t_face_b_1_2 = doc.findEdge( z_mod_b_t , u_mod_b_t )
+edge_mod_t_face_b_2_1 = doc.findEdge( y_mod_b_t,  x_mod_b_t )
+edge_mod_t_face_b_2_2 = doc.findEdge( x_mod_b_t,  u_mod_b_t )
+
+
+
+# Joignant faces haut et du bas
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+# v�rifications
+assert edge_mod_face_h_1_1
+assert edge_mod_face_h_1_2
+assert edge_mod_face_h_2_1
+assert edge_mod_face_h_2_2
+
+assert edge_mod_t_face_h_1_1
+assert edge_mod_t_face_h_1_2
+assert edge_mod_t_face_h_2_1
+assert edge_mod_t_face_h_2_2
+
+assert edge_mod_face_b_1_1
+assert edge_mod_face_b_1_2
+assert edge_mod_face_b_2_1
+assert edge_mod_face_b_2_2
+
+assert edge_mod_t_face_b_1_1
+assert edge_mod_t_face_b_1_2
+assert edge_mod_t_face_b_2_1
+assert edge_mod_t_face_b_2_2
+
+
+assert Edge_Mod_ext_h
+assert Edge_Mod_int_h
+
+assert Edge_Mod_int_b
+assert Edge_Mod_ext_b
+
+assert Edge_Mod_ext_g
+assert Edge_Mod_int_g
+
+assert Edge_Mod_int_d
+assert Edge_Mod_ext_d
+
+
+
+#=========================
+#       QUADS
+#=========================
+Quad_mod_0 = model_tuyau_fin.getQuadJK( 1 , 0 , 0 )
+Quad_mod_1 = model_tuyau_fin.getQuadJK( 1 , 1 , 0 )
+Quad_mod_2 = model_tuyau_fin.getQuadJK( 1 , 2 , 0 )
+Quad_mod_3 = model_tuyau_fin.getQuadJK( 1 , 3 , 0 )
+
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+doc.setShape(Tuyau_geom)
+
+#=========================
+#       SOMMETS
+#=========================
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+
+# Face du bas
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+## Grand rayon
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+## Petit rayon
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+# Face du haut
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+## Grand rayon
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+## Petit rayon
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+#=========================
+#       EDGES
+#=========================
+All_Edges_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["EDGE"] )
+
+# Face du haut
+## Grand rayon
+edge_face_h_1   = All_Edges_Tuy_1[11]
+edge_face_h_2   = All_Edges_Tuy_1[14]
+## Petit rayon
+edge_t_face_h_1 = All_Edges_Tuy_1[12]
+edge_t_face_h_2 = All_Edges_Tuy_1[13]
+
+
+# Face du bas
+## Grand rayon
+edge_face_b_1   = All_Edges_Tuy_1[1]
+edge_face_b_2   = All_Edges_Tuy_1[4]
+##  Petit rayon
+edge_t_face_b_1 = All_Edges_Tuy_1[2]
+edge_t_face_b_2 = All_Edges_Tuy_1[3]
+
+
+# Joignant les 2 faces
+
+## edges compl�tes
+Edge_Tuy_ext_h = All_Edges_Tuy_1[6]
+Edge_Tuy_int_h = All_Edges_Tuy_1[7]
+Edge_Tuy_int_b = All_Edges_Tuy_1[8]
+Edge_Tuy_ext_b = All_Edges_Tuy_1[9]
+
+Pt_Z = geompy.MakeVertex( 75 , 20 , 0 )
+Pt_Z_1 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , 10 )
+Pt_Z_2 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , -10 )
+Line_Z1_Z2 = geompy.MakeLineTwoPnt( Pt_Z_1 , Pt_Z_2 )
+
+
+All_Edge_Tuy_ext_h = geompy.SubShapeAllSorted( Edge_Tuy_ext_h , geompy.ShapeType["VERTEX"] )
+
+Vx_Edg_Tuy_ext_h_1 = All_Edge_Tuy_ext_h[0]
+Vx_Edg_Tuy_ext_h_2 = All_Edge_Tuy_ext_h[1]
+
+Vx_Edg_Tuy_ext_h_1_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_1 , -10 , -10 , 0 )
+Vx_Edg_Tuy_ext_h_2_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_2 , 10 , 0 , 0 )
+
+Line_1 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_1, Vx_Edg_Tuy_ext_h_1_trans)
+Line_2 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_2, Vx_Edg_Tuy_ext_h_2_trans)
+
+Wire = geompy.MakeWire([Line_1, Line_2, Edge_Tuy_ext_h])
+Pipe_Z = geompy.MakePipe( Line_Z1_Z2 , Wire )
+Pipe_Ztt = geompy.MakePipe( Line_Z1_Z2 , Edge_Tuy_ext_h )
+Partition_Ztt = geompy.MakePartition([Tuyau_geom], [Pipe_Ztt], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+All_Edges_Tuy_2tt = geompy.SubShapeAllSorted( Partition_Ztt , geompy.ShapeType["EDGE"] )
+
+Edge_Tuy_ext_g = All_Edges_Tuy_2tt[12]
+Edge_Tuy_int_g = All_Edges_Tuy_2tt[13]
+Edge_Tuy_ext_d = All_Edges_Tuy_2tt[10]
+Edge_Tuy_int_d = All_Edges_Tuy_2tt[11]
+
+## une edge en plusieurs(4) morceaux : Edge_Tuy_ext_h
+X_pln1 = geompy.MakeVertexWithRef( Pt_Z , -20 , 0 , 0 )
+Vec_X = geompy.MakeVectorDXDYDZ( 1 , 0 , 0 )
+
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+Plan2 = geompy.MakeTranslation( Plan1 , -20 , 0 , 0 )
+Plan3 = geompy.MakeTranslation( Plan1 , -40 , 0 , 0 )
+
+Partition_Edge_g_d_h_b = geompy.MakePartition([
+    Edge_Tuy_ext_h,
+    Edge_Tuy_int_h,
+    Edge_Tuy_ext_b,
+    Edge_Tuy_int_b,
+    Edge_Tuy_ext_g,
+    Edge_Tuy_int_g,
+    Edge_Tuy_ext_d,
+    Edge_Tuy_int_d], 
+    [Plan1, Plan2, Plan3], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+
+All_Edge_g_d_h_b = geompy.SubShapeAllSorted( Partition_Edge_g_d_h_b , geompy.ShapeType["EDGE"] )
+Edge_Tuy_ext_h_1 = All_Edge_g_d_h_b[0]
+Edge_Tuy_ext_h_2 = All_Edge_g_d_h_b[15]
+Edge_Tuy_ext_h_3 = All_Edge_g_d_h_b[23]
+Edge_Tuy_ext_h_4 = All_Edge_g_d_h_b[31]
+
+
+
+#=========================
+#       FACES
+#=========================
+All_Faces_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["FACE"] )
+
+Face_Tuy_ext_1 = All_Faces_Tuy_1[4]
+Face_Tuy_ext_2 = All_Faces_Tuy_1[5]
+
+Partition_Face = geompy.MakePartition([ Face_Tuy_ext_1 , Face_Tuy_ext_2 ], [ Plan1 , Plan2 , Plan3 , Pipe_Z ], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+
+
+All_Faces_Partition_Face = geompy.SubShapeAllSorted( Partition_Face , geompy.ShapeType["FACE"] )
+
+## -------------------------------------
+Face_0 = All_Faces_Partition_Face[0]
+Face_6 = All_Faces_Partition_Face[6]
+Face_10 = All_Faces_Partition_Face[10]
+Face_14 = All_Faces_Partition_Face[14]
+
+## -------------------------------------
+Face_1 = All_Faces_Partition_Face[1]
+Face_7 = All_Faces_Partition_Face[7]
+Face_11 = All_Faces_Partition_Face[11]
+Face_15 = All_Faces_Partition_Face[15]
+
+## -------------------------------------
+Face_2 = All_Faces_Partition_Face[2]
+Face_4 = All_Faces_Partition_Face[4]
+Face_8 = All_Faces_Partition_Face[8]
+Face_12 = All_Faces_Partition_Face[12]
+
+## -------------------------------------
+Face_3 = All_Faces_Partition_Face[3]
+Face_5 = All_Faces_Partition_Face[5]
+Face_9 = All_Faces_Partition_Face[9]
+Face_13 = All_Faces_Partition_Face[13]
+
+
+
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          VERTEX
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+x_mod_h.setAssociation( x_h )
+y_mod_h.setAssociation( y_h )
+z_mod_h.setAssociation( z_h )
+u_mod_h.setAssociation( u_h )
+
+## Petit rayon
+x_mod_h_t.setAssociation( x_h_t )
+y_mod_h_t.setAssociation( y_h_t )
+z_mod_h_t.setAssociation( z_h_t )
+u_mod_h_t.setAssociation( u_h_t )
+
+
+# Face du bas
+
+## Grand rayon
+x_mod_b.setAssociation( x_b )
+y_mod_b.setAssociation( y_b )
+z_mod_b.setAssociation( z_b )
+u_mod_b.setAssociation( u_b )
+
+## Petit rayon
+x_mod_b_t.setAssociation( x_b_t )
+y_mod_b_t.setAssociation( y_b_t )
+z_mod_b_t.setAssociation( z_b_t )
+u_mod_b_t.setAssociation( u_b_t )
+
+
+##===========================================
+##          EDGES
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+edge_mod_face_h_1_1.addAssociation( edge_face_h_1, 0.5, 1. )
+edge_mod_face_h_1_2.addAssociation( edge_face_h_1, 0., 0.5 )
+edge_mod_face_h_2_1.addAssociation( edge_face_h_2, 0.5, 1. )
+edge_mod_face_h_2_2.addAssociation( edge_face_h_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_h_1_1.addAssociation( edge_t_face_h_1, 0.5, 1. )
+edge_mod_t_face_h_1_2.addAssociation( edge_t_face_h_1, 0., 0.5 )
+edge_mod_t_face_h_2_1.addAssociation( edge_t_face_h_2, 0.5, 1. )
+edge_mod_t_face_h_2_2.addAssociation( edge_t_face_h_2, 0., 0.5 )
+
+# Face du bas
+
+## Grand rayon
+edge_mod_face_b_1_1.addAssociation( edge_face_b_1, 0.5, 1. )
+edge_mod_face_b_1_2.addAssociation( edge_face_b_1, 0., 0.5 )
+edge_mod_face_b_2_1.addAssociation( edge_face_b_2, 0.5, 1. )
+edge_mod_face_b_2_2.addAssociation( edge_face_b_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_b_1_1.addAssociation( edge_t_face_b_1, 0.5, 1. )
+edge_mod_t_face_b_1_2.addAssociation( edge_t_face_b_1, 0., 0.5 )
+edge_mod_t_face_b_2_1.addAssociation( edge_t_face_b_2, 0.5, 1. )
+edge_mod_t_face_b_2_2.addAssociation( edge_t_face_b_2, 0., 0.5 )
+
+
+
+# Joignant les 2 faces
+#Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_1, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_2, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_3, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_4, 0., 1. )
+Edge_Mod_int_h.addAssociation( Edge_Tuy_int_h, 0., 1. )
+
+Edge_Mod_int_b.addAssociation( Edge_Tuy_int_b, 0., 1. )
+Edge_Mod_ext_b.addAssociation( Edge_Tuy_ext_b, 0., 1. )
+
+Edge_Mod_ext_g.addAssociation( Edge_Tuy_ext_g, 0., 1. )
+Edge_Mod_int_g.addAssociation( Edge_Tuy_int_g, 0., 1. )
+
+Edge_Mod_int_d.addAssociation( Edge_Tuy_int_d, 0., 1. )
+Edge_Mod_ext_d.addAssociation( Edge_Tuy_ext_d, 0., 1. )
+
+
+#Quad_mod_1.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_1.addAssociation( Face_0 )
+Quad_mod_1.addAssociation( Face_6 )
+Quad_mod_1.addAssociation( Face_10 )
+Quad_mod_1.addAssociation( Face_14 )
+
+#Quad_mod_0.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_0.addAssociation( Face_1 )
+Quad_mod_0.addAssociation( Face_7 )
+Quad_mod_0.addAssociation( Face_11 )
+Quad_mod_0.addAssociation( Face_15 )
+
+#Quad_mod_2.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_2.addAssociation( Face_2 )
+Quad_mod_2.addAssociation( Face_4 )
+Quad_mod_2.addAssociation( Face_8 )
+Quad_mod_2.addAssociation( Face_12 )
+
+#Quad_mod_3.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_3.addAssociation( Face_3 )
+Quad_mod_3.addAssociation( Face_5 )
+Quad_mod_3.addAssociation( Face_9 )
+Quad_mod_3.addAssociation( Face_13 )
+
+
+
+#==========================================================
+#       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+#==========================================================
+#for i,e in enumerate(All_Edges_Tuy_1): geompy.addToStudy( e, "edge_"+str(i) )
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+geompy.addToStudy( x_h, "x_h" )
+geompy.addToStudy( y_h, "y_h" )
+geompy.addToStudy( z_h, "z_h" )
+geompy.addToStudy( u_h, "u_h" )
+geompy.addToStudy( x_h_t, "x_h_t")
+geompy.addToStudy( y_h_t, "y_h_t" )
+geompy.addToStudy( z_h_t, "z_h_t" )
+geompy.addToStudy( u_h_t, "u_h_t" )
+
+geompy.addToStudy( x_b, "x_b")
+geompy.addToStudy( y_b, "y_b" )
+geompy.addToStudy( z_b, "z_b" )
+geompy.addToStudy( u_b, "u_b")
+geompy.addToStudy( x_b_t, "x_b_t" )
+geompy.addToStudy( y_b_t, "y_b_t" )
+geompy.addToStudy( z_b_t, "z_b_t" )
+geompy.addToStudy( u_b_t, "u_b_t" )
+
+
+#geompy.addToStudy(Line_Z1_Z2, "Line_Z1_Z2")
+#geompy.addToStudy(Pipe_Ztt, "Pipe_Ztt")
+#geompy.addToStudy( Partition_Ztt , "Partition_Ztt" )
+geompy.addToStudy( Edge_Tuy_ext_h , "Edge_Tuy_ext_h" )
+geompy.addToStudy( Edge_Tuy_int_h , "Edge_Tuy_int_h" )
+geompy.addToStudy( Edge_Tuy_int_b , "Edge_Tuy_int_b" )
+geompy.addToStudy( Edge_Tuy_ext_b , "Edge_Tuy_ext_b" )
+geompy.addToStudy( Edge_Tuy_ext_g , "Edge_Tuy_ext_g" )
+geompy.addToStudy( Edge_Tuy_int_g , "Edge_Tuy_int_g" )
+geompy.addToStudy( Edge_Tuy_ext_d , "Edge_Tuy_ext_d" )
+geompy.addToStudy( Edge_Tuy_int_d , "Edge_Tuy_int_d" )
+#geompy.addToStudy( Partition_Edge_g_d_h_b , "Partition_Edge_g_d_h_b" )
+geompy.addToStudy( Face_Tuy_ext_1 , "Face_Tuy_ext_1" )
+geompy.addToStudy( Face_Tuy_ext_2 , "Face_Tuy_ext_2" )
+#geompy.addToStudy( Partition_Face , "Partition_Face" )
+geompy.addToStudy( Face_0 , "Face_0" )
+geompy.addToStudy( Face_1 , "Face_1" )
+geompy.addToStudy( Face_2 , "Face_2" )
+geompy.addToStudy( Face_3 , "Face_3" )
+geompy.addToStudy( Face_4 , "Face_4" )
+geompy.addToStudy( Face_5 , "Face_5" )
+geompy.addToStudy( Face_6 , "Face_6" )
+geompy.addToStudy( Face_7 , "Face_7" )
+geompy.addToStudy( Face_8 , "Face_8" )
+geompy.addToStudy( Face_9 , "Face_9" )
+geompy.addToStudy( Face_10 , "Face_10" )
+geompy.addToStudy( Face_11 , "Face_11" )
+geompy.addToStudy( Face_12 , "Face_12" )
+geompy.addToStudy( Face_13 , "Face_13" )
+geompy.addToStudy( Face_14 , "Face_14" )
+geompy.addToStudy( Face_15 , "Face_15" )
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_all_grp")
+Nbr_Hex = doc.countHexa()
+print "doc.countHexa()->",Nbr_Hex
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+#Nbr_elm_hex = Hexa_grp.countElement()
+#print "Hexa_all_grp  countElement() ->",Nbr_elm_hex
+
+for i in range(Nbr_Hex):
+    Hexa_grp = doc.addHexaGroup("Hexa_grp"+str(i))
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+#Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+#print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+
+# groupe de Edges
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh(doc)
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexa�drique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/Test_HEXABLOCK.py b/src/TEST_PY/Test_HEXABLOCK.py
new file mode 100755 (executable)
index 0000000..bbd2843
--- /dev/null
@@ -0,0 +1,280 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import hexablock
+
+# ======================================================== test_sphere
+def test_sphere():
+   doc = hexablock.addDocument ("default")
+   orig = doc.addVertex (0,0,0)
+
+   ncouches = 1
+   k = 0.8
+   decal  = doc.addVector (1,1,1)
+   sphere = doc.makeSpherical(orig, decal, ncouches, k)
+
+   sphere.saveVtk ("test_sphere.vtk")
+   # doc.dump ()
+   print "test_sphere OK"
+   
+   
+# ======================================================== test_cartesi1
+def test_cartesi1():
+  size_x = 15
+  size_y = 12
+  size_z = 8
+
+  doc  = hexablock.addDocument()
+  orig = doc.addVertex (0,0,0)
+  direc= doc.addVector (1,1,1)
+  grid = doc.makeCartesian1(orig, direc, size_x,size_y,size_z,0,0,0)
+  grid.saveVtk ("test_cartesi1.vtk")
+  # doc.dump ()
+  print "test_cartesi1 OK"
+
+
+
+#// ======================================================== test_find
+def test_find():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc  = hexablock.addDocument()
+   
+   orig = doc.addVertex(0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1 (orig, direc, size_x,size_y,size_z,0,0,0)
+
+   grid.saveVtk ("mini1.vtk")
+   #doc.dump ().
+
+   v00 = doc.findVertex (0, 0, 0)   
+   v02 = doc.findVertex (1, 1, 0)
+   v06 = doc.findVertex (1, 1, 1)
+   v08 = doc.findVertex (2, 1, 0)
+   v10 = doc.findVertex (2, 1, 1)
+   v22 = doc.findVertex (2, 1, 2)
+   v26 = doc.findVertex (2, 2, 2)
+
+   assert v00
+   assert v02
+   assert v06
+   assert v08
+   assert v10
+   assert v22
+   assert v26
+
+   assert doc.findEdge (v06, v10)
+   assert doc.findEdge (v10, v06)
+
+   assert doc.findQuad (v02, v10)
+   assert doc.findQuad (v06, v08)
+   assert not doc.findQuad (v02, v06)  #CS_FAILS
+   
+   assert doc.findHexa (v00, v06)
+   assert doc.findHexa (v06, v26)
+   assert doc.findHexa (v26, v06)
+   print "test_find OK"
+
+#// ======================================================== test_joint
+def test_joint():
+   import HEXA_ORB
+   dimx = 11
+   dimy = 11
+   dimz = 2
+
+   doc = hexablock.addDocument()
+
+   orig1 = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+
+   grid1 = doc.makeCartesian1(orig1, direc, dimx, dimy, dimz, 0, 0, 0 )
+
+   orig2 = doc.addVertex  (dimx/2.0,0,8)
+   vectj = doc.addVector (0,1,0)
+   vecti = doc.addVector (1,0,0)
+   grid2 = doc.makeCylindrical (orig2, vecti, vectj, 1, 180, 1,dimz,dimy,dimx, False)
+
+   mx = dimx/2
+   my = dimy/2
+   prems = grid1.getQuad1 (HEXA_ORB.DIR_Z, mx, my, dimz)
+   cible = grid2.getQuad1 (HEXA_ORB.DIR_X, dimz, mx, my)
+
+
+   v1 = prems.getVertex (0)
+   v2 = cible.getVertex (0)
+   v3 = prems.getVertex (1)
+   v4 = cible.getVertex (3)
+
+   liste = []
+   miroir = []
+
+   liste.append(prems)
+   
+   for nx in range(dimx):
+      if ( nx != mx ):
+        liste.append(grid1.getQuad1 (HEXA_ORB.DIR_Z, nx, my, dimz))
+   
+   #for (int nx=0. nx<dimx. nx++)
+       #if (nx!=mx) 
+          #liste.append(grid1.getQuad (dir_z, nx, my, dimz)). 
+
+   for ny in range(dimy):
+      if ( ny != my ):
+        liste.append(grid1.getQuad1 (HEXA_ORB.DIR_Z, mx, ny, dimz))
+   #for (int ny=0. ny<dimy. ny++)
+       #if (ny!=my) 
+          #liste.push_back (grid1.getQuad (dir_z, mx, ny, dimz)). 
+
+   joint = doc.joinQuads  (liste, cible, v1, v2, v3, v4, 5)
+
+   joint.saveVtk ("test_joint.vtk")
+   print "test_joint OK"
+
+#// ======================================================== test_mini
+def test_mini():  
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument ()
+
+   orig  = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid  = doc.makeCartesian1( orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   orig2 = doc.addVertex (0,0,5)
+   grid2 = doc.makeCartesian1( orig2, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.saveVtk ("mini.vtk").
+   grid2.saveVtk ("test_mini.vtk")
+   print "test_mini OK"
+
+#// ======================================================== test_clone
+def test_clone():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid1 = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   bond = doc.addVector (0, 0, 7)
+   grid2 = doc.makeTranslation(grid1, bond)
+
+   grid1.saveVtk ("test_clone.grid1.vtk")
+   grid2.saveVtk ("test_clone.grid2.vtk")
+   #doc .saveVtk ("clonage.vtk").
+   #doc .dump().
+   print "test_clone OK"
+
+#// ======================================================== test_separ
+def test_separ():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   grid.saveVtk ("test_separ.vtk")
+   #doc .saveVtk ("separ.vtk").
+   #doc .dump().
+   print "test_separ OK"
+
+#// ======================================================== test_cyl
+def test_cyl():
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   haut = doc.addVector (0,0,1)
+   base = doc.addVector (1,0,0)
+
+   dr = 1
+   #// double da = 360. // degres
+   dl = 1
+   nr = 2
+   na = 9
+   nl = 5
+
+   cyl1 = doc.makeCylindrical(orig,base,haut,dr, 360,  dl,nr,na,nl, False )
+   cyl1.saveVtk ("test_cyl.full.vtk")
+
+   cyl2 = doc.makeCylindrical(orig,haut,base,dr, 270, dl,nr,na,nl, False )
+   cyl2.saveVtk ("test_cyl.34.vtk")
+
+   #// doc.dump ()
+   print "test_cyl OK"
+
+
+#// ======================================================== test_propagation
+def test_propagation():
+   size_x = 2
+   size_y = 1
+   size_z = 1
+
+   doc = hexablock.addDocument()
+
+   orig  = doc.addVertex(0,0,0)
+   direc = doc.addVector(1,1,1)
+   grid  = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.dump  ().
+   nb = doc.countPropagation()
+
+   for nro in range(nb):
+       prop  = doc.getPropagation (nro)
+       edges = prop.getEdges()
+       #ways  = prop.getWays()
+       
+       for i, anEdge in enumerate(edges):
+         if anEdge.getWay():
+          print "( ", anEdge.getVertex (0), ",", anEdge.getVertex (1), " )"
+        else:
+          print "( ", anEdge.getVertex (1), ",", anEdge.getVertex (0), " )"
+           
+   print "test_propagation OK"
+
+
+
+
+
+
+
+
+
+
+#test_sphere()
+#test_cartesi1()
+#test_find()
+#test_joint()
+#test_mini()  
+#test_clone()
+#test_separ()
+#test_cyl()
+#test_propagation()
+
diff --git a/src/TEST_PY/bielle.py b/src/TEST_PY/bielle.py
new file mode 100644 (file)
index 0000000..c911562
--- /dev/null
@@ -0,0 +1,545 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+import geompy
+import hexablock
+import math
+
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("bielle")
+
+#=============================
+# MODEL CREATION
+#=============================
+
+# For the connecting rod, two cylindrical grids have to be build and
+# the quadrangles have to be prismed between these wo grids
+
+#=============================
+# PARAMETRES
+#=============================
+
+#R = 40.0
+R = 0.095168291790720005
+
+r_pte = R
+r_pte_t = R/2.0
+
+xpetit = 0.0
+xgrand = 1.35739 + 0.1595
+longueur = (xgrand - xpetit)/2.0
+hauteur = 0.019999999553*2
+
+dr_pte = R
+da_pte = 360
+dl_pte = hauteur
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+# TESTS : sauvegarde
+f_mod_apres = open(os.path.join(os.environ['TMP'],
+                                "bielle_model_apres.txt"), 'w')
+
+# end TESTS
+
+
+# @todo JPL le 08/07/2011 :
+# refaire le mod�le de blocs avec des pentagones pour les grilles
+# cylindriques, et 1 hexaedre reliant ces 2 grilles.
+
+#=============================
+# Vectors Creation 
+#=============================
+
+dx = doc.addVector(longueur, 0, 0)
+dy = doc.addVector(0, longueur, 0)
+dz = doc.addVector(0, 0, longueur)
+
+#=================================================
+# Creation of cylindrical grid centers
+#=================================================
+
+c_pte = doc.addVertex(xpetit, 0, 0)
+c_grd = doc.addVertex(2*longueur, 0, 0)
+dx_prime = doc.addVectorVertices(c_pte, c_grd)
+
+#=================================================
+# small cylindrical grid creation
+#=================================================
+
+grille_cyl_pte = doc.makeCylindrical(c_pte, dx, dz, dr_pte, da_pte, dl_pte, nr_pte, na_pte, nl_pte, False)
+
+#=================================
+#  Small cylindrical grid creation
+#=================================
+
+grille_cyl_grd = doc.makeTranslation(grille_cyl_pte, dx_prime)
+
+# TEST :
+file_name = os.path.join(os.environ['TMP'], 'bielle0.vtk')
+doc.saveVtk(file_name)
+
+
+#==================================
+# Joining the two cylindrical grids
+#==================================
+
+mod_x1 = grille_cyl_pte.getVertexIJK(1, 0, 1)
+mod_x2 = grille_cyl_pte.getVertexIJK(1, 1, 0)
+mod_x3 = grille_cyl_pte.getVertexIJK(1, 5, 0)
+mod_x4 = grille_cyl_pte.getVertexIJK(1, 0, 0)
+quad_11 = doc.findQuad(mod_x1, mod_x2)
+quad_12 = doc.findQuad(mod_x1, mod_x3)
+
+mod_y1 = grille_cyl_grd.getVertexIJK(1, 3, 1)
+mod_y2 = grille_cyl_grd.getVertexIJK(1, 2, 0)
+mod_y3 = grille_cyl_grd.getVertexIJK(1, 4, 0)
+mod_y4 = grille_cyl_grd.getVertexIJK(1, 3, 0)
+
+quad_21 = doc.findQuad(mod_y1, mod_y2)
+quad_22 = doc.findQuad(mod_y1, mod_y3)
+
+model_biell_fin = doc.joinQuads([quad_11, quad_12], quad_21, mod_x1, mod_y1, mod_x4, mod_y4, 1)
+
+# TEST :
+file_name = os.path.join(os.environ['TMP'], 'bielle1.vtk')
+doc.saveVtk(file_name)
+
+
+#=======================
+# CREATION ASSOCIATION
+#=======================
+
+# JPL le 08/07/2011 :
+# la premi�re solution :
+# 1. 4 associations par ligne fermee pour les trous
+# 2. 2 associations par ligne fermee pour les contours
+# => pose probl�me car les points associ�s par cette m�thode sont
+# uniform�ment r�partis sur le contour => �a d�pend de la longueur
+# entre les 2 grilles cylindriques.
+# REM : a retester apr�s la correction d'Alain pour voir ce que �a
+# donne
+
+# deuxi�me solution :
+# 1. 4 associations par ligne fermee pour les trous
+# => pour chaque association, 6 edges du modele <-> 1 ligne de la geometrie
+# 2. 4 associations par lignes ouvertes pour les contours externes des
+# grilles cylindriques
+# => pour chaque association, 4 edges du modele <-> 3 lignes de la geometrie
+# 3. 4 associations de points restants (mod_x1, mod_x4, mod_y1, mod_y4)
+
+# => cette solution pose probl�me (� cause de l'association par ligne
+# ouverte)
+
+bielle_geom = geompy.ImportFile(STEP_PATH, "STEP")
+doc.setShape(bielle_geom)
+geompy.addToStudy(bielle_geom, "bielle_geom")
+all_edges_bielle = geompy.SubShapeAllSorted(bielle_geom, geompy.ShapeType["EDGE"])
+
+
+
+# dictionnaire des edges de la g�om�trie :
+# key = nom, value = indice dans all_edges_bielle
+dic_edge_names = {"edge_ray_pte_b": 0, "edge_ray_pte_h": 1,
+                  "edge_trou_pte_b": 2, "edge_trou_pte_h" :3,
+                  "edge_arr_pte_g_b": 7, "edge_arr_pte_g_h": 8,
+                  "edge_arr_pte_d_b": 9, "edge_arr_pte_d_h": 10,
+                  "edge_arr_grd_g_b": 19, "edge_arr_grd_g_h": 20,
+                  "edge_arr_grd_d_b": 21, "edge_arr_grd_d_h": 22,              
+                  "edge_trou_grd_b": 25, "edge_trou_grd_h": 26,
+                  "edge_ray_grd_b": 27, "edge_ray_grd_h": 28,
+                  "edge_long_g_b": 13, "edge_long_g_h": 14,
+                  "edge_long_d_b": 15, "edge_long_d_h": 16
+                  }
+
+
+all_faces_bielle = geompy.SubShapeAllSorted(bielle_geom, geompy.ShapeType["FACE"])
+# dictionnaire des faces de la geometrie :
+# key = nom, value = indice dans all_faces_bielle
+dic_face_names = {"face_ray_pte": 0, "face_trou_pte": 1, "face_pte_g": 2,
+                  "face_pte_d": 3, "face_long_g": 4, "face_long_d": 5,
+                  "face_bas": 6, "face_haut": 7, "face_grd_g": 8,
+                  "face_grd_d": 9, "face_trou_grd": 10,
+                  "face_ray_grd": 11
+                  }
+
+
+# la clef correspond a la geometrie, la valeur a l'indice en z dans le
+# modele de bloc (grille cylindrique)
+# NOTE : les dictionnaires ordonn�s ne sont pas encore introduits dans
+# la version 2.6.6 de python (Salome 6.2). On ne connait donc pas
+# l'ordre de bouclage (haut/bas ou bas/haut) mais �a n'a pas
+# d'importance :
+dico_haut_bas = {"h": 1, "b": 0}
+
+# 1. lignes internes (trou) haut/bas du petit cylindre
+# ====================================================
+for z in dico_haut_bas.iteritems():
+
+    # REM : la direction de la ligne geometrique est dans le sens anti-trigonometrique
+    # => on parcourt le modele en sens inverse
+
+##     # modele de blocs :
+##     mod_start = grille_cyl_pte.getEdgeJ(0, 5, z[1])
+##     mod_first = mod_start.getVertex(1)
+##     # table des edges :
+##     mod_line = [grille_cyl_pte.getEdgeJ(0, j, z[1]) for j in range(4, -1, -1)]
+
+    # modele de blocs :
+    mod_start = grille_cyl_pte.getEdgeJ(0, 0, z[1])
+    mod_first = mod_start.getVertex(0)
+    # table des edges :
+    mod_line = [grille_cyl_pte.getEdgeJ(0, j, z[1]) for j in range(1, 6)]
+
+
+    # geometrie : 1 seule ligne
+    edge_hole_in = all_edges_bielle[dic_edge_names["edge_trou_pte_"+z[0]]]
+    geo_start = edge_hole_in
+    par_start = 0.0
+    geo_line  = []
+
+    # association :
+    ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                                  geo_start, par_start, geo_line)
+
+
+# 2. lignes internes (trou) haut/bas du grand cylindre
+# =====================================================
+for z in dico_haut_bas.iteritems():
+
+    # REM : la direction de la ligne geometrique est dans le sens anti-trigonometrique
+    # => on parcourt le modele en sens inverse
+
+##     # modele de blocs :
+##     mod_start = grille_cyl_grd.getEdgeJ(0, 5, z[1])
+##     mod_first = mod_start.getVertex(1)
+##     # table des edges :
+##     mod_line = [grille_cyl_grd.getEdgeJ(0, j, z[1]) for j in range(4, -1, -1)]
+
+    mod_start = grille_cyl_grd.getEdgeJ(0, 0, z[1])
+    mod_first = mod_start.getVertex(1)
+    # table des edges :
+    mod_line = [grille_cyl_grd.getEdgeJ(0, j, z[1]) for j in range(1, 6)]
+
+    # geometrie : 1 seule ligne
+    edge_hole_in = all_edges_bielle[dic_edge_names["edge_trou_grd_"+z[0]]]
+    geo_start = edge_hole_in
+    par_start = 0.0
+    geo_line  = []
+
+    # association :
+    ier = doc.associateClosedLine(mod_first, mod_start, mod_line,
+                                  geo_start, par_start, geo_line)
+
+
+# 3. lignes externes haut/bas du petit cylindre
+# =============================================
+for z in dico_haut_bas.iteritems():
+
+    # JPL le 08/07/2011 : on utilise ici l'association par ligne
+    # ouverte. Avec le nouvelle version, les points sont r�partis de
+    # mani�re �quidistance sur la ligne geometrique form�e par la
+    # concat�nation des lignes fournies en entr�e.
+
+    # modele de blocs :
+    mod_start = grille_cyl_pte.getEdgeJ(1, 1, z[1])
+    # table des edges :
+    mod_line = [grille_cyl_pte.getEdgeJ(1, j, z[1]) for j in [2, 3, 4]]
+
+    # geometrie :
+    # les edges de la geometrie correspondant sont, dans l'ordre (par
+    # exemple pour le haut) :
+    # edge_arr_pte_d_h, edge_ray_pte_h, edge_arr_pte_g_h
+    geo_start = all_edges_bielle[dic_edge_names["edge_arr_pte_d_"+z[0]]]
+
+    geo_line  = []
+    geo_line.append(all_edges_bielle[dic_edge_names["edge_ray_pte_"+z[0]]])
+    geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_pte_g_"+z[0]]])
+
+    # association :
+    # la premi�re est la derni�re ligne sont orient�es "dans le
+    # mauvais sens" => on fournit cette info :
+    par_start = 0.0
+    par_end = 1.0
+    ier = doc.associateOpenedLine(mod_start, mod_line,
+                                  geo_start, par_start, geo_line, par_end)
+
+
+## # 4. lignes externes haut/bas du grand cylindre
+## # =============================================
+for z in dico_haut_bas.iteritems():
+
+    # JPL le 08/07/2011 : on utilise ici l'association par ligne
+    # ouverte. Avec le nouvelle version, les points sont r�partis de
+    # mani�re �quidistance sur la ligne geometrique form�e par la
+    # concat�nation des lignes fournies en entr�e.
+
+    # modele de blocs :
+    mod_start = grille_cyl_grd.getEdgeJ(1, 4, z[1])
+    # table des edges :
+    mod_line = [grille_cyl_grd.getEdgeJ(1, j, z[1]) for j in [5, 0, 1]]
+
+    # geometrie :
+    # les edges de la geometrie correspondant sont, dans l'ordre (par
+    # exemple pour le haut) :
+    # edge_arr_grd_g_h, edge_ray_grd_h, edge_arr_grd_d_h
+    geo_start = all_edges_bielle[dic_edge_names["edge_arr_grd_g_"+z[0]]]
+
+    geo_line  = []
+    geo_line.append(all_edges_bielle[dic_edge_names["edge_ray_grd_"+z[0]]])
+    geo_line.append(all_edges_bielle[dic_edge_names["edge_arr_grd_d_"+z[0]]])
+
+    # association :
+    # la premi�re est la derni�re ligne sont orient�es "dans le
+    # mauvais sens" => on fournit cette info :
+    par_start = 0.0
+    par_end = 1.0
+    ier = doc.associateOpenedLine(mod_start, mod_line,
+                                  geo_start, par_start, geo_line, par_end)
+
+# JPL le 26/07/2011 :
+# l'association des edges n'est pas necessaire (implicite)
+
+# 6. association des 4 points restants (x1, x4, y1, y4) :
+# =======================================================
+
+# NB:
+# h = top (haut)
+# b = bottom (bas)
+# g = big (grand)
+# p = small (petit)
+# t = hole (trou)
+
+# JPL le 08/07/2011 :
+# seuls 4 points de la geometrie sont n�cessaires (pour l'association
+# vertex/point : pour le reste on utilise l'association par lignes) :
+# dictionnaire geom_vertices
+# il s'agit de points des grilles cylindriques, � l'int�rieur
+# de la bielle, ayant servis au joinQuads (ie: mod_x1, mod_x4, mod_y1, mod_y4)
+
+
+## pt_a = geompy.MakeVertex(0, 0, hauteur/2.)
+## face_haut = geompy.GetFaceNearPoint(bielle_geom, pt_a)
+## pt_b = geompy.MakeVertex(0, 0, -hauteur/2.)
+## face_bas = geompy.GetFaceNearPoint(bielle_geom, pt_b)
+
+face_haut = all_faces_bielle[dic_face_names["face_haut"]]
+
+edge_haut_droite = geompy.GetEdgesByLength(face_haut, 0.136, 0.137)
+edge_haut_gauche = geompy.GetEdgesByLength(face_haut, 0.131, 0.132)
+
+# 1. grand cylindre :
+y_h_g = geompy.MakeVertexOnSurface(face_haut, 1, 0.5)
+u_h_g = geompy.MakeVertexOnCurve(edge_haut_droite, 1)
+w_h_g = geompy.MakeVertexOnCurve(edge_haut_gauche, 0)
+edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+
+geo_y1 = geompy.MakeVertexOnCurve(edge_v_grd, 0.5)
+geo_y4 = geompy.MakeVertexWithRef(geo_y1, 0.0, 0.0, -hauteur)
+
+# vertex cote grande grille cylindrique :
+mod_y1.setAssociation(geo_y1)
+mod_y4.setAssociation(geo_y4)
+
+# 2. petit cylindre :
+# REM : le modele grand cylindre a ete cree par translation / au petit
+# cylindre.
+v_h_p = geompy.MakeVertexOnSurface(face_haut, 0, 0.5)
+x_h_p = geompy.MakeVertexOnCurve(edge_haut_droite, 0)
+z_h_p = geompy.MakeVertexOnCurve(edge_haut_gauche, 1)
+edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+geo_x1 = geompy.MakeVertexOnCurve(edge_v_pte, 0.5)
+geo_x4 = geompy.MakeVertexWithRef(geo_x1, 0.0, 0.0, -hauteur)
+
+# vertex cote petite grille cylindrique :
+mod_x1.setAssociation(geo_x1)
+mod_x4.setAssociation(geo_x4)
+
+# 7. association des faces :
+# REM : l'association des faces internes ne semble pas necessaire (cylindres)
+# pas d'association des face_ray_XXX : pas necessaire ? De toute
+# fa�on, on a pour chaque 2 quads du mod�le...
+# les associations de face_haut, face_bas, face_long_g et face_long_d
+# ne sont pas necessaires ?
+
+# a decommenter donc si necessaire :
+## quad1 = grille_cyl_pte.getQuadJK(1, 1, 0)
+## quad1.addAssociation(all_faces_bielle[dic_face_names["face_pte_d"]])
+## quad2 = grille_cyl_pte.getQuadJK(1, 4, 0)
+## quad2.addAssociation(all_faces_bielle[dic_face_names["face_pte_g"]])
+## quad3 = grille_cyl_grd.getQuadJK(1, 1, 0)
+## quad3.addAssociation(all_faces_bielle[dic_face_names["face_grd_d"]])
+## quad4 = grille_cyl_grd.getQuadJK(1, 4, 0)
+## quad4.addAssociation(all_faces_bielle[dic_face_names["face_grd_g"]])
+
+
+#############################################################################################
+#############################################################################################
+# TEST :
+
+file_name = os.path.join(os.environ['TMP'], 'bielle2.vtk')
+doc.saveVtk(file_name)
+
+# affichage des points des 2 grilles cylindriques avec les
+# nouvelles coordonn�es (apres association)
+
+for k in range(2):
+    # petite grille cylindrique
+    i = 0
+    for j in range(6):
+        vertex = grille_cyl_pte.getVertexIJK(i, j, k)
+        value = " ".join(["i =", str(i), "j =", str(j),
+                          str(vertex.getX()), str(vertex.getY()), str(vertex.getZ()), '\n'])
+        f_mod_apres.write(str(value))
+        pass
+
+    f_mod_apres.write("stop\n")
+
+    i = 1
+    # on n'inclut pas les vertex associ�s individuellement (qui ne
+    # changent pas de coordonn�es...) : => j = 1 -> 5
+    for j in range(1, 6):
+        vertex = grille_cyl_pte.getVertexIJK(i, j, k)
+        value = " ".join(["i =", str(i), "j =", str(j),
+                          str(vertex.getX()), str(vertex.getY()), str(vertex.getZ()), '\n'])
+        f_mod_apres.write(str(value))
+        pass
+
+    f_mod_apres.write("stop\n")
+
+    # grande grille cylindrique
+    i = 0
+    for j in range(6):
+        vertex = grille_cyl_grd.getVertexIJK(i, j, k)
+        value = " ".join(["i =", str(i), "j =", str(j),
+                          str(vertex.getX()), str(vertex.getY()), str(vertex.getZ()), '\n'])
+        f_mod_apres.write(str(value))
+        pass
+
+    f_mod_apres.write("stop\n")
+
+    i = 1
+    # on n'inclut pas les vertex associ�s individuellement (qui ne
+    # changent pas de coordonn�es...) (j = 3)
+    # on ecrit les points dans le meme ordre que l'association :
+    for j in [4, 5, 0, 1, 2]:
+        vertex = grille_cyl_grd.getVertexIJK(i, j, k)
+        value = " ".join(["i =", str(i), "j =", str(j),
+                          str(vertex.getX()), str(vertex.getY()), str(vertex.getZ()), '\n'])
+        f_mod_apres.write(str(value))
+        pass
+    # end TEST
+
+    f_mod_apres.write("stop\n")
+
+#############################################################################################
+#############################################################################################    
+
+
+## #=================================================
+## # VERTEX, EDGES, FACES DANS L'ARBRE D'ETUDE SALOME
+## #=================================================
+
+# vertices :
+geompy.addToStudy(geo_x1, 'vertex_x1')
+geompy.addToStudy(geo_x4, 'vertex_x4')
+geompy.addToStudy(geo_y1, 'vertex_y1')
+geompy.addToStudy(geo_y4, 'vertex_y4')
+
+# edges :
+for key, value in dic_edge_names.iteritems():
+    geompy.addToStudy(all_edges_bielle[value], key)
+
+# faces (juste pour les tests) :
+for i, face in enumerate(all_faces_bielle):
+    geompy.addToStudy(face, "face_"+str(i))
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# JPL (le 09/05/2011) :
+# @todo a revoir : apres correction des bugs "countXXX()" dans le moteur
+
+# groupe d edges (arretes)
+edge_grp = doc.addEdgeGroup("Edge_grp")
+for i in range(doc.countEdge()):
+    edge_grp.addElement(doc.getEdge(i))
+
+# groupe de quads (faces)
+quad_grp = doc.addQuadGroup("Quad_grp")
+for i in range(doc.countQuad()):
+    quad_grp.addElement(doc.getQuad(i))
+
+# groupe d hexas (solids)
+hexa_grp = doc.addHexaGroup("Hexa_grp")
+for i in range(doc.countHexa()):
+    hexa_grp.addElement(doc.getHexa(i))
+
+# groupe de noeuds de vertex pour tout le modele 
+vertex_nod_grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+for i in range(doc.countVertex()):
+    vertex_nod_grp.addElement(doc.getVertex(i))
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+law = doc.addLaw("Uniform", 4)
+
+# TEST : pour avoir le mod�le de blocs :
+## law = doc.addLaw("Uniform", 0)
+
+# chercher les propagations du modele
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law)  # appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+#====================================
+# G�n�rer des maillages
+#====================================
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh_hexas = hexablock.mesh(doc)
+
+print "Nombre d hexaedres:", mesh_hexas.NbHexas()
+print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()
+print "Nombre de segments:", mesh_hexas.NbEdges()
+print "Nombre de noeuds:", mesh_hexas.NbNodes()
+
+# TESTS :
+f_mod_apres.close()
diff --git a/src/TEST_PY/bielle_variante.py b/src/TEST_PY/bielle_variante.py
new file mode 100644 (file)
index 0000000..7d163fd
--- /dev/null
@@ -0,0 +1,248 @@
+# -*- coding: latin-1 -*-\r
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+\r
+# Francis KLOSS - 2011 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France\r
+# ========================================================================================\r
+\r
+import geompy\r
+import hexablock\r
+\r
+# Définir les paramètres\r
+# ----------------------\r
+\r
+nom = "bielle"\r
+\r
+# Construire le modèle de bloc\r
+# ============================\r
+\r
+doc = hexablock.addDocument(nom)\r
+\r
+# Construire les 2 grilles cylindriques\r
+# -------------------------------------\r
+\r
+centre_a = doc.addVertex(0, 0, 0)\r
+centre_b = doc.addVertex(6, 0, 0)\r
+\r
+vecteur_a = doc.addVector(1, 1, 0)\r
+vecteur_z = doc.addVector(0, 0, 1)\r
+vecteur_b = doc.addVector(6, 0, 0)\r
+\r
+grille_a = doc.makeCylindrical(centre_a, vecteur_a, vecteur_z,  1, 360, 1,  1, 4, 1,  False)\r
+\r
+### grille_b = doc.makeTranslation(grille_a, vecteur_b)\r
+grille_b = doc.makeCylindrical(centre_b, vecteur_a, vecteur_z,  2, 360, 1,  1, 4, 1,  False)\r
+\r
+grilles = [ grille_a, grille_b ]\r
+\r
+# Relier les 2 grilles\r
+# --------------------\r
+\r
+quad_a = grille_a.getQuadJK(1, 3, 0)\r
+quad_b = grille_b.getQuadJK(1, 1, 0)\r
+\r
+point_a1 = grille_a.getVertexIJK(1, 0, 0)\r
+point_a2 = grille_a.getVertexIJK(1, 3, 0)\r
+\r
+point_b1 = grille_b.getVertexIJK(1, 1, 0)\r
+point_b2 = grille_b.getVertexIJK(1, 2, 0)\r
+\r
+prisme = doc.joinQuad(quad_a, quad_b,  point_a1, point_b1,  point_a2, point_b2,  3)\r
+\r
+# Associer le modèle de bloc avec la géométrie\r
+# ============================================\r
+\r
+# Charger la géométrie à associer\r
+# -------------------------------\r
+\r
+bielle = geompy.ImportSTEP("crank.stp")\r
+\r
+doc.setShape(bielle)\r
+\r
+# Extraire les subshapes de la géométrie\r
+# --------------------------------------\r
+\r
+g_vertices = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["VERTEX"])\r
+g_edges    = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["EDGE"  ])\r
+\r
+sommets = [ [ 8, 6, 9, 7 ], [ 12, 10, 13, 11 ] ]\r
+\r
+cercles = [ [2, 3], [25, 26] ]\r
+arcs_gr = [ [0, 1], [27, 28] ]\r
+arcs_pe = [ [ 9, 7,  10, 8 ], [ 21, 19,  22, 20 ] ]\r
+\r
+# Réparer l'association par ligne fermée\r
+# --------------------------------------\r
+\r
+def reparer(cercle, grille):\r
+  import math\r
+\r
+  k = geompy.KindOfShape(cercle)\r
+\r
+  centre = geompy.MakeVertex(k[1], k[2], k[3])\r
+  axe    = geompy.MakePrismDXDYDZ(centre,  k[4], k[5], k[6])\r
+  angle  = [ +math.pi/4, -math.pi/4 ][grille]\r
+\r
+  if grille==1:\r
+    axeY   = geompy.MakePrismDXDYDZ(centre, 0, 1, 0)\r
+    cercle = geompy.MakeRotation(cercle, axeY, math.pi)\r
+\r
+  return geompy.MakeRotation(cercle, axe, angle)\r
+\r
+# Associer les 4 cercles intérieurs\r
+# ---------------------------------\r
+\r
+for k in xrange(0, 2):\r
+  for g in xrange(0, 2):\r
+    grille = grilles[g]\r
+    ve = grille.getVertexIJK(0, g, k)\r
+    le = [ grille.getEdgeJ(0, j, k) for j in xrange(0, 4) ]\r
+    ed = reparer( g_edges[ cercles[g][k] ], g )\r
+    doc.associateClosedLine(ve, le[0], le[1:], ed, 0.0, [])\r
+\r
+# Associer les 4 grands arcs de cercle extérieurs\r
+# -----------------------------------------------\r
+\r
+for k in xrange(0, 2):\r
+  for g in xrange(0, 2):\r
+    grille = grilles[g]\r
+    le = [ grille.getEdgeJ(1, j, k) for j in [ [0, 1, 2], [2, 3, 0] ][g] ]\r
+    ed = g_edges[ arcs_gr[g][k] ]\r
+    doc.associateOpenedLine(le[0], le[1:], ed, 0, [], 1)\r
+\r
+# Associer les 8 sommets des petits arcs de cercle extérieurs\r
+# -----------------------------------------------------------\r
+\r
+for g, h in [ [0, 1], [1, 2] ]:\r
+  hexa = prisme.getHexa(h)\r
+  for vi in xrange(0, 4):\r
+    vm = hexa.getVertex(vi)\r
+    vg = g_vertices[ sommets[g][vi] ]\r
+    vm.setAssociation(vg)\r
+\r
+# Associer les 8 petits arcs de cercle extérieurs\r
+# -----------------------------------------------\r
+\r
+for g, h in [ [0, 0], [1, 2] ]:\r
+  hexa = prisme.getHexa(h)\r
+  for ei in xrange(0, 4):\r
+    em = hexa.getEdge(ei+8)\r
+    eg = g_edges[ arcs_pe[g][ei] ]\r
+    em.clearAssociation()\r
+    em.addAssociation(eg, 0, 1)\r
+\r
+# Associer 4 arcs nouveaux qui complétent les 4 grands arcs de cercle extérieurs\r
+# ------------------------------------------------------------------------------\r
+\r
+for h, ei, ech in [ [0, 0, 0.9], [0, 1, 0.9],  [2, 2, 0.85], [2, 3, 0.85] ]:\r
+  hexa = prisme.getHexa(h)\r
+  em = hexa.getEdge(ei)\r
+  va = em.getVertex(0).getAssociation()\r
+  vb = em.getVertex(1).getAssociation()\r
+  vax, vay, vaz = geompy.PointCoordinates(va)\r
+  vbx, vby, vbz = geompy.PointCoordinates(vb)\r
+  vmx = ( vax + vbx ) / 2.0 * ech\r
+  vmy = ( vay + vby ) / 2.0\r
+  vmz = ( vaz + vbz ) / 2.0\r
+  vm = geompy.MakeVertex(vmx, vmy, vmz)\r
+  eg = geompy.MakeArc(va, vm, vb)\r
+  em.clearAssociation()\r
+  em.addAssociation(eg, 0, 1)\r
+\r
+# Mailler le modèle de bloc\r
+# =========================\r
+\r
+# Définir 5 groupes de faces\r
+# --------------------------\r
+\r
+groupe_trou_p  = doc.addQuadGroup("Trou_petit")\r
+groupe_trou_g  = doc.addQuadGroup("Trou_grand")\r
+groupe_bas     = doc.addQuadGroup("Bas")\r
+groupe_haut    = doc.addQuadGroup("Haut")\r
+groupe_contour = doc.addQuadGroup("Contour")\r
+\r
+for i in xrange(4):\r
+  groupe_trou_p.addElement(grille_a.getQuadJK(0, i, 0))\r
+  groupe_trou_g.addElement(grille_b.getQuadJK(0, i, 0))\r
+\r
+  groupe_bas.addElement( grille_a.getQuadIJ(0, i, 0))\r
+  groupe_bas.addElement( grille_b.getQuadIJ(0, i, 0))\r
+  groupe_haut.addElement(grille_a.getQuadIJ(0, i, 1))\r
+  groupe_haut.addElement(grille_b.getQuadIJ(0, i, 1))\r
+\r
+for i in xrange(3):\r
+  groupe_contour.addElement(grille_a.getQuadJK(1, i, 0))\r
+\r
+for i in [0, 2, 3]:\r
+  groupe_contour.addElement(grille_b.getQuadJK(1, i, 0))\r
+\r
+for i in xrange(0, 3):\r
+  h = prisme.getHexa(i)\r
+\r
+  q = h.getQuad(2)\r
+  groupe_bas.addElement(q)\r
+\r
+  q = h.getQuad(3)\r
+  groupe_haut.addElement(q)\r
+\r
+  q = h.getQuad(4)\r
+  groupe_contour.addElement(q)\r
+  q = h.getQuad(5)\r
+  groupe_contour.addElement(q)\r
+\r
+# Définir 3 groupes de volumes\r
+# ----------------------------\r
+\r
+groupe_cyli_p = doc.addHexaGroup("Cylindre_petit")\r
+groupe_cyli_g = doc.addHexaGroup("Cylindre_grand")\r
+groupe_prisme = doc.addHexaGroup("Prisme")\r
+\r
+for i in xrange(4):\r
+  groupe_cyli_p.addElement(grille_a.getHexa(i))\r
+  groupe_cyli_g.addElement(grille_b.getHexa(i))\r
+\r
+for i in xrange(3):\r
+  groupe_prisme.addElement(prisme.getHexa(i))\r
+\r
+# Mailler le modèle de bloc avec association\r
+# ------------------------------------------\r
+\r
+l = doc.addLaw("Uniform1", 17)\r
+n = doc.countPropagation()\r
+\r
+for i in xrange(n):\r
+  p = doc.getPropagation(i)\r
+  p.setLaw(l)\r
+\r
+l = doc.addLaw("Uniform2", 40)\r
+p = doc.getPropagation(11)\r
+p.setLaw(l)\r
+\r
+blocs = hexablock.mesh(doc)\r
+\r
+print "nombre de sommets     du modèle de bloc: ", doc.countUsedVertex()\r
+print "nombre d'arêtes       du modèle de bloc: ", doc.countUsedEdge()\r
+print "nombre de quadrangles du modèle de bloc: ", doc.countUsedQuad()\r
+print "nombre de blocs       du modèle de bloc: ", doc.countUsedHexa()\r
+\r
+print "Nombre de noeuds      du maillage: ", blocs.NbNodes()\r
+print "Nombre de segments    du maillage: ", blocs.NbEdges()\r
+print "Nombre de quadrangles du maillage: ", blocs.NbQuadrangles()\r
+print "Nombre d'hexaèdres    du maillage: ", blocs.NbHexas()\r
diff --git a/src/TEST_PY/bride.py b/src/TEST_PY/bride.py
new file mode 100644 (file)
index 0000000..b3cb914
--- /dev/null
@@ -0,0 +1,410 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+k1 = 1
+
+OPT_QUAD_IK = 1
+OPT_FIRST = 2
+
+count = 1
+def save_schema(doc):
+    """
+    sauvegarde vtk du modele de bloc
+    """
+    global count
+    file_name = os.path.join(os.environ['TMP'], 'bride' + str(count) + '.vtk')
+    doc.saveVtk(file_name)
+    count += 1
+    pass
+
+def merge_quads(doc, quart, demi, ni1, nj1, ni2, nj2, option=0) :
+    """
+    fusion des quadrangles entre les 2 grilles cylindriques :
+    """
+
+    prems = False
+    if option == OPT_FIRST:
+        prems = True
+
+    quad_ik = False
+    if option == OPT_QUAD_IK:
+        quad_ik = True
+
+    orig = None
+    if quad_ik:
+        orig = grille_cyl_quart.getQuadIK(ni1, nj1, k1)
+    else:
+        orig = grille_cyl_quart.getQuadJK(ni1, nj1, k1)
+
+    dest = grille_cyl_demi.getQuadJK(ni2, nj2, k1)
+
+
+# JPL le 10/05/2011 :
+# closeQuads() n'est pas accessible en python
+# a priori fonctionne avec mergeQuads()
+##     if prems:
+    if True:
+        iq1 = 0
+        if quad_ik:
+            iq1 = 1
+        iq3 = 1 - iq1
+        v1 = dest.getVertex(iq1)
+        v3 = dest.getVertex(iq3)
+        
+        v2 = orig.getVertex(0)
+        v4 = orig.getVertex(1)
+
+        doc.mergeQuads(dest, orig, v1, v2, v3, v4)
+        pass
+    else:
+##         doc.closeQuads(dest, orig)
+        print "closeQuads() : not yet implemented"
+        pass
+
+    return None
+
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/bride.brep")
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("bride")
+
+#=============================
+# PARAMETRES
+#=============================
+
+height = 1.0
+
+# cylinder grid 1 :
+nr1 = 8
+na1 = 4
+nl1 = 5
+dr1 = 1.0
+da1 = 45.0  # angle
+dl1 = height
+
+# cylinder grid 2 :
+nr2 = 3
+na2 = 8
+nl2 = nl1
+dr2 = 0.5
+da2 = 180.0  # angle
+dl2 = dl1
+
+#=============================
+# Creation du modele de blocs
+#=============================
+
+# JPL (le 09/05/2011)
+# repris de test_bride_abu.cxx (version la plus a jour dans ~/IHMHEXA/Alain/models):
+# et de BRIDE.py (Karima) pour les "vraies" coordonn�es :
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+center1 = doc.addVertex(0, 0, height)
+center2 = doc.addVertex(6, 0, height)
+
+dx = doc.addVector(height, 0, 0)
+dz = doc.addVector(0, 0, height)
+
+# Creation des grilles cylindriques initiales
+#============================================
+
+# 1. 1 ere grille (quart) :
+#==========================
+
+# JPL (le 10/05/2011) : vu la geometrie, on ne remplit pas le centre :
+## grille_cyl_quart = doc.makeCylindrical(orig1, dx, dz, dr_q, 45.0, dl,
+##                                        nr_q, na_q, dim_z, True)
+grille_cyl_quart = doc.makeCylindrical(center1, dx, dz, dr1, da1, dl1,
+                                       nr1, na1, nl1, False)
+
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# Elagage  :
+for nk in range(2, nl1):
+    for nj in range(na1):
+        ideb = 2
+        if nk == nl1 - 1:
+            ideb = 1
+        for ni in range(ideb, nr1):
+            doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, nk))
+            pass
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# Semelle :
+k0 = 0
+for nj in range(na1):
+    for ni in range(2, nr1):
+        doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, k0))
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# @todo JPL : peut-on fusionner les edges du haut des hexaedres du haut du deuxieme
+# rang ? (cf. GEOM). Si oui revoir aussi l'association
+
+# 2. 2�me grille (demi) :
+#========================
+grille_cyl_demi = doc.makeCylindrical(center2, dx, dz, dr2, da2, dl2,
+                                      nr2, na2, nl2, True)
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+ni0 = [0, nr2, 2, 1, 0]  # en fonction de z (ie : nk) 
+for nk in range(0, nl2):
+    for nj in range(na2):  # elagage suivant toute la demi-circonference
+        for ni in range(ni0[nk], nr2):
+            doc.removeHexa(grille_cyl_demi.getHexaIJK(ni, nj, nk))            
+            pass
+        pass
+    pass
+
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# 3. creusement des fondations de demi dans quart :
+#==================================================
+for nj in range(2):
+    for ni in range(3, nr1 - 1):
+        doc.removeHexa(grille_cyl_quart.getHexaIJK(ni, nj, k1))
+        pass
+    pass
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+# 4. Fusion des bords :
+#======================
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 7, 0, nr2, 0, OPT_FIRST)
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 7, 1, nr2, 1)
+for ni1 in range(2, 6):
+    merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 8 - ni1, 2, nr2, ni1, OPT_QUAD_IK)
+    pass
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 3, 1, nr2, 6)
+merge_quads(doc, grille_cyl_quart, grille_cyl_demi, 3, 0, nr2, 7)
+
+# temporaire : sauvegarde du modele de blocs :
+save_schema(doc)
+# fin temporaire
+
+###########
+# Geometry
+###########
+
+bride_geom = geompy.ImportFile(BREP_PATH, "BREP")
+
+geompy.addToStudy(bride_geom, "bride_geom")
+
+
+# parametres de la geometrie :
+
+r1 = 12.0
+r1_t = 7.88
+r2 = 20.0
+r2_t = 2.0
+
+##############
+# Association
+##############
+
+# association vertex/points de la grille 1
+# (tous les vertex qui ne sont pas fusionnes avec ceux de la grille #
+# 2)
+
+dz_geom = geompy.MakeVectorDXDYDZ(0., 0., 1.)
+
+# les vertex du cylindre 1 sont crees de bas en haut, en tournant dans
+# le sens trigonometrique :
+
+# 6 vertex sont necessaires / axe z (pour associer aux 6 vertices du
+# modele) :
+
+z_val = [-1, 1.5, 21.5, 34, 46.5]  # nl1 + 1 valeurs
+for ni in range(nr1 + 1):
+    # suivant ni, valeurs des x pour les (nl1 + 1) points (selon l'axe z)
+    x = []
+    z = []
+    nb_z = 0  # nombre de points suivant l'axe z
+    if ni == 0:
+        z = z_val
+        x = [r1_t] * len(z)
+        pass
+    elif ni == 1:
+        z = z_val
+        x = [r1_t + 2.77] * len(z)
+        pass
+    elif ni == 2:
+        z = z_val[0:-1]  # tout sauf le dernier
+        x_last = r1_t + 2.77
+        x = [24.0, 24.0, 19.0, (19.0 - x_last)/2 + x_last, x_last]  # pour le 4 eme point, moyenne
+        # entre le 3 eme et le 5 eme
+        pass
+    elif ni == 3:
+        z = z_val[1:3]
+        x = [24.0, 19.0]
+        pass
+    elif ni == 4:
+        z = z_val[1:3]
+        x = [26.5, 21.0]  # a revoir pour le premier point ??
+        pass
+    elif ni == 8:
+        z = z_val[1:3]
+        x = [47.5] * 2
+        pass
+    else:  # ni = 5, 6, 7
+        z = z_val[1:3]
+        x = [26.5 + (47.5 - 26.5)/4*(ni - 4)] * 2
+        pass
+    pass
+
+    nb_z = len(z)
+
+    # creation des points pour y = 0 :
+    vert_grid1_xi = [geompy.MakeVertex(xi, 0, zi) for (xi, zi) in \
+                     zip(x, z)]
+
+    # les points suivants sont crees par rotation de PI/16 suivant
+    # l'axe z / aux precedents :
+    angle = math.pi/4.0/na1  # PI/4 (45 degres), divise par 4
+    for j in range(na1):
+        li = [geompy.MakeRotation(v, dz_geom, angle) for v in vert_grid1_xi[-nb_z:]]
+        vert_grid1_xi.extend(li)
+        pass
+
+    # ajout des points a l'etude et association :
+    # les vertex fusionnes ou correspondant a des hexaedres effaces ne
+    # sont pas pris en compte.
+    for nj in range(na1 + 1):
+        for nk in range(nb_z):
+            if (ni <= 2) or (3 <= ni <= 7 and nj >= na1 - 1) or \
+                   (ni == 8 and (nj == 0  or nj >= na1 - 1)):
+                v_mod = grille_cyl_quart.getVertexIJK(ni, nj, nk)
+                v_geo = vert_grid1_xi[nk + nj*nb_z]
+                geompy.addToStudy(v_geo, "vert_grid1_x" + str(ni) + "_y" + \
+                                  str(nj) + "_z" + str(nk))
+                v_mod.setAssociation(v_geo)
+                pass
+            pass
+        pass
+    
+    pass
+
+# association vertex/points de la grille 2
+# (tous les vertex qui ne sont pas fusionnes avec ceux de la grille #
+# 1)
+## dz_geom2 = geompy.MakeVectorDXDYDZ(33.5, 0., 1.)
+pt_a = geompy.MakeVertex(33.5, 0, 0)
+pt_b = geompy.MakeVertex(33.5, 0, 1.)
+dz_geom2 = geompy.MakeVector(pt_a, pt_b)
+
+# les vertex du cylindre 2 sont crees de bas en haut, en tournant dans
+# le sens trigonometrique :
+
+# REM : pour l'instant on met de cote la partie centrale du cylindre
+# (6 vertex selon z) => a faire a la fin. Ils sont d'ailleurs ranges
+# apres les autres dans le modele
+
+
+# 6 vertex sont necessaires / axe z (pour associer aux 6 vertices du
+# modele) :
+
+z_val = [-1, 1.5, 21.5, 24, 36, 41.5]  # nl2 + 1 valeurs
+for ni in range(nr2 + 1):
+    # suivant ni, valeurs des x pour les (nl1 + 1) points (selon l'axe z)
+    x = []
+    z = []
+    nb_z = 0  # nombre de points suivant l'axe z
+    if ni == 0:
+        z = z_val
+        x = [39.5] * len(z)
+        pass
+    elif ni == 1:
+        z = z_val[1:-1]  # tout sauf le dernier et le premier
+        x = [42.5] * len(z)
+        pass
+    elif ni == 2:
+        z = z_val[1:-2]  # tout sauf les 2 derniers et le premier
+        x = [46.] * len(z)
+        pass
+    elif ni == 3:
+        z = z_val[1:3]
+        x = [46.7] * len(z)  # valeur a revoir ??
+        pass
+    pass
+
+    nb_z = len(z)
+
+    # creation des points pour y = 0 :
+    vert_grid2_xi = [geompy.MakeVertex(xi, 0, zi) for (xi, zi) in \
+                     zip(x, z)]
+
+    # les points suivants sont crees par rotation de PI/16 suivant
+    # l'axe z / aux precedents :
+    angle = math.pi/na2  # PI (180 degres), divise par 8
+    for j in range(na2):
+        li = [geompy.MakeRotation(v, dz_geom2, angle) for v in vert_grid2_xi[-nb_z:]]
+        vert_grid2_xi.extend(li)
+        pass
+
+    # ajout des points a l'etude et association :
+    for nj in range(na2 + 1):
+        for nk in range(nb_z):
+            v_mod = grille_cyl_demi.getVertexIJK(ni, nj, nk)
+            v_geo = vert_grid2_xi[nk + nj*nb_z]
+            geompy.addToStudy(v_geo, "vert_grid2_x" + str(ni) + "_y" + \
+                              str(nj) + "_z" + str(nk))
+            v_mod.setAssociation(v_geo)
+            pass
+        pass
+
+    pass
+
+# association des vertex communs grille1/grille2
+# REM : cette etape n'est pas necessaire ? En effet, les vertex ayant
+# ete fusionnes, l'association a ete faite avec la grille 2
diff --git a/src/TEST_PY/crank.stp b/src/TEST_PY/crank.stp
new file mode 100755 (executable)
index 0000000..0aef5e4
--- /dev/null
@@ -0,0 +1,1178 @@
+ISO-10303-21;\r
+HEADER;\r
+ FILE_DESCRIPTION(('a Product shape'),'1');\r
+ FILE_NAME('Euclid  Shape Model','1998-12-23T10:04:46',('Author Name'),(\r
+    'MATRA-DATAVISION'),'OL-2.0D','EUCLID','Authorisation status');\r
+ FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));\r
+ENDSEC;\r
+DATA;\r
+#1 = PRODUCT_TYPE('part',$,(#2));\r
+#2 = PRODUCT('the product name','the product name','void',(#3));\r
+#3 = MECHANICAL_CONTEXT('Mechanical',#4,'Assembly');\r
+#4 = APPLICATION_CONTEXT('EUCLID');\r
+#5 = APPLICATION_PROTOCOL_DEFINITION('CommitteeDraft',\r
+  'automotive_design',1997,#4);\r
+#6 = SHAPE_DEFINITION_REPRESENTATION(#7,#11);\r
+#7 = PRODUCT_DEFINITION_SHAPE('void','void',#8);\r
+#8 = PRODUCT_DEFINITION('void','void',#9,#10);\r
+#9 = PRODUCT_DEFINITION_FORMATION('ID','void',#2);\r
+#10 = PRODUCT_DEFINITION_CONTEXT('as proposed',#4,'First_Design');\r
+#11 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#12),#866);\r
+#12 = MANIFOLD_SOLID_BREP('',#13);\r
+#13 = CLOSED_SHELL('',(#14,#338,#415,#466,#518,#566,#617,#668,#720,#747,\r
+    #798,#849));\r
+#14 = ADVANCED_FACE('',(#15,#270,#304),#30,.F.);\r
+#15 = FACE_BOUND('',#16,.T.);\r
+#16 = EDGE_LOOP('',(#17,#56,#88,#120,#148,#180,#212,#244));\r
+#17 = ORIENTED_EDGE('',*,*,#18,.T.);\r
+#18 = EDGE_CURVE('',#19,#21,#23,.T.);\r
+#19 = VERTEX_POINT('',#20);\r
+#20 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#21 = VERTEX_POINT('',#22);\r
+#22 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#23 = SURFACE_CURVE('',#24,(#29,#45),.PCURVE_S2.);\r
+#24 = CIRCLE('',#25,74.466478447737);\r
+#25 = AXIS2_PLACEMENT_3D('',#26,#27,#28);\r
+#26 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#27 = DIRECTION('',(0.,0.,1.));\r
+#28 = DIRECTION('',(1.,0.,0.));\r
+#29 = PCURVE('',#30,#35);\r
+#30 = PLANE('',#31);\r
+#31 = AXIS2_PLACEMENT_3D('',#32,#33,#34);\r
+#32 = CARTESIAN_POINT('',(0.,0.,-19.99999955296));\r
+#33 = DIRECTION('',(0.,0.,1.));\r
+#34 = DIRECTION('',(1.,0.,0.));\r
+#35 = DEFINITIONAL_REPRESENTATION('',(#36),#44);\r
+#36 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#37,#38,#39,#40,#41,#42,#43),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#37 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#38 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#39 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#40 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#41 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#42 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#43 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#44 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#45 = PCURVE('',#46,#51);\r
+#46 = CYLINDRICAL_SURFACE('',#47,74.466478447737);\r
+#47 = AXIS2_PLACEMENT_3D('',#48,#49,#50);\r
+#48 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#49 = DIRECTION('',(0.,0.,1.));\r
+#50 = DIRECTION('',(1.,0.,0.));\r
+#51 = DEFINITIONAL_REPRESENTATION('',(#52),#55);\r
+#52 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#53,#54),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#53 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#54 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#55 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#56 = ORIENTED_EDGE('',*,*,#57,.T.);\r
+#57 = EDGE_CURVE('',#21,#58,#60,.T.);\r
+#58 = VERTEX_POINT('',#59);\r
+#59 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#60 = SURFACE_CURVE('',#61,(#66,#77),.PCURVE_S2.);\r
+#61 = CIRCLE('',#62,44.68116165083);\r
+#62 = AXIS2_PLACEMENT_3D('',#63,#64,#65);\r
+#63 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#64 = DIRECTION('',(0.,0.,-1.));\r
+#65 = DIRECTION('',(1.,0.,0.));\r
+#66 = PCURVE('',#30,#67);\r
+#67 = DEFINITIONAL_REPRESENTATION('',(#68),#76);\r
+#68 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#69,#70,#71,#72,#73,#74,#75),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#69 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#70 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#71 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#72 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#73 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#74 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#75 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#76 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#77 = PCURVE('',#78,#83);\r
+#78 = CYLINDRICAL_SURFACE('',#79,44.68116165083);\r
+#79 = AXIS2_PLACEMENT_3D('',#80,#81,#82);\r
+#80 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#81 = DIRECTION('',(0.,0.,-1.));\r
+#82 = DIRECTION('',(1.,0.,0.));\r
+#83 = DEFINITIONAL_REPRESENTATION('',(#84),#87);\r
+#84 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#85,#86),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#85 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#86 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#87 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#88 = ORIENTED_EDGE('',*,*,#89,.T.);\r
+#89 = EDGE_CURVE('',#58,#90,#92,.T.);\r
+#90 = VERTEX_POINT('',#91);\r
+#91 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#92 = SURFACE_CURVE('',#93,(#98,#109),.PCURVE_S2.);\r
+#93 = CIRCLE('',#94,84.24770250966);\r
+#94 = AXIS2_PLACEMENT_3D('',#95,#96,#97);\r
+#95 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#96 = DIRECTION('',(0.,0.,1.));\r
+#97 = DIRECTION('',(1.,0.,0.));\r
+#98 = PCURVE('',#30,#99);\r
+#99 = DEFINITIONAL_REPRESENTATION('',(#100),#108);\r
+#100 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#101,#102,#103,#104,#105,#106\r
+,#107),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#101 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#102 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#103 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#104 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#105 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#106 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#107 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#108 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#109 = PCURVE('',#110,#115);\r
+#110 = CYLINDRICAL_SURFACE('',#111,84.24770250966);\r
+#111 = AXIS2_PLACEMENT_3D('',#112,#113,#114);\r
+#112 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#113 = DIRECTION('',(0.,0.,1.));\r
+#114 = DIRECTION('',(1.,0.,0.));\r
+#115 = DEFINITIONAL_REPRESENTATION('',(#116),#119);\r
+#116 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#117,#118),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#117 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#118 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#119 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#120 = ORIENTED_EDGE('',*,*,#121,.T.);\r
+#121 = EDGE_CURVE('',#90,#122,#124,.T.);\r
+#122 = VERTEX_POINT('',#123);\r
+#123 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#124 = SURFACE_CURVE('',#125,(#129,#136),.PCURVE_S2.);\r
+#125 = LINE('',#126,#127);\r
+#126 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#127 = VECTOR('',#128,1.);\r
+#128 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#129 = PCURVE('',#30,#130);\r
+#130 = DEFINITIONAL_REPRESENTATION('',(#131),#135);\r
+#131 = LINE('',#132,#133);\r
+#132 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#133 = VECTOR('',#134,1.);\r
+#134 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#135 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#136 = PCURVE('',#137,#142);\r
+#137 = PLANE('',#138);\r
+#138 = AXIS2_PLACEMENT_3D('',#139,#140,#141);\r
+#139 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#140 = DIRECTION('',(-6.935351515554E-02,-0.997592146088,0.));\r
+#141 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#142 = DEFINITIONAL_REPRESENTATION('',(#143),#147);\r
+#143 = LINE('',#144,#145);\r
+#144 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#145 = VECTOR('',#146,1.);\r
+#146 = DIRECTION('',(1.,0.));\r
+#147 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#148 = ORIENTED_EDGE('',*,*,#149,.T.);\r
+#149 = EDGE_CURVE('',#122,#150,#152,.T.);\r
+#150 = VERTEX_POINT('',#151);\r
+#151 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#152 = SURFACE_CURVE('',#153,(#158,#169),.PCURVE_S2.);\r
+#153 = CIRCLE('',#154,24.565238684828);\r
+#154 = AXIS2_PLACEMENT_3D('',#155,#156,#157);\r
+#155 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#156 = DIRECTION('',(0.,0.,1.));\r
+#157 = DIRECTION('',(1.,0.,0.));\r
+#158 = PCURVE('',#30,#159);\r
+#159 = DEFINITIONAL_REPRESENTATION('',(#160),#168);\r
+#160 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#161,#162,#163,#164,#165,#166\r
+,#167),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#161 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#162 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#163 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#164 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#165 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#166 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#167 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#168 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#169 = PCURVE('',#170,#175);\r
+#170 = CYLINDRICAL_SURFACE('',#171,24.565238684828);\r
+#171 = AXIS2_PLACEMENT_3D('',#172,#173,#174);\r
+#172 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#173 = DIRECTION('',(0.,0.,1.));\r
+#174 = DIRECTION('',(1.,0.,0.));\r
+#175 = DEFINITIONAL_REPRESENTATION('',(#176),#179);\r
+#176 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#177,#178),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#177 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#178 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#179 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#180 = ORIENTED_EDGE('',*,*,#181,.T.);\r
+#181 = EDGE_CURVE('',#150,#182,#184,.T.);\r
+#182 = VERTEX_POINT('',#183);\r
+#183 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#184 = SURFACE_CURVE('',#185,(#190,#201),.PCURVE_S2.);\r
+#185 = CIRCLE('',#186,29.778387016109);\r
+#186 = AXIS2_PLACEMENT_3D('',#187,#188,#189);\r
+#187 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#188 = DIRECTION('',(0.,0.,-1.));\r
+#189 = DIRECTION('',(1.,0.,0.));\r
+#190 = PCURVE('',#30,#191);\r
+#191 = DEFINITIONAL_REPRESENTATION('',(#192),#200);\r
+#192 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#193,#194,#195,#196,#197,#198\r
+,#199),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#193 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#194 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#195 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#196 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#197 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#198 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#199 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#200 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#201 = PCURVE('',#202,#207);\r
+#202 = CYLINDRICAL_SURFACE('',#203,29.778387016109);\r
+#203 = AXIS2_PLACEMENT_3D('',#204,#205,#206);\r
+#204 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#205 = DIRECTION('',(0.,0.,-1.));\r
+#206 = DIRECTION('',(1.,0.,0.));\r
+#207 = DEFINITIONAL_REPRESENTATION('',(#208),#211);\r
+#208 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#209,#210),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#209 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#210 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#211 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#212 = ORIENTED_EDGE('',*,*,#213,.T.);\r
+#213 = EDGE_CURVE('',#182,#214,#216,.T.);\r
+#214 = VERTEX_POINT('',#215);\r
+#215 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#216 = SURFACE_CURVE('',#217,(#222,#233),.PCURVE_S2.);\r
+#217 = CIRCLE('',#218,20.41914254867);\r
+#218 = AXIS2_PLACEMENT_3D('',#219,#220,#221);\r
+#219 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#220 = DIRECTION('',(0.,0.,1.));\r
+#221 = DIRECTION('',(1.,0.,0.));\r
+#222 = PCURVE('',#30,#223);\r
+#223 = DEFINITIONAL_REPRESENTATION('',(#224),#232);\r
+#224 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#225,#226,#227,#228,#229,#230\r
+,#231),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#225 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#226 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#227 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#228 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#229 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#230 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#231 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#232 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#233 = PCURVE('',#234,#239);\r
+#234 = CYLINDRICAL_SURFACE('',#235,20.41914254867);\r
+#235 = AXIS2_PLACEMENT_3D('',#236,#237,#238);\r
+#236 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#237 = DIRECTION('',(0.,0.,1.));\r
+#238 = DIRECTION('',(1.,0.,0.));\r
+#239 = DEFINITIONAL_REPRESENTATION('',(#240),#243);\r
+#240 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#241,#242),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#241 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#242 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#243 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#244 = ORIENTED_EDGE('',*,*,#245,.T.);\r
+#245 = EDGE_CURVE('',#214,#19,#246,.T.);\r
+#246 = SURFACE_CURVE('',#247,(#251,#258),.PCURVE_S2.);\r
+#247 = LINE('',#248,#249);\r
+#248 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#249 = VECTOR('',#250,1.);\r
+#250 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#251 = PCURVE('',#30,#252);\r
+#252 = DEFINITIONAL_REPRESENTATION('',(#253),#257);\r
+#253 = LINE('',#254,#255);\r
+#254 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#255 = VECTOR('',#256,1.);\r
+#256 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#257 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#258 = PCURVE('',#259,#264);\r
+#259 = PLANE('',#260);\r
+#260 = AXIS2_PLACEMENT_3D('',#261,#262,#263);\r
+#261 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#262 = DIRECTION('',(-7.581640296081E-02,0.997121794488,0.));\r
+#263 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#264 = DEFINITIONAL_REPRESENTATION('',(#265),#269);\r
+#265 = LINE('',#266,#267);\r
+#266 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#267 = VECTOR('',#268,1.);\r
+#268 = DIRECTION('',(1.,0.));\r
+#269 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#270 = FACE_BOUND('',#271,.F.);\r
+#271 = EDGE_LOOP('',(#272));\r
+#272 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#273 = EDGE_CURVE('',#274,#274,#276,.T.);\r
+#274 = VERTEX_POINT('',#275);\r
+#275 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -19.99999955296));\r
+#276 = SURFACE_CURVE('',#277,(#282,#293),.PCURVE_S2.);\r
+#277 = CIRCLE('',#278,15.057678156153);\r
+#278 = AXIS2_PLACEMENT_3D('',#279,#280,#281);\r
+#279 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -19.99999955296));\r
+#280 = DIRECTION('',(0.,0.,-1.));\r
+#281 = DIRECTION('',(0.,1.,0.));\r
+#282 = PCURVE('',#30,#283);\r
+#283 = DEFINITIONAL_REPRESENTATION('',(#284),#292);\r
+#284 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#285,#286,#287,#288,#289,#290\r
+,#291),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#285 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#286 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#287 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#288 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#289 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#290 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#291 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#292 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#293 = PCURVE('',#294,#299);\r
+#294 = CYLINDRICAL_SURFACE('',#295,15.057678156153);\r
+#295 = AXIS2_PLACEMENT_3D('',#296,#297,#298);\r
+#296 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -40.00019910593));\r
+#297 = DIRECTION('',(0.,0.,1.));\r
+#298 = DIRECTION('',(1.,0.,0.));\r
+#299 = DEFINITIONAL_REPRESENTATION('',(#300),#303);\r
+#300 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#301,#302),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#301 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#302 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#303 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#304 = FACE_BOUND('',#305,.F.);\r
+#305 = EDGE_LOOP('',(#306));\r
+#306 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#307 = EDGE_CURVE('',#308,#308,#310,.T.);\r
+#308 = VERTEX_POINT('',#309);\r
+#309 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -19.99999955296));\r
+#310 = SURFACE_CURVE('',#311,(#316,#327),.PCURVE_S2.);\r
+#311 = CIRCLE('',#312,23.40416683412);\r
+#312 = AXIS2_PLACEMENT_3D('',#313,#314,#315);\r
+#313 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -19.99999955296));\r
+#314 = DIRECTION('',(0.,0.,-1.));\r
+#315 = DIRECTION('',(0.,1.,0.));\r
+#316 = PCURVE('',#30,#317);\r
+#317 = DEFINITIONAL_REPRESENTATION('',(#318),#326);\r
+#318 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#319,#320,#321,#322,#323,#324\r
+,#325),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#319 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#320 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#321 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#322 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#323 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#324 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#325 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#326 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#327 = PCURVE('',#328,#333);\r
+#328 = CYLINDRICAL_SURFACE('',#329,23.40416683412);\r
+#329 = AXIS2_PLACEMENT_3D('',#330,#331,#332);\r
+#330 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -40.00019910593));\r
+#331 = DIRECTION('',(0.,0.,1.));\r
+#332 = DIRECTION('',(1.,0.,0.));\r
+#333 = DEFINITIONAL_REPRESENTATION('',(#334),#337);\r
+#334 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#335,#336),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#335 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#336 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#337 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#338 = ADVANCED_FACE('',(#339),#46,.F.);\r
+#339 = FACE_BOUND('',#340,.T.);\r
+#340 = EDGE_LOOP('',(#341,#363,#395,#414));\r
+#341 = ORIENTED_EDGE('',*,*,#342,.T.);\r
+#342 = EDGE_CURVE('',#19,#343,#345,.T.);\r
+#343 = VERTEX_POINT('',#344);\r
+#344 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    19.999999552965));\r
+#345 = SURFACE_CURVE('',#346,(#350,#356),.PCURVE_S2.);\r
+#346 = LINE('',#347,#348);\r
+#347 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#348 = VECTOR('',#349,1.);\r
+#349 = DIRECTION('',(0.,0.,1.));\r
+#350 = PCURVE('',#46,#351);\r
+#351 = DEFINITIONAL_REPRESENTATION('',(#352),#355);\r
+#352 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#353,#354),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#353 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#354 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#355 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#356 = PCURVE('',#259,#357);\r
+#357 = DEFINITIONAL_REPRESENTATION('',(#358),#362);\r
+#358 = LINE('',#359,#360);\r
+#359 = CARTESIAN_POINT('',(136.42439686482,0.));\r
+#360 = VECTOR('',#361,1.);\r
+#361 = DIRECTION('',(0.,-1.));\r
+#362 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#363 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#364 = EDGE_CURVE('',#343,#365,#367,.T.);\r
+#365 = VERTEX_POINT('',#366);\r
+#366 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    19.999999552965));\r
+#367 = SURFACE_CURVE('',#368,(#373,#379),.PCURVE_S2.);\r
+#368 = CIRCLE('',#369,74.466478447737);\r
+#369 = AXIS2_PLACEMENT_3D('',#370,#371,#372);\r
+#370 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    19.999999552965));\r
+#371 = DIRECTION('',(0.,0.,1.));\r
+#372 = DIRECTION('',(1.,0.,0.));\r
+#373 = PCURVE('',#46,#374);\r
+#374 = DEFINITIONAL_REPRESENTATION('',(#375),#378);\r
+#375 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#376,#377),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#376 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#377 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#378 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#379 = PCURVE('',#380,#385);\r
+#380 = PLANE('',#381);\r
+#381 = AXIS2_PLACEMENT_3D('',#382,#383,#384);\r
+#382 = CARTESIAN_POINT('',(0.,0.,19.999999552965));\r
+#383 = DIRECTION('',(0.,0.,1.));\r
+#384 = DIRECTION('',(1.,0.,0.));\r
+#385 = DEFINITIONAL_REPRESENTATION('',(#386),#394);\r
+#386 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#387,#388,#389,#390,#391,#392\r
+,#393),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#387 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#388 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#389 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#390 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#391 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#392 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#393 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#394 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#395 = ORIENTED_EDGE('',*,*,#396,.F.);\r
+#396 = EDGE_CURVE('',#21,#365,#397,.T.);\r
+#397 = SURFACE_CURVE('',#398,(#402,#408),.PCURVE_S2.);\r
+#398 = LINE('',#399,#400);\r
+#399 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#400 = VECTOR('',#401,1.);\r
+#401 = DIRECTION('',(0.,0.,1.));\r
+#402 = PCURVE('',#46,#403);\r
+#403 = DEFINITIONAL_REPRESENTATION('',(#404),#407);\r
+#404 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#405,#406),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#405 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#406 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#407 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#408 = PCURVE('',#78,#409);\r
+#409 = DEFINITIONAL_REPRESENTATION('',(#410),#413);\r
+#410 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#411,#412),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#411 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#412 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#413 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#414 = ORIENTED_EDGE('',*,*,#18,.F.);\r
+#415 = ADVANCED_FACE('',(#416),#78,.T.);\r
+#416 = FACE_BOUND('',#417,.T.);\r
+#417 = EDGE_LOOP('',(#418,#419,#446,#465));\r
+#418 = ORIENTED_EDGE('',*,*,#396,.T.);\r
+#419 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#420 = EDGE_CURVE('',#365,#421,#423,.T.);\r
+#421 = VERTEX_POINT('',#422);\r
+#422 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    19.999999552965));\r
+#423 = SURFACE_CURVE('',#424,(#429,#435),.PCURVE_S2.);\r
+#424 = CIRCLE('',#425,44.68116165083);\r
+#425 = AXIS2_PLACEMENT_3D('',#426,#427,#428);\r
+#426 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,\r
+    19.999999552965));\r
+#427 = DIRECTION('',(0.,0.,-1.));\r
+#428 = DIRECTION('',(1.,0.,0.));\r
+#429 = PCURVE('',#78,#430);\r
+#430 = DEFINITIONAL_REPRESENTATION('',(#431),#434);\r
+#431 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#432,#433),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#432 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#433 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#434 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#435 = PCURVE('',#380,#436);\r
+#436 = DEFINITIONAL_REPRESENTATION('',(#437),#445);\r
+#437 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#438,#439,#440,#441,#442,#443\r
+,#444),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#438 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#439 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#440 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#441 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#442 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#443 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#444 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#445 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#446 = ORIENTED_EDGE('',*,*,#447,.F.);\r
+#447 = EDGE_CURVE('',#58,#421,#448,.T.);\r
+#448 = SURFACE_CURVE('',#449,(#453,#459),.PCURVE_S2.);\r
+#449 = LINE('',#450,#451);\r
+#450 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#451 = VECTOR('',#452,1.);\r
+#452 = DIRECTION('',(0.,0.,1.));\r
+#453 = PCURVE('',#78,#454);\r
+#454 = DEFINITIONAL_REPRESENTATION('',(#455),#458);\r
+#455 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#456,#457),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#456 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#457 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#458 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#459 = PCURVE('',#110,#460);\r
+#460 = DEFINITIONAL_REPRESENTATION('',(#461),#464);\r
+#461 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#462,#463),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#462 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#463 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#464 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#465 = ORIENTED_EDGE('',*,*,#57,.F.);\r
+#466 = ADVANCED_FACE('',(#467),#110,.F.);\r
+#467 = FACE_BOUND('',#468,.T.);\r
+#468 = EDGE_LOOP('',(#469,#470,#497,#517));\r
+#469 = ORIENTED_EDGE('',*,*,#447,.T.);\r
+#470 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#471 = EDGE_CURVE('',#421,#472,#474,.T.);\r
+#472 = VERTEX_POINT('',#473);\r
+#473 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#474 = SURFACE_CURVE('',#475,(#480,#486),.PCURVE_S2.);\r
+#475 = CIRCLE('',#476,84.24770250966);\r
+#476 = AXIS2_PLACEMENT_3D('',#477,#478,#479);\r
+#477 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    19.999999552965));\r
+#478 = DIRECTION('',(0.,0.,1.));\r
+#479 = DIRECTION('',(1.,0.,0.));\r
+#480 = PCURVE('',#110,#481);\r
+#481 = DEFINITIONAL_REPRESENTATION('',(#482),#485);\r
+#482 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#483,#484),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#483 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#484 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#485 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#486 = PCURVE('',#380,#487);\r
+#487 = DEFINITIONAL_REPRESENTATION('',(#488),#496);\r
+#488 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#489,#490,#491,#492,#493,#494\r
+,#495),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#489 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#490 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#491 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#492 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#493 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#494 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#495 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#496 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#497 = ORIENTED_EDGE('',*,*,#498,.F.);\r
+#498 = EDGE_CURVE('',#90,#472,#499,.T.);\r
+#499 = SURFACE_CURVE('',#500,(#504,#510),.PCURVE_S2.);\r
+#500 = LINE('',#501,#502);\r
+#501 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#502 = VECTOR('',#503,1.);\r
+#503 = DIRECTION('',(0.,0.,1.));\r
+#504 = PCURVE('',#110,#505);\r
+#505 = DEFINITIONAL_REPRESENTATION('',(#506),#509);\r
+#506 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#507,#508),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#507 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#508 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#509 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#510 = PCURVE('',#137,#511);\r
+#511 = DEFINITIONAL_REPRESENTATION('',(#512),#516);\r
+#512 = LINE('',#513,#514);\r
+#513 = CARTESIAN_POINT('',(0.,0.));\r
+#514 = VECTOR('',#515,1.);\r
+#515 = DIRECTION('',(0.,-1.));\r
+#516 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#517 = ORIENTED_EDGE('',*,*,#89,.F.);\r
+#518 = ADVANCED_FACE('',(#519),#137,.T.);\r
+#519 = FACE_BOUND('',#520,.T.);\r
+#520 = EDGE_LOOP('',(#521,#522,#545,#565));\r
+#521 = ORIENTED_EDGE('',*,*,#498,.T.);\r
+#522 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#523 = EDGE_CURVE('',#472,#524,#526,.T.);\r
+#524 = VERTEX_POINT('',#525);\r
+#525 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    19.999999552965));\r
+#526 = SURFACE_CURVE('',#527,(#531,#538),.PCURVE_S2.);\r
+#527 = LINE('',#528,#529);\r
+#528 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#529 = VECTOR('',#530,1.);\r
+#530 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#531 = PCURVE('',#137,#532);\r
+#532 = DEFINITIONAL_REPRESENTATION('',(#533),#537);\r
+#533 = LINE('',#534,#535);\r
+#534 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#535 = VECTOR('',#536,1.);\r
+#536 = DIRECTION('',(1.,0.));\r
+#537 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#538 = PCURVE('',#380,#539);\r
+#539 = DEFINITIONAL_REPRESENTATION('',(#540),#544);\r
+#540 = LINE('',#541,#542);\r
+#541 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#542 = VECTOR('',#543,1.);\r
+#543 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#544 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#545 = ORIENTED_EDGE('',*,*,#546,.F.);\r
+#546 = EDGE_CURVE('',#122,#524,#547,.T.);\r
+#547 = SURFACE_CURVE('',#548,(#552,#559),.PCURVE_S2.);\r
+#548 = LINE('',#549,#550);\r
+#549 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#550 = VECTOR('',#551,1.);\r
+#551 = DIRECTION('',(0.,0.,1.));\r
+#552 = PCURVE('',#137,#553);\r
+#553 = DEFINITIONAL_REPRESENTATION('',(#554),#558);\r
+#554 = LINE('',#555,#556);\r
+#555 = CARTESIAN_POINT('',(131.87890374807,0.));\r
+#556 = VECTOR('',#557,1.);\r
+#557 = DIRECTION('',(0.,-1.));\r
+#558 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#559 = PCURVE('',#170,#560);\r
+#560 = DEFINITIONAL_REPRESENTATION('',(#561),#564);\r
+#561 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#562,#563),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#562 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#563 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#564 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#565 = ORIENTED_EDGE('',*,*,#121,.F.);\r
+#566 = ADVANCED_FACE('',(#567),#170,.F.);\r
+#567 = FACE_BOUND('',#568,.T.);\r
+#568 = EDGE_LOOP('',(#569,#570,#597,#616));\r
+#569 = ORIENTED_EDGE('',*,*,#546,.T.);\r
+#570 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#571 = EDGE_CURVE('',#524,#572,#574,.T.);\r
+#572 = VERTEX_POINT('',#573);\r
+#573 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    19.999999552965));\r
+#574 = SURFACE_CURVE('',#575,(#580,#586),.PCURVE_S2.);\r
+#575 = CIRCLE('',#576,24.565238684828);\r
+#576 = AXIS2_PLACEMENT_3D('',#577,#578,#579);\r
+#577 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    19.999999552965));\r
+#578 = DIRECTION('',(0.,0.,1.));\r
+#579 = DIRECTION('',(1.,0.,0.));\r
+#580 = PCURVE('',#170,#581);\r
+#581 = DEFINITIONAL_REPRESENTATION('',(#582),#585);\r
+#582 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#583,#584),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#583 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#584 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#585 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#586 = PCURVE('',#380,#587);\r
+#587 = DEFINITIONAL_REPRESENTATION('',(#588),#596);\r
+#588 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#589,#590,#591,#592,#593,#594\r
+,#595),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#589 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#590 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#591 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#592 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#593 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#594 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#595 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#596 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#597 = ORIENTED_EDGE('',*,*,#598,.F.);\r
+#598 = EDGE_CURVE('',#150,#572,#599,.T.);\r
+#599 = SURFACE_CURVE('',#600,(#604,#610),.PCURVE_S2.);\r
+#600 = LINE('',#601,#602);\r
+#601 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#602 = VECTOR('',#603,1.);\r
+#603 = DIRECTION('',(0.,0.,1.));\r
+#604 = PCURVE('',#170,#605);\r
+#605 = DEFINITIONAL_REPRESENTATION('',(#606),#609);\r
+#606 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#607,#608),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#607 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#608 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#609 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#610 = PCURVE('',#202,#611);\r
+#611 = DEFINITIONAL_REPRESENTATION('',(#612),#615);\r
+#612 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#613,#614),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#613 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#614 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#615 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#616 = ORIENTED_EDGE('',*,*,#149,.F.);\r
+#617 = ADVANCED_FACE('',(#618),#202,.T.);\r
+#618 = FACE_BOUND('',#619,.T.);\r
+#619 = EDGE_LOOP('',(#620,#621,#648,#667));\r
+#620 = ORIENTED_EDGE('',*,*,#598,.T.);\r
+#621 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#622 = EDGE_CURVE('',#572,#623,#625,.T.);\r
+#623 = VERTEX_POINT('',#624);\r
+#624 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    19.999999552965));\r
+#625 = SURFACE_CURVE('',#626,(#631,#637),.PCURVE_S2.);\r
+#626 = CIRCLE('',#627,29.778387016109);\r
+#627 = AXIS2_PLACEMENT_3D('',#628,#629,#630);\r
+#628 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    19.999999552965));\r
+#629 = DIRECTION('',(0.,0.,-1.));\r
+#630 = DIRECTION('',(1.,0.,0.));\r
+#631 = PCURVE('',#202,#632);\r
+#632 = DEFINITIONAL_REPRESENTATION('',(#633),#636);\r
+#633 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#634,#635),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#634 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#635 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#636 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#637 = PCURVE('',#380,#638);\r
+#638 = DEFINITIONAL_REPRESENTATION('',(#639),#647);\r
+#639 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#640,#641,#642,#643,#644,#645\r
+,#646),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#640 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#641 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#642 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#643 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#644 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#645 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#646 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#647 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#648 = ORIENTED_EDGE('',*,*,#649,.F.);\r
+#649 = EDGE_CURVE('',#182,#623,#650,.T.);\r
+#650 = SURFACE_CURVE('',#651,(#655,#661),.PCURVE_S2.);\r
+#651 = LINE('',#652,#653);\r
+#652 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#653 = VECTOR('',#654,1.);\r
+#654 = DIRECTION('',(0.,0.,1.));\r
+#655 = PCURVE('',#202,#656);\r
+#656 = DEFINITIONAL_REPRESENTATION('',(#657),#660);\r
+#657 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#658,#659),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#658 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#659 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#660 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#661 = PCURVE('',#234,#662);\r
+#662 = DEFINITIONAL_REPRESENTATION('',(#663),#666);\r
+#663 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#664,#665),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#664 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#665 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#666 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#667 = ORIENTED_EDGE('',*,*,#181,.F.);\r
+#668 = ADVANCED_FACE('',(#669),#234,.F.);\r
+#669 = FACE_BOUND('',#670,.T.);\r
+#670 = EDGE_LOOP('',(#671,#672,#699,#719));\r
+#671 = ORIENTED_EDGE('',*,*,#649,.T.);\r
+#672 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#673 = EDGE_CURVE('',#623,#674,#676,.T.);\r
+#674 = VERTEX_POINT('',#675);\r
+#675 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#676 = SURFACE_CURVE('',#677,(#682,#688),.PCURVE_S2.);\r
+#677 = CIRCLE('',#678,20.41914254867);\r
+#678 = AXIS2_PLACEMENT_3D('',#679,#680,#681);\r
+#679 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    19.999999552965));\r
+#680 = DIRECTION('',(0.,0.,1.));\r
+#681 = DIRECTION('',(1.,0.,0.));\r
+#682 = PCURVE('',#234,#683);\r
+#683 = DEFINITIONAL_REPRESENTATION('',(#684),#687);\r
+#684 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#685,#686),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#685 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#686 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#687 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#688 = PCURVE('',#380,#689);\r
+#689 = DEFINITIONAL_REPRESENTATION('',(#690),#698);\r
+#690 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#691,#692,#693,#694,#695,#696\r
+,#697),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#691 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#692 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#693 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#694 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#695 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#696 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#697 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#698 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#699 = ORIENTED_EDGE('',*,*,#700,.F.);\r
+#700 = EDGE_CURVE('',#214,#674,#701,.T.);\r
+#701 = SURFACE_CURVE('',#702,(#706,#712),.PCURVE_S2.);\r
+#702 = LINE('',#703,#704);\r
+#703 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#704 = VECTOR('',#705,1.);\r
+#705 = DIRECTION('',(0.,0.,1.));\r
+#706 = PCURVE('',#234,#707);\r
+#707 = DEFINITIONAL_REPRESENTATION('',(#708),#711);\r
+#708 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#709,#710),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#709 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#710 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#711 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#712 = PCURVE('',#259,#713);\r
+#713 = DEFINITIONAL_REPRESENTATION('',(#714),#718);\r
+#714 = LINE('',#715,#716);\r
+#715 = CARTESIAN_POINT('',(0.,0.));\r
+#716 = VECTOR('',#717,1.);\r
+#717 = DIRECTION('',(0.,-1.));\r
+#718 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#719 = ORIENTED_EDGE('',*,*,#213,.F.);\r
+#720 = ADVANCED_FACE('',(#721),#259,.T.);\r
+#721 = FACE_BOUND('',#722,.T.);\r
+#722 = EDGE_LOOP('',(#723,#724,#745,#746));\r
+#723 = ORIENTED_EDGE('',*,*,#700,.T.);\r
+#724 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#725 = EDGE_CURVE('',#674,#343,#726,.T.);\r
+#726 = SURFACE_CURVE('',#727,(#731,#738),.PCURVE_S2.);\r
+#727 = LINE('',#728,#729);\r
+#728 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#729 = VECTOR('',#730,1.);\r
+#730 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#731 = PCURVE('',#259,#732);\r
+#732 = DEFINITIONAL_REPRESENTATION('',(#733),#737);\r
+#733 = LINE('',#734,#735);\r
+#734 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#735 = VECTOR('',#736,1.);\r
+#736 = DIRECTION('',(1.,0.));\r
+#737 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#738 = PCURVE('',#380,#739);\r
+#739 = DEFINITIONAL_REPRESENTATION('',(#740),#744);\r
+#740 = LINE('',#741,#742);\r
+#741 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#742 = VECTOR('',#743,1.);\r
+#743 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#744 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#745 = ORIENTED_EDGE('',*,*,#342,.F.);\r
+#746 = ORIENTED_EDGE('',*,*,#245,.F.);\r
+#747 = ADVANCED_FACE('',(#748),#294,.F.);\r
+#748 = FACE_BOUND('',#749,.T.);\r
+#749 = EDGE_LOOP('',(#750,#771,#796,#797));\r
+#750 = ORIENTED_EDGE('',*,*,#751,.T.);\r
+#751 = EDGE_CURVE('',#274,#752,#754,.T.);\r
+#752 = VERTEX_POINT('',#753);\r
+#753 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    19.999999552965));\r
+#754 = SEAM_CURVE('',#755,(#759,#765),.PCURVE_S2.);\r
+#755 = LINE('',#756,#757);\r
+#756 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -40.00019910593));\r
+#757 = VECTOR('',#758,1.);\r
+#758 = DIRECTION('',(0.,0.,1.));\r
+#759 = PCURVE('',#294,#760);\r
+#760 = DEFINITIONAL_REPRESENTATION('',(#761),#764);\r
+#761 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#762,#763),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#762 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#763 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#764 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#765 = PCURVE('',#294,#766);\r
+#766 = DEFINITIONAL_REPRESENTATION('',(#767),#770);\r
+#767 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#768,#769),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#768 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#769 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#770 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#771 = ORIENTED_EDGE('',*,*,#772,.F.);\r
+#772 = EDGE_CURVE('',#752,#752,#773,.T.);\r
+#773 = SURFACE_CURVE('',#774,(#779,#785),.PCURVE_S2.);\r
+#774 = CIRCLE('',#775,15.057678156153);\r
+#775 = AXIS2_PLACEMENT_3D('',#776,#777,#778);\r
+#776 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    19.999999552965));\r
+#777 = DIRECTION('',(0.,0.,-1.));\r
+#778 = DIRECTION('',(0.,1.,0.));\r
+#779 = PCURVE('',#294,#780);\r
+#780 = DEFINITIONAL_REPRESENTATION('',(#781),#784);\r
+#781 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#782,#783),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#782 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#783 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#784 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#785 = PCURVE('',#380,#786);\r
+#786 = DEFINITIONAL_REPRESENTATION('',(#787),#795);\r
+#787 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#788,#789,#790,#791,#792,#793\r
+,#794),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#788 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#789 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#790 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#791 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#792 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#793 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#794 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#795 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#796 = ORIENTED_EDGE('',*,*,#751,.F.);\r
+#797 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#798 = ADVANCED_FACE('',(#799),#328,.F.);\r
+#799 = FACE_BOUND('',#800,.T.);\r
+#800 = EDGE_LOOP('',(#801,#822,#847,#848));\r
+#801 = ORIENTED_EDGE('',*,*,#802,.T.);\r
+#802 = EDGE_CURVE('',#308,#803,#805,.T.);\r
+#803 = VERTEX_POINT('',#804);\r
+#804 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    19.999999552965));\r
+#805 = SEAM_CURVE('',#806,(#810,#816),.PCURVE_S2.);\r
+#806 = LINE('',#807,#808);\r
+#807 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -40.00019910593));\r
+#808 = VECTOR('',#809,1.);\r
+#809 = DIRECTION('',(0.,0.,1.));\r
+#810 = PCURVE('',#328,#811);\r
+#811 = DEFINITIONAL_REPRESENTATION('',(#812),#815);\r
+#812 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#813,#814),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#813 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#814 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#815 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#816 = PCURVE('',#328,#817);\r
+#817 = DEFINITIONAL_REPRESENTATION('',(#818),#821);\r
+#818 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#819,#820),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#819 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#820 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#821 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#822 = ORIENTED_EDGE('',*,*,#823,.F.);\r
+#823 = EDGE_CURVE('',#803,#803,#824,.T.);\r
+#824 = SURFACE_CURVE('',#825,(#830,#836),.PCURVE_S2.);\r
+#825 = CIRCLE('',#826,23.40416683412);\r
+#826 = AXIS2_PLACEMENT_3D('',#827,#828,#829);\r
+#827 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    19.999999552965));\r
+#828 = DIRECTION('',(0.,0.,-1.));\r
+#829 = DIRECTION('',(0.,1.,0.));\r
+#830 = PCURVE('',#328,#831);\r
+#831 = DEFINITIONAL_REPRESENTATION('',(#832),#835);\r
+#832 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#833,#834),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#833 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#834 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#835 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#836 = PCURVE('',#380,#837);\r
+#837 = DEFINITIONAL_REPRESENTATION('',(#838),#846);\r
+#838 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#839,#840,#841,#842,#843,#844\r
+,#845),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#839 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#840 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#841 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#842 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#843 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#844 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#845 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#846 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#847 = ORIENTED_EDGE('',*,*,#802,.F.);\r
+#848 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#849 = ADVANCED_FACE('',(#850,#860,#863),#380,.T.);\r
+#850 = FACE_BOUND('',#851,.F.);\r
+#851 = EDGE_LOOP('',(#852,#853,#854,#855,#856,#857,#858,#859));\r
+#852 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#853 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#854 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#855 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#856 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#857 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#858 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#859 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#860 = FACE_BOUND('',#861,.T.);\r
+#861 = EDGE_LOOP('',(#862));\r
+#862 = ORIENTED_EDGE('',*,*,#772,.T.);\r
+#863 = FACE_BOUND('',#864,.T.);\r
+#864 = EDGE_LOOP('',(#865));\r
+#865 = ORIENTED_EDGE('',*,*,#823,.T.);\r
+#866 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) \r
+GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#869)) GLOBAL_UNIT_ASSIGNED_CONTEXT\r
+((#867,#868)) REPRESENTATION_CONTEXT('Context #1',\r
+  '3D Context with UNIT and UNCERTAINTY') );\r
+#867 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );\r
+#868 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );\r
+#869 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-04),#867,\r
+  'distance_accuracy_value','Confusion accuracy');\r
+ENDSEC;\r
+END-ISO-10303-21;\r
+\r
diff --git a/src/TEST_PY/recettes/bielle.py b/src/TEST_PY/recettes/bielle.py
new file mode 100644 (file)
index 0000000..86eca7c
--- /dev/null
@@ -0,0 +1,258 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS : 2011-2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# =============================================================================================
+
+import math
+
+import geompy
+import hexablock
+
+# Construire le modèle de bloc
+# ============================
+
+doc = hexablock.addDocument("bielle")
+
+# Construire les 2 grilles cylindriques
+# -------------------------------------
+
+centre_pb = doc.addVertex(0, 0, 0)
+centre_gb = doc.addVertex(7, 0, 0)
+
+angle_px   = math.pi / 3
+vecteur_px = doc.addVector(math.cos(angle_px), math.sin(angle_px), 0)
+vecteur_gx = doc.addVector(1, 0, 0)
+
+vecteur_z = doc.addVector(0, 0, 1)
+
+grille_p = doc.makeCylindrical(centre_pb, vecteur_px, vecteur_z,  1, 360, 1,  1, 3, 1,  False)
+grille_g = doc.makeCylindrical(centre_gb, vecteur_gx, vecteur_z,  1, 360, 1,  1, 3, 1,  False)
+
+# Relier les 2 grilles
+# --------------------
+
+quad_p = grille_p.getQuadJK(1, 2, 0)
+quad_g = grille_g.getQuadJK(1, 1, 0)
+
+point_p1 = grille_p.getVertexIJK(1, 0, 0)
+point_p2 = grille_p.getVertexIJK(1, 2, 0)
+
+point_g1 = grille_g.getVertexIJK(1, 1, 0)
+point_g2 = grille_g.getVertexIJK(1, 2, 0)
+
+prisme = doc.joinQuad(quad_p, quad_g,  point_p1, point_g1,  point_p2, point_g2,  3)
+
+# Charger la géométrie
+# ====================
+
+bielle = geompy.ImportSTEP("bielle.stp")
+
+# Sélectionner des sous-parties de la géométrie
+# ---------------------------------------------
+
+sommets = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["VERTEX"])
+
+sommets_petit = [  6,  8,  7,  9 ]
+sommets_grand = [ 10, 12, 11, 13 ]
+
+aretes = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["EDGE"])
+
+aretes_petit = [  7,  9,  8, 10 ]
+aretes_grand = [ 19, 21, 20, 22 ]
+
+ga_pbcd = aretes[ 0]
+ga_pbe  = aretes[ 2]
+
+ga_phcd = aretes[ 1]
+ga_phe  = aretes[ 3]
+
+ga_gbcd = aretes[27]
+ga_gbe  = aretes[25]
+
+ga_ghcd = aretes[28]
+ga_ghe  = aretes[26]
+
+# Associer le modèle de bloc avec la géométrie
+# ============================================
+
+doc.setShape(bielle)
+
+# Netoyer les associations implicites du prisme
+# ---------------------------------------------
+
+for i in xrange( prisme.countEdge() ):
+  em = prisme.getEdge(i)
+  if em != None:
+    em.clearAssociation()
+
+# Associer les cercles extérieurs
+# -------------------------------
+
+def cercle(grille, k, ge, p):
+    ms  = grille.getVertexIJK(0, 0, k)
+
+    ma1 = grille.getEdgeJ(0, 2, k)
+    ma2 = grille.getEdgeJ(0, 1, k)
+    ma3 = grille.getEdgeJ(0, 0, k)
+
+    doc.associateClosedLine(ms, ma1, [ ma2, ma3 ], ge, p, False, [])
+
+cercle(grille_p, 0, ga_pbe, 5.0/6)
+cercle(grille_p, 1, ga_phe, 5.0/6)
+
+cercle(grille_g, 0, ga_gbe, 0)
+cercle(grille_g, 1, ga_ghe, 0)
+
+# Associer les arcs extérieurs (excentrés)
+# ----------------------------------------
+
+def arc(grille, i1, i2, k, ge):
+    ma1 = grille.getEdgeJ(1, i1, k)
+    ma2 = grille.getEdgeJ(1, i2, k)
+
+    doc.associateOpenedLine(ma1, [ ma2 ], ge, 0, [], 1)
+
+arc(grille_p, 1, 0, 0, ga_pbcd)
+arc(grille_p, 1, 0, 1, ga_phcd)
+
+arc(grille_g, 0, 2, 0, ga_gbcd)
+arc(grille_g, 0, 2, 1, ga_ghcd)
+
+# Associer les sommets des arcs de cercle de raccord
+# --------------------------------------------------
+
+hm = prisme.getHexa(1)
+for i in xrange(0, 4):
+  vm = hm.getVertex(i)
+  ga = sommets[ sommets_petit[i] ]
+  vm.setAssociation(ga)
+
+hm = prisme.getHexa(2)
+for i in xrange(0, 4):
+  vm = hm.getVertex(i)
+  ga = sommets[ sommets_grand[i] ]
+  vm.setAssociation(ga)
+
+# Associer les arcs de cercle de raccord
+# --------------------------------------
+
+hm = prisme.getHexa(0)
+for i in xrange(0, 4):
+  em = hm.getEdge(i+8)
+  ga = aretes[ aretes_petit[i] ]
+  em.addAssociation(ga, 0, 1)
+
+hm = prisme.getHexa(2)
+for i in xrange(0, 4):
+  em = hm.getEdge(i+8)
+  ga = aretes[ aretes_grand[i] ]
+  em.addAssociation(ga, 0, 1)
+
+# Arrondir des associations implicites cylindriques
+# -------------------------------------------------
+
+for h, i, ech in [ [0, 0, 0.95], [0, 1, 0.95],  [2, 2, 0.85], [2, 3, 0.85] ]:
+  hm = prisme.getHexa(h)
+  em = hm.getEdge(i)
+  va = em.getVertex(0).getAssociation()
+  vb = em.getVertex(1).getAssociation()
+  vax, vay, vaz = geompy.PointCoordinates(va)
+  vbx, vby, vbz = geompy.PointCoordinates(vb)
+  vmx = ( vax + vbx ) / 2.0 * ech
+  vmy = ( vay + vby ) / 2.0
+  vmz = ( vaz + vbz ) / 2.0
+  vm = geompy.MakeVertex(vmx, vmy, vmz)
+  eg = geompy.MakeArc(va, vm, vb)
+  em.clearAssociation()
+  em.addAssociation(eg, 0, 1)
+
+# Mailler le modèle de bloc
+# =========================
+
+# Définir 5 groupes de faces
+# --------------------------
+
+groupe_petit   = doc.addQuadGroup("Petit")
+groupe_grand   = doc.addQuadGroup("Grand")
+groupe_bas     = doc.addQuadGroup("Bas")
+groupe_haut    = doc.addQuadGroup("Haut")
+groupe_contour = doc.addQuadGroup("Contour")
+
+# Constituer les groupes petit et grand
+# -------------------------------------
+
+for i in xrange(3):
+  groupe_petit.addElement( grille_p.getQuadJK(0, i, 0) )
+  groupe_grand.addElement( grille_g.getQuadJK(0, i, 0) )
+
+# Constituer les groupes bas et haut
+# ----------------------------------
+
+for i in xrange(3):
+  groupe_bas.addElement(  grille_p.getQuadIJ(0, i, 0) )
+  groupe_bas.addElement(  grille_g.getQuadIJ(0, i, 0) )
+
+  groupe_haut.addElement( grille_p.getQuadIJ(0, i, 1) )
+  groupe_haut.addElement( grille_g.getQuadIJ(0, i, 1) )
+
+for i in xrange(3):
+  h = prisme.getHexa(i)
+
+  groupe_bas.addElement(  h.getQuad(2) )
+  groupe_haut.addElement( h.getQuad(3) )
+
+# Constituer le groupe contour
+# ----------------------------
+
+for i in xrange(2):
+  groupe_contour.addElement( grille_p.getQuadJK(1, i, 0) )
+
+for i in [0, 2]:
+  groupe_contour.addElement( grille_g.getQuadJK(1, i, 0) )
+
+for i in xrange(3):
+  h = prisme.getHexa(i)
+
+  groupe_contour.addElement( h.getQuad(4) )
+  groupe_contour.addElement( h.getQuad(5) )
+
+# Définir 3 groupes de volumes
+# ----------------------------
+
+groupe_petit  = doc.addHexaGroup("Petit")
+groupe_grand  = doc.addHexaGroup("Grand")
+groupe_prisme = doc.addHexaGroup("Prisme")
+
+for i in xrange(3):
+  groupe_petit.addElement( grille_p.getHexa(i) )
+  groupe_grand.addElement( grille_g.getHexa(i) )
+
+for i in xrange(3):
+  groupe_prisme.addElement( prisme.getHexa(i) )
+
+# Mailler le modèle de bloc avec association
+# ------------------------------------------
+
+hexablock.addLaws(doc, 0.003, True)
+
+blocs = hexablock.mesh(doc)
+
+muv, mue, muq, muh = hexablock.dump(doc, blocs)
diff --git a/src/TEST_PY/recettes/bielle.stp b/src/TEST_PY/recettes/bielle.stp
new file mode 100644 (file)
index 0000000..ef67fa5
--- /dev/null
@@ -0,0 +1,1178 @@
+ISO-10303-21;\r
+HEADER;\r
+ FILE_DESCRIPTION(('a Product shape'),'1');\r
+ FILE_NAME('Euclid  Shape Model','1998-12-23T10:04:46',('Author Name'),(\r
+    'MATRA-DATAVISION'),'OL-2.0D','EUCLID','Authorisation status');\r
+ FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));\r
+ENDSEC;\r
+DATA;\r
+#1 = PRODUCT_TYPE('part',$,(#2));\r
+#2 = PRODUCT('bielle','bielle','void',(#3));\r
+#3 = MECHANICAL_CONTEXT('Mechanical',#4,'Assembly');\r
+#4 = APPLICATION_CONTEXT('EUCLID');\r
+#5 = APPLICATION_PROTOCOL_DEFINITION('CommitteeDraft',\r
+  'automotive_design',1997,#4);\r
+#6 = SHAPE_DEFINITION_REPRESENTATION(#7,#11);\r
+#7 = PRODUCT_DEFINITION_SHAPE('void','void',#8);\r
+#8 = PRODUCT_DEFINITION('void','void',#9,#10);\r
+#9 = PRODUCT_DEFINITION_FORMATION('ID','void',#2);\r
+#10 = PRODUCT_DEFINITION_CONTEXT('as proposed',#4,'First_Design');\r
+#11 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#12),#866);\r
+#12 = MANIFOLD_SOLID_BREP('',#13);\r
+#13 = CLOSED_SHELL('',(#14,#338,#415,#466,#518,#566,#617,#668,#720,#747,\r
+    #798,#849));\r
+#14 = ADVANCED_FACE('',(#15,#270,#304),#30,.F.);\r
+#15 = FACE_BOUND('',#16,.T.);\r
+#16 = EDGE_LOOP('',(#17,#56,#88,#120,#148,#180,#212,#244));\r
+#17 = ORIENTED_EDGE('',*,*,#18,.T.);\r
+#18 = EDGE_CURVE('',#19,#21,#23,.T.);\r
+#19 = VERTEX_POINT('',#20);\r
+#20 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#21 = VERTEX_POINT('',#22);\r
+#22 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#23 = SURFACE_CURVE('',#24,(#29,#45),.PCURVE_S2.);\r
+#24 = CIRCLE('',#25,74.466478447737);\r
+#25 = AXIS2_PLACEMENT_3D('',#26,#27,#28);\r
+#26 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#27 = DIRECTION('',(0.,0.,1.));\r
+#28 = DIRECTION('',(1.,0.,0.));\r
+#29 = PCURVE('',#30,#35);\r
+#30 = PLANE('',#31);\r
+#31 = AXIS2_PLACEMENT_3D('',#32,#33,#34);\r
+#32 = CARTESIAN_POINT('',(0.,0.,-19.99999955296));\r
+#33 = DIRECTION('',(0.,0.,1.));\r
+#34 = DIRECTION('',(1.,0.,0.));\r
+#35 = DEFINITIONAL_REPRESENTATION('',(#36),#44);\r
+#36 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#37,#38,#39,#40,#41,#42,#43),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#37 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#38 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#39 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#40 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#41 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#42 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#43 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#44 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#45 = PCURVE('',#46,#51);\r
+#46 = CYLINDRICAL_SURFACE('',#47,74.466478447737);\r
+#47 = AXIS2_PLACEMENT_3D('',#48,#49,#50);\r
+#48 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#49 = DIRECTION('',(0.,0.,1.));\r
+#50 = DIRECTION('',(1.,0.,0.));\r
+#51 = DEFINITIONAL_REPRESENTATION('',(#52),#55);\r
+#52 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#53,#54),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#53 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#54 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#55 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#56 = ORIENTED_EDGE('',*,*,#57,.T.);\r
+#57 = EDGE_CURVE('',#21,#58,#60,.T.);\r
+#58 = VERTEX_POINT('',#59);\r
+#59 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#60 = SURFACE_CURVE('',#61,(#66,#77),.PCURVE_S2.);\r
+#61 = CIRCLE('',#62,44.68116165083);\r
+#62 = AXIS2_PLACEMENT_3D('',#63,#64,#65);\r
+#63 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#64 = DIRECTION('',(0.,0.,-1.));\r
+#65 = DIRECTION('',(1.,0.,0.));\r
+#66 = PCURVE('',#30,#67);\r
+#67 = DEFINITIONAL_REPRESENTATION('',(#68),#76);\r
+#68 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#69,#70,#71,#72,#73,#74,#75),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#69 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#70 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#71 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#72 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#73 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#74 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#75 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#76 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#77 = PCURVE('',#78,#83);\r
+#78 = CYLINDRICAL_SURFACE('',#79,44.68116165083);\r
+#79 = AXIS2_PLACEMENT_3D('',#80,#81,#82);\r
+#80 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#81 = DIRECTION('',(0.,0.,-1.));\r
+#82 = DIRECTION('',(1.,0.,0.));\r
+#83 = DEFINITIONAL_REPRESENTATION('',(#84),#87);\r
+#84 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#85,#86),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#85 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#86 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#87 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#88 = ORIENTED_EDGE('',*,*,#89,.T.);\r
+#89 = EDGE_CURVE('',#58,#90,#92,.T.);\r
+#90 = VERTEX_POINT('',#91);\r
+#91 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#92 = SURFACE_CURVE('',#93,(#98,#109),.PCURVE_S2.);\r
+#93 = CIRCLE('',#94,84.24770250966);\r
+#94 = AXIS2_PLACEMENT_3D('',#95,#96,#97);\r
+#95 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#96 = DIRECTION('',(0.,0.,1.));\r
+#97 = DIRECTION('',(1.,0.,0.));\r
+#98 = PCURVE('',#30,#99);\r
+#99 = DEFINITIONAL_REPRESENTATION('',(#100),#108);\r
+#100 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#101,#102,#103,#104,#105,#106\r
+,#107),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#101 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#102 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#103 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#104 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#105 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#106 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#107 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#108 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#109 = PCURVE('',#110,#115);\r
+#110 = CYLINDRICAL_SURFACE('',#111,84.24770250966);\r
+#111 = AXIS2_PLACEMENT_3D('',#112,#113,#114);\r
+#112 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#113 = DIRECTION('',(0.,0.,1.));\r
+#114 = DIRECTION('',(1.,0.,0.));\r
+#115 = DEFINITIONAL_REPRESENTATION('',(#116),#119);\r
+#116 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#117,#118),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#117 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#118 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#119 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#120 = ORIENTED_EDGE('',*,*,#121,.T.);\r
+#121 = EDGE_CURVE('',#90,#122,#124,.T.);\r
+#122 = VERTEX_POINT('',#123);\r
+#123 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#124 = SURFACE_CURVE('',#125,(#129,#136),.PCURVE_S2.);\r
+#125 = LINE('',#126,#127);\r
+#126 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#127 = VECTOR('',#128,1.);\r
+#128 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#129 = PCURVE('',#30,#130);\r
+#130 = DEFINITIONAL_REPRESENTATION('',(#131),#135);\r
+#131 = LINE('',#132,#133);\r
+#132 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#133 = VECTOR('',#134,1.);\r
+#134 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#135 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#136 = PCURVE('',#137,#142);\r
+#137 = PLANE('',#138);\r
+#138 = AXIS2_PLACEMENT_3D('',#139,#140,#141);\r
+#139 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#140 = DIRECTION('',(-6.935351515554E-02,-0.997592146088,0.));\r
+#141 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#142 = DEFINITIONAL_REPRESENTATION('',(#143),#147);\r
+#143 = LINE('',#144,#145);\r
+#144 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#145 = VECTOR('',#146,1.);\r
+#146 = DIRECTION('',(1.,0.));\r
+#147 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#148 = ORIENTED_EDGE('',*,*,#149,.T.);\r
+#149 = EDGE_CURVE('',#122,#150,#152,.T.);\r
+#150 = VERTEX_POINT('',#151);\r
+#151 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#152 = SURFACE_CURVE('',#153,(#158,#169),.PCURVE_S2.);\r
+#153 = CIRCLE('',#154,24.565238684828);\r
+#154 = AXIS2_PLACEMENT_3D('',#155,#156,#157);\r
+#155 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#156 = DIRECTION('',(0.,0.,1.));\r
+#157 = DIRECTION('',(1.,0.,0.));\r
+#158 = PCURVE('',#30,#159);\r
+#159 = DEFINITIONAL_REPRESENTATION('',(#160),#168);\r
+#160 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#161,#162,#163,#164,#165,#166\r
+,#167),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#161 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#162 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#163 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#164 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#165 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#166 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#167 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#168 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#169 = PCURVE('',#170,#175);\r
+#170 = CYLINDRICAL_SURFACE('',#171,24.565238684828);\r
+#171 = AXIS2_PLACEMENT_3D('',#172,#173,#174);\r
+#172 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#173 = DIRECTION('',(0.,0.,1.));\r
+#174 = DIRECTION('',(1.,0.,0.));\r
+#175 = DEFINITIONAL_REPRESENTATION('',(#176),#179);\r
+#176 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#177,#178),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#177 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#178 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#179 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#180 = ORIENTED_EDGE('',*,*,#181,.T.);\r
+#181 = EDGE_CURVE('',#150,#182,#184,.T.);\r
+#182 = VERTEX_POINT('',#183);\r
+#183 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#184 = SURFACE_CURVE('',#185,(#190,#201),.PCURVE_S2.);\r
+#185 = CIRCLE('',#186,29.778387016109);\r
+#186 = AXIS2_PLACEMENT_3D('',#187,#188,#189);\r
+#187 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#188 = DIRECTION('',(0.,0.,-1.));\r
+#189 = DIRECTION('',(1.,0.,0.));\r
+#190 = PCURVE('',#30,#191);\r
+#191 = DEFINITIONAL_REPRESENTATION('',(#192),#200);\r
+#192 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#193,#194,#195,#196,#197,#198\r
+,#199),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#193 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#194 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#195 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#196 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#197 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#198 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#199 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#200 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#201 = PCURVE('',#202,#207);\r
+#202 = CYLINDRICAL_SURFACE('',#203,29.778387016109);\r
+#203 = AXIS2_PLACEMENT_3D('',#204,#205,#206);\r
+#204 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#205 = DIRECTION('',(0.,0.,-1.));\r
+#206 = DIRECTION('',(1.,0.,0.));\r
+#207 = DEFINITIONAL_REPRESENTATION('',(#208),#211);\r
+#208 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#209,#210),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#209 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#210 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#211 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#212 = ORIENTED_EDGE('',*,*,#213,.T.);\r
+#213 = EDGE_CURVE('',#182,#214,#216,.T.);\r
+#214 = VERTEX_POINT('',#215);\r
+#215 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#216 = SURFACE_CURVE('',#217,(#222,#233),.PCURVE_S2.);\r
+#217 = CIRCLE('',#218,20.41914254867);\r
+#218 = AXIS2_PLACEMENT_3D('',#219,#220,#221);\r
+#219 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#220 = DIRECTION('',(0.,0.,1.));\r
+#221 = DIRECTION('',(1.,0.,0.));\r
+#222 = PCURVE('',#30,#223);\r
+#223 = DEFINITIONAL_REPRESENTATION('',(#224),#232);\r
+#224 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#225,#226,#227,#228,#229,#230\r
+,#231),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#225 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#226 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#227 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#228 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#229 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#230 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#231 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#232 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#233 = PCURVE('',#234,#239);\r
+#234 = CYLINDRICAL_SURFACE('',#235,20.41914254867);\r
+#235 = AXIS2_PLACEMENT_3D('',#236,#237,#238);\r
+#236 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#237 = DIRECTION('',(0.,0.,1.));\r
+#238 = DIRECTION('',(1.,0.,0.));\r
+#239 = DEFINITIONAL_REPRESENTATION('',(#240),#243);\r
+#240 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#241,#242),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#241 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#242 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#243 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#244 = ORIENTED_EDGE('',*,*,#245,.T.);\r
+#245 = EDGE_CURVE('',#214,#19,#246,.T.);\r
+#246 = SURFACE_CURVE('',#247,(#251,#258),.PCURVE_S2.);\r
+#247 = LINE('',#248,#249);\r
+#248 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#249 = VECTOR('',#250,1.);\r
+#250 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#251 = PCURVE('',#30,#252);\r
+#252 = DEFINITIONAL_REPRESENTATION('',(#253),#257);\r
+#253 = LINE('',#254,#255);\r
+#254 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#255 = VECTOR('',#256,1.);\r
+#256 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#257 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#258 = PCURVE('',#259,#264);\r
+#259 = PLANE('',#260);\r
+#260 = AXIS2_PLACEMENT_3D('',#261,#262,#263);\r
+#261 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#262 = DIRECTION('',(-7.581640296081E-02,0.997121794488,0.));\r
+#263 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#264 = DEFINITIONAL_REPRESENTATION('',(#265),#269);\r
+#265 = LINE('',#266,#267);\r
+#266 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#267 = VECTOR('',#268,1.);\r
+#268 = DIRECTION('',(1.,0.));\r
+#269 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#270 = FACE_BOUND('',#271,.F.);\r
+#271 = EDGE_LOOP('',(#272));\r
+#272 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#273 = EDGE_CURVE('',#274,#274,#276,.T.);\r
+#274 = VERTEX_POINT('',#275);\r
+#275 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -19.99999955296));\r
+#276 = SURFACE_CURVE('',#277,(#282,#293),.PCURVE_S2.);\r
+#277 = CIRCLE('',#278,15.057678156153);\r
+#278 = AXIS2_PLACEMENT_3D('',#279,#280,#281);\r
+#279 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -19.99999955296));\r
+#280 = DIRECTION('',(0.,0.,-1.));\r
+#281 = DIRECTION('',(0.,1.,0.));\r
+#282 = PCURVE('',#30,#283);\r
+#283 = DEFINITIONAL_REPRESENTATION('',(#284),#292);\r
+#284 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#285,#286,#287,#288,#289,#290\r
+,#291),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#285 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#286 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#287 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#288 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#289 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#290 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#291 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#292 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#293 = PCURVE('',#294,#299);\r
+#294 = CYLINDRICAL_SURFACE('',#295,15.057678156153);\r
+#295 = AXIS2_PLACEMENT_3D('',#296,#297,#298);\r
+#296 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -40.00019910593));\r
+#297 = DIRECTION('',(0.,0.,1.));\r
+#298 = DIRECTION('',(1.,0.,0.));\r
+#299 = DEFINITIONAL_REPRESENTATION('',(#300),#303);\r
+#300 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#301,#302),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#301 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#302 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#303 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#304 = FACE_BOUND('',#305,.F.);\r
+#305 = EDGE_LOOP('',(#306));\r
+#306 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#307 = EDGE_CURVE('',#308,#308,#310,.T.);\r
+#308 = VERTEX_POINT('',#309);\r
+#309 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -19.99999955296));\r
+#310 = SURFACE_CURVE('',#311,(#316,#327),.PCURVE_S2.);\r
+#311 = CIRCLE('',#312,23.40416683412);\r
+#312 = AXIS2_PLACEMENT_3D('',#313,#314,#315);\r
+#313 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -19.99999955296));\r
+#314 = DIRECTION('',(0.,0.,-1.));\r
+#315 = DIRECTION('',(0.,1.,0.));\r
+#316 = PCURVE('',#30,#317);\r
+#317 = DEFINITIONAL_REPRESENTATION('',(#318),#326);\r
+#318 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#319,#320,#321,#322,#323,#324\r
+,#325),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#319 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#320 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#321 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#322 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#323 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#324 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#325 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#326 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#327 = PCURVE('',#328,#333);\r
+#328 = CYLINDRICAL_SURFACE('',#329,23.40416683412);\r
+#329 = AXIS2_PLACEMENT_3D('',#330,#331,#332);\r
+#330 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -40.00019910593));\r
+#331 = DIRECTION('',(0.,0.,1.));\r
+#332 = DIRECTION('',(1.,0.,0.));\r
+#333 = DEFINITIONAL_REPRESENTATION('',(#334),#337);\r
+#334 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#335,#336),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#335 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#336 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#337 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#338 = ADVANCED_FACE('',(#339),#46,.F.);\r
+#339 = FACE_BOUND('',#340,.T.);\r
+#340 = EDGE_LOOP('',(#341,#363,#395,#414));\r
+#341 = ORIENTED_EDGE('',*,*,#342,.T.);\r
+#342 = EDGE_CURVE('',#19,#343,#345,.T.);\r
+#343 = VERTEX_POINT('',#344);\r
+#344 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    19.999999552965));\r
+#345 = SURFACE_CURVE('',#346,(#350,#356),.PCURVE_S2.);\r
+#346 = LINE('',#347,#348);\r
+#347 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#348 = VECTOR('',#349,1.);\r
+#349 = DIRECTION('',(0.,0.,1.));\r
+#350 = PCURVE('',#46,#351);\r
+#351 = DEFINITIONAL_REPRESENTATION('',(#352),#355);\r
+#352 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#353,#354),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#353 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#354 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#355 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#356 = PCURVE('',#259,#357);\r
+#357 = DEFINITIONAL_REPRESENTATION('',(#358),#362);\r
+#358 = LINE('',#359,#360);\r
+#359 = CARTESIAN_POINT('',(136.42439686482,0.));\r
+#360 = VECTOR('',#361,1.);\r
+#361 = DIRECTION('',(0.,-1.));\r
+#362 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#363 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#364 = EDGE_CURVE('',#343,#365,#367,.T.);\r
+#365 = VERTEX_POINT('',#366);\r
+#366 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    19.999999552965));\r
+#367 = SURFACE_CURVE('',#368,(#373,#379),.PCURVE_S2.);\r
+#368 = CIRCLE('',#369,74.466478447737);\r
+#369 = AXIS2_PLACEMENT_3D('',#370,#371,#372);\r
+#370 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    19.999999552965));\r
+#371 = DIRECTION('',(0.,0.,1.));\r
+#372 = DIRECTION('',(1.,0.,0.));\r
+#373 = PCURVE('',#46,#374);\r
+#374 = DEFINITIONAL_REPRESENTATION('',(#375),#378);\r
+#375 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#376,#377),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#376 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#377 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#378 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#379 = PCURVE('',#380,#385);\r
+#380 = PLANE('',#381);\r
+#381 = AXIS2_PLACEMENT_3D('',#382,#383,#384);\r
+#382 = CARTESIAN_POINT('',(0.,0.,19.999999552965));\r
+#383 = DIRECTION('',(0.,0.,1.));\r
+#384 = DIRECTION('',(1.,0.,0.));\r
+#385 = DEFINITIONAL_REPRESENTATION('',(#386),#394);\r
+#386 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#387,#388,#389,#390,#391,#392\r
+,#393),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#387 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#388 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#389 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#390 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#391 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#392 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#393 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#394 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#395 = ORIENTED_EDGE('',*,*,#396,.F.);\r
+#396 = EDGE_CURVE('',#21,#365,#397,.T.);\r
+#397 = SURFACE_CURVE('',#398,(#402,#408),.PCURVE_S2.);\r
+#398 = LINE('',#399,#400);\r
+#399 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#400 = VECTOR('',#401,1.);\r
+#401 = DIRECTION('',(0.,0.,1.));\r
+#402 = PCURVE('',#46,#403);\r
+#403 = DEFINITIONAL_REPRESENTATION('',(#404),#407);\r
+#404 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#405,#406),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#405 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#406 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#407 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#408 = PCURVE('',#78,#409);\r
+#409 = DEFINITIONAL_REPRESENTATION('',(#410),#413);\r
+#410 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#411,#412),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#411 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#412 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#413 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#414 = ORIENTED_EDGE('',*,*,#18,.F.);\r
+#415 = ADVANCED_FACE('',(#416),#78,.T.);\r
+#416 = FACE_BOUND('',#417,.T.);\r
+#417 = EDGE_LOOP('',(#418,#419,#446,#465));\r
+#418 = ORIENTED_EDGE('',*,*,#396,.T.);\r
+#419 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#420 = EDGE_CURVE('',#365,#421,#423,.T.);\r
+#421 = VERTEX_POINT('',#422);\r
+#422 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    19.999999552965));\r
+#423 = SURFACE_CURVE('',#424,(#429,#435),.PCURVE_S2.);\r
+#424 = CIRCLE('',#425,44.68116165083);\r
+#425 = AXIS2_PLACEMENT_3D('',#426,#427,#428);\r
+#426 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,\r
+    19.999999552965));\r
+#427 = DIRECTION('',(0.,0.,-1.));\r
+#428 = DIRECTION('',(1.,0.,0.));\r
+#429 = PCURVE('',#78,#430);\r
+#430 = DEFINITIONAL_REPRESENTATION('',(#431),#434);\r
+#431 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#432,#433),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#432 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#433 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#434 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#435 = PCURVE('',#380,#436);\r
+#436 = DEFINITIONAL_REPRESENTATION('',(#437),#445);\r
+#437 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#438,#439,#440,#441,#442,#443\r
+,#444),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#438 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#439 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#440 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#441 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#442 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#443 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#444 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#445 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#446 = ORIENTED_EDGE('',*,*,#447,.F.);\r
+#447 = EDGE_CURVE('',#58,#421,#448,.T.);\r
+#448 = SURFACE_CURVE('',#449,(#453,#459),.PCURVE_S2.);\r
+#449 = LINE('',#450,#451);\r
+#450 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#451 = VECTOR('',#452,1.);\r
+#452 = DIRECTION('',(0.,0.,1.));\r
+#453 = PCURVE('',#78,#454);\r
+#454 = DEFINITIONAL_REPRESENTATION('',(#455),#458);\r
+#455 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#456,#457),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#456 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#457 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#458 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#459 = PCURVE('',#110,#460);\r
+#460 = DEFINITIONAL_REPRESENTATION('',(#461),#464);\r
+#461 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#462,#463),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#462 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#463 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#464 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#465 = ORIENTED_EDGE('',*,*,#57,.F.);\r
+#466 = ADVANCED_FACE('',(#467),#110,.F.);\r
+#467 = FACE_BOUND('',#468,.T.);\r
+#468 = EDGE_LOOP('',(#469,#470,#497,#517));\r
+#469 = ORIENTED_EDGE('',*,*,#447,.T.);\r
+#470 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#471 = EDGE_CURVE('',#421,#472,#474,.T.);\r
+#472 = VERTEX_POINT('',#473);\r
+#473 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#474 = SURFACE_CURVE('',#475,(#480,#486),.PCURVE_S2.);\r
+#475 = CIRCLE('',#476,84.24770250966);\r
+#476 = AXIS2_PLACEMENT_3D('',#477,#478,#479);\r
+#477 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    19.999999552965));\r
+#478 = DIRECTION('',(0.,0.,1.));\r
+#479 = DIRECTION('',(1.,0.,0.));\r
+#480 = PCURVE('',#110,#481);\r
+#481 = DEFINITIONAL_REPRESENTATION('',(#482),#485);\r
+#482 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#483,#484),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#483 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#484 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#485 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#486 = PCURVE('',#380,#487);\r
+#487 = DEFINITIONAL_REPRESENTATION('',(#488),#496);\r
+#488 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#489,#490,#491,#492,#493,#494\r
+,#495),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#489 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#490 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#491 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#492 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#493 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#494 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#495 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#496 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#497 = ORIENTED_EDGE('',*,*,#498,.F.);\r
+#498 = EDGE_CURVE('',#90,#472,#499,.T.);\r
+#499 = SURFACE_CURVE('',#500,(#504,#510),.PCURVE_S2.);\r
+#500 = LINE('',#501,#502);\r
+#501 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#502 = VECTOR('',#503,1.);\r
+#503 = DIRECTION('',(0.,0.,1.));\r
+#504 = PCURVE('',#110,#505);\r
+#505 = DEFINITIONAL_REPRESENTATION('',(#506),#509);\r
+#506 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#507,#508),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#507 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#508 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#509 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#510 = PCURVE('',#137,#511);\r
+#511 = DEFINITIONAL_REPRESENTATION('',(#512),#516);\r
+#512 = LINE('',#513,#514);\r
+#513 = CARTESIAN_POINT('',(0.,0.));\r
+#514 = VECTOR('',#515,1.);\r
+#515 = DIRECTION('',(0.,-1.));\r
+#516 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#517 = ORIENTED_EDGE('',*,*,#89,.F.);\r
+#518 = ADVANCED_FACE('',(#519),#137,.T.);\r
+#519 = FACE_BOUND('',#520,.T.);\r
+#520 = EDGE_LOOP('',(#521,#522,#545,#565));\r
+#521 = ORIENTED_EDGE('',*,*,#498,.T.);\r
+#522 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#523 = EDGE_CURVE('',#472,#524,#526,.T.);\r
+#524 = VERTEX_POINT('',#525);\r
+#525 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    19.999999552965));\r
+#526 = SURFACE_CURVE('',#527,(#531,#538),.PCURVE_S2.);\r
+#527 = LINE('',#528,#529);\r
+#528 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#529 = VECTOR('',#530,1.);\r
+#530 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#531 = PCURVE('',#137,#532);\r
+#532 = DEFINITIONAL_REPRESENTATION('',(#533),#537);\r
+#533 = LINE('',#534,#535);\r
+#534 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#535 = VECTOR('',#536,1.);\r
+#536 = DIRECTION('',(1.,0.));\r
+#537 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#538 = PCURVE('',#380,#539);\r
+#539 = DEFINITIONAL_REPRESENTATION('',(#540),#544);\r
+#540 = LINE('',#541,#542);\r
+#541 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#542 = VECTOR('',#543,1.);\r
+#543 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#544 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#545 = ORIENTED_EDGE('',*,*,#546,.F.);\r
+#546 = EDGE_CURVE('',#122,#524,#547,.T.);\r
+#547 = SURFACE_CURVE('',#548,(#552,#559),.PCURVE_S2.);\r
+#548 = LINE('',#549,#550);\r
+#549 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#550 = VECTOR('',#551,1.);\r
+#551 = DIRECTION('',(0.,0.,1.));\r
+#552 = PCURVE('',#137,#553);\r
+#553 = DEFINITIONAL_REPRESENTATION('',(#554),#558);\r
+#554 = LINE('',#555,#556);\r
+#555 = CARTESIAN_POINT('',(131.87890374807,0.));\r
+#556 = VECTOR('',#557,1.);\r
+#557 = DIRECTION('',(0.,-1.));\r
+#558 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#559 = PCURVE('',#170,#560);\r
+#560 = DEFINITIONAL_REPRESENTATION('',(#561),#564);\r
+#561 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#562,#563),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#562 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#563 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#564 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#565 = ORIENTED_EDGE('',*,*,#121,.F.);\r
+#566 = ADVANCED_FACE('',(#567),#170,.F.);\r
+#567 = FACE_BOUND('',#568,.T.);\r
+#568 = EDGE_LOOP('',(#569,#570,#597,#616));\r
+#569 = ORIENTED_EDGE('',*,*,#546,.T.);\r
+#570 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#571 = EDGE_CURVE('',#524,#572,#574,.T.);\r
+#572 = VERTEX_POINT('',#573);\r
+#573 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    19.999999552965));\r
+#574 = SURFACE_CURVE('',#575,(#580,#586),.PCURVE_S2.);\r
+#575 = CIRCLE('',#576,24.565238684828);\r
+#576 = AXIS2_PLACEMENT_3D('',#577,#578,#579);\r
+#577 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    19.999999552965));\r
+#578 = DIRECTION('',(0.,0.,1.));\r
+#579 = DIRECTION('',(1.,0.,0.));\r
+#580 = PCURVE('',#170,#581);\r
+#581 = DEFINITIONAL_REPRESENTATION('',(#582),#585);\r
+#582 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#583,#584),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#583 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#584 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#585 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#586 = PCURVE('',#380,#587);\r
+#587 = DEFINITIONAL_REPRESENTATION('',(#588),#596);\r
+#588 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#589,#590,#591,#592,#593,#594\r
+,#595),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#589 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#590 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#591 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#592 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#593 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#594 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#595 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#596 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#597 = ORIENTED_EDGE('',*,*,#598,.F.);\r
+#598 = EDGE_CURVE('',#150,#572,#599,.T.);\r
+#599 = SURFACE_CURVE('',#600,(#604,#610),.PCURVE_S2.);\r
+#600 = LINE('',#601,#602);\r
+#601 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#602 = VECTOR('',#603,1.);\r
+#603 = DIRECTION('',(0.,0.,1.));\r
+#604 = PCURVE('',#170,#605);\r
+#605 = DEFINITIONAL_REPRESENTATION('',(#606),#609);\r
+#606 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#607,#608),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#607 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#608 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#609 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#610 = PCURVE('',#202,#611);\r
+#611 = DEFINITIONAL_REPRESENTATION('',(#612),#615);\r
+#612 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#613,#614),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#613 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#614 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#615 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#616 = ORIENTED_EDGE('',*,*,#149,.F.);\r
+#617 = ADVANCED_FACE('',(#618),#202,.T.);\r
+#618 = FACE_BOUND('',#619,.T.);\r
+#619 = EDGE_LOOP('',(#620,#621,#648,#667));\r
+#620 = ORIENTED_EDGE('',*,*,#598,.T.);\r
+#621 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#622 = EDGE_CURVE('',#572,#623,#625,.T.);\r
+#623 = VERTEX_POINT('',#624);\r
+#624 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    19.999999552965));\r
+#625 = SURFACE_CURVE('',#626,(#631,#637),.PCURVE_S2.);\r
+#626 = CIRCLE('',#627,29.778387016109);\r
+#627 = AXIS2_PLACEMENT_3D('',#628,#629,#630);\r
+#628 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    19.999999552965));\r
+#629 = DIRECTION('',(0.,0.,-1.));\r
+#630 = DIRECTION('',(1.,0.,0.));\r
+#631 = PCURVE('',#202,#632);\r
+#632 = DEFINITIONAL_REPRESENTATION('',(#633),#636);\r
+#633 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#634,#635),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#634 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#635 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#636 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#637 = PCURVE('',#380,#638);\r
+#638 = DEFINITIONAL_REPRESENTATION('',(#639),#647);\r
+#639 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#640,#641,#642,#643,#644,#645\r
+,#646),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#640 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#641 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#642 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#643 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#644 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#645 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#646 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#647 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#648 = ORIENTED_EDGE('',*,*,#649,.F.);\r
+#649 = EDGE_CURVE('',#182,#623,#650,.T.);\r
+#650 = SURFACE_CURVE('',#651,(#655,#661),.PCURVE_S2.);\r
+#651 = LINE('',#652,#653);\r
+#652 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#653 = VECTOR('',#654,1.);\r
+#654 = DIRECTION('',(0.,0.,1.));\r
+#655 = PCURVE('',#202,#656);\r
+#656 = DEFINITIONAL_REPRESENTATION('',(#657),#660);\r
+#657 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#658,#659),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#658 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#659 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#660 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#661 = PCURVE('',#234,#662);\r
+#662 = DEFINITIONAL_REPRESENTATION('',(#663),#666);\r
+#663 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#664,#665),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#664 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#665 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#666 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#667 = ORIENTED_EDGE('',*,*,#181,.F.);\r
+#668 = ADVANCED_FACE('',(#669),#234,.F.);\r
+#669 = FACE_BOUND('',#670,.T.);\r
+#670 = EDGE_LOOP('',(#671,#672,#699,#719));\r
+#671 = ORIENTED_EDGE('',*,*,#649,.T.);\r
+#672 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#673 = EDGE_CURVE('',#623,#674,#676,.T.);\r
+#674 = VERTEX_POINT('',#675);\r
+#675 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#676 = SURFACE_CURVE('',#677,(#682,#688),.PCURVE_S2.);\r
+#677 = CIRCLE('',#678,20.41914254867);\r
+#678 = AXIS2_PLACEMENT_3D('',#679,#680,#681);\r
+#679 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    19.999999552965));\r
+#680 = DIRECTION('',(0.,0.,1.));\r
+#681 = DIRECTION('',(1.,0.,0.));\r
+#682 = PCURVE('',#234,#683);\r
+#683 = DEFINITIONAL_REPRESENTATION('',(#684),#687);\r
+#684 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#685,#686),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#685 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#686 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#687 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#688 = PCURVE('',#380,#689);\r
+#689 = DEFINITIONAL_REPRESENTATION('',(#690),#698);\r
+#690 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#691,#692,#693,#694,#695,#696\r
+,#697),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#691 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#692 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#693 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#694 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#695 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#696 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#697 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#698 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#699 = ORIENTED_EDGE('',*,*,#700,.F.);\r
+#700 = EDGE_CURVE('',#214,#674,#701,.T.);\r
+#701 = SURFACE_CURVE('',#702,(#706,#712),.PCURVE_S2.);\r
+#702 = LINE('',#703,#704);\r
+#703 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#704 = VECTOR('',#705,1.);\r
+#705 = DIRECTION('',(0.,0.,1.));\r
+#706 = PCURVE('',#234,#707);\r
+#707 = DEFINITIONAL_REPRESENTATION('',(#708),#711);\r
+#708 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#709,#710),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#709 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#710 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#711 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#712 = PCURVE('',#259,#713);\r
+#713 = DEFINITIONAL_REPRESENTATION('',(#714),#718);\r
+#714 = LINE('',#715,#716);\r
+#715 = CARTESIAN_POINT('',(0.,0.));\r
+#716 = VECTOR('',#717,1.);\r
+#717 = DIRECTION('',(0.,-1.));\r
+#718 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#719 = ORIENTED_EDGE('',*,*,#213,.F.);\r
+#720 = ADVANCED_FACE('',(#721),#259,.T.);\r
+#721 = FACE_BOUND('',#722,.T.);\r
+#722 = EDGE_LOOP('',(#723,#724,#745,#746));\r
+#723 = ORIENTED_EDGE('',*,*,#700,.T.);\r
+#724 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#725 = EDGE_CURVE('',#674,#343,#726,.T.);\r
+#726 = SURFACE_CURVE('',#727,(#731,#738),.PCURVE_S2.);\r
+#727 = LINE('',#728,#729);\r
+#728 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#729 = VECTOR('',#730,1.);\r
+#730 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#731 = PCURVE('',#259,#732);\r
+#732 = DEFINITIONAL_REPRESENTATION('',(#733),#737);\r
+#733 = LINE('',#734,#735);\r
+#734 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#735 = VECTOR('',#736,1.);\r
+#736 = DIRECTION('',(1.,0.));\r
+#737 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#738 = PCURVE('',#380,#739);\r
+#739 = DEFINITIONAL_REPRESENTATION('',(#740),#744);\r
+#740 = LINE('',#741,#742);\r
+#741 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#742 = VECTOR('',#743,1.);\r
+#743 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#744 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#745 = ORIENTED_EDGE('',*,*,#342,.F.);\r
+#746 = ORIENTED_EDGE('',*,*,#245,.F.);\r
+#747 = ADVANCED_FACE('',(#748),#294,.F.);\r
+#748 = FACE_BOUND('',#749,.T.);\r
+#749 = EDGE_LOOP('',(#750,#771,#796,#797));\r
+#750 = ORIENTED_EDGE('',*,*,#751,.T.);\r
+#751 = EDGE_CURVE('',#274,#752,#754,.T.);\r
+#752 = VERTEX_POINT('',#753);\r
+#753 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    19.999999552965));\r
+#754 = SEAM_CURVE('',#755,(#759,#765),.PCURVE_S2.);\r
+#755 = LINE('',#756,#757);\r
+#756 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -40.00019910593));\r
+#757 = VECTOR('',#758,1.);\r
+#758 = DIRECTION('',(0.,0.,1.));\r
+#759 = PCURVE('',#294,#760);\r
+#760 = DEFINITIONAL_REPRESENTATION('',(#761),#764);\r
+#761 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#762,#763),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#762 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#763 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#764 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#765 = PCURVE('',#294,#766);\r
+#766 = DEFINITIONAL_REPRESENTATION('',(#767),#770);\r
+#767 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#768,#769),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#768 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#769 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#770 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#771 = ORIENTED_EDGE('',*,*,#772,.F.);\r
+#772 = EDGE_CURVE('',#752,#752,#773,.T.);\r
+#773 = SURFACE_CURVE('',#774,(#779,#785),.PCURVE_S2.);\r
+#774 = CIRCLE('',#775,15.057678156153);\r
+#775 = AXIS2_PLACEMENT_3D('',#776,#777,#778);\r
+#776 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    19.999999552965));\r
+#777 = DIRECTION('',(0.,0.,-1.));\r
+#778 = DIRECTION('',(0.,1.,0.));\r
+#779 = PCURVE('',#294,#780);\r
+#780 = DEFINITIONAL_REPRESENTATION('',(#781),#784);\r
+#781 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#782,#783),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#782 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#783 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#784 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#785 = PCURVE('',#380,#786);\r
+#786 = DEFINITIONAL_REPRESENTATION('',(#787),#795);\r
+#787 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#788,#789,#790,#791,#792,#793\r
+,#794),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#788 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#789 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#790 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#791 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#792 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#793 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#794 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#795 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#796 = ORIENTED_EDGE('',*,*,#751,.F.);\r
+#797 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#798 = ADVANCED_FACE('',(#799),#328,.F.);\r
+#799 = FACE_BOUND('',#800,.T.);\r
+#800 = EDGE_LOOP('',(#801,#822,#847,#848));\r
+#801 = ORIENTED_EDGE('',*,*,#802,.T.);\r
+#802 = EDGE_CURVE('',#308,#803,#805,.T.);\r
+#803 = VERTEX_POINT('',#804);\r
+#804 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    19.999999552965));\r
+#805 = SEAM_CURVE('',#806,(#810,#816),.PCURVE_S2.);\r
+#806 = LINE('',#807,#808);\r
+#807 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -40.00019910593));\r
+#808 = VECTOR('',#809,1.);\r
+#809 = DIRECTION('',(0.,0.,1.));\r
+#810 = PCURVE('',#328,#811);\r
+#811 = DEFINITIONAL_REPRESENTATION('',(#812),#815);\r
+#812 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#813,#814),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#813 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#814 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#815 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#816 = PCURVE('',#328,#817);\r
+#817 = DEFINITIONAL_REPRESENTATION('',(#818),#821);\r
+#818 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#819,#820),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#819 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#820 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#821 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#822 = ORIENTED_EDGE('',*,*,#823,.F.);\r
+#823 = EDGE_CURVE('',#803,#803,#824,.T.);\r
+#824 = SURFACE_CURVE('',#825,(#830,#836),.PCURVE_S2.);\r
+#825 = CIRCLE('',#826,23.40416683412);\r
+#826 = AXIS2_PLACEMENT_3D('',#827,#828,#829);\r
+#827 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    19.999999552965));\r
+#828 = DIRECTION('',(0.,0.,-1.));\r
+#829 = DIRECTION('',(0.,1.,0.));\r
+#830 = PCURVE('',#328,#831);\r
+#831 = DEFINITIONAL_REPRESENTATION('',(#832),#835);\r
+#832 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#833,#834),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#833 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#834 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#835 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#836 = PCURVE('',#380,#837);\r
+#837 = DEFINITIONAL_REPRESENTATION('',(#838),#846);\r
+#838 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#839,#840,#841,#842,#843,#844\r
+,#845),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#839 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#840 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#841 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#842 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#843 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#844 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#845 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#846 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#847 = ORIENTED_EDGE('',*,*,#802,.F.);\r
+#848 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#849 = ADVANCED_FACE('',(#850,#860,#863),#380,.T.);\r
+#850 = FACE_BOUND('',#851,.F.);\r
+#851 = EDGE_LOOP('',(#852,#853,#854,#855,#856,#857,#858,#859));\r
+#852 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#853 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#854 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#855 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#856 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#857 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#858 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#859 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#860 = FACE_BOUND('',#861,.T.);\r
+#861 = EDGE_LOOP('',(#862));\r
+#862 = ORIENTED_EDGE('',*,*,#772,.T.);\r
+#863 = FACE_BOUND('',#864,.T.);\r
+#864 = EDGE_LOOP('',(#865));\r
+#865 = ORIENTED_EDGE('',*,*,#823,.T.);\r
+#866 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) \r
+GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#869)) GLOBAL_UNIT_ASSIGNED_CONTEXT\r
+((#867,#868)) REPRESENTATION_CONTEXT('Context #1',\r
+  '3D Context with UNIT and UNCERTAINTY') );\r
+#867 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );\r
+#868 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );\r
+#869 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-04),#867,\r
+  'distance_accuracy_value','Confusion accuracy');\r
+ENDSEC;\r
+END-ISO-10303-21;\r
+\r
diff --git a/src/TEST_PY/recettes/cuve.brep b/src/TEST_PY/recettes/cuve.brep
new file mode 100644 (file)
index 0000000..4d89041
--- /dev/null
@@ -0,0 +1,1323 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 36
+1
+              1               0               0               0 
+              0               1               0               0 
+              0               0               1           -0.05 
+1
+              1               0               0               0 
+              0               1               0            0.15 
+              0               0               1               0 
+2  2 1 1 1 0
+1
+              1               0               0            0.15 
+              0               1               0               0 
+              0               0               1               0 
+2  4 1 1 1 0
+2  4 1 2 1 0
+2  4 1 2 1 1 1 0
+1
+              1               0               0            1.85 
+              0               1               0               0 
+              0               0               1               0 
+2  8 -1 0
+2  1 1 8 1 0
+2  2 1 8 1 0
+1
+              1               0               0               0 
+              0               1               0            1.85 
+              0               0               1               0 
+2  12 -1 0
+2  1 1 12 1 0
+2  2 1 12 1 0
+2  12 -1 2 -1 0
+2  2 1 1 1 12 1 0
+1
+              1               0               0            1.85 
+              0               1               0            1.85 
+              0               0               1               0 
+2  2 1 18 1 0
+2  18 -1 2 -1 0
+2  2 1 1 1 18 1 0
+2  18 -1 0
+2  1 1 18 1 0
+1
+              1               0               0           0.925 
+              0               1               0           0.925 
+              0               0               1               0 
+1
+              1               0               0               0 
+              0               1               0               0 
+              0               0               1             0.1 
+1
+              1               0               0               0 
+              0               1               0               2 
+              0               0               1               0 
+2  26 1 25 1 0
+1
+              1               0               0               2 
+              0               1               0               0 
+              0               0               1               0 
+2  28 1 25 1 0
+2  28 1 26 1 0
+2  4 1 2 1 8 1 0
+2  4 1 18 1 0
+2  4 1 2 1 12 1 26 -1 0
+2  2 1 18 1 26 -1 0
+2  2 1 24 1 0
+2  28 1 26 1 25 1 0
+Curve2ds 52
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.94999999999999996
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.90000000000000002
+8 0.43213918000000001 1
+7 0 0  8 72 11  2.5236425694120341 1.1500000000000001  2.5236425683191426 1.1403015520909154  2.5228348845828794 1.1306003698069182  2.5212192656726353 1.1210128783693918  2.5188272283365647 1.1116334137525825  2.515709122210974 1.1025376848668826  2.5119247544283074 1.0937854933494229  2.5075375752237332 1.0854227109619752  2.4968853455349729 1.068249470811699  2.4904280242146055 1.0595835604791797  2.4833270105733645 1.051516087115175  2.4756632736353801 1.0440688973344763  2.4675110919195835 1.0372557532262878  2.4589367430178499 1.03108412428609  2.4499969922864464 1.0255573989031896  2.4216542082292061 1.0106205430515762  2.4012023909687357 1.0033056658423609  2.379839987054142 0.99878910199429438  2.3580107724641359 0.99713928835479915  2.3361535826677726 0.99837036150465641  2.3147071915317783 1.0024726748405415  2.2941172111112018 1.0093822111423576  2.2659835067199809 1.023475570025417  2.2573989771523046 1.0284952407085388  2.2491277390441282 1.0340946568121099  2.2412165988327555 1.040271033783295  2.2337194014843225 1.0470188947598489  2.226696127791254 1.0543286289989084  2.2202122536687545 1.0621854859685513  2.2086416095452348 1.0786997286431936  2.2035154811395556 1.0873303162681029  2.1990344093169636 1.0964301375458565  2.1952769629116426 1.1059533307939176  2.192318459186104 1.1158362127022594  2.1902255588593604 1.1259951300277482  2.1890461478836776 1.1363227435623531  2.1885466781535525 1.1563481073299624  2.1891078644778728 1.1660466736318205  2.1904783921525697 1.175658479414494  2.192632095602228 1.1850865198757725  2.1955224888259535 1.1942516731652679  2.1990920591082261 1.2030902984670548  2.2032779764791779 1.2115524984806818  2.213516373048626 1.2289511484322104  2.219764628348837 1.2377484745104383  2.2266720754895424 1.2459581030167104  2.2341567432604177 1.2535558710131363  2.2421431414367876 1.2605265985468377  2.2505638840002038 1.2668620200658793  2.2593613927190024 1.2725584228467506  2.2873714330438832 1.2880713757958904  2.3076748074995552 1.2957902966013424  2.328942563545235 1.3007207340627089  2.3507330242100468 1.3027900120130802  2.3726075578401655 1.3019797850319212  2.3941277573934761 1.2982949535504336  2.4148465162419619 1.2917949327931013  2.4438146824809506 1.2780235722812838  2.4530277974675463 1.2728433452075765  2.4618981004563789 1.2670066896745276  2.4703702513920431 1.2605165902476647  2.4783800732823886 1.2533792693115566  2.4858557204397407 1.2456061025364378  2.4927184557277235 1.2372148845999686  2.5046262707997657 1.2198600892236375  2.5097672895579315 1.2109693186295689  2.5142246710190301 1.2015934064125477  2.5179138519637467 1.1917844555158239  2.5207552809443525 1.1816139787830962  2.5226803096710722 1.1711751156735983  2.5236425682190675 1.1605865258769157  2.5236425694120341 1.1500000000000001 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 72 11  0 0.91258774101503437  0.064656319393898584 0.91258774085110028  0.12933031390327407 0.91246661747546187  0.19366037126984828 0.91222419361831175  0.25742531971348642 0.91186869550888794  0.3204843867935695 0.91141397332393204  0.3827395801099131 0.91087710479215467  0.44412048984323332 0.91027638195470539  0.57490861614156619 0.90887768236508293  0.6440276192164659 0.90806317247564328  0.71205275101529109 0.90721245597563149  0.77908469897221011 0.90635095610964944  0.84522490698165043 0.90550182260364254  0.91058296867556865 0.90468516052912362  0.97528711629646181 0.90391788023256858  1.1718298829276412 0.90176388552112308  1.302137153163984 0.90058282317537219  1.4313848292800009 0.89980028464217399  1.560094654639486 0.89950392978415405  1.6887796016932857 0.89972654295637855  1.817938639823989 0.90044154957543143  1.9480832947875468 0.9015665596789586  2.1407843793746792 0.90362414224806997  2.2018839672277224 0.9043324414154339  2.2635327058374979 0.90508947612652135  2.3258391857636487 0.90588144380120206  2.3888992800015889 0.90669206504716804  2.4528043565282962 0.90750265047910272  2.5176484640262751 0.90829254572888118  2.6474337984947138 0.90976482628924149  2.7123486389596096 0.91045013717022827  2.7782731920357513 0.91107477771117262  2.8451604415316947 0.91161641086637746  2.9129177941816127 0.91205309723014805  2.9814040612585 0.91236599440793897  3.0503922248876076 0.91254279072748057  3.1839273479256254 0.91261769284168937  3.2484945951658362 0.91253362435340957  3.3127880114922448 0.91232744427405577  3.3765730049422387 0.91200583925394552  3.4396958204284469 0.91158149463156324  3.5020447803764787 0.91107079481629749  3.5635334785105464 0.91049179564299121  3.6944737236149692 0.90913137144465006  3.763645856026629 0.90833193203774287  3.831713149419993 0.90749035597241734  3.8987686092307512 0.9066322618494782  3.9649091497400737 0.90578113920391523  4.0302414985737247 0.90495747691957162  4.0948922768924758 0.90417856223025872  4.2916743249301961 0.90197044191645803  4.4221434504122525 0.90073516124072761  4.5514759545336654 0.89988621464534635  4.6802047572046099 0.89951637280717933  4.8088585153839754 0.89966459088939166  4.9379239210447086 0.90031056524266273  5.0679034062872255 0.90137736851015837  5.2640016913951557 0.90341171093402928  5.3288247923109671 0.90415147997128897  5.3942457123350867 0.90494966886961503  5.4603947106310269 0.90579013983936107  5.5273858463535337 0.90665358174809563  5.5953280919503001 0.90751757984198533  5.664335264128268 0.90835721374486311  5.799936167417048 0.90988122788446191  5.8664158994856255 0.9105727841268868  5.933951445063486 0.91119804733603771  6.0024794822537695 0.91173306295851675  6.0718892115889433 0.91215463016542109  6.1420180297445732 0.91244340723025208  6.2126084680001457 0.91258774083608896  6.2831853071795862 0.91258774101503426 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 72 11  2.5236425694120341 1.1500000000000001  2.5236425683191426 1.1403015520909154  2.5228348845828794 1.1306003698069182  2.5212192656726353 1.1210128783693918  2.5188272283365647 1.1116334137525825  2.515709122210974 1.1025376848668826  2.5119247544283074 1.0937854933494229  2.5075375752237332 1.0854227109619752  2.4968853455349729 1.068249470811699  2.4904280242146055 1.0595835604791797  2.4833270105733645 1.051516087115175  2.4756632736353801 1.0440688973344763  2.4675110919195835 1.0372557532262878  2.4589367430178499 1.03108412428609  2.4499969922864464 1.0255573989031896  2.4216542082292061 1.0106205430515762  2.4012023909687357 1.0033056658423609  2.379839987054142 0.99878910199429438  2.3580107724641359 0.99713928835479915  2.3361535826677726 0.99837036150465641  2.3147071915317783 1.0024726748405415  2.2941172111112018 1.0093822111423576  2.2659835067199809 1.023475570025417  2.2573989771523046 1.0284952407085388  2.2491277390441282 1.0340946568121099  2.2412165988327555 1.040271033783295  2.2337194014843225 1.0470188947598489  2.226696127791254 1.0543286289989084  2.2202122536687545 1.0621854859685513  2.2086416095452348 1.0786997286431936  2.2035154811395556 1.0873303162681029  2.1990344093169636 1.0964301375458565  2.1952769629116426 1.1059533307939176  2.192318459186104 1.1158362127022594  2.1902255588593604 1.1259951300277482  2.1890461478836776 1.1363227435623531  2.1885466781535525 1.1563481073299624  2.1891078644778728 1.1660466736318205  2.1904783921525697 1.175658479414494  2.192632095602228 1.1850865198757725  2.1955224888259535 1.1942516731652679  2.1990920591082261 1.2030902984670548  2.2032779764791779 1.2115524984806818  2.213516373048626 1.2289511484322104  2.219764628348837 1.2377484745104383  2.2266720754895424 1.2459581030167104  2.2341567432604177 1.2535558710131363  2.2421431414367876 1.2605265985468377  2.2505638840002038 1.2668620200658793  2.2593613927190024 1.2725584228467506  2.2873714330438832 1.2880713757958904  2.3076748074995552 1.2957902966013424  2.328942563545235 1.3007207340627089  2.3507330242100468 1.3027900120130802  2.3726075578401655 1.3019797850319212  2.3941277573934761 1.2982949535504336  2.4148465162419619 1.2917949327931013  2.4438146824809506 1.2780235722812838  2.4530277974675463 1.2728433452075765  2.4618981004563789 1.2670066896745276  2.4703702513920431 1.2605165902476647  2.4783800732823886 1.2533792693115566  2.4858557204397407 1.2456061025364378  2.4927184557277235 1.2372148845999686  2.5046262707997657 1.2198600892236375  2.5097672895579315 1.2109693186295689  2.5142246710190301 1.2015934064125477  2.5179138519637467 1.1917844555158239  2.5207552809443525 1.1816139787830962  2.5226803096710722 1.1711751156735983  2.5236425682190675 1.1605865258769157  2.5236425694120341 1.1500000000000001 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 72 11  0 0.91258774101503437  0.064656319393898584 0.91258774085110028  0.12933031390327407 0.91246661747546187  0.19366037126984828 0.91222419361831175  0.25742531971348642 0.91186869550888794  0.3204843867935695 0.91141397332393204  0.3827395801099131 0.91087710479215467  0.44412048984323332 0.91027638195470539  0.57490861614156619 0.90887768236508293  0.6440276192164659 0.90806317247564328  0.71205275101529109 0.90721245597563149  0.77908469897221011 0.90635095610964944  0.84522490698165043 0.90550182260364254  0.91058296867556865 0.90468516052912362  0.97528711629646181 0.90391788023256858  1.1718298829276412 0.90176388552112308  1.302137153163984 0.90058282317537219  1.4313848292800009 0.89980028464217399  1.560094654639486 0.89950392978415405  1.6887796016932857 0.89972654295637855  1.817938639823989 0.90044154957543143  1.9480832947875468 0.9015665596789586  2.1407843793746792 0.90362414224806997  2.2018839672277224 0.9043324414154339  2.2635327058374979 0.90508947612652135  2.3258391857636487 0.90588144380120206  2.3888992800015889 0.90669206504716804  2.4528043565282962 0.90750265047910272  2.5176484640262751 0.90829254572888118  2.6474337984947138 0.90976482628924149  2.7123486389596096 0.91045013717022827  2.7782731920357513 0.91107477771117262  2.8451604415316947 0.91161641086637746  2.9129177941816127 0.91205309723014805  2.9814040612585 0.91236599440793897  3.0503922248876076 0.91254279072748057  3.1839273479256254 0.91261769284168937  3.2484945951658362 0.91253362435340957  3.3127880114922448 0.91232744427405577  3.3765730049422387 0.91200583925394552  3.4396958204284469 0.91158149463156324  3.5020447803764787 0.91107079481629749  3.5635334785105464 0.91049179564299121  3.6944737236149692 0.90913137144465006  3.763645856026629 0.90833193203774287  3.831713149419993 0.90749035597241734  3.8987686092307512 0.9066322618494782  3.9649091497400737 0.90578113920391523  4.0302414985737247 0.90495747691957162  4.0948922768924758 0.90417856223025872  4.2916743249301961 0.90197044191645803  4.4221434504122525 0.90073516124072761  4.5514759545336654 0.89988621464534635  4.6802047572046099 0.89951637280717933  4.8088585153839754 0.89966459088939166  4.9379239210447086 0.90031056524266273  5.0679034062872255 0.90137736851015837  5.2640016913951557 0.90341171093402928  5.3288247923109671 0.90415147997128897  5.3942457123350867 0.90494966886961503  5.4603947106310269 0.90579013983936107  5.5273858463535337 0.90665358174809563  5.5953280919503001 0.90751757984198533  5.664335264128268 0.90835721374486311  5.799936167417048 0.90988122788446191  5.8664158994856255 0.9105727841268868  5.933951445063486 0.91119804733603771  6.0024794822537695 0.91173306295851675  6.0718892115889433 0.91215463016542109  6.1420180297445732 0.91244340723025208  6.2126084680001457 0.91258774083608896  6.2831853071795862 0.91258774101503426 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  8 58 9  0 1.1500000000000001  0.010431194773283109 1.1500000000000001  0.020849989047903396 1.1493284703966891  0.031096120311728953 1.1479883163962781  0.041068454283130419 1.1460235763863611  0.050706002232008954 1.1434873970461039  0.059977417523150452 1.1404290889326325  0.068875477312803857 1.1368870240038074  0.086942682857524572 1.1283949595635283  0.096012064841865336 1.1233340896201689  0.10467612662270122 1.1176980048932865  0.11295761948097738 1.1114555709253888  0.12087066390076719 1.1045819338858629  0.1284075783625869 1.0969632122036779  0.13555980261989836 1.0885148467821006  0.14505876775099205 1.0748151898859339  0.14768338103054846 1.0707086572270215  0.15014318157599571 1.066517952700353  0.15243396413343066 1.0622492155580179  0.15455187623156863 1.0579087732230901  0.15649341818174345 1.0535031412896314  0.1582554430779074 1.0490390235226894  0.16220455019317073 1.0377502508463783  0.1641643778086011 1.0308596062191522  0.16570453833893173 1.0238760027188079  0.16681789702717006 1.0168238288700651  0.16749975874298442 1.0097274086035928  0.16774764946709028 1.0026111944342495  0.16756140618036047 0.99549998219414448  0.16607022194933693 0.97840982498602314  0.16441269310003481 0.96935695482883166  0.16223456272294792 0.96116253340727875  0.15970781250613988 0.95375725649074095  0.15696361478029416 0.94704010086981905  0.15406900495516324 0.94089929299088448  0.1510376572685781 0.93519628677687483  0.14532627592760089 0.92560025405693391  0.14267475479644121 0.92150667908451145  0.13986018738800471 0.91749983736414065  0.13688698577378852 0.91358573606393223  0.13375983175725845 0.90977015665003302  0.13048367687384863 0.90605865488662718  0.12706374239096188 0.90245656083593484  0.11747582424716051 0.89305899082914642  0.11121294559831128 0.88763848979254201  0.10471435314382527 0.88263600945233134  0.09797413920045564 0.87801822269787499  0.090984891856121505 0.87376786428582776  0.083737978258264373 0.86987789996276743  0.076222845674517814 0.86635220919523415  0.060710055364801702 0.86008660598343867  0.05271512024889552 0.85733756638704617  0.044440254269759408 0.85497438146016913  0.035898901658061262 0.85302540846751518  0.027120752691711426 0.85152540347741201  0.018155574858741686 0.85050883252399101  0.0090789617954770054 0.8500000008171068  0 0.84999999999999976 
+ 0 9 0.13229762403004616 7 0.27996796770557875 7 0.34121855759820813 7 0.43308757253782593 7 0.56295171984466641 7 0.66292718998370481 7 0.8323436611939603 7 1 9
+7 0 0  8 58 9  3.1415926535897931 0.90000000000000013  3.2041798222294915 0.90000000000000013  3.2666923238087273 0.90011191673895308  3.3285334437941523 0.90033529818332136  3.3894513100485621 0.9006599775976728  3.4493672871180543 0.90107189423165146  3.5083169454565675 0.90155659419197354  3.5664598583583911 0.9021011709613791  3.6884684521754991 0.90335868790294416  3.7521417294181201 0.9040830600602584  3.8158010857354543 0.90485655344458504  3.8800726294929015 0.90566883453235847  3.9454423842050073 0.90651032892009054  4.0128898938558457 0.90736983582552433  4.0831559542476281 0.90823666426341521  4.1905074475373336 0.90944887435175958  4.2219871199173689 0.90979173374613254  4.2534741576193067 0.9101198385798791  4.2849689318520037 0.91043111695129797  4.3164716177481353 0.9107236481867732  4.3479821943641968 0.91099566284077371  4.3795004446805024 0.91124554269585423  4.4583106860638395 0.91181121248338559  4.5056220120744612 0.91209763919929221  4.5529477427358467 0.91232620035577872  4.6002825290712606 0.91249312844692709  4.647624665423935 0.91259586324701281  4.6949731042276612 0.9126331080475385  4.7423246841484987 0.91260486789979389  4.8566001564991312 0.91238185790114534  4.9175298932549589 0.91213474338219802  4.9734471600614576 0.91181298508300501  5.0248548514780627 0.91144643456537944  5.0723778036818059 0.91105642538785359  5.1166890069411144 0.91065381960287184  5.1587025909104973 0.91024143354506315  5.2311005241547157 0.90948441466664842  5.2625851972527293 0.90913922071327768  5.2940632133175338 0.90878020154621486  5.3255350420117731 0.90840950745514193  5.357001352285403 0.90802935780255822  5.3884630123756931 0.9076420410237811  5.4199210898072261 0.9072499146269456  5.5046811681357468 0.90618687724245339  5.5565294367492672 0.90552960679963801  5.6075153831747784 0.90488837329785832  5.6580086701726886 0.90426795089502299  5.7083023358027756 0.90367351071952495  5.7586547806839166 0.90311074052241924  5.8092966749922894 0.90258591220765494  5.9111179453213989 0.9016313278808803  5.9623060367547422 0.90120044337752425  6.0141920179006991 0.90082122689279875  6.0668349021431798 0.90050265705403254  6.1202204680401042 0.90025427107114364  6.1742523008577512 0.90008478478757903  6.2287115364067258 0.90000000013618453  6.2831853071795862 0.90000000000000024 
+ 0 9 0.13229762403004616 7 0.27996796770557875 7 0.34121855759820813 7 0.43308757253782593 7 0.56295171984466641 7 0.66292718998370481 7 0.8323436611939603 7 1 9
+1 0 2 1 0 
+2 0 0 1 0 -0 1 0.90000000000000002
+7 0 0  8 65 10  6.2831853071795862 0.84999999999999987  6.2722511243565489 0.85000000098407669  6.2613354160580545 0.85073785813964964  6.2506196626753567 0.85220904801051112  6.2402144388851957 0.8543606904066845  6.2301841088971353 0.85713140947797239  6.2205596680667812 0.86046603673590383  6.2113449610428173 0.86432332927482225  6.1979123547225923 0.87097846333872109  6.1933938987769466 0.873410338009323  6.188972950351415 0.87598695067327503  6.1846561190689497 0.87870449414205343  6.1804498126029275 0.88155890381998692  6.1763602366771515 0.88454585770425698  6.1723933950658472 0.88766077638489826  6.164237023760621 0.89454160206518918  6.1600812110586807 0.89834062923441405  6.1560962725319444 0.90228864811813914  6.1522900775403349 0.90637849695592454  6.1486699176115893 0.91060288062336692  6.1452426802932614 0.91495414259424612  6.1420150230047117 0.91942403690266949  6.1348332550635627 0.93030899536582734  6.1310075635758139 0.93690719284295121  6.1273467715995329 0.94409640378137683  6.1238465563310527 0.95213480001279893  6.1206386201140264 0.96122360731956058  6.117966398333718 0.97150270402638927  6.1161881540091869 0.98308501515356028  6.1156549169398309 1.0007063636426647  6.1157040816928516 1.0054441604746787  6.1159459032193677 1.0101793244374737  6.1163801624911986 1.0149044841660333  6.1170061549710111 1.019612296448277  6.1178226906123196 1.0242954462250593  6.1188280938594879 1.0289466465901682  6.1213613237510289 1.0387471168289739  6.1229389232149103 1.0438865283849501  6.1247497692348185 1.0489661926567349  6.1267901593218808 1.0539762046896515  6.129055842869958 1.0589071821151097  6.1315419427226976 1.063750011889844  6.134242876740589 1.0684955970351526  6.1397384644739059 1.0772582433949125  6.1424896557133009 1.081298155497417  6.1454015749198989 1.0852481991795362  6.1484696824080256 1.0891024614202203  6.1516891769726287 1.0928552566814889  6.1550549958892802 1.0965011269084295  6.1585618149141759 1.1000348415291969  6.1683315413691178 1.1091992232210854  6.1746923063673114 1.1144747706960325  6.1812910829301746 1.1193422446284795  6.1881351492041761 1.1238309526393317  6.1952326926457681 1.1279547218360269  6.2025925179117252 1.1317172353019247  6.2102245241336149 1.1351116158019805  6.2255350321879499 1.1409352982566341  6.2331796559582244 1.1434143495585005  6.2410720104596695 1.1455417030435207  6.2491975956443486 1.1472921060311572  6.2575280369749002 1.1486360617430751  6.2660181332033913 1.1495451935799141  6.2746015711068637 1.1500000000000001  6.2831853071795862 1.1500000000000001 
+ 0 9 0.20769551692732596 7 0.31619045992063632 7 0.43824648432856717 7 0.60630628727767011 7 0.66802358049470334 7 0.73745535890280278 7 0.79917367506218406 7 0.90300517542744296 7 1 9
+7 0 0  8 65 10  0 0.90000000000000013  0.065605096938223528 0.90000000016401283  0.1310989665820616 0.90012297020742715  0.19581343441641286 0.90036819746015384  0.25949070837694088 0.90072344533202642  0.32206820363949173 0.90117226199594835  0.38360875270147315 0.90169811783933351  0.44431926544977512 0.90228653904354206  0.53609052402787005 0.90326065443951442  0.56757287322912831 0.90361013252625755  0.59904861817168309 0.90397278365279798  0.63051849741588983 0.90434647922112887  0.66198332142436056 0.90472901729368083  0.69344397256196577 0.90511812259331959  0.72490140509583356 0.90551144650334847  0.79174356229415532 0.90635107483803035  0.82713129927355444 0.90679793531463238  0.86251760702700231 0.90724373385101964  0.89790420236879109 0.90768507147468902  0.93329467427540291 0.90811859145054008  0.96869239012686281 0.90854100584448594  1.0040984019480923 0.90894912208706691  1.0882669410291634 0.90987789246356299  1.1376916590662074 0.91039026212722884  1.1901873216996746 0.91089394884709363  1.2474488083152029 0.91138912618748635  1.3106315259878139 0.91185548303304764  1.3805254070567268 0.91225392825484453  1.4579955604597858 0.91252041635675407  1.5755135678421708 0.91260037309219999  1.6070794928372802 0.91259301650134261  1.6386453937444778 0.91255669860449651  1.6702101182150797 0.91249154134403088  1.7017724008116302 0.91239791723116914  1.7333308630079045 0.91227644934598839  1.7648840131889061 0.91212801133742027  1.831919669099106 0.91175765851811852  1.8674039570748313 0.91152884452430549  1.9028777860791892 0.91126887802662571  1.9383402039912558 0.91097968691047326  1.973792560892706 0.91066350808694108  2.0092364388924713 0.91032286121794159  2.0446715819514059 0.90996052244132375  2.1115808665015789 0.90924080331460033  2.1430612457125942 0.90888727950877746  2.1745353401845566 0.90852106087635143  2.2060037137458743 0.90814434072160688  2.237467117208809 0.90775937145528518  2.2689264883694693 0.90736846459458187  2.3003829520078165 0.90697399076314833  2.3847557594717737 0.90591282538357165  2.4363735706090237 0.90526027033327072  2.4872471698577674 0.90462534542106821  2.5377306516235754 0.9040128552018909  2.5881057752898551 0.90342811642446519  2.6386205470096074 0.90287705988625122  2.6894968577270562 0.90236627891453058  2.7890484138037208 0.9014706270468773  2.8376623340440035 0.90107954402946888  2.8869202684930011 0.90073678248023969  2.9368571392238789 0.90045005679238022  2.9874460476666722 0.90022734982617914  3.0385899293252812 0.90007578605279026  3.0900902371534578 0.90000000000000024  3.1415926535897931 0.90000000000000024 
+ 0 9 0.20769551692732596 7 0.31619045992063632 7 0.43824648432856717 7 0.60630628727767011 7 0.66802358049470334 7 0.73745535890280278 7 0.79917367506218406 7 0.90300517542744296 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  8 58 9  0 1.1500000000000001  0.0098770024738014141 1.1500000000000001  0.0197426346227958 1.149329174595449  0.029445795127387403 1.1479903370412941  0.038890947555268354 1.1460271003364395  0.048020317326499182 1.1434921328298695  0.056804012805391088 1.1404343369856897  0.065234814212553685 1.1368918174222309  0.082347010106017735 1.1284001672939885  0.090934717078194963 1.1233407739324142  0.099139177402613632 1.1177055018221427  0.10698165621369619 1.1114630021517473  0.11447524836062328 1.1045882790283141  0.12161239726894689 1.0969673382132563  0.12838471214153288 1.0885156232909863  0.13737700607371345 1.074810935396213  0.13986084892181716 1.0707039051380214  0.14218852499664933 1.0665127862041435  0.14435608415741022 1.0622437354583703  0.1463599127641626 1.0579030934730163  0.14819673367783212 1.0534973845289224  0.14986360626020717 1.0490333166154546  0.15359924636623221 1.0377449626797324  0.1554528997318958 1.0308548934948272  0.15690947853266685 1.0238721391370944  0.15796234410592275 1.0168210319896571  0.15860713396032478 1.0097258388375341  0.15884155464077973 1.002610947745765  0.15866546056271905 0.99550107453558578  0.15725599432103715 0.97842177976150824  0.15569000273588093 0.96937262139993718  0.15363094008110223 0.96117933149986656  0.15124140609804634 0.95377298166537161  0.14864507438710281 0.94705361795013032  0.14590565617702625 0.94090997773528751  0.14303632687999432 0.93520427909351544  0.13763109971910509 0.9256061279332698  0.13512186290280653 0.92151209577606341  0.13245811805979865 0.91750471197783068  0.12964401323618635 0.91359000269544344  0.12668395814247119 0.9097737694244501  0.12358262415355145 0.90606158899907485  0.1203449443087222 0.90245881359221669  0.11126557177279718 0.89305761281909679  0.1053339708747013 0.88763504123459824  0.099179046014981134 0.88263127810142661  0.092795332548539181 0.87801291993853647  0.08617594888881952 0.8737626155804098  0.079312869360086774 0.86987322749734752  0.072196273248619436 0.86634851296830517  0.057502582279756194 0.86008320081504364  0.04992762919821226 0.8573339451690819  0.042088207457868759 0.85497118559992002  0.033997276248728107 0.8530230825522046  0.025683055642118941 0.85152409962212028  0.017192630586457338 0.85050838501876558  0.008597347005630071 0.85000000081674787  0 0.84999999999999976 
+ 0 9 0.13245981261509418 7 0.2801979720647354 7 0.34145692201646749 7 0.4333387805098462 7 0.56311923633956151 7 0.66300625907899968 7 0.8323258221702976 7 1 9
+7 0 0  8 58 9  3.1415926535897931 0.84999999999999976  3.2041470025905356 0.84999999999999976  3.2666290774682634 0.85010591523050982  3.3284472419147559 0.85031733173013357  3.3893520023051935 0.85062468363134269  3.4492657658633585 0.85101471831042308  3.5082241661827762 0.85147378799114415  3.5663856589455545 0.8519896773053971  3.6883995715498057 0.85318061346465757  3.7520630373222428 0.85386642461913143  3.8157218924212732 0.8545987975498609  3.8800014155946809 0.85536794655494774  3.9453867345115103 0.85616479008039525  4.0128567587121635 0.85697869019857553  4.0831512272115651 0.8577994790297232  4.1905402226752573 0.85894705082017053  4.2220230882307783 0.85927152785615168  4.2535126033636539 0.85958201593084604  4.2850090711031275 0.85987655675361063  4.3165126240841634 0.86015333603148503  4.3480232245474495 0.86041068346918881  4.3795406643393928 0.86064707276912233  4.4583470366793554 0.86118217198053315  4.5056539531461945 0.86145308439974166  4.552973640022163 0.86166924314685267  4.6003011415211885 0.8618271014371357  4.6476350827576418 0.86192425048685983  4.6949747569552773 0.86195947145785279  4.7423174374690307 0.8619327703030395  4.8565201383482925 0.8617219811603094  4.9174241332959454 0.86148851255591874  4.9733317556483465 0.86118433586349263  5.0247446365750852 0.860837673328126  5.0722810286185869 0.86046865927906158  5.116610981080008 0.86008762145990436  5.1586433115593522 0.85969726545047553  5.2310554248570345 0.858980808148195  5.2625427753256959 0.85865412874985902  5.294024197084239 0.85831433825568348  5.325500082883825 0.85796346984328953  5.3569710075451766 0.85760362330934381  5.3884377279585722 0.85723696506956049  5.4199011830838497 0.85686572815870066  5.5046928992834685 0.85585906137649714  5.5565620148414308 0.85523656430470529  5.6075637540243566 0.85462926536180528  5.6580675987289091 0.85404169917192374  5.7083662763630496 0.853478771435076  5.7587177739843698 0.85294587191820415  5.8093521464427962 0.85244893713469971  5.9111778364177523 0.85154483758353394  5.9623791930915706 0.8511366563924001  6.0142706379674493 0.85077749073420761  6.0669106483567541 0.85047583254196679  6.1202852525274389 0.85024068227530181  6.1742990866934164 0.85008025189640668  6.2287354428105957 0.85000000012896049  6.2831853071795862 0.85000000000000042 
+ 0 9 0.13245981261509418 7 0.2801979720647354 7 0.34145692201646749 7 0.4333387805098462 7 0.56311923633956151 7 0.66300625907899968 7 0.8323258221702976 7 1 9
+1 0 2 1 0 
+2 0 0 1 0 -0 1 0.94999999999999996
+7 0 0  8 65 10  6.2831853071795862 0.84999999999999987  6.2728322564238335 0.85000000098353978  6.262496219234384 0.85073705344169204  6.2523483452553199 0.85220675935034673  6.2424931268192552 0.85435674099642744  6.2329915702494834 0.85712616816968368  6.2238732806425103 0.86046032614507417  6.2151423404435509 0.86431826108309351  6.2024163698396926 0.87097508263801915  6.1981368587804457 0.87340699197375127  6.1939498000866289 0.87598372681721104  6.189861471250194 0.87870148429691008  6.1858779561182873 0.88155619933525842  6.182005144893254 0.88454354464856522  6.1782487341326346 0.88765893074703783  6.1705254323289944 0.89454087950920114  6.1665905126569376 0.89834058306758413  6.1628176449821037 0.90228933592696137  6.1592142811654034 0.9063799495560233  6.1557873140444004 0.91060509990130023  6.15254324379816 0.91495709971333961  6.1494883443120978 0.91942767087288313  6.1426909188353385 0.93031501464196076  6.1390687860376669 0.93691728011764697  6.1356034668961899 0.9441112233390434  6.132291400741277 0.95215347193751254  6.1292579082977321 0.96124448141813579  6.1267322043251076 0.97152226378185613  6.1250531186667976 0.98309962368766834  6.1245491890979906 1.0007061581176486  6.1245956794147043 1.0054430802413579  6.1248243506994582 1.0101773720372325  6.1252349988829646 1.0149016872265124  6.1258269683623299 1.019608706281858  6.1265991520010532 1.0242911364273521  6.127549991129027 1.0289417116385  6.1299458918813245 1.0387410939391579  6.1314380389525107 1.0438800581732839  6.1331509070602142 1.0489594359589394  6.1350810446042647 1.0539693322789927  6.137224482537091 1.0589003597961357  6.1395766588206167 1.0637433921641701  6.142132342883154 1.0684893173392962  6.1473329084911166 1.0772528419367222  6.1499366024156839 1.0812932597643987  6.1526926245394673 1.0852438841119592  6.1555967034726793 1.0890987817285769  6.1586443137462696 1.0928522463750714  6.1618306758119266 1.0964987988239079  6.1651507560420775 1.1000331868591959  6.1744026769982225 1.1092011009276961  6.1804272067257253 1.1144786336505681  6.1866772113967716 1.1193473003311731  6.1931594510456662 1.1238364887236076  6.1998815381838055 1.1279601163376414  6.2068516559995954 1.1317219748778373  6.2140789980600699 1.1351153169185388  6.2285808747041402 1.1409384558352007  6.2358237862661907 1.1434176041555129  6.2433006984091648 1.1455445198075174  6.2509976972562935 1.1472941281783562  6.2588878410234194 1.1486371838983909  6.2669283844629939 1.1495455758526516  6.2750567588028234 1.1500000000000001  6.2831853071795862 1.1500000000000001 
+ 0 9 0.20764496176684977 7 0.31606848072882715 7 0.43804415241506528 7 0.6060199603204286 7 0.667762211557411 7 0.73722204561262683 7 0.79896523652129325 7 0.90287127033062087 7 1 9
+7 0 0  8 65 10  0 0.84999999999999976  0.065569321453100932 0.85000000015529564  0.13103051284959838 0.85011637107621785  0.19572085625326127 0.8503484571176696  0.25938496610799794 0.85068474367129088  0.32196125286051458 0.85110972189126521  0.38351252180266504 0.85160778055637554  0.44424435032037768 0.85216521680234181  0.53604652772280381 0.8530880109867518  0.56753166977943403 0.8534189844710881  0.59901092010248269 0.85376242929545743  0.63048494021365564 0.85411632724224784  0.66195444595981523 0.85447859049226438  0.69342020751298128 0.85484706162472879  0.7248830493703301 0.85521951361727999  0.79173702305817184 0.85601455038705476  0.82713125482522853 0.85643765802720873  0.8625240638277758 0.85685973498942325  0.89791696527940801 0.85727755971183128  0.93331336895687189 0.857687952124911  0.96871647672204042 0.85808779892868559  1.0041271800438811 0.85847407886992311  1.088312550673741 0.85935316162927244  1.1377670057642983 0.85983827722903772  1.1902949797767628 0.86031509645488691  1.2475803809631025 0.86078369085132311  1.3107746982474544 0.86122472299306019  1.3806564228433114 0.86160132754682273  1.4580929957176822 0.86185295568577924  1.5755121935346037 0.86192851788913649  1.6070723016585957 0.86192156154384603  1.6386323887201435 0.8618872186468276  1.6701914418448862 0.86182560398298802  1.7017483320848719 0.86173706816977291  1.7333018144185575 0.86162219765716597  1.7648505277508111 0.86148181472768959  1.8318781690177908 0.86113153614138715  1.8673589605693293 0.86091511368618279  1.9028302623575859 0.86066920932887181  1.9382912149991467 0.86039563951068965  1.9737431787813979 0.86009651344834359  2.0091877055067986 0.85977420866632814  2.0446245103371528 0.85943134652923936  2.1115388425036374 0.85875024753070894  2.1430223407119526 0.85841566777764433  2.1745002429727411 0.85806904583512378  2.2059730257287202 0.85771245617781  2.2374413371554054 0.85734803043480345  2.2689059971611112 0.85697795738964089  2.3003679973869549 0.8566044829802959  2.3847725769091306 0.85559955153256317  2.4364111890533313 0.85498150174056398  2.4873004148231463 0.85438016400793682  2.537794157706065 0.85380010113460247  2.5881738500500271 0.85324635596782883  2.6386870591184555 0.85272454748563264  2.6895550238374719 0.85224091529286783  2.7891071632956579 0.85139265183303359  2.8377320374952899 0.85102218433168253  2.8869938607747518 0.85069755211461184  2.9369271718851451 0.85042604890240603  2.9875053837220107 0.85021520667960593  3.0386324603916344 0.85007173705333805  3.0901118472036275 0.84999999999999976  3.1415926535897931 0.84999999999999976 
+ 0 9 0.20764496176684977 7 0.31606848072882715 7 0.43804415241506528 7 0.6060199603204286 7 0.667762211557411 7 0.73722204561262683 7 0.79896523652129325 7 0.90287127033062087 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 72 11  2.5147527708300452 1.1500000000000001  2.5147527697968846 1.1403080939310817  2.5139897471992279 1.1306130592123627  2.5124633407154864 1.1210299264371137  2.5102026254180569 1.1116523473795883  2.5072542888711151 1.1025559225037624  2.5036740970817104 1.0938008009317788  2.4995216513041658 1.0854335528720971  2.4894389793983525 1.0682545848793696  2.4833268717677801 1.059586370186764  2.4766039156521051 1.0515162197365  2.4693469754066948 1.0440667267110091  2.4616267851044293 1.0372520654645236  2.4535066180164891 1.0310798876895924  2.445040817365741 1.0255535774537705  2.4181849235774089 1.0106097220023136  2.3988107391449209 1.0033003027100977  2.3785814050729033 0.99878996126697306  2.3579136853392413 0.99714350899884596  2.3372199636045297 0.99837210809301724  2.3169123518799508 1.0024684679391307  2.2974086837081762 1.009371761947458  2.2707510809045184 1.0234708391771508  2.2626217310887444 1.0284897710688863  2.2547885547628952 1.0340892789857246  2.2472963604958855 1.0402666478468998  2.24019658789204 1.0470163225578755  2.2335464221571057 1.0543284276539069  2.2274081230934186 1.0621876790495597  2.21645405664332 1.0787087767248305  2.2116013279111604 1.0873445808501536  2.2073612289049551 1.0964483186209975  2.2038077327358638 1.1059731897490785  2.2010112543654383 1.1158549285554715  2.1990337638463453 1.1260097624237517  2.1979195332500479 1.1363308368903215  2.1974474267912747 1.1563425267323342  2.1979775274935673 1.1660349832256913  2.1992722496118424 1.175642167352472  2.2013074986723735 1.185067924670004  2.2040402363510845 1.1942333782340526  2.2074169150015321 1.2030746413748339  2.2113786016266168 1.2115411822399724  2.2210689139232094 1.2289450981366352  2.2269826135717889 1.2377444494294323  2.2335218370703096 1.2459566926865131  2.2406088383639302 1.2535568707461198  2.2481717821114025 1.2605293360737604  2.2561463705065368 1.2668655829017634  2.2644774933221616 1.2725618460156369  2.2910186132777173 1.288082955578453  2.3102535793187227 1.2957971742529191  2.3303946297332825 1.3007210744215394  2.3510262684829266 1.3027859962867125  2.371736036811134 1.3019771495875034  2.3921123252206709 1.298297733210946  2.4117364968236794 1.2918044519491163  2.4391835336785435 1.2780286215120875  2.4479081476945974 1.2728493958276725  2.4563087991963068 1.267012808798873  2.4643324990005886 1.2605217312820252  2.4719179254945098 1.2533824526069131  2.4789965704215398 1.2456066462027628  2.4854935619571807 1.2372127466299649  2.4967667285596549 1.2198506792962571  2.5016334779085585 1.210954436903668  2.505850951064815 1.2015745313007971  2.50933959915002 1.1917640480797689  2.5120251248372414 1.1815950578558718  2.5138437849559265 1.1711607131600001  2.5147527697023211 1.1605789847800685  2.5147527708300448 1.1500000000000001 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 72 11  0 0.86191655651529053  0.064612707126122285 0.86191655636031639  0.12924573020869121 0.86180212960782876  0.19354585986298964 0.86157309471124233  0.25729591690538955 0.86123710569662681  0.32035639097241991 0.86080711576441327  0.38262860369931784 0.86029917448633375  0.44403939645806323 0.85973055859759218  0.57486795355127818 0.85840661295606324  0.64400287432181769 0.8576356184560977  0.71204890605829063 0.85683016101856957  0.77910182489199642 0.85601437172442674  0.84525947275372759 0.85521024659702238  0.91062833301552482 0.85443688833397569  0.97533359101421147 0.85371034777523858  1.1719801299999779 0.8516694748625373  1.3022834888085997 0.85055125474431648  1.4314766584552194 0.84981092916349099  1.5601041519930758 0.84953067224803502  1.6887037287030167 0.84974121718316986  1.8178002752140883 0.85041758551901458  1.9479294730813748 0.85148259056302278  2.1407247176672937 0.85343205566261304  2.2018224006555265 0.85410272515975061  2.2634785459984945 0.85481960219092434  2.3257994445130423 0.85556959404676192  2.3888785304934377 0.85633723805263062  2.4528042944244755 0.85710477479283032  2.5176668897311782 0.85785258844583878  2.6475037518401474 0.85924643915066878  2.7124548059952787 0.85989523815533475  2.7784031961347284 0.86048634285730596  2.8452977635683716 0.86099861475006978  2.9130442766767723 0.86141139853000781  2.9815018328086702 0.86170704183096547  3.0504461980454147 0.8618740676459411  3.1838901307005112 0.86194486627902545  3.2484167898623117 0.86186545349851917  3.3126788740444084 0.86167068082639886  3.3764467099490378 0.86136675926777828  3.439568492257342 0.86096553909032658  3.5019324141407755 0.86048240230117967  3.5634497971151728 0.85993438588595073  3.6944264688738575 0.85864675673827295  3.763611831524952 0.85789009239059277  3.831698590852211 0.85709334149357019  3.8987747301284301 0.85628081102628562  3.96493344513729 0.85547481624035604  4.0302782166345557 0.85469482642125105  4.0949324433709124 0.85395725639069375  4.2918279602021681 0.85186504201537583  4.42230481064309 0.85069535227381643  4.5515912561482157 0.84989213745935965  4.680241461467225 0.8495424263176341  4.8088075381056594 0.84968267570503098  4.9378030231952801 0.85029371126386932  5.0677557379892928 0.85130349444005904  5.2639357073874811 0.85323083557927604  5.3287550797626038 0.8539312901781142  5.3941832619671581 0.85468713755682213  5.4603478208302398 0.85548307392919354  5.5273599902755972 0.85630075741284428  5.5953253964806722 0.85711888670277858  5.664353211856624 0.85791379283252311  5.8000085325218107 0.85935660743541886  5.8665260101888457 0.86001131025199462  5.934085587125824 0.86060297662612295  6.002619791362406 0.86110894688684436  6.0720165141401674 0.86150739360839024  6.1421140407577868 0.86178021334686006  6.212658741979129 0.86191655634613185  6.2831853071795862 0.86191655651529053 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 72 11  2.5147527708300452 1.1500000000000001  2.5147527697968846 1.1403080939310817  2.5139897471992279 1.1306130592123627  2.5124633407154864 1.1210299264371137  2.5102026254180569 1.1116523473795883  2.5072542888711151 1.1025559225037624  2.5036740970817104 1.0938008009317788  2.4995216513041658 1.0854335528720971  2.4894389793983525 1.0682545848793696  2.4833268717677801 1.059586370186764  2.4766039156521051 1.0515162197365  2.4693469754066948 1.0440667267110091  2.4616267851044293 1.0372520654645236  2.4535066180164891 1.0310798876895924  2.445040817365741 1.0255535774537705  2.4181849235774089 1.0106097220023136  2.3988107391449209 1.0033003027100977  2.3785814050729033 0.99878996126697306  2.3579136853392413 0.99714350899884596  2.3372199636045297 0.99837210809301724  2.3169123518799508 1.0024684679391307  2.2974086837081762 1.009371761947458  2.2707510809045184 1.0234708391771508  2.2626217310887444 1.0284897710688863  2.2547885547628952 1.0340892789857246  2.2472963604958855 1.0402666478468998  2.24019658789204 1.0470163225578755  2.2335464221571057 1.0543284276539069  2.2274081230934186 1.0621876790495597  2.21645405664332 1.0787087767248305  2.2116013279111604 1.0873445808501536  2.2073612289049551 1.0964483186209975  2.2038077327358638 1.1059731897490785  2.2010112543654383 1.1158549285554715  2.1990337638463453 1.1260097624237517  2.1979195332500479 1.1363308368903215  2.1974474267912747 1.1563425267323342  2.1979775274935673 1.1660349832256913  2.1992722496118424 1.175642167352472  2.2013074986723735 1.185067924670004  2.2040402363510845 1.1942333782340526  2.2074169150015321 1.2030746413748339  2.2113786016266168 1.2115411822399724  2.2210689139232094 1.2289450981366352  2.2269826135717889 1.2377444494294323  2.2335218370703096 1.2459566926865131  2.2406088383639302 1.2535568707461198  2.2481717821114025 1.2605293360737604  2.2561463705065368 1.2668655829017634  2.2644774933221616 1.2725618460156369  2.2910186132777173 1.288082955578453  2.3102535793187227 1.2957971742529191  2.3303946297332825 1.3007210744215394  2.3510262684829266 1.3027859962867125  2.371736036811134 1.3019771495875034  2.3921123252206709 1.298297733210946  2.4117364968236794 1.2918044519491163  2.4391835336785435 1.2780286215120875  2.4479081476945974 1.2728493958276725  2.4563087991963068 1.267012808798873  2.4643324990005886 1.2605217312820252  2.4719179254945098 1.2533824526069131  2.4789965704215398 1.2456066462027628  2.4854935619571807 1.2372127466299649  2.4967667285596549 1.2198506792962571  2.5016334779085585 1.210954436903668  2.505850951064815 1.2015745313007971  2.50933959915002 1.1917640480797689  2.5120251248372414 1.1815950578558718  2.5138437849559265 1.1711607131600001  2.5147527697023211 1.1605789847800685  2.5147527708300448 1.1500000000000001 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 72 11  0 0.86191655651529053  0.064612707126122285 0.86191655636031639  0.12924573020869121 0.86180212960782876  0.19354585986298964 0.86157309471124233  0.25729591690538955 0.86123710569662681  0.32035639097241991 0.86080711576441327  0.38262860369931784 0.86029917448633375  0.44403939645806323 0.85973055859759218  0.57486795355127818 0.85840661295606324  0.64400287432181769 0.8576356184560977  0.71204890605829063 0.85683016101856957  0.77910182489199642 0.85601437172442674  0.84525947275372759 0.85521024659702238  0.91062833301552482 0.85443688833397569  0.97533359101421147 0.85371034777523858  1.1719801299999779 0.8516694748625373  1.3022834888085997 0.85055125474431648  1.4314766584552194 0.84981092916349099  1.5601041519930758 0.84953067224803502  1.6887037287030167 0.84974121718316986  1.8178002752140883 0.85041758551901458  1.9479294730813748 0.85148259056302278  2.1407247176672937 0.85343205566261304  2.2018224006555265 0.85410272515975061  2.2634785459984945 0.85481960219092434  2.3257994445130423 0.85556959404676192  2.3888785304934377 0.85633723805263062  2.4528042944244755 0.85710477479283032  2.5176668897311782 0.85785258844583878  2.6475037518401474 0.85924643915066878  2.7124548059952787 0.85989523815533475  2.7784031961347284 0.86048634285730596  2.8452977635683716 0.86099861475006978  2.9130442766767723 0.86141139853000781  2.9815018328086702 0.86170704183096547  3.0504461980454147 0.8618740676459411  3.1838901307005112 0.86194486627902545  3.2484167898623117 0.86186545349851917  3.3126788740444084 0.86167068082639886  3.3764467099490378 0.86136675926777828  3.439568492257342 0.86096553909032658  3.5019324141407755 0.86048240230117967  3.5634497971151728 0.85993438588595073  3.6944264688738575 0.85864675673827295  3.763611831524952 0.85789009239059277  3.831698590852211 0.85709334149357019  3.8987747301284301 0.85628081102628562  3.96493344513729 0.85547481624035604  4.0302782166345557 0.85469482642125105  4.0949324433709124 0.85395725639069375  4.2918279602021681 0.85186504201537583  4.42230481064309 0.85069535227381643  4.5515912561482157 0.84989213745935965  4.680241461467225 0.8495424263176341  4.8088075381056594 0.84968267570503098  4.9378030231952801 0.85029371126386932  5.0677557379892928 0.85130349444005904  5.2639357073874811 0.85323083557927604  5.3287550797626038 0.8539312901781142  5.3941832619671581 0.85468713755682213  5.4603478208302398 0.85548307392919354  5.5273599902755972 0.85630075741284428  5.5953253964806722 0.85711888670277858  5.664353211856624 0.85791379283252311  5.8000085325218107 0.85935660743541886  5.8665260101888457 0.86001131025199462  5.934085587125824 0.86060297662612295  6.002619791362406 0.86110894688684436  6.0720165141401674 0.86150739360839024  6.1421140407577868 0.86178021334686006  6.212658741979129 0.86191655634613185  6.2831853071795862 0.86191655651529053 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.13
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.14999999999999999
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  8 58 9  0 0.84999999999999987  0.066219598462883555 0.84999999913914537  0.13229230998977201 0.85008915220455861  0.19741071392672083 0.8502667683702001  0.26126732658638718 0.85052273477615459  0.32377396440705936 0.85084388710959791  0.38497601664240005 0.85121737280433707  0.44507281173039431 0.85163219976231908  0.56948233112896041 0.85257070859111572  0.63358959270603066 0.85310048868405941  0.69752688942511165 0.85366047238114484  0.76193421637872261 0.85424298923330988  0.8273237271914603 0.85484078393305152  0.89461159393219347 0.85544528441588719  0.9645330968464676 0.85604810168197187  1.0711007134548605 0.85688191770330924  1.1025933837917017 0.85711853515519443  1.1340913752362842 0.85734386313730504  1.1655947298759128 0.85755647756201414  1.1971034071818207 0.85775507002337781  1.2286172840091707 0.85793844779713557  1.2601361545970542 0.85810553384071075  1.3389425127905732 0.85848010395086016  1.3862434300882465 0.8586660988849707  1.4335531664148331 0.8588101554234151  1.480867857284857 0.85890988346591057  1.528186387013746 0.85896375367680178  1.5755080810775259 0.85897113249642831  1.6228307935925168 0.8589322974710849  1.7346402493129238 0.85873413326926218  1.7941673422750319 0.85854498055462125  1.8494253004218832 0.8583051768029486  1.900888851285605 0.85803310727882398  1.9490339085309931 0.8577417765269334  1.9944259322900364 0.8574389717980746  2.0377619545062933 0.85712748678301087  2.1114471517149425 0.85656556026579789  2.1429373616771925 0.85631480425834505  2.1744234732502901 0.85605497810988751  2.205905791579688 0.85578763427635662  2.2373847477782722 0.85551437013422005  2.2688608989263575 0.85523682798048095  2.3003349280716896 0.85495669503267879  2.3839816336611017 0.85420988875649018  2.4351199350629451 0.85375087434421348  2.485728741117339 0.85330202610607908  2.5361454116036009 0.85286690583641978  2.5866458094004852 0.85244953806450063  2.6374787772234831 0.85205449758481289  2.6888778325603853 0.85168697334773191  2.7886586098155259 0.85104878513152438  2.8369227066380098 0.85077224953619945  2.8859969672634476 0.85052853777204696  2.9359050657212715 0.85032359756945619  2.9866049165615367 0.85016370781779127  3.0379761931418181 0.85005458026513847  3.0897802791824049 0.8499999993264391  3.1415926535897931 0.84999999999999976 
+ 0 9 0.14079435579561092 7 0.29497196915038909 7 0.35963172349361244 7 0.4566160594684977 7 0.588796716995306 7 0.68746682948596005 7 0.85103750386005472 7 1 9
+7 0 0  8 58 9  6.2831853071795862 0.87000000000000011  6.274123677916247 0.86999999370913816  6.2650820870876585 0.87065154376169906  6.256230831027719 0.87194929062480919  6.247669181414496 0.87383823926053128  6.2394523655660166 0.87625544131474553  6.2316048766950729 0.87914453825118577  6.2241264461789783 0.88246189752572235  6.2091898825206924 0.89027891856302988  6.2018091481619848 0.89485706192162007  6.1947974709950993 0.89992018656211537  6.1881319273628712 0.90549267410945278  6.1817992015205157 0.91159631328050705  6.1758067770016778 0.91831938984979844  6.1701644283790511 0.92573249614691444  6.1627254268942675 0.93767735007194353  6.1606610229352761 0.94128190429019376  6.158733760941228 0.9449563667942138  6.1569468851935572 0.94869528921708735  6.1553033359292568 0.95249308146507927  6.1538057493408775 0.95634401171763506  6.1524564575765259 0.96024220642738123  6.1494591336786861 0.97009049352451138  6.1479986499286392 0.97609312425199024  6.1468832822183028 0.98216835353420706  6.1461180489571658 0.98829512009711207  6.145706062359209 0.99445237141706877  6.1456486648811506 1.0006189632662799  6.1459453819753573 1.0067735777475404  6.1474772764612053 1.0212371271328207  6.148945958357813 1.0288761676392935  6.1508279642600439 1.0358654763702093  6.153002260326387 1.042258671527297  6.1553816381296187 1.0481206850563913  6.1579122679352674 1.0535302200611976  6.1605801190821881 1.0585782207079024  6.1655305648262262 1.0669422485911431  6.1677820218999404 1.0704448901954082  6.170165607161576 1.0738698522352905  6.1726776755216424 1.0772119564027276  6.1753143488182056 1.0804662189316701  6.1780715158168924 1.0836278505980821  6.1809448322108844 1.0866922567199426  6.1888779283186457 1.0945665952969792  6.1940348953779978 1.0991017539490948  6.1994065534321718 1.1033070783798715  6.2050011066281234 1.1072028997441776  6.2108277764487552 1.1107968875112233  6.2168965805037972 1.1140880064529868  6.223218960221919 1.117066180082299  6.2358106344546211 1.1221234040122863  6.2420371889454449 1.1242602534217325  6.2484882896653682 1.1261039332875034  6.2551523515922529 1.1276284674450792  6.2620050304470523 1.128803835833855  6.2690061522407907 1.1296010551028626  6.2760951927869986 1.1300000049221754  6.2831853071795862 1.1299999999999999 
+ 0 9 0.14079435579561092 7 0.29497196915038909 7 0.35963172349361244 7 0.4566160594684977 7 0.588796716995306 7 0.68746682948596005 7 0.85103750386005472 7 1 9
+7 0 0  8 58 9  3.1415926535897931 0.84999999999999976  3.2047178221402373 0.85000000082062699  3.2677415566003973 0.85008101068163233  3.3299449168893789 0.85024259595268015  3.3910264040379108 0.85047635468074478  3.4508815134797159 0.85077103621011096  3.5095288444999584 0.85111538169619083  3.5671188473490822 0.85149954248781401  3.6895658192012704 0.85239650958754343  3.7541263223501495 0.85291964561910794  3.818376582404865 0.85347553212249094  3.8829340891189252 0.85405600846448471  3.9483143540340646 0.85465349566381132  4.0153800776711925 0.85525958942456204  4.0848747711360165 0.85586615881216344  4.2095596153042045 0.8568645934913568  4.2609133705937179 0.85725271253173463  4.3150390661625604 0.85763206516976276  4.3732419793470614 0.85800034468690456  4.4364750904794805 0.85834350333328169  4.5054068595512753 0.85863718204415918  4.5808278167619436 0.85884276409341098  4.6949805168170782 0.85894295859165493  4.7265278090630671 0.85895032071516397  4.7580755692973877 0.85893718619403925  4.7896230422797439 0.85890356121134503  4.8211693717516848 0.85884962808911725  4.8527136004366112 0.85877574528836265  4.8842546700397778 0.85868244740905852  4.9512702210595876 0.85844444285476174  4.9867462729178733 0.85829475073880979  5.0222153245600074 0.8581223766555397  5.0576767367923212 0.85792857506828113  5.0931316953750256 0.85771482953534162  5.12858142290664 0.85748283515489099  5.1640253907084119 0.85723448100984978  5.2309570932999749 0.85673836329967346  5.2624501931158374 0.85649355577355801  5.2939389449124743 0.8562388785069488  5.3254235947921806 0.85597585204037208  5.3569045202033658 0.85570604898236291  5.3883822299405679 0.85543109400946538  5.4198573641444465 0.8551526638662319  5.5038782318290975 0.85440470765690069  5.5552475375077979 0.85394244917052697  5.6059738437770266 0.85348919802090595  5.6564069480615444 0.85304850123775133  5.7068320445954068 0.85262427565439347  5.7575068662420454 0.85222090647378157  5.8086732330824349 0.85184332449602895  5.9106524098403517 0.85116368387005092  5.9614420436231885 0.85085918209556288  6.0131154697420452 0.85058957527927637  6.0657249992310938 0.85036180636122205  6.119237766184396 0.85018333905768806  6.1735305766470869 0.85006113873502309  6.2283461543579355 0.85000000071290893  6.2831853071795871 0.84999999999999976 
+ 0 9 0.20596730384692036 7 0.44368383357270402 7 0.60514289218842465 7 0.66680163654742453 7 0.73616763538685281 7 0.7978273762506124 7 0.90077382426757679 7 1 9
+7 0 0  8 58 9  0 1.1299999999999999  0.0086381809595322025 1.1299999940031089  0.017262524877675448 1.1294079626582381  0.025722907774901892 1.128227312781658  0.033928067668207169 1.1265039019794363  0.041825217415690119 1.1242921398285946  0.049389014688393393 1.1216422750859287  0.056616031536570313 1.1185946651933789  0.071490059479277168 1.1112105923897  0.079023974987107684 1.1067507438198789  0.086178376884467223 1.101801264585025  0.09297722127594589 1.0963450202162162  0.099435533591396008 1.0903636771084917  0.10555042246974404 1.0837793774986084  0.11131624275759171 1.0765232348773681  0.12034319592416753 1.0627323499475245  0.12372223969081529 1.0568537812650862  0.12692609055068349 1.0504787852923456  0.12994476851171669 1.0434360989057201  0.13267942566296281 1.0355856662796195  0.13496304857690475 1.0268309045958102  0.1365489213254576 1.0170875440299574  0.13732057270330206 1.0022654717398305  0.13737691581262651 0.99816197831772735  0.13727598455992332 0.99405742281944509  0.13701778437534706 0.98995813248438813  0.13660269724980784 0.98587041939048636  0.13603148173497134 0.98180058045419583  0.13530527294325878 0.9777548974304987  0.13343593211656504 0.96922247459798516  0.13225192752397841 0.96474344721901262  0.13087583451202839 0.96031172747848892  0.12931032530523065 0.9559359289837458  0.12755853796027916 0.95162428951051392  0.12562413571565034 0.94738485426649244  0.12351136634120731 0.94322565915492096  0.11919286840170255 0.93553641083453387  0.11702333481873418 0.93198739543514897  0.11471981504009969 0.92851331539090542  0.11228584264027358 0.92511942692710303  0.10972519046700416 0.92181079494343288  0.10704187064131333 0.91859229301397638  0.10424013455749687 0.9154686033872047  0.096456515139690599 0.90739473359413836  0.091379648855932569 0.90273475413539583  0.086089953495579602 0.89841251334245098  0.080580537855307194 0.89440449722865911  0.074842960538239175 0.89070017315110395  0.068867447431417317 0.88729769161764249  0.062642064953042725 0.88420437640941085  0.049894524132731252 0.87876731270391051  0.04338734572938175 0.87639890508868523  0.036626765345237608 0.87435047328128213  0.029622931695382972 0.8726524937450818  0.022401135192405001 0.8713397327376502  0.015005398472097564 0.87044679843357375  0.007504305122960811 0.87000000520971965  0 0.87000000000000011 
+ 0 9 0.20596730384692036 7 0.44368383357270402 7 0.60514289218842465 7 0.66680163654742453 7 0.73616763538685281 7 0.7978273762506124 7 0.90077382426757679 7 1 9
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.13
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.14999999999999999
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+8 0 0.43213918000000001
+7 0 0  8 72 11  0 0.85893647999848888  0.064861897947164834 0.85893647999848888  0.12973042171217131 0.85885013574865943  0.19417569391513553 0.85867740855830277  0.25795689449264081 0.85842464257783635  0.3209291459059106 0.8581022483559767  0.38300894607144731 0.85772257710540623  0.44417121612850652 0.85729825239785973  0.57410018150605224 0.85631316366234234  0.64258853796098458 0.85574131892481853  0.71013016822021457 0.8551428382963675  0.77690216303009063 0.85453420021051019  0.84306461749434081 0.85393076484818276  0.90877874374944423 0.8533465313920886  0.97422311400669892 0.85279410272214806  1.1684925365731071 0.85128105100916029  1.2986387627962426 0.85043341828261421  1.4290682203287923 0.84985630489132646  1.5596623634692472 0.84963421135537309  1.6903001130486919 0.84979987130081303  1.8208328157986464 0.85032782063386358  1.9511078058575155 0.85113772055628345  2.1417530030802738 0.85258440330952578  2.2035782609144499 0.85309465102001247  2.2655974413453759 0.8536367199701006  2.3279561039833454 0.85420013610803058  2.390790061132881 0.85477338388660229  2.4542374091647838 0.85534393887505444  2.5184532063268517 0.85589839692744596  2.6473932917036009 0.85693568320129621  2.7120933295812208 0.85741992819192192  2.7778208157807831 0.857861542173744  2.8445889807230031 0.85824529585603182  2.9123375937794496 0.85855560024215782  2.9809355755889193 0.85877851361413515  3.050139889398892 0.85890455329089943  3.1841175932900803 0.85895775954498865  3.2488739930127779 0.85889780193167053  3.31329327609303 0.85875079824637957  3.3771076124984418 0.85852201256653826  3.440155495623936 0.85822102781499687  3.5023375885711268 0.85785975620352217  3.5636017781479512 0.85745082109414639  3.6937291984492995 0.85649245120394557  3.762318447582131 0.85593082906475171  3.8299271339983587 0.85533865252464625  3.8967261431028568 0.85473256558366151  3.9628728737761278 0.85412810552490215  4.0285281431971409 0.85353941159590141  4.0938724184069297 0.85297918442443088  4.2880684868757744 0.85143068557333346  4.4180858167072188 0.85054696282356834  4.5484009568323716 0.84992197464711172  4.6789345324202927 0.84964391455978716  4.8095983542375631 0.84975255676698758  4.9402216520929132 0.8502299071629178  5.0706231561507416 0.8510002767102699  5.2651226763495664 0.85243433687630754  5.3307736870065332 0.85296801164223768  5.3966142036358997 0.85354009560431987  5.4628171473792033 0.85413818864159718  5.5295426548859643 0.85474856275711264  5.5969540422965274 0.85535620776357912  5.6652377314536153 0.85594500547648977  5.7998691103770623 0.85701800469362022  5.8661151324476375 0.85750655903719086  5.9334463200598488 0.85794864171406582  6.0018596697936033 0.85832785394961619  6.0712741181855856 0.8586276133427192  6.1415323092262 0.85883350781390044  6.2123525341476284 0.85893647999848888  6.2831853071795862 0.85893647999848888 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 72 11  2.493467313683551 1.1500000000000001  2.493467313683551 1.1415679532668683  2.4928031076576671 1.133135031276965  2.4914745221230206 1.1248112619066606  2.4895121158410882 1.1166818036303792  2.486960801142724 1.1088118091066748  2.4838714332906355 1.1012493994271155  2.4802957373496493 1.0940277763702753  2.4716399686019654 1.0792409256650637  2.4664113695977115 1.0717948412379577  2.4606541515447131 1.0648429720185941  2.4544209315452319 1.0583984389095791  2.4477582833156437 1.0524728211563799  2.4407070653276035 1.047076319395519  2.4333017310561282 1.0422190190139236  2.4103253817496597 1.0294258777418035  2.3936320374685556 1.022983226508599  2.3759472803376971 1.0189380539946229  2.3577478193076469 1.017436221527297  2.339511999703364 1.0185496919203973  2.3217227994904537 1.0222235327306586  2.3048717982877078 1.0283250991057313  2.28204185960842 1.0404058638719043  2.2749258471615463 1.0448189705199458  2.2681175267544611 1.049717834582955  2.261645671643798 1.0550928947160243  2.2555432374606004 1.0609349730734177  2.2498470938731536 1.0672346326396636  2.2445985057018589 1.0739824186315814  2.2351928630647442 1.0882023699810643  2.231013539813024 1.0956575498259524  2.2273568970763811 1.1035187953946417  2.2242840111802429 1.1117549754242362  2.2218578880072433 1.1203170332447969  2.2201374873458359 1.1291349946821567  2.2191673127249545 1.1381135803423681  2.2187579336883783 1.1555264205678075  2.21921979115052 1.1639565136290542  2.2203471596336293 1.1723027696279913  2.2221151674934485 1.1804763273156329  2.2244813856554457 1.1884081281930663  2.2273958098209583 1.1960460938560409  2.2308073878675971 1.2033528227420063  2.2391289506277214 1.2183392147336538  2.2441918418565669 1.2259028924610857  2.2497942796795201 1.2329785863725917  2.2558820618156026 1.2395519825934054  2.2624072234433048 1.2456112287909304  2.2693279555070709 1.2511464611097989  2.2766094880407772 1.2561483357143595  2.2992778159721712 1.2694140864932304  2.3158061047782752 1.276194001681825  2.3333763651785113 1.2806075823672609  2.351527961806315 1.2824970134348457  2.3697886229769138 1.2817740876326462  2.3876722611656409 1.2784760538147006  2.4046738160333709 1.2727211254279249  2.4282426793638816 1.2608866975083757  2.4358864335665951 1.2563261217318653  2.4431898120855822 1.2512144209504608  2.4501185971459782 1.2455633174002454  2.4566335041673342 1.2393839935120026  2.4626905190673449 1.2326879446683394  2.468240167142755 1.225486566061547  2.4779132716488856 1.2105524397844554  2.4821039681614434 1.2028742827042584  2.485741678436586 1.1947750640181567  2.4887599385170733 1.1862909731351019  2.4910915409252588 1.1774779640377404  2.4926751833927234 1.1684149165903766  2.493467313683551 1.1592082604941545  2.493467313683551 1.1500000000000001 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 72 11  0 0.85893647999848888  0.064861897947164834 0.85893647999848888  0.12973042171217131 0.85885013574865943  0.19417569391513553 0.85867740855830277  0.25795689449264081 0.85842464257783635  0.3209291459059106 0.8581022483559767  0.38300894607144731 0.85772257710540623  0.44417121612850652 0.85729825239785973  0.57410018150605224 0.85631316366234234  0.64258853796098458 0.85574131892481853  0.71013016822021457 0.8551428382963675  0.77690216303009063 0.85453420021051019  0.84306461749434081 0.85393076484818276  0.90877874374944423 0.8533465313920886  0.97422311400669892 0.85279410272214806  1.1684925365731071 0.85128105100916029  1.2986387627962426 0.85043341828261421  1.4290682203287923 0.84985630489132646  1.5596623634692472 0.84963421135537309  1.6903001130486919 0.84979987130081303  1.8208328157986464 0.85032782063386358  1.9511078058575155 0.85113772055628345  2.1417530030802738 0.85258440330952578  2.2035782609144499 0.85309465102001247  2.2655974413453759 0.8536367199701006  2.3279561039833454 0.85420013610803058  2.390790061132881 0.85477338388660229  2.4542374091647838 0.85534393887505444  2.5184532063268517 0.85589839692744596  2.6473932917036009 0.85693568320129621  2.7120933295812208 0.85741992819192192  2.7778208157807831 0.857861542173744  2.8445889807230031 0.85824529585603182  2.9123375937794496 0.85855560024215782  2.9809355755889193 0.85877851361413515  3.050139889398892 0.85890455329089943  3.1841175932900803 0.85895775954498865  3.2488739930127779 0.85889780193167053  3.31329327609303 0.85875079824637957  3.3771076124984418 0.85852201256653826  3.440155495623936 0.85822102781499687  3.5023375885711268 0.85785975620352217  3.5636017781479512 0.85745082109414639  3.6937291984492995 0.85649245120394557  3.762318447582131 0.85593082906475171  3.8299271339983587 0.85533865252464625  3.8967261431028568 0.85473256558366151  3.9628728737761278 0.85412810552490215  4.0285281431971409 0.85353941159590141  4.0938724184069297 0.85297918442443088  4.2880684868757744 0.85143068557333346  4.4180858167072188 0.85054696282356834  4.5484009568323716 0.84992197464711172  4.6789345324202927 0.84964391455978716  4.8095983542375631 0.84975255676698758  4.9402216520929132 0.8502299071629178  5.0706231561507416 0.8510002767102699  5.2651226763495664 0.85243433687630754  5.3307736870065332 0.85296801164223768  5.3966142036358997 0.85354009560431987  5.4628171473792033 0.85413818864159718  5.5295426548859643 0.85474856275711264  5.5969540422965274 0.85535620776357912  5.6652377314536153 0.85594500547648977  5.7998691103770623 0.85701800469362022  5.8661151324476375 0.85750655903719086  5.9334463200598488 0.85794864171406582  6.0018596697936033 0.85832785394961619  6.0712741181855856 0.8586276133427192  6.1415323092262 0.85883350781390044  6.2123525341476284 0.85893647999848888  6.2831853071795862 0.85893647999848888 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 72 11  2.493467313683551 1.1500000000000001  2.493467313683551 1.1415679532668683  2.4928031076576671 1.133135031276965  2.4914745221230206 1.1248112619066606  2.4895121158410882 1.1166818036303792  2.486960801142724 1.1088118091066748  2.4838714332906355 1.1012493994271155  2.4802957373496493 1.0940277763702753  2.4716399686019654 1.0792409256650637  2.4664113695977115 1.0717948412379577  2.4606541515447131 1.0648429720185941  2.4544209315452319 1.0583984389095791  2.4477582833156437 1.0524728211563799  2.4407070653276035 1.047076319395519  2.4333017310561282 1.0422190190139236  2.4103253817496597 1.0294258777418035  2.3936320374685556 1.022983226508599  2.3759472803376971 1.0189380539946229  2.3577478193076469 1.017436221527297  2.339511999703364 1.0185496919203973  2.3217227994904537 1.0222235327306586  2.3048717982877078 1.0283250991057313  2.28204185960842 1.0404058638719043  2.2749258471615463 1.0448189705199458  2.2681175267544611 1.049717834582955  2.261645671643798 1.0550928947160243  2.2555432374606004 1.0609349730734177  2.2498470938731536 1.0672346326396636  2.2445985057018589 1.0739824186315814  2.2351928630647442 1.0882023699810643  2.231013539813024 1.0956575498259524  2.2273568970763811 1.1035187953946417  2.2242840111802429 1.1117549754242362  2.2218578880072433 1.1203170332447969  2.2201374873458359 1.1291349946821567  2.2191673127249545 1.1381135803423681  2.2187579336883783 1.1555264205678075  2.21921979115052 1.1639565136290542  2.2203471596336293 1.1723027696279913  2.2221151674934485 1.1804763273156329  2.2244813856554457 1.1884081281930663  2.2273958098209583 1.1960460938560409  2.2308073878675971 1.2033528227420063  2.2391289506277214 1.2183392147336538  2.2441918418565669 1.2259028924610857  2.2497942796795201 1.2329785863725917  2.2558820618156026 1.2395519825934054  2.2624072234433048 1.2456112287909304  2.2693279555070709 1.2511464611097989  2.2766094880407772 1.2561483357143595  2.2992778159721712 1.2694140864932304  2.3158061047782752 1.276194001681825  2.3333763651785113 1.2806075823672609  2.351527961806315 1.2824970134348457  2.3697886229769138 1.2817740876326462  2.3876722611656409 1.2784760538147006  2.4046738160333709 1.2727211254279249  2.4282426793638816 1.2608866975083757  2.4358864335665951 1.2563261217318653  2.4431898120855822 1.2512144209504608  2.4501185971459782 1.2455633174002454  2.4566335041673342 1.2393839935120026  2.4626905190673449 1.2326879446683394  2.468240167142755 1.225486566061547  2.4779132716488856 1.2105524397844554  2.4821039681614434 1.2028742827042584  2.485741678436586 1.1947750640181567  2.4887599385170733 1.1862909731351019  2.4910915409252588 1.1774779640377404  2.4926751833927234 1.1684149165903766  2.493467313683551 1.1592082604941545  2.493467313683551 1.1500000000000001 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+Curves 40
+1 0 0 0 0 0 -1 
+1 0 0.14999999999999999 0 0 0 -1 
+1 0 0 0 0 1 0 
+1 0.14999999999999999 0 0 0 0 -1 
+1 0.14999999999999999 0.14999999999999999 0 0 0 -1 
+1 0.14999999999999999 0 0 0 1 0 
+1 0 0 0 1 0 0 
+1 0 0 0 0 0 1 
+1 0 0 0 0 1 0 
+1 0 2 0 0 0 1 
+1 0 0 0 1 0 0 
+1 2 0 0 0 0 1 
+1 2 0 0 0 1 0 
+2 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 0.94999999999999996
+1 2 2 0 0 0 1 
+2 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 0.90000000000000002
+7 0 0  8 72 11  0.26643896292146124 1.521429002722575 1.25  0.26643896349132645 1.521429003524277 1.2403015520909153  0.26686013881400383 1.5220214731675019 1.2306003698069188  0.26770249852970229 1.5232066719898247 1.2210128783693919  0.2689525125624696 1.5249594362703378 1.2116334137525824  0.27058912777455246 1.5272391257634976 1.2025376848668829  0.27258780383951881 1.5299970485873147 1.1937854933494239  0.27492256833414314 1.5331813634658866 1.1854227109619755  0.28064004033790735 1.5408768953989802 1.1682494708116995  0.28413301714930417 1.5455217631427103 1.1595835604791795  0.28801051119268517 1.5506023519981427 1.1515160871151753  0.2922406732841461 1.5560508588840578 1.1440688973344773  0.29679387782528738 1.5618049195456594 1.1372557532262881  0.30164294638583505 1.567808922687868 1.1310841242860898  0.30676403239003702 1.5740151068935997 1.12555739890319  0.32321374325240793 1.5935110262901762 1.1106205430515763  0.33536994265897924 1.6073375000841199 1.1033056658423601  0.34840662610161 1.6214808601334625 1.0987891019942975  0.36209677952282016 1.635590122614196 1.097139288354795  0.37617245757806439 1.6493509781020745 1.0983703615046598  0.3903235400454001 1.6624908885115866 1.1024726748405405  0.40420104720090855 1.6747773911208723 1.1093822111423579  0.42350094438146968 1.6911674271264932 1.1234755700254171  0.42944224086083133 1.6961070373171521 1.1284952407085393  0.43521447739017793 1.700808665090892 1.13409465681211  0.44077829426009835 1.7052524705343184 1.1402710337832949  0.44608845761219107 1.7094162423264168 1.1470188947598492  0.45109450967700204 1.7132759534799227 1.1543286289989088  0.45574146128230336 1.7168058245101345 1.1621854859685512  0.46407206927093914 1.7230543133626908 1.1786997286431937  0.46778279930694927 1.7257958674563696 1.1873303162681021  0.47104189953142495 1.7281715925562271 1.1964301375458586  0.47378528842606493 1.7301489964969499 1.2059533307939176  0.47595136605262017 1.7316975063453617 1.2158362127022577  0.47748602562824538 1.7327896624885195 1.2259951300277496  0.47835112798048252 1.7334047370878862 1.2363227435623532  0.47871750873401653 1.7336651902556559 1.2563481073299625  0.47830590713001397 1.7333724794479461 1.2660466736318212  0.47730019216790698 1.7326583471503532 1.2756584794144941  0.47572116983722579 1.7315341430008393 1.2850865198757724  0.47360629655048109 1.7300193836341873 1.2942516731652678  0.47100236097931203 1.7281376866680678 1.3030902984670552  0.46796064238961699 1.7259147965618662 1.3115524984806823  0.46055440436508271 1.7204324888892069 1.3289511484322101  0.45605307634021391 1.7170617389158807 1.3377484745104402  0.45110240393601631 1.713301234797036 1.3459581030167105  0.44577090156490634 1.7091832607723798 1.3535558710131343  0.44012186249414609 1.7047378908902167 1.3605265985468376  0.43421178844325392 1.6999926512126577 1.366862020065881  0.42808914180143665 1.6949715562883989 1.3725584228467504  0.4087707984974227 1.6787759666795135 1.3880713757958907  0.39500328459345285 1.6667554034605021 1.3957902966013283  0.38087538906588292 1.6538280997218395 1.4007207340627521  0.36673979176042215 1.6402155377598642 1.4027900120130263  0.3529147460155071 1.6261808799928834 1.4019797850319546  0.33967718269256497 1.6120297709786042 1.3982949535504252  0.32726490516490769 1.5981088058016701 1.3917949327931016  0.31032438290521713 1.5782912888956309 1.3780235722812839  0.3050073003232639 1.5719280149081618 1.3728433452075761  0.29995442219161006 1.5657463272111583 1.3670066896745274  0.29518940036942198 1.5597926999447742 1.360516590247665  0.29073881347395852 1.5541210217916581 1.3533792693115569  0.2866314305983847 1.5487917610938418 1.3456061025364376  0.28289817958884461 1.5438710884314226 1.3372148845999685  0.27647474742058137 1.5352923747976901 1.3198600892236374  0.27372868918535115 1.5315683083452796 1.3109693186295643  0.27136873497113639 1.5283240984206299 1.3015934064125563  0.26942990937129063 1.5256286464713935 1.291784455515824  0.2679444639273465 1.5235470149659935 1.2816139787830885  0.26694071750161885 1.5221348760986779 1.2711751156736035  0.26643896354350843 1.5214290035976878 1.2605865258769158  0.26643896292146124 1.5214290027225745 1.25 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+7 0 0  8 72 11  0.26643896292146124 1.521429002722575 1.25  0.26643896349132645 1.521429003524277 1.2403015520909153  0.26686013881400383 1.5220214731675019 1.2306003698069188  0.26770249852970229 1.5232066719898247 1.2210128783693919  0.2689525125624696 1.5249594362703378 1.2116334137525824  0.27058912777455246 1.5272391257634976 1.2025376848668829  0.27258780383951881 1.5299970485873147 1.1937854933494239  0.27492256833414314 1.5331813634658866 1.1854227109619755  0.28064004033790735 1.5408768953989802 1.1682494708116995  0.28413301714930417 1.5455217631427103 1.1595835604791795  0.28801051119268517 1.5506023519981427 1.1515160871151753  0.2922406732841461 1.5560508588840578 1.1440688973344773  0.29679387782528738 1.5618049195456594 1.1372557532262881  0.30164294638583505 1.567808922687868 1.1310841242860898  0.30676403239003702 1.5740151068935997 1.12555739890319  0.32321374325240793 1.5935110262901762 1.1106205430515763  0.33536994265897924 1.6073375000841199 1.1033056658423601  0.34840662610161 1.6214808601334625 1.0987891019942975  0.36209677952282016 1.635590122614196 1.097139288354795  0.37617245757806439 1.6493509781020745 1.0983703615046598  0.3903235400454001 1.6624908885115866 1.1024726748405405  0.40420104720090855 1.6747773911208723 1.1093822111423579  0.42350094438146968 1.6911674271264932 1.1234755700254171  0.42944224086083133 1.6961070373171521 1.1284952407085393  0.43521447739017793 1.700808665090892 1.13409465681211  0.44077829426009835 1.7052524705343184 1.1402710337832949  0.44608845761219107 1.7094162423264168 1.1470188947598492  0.45109450967700204 1.7132759534799227 1.1543286289989088  0.45574146128230336 1.7168058245101345 1.1621854859685512  0.46407206927093914 1.7230543133626908 1.1786997286431937  0.46778279930694927 1.7257958674563696 1.1873303162681021  0.47104189953142495 1.7281715925562271 1.1964301375458586  0.47378528842606493 1.7301489964969499 1.2059533307939176  0.47595136605262017 1.7316975063453617 1.2158362127022577  0.47748602562824538 1.7327896624885195 1.2259951300277496  0.47835112798048252 1.7334047370878862 1.2363227435623532  0.47871750873401653 1.7336651902556559 1.2563481073299625  0.47830590713001397 1.7333724794479461 1.2660466736318212  0.47730019216790698 1.7326583471503532 1.2756584794144941  0.47572116983722579 1.7315341430008393 1.2850865198757724  0.47360629655048109 1.7300193836341873 1.2942516731652678  0.47100236097931203 1.7281376866680678 1.3030902984670552  0.46796064238961699 1.7259147965618662 1.3115524984806823  0.46055440436508271 1.7204324888892069 1.3289511484322101  0.45605307634021391 1.7170617389158807 1.3377484745104402  0.45110240393601631 1.713301234797036 1.3459581030167105  0.44577090156490634 1.7091832607723798 1.3535558710131343  0.44012186249414609 1.7047378908902167 1.3605265985468376  0.43421178844325392 1.6999926512126577 1.366862020065881  0.42808914180143665 1.6949715562883989 1.3725584228467504  0.4087707984974227 1.6787759666795135 1.3880713757958907  0.39500328459345285 1.6667554034605021 1.3957902966013283  0.38087538906588292 1.6538280997218395 1.4007207340627521  0.36673979176042215 1.6402155377598642 1.4027900120130263  0.3529147460155071 1.6261808799928834 1.4019797850319546  0.33967718269256497 1.6120297709786042 1.3982949535504252  0.32726490516490769 1.5981088058016701 1.3917949327931016  0.31032438290521713 1.5782912888956309 1.3780235722812839  0.3050073003232639 1.5719280149081618 1.3728433452075761  0.29995442219161006 1.5657463272111583 1.3670066896745274  0.29518940036942198 1.5597926999447742 1.360516590247665  0.29073881347395852 1.5541210217916581 1.3533792693115569  0.2866314305983847 1.5487917610938418 1.3456061025364376  0.28289817958884461 1.5438710884314226 1.3372148845999685  0.27647474742058137 1.5352923747976901 1.3198600892236374  0.27372868918535115 1.5315683083452796 1.3109693186295643  0.27136873497113639 1.5283240984206299 1.3015934064125563  0.26942990937129063 1.5256286464713935 1.291784455515824  0.2679444639273465 1.5235470149659935 1.2816139787830885  0.26694071750161885 1.5221348760986779 1.2711751156736035  0.26643896354350843 1.5214290035976878 1.2605865258769158  0.26643896292146124 1.5214290027225745 1.25 
+ 0 9 0.073840985206690093 7 0.15970498882719014 7 0.33666247369529484 7 0.41799822796329628 7 0.49688139402059656 7 0.57050503096671323 7 0.65603456252404424 7 0.83295134410099214 7 0.91943110368423631 7 1 9
+1 1.8999999999999999 0.99999999999999978 0.10000000000000001 0 0 1 
+7 0 0  8 58 9  1.9000000000000001 1 1.25  1.9000000000000001 1.0093880752959545 1.25  1.8998880832610459 1.0187649903859017 1.2493284703966894  1.8996647018166788 1.0279849511063186 1.2479883163962766  1.8993400224023278 1.0369553979623227 1.2460235763863607  1.8989281057683478 1.0456204197795971 1.2434873970461049  1.898443405808026 1.0539513071063547 1.2404290889326322  1.8978988290386209 1.0619413747358664 1.2368870240038072  1.8966413120970558 1.0781531612894755 1.228394959563528  1.8959169399397395 1.0862839361134666 1.2233340896201734  1.8951434465554173 1.0940438257707878 1.2176980048932704  1.89433116546764 1.101453463522666 1.2114555709254144  1.8934896710799087 1.1085258689798945 1.2045819338858417  1.8926301641744767 1.1152547923449947 1.1969632122036855  1.8917633357365846 1.1216333305777615 1.1885148467821007  1.8905511256482403 1.1300960205128068 1.1748151898859336  1.8902082662538671 1.132433168198929 1.1707086572270211  1.8898801614201204 1.1346225568925705 1.1665179527003535  1.8895688830487023 1.1366606446913901 1.1622492155580182  1.8892763518132272 1.13854419744095 1.1579087732230904  1.8890043371592264 1.1402702887347194 1.1535031412896315  1.8887544573041453 1.1418362999140712 1.1490390235226897  1.8881887875166139 1.1453451928688092 1.1377502508463782  1.8879023608007075 1.1470856359500543 1.1308596062191529  1.8876737996442212 1.1484528117952542 1.1238760027188079  1.8875068715530723 1.1494408328971446 1.1168238288700643  1.8874041367529872 1.1500458475466495 1.1097274086035924  1.887366891952462 1.1502658186130665 1.10261119443425  1.8873951321002063 1.1501005953157648 1.0954999821941447  1.8876181420988547 1.1487771879055946 1.078409824986023  1.8878652566178007 1.1473060214762933 1.0693569548288295  1.8881870149169984 1.1453722874306784 1.0611625334072856  1.8885535654346151 1.1431279273311801 1.0537572564907296  1.8889435746121503 1.1406891091900386 1.0470401008698276  1.8893461803971268 1.1381152334941478 1.0408992929908816  1.8897585664549368 1.1354183467400225 1.0351962867768747  1.8905155853333513 1.1303341533287139 1.0256002540569336  1.8908607792867227 1.1279728765801869 1.0215066790845111  1.8912197984537851 1.1254653178975853 1.0174998373641404  1.8915904925448583 1.1228152053282998 1.0135857360639318  1.8919706421974414 1.120026518916142 1.009770156650033  1.8923579589762185 1.1171034907013448 1.0060586548866273  1.8927500853730539 1.1140506047205623 1.002456560835935  1.8938131227575463 1.1054872074549744 0.99305899082914617  1.894470393200363 1.0998889443014692 0.98763848979254176  1.8951116267021417 1.0940752228737132 0.98263600945233109  1.8957320491049765 1.0880404932173113 0.97801822269787475  1.896326489280475 1.0817779119906932 0.97376786428582762  1.896889259477581 1.0752796106041083 0.96987789996276708  1.8974140877923447 1.0685360944178837 0.9663522091952339  1.8983686721191195 1.0546072550567027 0.96008660598343842  1.8987995566224756 1.0474244619345621 0.95733756638704581  1.899178773107201 1.0399862429142961 0.95497438146016889  1.8994973429459678 1.0323049078383915 0.95302540846751493  1.8997457289288564 1.0244076463212879 0.95152540347741199  1.8999152152124208 1.0163400204251363 0.95050883252399088  1.899999999863816 1.0081710656159291 0.95000000081710667  1.9000000000000001 1 0.95000000000000007 
+ 0 9 0.13229762403004616 7 0.27996796770557875 7 0.34121855759820813 7 0.43308757253782593 7 0.56295171984466641 7 0.66292718998370481 7 0.8323436611939603 7 1 9
+2 1 1 2.1000000000000001 0 0 1 1 0 -0 -0 1 0 0.90000000000000002
+7 0 0  8 65 10  1.9000000000000001 1 0.95000000000000007  1.8999999998359873 0.99015923545926643 0.95000000098407644  1.8998770297925731 0.98033509753454751 0.95073785813964951  1.8996318025398464 0.97069271396954027 0.95220904801051087  1.8992765546679733 0.96133336368217981 0.95436069040668436  1.8988277380040512 0.95231609310861109 0.95713140947797215  1.898301882160667 0.94366929164190994 0.96046603673590358  1.8977134609564574 0.93539656952236416 0.96432332927482201  1.8967393455604853 0.92334653307577219 0.97097846333872073  1.8963898674737425 0.91929490774605149 0.97341033800932275  1.8960272163472021 0.91533252599395676 0.97598695067327523  1.8956535207788709 0.91146529550769506 0.9787044941420534  1.895270982706319 0.90769891121670299 0.98155890381998667  1.8948818774066802 0.90403885529164685 0.98454585770425695  1.8944885534966516 0.90049039714442281 0.98766077638489813  1.8936489251619688 0.89319783912386097 0.99454160206518949  1.8932020646853669 0.88948434783100805 0.9983406292344138  1.8927562661489798 0.88592564900214488 1.0022886481181392  1.8923149285253109 0.88252855544089626 1.0063784969559244  1.8918814085494604 0.87929932813401324 1.0106028806233669  1.8914589941555142 0.87624384108341935 1.0149541425942461  1.8910508779129327 0.87336774613825952 1.0194240369026693  1.8901221075364367 0.86697123176684088 1.0303089953658271  1.8896097378727723 0.86356639905009192 1.0369071928429501  1.8891060511529036 0.86031037106658426 1.0440964037813816  1.8886108738125171 0.85719927621954328 1.0521348000127901  1.8881445169669495 0.85435000117037552 1.0612236073195671  1.8877460717451564 0.85197823864660138 1.0715027040263871  1.8874795836432459 0.850400161013805 1.08308501515356  1.8873996269077993 0.84992695518555794 1.1007063636426642  1.8874069834986571 0.84997058685366578 1.1054441604746783  1.887443301395503 0.85018517440665498 1.1101793244374734  1.8875084586559689 0.85057053894987344 1.1149044841660334  1.8876020827688309 0.8511260998434852 1.1196122964482775  1.8877235506540118 0.85185087470247156 1.1242954462250596  1.8878719886625797 0.8527434793966302 1.1289466465901685  1.8882423414818819 0.85499310475939339 1.1387471168289738  1.8884711554756946 0.85639438703557602 1.1438865283849502  1.8887311219733738 0.85800328478273569 1.1489661926567345  1.8890203130895264 0.85981673027928585 1.1539762046896513  1.8893364919130584 0.86183119774911177 1.1589071821151093  1.8896771387820579 0.86404262293224221 1.1637500118898436  1.8900394775586762 0.86644632265552057 1.1684955970351527  1.8907591966853989 0.8713397066432792 1.1772582433949126  1.8911127204912228 0.87379041897071053 1.1812981554974173  1.8914789391236486 0.87638545383063271 1.1852481991795361  1.8918556592783926 0.87912096697784026 1.1891024614202204  1.8922406285447142 0.88199286747685945 1.192855256681489  1.892631535405418 0.88499681770194905 1.1965011269084294  1.8930260092368518 0.88812823333709912 1.2000348415291968  1.8940871746164283 0.8968567181764483 1.2091992232210858  1.8947397296667303 0.90254422397512546 1.2144747706960328  1.8953746545789314 0.90844934277087031 1.2193422446284785  1.8959871447981085 0.91457883845638988 1.2238309526393318  1.8965718835755352 0.92094023613492482 1.2279547218360272  1.8971229401137486 0.92754154029162428 1.2317172353019237  1.8976337210854692 0.93439163127241198 1.2351116158019808  1.8985293729531225 0.94814194944350438 1.2409352982566344  1.8989204559705315 0.9550112193490955 1.2434143495585004  1.8992632175197603 0.96210650301828959 1.2455417030435205  1.8995499432076202 0.96941452936316508 1.2472921060311568  1.8997726501738206 0.97690932733114288 1.2486360617430747  1.8999242139472099 0.98454954138118977 1.249545193579914  1.9000000000000001 0.99227463753454948 1.25  1.9000000000000001 1 1.25 
+ 0 9 0.20769551692732596 7 0.31619045992063632 7 0.43824648432856717 7 0.60630628727767011 7 0.66802358049470334 7 0.73745535890280278 7 0.79917367506218406 7 0.90300517542744296 7 1 9
+1 1.95 0.99999999999999978 0.10000000000000001 0 0 1 
+7 0 0  8 58 9  1.9499999999999997 0.99999999999999989 1.25  1.9499999999999997 1.0093831523501111 1.25  1.9498940847694906 1.018755503104074 1.2493291745954584  1.9496826682698669 1.0279721100087857 1.2479903370412788  1.9493753163686567 1.0369408341689648 1.24602710033644  1.9489852816895761 1.0456058717608587 1.2434921328298849  1.9485262120088565 1.0539383762802581 1.2404343369856798  1.9480103226946031 1.0619313212151529 1.2368918174222308  1.9468193865353423 1.0781442254168052 1.2284001672939884  1.9461335753808693 1.0862741508364513 1.2233407739324165  1.9454012024501368 1.0940345241138945 1.217705501822131  1.9446320534450561 1.1014456873087646 1.2114630021517698  1.9438352099196017 1.1085203599157183 1.2045882790282938  1.9430213098014257 1.1152519600526669 1.1969673382132637  1.9422005209702768 1.1216332384390482 1.1885156232909864  1.941052949179829 1.1300984878451577 1.1748109353962135  1.9407284721438482 1.1324357321182834 1.1707039051380215  1.9404179840691542 1.1346251332253736 1.1665127862041433  1.9401234432463892 1.1366631559936322 1.1622437354583701  1.9398466639685146 1.1385465760717912 1.1579030934730166  1.9395893165308118 1.1402724799301112 1.1534973845289227  1.9393529272308785 1.14183826486038 1.1490333166154547  1.9388178280194666 1.1453465497195414 1.1377449626797325  1.9385469156002588 1.1470865653315898 1.1308548934948268  1.9383307568531469 1.1484533319875327 1.1238721391370941  1.9381728985628635 1.149441019308145 1.116821031989657  1.93807574951314 1.1500458164262286 1.109725838837534  1.938040528542148 1.1502657134574523 1.1026109477457648  1.9380672296969608 1.1501005683753125 1.0955010745355855  1.9382780188396906 1.1487782711308094 1.0784217797615081  1.9385114874440834 1.1473090126250736 1.0693726213999355  1.9388156641365011 1.1453766950102087 1.0611793314998723  1.9391623266718829 1.1431332449090477 1.0537729816653618  1.9395313407209318 1.1406944647374706 1.0470536179501384  1.939912378540098 1.1381200413488601 1.0409099777352844  1.9403027345495243 1.135422254675696 1.0352042790935154  1.9410191918518054 1.13033751645919 1.0256061279332696  1.9413458712501408 1.1279762265307134 1.0215120957760633  1.9416856617443163 1.12546856832561 1.0175047119778304  1.9420365301567104 1.1228182649415652 1.0135900026954434  1.9423963766906562 1.1200292962183427 1.0097737694244504  1.9427630349304394 1.1171058987377844 1.0060615889990752  1.9431342718412996 1.1140525658238101 1.002458813592217  1.9441409386235031 1.1054861071281046 0.99305761281909688  1.9447634356952941 1.0998854632788677 0.98763504123459844  1.9453707346381957 1.0940696875452121 0.98263127810142636  1.9459583008280759 1.0880333787760088 0.97801291993853645  1.9465212285649236 1.0817698444089954 0.97376261558040988  1.9470541280817961 1.0752713714479174 0.96987322749734739  1.9475510628653006 1.0685286332858577 0.96634851296830515  1.9484551624164663 1.0545989360799992 0.9600832008150435  1.9488633436075999 1.0474140789765889 0.95733394516908177  1.9492225092657927 1.039974844491528 0.95497118559992045  1.9495241674580333 1.0322937340824585 0.95302308255220447  1.9497593177246981 1.0243979787070372 0.95152409962212003  1.9499197481035935 1.0163330017625551 0.95050838501876544  1.9499999998710396 1.0081674796553484 0.95000000081674796  1.9499999999999995 0.99999999999999989 0.95000000000000007 
+ 0 9 0.13245981261509418 7 0.2801979720647354 7 0.34145692201646749 7 0.4333387805098462 7 0.56311923633956151 7 0.66300625907899968 7 0.8323258221702976 7 1 9
+2 1 1 2.1000000000000001 0 0 1 1 0 -0 -0 1 0 0.94999999999999996
+7 0 0  8 65 10  1.9499999999999997 1 0.95000000000000007  1.9499999998447046 0.9901646017820348 0.95000000098353987  1.9498836289237824 0.98034536605121536 0.95073705344169179  1.9496515428823309 0.9707064936640355 0.9522067593503466  1.9493152563287091 0.96134883164092588 0.9543567409964272  1.9488902781087338 0.95233134174231149 0.95712616816968354  1.9483922194436252 0.94368259534140542 0.96046032614507393  1.9478347831976579 0.93540660759376248 0.96431826108309338  1.946911989013248 0.92335220500624393 0.9709750826380189  1.9465810155289114 0.91930011066199147 0.97340699197375102  1.9462375707045421 0.91533717935735626 0.97598372681721091  1.9458836727577522 0.91146933777759742 0.97870148429690995  1.9455214095077358 0.90770230080672476 0.98155619933525839  1.9451529383752713 0.90404157152750109 0.98454354464856497  1.9447804863827196 0.90049244122144123 0.98765893074703748  1.9439854496129449 0.89319850595392714 0.99454087950920078  1.9435623419727912 0.88948430960542324 0.99834058306758389  1.9431402650105767 0.88592496247179864 1.0022893359269611  1.9427224402881687 0.88252730165643789 1.0063799495560231  1.9423120478750893 0.87929760480642116 1.0106050999013001  1.9419122010713152 0.87624175570133378 1.0149570997133395  1.9415259211300773 0.873365409842077 1.0194276708728831  1.9406468383707276 0.86696797130889225 1.0303150146419606  1.9401617227709613 0.86356127092885682 1.0369172801176407  1.9396849035451167 0.86030389250490302 1.0441112233390628  1.9392163091486723 0.8571924623609033 1.0521534719374841  1.9387752770069431 0.85434455092411543 1.0612444814181567  1.9383986724531761 0.85197487306512754 1.0715222637818493  1.938147044314221 0.85039971327588193 1.0830996236876682  1.938071482110864 0.84992698108400655 1.1007061581176483  1.9380784384561542 0.8499705949171763 1.1054430802413582  1.9381127813531729 0.85018510065790054 1.110177372037233  1.9381743960170121 0.85057032070183647 1.1149016872265127  1.9382629318302276 0.85112567990782795 1.1196087062818583  1.9383778023428344 0.85185020559790758 1.1242911364273525  1.938518185272311 0.85274252755729474 1.1289417116385003  1.9388684638586133 0.85499151891708025 1.1387410939391582  1.939084886313817 0.85639244125386704 1.1438800581732838  1.9393307906711283 0.85800098164906524 1.148959435958939  1.9396043604893103 0.85981409731803526 1.1539693322789923  1.9399034865516565 0.86182828555578872 1.1589003597961354  1.9402257913336722 0.86403950320558887 1.1637433921641698  1.9405686534707609 0.86644308612755083 1.1684893173392958  1.9412497524692909 0.87133645033219165 1.1772528419367219  1.9415843322223556 0.87378723330164942 1.181293259764399  1.9419309541648764 0.876382427571887 1.1852438841119592  1.9422875438221898 0.87911819172554717 1.189098781728577  1.942651969565196 0.88199043293164126 1.1928522463750715  1.9430220426103586 0.88499480694555122 1.1964987988239075  1.9433955170197037 0.88812671810902877 1.2000331868591956  1.9444004484674369 0.89685840437971454 1.2092011009276959  1.9450184982594365 0.90254835622179119 1.2144786336505671  1.9456198359920627 0.90845556161376739 1.219347300331175  1.9461998988653981 0.91458663475370083 1.2238364887236071  1.9467536440321718 0.9209489479254469 1.227960116337639  1.9472754525143672 0.9275503468643399 1.2317219748778392  1.9477590847071327 0.93439953893140726 1.2351153169185389  1.9486073481669659 0.94815018232537451 1.2409384558352006  1.9489778156683173 0.95502117661064101 1.2434176041555129  1.949302447885388 0.96211721545857631 1.2455445198075172  1.9495739510975942 0.96942488085898493 1.2472941281783561  1.9497847933203942 0.97691818742705017 1.2486371838983905  1.9499282629466617 0.98455592161227579 1.2495455758526512  1.9499999999999995 0.99227787904207521 1.25  1.9499999999999995 1 1.25 
+ 0 9 0.20764496176684977 7 0.31606848072882715 7 0.43804415241506528 7 0.6060199603204286 7 0.667762211557411 7 0.73722204561262683 7 0.79896523652129325 7 0.90287127033062087 7 1 9
+7 0 0  8 72 11  0.23060902475093784 1.5572589408930977 1.25  0.2306090253266759 1.5572589416880023 1.2403080939310815  0.2310342496551667 1.5578459898817596 1.2306130592123639  0.2318847892368833 1.5590204337204854 1.2210299264371134  0.23314715262136432 1.5607579573262438 1.2116523473795875  0.23480019822430456 1.5630191005230041 1.2025559225037628  0.23681910255386118 1.5657563422969101 1.1938008009317798  0.23917736384617608 1.5689187478908639 1.185433552872097  0.24494923151952339 1.5765629574463067 1.16825458487937  0.24847357887202712 1.5811776556771773 1.1595863701867639  0.25238431145417434 1.5862274770913907 1.1515162197365003  0.25664838946694796 1.591645255387979 1.1440667267110092  0.26123499913425202 1.5973690697163032 1.137252065464524  0.26611584998590815 1.6033436143121336 1.1310798876895927  0.27126607531516195 1.6095213231531675 1.1255535774537704  0.28780563333546905 1.6289471113256968 1.1106097220023139  0.30000795570727895 1.6427308357544081 1.1033003027100983  0.31306914770262817 1.6568390062267508 1.0987899612669718  0.32676142464802371 1.6709276263029047 1.0971435089988484  0.34081889164110013 1.684687337793247 1.098372108093016  0.35493623367224481 1.6978481505506715 1.1024684679391314  0.36877177228397623 1.7101775445851723 1.1093717619474581  0.38800439974623274 1.7266532120642146 1.1234708391771506  0.39391917366630935 1.7316195160855685 1.1284897710688866  0.39966394917629372 1.7363504743755143 1.1340892789857251  0.40519953644821743 1.7408254129932434 1.1402666478468999  0.41048093677063863 1.7450212007514907 1.1470163225578758  0.41545801463969217 1.7489128177529336 1.1543284276539072  0.42007623191174137 1.7524734668147708 1.16218767904956  0.42835393761748652 1.7587799699498221 1.1787087767248308  0.4320401685442804 1.7615486605249644 1.1873445808501557  0.43527567979867521 1.7639482234930464 1.1964483186209958  0.43799737095819385 1.7659454527941973 1.2059731897490786  0.44014498323178758 1.767509300647877 1.2158549285554741  0.4416658636698656 1.768612078320114 1.2260097624237507  0.44252307816597386 1.7692330826434173 1.2363308368903219  0.44288630231634618 1.7694961824066842 1.2563425267323345  0.44247850706952085 1.7692006937910796 1.2660349832256914  0.44148202771623252 1.7684796645922805 1.2756421673524727  0.43991693532345949 1.767344382189604 1.285067924670005  0.43781954728438366 1.76581440516698 1.2942333782340523  0.43523546557513676 1.7639135820574288 1.3030746413748331  0.43221500743866798 1.7616681361677782 1.3115411822399725  0.42485902532046971 1.7561331366535327 1.3289450981366353  0.42038758894451689 1.752731785260232 1.3377444494294337  0.41546758440996018 1.7489385566500784 1.3459566926865136  0.41016683717002395 1.7447869010168187 1.353556870746119  0.40454815961726343 1.7403080722215212 1.3605293360737603  0.39866772711397863 1.7355307118989263 1.3668655829017644  0.39257380352485577 1.7304798698502182 1.372561846015637  0.3733268346330022 1.7141917389033312 1.3880829555784531  0.35960277646515681 1.7021218718317648 1.3957971742529021  0.34551140024191235 1.6891664128926345 1.4007210744216003  0.33139876717057209 1.67554834606082 1.4027859962866231  0.31757808203612869 1.6615293183406177 1.4019771495875699  0.30432326733863441 1.6474103688687163 1.3982977332109254  0.29187148809334029 1.6335305405606002 1.3918044519491164  0.27484717429506123 1.613780554783921 1.3780286215120883  0.26950233442909932 1.6074451225244544 1.3728493958276737  0.26441852960733453 1.6012923880886372 1.3670128087988742  0.25962039506134998 1.5953686295300604 1.3605217312820252  0.25513560660008333 1.5897274619964854 1.3533824526069127  0.25099412875401772 1.5844289746128195 1.3456066462027629  0.2472281177677044 1.5795387965970087 1.3372127466299653  0.24074461423512816 1.5710148450850265 1.3198506792962577  0.23797117761198022 1.5673155188593539 1.3109544369036708  0.2355874368923615 1.5640950355290419 1.3015745313007927  0.23362914408119562 1.5614211927130075 1.2917640480797694  0.23212901641521005 1.5593575762895289 1.2815950578558766  0.2311155692546184 1.5579583037547089 1.2711607131599976  0.23060902537937192 1.5572589417607581 1.2605789847800684  0.23060902475093786 1.5572589408930977 1.25 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+7 0 0  8 72 11  0.23060902475093784 1.5572589408930977 1.25  0.2306090253266759 1.5572589416880023 1.2403080939310815  0.2310342496551667 1.5578459898817596 1.2306130592123639  0.2318847892368833 1.5590204337204854 1.2210299264371134  0.23314715262136432 1.5607579573262438 1.2116523473795875  0.23480019822430456 1.5630191005230041 1.2025559225037628  0.23681910255386118 1.5657563422969101 1.1938008009317798  0.23917736384617608 1.5689187478908639 1.185433552872097  0.24494923151952339 1.5765629574463067 1.16825458487937  0.24847357887202712 1.5811776556771773 1.1595863701867639  0.25238431145417434 1.5862274770913907 1.1515162197365003  0.25664838946694796 1.591645255387979 1.1440667267110092  0.26123499913425202 1.5973690697163032 1.137252065464524  0.26611584998590815 1.6033436143121336 1.1310798876895927  0.27126607531516195 1.6095213231531675 1.1255535774537704  0.28780563333546905 1.6289471113256968 1.1106097220023139  0.30000795570727895 1.6427308357544081 1.1033003027100983  0.31306914770262817 1.6568390062267508 1.0987899612669718  0.32676142464802371 1.6709276263029047 1.0971435089988484  0.34081889164110013 1.684687337793247 1.098372108093016  0.35493623367224481 1.6978481505506715 1.1024684679391314  0.36877177228397623 1.7101775445851723 1.1093717619474581  0.38800439974623274 1.7266532120642146 1.1234708391771506  0.39391917366630935 1.7316195160855685 1.1284897710688866  0.39966394917629372 1.7363504743755143 1.1340892789857251  0.40519953644821743 1.7408254129932434 1.1402666478468999  0.41048093677063863 1.7450212007514907 1.1470163225578758  0.41545801463969217 1.7489128177529336 1.1543284276539072  0.42007623191174137 1.7524734668147708 1.16218767904956  0.42835393761748652 1.7587799699498221 1.1787087767248308  0.4320401685442804 1.7615486605249644 1.1873445808501557  0.43527567979867521 1.7639482234930464 1.1964483186209958  0.43799737095819385 1.7659454527941973 1.2059731897490786  0.44014498323178758 1.767509300647877 1.2158549285554741  0.4416658636698656 1.768612078320114 1.2260097624237507  0.44252307816597386 1.7692330826434173 1.2363308368903219  0.44288630231634618 1.7694961824066842 1.2563425267323345  0.44247850706952085 1.7692006937910796 1.2660349832256914  0.44148202771623252 1.7684796645922805 1.2756421673524727  0.43991693532345949 1.767344382189604 1.285067924670005  0.43781954728438366 1.76581440516698 1.2942333782340523  0.43523546557513676 1.7639135820574288 1.3030746413748331  0.43221500743866798 1.7616681361677782 1.3115411822399725  0.42485902532046971 1.7561331366535327 1.3289450981366353  0.42038758894451689 1.752731785260232 1.3377444494294337  0.41546758440996018 1.7489385566500784 1.3459566926865136  0.41016683717002395 1.7447869010168187 1.353556870746119  0.40454815961726343 1.7403080722215212 1.3605293360737603  0.39866772711397863 1.7355307118989263 1.3668655829017644  0.39257380352485577 1.7304798698502182 1.372561846015637  0.3733268346330022 1.7141917389033312 1.3880829555784531  0.35960277646515681 1.7021218718317648 1.3957971742529021  0.34551140024191235 1.6891664128926345 1.4007210744216003  0.33139876717057209 1.67554834606082 1.4027859962866231  0.31757808203612869 1.6615293183406177 1.4019771495875699  0.30432326733863441 1.6474103688687163 1.3982977332109254  0.29187148809334029 1.6335305405606002 1.3918044519491164  0.27484717429506123 1.613780554783921 1.3780286215120883  0.26950233442909932 1.6074451225244544 1.3728493958276737  0.26441852960733453 1.6012923880886372 1.3670128087988742  0.25962039506134998 1.5953686295300604 1.3605217312820252  0.25513560660008333 1.5897274619964854 1.3533824526069127  0.25099412875401772 1.5844289746128195 1.3456066462027629  0.2472281177677044 1.5795387965970087 1.3372127466299653  0.24074461423512816 1.5710148450850265 1.3198506792962577  0.23797117761198022 1.5673155188593539 1.3109544369036708  0.2355874368923615 1.5640950355290419 1.3015745313007927  0.23362914408119562 1.5614211927130075 1.2917640480797694  0.23212901641521005 1.5593575762895289 1.2815950578558766  0.2311155692546184 1.5579583037547089 1.2711607131599976  0.23060902537937192 1.5572589417607581 1.2605789847800684  0.23060902475093786 1.5572589408930977 1.25 
+ 0 9 0.073841945479720381 7 0.15965895039044564 7 0.33670575571798533 7 0.41799836750696001 7 0.49687770121375635 7 0.57050640050360513 7 0.6559889661311874 7 0.8329958105429861 7 0.91943143228834223 7 1 9
+1 -0.37885801717798212 2.166725982822018 1.2500000000000002 0.70710678118654757 -0.70710678118654757 0 
+1 2.7999999999999998 1 0.95000000000000007 -1 0 0 
+2 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 0.13
+2 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 0.14999999999999999
+1 2.7999999999999998 1 0.97000000000000008 -1 0 0 
+7 0 0  8 58 9  1.9499999999999995 1 0.96999999999999997  1.950000000860854 0.99139145219982738 0.96999999370913814  1.9499108477954412 0.9828019404658348 0.97065154376169893  1.9497332316297991 0.97439432606805554 0.9719492906248095  1.9494772652238455 0.96626396809759296 0.97383823926053137  1.9491561128904022 0.95846394909061328 0.9762554413147454  1.9487826271956619 0.9510177545827152 0.97914453825118586  1.9483678002376803 0.94392515251930798 0.98246189752572211  1.947429291408884 0.92976648753848123 0.99027891856302985  1.9468995113159404 0.922774519586125 0.99485706192162071  1.9463395276188542 0.91613661784028344 0.99992018656211312  1.9457570107666902 0.90983082248435665 1.005492674109455  1.9451592160669482 0.90384420992789938 1.0115963132805061  1.9445547155841125 0.89818339777693068 1.0183193898497984  1.9439518983180277 0.8928570877674985 1.0257324961469143  1.94311808229669 0.88583939822735502 1.0376773500719434  1.9428814648448054 0.88389253539718926 1.0412819042901935  1.9426561368626947 0.88207554624006324 1.0449563667942134  1.9424435224379855 0.88039137282766655 1.0486952892170871  1.942244929976622 0.87884267559415141 1.052493081465079  1.9420615522028639 0.87743183333613639 1.0563440117176348  1.9418944661592885 0.87616094321270332 1.0602422064273811  1.9415198960491398 0.87333822951793061 1.0700904935245112  1.9413339011150295 0.87196328865204986 1.07609312425199  1.9411898445765852 0.87091352557249191 1.0821683535342068  1.9410901165340888 0.87019342703222968 1.0882951200971125  1.9410362463231974 0.86980576499958895 1.0944523714170689  1.9410288675035712 0.86975173861404065 1.1006189632662797  1.9410677025289149 0.87003093221067129 1.1067735777475407  1.9412658667307374 0.87147267710665643 1.1212371271328208  1.9414550194453779 0.87285504407777859 1.1288761676392951  1.941694823197051 0.87462679749285532 1.135865476370207  1.9419668927211757 0.87667439533996938 1.1422586715272973  1.9422582234730668 0.87891597109030206 1.1481206850563941  1.9425610282019248 0.88130094143314319 1.1535302200611957  1.9428725132169888 0.88381620162512753 1.1585782207079021  1.9434344397342012 0.88848543364229182 1.1669422485911431  1.9436851957416541 0.89060957238728788 1.1704448901954081  1.943945021890112 0.89285903457467564 1.1738698522352908  1.9442123657236432 0.89523049777729258 1.1772119564027277  1.9444856298657802 0.89772041179520778 1.1804662189316699  1.9447631720195189 0.90032499865572457 1.183627850598082  1.9450433049673206 0.90304025261337972 1.1866922567199432  1.9457901112435092 0.91053960111107979 1.1945665952969795  1.9462491256557859 0.91541724162257043 1.1991017539490956  1.9466979738939205 0.92050068327975654 1.2033070783798696  1.9471330941635796 0.92579787523573076 1.2072028997441777  1.9475504619354982 0.93131770388124624 1.2107968875112254  1.9479455024151873 0.93706976978021839 1.214088006452986  1.9483130266522679 0.94306496091202852 1.2170661800822988  1.9489512148684749 0.95501001534618157 1.2221234040122864  1.9492277504638 0.9609189057008708 1.2242602534217328  1.9494714622279525 0.96704285330548823 1.2261039332875034  1.9496764024305435 0.97337075571302889 1.227628467445079  1.9498362921822086 0.97987925548928168 1.2288038358338549  1.9499454197348614 0.98652980125302248 1.2296010551028629  1.9500000006735605 0.99326439132704125 1.230000004922176  1.9499999999999995 1 1.2300000000000002 
+ 0 9 0.14079435579561092 7 0.29497196915038909 7 0.35963172349361244 7 0.4566160594684977 7 0.588796716995306 7 0.68746682948596005 7 0.85103750386005472 7 1 9
+7 0 0  8 58 9  1.9499999999999997 1 1.2300000000000002  1.9499999991793726 1.0082062719115557 1.2299999940031092  1.9499189893183679 1.0163993988942628 1.2294079626582377  1.9497574040473193 1.0244358286137953 1.228227312781657  1.9495236453192553 1.0322279447921812 1.226503901979437  1.9492289637898892 1.0397250315342561 1.2242921398285955  1.9488846183038087 1.0469027814548271 1.2216422750859273  1.9485004575121858 1.0537578864568746 1.2185946651933792  1.9476034904124564 1.0678597153562226 1.2112105923896999  1.9470803543808919 1.0749981239279209 1.2067507438198737  1.9465244678775084 1.0817724487253648 1.2018012645850409  1.9459439915355157 1.0882056151922106 1.1963450202161965  1.9453465043361882 1.0943121642974394 1.190363677108504  1.9447404105754378 1.1000898110288986 1.183779377498605  1.9441338411878362 1.1055337419672171 1.1765232348773682  1.943135406508643 1.1140510266298582 1.1627323499475246  1.9427472874682656 1.1172376017680634 1.1568537812650794  1.9423679348302356 1.1202575607658447 1.1504787852923701  1.9419996553130976 1.1231016008051353 1.1434360989056829  1.9416564966667158 1.1256767887691439 1.1355856662796486  1.9413628179558418 1.1278262616066757 1.1268309045958003  1.9411572359065887 1.1293187485045231 1.1170875440299577  1.9410570414083448 1.130044937833266 1.1022654717398304  1.9410496792848353 1.1300979554138058 1.0981619783177277  1.9410628138059609 1.1300029746937403 1.0940574228194453  1.9410964387886549 1.1297599998320416 1.0899581324843879  1.941150371910882 1.1293693721527402 1.0858704193904862  1.9412242547116365 1.1288317701449275 1.0818005804541959  1.9413175525909407 1.1281482094627546 1.0777548974304989  1.9415555571452376 1.1263883567604922 1.069222474597985  1.9417052492611897 1.1252735570509262 1.0647434472190125  1.9418776233444606 1.1239776811777047 1.060311727478489  1.9420714249317184 1.1225031247316901 1.0559359289837462  1.942285170464658 1.1208527033803897 1.0516242895105139  1.9425171648451089 1.1190297147347137 1.0473848542664923  1.9427655189901498 1.1170380002157314 1.0432256591549209  1.9432616367003261 1.1129655350179746 1.0355364108345335  1.9435064442264414 1.1109190650075449 1.0319873954351491  1.9437611214930506 1.1087455802918589 1.0285133153909054  1.9440241479596276 1.1064482967054985 1.0251194269271031  1.9442939510176365 1.1040306625159089 1.021810794943433  1.944568905990534 1.1014963584233972 1.0185922930139761  1.9448473361337673 1.098849297561133 1.0154686033872047  1.945595292343099 1.0914927847014859 1.0073947335941384  1.9460575508294728 1.0866918962310779 1.002734754135395  1.9465108019790931 1.0816870301116581 0.99841251334245162  1.946951498762248 1.0764714728099631 0.99440449722865898  1.9473757243456071 1.0710370697163991 0.99070017315110337  1.947779093526218 1.0653744410218586 0.98729769161764291  1.9481566755039712 1.0594722159673613 0.98420437640941061  1.9488363161299489 1.0473811384562006 0.97876731270391049  1.9491408179044369 1.0412066768344772 0.9763989050886851  1.9494104247207233 1.0347894966848354 0.97435047328128199  1.9496381936387781 1.0281393399106786 0.97265249374508178  1.949816660942312 1.0212804666865021 0.97133973273765029  1.949938861264976 1.0142551285649621 0.97044679843357351  1.9499999992870909 1.0071290898668126 0.97000000520971952  1.9499999999999997 0.99999999999999989 0.96999999999999997 
+ 0 9 0.20596730384692036 7 0.44368383357270402 7 0.60514289218842465 7 0.66680163654742453 7 0.73616763538685281 7 0.7978273762506124 7 0.90077382426757679 7 1 9
+2 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 0.13
+2 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 0.14999999999999999
+1 -0.36471588155425116 2.1808681184457486 1.2500000000000002 0.70710678118654757 -0.70710678118654757 0 
+7 0 0  8 72 11  0.24264392806118382 1.5735083088303143 1.25  0.24264392806118382 1.5735083088303143 1.2415679532668684  0.24302485784283032 1.5740113478211013 1.2331350312769644  0.24378680353016197 1.575017566643629 1.2248112619066631  0.24491414880551049 1.5765023769966571 1.2166818036303795  0.24638481516573915 1.5784289776378686 1.2088118091066726  0.24817422695546432 1.5807553256593982 1.2012493994271174  0.25025738143260934 1.5834385658928032 1.1940277763702754  0.25533346977750998 1.5899077800876131 1.179240925665064  0.25841811868008924 1.5938011395735703 1.171794841237958  0.26183923589035851 1.5980686362054128 1.164842972018594  0.26557406077690821 1.6026642053275593 1.1583984389095794  0.26960289791504244 1.6075464289391121 1.1524728211563802  0.2739086910570257 1.6126784529582958 1.1470763193955191  0.27847746017347569 1.6180284741920197 1.1422190190139236  0.29280484062290346 1.6344956328945264 1.1294258777418038  0.30340464420792829 1.646294170177325 1.1229832265085993  0.31487297415183657 1.6585786617062959 1.1189380539946223  0.32694621955328512 1.6709659947982713 1.1174362215272988  0.33931860425884253 1.6831041009623735 1.1185496919203959  0.35163978407534824 1.6946786476717666 1.1222235327306596  0.36351913654113366 1.7054126286831157 1.1283250991057316  0.37984398473295916 1.719691558504854 1.1404058638719046  0.38497152535951268 1.7240974998990666 1.1448189705199459  0.38991249431780706 1.7282718675964071 1.1497178345829551  0.39464032436225222 1.7322029068973326 1.1550928947160242  0.39912508956274695 1.73587697731477 1.160934973073418  0.40333370842738109 1.739278709576654 1.1672346326396641  0.40722969251130331 1.7423905715631183 1.1739824186315819  0.41423870068433188 1.7479326354196041 1.1882023699810649  0.41736766984291895 1.7503767787449376 1.195657549825953  0.42011641373430064 1.7525009861538914 1.2035187953946407  0.42243409525069253 1.7542759580081841 1.2117549754242363  0.42426843185454693 1.755671457940716 1.2203170332447981  0.42557093689244568 1.7566587158647262 1.2291349946821564  0.42630565409597049 1.7572151860479752 1.238113580342368  0.42661569185975629 1.7574499788056244 1.2555264205678081  0.42626595160176289 1.7571850314175552 1.2639565136290549  0.42541186267914372 1.7565388371003914 1.2723027696279914  0.42407349330701777 1.7555240195395732 1.2804763273156325  0.42228545600240219 1.7541616389526564 1.2884081281930666  0.42008894361606841 1.7524760417789718 1.2960460938560419  0.41752633642380238 1.7504917561645139 1.3033528227420066  0.41129987327141837 1.7456206327086221 1.3183392147336539  0.40752497332278809 1.7426399864061679 1.3259028924610858  0.40336606208436848 1.7393185392620862 1.3329785863725918  0.39887035169494406 1.7356799652445802 1.3395519825934055  0.39408027917405702 1.7317447283367025 1.3456112287909305  0.38903339393301467 1.7275303820341383 1.351146461109799  0.38376173840174282 1.7230510073667711 1.3561483357143593  0.36747872052832753 1.7089578975698967 1.3694140864932307  0.35576716580476742 1.6984961155444311 1.3761940016818195  0.34352711674717151 1.6871399332423076 1.3806075823672777  0.33113303563362045 1.6751390884753981 1.3824970134348258  0.31893753519684293 1.6627899447557579 1.3817740876326592  0.30726256869530411 1.6504399028502872 1.3784760538146972  0.29639794599041575 1.6384858130834952 1.3727211254279252  0.28161206847895365 1.6216718682359639 1.3608866975083764  0.27686838612754744 1.6161734557926826 1.3563261217318663  0.27238323938912895 1.6108792601562714 1.3512144209504608  0.26817068066222588 1.6058208701444892 1.345563317400245  0.26424698743664754 1.6010339775666285 1.3393839935120027  0.26063046734938594 1.596558117670114 1.3326879446683402  0.25734209903818228 1.5924370636478171 1.3254865660615471  0.25164735016047757 1.5852248647248304 1.3105524397844555  0.24919893040039237 1.5820855247861139 1.3028742827042572  0.24708791933295149 1.5793493144013422 1.2947750640181597  0.2453463292868158 1.5770714372686749 1.2862909731351022  0.24400643999307586 1.5753076241757618 1.2774779640377381  0.24309822535317083 1.574108230782292 1.2684149165903786  0.24264392806118382 1.5735083088303143 1.2592082604941544  0.24264392806118382 1.5735083088303143 1.25 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+7 0 0  8 72 11  0.24264392806118382 1.5735083088303143 1.25  0.24264392806118382 1.5735083088303143 1.2415679532668684  0.24302485784283032 1.5740113478211013 1.2331350312769644  0.24378680353016197 1.575017566643629 1.2248112619066631  0.24491414880551049 1.5765023769966571 1.2166818036303795  0.24638481516573915 1.5784289776378686 1.2088118091066726  0.24817422695546432 1.5807553256593982 1.2012493994271174  0.25025738143260934 1.5834385658928032 1.1940277763702754  0.25533346977750998 1.5899077800876131 1.179240925665064  0.25841811868008924 1.5938011395735703 1.171794841237958  0.26183923589035851 1.5980686362054128 1.164842972018594  0.26557406077690821 1.6026642053275593 1.1583984389095794  0.26960289791504244 1.6075464289391121 1.1524728211563802  0.2739086910570257 1.6126784529582958 1.1470763193955191  0.27847746017347569 1.6180284741920197 1.1422190190139236  0.29280484062290346 1.6344956328945264 1.1294258777418038  0.30340464420792829 1.646294170177325 1.1229832265085993  0.31487297415183657 1.6585786617062959 1.1189380539946223  0.32694621955328512 1.6709659947982713 1.1174362215272988  0.33931860425884253 1.6831041009623735 1.1185496919203959  0.35163978407534824 1.6946786476717666 1.1222235327306596  0.36351913654113366 1.7054126286831157 1.1283250991057316  0.37984398473295916 1.719691558504854 1.1404058638719046  0.38497152535951268 1.7240974998990666 1.1448189705199459  0.38991249431780706 1.7282718675964071 1.1497178345829551  0.39464032436225222 1.7322029068973326 1.1550928947160242  0.39912508956274695 1.73587697731477 1.160934973073418  0.40333370842738109 1.739278709576654 1.1672346326396641  0.40722969251130331 1.7423905715631183 1.1739824186315819  0.41423870068433188 1.7479326354196041 1.1882023699810649  0.41736766984291895 1.7503767787449376 1.195657549825953  0.42011641373430064 1.7525009861538914 1.2035187953946407  0.42243409525069253 1.7542759580081841 1.2117549754242363  0.42426843185454693 1.755671457940716 1.2203170332447981  0.42557093689244568 1.7566587158647262 1.2291349946821564  0.42630565409597049 1.7572151860479752 1.238113580342368  0.42661569185975629 1.7574499788056244 1.2555264205678081  0.42626595160176289 1.7571850314175552 1.2639565136290549  0.42541186267914372 1.7565388371003914 1.2723027696279914  0.42407349330701777 1.7555240195395732 1.2804763273156325  0.42228545600240219 1.7541616389526564 1.2884081281930666  0.42008894361606841 1.7524760417789718 1.2960460938560419  0.41752633642380238 1.7504917561645139 1.3033528227420066  0.41129987327141837 1.7456206327086221 1.3183392147336539  0.40752497332278809 1.7426399864061679 1.3259028924610858  0.40336606208436848 1.7393185392620862 1.3329785863725918  0.39887035169494406 1.7356799652445802 1.3395519825934055  0.39408027917405702 1.7317447283367025 1.3456112287909305  0.38903339393301467 1.7275303820341383 1.351146461109799  0.38376173840174282 1.7230510073667711 1.3561483357143593  0.36747872052832753 1.7089578975698967 1.3694140864932307  0.35576716580476742 1.6984961155444311 1.3761940016818195  0.34352711674717151 1.6871399332423076 1.3806075823672777  0.33113303563362045 1.6751390884753981 1.3824970134348258  0.31893753519684293 1.6627899447557579 1.3817740876326592  0.30726256869530411 1.6504399028502872 1.3784760538146972  0.29639794599041575 1.6384858130834952 1.3727211254279252  0.28161206847895365 1.6216718682359639 1.3608866975083764  0.27686838612754744 1.6161734557926826 1.3563261217318663  0.27238323938912895 1.6108792601562714 1.3512144209504608  0.26817068066222588 1.6058208701444892 1.345563317400245  0.26424698743664754 1.6010339775666285 1.3393839935120027  0.26063046734938594 1.596558117670114 1.3326879446683402  0.25734209903818228 1.5924370636478171 1.3254865660615471  0.25164735016047757 1.5852248647248304 1.3105524397844555  0.24919893040039237 1.5820855247861139 1.3028742827042572  0.24708791933295149 1.5793493144013422 1.2947750640181597  0.2453463292868158 1.5770714372686749 1.2862909731351022  0.24400643999307586 1.5753076241757618 1.2774779640377381  0.24309822535317083 1.574108230782292 1.2684149165903786  0.24264392806118382 1.5735083088303143 1.2592082604941544  0.24264392806118382 1.5735083088303143 1.25 
+ 0 9 0.075357895493250907 7 0.16242872596973951 7 0.33405974862499205 7 0.41637394058885624 7 0.49691097150549302 7 0.57200500261053622 7 0.65881447484231137 7 0.83037018105172034 7 0.91779788640262461 7 1 9
+Polygon3D 0
+PolygonOnTriangulations 0
+Surfaces 24
+1 0 0 0 1 -0 0 0 1 0 -0 0 1 
+1 0.14999999999999999 0 0 1 -0 0 0 1 0 -0 0 1 
+1 0 0 0 0 -1 0 1 0 0 -0 0 1 
+1 0 0.14999999999999999 0 0 -1 0 1 0 0 -0 0 1 
+1 0 0 0 0 0 -1 1 0 0 0 -1 0 
+1 0 0 0 -1 0 0 0 1 0 0 0 -1 
+1 0 0 0 0 1 0 1 0 0 0 0 -1 
+1 0 0 0 0 0 -1 1 0 0 0 -1 0 
+2 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 0.94999999999999996
+1 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 
+1 0 2 0 0 1 0 1 0 0 0 0 -1 
+1 2 0 0 -1 0 0 0 1 0 0 0 -1 
+2 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 0.90000000000000002
+1 1 1 0.10000000000000001 0 0 1 1 0 -0 -0 1 0 
+2 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 0.14999999999999999
+2 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 0.14999999999999999
+1 1 1 2.1000000000000001 0 0 1 1 0 -0 -0 1 0 
+1 1 1 2.1000000000000001 0 0 1 1 0 -0 -0 1 0 
+1 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 
+2 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 0.13
+1 2.7999999999999998 1 1.1000000000000001 -1 0 0 0 0 -1 -0 -1 -0 
+1 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 
+2 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 0.13
+1 -0.27279199999999998 2.2727919999999999 1.25 0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 -0.70710678118654757 0 0 -0 -1 
+Triangulations 0
+
+TShapes 183
+Ve
+1e-07
+0 0 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 0.05
+0
+
+0101000
++183 0 -183 1 *
+Ed
+ 1e-07 1 1 0
+1  2 0 0 0.05
+0
+
+0101000
++183 2 -183 3 *
+Ed
+ 1e-07 1 1 0
+1  3 0 0 0.15
+0
+
+0101000
++183 0 -183 2 *
+Wi
+
+0101000
++182 0 -181 0 -180 0 +180 1 *
+Fa
+0  1e-07 1 0
+
+0111000
++179 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 0.05
+0
+
+0101000
++183 4 -183 5 *
+Ed
+ 1e-07 1 1 0
+1  5 0 0 0.05
+0
+
+0101000
++183 6 -183 7 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 0.15
+0
+
+0101000
++183 4 -183 6 *
+Wi
+
+0101000
++177 0 -176 0 -175 0 +175 1 *
+Fa
+0  1e-07 2 0
+
+0111000
++174 0 *
+Ed
+ 1e-07 1 1 0
+1  7 0 0 0.15
+0
+
+0101000
++183 0 -183 4 *
+Wi
+
+0101000
++182 0 -177 0 -172 0 +172 1 *
+Fa
+0  1e-07 3 0
+
+0111000
++171 0 *
+Wi
+
+0101000
++181 0 -176 0 -172 2 +172 3 *
+Fa
+0  1e-07 4 0
+
+0111000
++169 0 *
+Wi
+
+0101000
++180 0 -175 0 -172 0 +172 2 *
+Fa
+0  1e-07 5 0
+
+0111000
++167 0 *
+Sh
+
+0101000
++178 0 -173 0 -170 0 +168 0 +166 0 -166 1 *
+So
+
+0100000
+-165 0 *
+Ve
+1e-07
+2 0 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 0.15
+0
+
+0101000
++183 0 -163 9 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 0.05
+0
+
+0101000
++163 9 -183 5 *
+Wi
+
+0101000
++182 8 -162 8 +172 10 -161 8 *
+Fa
+0  1e-07 3 8
+
+0111000
++160 0 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 0.15
+0
+
+0101000
++163 9 -183 6 *
+Wi
+
+0101000
++180 8 -162 8 +172 11 -158 8 *
+Fa
+0  1e-07 5 8
+
+0111000
++157 0 *
+Wi
+
+0101000
++161 8 -158 8 +175 10 -176 8 *
+Fa
+0  1e-07 2 8
+
+0111000
++155 0 *
+Sh
+
+0101000
+-178 8 +159 0 -168 8 -156 0 +166 10 +154 0 *
+So
+
+0100000
++153 0 *
+Ve
+1e-07
+0 2 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 0.15
+0
+
+0101000
++183 0 -151 13 *
+Ed
+ 1e-07 1 1 0
+1  2 0 0 0.05
+0
+
+0101000
++151 13 -183 3 *
+Wi
+
+0101000
++182 12 -150 12 +180 14 -149 12 *
+Fa
+0  1e-07 1 12
+
+0111000
++148 0 *
+Ed
+ 1e-07 1 1 0
+1  7 0 0 0.15
+0
+
+0101000
++151 16 -183 4 *
+Wi
+
+0101000
++150 12 -172 12 +146 15 -175 12 *
+Fa
+0  1e-07 5 12
+
+0111000
++145 0 *
+Wi
+
+0101000
++149 12 -146 15 +172 17 -176 12 *
+Fa
+0  1e-07 4 12
+
+0111000
++143 0 *
+Sh
+
+0101000
+-147 0 +170 12 -144 0 +166 14 -142 0 +173 12 *
+So
+
+0100000
++141 0 *
+Ve
+1e-07
+2 2 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 0.15
+0
+
+0101000
++183 0 -139 20 *
+Ed
+ 1e-07 1 1 0
+1  5 0 0 0.05
+0
+
+0101000
++139 22 -183 7 *
+Wi
+
+0101000
++181 18 -138 19 +172 21 -137 18 *
+Fa
+0  1e-07 4 18
+
+0111000
++136 0 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 0.15
+0
+
+0101000
++183 4 -139 22 *
+Wi
+
+0101000
++180 18 -172 18 +138 19 -134 18 *
+Fa
+0  1e-07 5 18
+
+0111000
++133 0 *
+Wi
+
+0101000
++177 18 -134 18 +175 23 -137 18 *
+Fa
+0  1e-07 2 18
+
+0111000
++131 0 *
+Sh
+
+0101000
+-178 18 +170 18 -135 0 -132 0 +166 23 +130 0 *
+So
+
+0100000
++129 0 *
+Ed
+ 1e-07 1 1 0
+1  8 0 0 0.1
+0
+
+0101000
++183 0 -183 25 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0 2
+0
+
+0101000
++183 0 -183 26 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0.15 1.85
+0
+
+0101000
++183 2 -183 12 *
+Ed
+ 1e-07 1 1 0
+1  10 0 0 0.1
+0
+
+0101000
++151 0 -183 27 *
+Wi
+
+0101000
++127 0 -180 0 +126 25 -125 0 -124 0 -150 12 *
+Fa
+0  1e-07 6 0
+
+0111000
++123 0 *
+Ed
+ 1e-07 1 1 0
+1  11 0 0 2
+0
+
+0101000
++183 0 -183 28 *
+Ed
+ 1e-07 1 1 0
+1  11 0 0.15 1.85
+0
+
+0101000
++183 4 -183 8 *
+Ed
+ 1e-07 1 1 0
+1  12 0 0 0.1
+0
+
+0101000
++163 0 -183 29 *
+Wi
+
+0101000
++127 0 -172 0 +121 25 -120 0 -119 0 -162 8 *
+Fa
+0  1e-07 7 0
+
+0111000
++118 0 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0 2
+0
+
+0101000
++183 28 -183 30 *
+Wi
+
+0101000
++126 25 -121 25 +121 27 -116 25 *
+Ve
+1e-07
+1.95 1 0.1
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  14 0 0 6.28318530717959
+2  1 9 0 0 6.28318530717959
+2  2 10 0 0 6.28318530717959
+0
+
+0101100
++114 0 -114 0 *
+Wi
+
+0101000
++113 0 *
+Fa
+0  1e-07 8 25
+
+0111000
++115 0 +112 0 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0.15 1.85
+0
+
+0101000
++183 31 -183 32 *
+Ed
+ 1e-07 1 1 0
+1  11 0 0.15 1.85
+0
+
+0101000
++183 33 -183 34 *
+Wi
+
+0101000
+-172 2 +175 0 -120 0 -180 8 -172 11 -110 0 +172 18 -180 18 +109 26 +175 12 
++172 12 +125 0 *
+Wi
+
+0101000
+-180 24 -172 35 +175 24 +172 24 *
+Fa
+0  1e-07 8 0
+
+0111000
++108 0 +107 0 *
+Ed
+ 1e-07 1 1 0
+1  15 0 0 0.1
+0
+
+0101000
++139 0 -183 36 *
+Wi
+
+0101000
++124 0 -146 15 +121 27 -109 26 -105 0 -138 19 *
+Fa
+0  1e-07 11 0
+
+0111000
++104 0 *
+Wi
+
+0101000
++119 0 -158 8 +116 25 -110 0 -105 0 -134 18 *
+Fa
+0  1e-07 12 0
+
+0111000
++102 0 *
+Ve
+1e-07
+1.9 1 0.1
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 0 6.28318530717959
+2  3 13 0 0 6.28318530717959
+2  4 14 0 0 6.28318530717959
+0
+
+0101100
++100 0 -100 0 *
+Wi
+
+0101000
+-99 0 *
+Wi
+
+0101000
++113 0 *
+Fa
+0  1e-07 10 0
+
+0111000
++98 0 +97 0 *
+Wi
+
+0101000
+-99 0 *
+Fa
+0  1e-07 8 25
+
+0111000
++95 0 *
+Sh
+
+0101000
++122 0 -117 0 +166 0 -111 0 +106 0 +103 0 +144 0 -101 0 +156 0 +96 0 
++132 0 +166 24 -94 0 *
+So
+
+0100000
++93 0 *
+Ve
+1e-07
+0.465481164306493 1.72407845855426 1.18266817568798
+0 0
+
+0101101
+*
+Ve
+2.00001e-07
+0.266438962921461 1.52142900272257 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  17 0 0.43213918 1
+2  5 13 0 0.43213918 1
+2  6 15 0 0.43213918 1
+0
+
+0101000
++91 0 -90 0 *
+Ed
+ 1e-07 1 1 0
+1  18 0 0 0.43213918
+2  7 13 0 0 0.43213918
+2  8 15 0 0 0.43213918
+0
+
+0101000
++90 0 -91 0 *
+Wi
+
+0101000
++89 0 +88 0 *
+Ve
+3.29263687416892e-07
+1.9 1 0.95
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  19 0 0 0.85
+3  9 10CN 13 0 0 0.85
+0
+
+0101000
++100 0 -86 0 *
+Ve
+3.29263687416892e-07
+1.9 1 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  20 0 0 1
+2  11 13 0 0 1
+2  12 16 0 0 1
+0
+
+0101000
++84 0 -86 0 *
+Ve
+1e-07
+1.9 1 2.1
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  19 0 1.15 2
+3  9 10CN 13 0 1.15 2
+0
+
+0101000
++84 0 -82 0 *
+Ed
+ 1e-07 1 1 0
+1  21 0 0 6.28318530717959
+2  13 13 0 0 6.28318530717959
+2  14 17 0 0 6.28318530717959
+0
+
+0101100
++82 0 -82 0 *
+Ed
+ 1e-07 1 1 0
+1  22 0 0 1
+2  15 13 0 0 1
+2  16 16 0 0 1
+0
+
+0101000
++86 0 -84 0 *
+Wi
+
+0101000
++99 0 -85 0 +83 0 -81 0 -80 0 +81 0 +79 0 +85 0 *
+Fa
+0  1e-07 13 0
+
+0111000
++87 0 +78 0 *
+Ve
+3.31024601526247e-07
+1.95 1 0.95
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  23 0 0 0.85
+3  17 18CN 9 0 0 0.85
+0
+
+0101000
++114 0 -76 0 *
+Ve
+3.31024601526247e-07
+1.95 1 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  24 0 0 1
+2  19 9 0 0 1
+2  20 16 0 0 1
+0
+
+0101000
++74 0 -76 0 *
+Ve
+1e-07
+1.95 1 2.1
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  23 0 1.15 2
+3  17 18CN 9 0 1.15 2
+0
+
+0101000
++74 0 -72 0 *
+Ed
+ 1e-07 1 1 0
+1  25 0 0 6.28318530717959
+2  21 9 0 0 6.28318530717959
+2  22 18 0 0 6.28318530717959
+0
+
+0101100
++72 0 -72 0 *
+Ed
+ 1e-07 1 1 0
+1  26 0 0 1
+2  23 9 0 0 1
+2  24 16 0 0 1
+0
+
+0101000
++76 0 -74 0 *
+Wi
+
+0101000
+-75 0 +73 0 -71 0 -70 0 +71 0 +69 0 +75 0 +113 0 *
+Ve
+2.0018040942708e-07
+0.429753008548309 1.75981469359311 1.18267954968769
+0 0
+
+0101101
+*
+Ve
+2.00082051969147e-07
+0.430078971550043 1.76005922216117 1.18348884639465
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  27 0 0.43213918 0.433050395544021
+2  25 9 0 0.43213918 0.433050395544021
+2  26 15 0 0.43213918 0.433050395544021
+0
+
+0101000
++67 0 -66 0 *
+Ve
+2.00001e-07
+0.230609024750938 1.5572589408931 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  28 0 0 0.43213918
+2  27 9 0 0 0.43213918
+2  28 15 0 0 0.43213918
+0
+
+0101000
++64 0 -67 0 *
+Ed
+ 1e-07 1 1 0
+1  27 0 0.433050395544021 1
+2  25 9 0 0.433050395544021 1
+2  26 15 0 0.433050395544021 1
+0
+
+0101000
++66 0 -64 0 *
+Wi
+
+0101000
++65 0 +63 0 +62 0 *
+Fa
+0  1e-07 9 0
+
+0111000
++68 0 +61 0 *
+Ed
+ 1e-07 1 1 0
+1  29 0 0.861916556515291 0.912587741015034
+3  29 30CN 15 0 0.861916556515291 0.912587741015034
+0
+
+0101000
++64 0 -90 0 *
+Wi
+
+0101000
++62 0 +65 0 +63 0 -59 0 -88 0 -89 0 +59 0 *
+Fa
+0  1e-07 15 0
+
+0111000
++58 0 *
+Ed
+ 1e-07 1 1 0
+1  30 0 0.85 0.9
+3  31 32CN 16 0 0.85 0.9
+0
+
+0101000
++76 0 -86 0 *
+Wi
+
+0101000
++73 0 +69 0 -56 0 -79 0 -83 0 +56 0 *
+Fa
+0  1e-07 16 0
+
+0111000
++55 0 *
+Wi
+
+0101000
+-80 0 *
+Wi
+
+0101000
++70 0 *
+Fa
+0  1e-07 18 0
+
+0111000
++53 0 +52 0 *
+Sh
+
+0101000
+-96 0 -77 0 +60 0 -57 0 -54 0 +51 0 *
+So
+
+0100000
++50 0 *
+Ve
+1e-07
+2.8 1 0.97
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  31 0 0 6.28318530717959
+2  33 20 0 0 6.28318530717959
+2  34 21 0 0 6.28318530717959
+0
+
+0101100
++48 0 -48 0 *
+Wi
+
+0101000
+-47 0 *
+Ve
+1e-07
+2.8 1 0.95
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  32 0 0 6.28318530717959
+2  35 16 0 0 6.28318530717959
+2  36 19 0 0 6.28318530717959
+0
+
+0101100
++45 0 -45 0 *
+Wi
+
+0101000
++44 0 *
+Fa
+0  1e-07 19 0
+
+0111000
++46 0 +43 0 *
+Ve
+2.64358491753894e-07
+1.95 1 0.97
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  33 0 0 0.85
+3  37 38CN 20 0 0 0.85
+0
+
+0101000
++48 0 -41 0 *
+Ve
+2.64358491753894e-07
+1.95 1 1.23
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  34 0 0 1
+2  39 20 0 0 1
+2  40 9 0 0 1
+0
+
+0101000
++41 0 -39 0 *
+Ed
+ 1e-07 1 1 0
+1  35 0 0 1
+2  41 20 0 0 1
+2  42 9 0 0 1
+0
+
+0101000
++39 0 -41 0 *
+Wi
+
+0101000
++40 0 +47 0 -40 0 -38 0 -37 0 *
+Fa
+0  1e-07 20 0
+
+0111000
++36 0 *
+Ed
+ 1e-07 1 1 0
+1  30 0 0 0.85
+3  31 32CN 16 0 0 0.85
+0
+
+0101000
++45 0 -76 0 *
+Wi
+
+0101000
++44 0 -34 0 -69 0 -73 0 +34 0 *
+Fa
+0  1e-07 16 0
+
+0111000
++33 0 *
+Ed
+ 1e-07 1 1 0
+1  23 0 1.13 1.15
+3  17 18CN 9 0 1.13 1.15
+0
+
+0101000
++39 0 -74 0 *
+Ed
+ 1e-07 1 1 0
+1  23 0 0.85 0.87
+3  17 18CN 9 0 0.85 0.87
+0
+
+0101000
++76 0 -41 0 *
+Wi
+
+0101000
+-69 0 +31 0 +38 0 +30 0 *
+Fa
+0  1e-07 9 0
+
+0111000
++29 0 *
+Wi
+
+0101000
+-30 0 +37 0 -31 0 -73 0 *
+Fa
+0  1e-07 9 0
+
+0111000
++27 0 *
+Sh
+
+0101000
+-42 0 -35 0 +32 0 -28 0 -26 0 *
+So
+
+0100000
++25 0 *
+Ve
+1e-07
+-0.364715881554251 2.18086811844575 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  36 0 0 6.28318530717959
+2  43 23 0 0 6.28318530717959
+2  44 24 0 0 6.28318530717959
+0
+
+0101100
++23 0 -23 0 *
+Wi
+
+0101000
+-22 0 *
+Ve
+1e-07
+-0.378858017177982 2.16672598282202 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  37 0 0 6.28318530717959
+2  45 15 0 0 6.28318530717959
+2  46 22 0 0 6.28318530717959
+0
+
+0101100
++20 0 -20 0 *
+Wi
+
+0101000
++19 0 *
+Fa
+0  1e-07 22 0
+
+0111000
++21 0 +18 0 *
+Ve
+2.00001e-07
+0.242643928061184 1.57350830883031 1.25
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  38 0 0 0.858936479998489
+3  47 48CN 23 0 0 0.858936479998489
+0
+
+0101000
++23 0 -16 0 *
+Ve
+1e-07
+0.415820012523814 1.74915535250083 1.19262784272163
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  39 0 0 0.43213918
+2  49 23 0 0 0.43213918
+2  50 9 0 0 0.43213918
+0
+
+0101000
++16 0 -14 0 *
+Ed
+ 1e-07 1 1 0
+1  40 0 0.43213918 1
+2  51 23 0 0.43213918 1
+2  52 9 0 0.43213918 1
+0
+
+0101000
++14 0 -16 0 *
+Wi
+
+0101000
++15 0 +22 0 -15 0 -13 0 -12 0 *
+Fa
+0  1e-07 23 0
+
+0111000
++11 0 *
+Ed
+ 1e-07 1 1 0
+1  29 0 0 0.861916556515291
+3  29 30CN 15 0 0 0.861916556515291
+0
+
+0101000
++20 0 -64 0 *
+Wi
+
+0101000
++19 0 -9 0 -63 0 -65 0 -62 0 +9 0 *
+Fa
+0  1e-07 15 0
+
+0111000
++8 0 *
+Wi
+
+0101000
+-63 0 -62 0 -65 0 *
+Wi
+
+0101000
++12 0 +13 0 *
+Fa
+0  1e-07 9 0
+
+0111000
++6 0 +5 0 *
+Sh
+
+0101000
+-17 0 -10 0 +7 0 -4 0 *
+So
+
+0100000
++3 0 *
+Co
+
+1100000
++164 0 +152 0 +140 0 +128 0 +164 24 +92 0 +49 0 +24 0 +2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/recettes/cuve.py b/src/TEST_PY/recettes/cuve.py
new file mode 100644 (file)
index 0000000..dd42eb6
--- /dev/null
@@ -0,0 +1,572 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS - 2011-2012 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# =============================================================================================
+
+import math
+
+import geompy
+import hexablock
+
+# Charger la géométrie
+# ====================
+
+nom = "cuve"
+
+cuve = geompy.ImportBREP(nom+".brep")
+
+# Sélectionner des sommets de la géométrie
+# -----------------------------------------
+
+sommets = geompy.SubShapeAllSortedCentres(cuve, geompy.ShapeType["VERTEX"])
+
+coin_a = sommets[ 4]
+coin_b = sommets[43]
+coin_c = sommets[62]
+coin_d = sommets[15]
+
+support_a_o = sommets[ 3]
+support_a_x = sommets[ 8]
+support_a_y = sommets[ 6]
+support_a_d = sommets[10]
+
+support_b_o = sommets[42]
+support_b_x = sommets[36]
+support_b_y = sommets[47]
+support_b_d = sommets[38]
+
+support_c_o = sommets[61]
+support_c_x = sommets[51]
+support_c_y = sommets[59]
+support_c_d = sommets[49]
+
+support_d_o = sommets[14]
+support_d_x = sommets[19]
+support_d_y = sommets[12]
+support_d_d = sommets[17]
+
+coin_x1, coin_y1, coin_z1 = geompy.PointCoordinates(sommets[ 2])
+coin_x2, coin_y2, coin_z2 = geompy.PointCoordinates(support_a_d)
+coin_x3, coin_y3, coin_z3 = geompy.PointCoordinates(support_a_o)
+coin_x4, coin_y4, coin_z4 = geompy.PointCoordinates(coin_c)
+
+base_x, base_y, base_z = geompy.PointCoordinates(sommets[52])
+oppo_x, oppo_y, oppo_z = geompy.PointCoordinates(sommets[57])
+
+# Sélectionner des arêtes de la géométrie
+# ---------------------------------------
+
+aretes = geompy.SubShapeAllSortedCentres(cuve, geompy.ShapeType["EDGE"])
+
+interne0, interne_x, interne_y, interne_z,  interne_dx, interne_dy, interne_dz,  interne_rayon = geompy.KindOfShape(aretes[48])
+externe0, externe_x, externe_y, externe_z,  externe_dx, externe_dy, externe_dz,  externe_rayon = geompy.KindOfShape(aretes[49])
+
+cote_a = aretes[41]
+cote_b = aretes[91]
+cote_c = aretes[59]
+cote_d = aretes[12]
+
+piquage_1_int = aretes[  0]
+piquage_1_ext = aretes[  1]
+piquage_1_feb = aretes[ 36]
+piquage_1_feh = aretes[ 38]
+piquage_1_eeb = aretes[ 33]
+piquage_1_eeh = aretes[ 37]
+piquage_1_eib = aretes[ 34]
+piquage_1_eih = aretes[ 35]
+
+piquage_2_int = aretes[103]
+piquage_2_ext = aretes[104]
+piquage_2_feg = aretes[ 68]
+piquage_2_fed = aretes[ 73]
+piquage_2_eeg = aretes[ 79]
+piquage_2_eed = aretes[ 88]
+piquage_2_eig = aretes[ 80]
+piquage_2_eid = aretes[ 89]
+
+support_l, support_a, support_v = geompy.BasicProperties(aretes[43])
+cote_lgr, cote_aire, cote_vol   = geompy.BasicProperties(cote_a)
+
+# Sélectionner des faces de la géométrie
+# --------------------------------------
+
+faces = geompy.SubShapeAllSortedCentres(cuve, geompy.ShapeType["FACE"])
+
+face_cylindrique_int = faces[21]
+face_cylindrique_ext = faces[22]
+
+# Construire le modèle de blocs
+# =============================
+
+# Créer le document
+# -----------------
+
+doc = hexablock.addDocument(nom)
+
+# Calculer l'angle défini par le centre de la cuve et 2 points (projeté dans le plan XY)
+# --------------------------------------------------------------------------------------
+
+centre_cuve = geompy.MakeVertex(externe_x, externe_y, 0)
+
+def calculer_angle(point1, point2):
+  x1, y1, z1 = geompy.PointCoordinates(point1)
+  x2, y2, z2 = geompy.PointCoordinates(point2)
+
+  p1 = geompy.MakeVertex(x1, y1, 0)
+  p2 = geompy.MakeVertex(x2, y2, 0)
+
+  a1 = geompy.MakeEdge(centre_cuve, p1)
+  a2 = geompy.MakeEdge(centre_cuve, p2)
+
+  return geompy.GetAngle(a1, a2)
+
+# Construire les 8 points de la grille
+# ------------------------------------
+
+p1_int0, p1_int_x, p1_int_y, p1_int_z,  p1_int_dx, p1_int_dy, p1_int_dz,  p1_int_rayon = geompy.KindOfShape(piquage_1_int)
+p2_int0, p2_int_x, p2_int_y, p2_int_z,  p2_int_dx, p2_int_dy, p2_int_dz,  p2_int_rayon = geompy.KindOfShape(piquage_2_int)
+
+p1_int_c = geompy.MakeVertex(p1_int_x, p1_int_y, p1_int_z)
+p2_int_c = geompy.MakeVertex(p2_int_x, p2_int_y, p2_int_z)
+
+p1_int_e = geompy.MakePrismDXDYDZ2Ways(p1_int_c, p1_int_dx*cote_lgr, p1_int_dy*cote_lgr, p1_int_dz*cote_lgr)
+p2_int_e = geompy.MakePrismDXDYDZ2Ways(p2_int_c, p2_int_dx*cote_lgr, p2_int_dy*cote_lgr, p2_int_dz*cote_lgr)
+
+plan_2 = geompy.MakePrismDXDYDZ(p1_int_e, +cote_lgr, +cote_lgr, -cote_lgr)
+plan_3 = geompy.MakePrismDXDYDZ(p1_int_e, -cote_lgr, -cote_lgr, -cote_lgr)
+
+plan_7 = geompy.MakePrismDXDYDZ(p2_int_e, 0, -cote_lgr, -cote_lgr)
+plan_8 = geompy.MakePrismDXDYDZ(p2_int_e, 0, +cote_lgr, -cote_lgr)
+
+part_2 = geompy.MakePartition([piquage_1_eeb], [plan_2], [], [], geompy.ShapeType["VERTEX"])
+part_3 = geompy.MakePartition([piquage_1_eeb], [plan_3], [], [], geompy.ShapeType["VERTEX"])
+
+part_7 = geompy.MakePartition([piquage_2_feg], [plan_7], [], [], geompy.ShapeType["VERTEX"])
+part_8 = geompy.MakePartition([piquage_2_fed], [plan_8], [], [], geompy.ShapeType["VERTEX"])
+
+point_1 = coin_c
+point_2 = geompy.SubShapeAllSortedCentres(part_2, geompy.ShapeType["VERTEX"])[1]
+point_3 = geompy.SubShapeAllSortedCentres(part_3, geompy.ShapeType["VERTEX"])[1]
+point_4 = geompy.MakeVertexOnCurve(cote_d, 0.55)
+point_5 = coin_a
+point_6 = coin_b
+point_7 = geompy.SubShapeAllSortedCentres(part_7, geompy.ShapeType["VERTEX"])[0]
+point_8 = geompy.SubShapeAllSortedCentres(part_8, geompy.ShapeType["VERTEX"])[2]
+
+# Construire la grille cylindrique
+# --------------------------------
+
+grille_hauteur = coin_z4-coin_z2
+
+centre = doc.addVertex(externe_x, externe_y, externe_z-grille_hauteur)
+
+grille_x = doc.addVector(1, 1, 0)
+grille_z = doc.addVector(0, 0, 1)
+
+petit_rayon = interne_rayon * 0.2
+grand_rayon = math.sqrt( (coin_x1-externe_x)**2 + (coin_y1-externe_y)**2 )
+
+rayons = [ petit_rayon, interne_rayon-petit_rayon, externe_rayon-interne_rayon, grand_rayon-externe_rayon ]
+
+points = [ point_1, point_2, point_3, point_4, point_5, point_6, point_7, point_8, point_1 ]
+
+angles = []
+for i in xrange(8):
+  angle = calculer_angle(points[i], points[i+1])
+  angles.append(angle)
+
+hauteurs = [ grille_hauteur ]
+
+grille = doc.makeCylindricals(centre, grille_x, grille_z, rayons, angles, hauteurs, False)
+
+# Ajouter le centre
+# -----------------
+
+quad_0 = grille.getQuadJK(0, 7, 0)
+quad_6 = grille.getQuadJK(0, 0, 0)
+quad_7 = grille.getQuadJK(0, 1, 0)
+
+centre_a = doc.addHexa3Quads(quad_0, quad_6, quad_7)
+
+quad_2 = grille.getQuadJK(0, 3, 0)
+quad_3 = grille.getQuadJK(0, 4, 0)
+quad_4 = grille.getQuadJK(0, 5, 0)
+
+centre_b = doc.addHexa3Quads(quad_2, quad_3, quad_4)
+
+quad_1 = grille.getQuadJK(0, 2, 0)
+quad_5 = grille.getQuadJK(0, 6, 0)
+
+quad_a = centre_a.getQuad(1)
+quad_b = centre_b.getQuad(1)
+
+centre_c = doc.addHexa4Quads(quad_1, quad_a, quad_5, quad_b)
+
+# Ajouter l'enceinte
+# ------------------
+
+plan_0  = geompy.MakePrismDXDYDZ(p1_int_e, +cote_lgr, +cote_lgr, +cote_lgr)
+part_0  = geompy.MakePartition([piquage_1_feh], [plan_0], [], [], geompy.ShapeType["VERTEX"])
+point_0 = geompy.SubShapeAllSortedCentres(part_0, geompy.ShapeType["VERTEX"])[1]
+
+enceinte_quads = []
+for j in xrange(8):
+  q = grille.getQuadIJ(1, j, 1)
+  enceinte_quads.append(q)
+
+point_7x, point_7y, point_7z = geompy.PointCoordinates(point_7)
+point_2x, point_2y, point_2z = geompy.PointCoordinates(point_2)
+point_0x, point_0y, point_0z = geompy.PointCoordinates(point_0)
+
+enceinte_h1 = point_7z - base_z
+enceinte_h2 = point_2z - base_z
+enceinte_h3 = point_0z - base_z
+enceinte_h4 = oppo_z   - base_z
+
+enceinte_hauteurs = [ enceinte_h1, enceinte_h2, enceinte_h3, enceinte_h4 ]
+
+enceinte_pz = doc.addVector(oppo_x - base_x, oppo_y - base_y, enceinte_h4)
+
+enceinte = doc.prismQuadsVec(enceinte_quads, enceinte_pz, enceinte_hauteurs, 0)
+
+# Déconnecter via des arêtes, puis prismer, puis compléter (3) ou coller (1)
+# --------------------------------------------------------------------------
+
+periph_hexas     = []
+supports_quads_b = []
+supports_quads_h = []
+
+v1 = doc.addVector(   0, +0.1, 0)
+v2 = doc.addVector(   0, -0.1, 0)
+v3 = doc.addVector(+0.2, -0.1, 0)
+
+for j, v in [ [0, v1], [1, v1], [4, v2], [5, v3] ]:
+  h = grille.getHexaIJK(2, j, 0)
+  a = grille.getEdgeK(3, j, 0)
+  d = doc.disconnectEdge(h, a)
+
+  q1 = d.getQuad(0)
+  q2 = grille.getQuadIK(2, j, 0)
+  if j==1:
+    h0 = doc.addHexa2Quads(q1, q2)
+    q3 = grille.getQuadJK(3, j, 0)
+    q4 = h0.getQuad(3)
+    h1 = doc.addHexa2Quads(q3, q4)
+    qb = h1.getQuad(hexablock.Q_E)
+    qh = h1.getQuad(hexablock.Q_F)
+  else:
+    p = doc.prismQuad(q1, v, 2)
+
+    h0 = p.getHexa(0)
+    q3 = h0.getQuad(5)
+    h1 = p.getHexa(1)
+    q4 = h1.getQuad(5)
+    doc.addHexa3Quads(q2, q3, q4)
+    periph_hexas.append(h0)
+    qb = h1.getQuad(hexablock.Q_C)
+    qh = h1.getQuad(hexablock.Q_D)
+
+  supports_quads_b.append(qb)
+  supports_quads_h.append(qh)
+
+# Piquer les 2 tuyaux sur l'enceinte
+# ----------------------------------
+
+piquage_centre = doc.addVertex(10, 0, 0)
+
+piquage_vx = doc.addVector(1, 0, 0)
+piquage_vz = doc.addVector(0, 0, 1)
+
+piquage = doc.makeCylindrical(piquage_centre, piquage_vx, piquage_vz,  1, 360, 1,  1, 4, 1,  False)
+
+piquage_quads = [ piquage.getQuadIJ(0, j, 0) for j in xrange(4) ]
+
+piquage_s1 = piquage.getVertexIJK(1, 0, 0)
+piquage_s2 = piquage.getVertexIJK(1, 1, 0)
+piquage_s3 = piquage.getVertexIJK(1, 2, 0)
+
+enceinte_ha = enceinte.getHexa( 6)
+enceinte_hb = enceinte.getHexa(25)
+
+enceinte_s11 = enceinte_ha.getVertex(2)
+enceinte_s12 = enceinte_ha.getVertex(3)
+enceinte_s13 = enceinte_ha.getVertex(7)
+
+enceinte_s21 = enceinte_hb.getVertex(2)
+enceinte_s22 = enceinte_hb.getVertex(3)
+enceinte_s23 = enceinte_hb.getVertex(7)
+
+piquage_1 = doc.replace(piquage_quads, piquage_s1, enceinte_s11, piquage_s2, enceinte_s12, piquage_s3, enceinte_s13)
+piquage_2 = doc.replace(piquage_quads, piquage_s1, enceinte_s21, piquage_s2, enceinte_s22, piquage_s3, enceinte_s23)
+
+# Nettoyer le template du piquage
+# -------------------------------
+
+doc.removeElements(piquage)
+
+# Associer le modèle de blocs avec la géométrie
+# =============================================
+
+doc.setShape(cuve)
+
+# Nettoyer les associations implicites du centre et de la périphérie
+# ------------------------------------------------------------------
+
+for i in xrange(0, 4, 3):
+  for j in xrange(8):
+    for k in xrange(2):
+      e = grille.getEdgeJ(i, j, k)
+      e.clearAssociation()
+
+# Associer le centre de l'enceinte
+# --------------------------------
+
+for j, ig in [ [2, 30], [3, 28], [6, 32], [7, 34] ]:
+  sm0 = grille.getVertexIJK(0, j, 0)
+  sg0 = sommets[ig]
+  sm0.setAssociation(sg0)
+
+  sm1 = grille.getVertexIJK(0, j, 1)
+  sg1 = geompy.MakeTranslation(sg0, 0, 0, grille_hauteur)
+  sm1.setAssociation(sg1)
+
+for j, ig, sens in [ [0, 34, +1], [1, 30, +1], [4, 28, -1], [5, 32, -1] ]:
+  sm0 = grille.getVertexIJK(0, j, 0)
+  sg0 = geompy.MakeTranslation(sommets[ig], 0, sens*support_l, 0)
+  sm0.setAssociation(sg0)
+
+  sm1 = grille.getVertexIJK(0, j, 1)
+  sg1 = geompy.MakeTranslation(sg0, 0, 0, grille_hauteur)
+  sm1.setAssociation(sg1)
+
+# Associer les 16 sommets des 4 supports externes
+# -----------------------------------------------
+
+supports_points = [
+  [ support_c_o, support_c_y, support_c_d, support_c_x ],
+  [ support_d_d, support_d_y, support_d_o, support_d_x ],
+  [ support_a_o, support_a_y, support_a_d, support_a_x ],
+  [ support_b_o, support_b_x, support_b_d, support_b_y ]
+]
+
+for s in xrange(4):
+  qb = supports_quads_b[s]
+  qh = supports_quads_h[s]
+  cs = supports_points[s]
+  for i in xrange(4):
+    smb = qb.getVertex(i)
+    sgb = cs[i]
+    smb.setAssociation(sgb)
+
+    if s==1:
+      ind = i
+    else:
+      ind = [1, 0, 3, 2][i]
+    smh = qh.getVertex(ind)
+    sgh = geompy.MakeTranslation(sgb, 0, 0, grille_hauteur)
+    smh.setAssociation(sgh)
+
+# Associer les 7 sommets périphériques de la grille
+# -------------------------------------------------
+
+par_1 = 0.17
+par_2 = 1 - par_1
+
+periph_grille = [ [0, cote_b, par_2], [1, cote_c, 0.22], [3, cote_d, 0.548], [4, cote_d, par_1], [5, cote_a, par_2], [6, cote_b, 0.44], [7, cote_b, 0.555] ]
+
+for j, ag, p in periph_grille:
+  smb = grille.getVertexIJK(3, j, 1)
+  sgb = geompy.MakeVertexOnCurve(ag, p)
+  smb.setAssociation(sgb)
+
+  smh = grille.getVertexIJK(3, j, 0)
+  sgh = geompy.MakeTranslation(sgb, 0, 0, -grille_hauteur)
+  smh.setAssociation(sgh)
+
+# Associer les 3 sommets liés aux déconnections sur la grille
+# -----------------------------------------------------------
+
+periph_deco = [ [cote_c, par_2], [cote_a, par_1], [cote_b, par_1] ]
+
+for i in xrange(3):
+  hxa = periph_hexas[i]
+  ag, p = periph_deco[i]
+  smb = hxa.getVertex(2)
+  sgb = geompy.MakeVertexOnCurve(ag, p)
+  smb.setAssociation(sgb)
+
+  smh = hxa.getVertex(0)
+  sgh = geompy.MakeTranslation(sgb, 0, 0, -grille_hauteur)
+  smh.setAssociation(sgh)
+
+# Réparer les piquages
+# --------------------
+
+piquage_e_base  = geompy.MakeVertex(interne_x, interne_y, interne_z)
+piquage_e_axe   = geompy.MakeVectorDXDYDZ(interne_dx, interne_dy, interne_dz)
+piquage_e_cyl   = geompy.MakeCylinder(piquage_e_base, piquage_e_axe, interne_rayon, enceinte_h4)
+
+piquage_1_axe   = geompy.MakeVectorDXDYDZ(p1_int_dx, p1_int_dy, p1_int_dz)
+piquage_1_cyl   = geompy.MakeCylinder(p1_int_c, piquage_1_axe, p1_int_rayon, cote_lgr)
+
+piquage_2_axe   = geompy.MakeVectorDXDYDZ(p2_int_dx, p2_int_dy, p2_int_dz)
+piquage_2_cyl   = geompy.MakeCylinder(p2_int_c, piquage_2_axe, p2_int_rayon, cote_lgr)
+
+piquage_1_inter = geompy.SubShapeAllSortedCentres(geompy.MakeSection(piquage_e_cyl, piquage_1_cyl), geompy.ShapeType["EDGE"])
+piquage_2_inter = geompy.SubShapeAllSortedCentres(geompy.MakeSection(piquage_e_cyl, piquage_2_cyl), geompy.ShapeType["EDGE"])
+
+piquage_1_fi  = piquage_1_inter[0]
+
+piquage_2_fig = piquage_2_inter[0]
+piquage_2_fid = piquage_2_inter[1]
+
+# Associer les piquages
+# ---------------------
+
+piquages_devant = [
+  [ piquage_1, piquage_1_int, 0.375, piquage_1_ext, 0.125 ],
+  [ piquage_2, piquage_2_int, 0.125, piquage_2_ext, 0.875 ]
+]
+
+for m_piq, a_int, p_int, a_ext, p_ext in piquages_devant:
+
+  i1 = m_piq.getEdge(2)
+  i2 = m_piq.getEdge(5)
+  i3 = m_piq.getEdge(7)
+  i4 = m_piq.getEdge(10)
+
+  doc.associateClosedLine(i1.getVertex(1), i1, [ i2, i3, i4 ], a_int, p_int, True, [])
+
+  e1 = m_piq.getEdge(0)
+  e2 = m_piq.getEdge(1)
+  e3 = m_piq.getEdge(9)
+  e4 = m_piq.getEdge(11)
+
+  doc.associateClosedLine(e1.getVertex(0), e1, [ e2, e3, e4 ], a_ext, p_ext, False, [])
+
+piquages_milieu = [
+  [ piquage_1, piquage_1_eib, piquage_1_eih, 0.30, piquage_1_eeb, piquage_1_eeh, 0.30 ],
+  [ piquage_2, piquage_2_eid, piquage_2_eig, 0.75, piquage_2_eed, piquage_2_eeg, 0.75 ]
+]
+
+for m_piq, a_int1, a_int2, p_int, a_ext1, a_ext2, p_ext in piquages_milieu:
+
+  i1 = m_piq.getEdge(22)
+  i2 = m_piq.getEdge(25)
+  i3 = m_piq.getEdge(27)
+  i4 = m_piq.getEdge(30)
+
+  doc.associateClosedLine(i1.getVertex(0), i1, [ i4, i3, i2 ], a_int1, p_int, False, [a_int2])
+
+  e1 = m_piq.getEdge(20)
+  e2 = m_piq.getEdge(21)
+  e3 = m_piq.getEdge(29)
+  e4 = m_piq.getEdge(31)
+
+  doc.associateClosedLine(e1.getVertex(0), e1, [ e2, e3, e4 ], a_ext1, p_ext, False, [a_ext2])
+
+piquages_fond = [
+  [ piquage_1, piquage_1_fi , []             , 0.125, piquage_1_feb, piquage_1_feh, 0.30 ],
+  [ piquage_2, piquage_2_fid, [piquage_2_fig], 0.75 , piquage_2_fed, piquage_2_feg, 0.75 ]
+]
+
+for m_piq, a_int1, a_int2, p_int, a_ext1, a_ext2, p_ext in piquages_fond:
+
+  i1 = m_piq.getEdge(42)
+  i2 = m_piq.getEdge(45)
+  i3 = m_piq.getEdge(47)
+  i4 = m_piq.getEdge(50)
+
+  doc.associateClosedLine(i1.getVertex(0), i1, [ i4, i3, i2 ], a_int1, p_int, False, a_int2)
+
+  e1 = m_piq.getEdge(40)
+  e2 = m_piq.getEdge(41)
+  e3 = m_piq.getEdge(49)
+  e4 = m_piq.getEdge(51)
+
+  doc.associateClosedLine(e1.getVertex(1), e1, [ e2, e3, e4 ], a_ext1, p_ext, False, [a_ext2])
+
+# Associer quelques faces
+# -----------------------
+
+for h in [ 2, 5, 7, 10,  21, 24, 26, 29 ]:
+  enceinte_hc = enceinte.getHexa(h)
+
+  enceinte_qc = enceinte_hc.getQuad(hexablock.Q_C)
+  enceinte_qc.addAssociation(face_cylindrique_int)
+
+  enceinte_qc = enceinte_hc.getQuad(hexablock.Q_D)
+  enceinte_qc.addAssociation(face_cylindrique_ext)
+
+# Primer les 5 supports (finalisation du modèle de blocs)
+# -------------------------------------------------------
+
+supports_quads_b.append( centre_c.getQuad(hexablock.Q_E) )
+
+supports_z = doc.addVector(coin_x1 - coin_x3, coin_y1 - coin_y3, coin_z1 - coin_z3)
+
+supports = doc.prismQuads(supports_quads_b, supports_z, 1)
+
+# Mailler le modèle de blocs
+# ==========================
+
+# Définir les groupes volumiques
+# ------------------------------
+
+groupe_fd = doc.addHexaGroup("fond")
+groupe_en = doc.addHexaGroup("enceinte")
+groupe_p1 = doc.addHexaGroup("piquage:1")
+groupe_p2 = doc.addHexaGroup("piquage:2")
+groupe_su = doc.addHexaGroup("supports")
+
+for i in xrange( doc.countUsedHexa() ):
+  h = doc.getUsedHexa(i)
+  groupe_fd.addElement(h)
+
+for i in xrange( enceinte.countHexa() ):
+  h = enceinte.getHexa(i)
+  if h != None:
+    groupe_en.addElement(h)
+    groupe_fd.removeElement(h)
+
+for i in xrange( piquage_1.countHexa() ):
+  h = piquage_1.getHexa(i)
+  groupe_p1.addElement(h)
+  groupe_fd.removeElement(h)
+
+for i in xrange( piquage_2.countHexa() ):
+  h = piquage_2.getHexa(i)
+  groupe_p2.addElement(h)
+  groupe_fd.removeElement(h)
+
+for i in xrange( supports.countHexa() ):
+  h = supports.getHexa(i)
+  groupe_su.addElement(h)
+  groupe_fd.removeElement(h)
+
+# Générer le maillage
+# -------------------
+
+hexablock.addLaws(doc, 0.015, False)
+
+maillage = hexablock.mesh(doc)
+
+muv, mue, muq, muh = hexablock.dump(doc, maillage)
diff --git a/src/TEST_PY/recettes/troisCylindres.brep b/src/TEST_PY/recettes/troisCylindres.brep
new file mode 100644 (file)
index 0000000..9caa182
--- /dev/null
@@ -0,0 +1,648 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 8
+1
+1.11022302462516e-16               0               1               0 
+              0               1               0               0 
+             -1               0 1.11022302462516e-16             400 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             380 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             220 
+2  1 -1 0
+2  2 -1 0
+2  2 1 3 -1 0
+2  3 -1 0
+2  3 1 2 -1 0
+Curve2ds 38
+1 0 800 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 396.4531264233774  5.7629069293083175 392.92833608277681  5.7694749436140853 389.51230084494648  5.7788372822703087 386.24424709027198  5.7905468978363102 383.14348794697975  5.8042009023008854 380.21545709727701  5.8195042660091962 377.45508725218542  5.8543892203674739 372.04985730479018  5.8742056575325181 369.42820567367704  5.89564313364939 366.96284011636072  5.9186431153591617 364.64644480202827  5.9431911157077195 362.47799188863092  5.969306315324145 360.46051727651405  5.997060367620036 358.60197280754011  6.0537021647479774 355.37514358939779  6.082311505809308 353.97770142062154  6.1125302711814751 352.74076825489283  6.1443482006914323 351.69171562635694  6.1776550181455665 350.86267948835513  6.212224813535169 350.28862243838159  6.2476523776714217 350.00000035532935  6.2831853071795862 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.7833264519171417 86.602540378443834  4.8538221133434041 86.768554360301735  4.9226876586617614 87.096991301102832  4.9896492478955832 87.559643674082267  5.0546217349220237 88.124612677936994  5.1177137403899753 88.763476885346691  5.1791713917111073 89.453947255999054  5.3042530285650589 90.961452312325122  5.3677102240744938 91.784169844339971  5.4305599185356694 92.631457510690808  5.4932602887666402 93.488642372673752  5.5562165742572436 94.341495300176803  5.6198260616794098 95.175736723592024  5.6845162320744418 95.976668732951339  5.8116848841313695 97.413920783548804  5.8739248236055932 98.05887438439521  5.9379452637785519 98.646808131231438  6.0038837402756018 99.157716247916923  6.071712633333922 99.568620170602287  6.1412648768472247 99.855699662295933  6.2121194481632589 99.999999822335369  6.2831853071795862 100 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  0 350  0.033576530560921469 349.99999966423474  0.067082892452182463 350.25770810060493  0.099869308879887875 350.77111458667099  0.13156628624254196 351.51570531988671  0.16195866809536152 352.46209608878792  0.19093398028496456 353.58237755135616  0.21846654983792213 354.85222820605424  0.27426368959368119 357.84920888955003  0.3021491186068328 359.61622715531161  0.32842484744605827 361.54040041871144  0.35316416580412735 363.61204164396673  0.37639683220717668 365.8264229027584  0.39812537333505649 368.18305324271273  0.41831630740511905 370.68769525783222  0.4557439761033848 376.0736018517199  0.47292011875991768 378.9594576910697  0.48830018181480117 382.03427944841542  0.50156023379092929 385.30662787333353  0.51222803597861422 388.77333266748747  0.51976991720685906 392.41514581060738  0.52359877559829915 396.1912597343462  0.52359877559829915 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  -8.8817841970012523e-16 100  0.06715306112184205 100.00000016788263  0.13416540811772926 99.871153979566813  0.2000859947170639 99.614413693494853  0.26450877997241218 99.244989236204376  0.32725315809820543 98.782719490159323  0.38826782246932368 98.247314081382243  0.44764126817363259 97.656293340043064  0.57139795897359669 96.305069830741061  0.63542889192342944 95.53220561073141  0.69827952069100885 94.722154327366113  0.76035187352387279 93.8895784161206  0.82202051989645941 93.048311226451347  0.8836693219130547 92.211706870163411  0.9457321983952216 91.393072001530811  1.0730247241787252 89.809460344875689  1.138267311008704 89.045865019642434  1.2052426425872236 88.333353522290537  1.2742871129404838 87.697209384435382  1.3455881079195908 87.171127692761559  1.4190994971417732 86.793973628457834  1.4946215214818199 86.602540378443862  1.5707963267948957 86.602540378443862 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  0 450  0.033576535464432844 450  0.06708288862795353 449.74229256882165  0.099869310240679354 449.22888491692595  0.13156628503243795 448.48429456674455  0.16195866455356001 447.53790447273542  0.19093398418656715 446.41762209624159  0.21846654988386938 445.14777179147779  0.27426368959368741 442.15079111044957  0.3021491186068106 440.38377284469061  0.32842484744608935 438.45959958128537  0.3531641658041238 436.38795835603389  0.37639683220714382 434.17357709724484  0.39812537333508846 431.81694675728357  0.41831630740511105 429.31230474216915  0.45574397610337858 423.92639814828101  0.4729201187599914 421.04054230892496  0.48830018181460044 417.96572055159834  0.50156023379119397 414.6933721266472  0.51222803597843036 411.22666733252822  0.51976991720691501 407.58485418938534  0.52359877559829915 403.80874026565544  0.52359877559829915 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  3.1415926535897931 100  3.0744395826609292 100  3.0074272532690807 99.871154312247398  2.9415066557379972 99.614413450152753  2.8770838762873723 99.24498917729909  2.8143395030913991 98.782719765237147  2.7533248227475049 98.247313911151892  2.6939513853142487 97.656293338930354  2.5701946946161791 96.305069830740877  2.5061637616664392 95.532205610732049  2.4433131328986759 94.722154327365189  2.3812407800659359 93.889578416120742  2.319572133693443 93.048311226452213  2.257923331676631 92.211706870162374  2.195860455194603 91.393072001531209  2.0685679294110897 89.809460344875959  2.003325342581054 89.04586501964134  1.9363500110025664 88.333353522292768  1.8673055406493542 87.697209384432796  1.7960045456701803 87.171127692763221  1.7224931564479862 86.793973628457351  1.6469711321080045 86.602540378443862  1.5707963267948963 86.602540378443862 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 403.54687357661732  5.7629069293083264 407.0716639172436  5.7694749436140578 410.487699155016  5.7788372822703495 413.75575290976724  5.7905468978362755 416.85651205299661  5.804200902300904 419.78454290273055  5.8195042660091909 422.54491274781367  5.8543892203674712 427.95014269520948  5.874205657532519 430.57179432632284  5.8956431336493971 433.03715988364036  5.9186431153591563 435.35355519797133  5.9431911157077124 437.52200811136817  5.9693063153241566 439.53948272348691  5.9970603676200325 441.39802719245961  6.0537021647981906 444.62485641346274  6.0823115099356198 446.02229896119849  6.1125302674090722 447.25923114449233  6.1443481994298761 448.30828448674504  6.1776550195756252 449.13732104001321  6.2122248094106727 449.71137685489032  6.2476523829853585 450  6.2831853071795862 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.6414515088523443 86.602540378443834  4.5709558474254868 86.76855436030219  4.5020903021086447 87.096991301101312  4.4351287128726282 87.559643674084498  4.3701562258480955 88.124612677935161  4.3070642203791722 88.7634768853476  4.2456065690582925 89.453947255998813  4.1205249322043267 90.961452312325036  4.0570677366948757 91.784169844340013  3.9942180422337055 92.631457510690936  3.9315176720027551 93.48864237267361  3.8685613865121442 94.341495300176661  3.8049518990899482 95.175736723592308  3.7402617286949473 95.976668732951225  3.6130930765252778 97.413920784822892  3.5508531282366924 98.058874567884871  3.4868327051487182 98.646807838009721  3.4208942233135531 99.157716307234637  3.3530653240854145 99.568620428735727  3.2835130923467619 99.855699311460796  3.2126585019782485 100  3.1415926535897931 100 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  2.7300758075223057 190  2.7300758075223057 188.76161711057227  2.73198839472064 187.55133668015193  2.7356595879105567 186.40804485479049  2.7406522245640779 185.33795497726547  2.7466665999124618 184.34258844053036  2.7534345015999824 183.4162771353935  2.7608247966701325 182.54924607309326  2.7805106679886924 180.5313877921306  2.7934228662572296 179.44012090542088  2.8074042576548592 178.42489439075112  2.8224021612079322 177.47714125871727  2.8383853128399443 176.58765276942751  2.8553986657883739 175.75234570339671  2.8735299500160485 174.96696097018872  2.9096367995004702 173.60217638596475  2.927074703391964 173.01544757903642  2.9455701846587412 172.46336132523098  2.9653382299711857 171.94696597602535  2.9865550769566158 171.47070368601692  3.0094637838744882 171.044924719389  3.0342362135094789 170.68192128165288  3.0846904814586811 170.16788483391167  3.110457736212882 169.98675095042276  3.1373772459573144 169.90241768877223  3.1644097931300808 169.92983296212577  3.1907387356792545 170.06246027525333  3.2157117427758561 170.28378283343829  3.2387860886964592 170.56795276727468  3.2857128896829386 171.28490034470798  3.3095267559518353 171.75813983885746  3.3315889559519829 172.28669212661248  3.3520793566732001 172.86264456356133  3.3712426139199891 173.47925753251525  3.3892171781517373 174.13467786991569  3.4061709628706178 174.82956714675092  3.4315765607080646 176.00111900189935  3.4406202276953 176.44739232078726  3.4493683641263591 176.90942117645849  3.4578076048696391 177.38676190073474  3.4659242604470752 177.87897923803828  3.473704317034132 178.38564634539176  3.4811334364598099 178.90634479241825  3.4952602825731667 179.97496970201598  3.5019582387828598 180.52299721930251  3.5082759977769666 181.08420673921333  3.5141984025436779 181.65818491571483  3.5197099661181288 182.24464543072799  3.5247948715823951 182.84342899412766  3.5294369720654961 183.45450334374323  3.5385783136065494 184.81704385450712  3.5430774304692174 185.60147540318962  3.5470027815210834 186.43393805468477  3.550193052094881 187.31387149619184  3.552464823959987 188.23647567906212  3.553634828362437 189.1915419192367  3.5535877444215225 190.16041200836165  3.5507263605782593 192.52143481281828  3.5466264819059488 193.84478773876532  3.540673500034889 195.06679581640853  3.5333903287665258 196.19442250073351  3.5251084225945828 197.2339901412731  3.516072019876451 198.19784034352128  3.5063476353219669 199.100910190511  3.4816461951625191 201.11765616922102  3.4662615750150878 202.17669187279171  3.4497197612770401 203.16359594026292  3.4319965274128248 204.08585426002017  3.4130562502099866 204.9499797977617  3.3927629809540236 205.75731315708825  3.370961354722068 206.5085724462667  3.3350837042681274 207.55059273349855  3.3227385987925833 207.87877699148535  3.3101400373711489 208.18373555748497  3.2973072930831178 208.46471177911445  3.2842597447996993 208.72099547901203  3.2710176981806867 208.95192203202214  3.2576032066711278 209.15687144238044  3.2326080049219881 209.48565334621975  3.2207392065634544 209.6214488622964  3.2084220832166892 209.74086778055747  3.1956632541851522 209.841223344334  3.1824987868080563 209.9195218531847  3.1690046109869345 209.9730562872202  3.1553069337122155 209.99999993142859  3.1415926535897936 210 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 86 13  1.5707963267948968 65.825756949558411  1.6327154712662824 65.825756949558411  1.6932291717524472 65.864006867500905  1.7507575795202066 65.937442892223871  1.8052712051910964 66.036312569896907  1.856761496125801 66.15335170344234  1.9055415063953094 66.282483552944811  1.952099936317812 66.420471346860978  2.0629161296348029 66.778932482089601  2.1250872198225084 67.006800398456491  2.1853339544706767 67.244156185569551  2.2442620112456466 67.487414231305635  2.3025351264202438 67.733314062545347  2.3606629110135016 67.979402450812643  2.4192472016931634 68.223500209089394  2.5302050784324877 68.667615336463385  2.5817194923431264 68.866839100938464  2.6345541235314025 69.06107511247879  2.6893439271069774 69.248614551513228  2.746579728106743 69.426477008510119  2.8069200610078164 69.589274370436641  2.8708713445249514 69.730508107268591  2.9992017060969078 69.932606288496331  3.0640476966405026 70.004909868877107  3.1311719850682302 70.039355662624061  3.1983917367763195 70.028318240219718  3.2641727172498611 69.974453483590707  3.3272181349982342 69.886050094789667  3.3862870149554607 69.774683728264634  3.5081798163713582 69.498670248443474  3.5714250919605042 69.319625207022071  3.6315898963777626 69.124464927538256  3.6892108940849053 68.918088997427191  3.7449840031488155 68.70476714178713  3.7993700099136132 68.486956905337252  3.8529595443561395 68.266363258980974  3.937551875106212 67.914511323779521  3.9686270521261031 67.784481815413258  3.9997344878372516 67.654297451190075  4.0308853739217598 67.524679509972557  4.0620919606083179 67.396357443356322  4.0933675566722023 67.270068875670106  4.124726529435276 67.146559603975803  4.1876412188668342 66.906610876783731  4.2192025058601512 66.790155974378578  4.2508767385050721 66.677978633765278  4.2826801747989798 66.570823982696439  4.3146367579775191 66.469422533765098  4.346778116514594 66.374490184404721  4.3791435641223728 66.286728216889173  4.4504690845129815 66.11210000381476  4.491002003142964 66.024851515159256  4.5335175110851669 65.947703969718717  4.5780101363095511 65.884232047726371  4.6242947661492 65.838676004199897  4.671990288798467 65.815204415050005  4.7203649033722543 65.816217123196935  4.8385980686239742 65.873356695599171  4.9051850188102994 65.955074132754632  4.9674898644093322 66.072897682052684  5.0260608936826561 66.214413321800095  5.0812532833458581 66.371581754615221  5.1336879948128482 66.538559525712174  5.1841437822594489 66.713161178984919  5.3004316740301887 67.141550836337416  5.3644149845568734 67.397608881735124  5.4271937142726046 67.659694988105471  5.4894601011457427 67.92460429403188  5.5518865820242498 68.189151454086755  5.6151397004226302 68.450150063818768  5.6799108441584014 68.704352379472581  5.7820106096441055 69.070516194378229  5.8164404445381965 69.188355493726078  5.850946054836804 69.299959962125172  5.8855291296563488 69.404507511993899  5.9201917940156994 69.501233167507081  5.9549345429758302 69.589436335509944  5.9897541757794714 69.668488076432126  6.0540515696396966 69.796299944449615  6.084361898704401 69.849526935371983  6.1156117040988267 69.896686629941101  6.1478015408718143 69.936560691373231  6.1808677843451756 69.967806999600143  6.2146568822517638 69.989221486740504  6.2488996068735307 69.999999972571445  6.2831853071795862 70 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  3.1415926535897931 210  3.1210614961277394 210.00000010265583  3.1005291311075647 209.93977343220345  3.0802162982823336 209.81934542997405  3.060284995992693 209.64146807704995  3.0408510042354786 209.41030407615489  3.0219936054749454 209.13045541836325  3.0037625031966315 208.80633633462796  2.9570088239511896 207.83713099429386  2.9296594696116953 207.12197755130393  2.9040228867397606 206.31025246004447  2.8800610357605061 205.41069337265455  2.8577522026420392 204.42944864183883  2.8371056950111546 203.36899179251105  2.8181483011816177 202.22871149661322  2.7852216827921472 199.8723811516461  2.7709760875281595 198.67075640785762  2.7583507212744514 197.39099658337528  2.7475970196832398 196.03237707895312  2.739053731187802 194.5987376061355  2.7330886214394798 193.09989869850125  2.7300758075223053 191.554374056744  2.7300758075223053 190 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  8 23 4  0 70  0.051327893655133572 70.000000041062307  0.1026585095332937 69.975913030090624  0.1536145142233849 69.927731557706068  0.20396142023838504 69.856930569898694  0.25355894084285602 69.765831025734656  0.30232997965063024 69.65711085521778  0.35024725499271447 69.533463217305211  0.47547900793230546 69.171622753195393  0.55125596438760471 68.911912620840965  0.62536924204793554 68.628209581487553  0.69830566983646758 68.329050162545343  0.77052910495163474 68.022247356855743  0.84253146084878594 67.71504812589032  0.91487134073599652 67.414277104885272  1.0559406020423046 66.864292017065196  1.1244501887663443 66.612974265628466  1.1944986103494166 66.379922852188102  1.2663529078851745 66.17381782714574  1.340143255040398 66.005326901049187  1.4158015554213002 65.886011034309178  1.4930776239576975 65.825756949558411  1.5707963267948966 65.825756949558411 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 188.40529526822812  5.8749059028716166 186.81699263164407  5.8813321069643507 185.28146610968872  5.8904651265717982 183.8194733092634  5.9018780409367047 182.44087859992891  5.9151979318998391 181.14756859074458  5.9462084611711727 178.64894098900859  5.9641289663954833 177.45327801148096  5.9838251760732435 176.34076071834318  6.0052210062401752 175.31033358514742  6.0282871279818746 174.36355769593391  6.0530414572620703 173.50466322258802  6.1044269515590086 172.03087512917583  6.1308375000050619 171.40311466706285  6.1588814209752867 170.86877872094436  6.1884827860001463 170.44450690892319  6.2194178500469297 170.14859873510889  6.2512650406347934 170  6.2831853071795862 170 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.6326537437960944 134.17424305044165  4.5532394662454161 134.10950158823803  4.4756303392982897 133.98093441747497  4.4000913717954164 133.80144025823813  4.3266832464327729 133.58463698586775  4.2551915157717408 133.34204238483454  4.1106230834163906 132.80607638506953  4.0376765392582641 132.51031302161269  3.9653735469234719 132.20408324999829  3.8931647386010106 131.89522935165351  3.8205023141418311 131.591632576276  3.7468598154328787 131.30105579191766  3.6010565258622278 130.78164824019552  3.5290824764252773 130.54984232049199  3.4551199134103063 130.34511406165251  3.3790487521878019 130.1778232028887  3.3010107446235413 130.05943531939073  3.2213933199517744 130  3.1415926535897931 130 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  7 20 4  0 170  0.030225785850175768 170  0.060403942208535177 170.13323829157676  0.089809656452376707 170.39892023771003  0.11805541204867875 170.78166224300142  0.14492818020641529 171.26570088958786  0.17034350106111606 171.83645995042141  0.22097719814426409 173.20566738156501  0.24587007505197889 174.02300961145505  0.26911311729308007 174.92708234710466  0.29073064043857233 175.91279129804428  0.31070894112663172 176.97782263526184  0.32899625972681701 178.12264337007468  0.36230785920280351 180.61524721177804  0.37725325445837399 181.9676846606753  0.39011764872841503 183.41728858328361  0.40046937309713293 184.96339172675098  0.40780791812416606 186.59601333953287  0.41151684606748784 188.29315701982478  0.41151684606748784 190 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  3.1415926535897931 130  3.0660281889643519 130  2.990583169127206 130.05329228421115  2.9164748151389448 130.15958274693631  2.8440992178683127 130.31074365945841  2.7736158232905277 130.49706344959191  2.70495819896867 130.70955796991018  2.5631379941723229 131.19840252074181  2.490285660793738 131.47942926704206  2.4185365367169682 131.77519479638855  2.3473926232230196 132.07805706842547  2.2763352439147004 132.38049995237745  2.2048371881245359 132.67525479805303  2.0576203695522826 133.23927066004759  1.9818085176967826 133.50790196241167  1.9039233721279634 133.75038739924142  1.8236483193528268 133.95324155007785  1.7409942942068719 134.10007506789546  1.6561384758036586 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  0 210  0.030225781949774877 210.00000015112892  0.060403947046212103 209.86676130590678  0.089809652021665798 209.60108031223749  0.11805541820573318 209.218337305402  0.14492817656264201 208.73429928613263  0.17034350101405416 208.16354005084071  0.22097719814238648 206.79433261849749  0.24587007505078695 205.97699038859366  0.26911311729224341 205.07291765293593  0.29073064043839469 204.0872087019697  0.31070894112672143 203.02217736473835  0.32899625972729307 201.87735662989815  0.36230785920336483 199.38475278817143  0.37725325445872215 198.03231533928286  0.390117648728741 196.58271141667572  0.40046937309720754 195.03660827322122  0.40780791812423445 193.40398666044547  0.41151684606748784 191.70684298016479  0.41151684606748784 190 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+7 0 0  7 20 4  0 130  0.075564454874439413 129.99999993954845  0.15100949674968245 130.05329244438005  0.22511782661739943 130.15958252985621  0.29749345235156621 130.31074383584001  0.36797682046048319 130.49706338173036  0.43663445448953642 130.70955796945879  0.57845465941195773 131.19840252072038  0.65130699279232651 131.47942926702643  0.72305611686996407 131.77519479637638  0.79420003036601372 132.07805706842194  0.86525740967521614 132.38049995237844  0.9367554654670105 132.67525479806048  1.083972284040347 133.23927066005763  1.1597841358952055 133.50790196241874  1.237669281464072 133.75038739924679  1.3179443342382484 133.95324155008026  1.4005983593840572 134.10007506789648  1.4854541777866581 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+1 0 300 1 0 
+2 0 0 1 0 -0 1 50
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 191.59470473177032  5.8749059028716193 193.18300736835764  5.8813321069643223 194.71853389030395  5.8904651265718124 196.18052669073927  5.9018780409366576 197.55912140006541  5.9151979318998142 198.85243140925283  5.9462084611708423 201.35105901096543  5.9641289663948038 202.54672198847359  5.9838251760721368 203.65923928159609  6.0052210062386386 204.68966641477729  6.0282871279797714 205.63644230398049  6.0530414572594031 206.49533677731949  6.1044269515080547 207.96912486937774  6.1308374961490646 208.59688514306879  6.1588814275196162 209.13122176228288  6.1884827812567487 209.55549250885861  6.2194178552699579 209.85140168924835  6.2512650364101381 209.99999984039866  6.2831853071795862 210 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.792124216973205 134.17424305044165  4.871538494524069 134.109501588238  4.9491476214706687 133.98093441747562  5.0246865889741397 133.80144025823762  5.0980947143362885 133.58463698586883  5.1695864449974964 133.342042384835  5.3141548773514753 132.80607638507519  5.3871014215083353 132.51031302162392  5.4594044138419315 132.20408325001534  5.5316132221631182 131.89522935167579  5.60427564662095 131.59163257630365  5.677918145328567 131.30105579194895  5.8237214347629163 130.78164824070652  5.8956954738428466 130.54984239343437  5.9696580651840625 130.34511387364307  6.0457291958282866 130.17782343218008  6.1237672294309933 130.05943515068626  6.2033846302559654 130.00000006384056  6.2831853071795862 130 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 200 1 0 
+2 0 0 1 0 -0 1 20
+1 0 40 1 0 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 20
+1 0 160 1 0 
+Curves 18
+2 0 0 800 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 396.4531264233774  86.768554360301678 -49.712441623392252 392.92833608277681  87.096991301103003 -49.143655969881841 389.51230084494648  87.559643674082039 -48.329700648459557 386.24424709027198  88.124612677937151 -47.303758601946697 383.14348794697975  88.763476885346648 -46.096633933969066 380.21545709727701  89.453947255999054 -44.730534623268426 377.45508725218542  90.961452312325122 -41.584580251230875 372.04985730479018  91.784169844339857 -39.781402281845395 369.42820567367704  92.631457510690922 -37.81125762107866 366.96284011636072  93.48864237267378 -35.675359427746407 364.64644480202827  94.341495300176689 -33.371375094216411 362.47799188863092  95.175736723592081 -30.894400229760695 360.46051727651405  95.976668732951339 -28.235197605551782 358.60197280754011  97.413920783548775 -22.756398616550438 355.37514358939779  98.05887438439548 -19.967859727516355 353.97770142062154  98.646808131230941 -17.001060903351803 352.74076825489283  99.157716247916952 -13.856554777440659 351.69171562635694  99.568620170602742 -10.546176703746648 350.86267948835513  99.855699662295592 -7.0960544318152783 350.28862243838159  99.999999822335354 -3.55329295081635 350.00000035532935  100 0 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 100 -2.4492127076447545e-14 0 0 0 1 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  100 0 350  100.00000016788265 3.357653056092063 349.99999966423474  99.871153979567325 6.7082922507060294 350.25770810060493  99.614413693494157 9.9811535532793023 350.77111458667099  99.244989236204319 13.133667254014087 351.51570531988671  98.782719490160005 16.14106204554367 352.46209608878792  98.247314081381845 18.991065369133018 353.58237755135616  97.656293340043064 21.681267443995591 354.85222820605424  96.305069830741061 27.094898672399299 357.84920888955003  95.532205610731751 29.776083412862121 359.61622715531161  94.722154327365587 32.277992523382729 361.54040041871144  93.889578416120571 34.609753071732321 363.61204164396673  93.048311226451844 36.776998731952766 365.8264229027584  92.211706870163113 38.783329440035715 368.18305324271273  91.393072001530825 40.629443402342417 370.68769525783222  89.809460344875703 44.020678864939597 376.0736018517199  89.045865019642378 45.559762660744155 378.9594576910697  88.333353522290722 46.923337441037496 382.03427944841542  87.697209384435155 48.087216148864847 385.30662787333353  87.171127692761729 49.015295205844701 388.77333266748747  86.793973628457792 49.668405227687359 392.41514581060738  86.602540378443862 50 396.1912597343462  86.602540378443862 50 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  100 0 450  100 3.3576535464432191 450  99.871154312247143 6.7082918702808545 449.74229256882165  99.614413450153194 9.9811536835594623 449.22888491692595  99.244989177299104 13.133667136739369 448.48429456674455  98.782719765236706 16.141061698735722 447.53790447273542  98.247313911152233 18.991065751063456 446.41762209624159  97.656293338930354 21.681267448453593 445.14777179147779  96.305069830740891 27.09489867239995 442.15079111044957  95.532205610732319 29.776083412860999 440.38377284469061  94.722154327364748 32.277992523383702 438.45959958128537  93.88957841612077 34.609753071732086 436.38795835603389  93.048311226452682 36.776998731951778 434.17357709724484  92.211706870162118 38.783329440037349 431.81694675728357  91.393072001531223 40.629443402341558 429.31230474216915  89.809460344875973 44.020678864939015 423.92639814828101  89.045865019641511 45.559762660746543 421.04054230892496  88.333353522292256 46.923337441033972 417.96572055159834  87.697209384433535 48.087216148866737 414.6933721266472  87.17112769276271 49.015295205845263 411.22666733252822  86.793973628457522 49.668405227686577 407.58485418938534  86.602540378443862 50 403.80874026565544  86.602540378443862 50 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 403.54687357661732  86.768554360302232 -49.712441623391754 407.0716639172436  87.09699130110117 -49.143655969883547 410.487699155016  87.559643674084654 -48.329700648456935 413.75575290976724  88.124612677935062 -47.303758601949092 416.85651205299661  88.763476885347615 -46.096633933967624 419.78454290273055  89.453947255998813 -44.730534623268937 422.54491274781367  90.961452312325036 -41.584580251231031 427.95014269520948  91.784169844340013 -39.781402281845253 430.57179432632284  92.631457510690936 -37.811257621078354 433.03715988364036  93.488642372673581 -35.675359427746841 435.35355519797133  94.341495300176646 -33.37137509421671 437.52200811136817  95.175736723592308 -30.89440022975991 439.53948272348691  95.976668732951225 -28.235197605552226 441.39802719245961  97.413920784822892 -22.756398611693562 444.62485641346274  98.058874567884601 -19.967859324472435 446.02229896119849  98.646807838010218 -17.001061271986877 447.25923114449233  99.157716307234622 -13.856554899211012 448.30828448674504  99.568620428735201 -10.546176567483982 449.13732104001321  99.855699311461152 -7.0960548419637099 449.71137685489032  100 -3.5532924194227782 450  100 0 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  190 20 445.82575694955841  188.76161711057227 20 445.82575694955841  187.55133668015193 19.91235337387026 445.86400686750096  186.40804485479049 19.744123905050216 445.93744289222383  185.33795497726547 19.514902285540977 446.03631256989695  184.34258844053036 19.237873159851539 446.15335170344235  183.4162771353935 18.925064118927583 446.28248355294483  182.54924607309326 18.582260868803356 446.42047134686101  180.5313877921306 17.665560569655433 446.7789324820896  179.44012090542088 17.061450737150739 447.00680039845656  178.42489439075112 16.40377787695131 447.2441561855693  177.47714125871727 15.694221315276218 447.4874142313061  176.58765276942751 14.933544392727526 447.73331406254499  175.75234570339671 14.118946812391625 447.97940245081276  174.96696097018872 13.245592454199262 448.22350020908942  173.60217638596475 11.495728687255017 448.66761533646343  173.01544757903642 10.646755069979088 448.86683910093825  172.46336132523098 9.7423084173559129 449.0610751124795  171.94696597602535 8.771423029278985 449.24861455151228  171.47070368601692 7.7249441623440038 449.42647700851086  171.044924719389 6.5904239412074901 449.58927437043644  170.68192128165288 5.3591604830220598 449.73050810726863  170.16788483391167 2.8445553031042996 449.93260628849634  169.98675095042276 1.5578500753039846 450.00490986887729  169.90241768877223 0.21126482985045633 450.03935566262362  169.92983296212577 -1.1418347912938847 450.02831824022019  170.06246027525333 -2.4583899354909087 449.97445348359048  170.28378283343829 -3.704622003922788 449.88605009478971  170.56795276727468 -4.8532125714778402 449.77468372826468  171.28490034470798 -7.1832615379201048 449.49867024844349  171.75813983885746 -8.3610693252848058 449.31962520702172  172.28669212661248 -9.4474000731872163 449.12446492753941  172.86264456356133 -10.451521549066081 448.91808899742563  173.47925753251525 -11.386037243846355 448.70476714178824  174.13467786991569 -12.258255622356449 448.48695690533697  174.82956714675092 -13.076870757778455 448.26636325898102  176.00111900189935 -14.297448989351548 447.91451132377955  176.44739232078726 -14.730560988794394 447.78448181541324  176.90942117645849 -15.148186634249697 447.65429745119013  177.38676190073474 -15.549790747042026 447.5246795099726  177.87897923803828 -15.934838498820188 447.39635744335635  178.38564634539176 -16.302795411557238 447.27006887567012  178.90634479241825 -16.653127357550481 447.14655960397596  179.97496970201598 -17.317464667277328 446.90661087678365  180.52299721930251 -17.631473643437698 446.79015597437859  181.08420673921333 -17.926789246506338 446.67797863376529  181.65818491571483 -18.202858939283349 446.57082398269648  182.24464543072799 -18.459115888765186 446.469422533765  182.84342899412766 -18.694978966144653 446.37449018440464  183.45450334374323 -18.909852746810909 446.28672821688906  184.81704385450712 -19.332245100108075 446.1121000038147  185.60147540318962 -19.539596822360508 446.02485151515918  186.43393805468477 -19.720072090406671 445.94770396971876  187.31387149619184 -19.866415718649087 445.8842320477263  188.23647567906212 -19.970468445414252 445.83867600419984  189.1915419192367 -20.02405348878451 445.81520441504995  190.16041200836165 -20.021926857902038 445.81621712319691  192.52143481281828 -19.89076336064802 445.87335669559917  193.84478773876532 -19.702761135389348 445.95507413275465  195.06679581640853 -19.429423733772833 446.07289768205271  196.19442250073351 -19.093863615052797 446.21441332180007  197.2339901412731 -18.710705503299977 446.37158175461525  198.19784034352128 -18.29082509447235 446.53855952571217  199.100910190511 -17.836992814585784 446.71316117898493  201.11765616922102 -16.678595142648216 447.14155083633744  202.17669187279171 -15.953143137007794 447.39760888173515  203.16359594026292 -15.168455096124706 447.6596949881054  204.08585426002017 -14.322479844337014 447.92460429403201  204.9499797977617 -13.41268261852915 448.1891514540867  205.75731315708825 -12.431663425542878 448.4501500638188  206.5085724462667 -11.371142075518817 448.7043523794726  207.55059273349855 -9.6150274534363902 449.07051619437817  207.87877699148535 -9.0090680862683605 449.18835549372614  208.18373555748497 -8.3889992621684186 449.29995996212511  208.46471177911445 -7.7557979054120896 449.40450751199393  208.72099547901203 -7.1104820307283623 449.50123316750705  208.95192203202214 -6.4541494263144097 449.5894363355099  209.15687144238044 -5.7880163368502879 449.66848807643208  209.48565334621975 -4.5448090320959809 449.7962999444498  209.6214488622964 -3.9537215627022064 449.84952693537196  209.74086778055747 -3.3395736896957944 449.89668662994114  209.841223344334 -2.702739282198082 449.93656069137319  209.9195218531847 -2.0451075411731523 449.9678069996001  209.9730562872202 -1.3706044135127382 449.98922148674052  209.99999993142859 -0.68571400612111455 449.9999999725714  210 -9.1940344226770776e-17 450 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  210 0 450  210.00000010265583 1.0265578731026479 450.00000004106238  209.93977343220345 2.0531775184097456 449.97591303009051  209.81934542997405 3.0681562548346761 449.92773155770618  209.64146807704995 4.0627445455190339 449.85693056989879  209.41030407615489 5.0306400381813221 449.76583102573477  209.13045541836325 5.967555357915689 449.65711085521787  208.80633633462796 6.8708596524406813 449.53346321730521  207.83713099429386 9.18036994382215 449.17162275319538  207.12197755130393 10.523829394329878 448.91191262084078  206.31025246004447 11.774932713181144 448.62820958148819  205.41069337265455 12.936028214861254 448.32905016254443  204.42944864183883 14.00912988520586 448.02224735685644  203.36899179251105 14.995089694532629 447.71504812589012  202.22871149661322 15.894132086087689 447.41427710488529  199.8723811516461 17.445880100292989 446.86429201706522  198.67075640785762 18.112500879287495 446.61297426562851  197.39099658337528 18.699329061251035 446.37992285218809  196.03237707895312 19.196046924645117 446.17381782714585  194.5987376061355 19.588584661696704 446.00532690104916  193.09989869850125 19.861934582966615 445.88601103430921  191.554374056744 20 445.82575694955841  190 20 445.82575694955841 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  188.40529526822812 -20.000000000000004 354.17424305044159  186.81699263164407 -19.85163748421305 354.10950158823778  185.28146610968872 -19.557176296119984 353.98093441747551  183.8194733092634 -19.137252010782827 353.80144025823751  182.44087859992891 -18.609272595736567 353.58463698586797  181.14756859074458 -17.988894519498103 353.34204238483449  178.64894098900859 -16.533946836137474 352.8060763850695  177.45327801148096 -15.688010730209923 352.51031302161272  176.34076071834318 -14.751671354023641 352.20408324999806  175.31033358514742 -13.726821040656557 351.89522935165371  174.36355769593391 -12.613431647889318 351.59163257627586  173.50466322258802 -11.409602762233769 351.30105579191763  172.03087512917583 -8.8933777413809842 350.78164824019547  171.40311466706285 -7.5928607668802197 350.54984232049196  170.86877872094436 -6.2046298165562233 350.34511406165245  170.44450690892319 -4.7324669523921434 350.1778232028887  170.14859873510889 -3.188373618690417 350.05943531939067  170 -1.5960133272396184 349.99999999999994  170 0 349.99999999999994 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 50 -1.2246063538223773e-14 0 0 0 1 
+7 0 0  7 20 4  170 0 350  170 1.5112892925088235 350  170.13323829157676 3.0201974972875441 350.05329228421118  170.39892023771003 4.4882262522719127 350.15958274693634  170.78166224300142 5.8937836338085239 350.31074365945841  171.26570088958786 7.2253835508502897 350.49706344959191  171.83645995042141 8.4787047126246602 350.70955796991018  173.20566738156501 10.962745615245275 351.19840252074181  174.02300961145505 12.175956849896046 351.47942926704201  174.92708234710466 13.300618833567951 351.77519479638875  175.91279129804428 14.338824970520468 352.07805706842532  176.97782263526184 15.29122457343451 352.38049995237753  178.12264337007468 16.156924091174648 352.67525479805306  180.61524721177804 17.724100774430205 353.23927066004762  181.9676846606753 18.42161104257076 353.50790196241178  183.41728858328361 19.017546268068447 353.75038739924128  184.96339172675098 19.493771560366365 353.95324155007802  186.59601333953287 19.830029166827707 354.10007506789543  188.29315701982478 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  210 0 350  210.00000015112892 1.5112890974887772 349.99999993954845  209.86676130590678 3.0201977385758565 350.05329244438008  209.60108031223749 4.4882260331561916 350.15958252985627  209.218337305402 5.8937839375949101 350.31074383584001  208.73429928613263 7.2253833710765241 350.49706338173036  208.16354005084071 8.4787047103152631 350.70955796945879  206.79433261849749 10.962745615153812 351.19840252072038  205.97699038859366 12.175956849838967 351.47942926702643  205.07291765293593 13.300618833526656 351.77519479637635  204.0872087019697 14.338824970513437 352.07805706842197  203.02217736473835 15.291224573438482 352.38049995237844  201.87735662989815 16.156924091197233 352.67525479806051  199.38475278817143 17.724100774456375 353.23927066005763  198.03231533928286 18.421611042587735 353.50790196241871  196.58271141667572 19.017546268081134 353.75038739924679  195.03660827322122 19.493771560372139 353.95324155008029  193.40398666044547 19.830029166829849 354.10007506789646  191.70684298016479 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+2 0 0 300 0 0 1 1 0 -0 -0 1 0 50
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  191.59470473177032 -20.000000000000004 354.17424305044165  193.18300736835764 -19.851637484212873 354.10950158823789  194.71853389030395 -19.557176296121398 353.98093441747574  196.18052669073927 -19.13725201078212 353.80144025823745  197.55912140006541 -18.609272595738776 353.58463698586883  198.85243140925283 -17.988894519499269 353.34204238483494  201.35105901096543 -16.533946836152985 352.80607638507519  202.54672198847359 -15.688010730242384 352.51031302162386  203.65923928159609 -14.751671354075334 352.2040832500154  204.68966641477729 -13.726821040731068 351.89522935167571  205.63644230398049 -12.613431647990538 351.59163257630365  206.49533677731949 -11.409602762363491 351.30105579194895  207.96912486937774 -8.8933777438768757 350.78164824070649  208.59688514306879 -7.592860956872455 350.54984239343435  209.13122176228288 -6.2046294940723943 350.34511387364302  209.55549250885861 -4.7324671867573436 350.17782343218005  209.85140168924835 -3.1883733582241396 350.05943515068623  209.99999984039866 -1.5960135384724008 350.0000000638405  210 0 349.99999999999994 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 20 -4.898425415289509e-15 0 0 0 1 
+2 0 0 200 0 0 1 1 0 -0 -0 1 0 20
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+Polygon3D 0
+PolygonOnTriangulations 42
+37 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 74 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+12 57 58 59 60 61 62 63 64 65 66 67 56 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+2 13 2 
+p 3.2000000008 1 0 350 
+2 14 50 
+p 3.2000000008 1 0 350 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 90 91 92 93 94 95 96 97 98 99 100 79 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+12 68 80 81 82 83 84 85 86 87 88 89 79 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+2 110 74 
+p 3.2000000008 1 450 800 
+2 62 73 
+p 3.2000000008 1 450 800 
+12 1 111 112 113 114 115 116 117 118 119 120 110 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+12 57 69 70 71 72 73 74 75 76 77 78 68 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+33 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+33 2 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 50 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+12 2 34 35 36 37 38 39 40 41 42 43 1 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 44 46 47 48 49 50 51 52 53 54 55 45 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+12 1 73 74 75 76 77 78 79 80 81 82 62 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+2 56 45 
+p 3.2000000008 1 100 170 
+2 90 101 
+p 3.2000000008 1 100 170 
+12 101 103 104 105 106 107 108 109 110 111 112 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 113 114 115 116 117 118 119 120 121 122 123 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+2 161 125 
+p 3.2000000008 1 210 300 
+2 113 124 
+p 3.2000000008 1 210 300 
+37 124 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 158 159 160 125 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 44 162 163 164 165 166 167 168 169 170 171 161 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+2 50 14 
+p 3.2000000008 1 70 200 
+2 1 13 
+p 3.2000000008 1 70 200 
+37 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 14 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+2 13 2 
+p 3.2000000008 1 0 130 
+2 14 50 
+p 3.2000000008 1 0 130 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+Surfaces 8
+1 0 0 800 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 50
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+1 0 0 300 0 0 1 1 0 -0 -0 1 0 
+1 0 0 200 0 0 1 1 0 -0 -0 1 0 
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+Triangulations 9
+37 36 1 0
+100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 0 0 800 100 0 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+512 902 1 1.36386965972777
+86.6025403784438 -50 400 100 -1.83690953073357e-14 350 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 0 100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 100 -1.83690953073357e-14 350 86.6025403784439 50 400 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 100 -2.44921270764475e-14 450 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -2.44921270764475e-14 800 100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 -40.169542465297 -91.5773326655057 730.434782608696 -40.169542465297 -91.5773326655057 695.652173913043 -8.25793454723327 -99.658449300667 695.652173913043 -40.1695424652969 91.5773326655057 278.260869565217 -8.25793454723323 99.658449300667 278.260869565217 -40.1695424652969 91.5773326655057 243.478260869565 54.6948158122427 -83.7166478262529 139.130434782609 54.6948158122427 -83.7166478262529 104.347826086957 78.9140509396393 -61.4212712689668 104.347826086957 -67.7281571625741 -73.5723910673132 765.217391304348 -87.9473751206489 -47.5947393037073 765.217391304348 24.5485487140799 -96.9400265939331 139.130434782609 -67.7281571625741 -73.5723910673132 730.434782608696 -87.9473751206489 47.5947393037074 591.304347826087 -87.9473751206489 47.5947393037074 556.521739130435 -98.6361303402722 16.4594590280734 556.521739130435 -67.7281571625741 73.5723910673132 591.304347826087 -67.7281571625741 73.5723910673132 556.521739130435 24.5485487140799 -96.9400265939331 173.913043478261 -8.25793454723323 99.658449300667 313.04347826087 24.5485487140799 96.940026593933 278.260869565217 -8.25793454723327 -99.658449300667 139.130434782609 94.5817241700635 -32.4699469204684 591.304347826087 78.9140509396393 -61.4212712689668 556.521739130435 94.5817241700635 -32.4699469204684 556.521739130435 -8.25793454723327 -99.658449300667 173.913043478261 78.9140509396393 -61.4212712689668 591.304347826087 24.5485487140799 96.940026593933 313.04347826087 -67.7281571625741 73.5723910673132 626.086956521739 -40.1695424652969 91.5773326655057 591.304347826087 -40.1695424652969 91.5773326655057 626.086956521739 -8.25793454723327 -99.658449300667 208.695652173913 -40.169542465297 -91.5773326655057 208.695652173913 78.9140509396393 -61.4212712689668 626.086956521739 54.6948158122427 -83.7166478262529 626.086956521739 24.5485487140799 96.940026593933 347.826086956522 54.6948158122427 83.7166478262529 347.826086956522 -40.169542465297 -91.5773326655057 243.478260869565 -67.7281571625741 -73.5723910673132 243.478260869565 54.6948158122427 -83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 660.869565217391 -67.7281571625741 -73.5723910673132 278.260869565217 -87.9473751206489 -47.5947393037073 243.478260869565 54.6948158122427 83.7166478262529 382.608695652174 78.9140509396394 61.4212712689668 347.826086956522 -40.1695424652969 91.5773326655057 660.869565217391 -8.25793454723323 99.658449300667 660.869565217391 -87.9473751206489 -47.5947393037073 278.260869565217 78.9140509396394 61.4212712689668 382.608695652174 24.5485487140799 -96.9400265939331 695.652173913043 -8.25793454723327 -99.658449300667 660.869565217391 -8.25793454723323 99.658449300667 695.652173913043 24.5485487140799 96.940026593933 660.869565217391 -87.9473751206489 -47.5947393037073 313.04347826087 -98.6361303402722 -16.4594590280734 313.04347826087 -98.6361303402722 -16.4594590280734 278.260869565217 24.5485487140799 96.940026593933 695.652173913043 -8.25793454723327 -99.658449300667 730.434782608696 -40.169542465297 -91.5773326655057 765.217391304348 78.9140509396394 61.4212712689668 417.391304347826 24.5485487140799 96.940026593933 730.434782608696 54.6948158122427 83.7166478262529 730.434782608696 54.6948158122427 83.7166478262529 765.217391304348 78.9140509396394 61.4212712689668 765.217391304348 78.9140509396394 61.4212712689668 730.434782608696 -98.6361303402722 -16.4594590280734 347.826086956522 -98.6361303402722 16.4594590280734 347.826086956522 94.5817241700635 -32.4699469204684 626.086956521739 94.5817241700635 -32.4699469204684 278.260869565217 94.5817241700635 -32.4699469204684 243.478260869565 78.9140509396393 -61.4212712689668 278.260869565217 78.9140509396393 -61.4212712689668 243.478260869565 -98.6361303402722 16.4594590280734 382.608695652174 -87.9473751206489 47.5947393037074 382.608695652174 94.5817241700635 32.4699469204683 452.173913043478 78.9140509396393 -61.4212712689668 660.869565217391 78.9140509396393 -61.4212712689668 313.04347826087 54.6948158122427 -83.7166478262529 313.04347826087 -87.9473751206489 47.5947393037074 417.391304347826 -67.7281571625741 73.5723910673132 417.391304347826 54.6948158122427 -83.7166478262529 695.652173913043 54.6948158122427 -83.7166478262529 347.826086956522 24.5485487140799 -96.9400265939331 347.826086956522 -67.7281571625741 73.5723910673132 452.173913043478 -40.1695424652969 91.5773326655057 452.173913043478 -40.1695424652969 91.5773326655057 417.391304347826 24.5485487140799 -96.9400265939331 730.434782608696 -8.25793454723327 -99.658449300667 34.7826086956522 -40.169542465297 -91.5773326655057 34.7826086956522 94.5817241700635 32.4699469204683 34.7826086956522 24.5485487140799 -96.9400265939331 382.608695652174 -8.25793454723327 -99.658449300667 347.826086956522 -8.25793454723327 -99.658449300667 765.217391304348 -8.25793454723327 -99.658449300667 382.608695652174 -40.1695424652969 91.5773326655057 486.956521739131 -8.25793454723323 99.658449300667 486.956521739131 94.5817241700635 -32.4699469204684 660.869565217391 78.9140509396394 61.4212712689668 34.7826086956522 -8.25793454723327 -99.658449300667 417.391304347826 -40.169542465297 -91.5773326655057 417.391304347826 -40.169542465297 -91.5773326655057 69.5652173913043 -67.7281571625741 -73.5723910673132 34.7826086956522 -67.7281571625741 -73.5723910673132 69.5652173913043 -8.25793454723323 99.658449300667 521.739130434783 24.5485487140799 96.940026593933 486.956521739131 24.5485487140799 96.940026593933 521.739130434783 78.9140509396393 -61.4212712689668 695.652173913043 -40.169542465297 -91.5773326655057 452.173913043478 -67.7281571625741 -73.5723910673132 452.173913043478 -67.7281571625741 -73.5723910673132 104.347826086957 -87.9473751206489 -47.5947393037073 104.347826086957 -87.9473751206489 -47.5947393037073 69.5652173913043 94.5817241700635 32.4699469204683 69.5652173913043 54.6948158122427 -83.7166478262529 730.434782608696 -67.7281571625741 -73.5723910673132 486.956521739131 -87.9473751206489 -47.5947393037073 486.956521739131 -87.9473751206489 -47.5947393037073 452.173913043478 -87.9473751206489 -47.5947393037073 139.130434782609 -98.6361303402722 -16.4594590280734 104.347826086957 24.5485487140799 -96.9400265939331 765.217391304348 24.5485487140799 96.940026593933 556.521739130435 54.6948158122427 83.7166478262529 556.521739130435 -98.6361303402722 -16.4594590280734 139.130434782609 54.6948158122427 83.7166478262529 34.7826086956522 -87.9473751206489 -47.5947393037073 521.739130434783 -98.6361303402722 -16.4594590280734 486.956521739131 94.5817241700635 -32.4699469204684 695.652173913043 54.6948158122427 83.7166478262529 591.304347826087 78.9140509396394 61.4212712689668 556.521739130435 -98.6361303402722 -16.4594590280734 173.913043478261 -98.6361303402722 16.4594590280734 173.913043478261 -98.6361303402722 -16.4594590280734 521.739130434783 78.9140509396394 61.4212712689668 591.304347826087 -98.6361303402722 16.4594590280734 208.695652173913 78.9140509396394 61.4212712689668 69.5652173913043 -87.9473751206489 47.5947393037074 208.695652173913 -98.6361303402722 -16.4594590280734 556.521739130435 78.9140509396393 -61.4212712689668 730.434782608696 54.6948158122427 -83.7166478262529 765.217391304348 -87.9473751206489 47.5947393037074 243.478260869565 -67.7281571625741 73.5723910673132 208.695652173913 -98.6361303402722 16.4594590280734 591.304347826087 78.9140509396394 61.4212712689668 626.086956521739 94.5817241700635 32.4699469204683 591.304347826087 -67.7281571625741 73.5723910673132 243.478260869565 94.5817241700635 32.4699469204683 626.086956521739 94.5817241700635 32.4699469204683 660.869565217391 94.5817241700635 -32.4699469204684 730.434782608696 94.5817241700635 32.4699469204683 104.347826086957 24.5485487140799 96.940026593933 34.7826086956522 78.9140509396393 -61.4212712689668 765.217391304348 -67.7281571625741 73.5723910673132 278.260869565217 -87.9473751206489 47.5947393037074 626.086956521739 94.5817241700635 -32.4699469204684 104.347826086957 78.9140509396393 -61.4212712689668 69.5652173913043 94.5817241700635 -32.4699469204684 69.5652173913043 94.5817241700635 -32.4699469204684 765.217391304348 -40.1695424652969 91.5773326655057 313.04347826087 -67.7281571625741 73.5723910673132 660.869565217391 78.9140509396393 -61.4212712689668 139.130434782609 -8.25793454723323 99.658449300667 347.826086956522 54.6948158122427 83.7166478262529 69.5652173913043 78.9140509396394 61.4212712689668 104.347826086957 54.6948158122427 -83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 208.695652173913 -40.1695424652969 91.5773326655057 695.652173913043 -8.25793454723323 99.658449300667 730.434782608696 94.5817241700635 32.4699469204683 139.130434782609 24.5485487140799 96.940026593933 382.608695652174 24.5485487140799 96.940026593933 765.217391304348 -8.25793454723327 -99.658449300667 243.478260869565 -8.25793454723323 99.658449300667 34.7826086956522 54.6948158122427 83.7166478262529 417.391304347826 94.5817241700635 -32.4699469204684 313.04347826087 -40.169542465297 -91.5773326655057 278.260869565217 78.9140509396394 61.4212712689668 452.173913043478 -67.7281571625741 -73.5723910673132 313.04347826087 78.9140509396393 -61.4212712689668 347.826086956522 24.5485487140799 96.940026593933 69.5652173913043 54.6948158122427 83.7166478262529 104.347826086957 54.6948158122427 -83.7166478262529 382.608695652174 -87.9473751206489 -47.5947393037073 347.826086956522 94.5817241700635 32.4699469204683 486.956521739131 24.5485487140799 -96.9400265939331 417.391304347826 -98.6361303402722 -16.4594590280734 382.608695652174 78.9140509396394 61.4212712689668 139.130434782609 -98.6361303402722 16.4594590280734 417.391304347826 94.5817241700635 32.4699469204683 173.913043478261 -8.25793454723327 -99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 34.7826086956522 -40.169542465297 -91.5773326655057 486.956521739131 -87.9473751206489 47.5947393037074 452.173913043478 -40.1695424652969 91.5773326655057 34.7826086956522 -67.7281571625741 -73.5723910673132 521.739130434783 -8.25793454723327 -99.658449300667 69.5652173913043 -67.7281571625741 73.5723910673132 486.956521739131 -40.169542465297 -91.5773326655057 104.347826086957 -87.9473751206489 -47.5947393037073 556.521739130435 -8.25793454723323 99.658449300667 69.5652173913043 -40.1695424652969 91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 139.130434782609 24.5485487140799 96.940026593933 104.347826086957 -98.6361303402722 -16.4594590280734 591.304347826087 -87.9473751206489 -47.5947393037073 173.913043478261 -8.25793454723323 99.658449300667 556.521739130435 54.6948158122427 83.7166478262529 139.130434782609 -98.6361303402722 16.4594590280734 626.086956521739 -98.6361303402722 -16.4594590280734 208.695652173913 24.5485487140799 96.940026593933 591.304347826087 -87.9473751206489 47.5947393037074 660.869565217391 -98.6361303402722 16.4594590280734 243.478260869565 78.9140509396394 61.4212712689668 173.913043478261 94.5817241700635 32.4699469204683 208.695652173913 54.6948158122427 83.7166478262529 626.086956521739 -87.9473751206489 47.5947393037074 278.260869565217 -67.7281571625741 73.5723910673132 695.652173913043 -67.7281571625741 73.5723910673132 34.7826086956522 78.9140509396394 61.4212712689668 660.869565217391 -67.7281571625741 73.5723910673132 313.04347826087 -40.1695424652969 91.5773326655057 730.434782608696 -40.1695424652969 91.5773326655057 69.5652173913043 -8.25793454723323 99.658449300667 765.217391304348 94.5817241700635 32.4699469204683 695.652173913043 -40.1695424652969 91.5773326655057 347.826086956522 94.5817241700635 -32.4699469204684 347.826086956522 -8.25793454723323 99.658449300667 104.347826086957 94.5817241700635 -32.4699469204684 139.130434782609 -8.25793454723323 99.658449300667 382.608695652174 78.9140509396393 -61.4212712689668 382.608695652174 78.9140509396393 -61.4212712689668 173.913043478261 54.6948158122427 -83.7166478262529 208.695652173913 54.6948158122427 -83.7166478262529 417.391304347826 24.5485487140799 96.940026593933 417.391304347826 24.5485487140799 96.940026593933 139.130434782609 54.6948158122427 83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 452.173913043478 24.5485487140799 -96.9400265939331 243.478260869565 78.9140509396394 61.4212712689668 208.695652173913 54.6948158122427 83.7166478262529 452.173913043478 94.5817241700635 32.4699469204683 243.478260869565 -8.25793454723327 -99.658449300667 486.956521739131 -8.25793454723327 -99.658449300667 278.260869565217 78.9140509396394 61.4212712689668 486.956521739131 -40.169542465297 -91.5773326655057 313.04347826087 -87.9473751206489 47.5947393037074 34.7826086956522 -40.169542465297 -91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 347.826086956522 -67.7281571625741 -73.5723910673132 556.521739130435 94.5817241700635 32.4699469204683 521.739130434783 -87.9473751206489 -47.5947393037073 382.608695652174 -67.7281571625741 73.5723910673132 69.5652173913043 -87.9473751206489 -47.5947393037073 591.304347826087 54.6948158122427 -83.7166478262529 34.7826086956522 -98.6361303402722 -16.4594590280734 417.391304347826 -40.1695424652969 91.5773326655057 104.347826086957 -98.6361303402722 -16.4594590280734 626.086956521739 -98.6361303402722 16.4594590280734 452.173913043478 24.5485487140799 -96.9400265939331 69.5652173913043 -8.25793454723323 99.658449300667 139.130434782609 -98.6361303402722 16.4594590280734 660.869565217391 -8.25793454723327 -99.658449300667 104.347826086957 -87.9473751206489 47.5947393037074 486.956521739131 24.5485487140799 96.940026593933 173.913043478261 -87.9473751206489 47.5947393037074 695.652173913043 54.6948158122427 83.7166478262529 208.695652173913 -67.7281571625741 73.5723910673132 521.739130434783 -40.169542465297 -91.5773326655057 139.130434782609 -67.7281571625741 73.5723910673132 730.434782608696 78.9140509396394 61.4212712689668 243.478260869565 -67.7281571625741 -73.5723910673132 173.913043478261 -40.1695424652969 91.5773326655057 765.217391304348 -40.1695424652969 91.5773326655057 556.521739130435 -87.9473751206489 -47.5947393037073 208.695652173913 94.5817241700635 32.4699469204683 278.260869565217 78.9140509396393 -61.4212712689668 417.391304347826 -8.25793454723323 99.658449300667 591.304347826087 -98.6361303402722 16.4594590280734 34.7826086956522 -98.6361303402722 -16.4594590280734 243.478260869565 -98.6361303402722 16.4594590280734 278.260869565217 54.6948158122427 -83.7166478262529 452.173913043478 24.5485487140799 96.940026593933 626.086956521739 54.6948158122427 83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 486.956521739131 -87.9473751206489 47.5947393037074 69.5652173913043 -87.9473751206489 47.5947393037074 313.04347826087 -67.7281571625741 73.5723910673132 104.347826086957 78.9140509396394 61.4212712689668 695.652173913043 -8.25793454723327 -99.658449300667 521.739130434783 -67.7281571625741 73.5723910673132 347.826086956522 -40.1695424652969 91.5773326655057 139.130434782609 -40.169542465297 -91.5773326655057 556.521739130435 94.5817241700635 32.4699469204683 730.434782608696 -8.25793454723323 99.658449300667 173.913043478261 -40.1695424652969 91.5773326655057 382.608695652174 94.5817241700635 -32.4699469204684 173.913043478261 -67.7281571625741 -73.5723910673132 591.304347826087 -8.25793454723323 99.658449300667 417.391304347826 78.9140509396393 -61.4212712689668 208.695652173913 -87.9473751206489 -47.5947393037073 626.086956521739 24.5485487140799 96.940026593933 208.695652173913 54.6948158122427 83.7166478262529 243.478260869565 54.6948158122427 -83.7166478262529 243.478260869565 -98.6361303402722 -16.4594590280734 660.869565217391 24.5485487140799 96.940026593933 452.173913043478 24.5485487140799 -96.9400265939331 278.260869565217 78.9140509396394 61.4212712689668 278.260869565217 -98.6361303402722 16.4594590280734 695.652173913043 54.6948158122427 83.7166478262529 486.956521739131 94.5817241700635 32.4699469204683 313.04347826087 -8.25793454723327 -99.658449300667 313.04347826087 -87.9473751206489 47.5947393037074 730.434782608696 78.9140509396394 61.4212712689668 521.739130434783 -98.6361303402722 -16.4594590280734 34.7826086956522 -40.169542465297 -91.5773326655057 347.826086956522 -67.7281571625741 73.5723910673132 765.217391304348 -67.7281571625741 -73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 452.173913043478 -98.6361303402722 16.4594590280734 69.5652173913043 -87.9473751206489 -47.5947393037073 417.391304347826 94.5817241700635 32.4699469204683 556.521739130435 54.6948158122427 -83.7166478262529 486.956521739131 78.9140509396393 -61.4212712689668 34.7826086956522 -87.9473751206489 47.5947393037074 104.347826086957 -98.6361303402722 -16.4594590280734 452.173913043478 -67.7281571625741 73.5723910673132 139.130434782609 54.6948158122427 -83.7166478262529 69.5652173913043 24.5485487140799 -96.9400265939331 521.739130434783 -98.6361303402722 16.4594590280734 486.956521739131 -40.1695424652969 91.5773326655057 173.913043478261 24.5485487140799 -96.9400265939331 104.347826086957 -8.25793454723323 99.658449300667 208.695652173913 -87.9473751206489 47.5947393037074 521.739130434783 -8.25793454723327 -99.658449300667 556.521739130435 -40.169542465297 -91.5773326655057 591.304347826087 -40.169542465297 -91.5773326655057 173.913043478261 24.5485487140799 96.940026593933 243.478260869565 -67.7281571625741 -73.5723910673132 626.086956521739 -67.7281571625741 -73.5723910673132 208.695652173913 54.6948158122427 83.7166478262529 278.260869565217 -87.9473751206489 -47.5947393037073 660.869565217391 -98.6361303402722 -16.4594590280734 695.652173913043 -8.25793454723323 99.658449300667 626.086956521739 78.9140509396394 61.4212712689668 313.04347826087 94.5817241700635 32.4699469204683 347.826086956522 -98.6361303402722 16.4594590280734 313.04347826087 -98.6361303402722 16.4594590280734 730.434782608696 -87.9473751206489 -47.5947393037073 34.7826086956522 -87.9473751206489 47.5947393037074 765.217391304348 54.6948158122427 83.7166478262529 695.652173913043 -87.9473751206489 47.5947393037074 347.826086956522 94.5817241700635 -32.4699469204684 452.173913043478 -98.6361303402722 -16.4594590280734 69.5652173913043 -67.7281571625741 73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 486.956521739131 -98.6361303402722 16.4594590280734 104.347826086957 94.5817241700635 32.4699469204683 765.217391304348 94.5817241700635 -32.4699469204684 208.695652173913 54.6948158122427 -83.7166478262529 521.739130434783 -87.9473751206489 47.5947393037074 139.130434782609 -8.25793454723323 99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 556.521739130435 -67.7281571625741 73.5723910673132 173.913043478261 54.6948158122427 -83.7166478262529 278.260869565217 -40.1695424652969 91.5773326655057 208.695652173913 -8.25793454723327 -99.658449300667 591.304347826087 -40.169542465297 -91.5773326655057 626.086956521739 -8.25793454723323 99.658449300667 243.478260869565 24.5485487140799 -96.9400265939331 313.04347826087 54.6948158122427 83.7166478262529 521.739130434783 -67.7281571625741 -73.5723910673132 660.869565217391 -87.9473751206489 -47.5947393037073 695.652173913043 54.6948158122427 83.7166478262529 313.04347826087 -40.169542465297 -91.5773326655057 382.608695652174 -67.7281571625741 -73.5723910673132 417.391304347826 -98.6361303402722 -16.4594590280734 730.434782608696 -98.6361303402722 16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 34.7826086956522 94.5817241700635 -32.4699469204684 486.956521739131 78.9140509396393 -61.4212712689668 521.739130434783 54.6948158122427 -83.7166478262529 556.521739130435 -98.6361303402722 16.4594590280734 521.739130434783 24.5485487140799 -96.9400265939331 591.304347826087 -8.25793454723327 -99.658449300667 626.086956521739 -98.6361303402722 16.4594590280734 139.130434782609 -40.169542465297 -91.5773326655057 660.869565217391 -87.9473751206489 47.5947393037074 173.913043478261 -67.7281571625741 -73.5723910673132 695.652173913043 -87.9473751206489 -47.5947393037073 730.434782608696 -98.6361303402722 -16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 521.739130434783 54.6948158122427 -83.7166478262529 591.304347826087 24.5485487140799 -96.9400265939331 626.086956521739 5.75958653158129 400 6.28318530717959 350 5.76502671255203 393.146938099824 5.78038331643331 386.662410602174 5.80382582325277 380.690815213948 5.84339274904795 373.782555238023 5.89986744204557 366.815019461706 5.9668194398655 360.858265526469 6.03627258275022 356.380850902333 6.10703525710988 353.171507010994 6.18548781435823 350.960675236214 6.23370669596795 350.245215525427 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 350 0.523598775598299 400 0.077538932748348 350.60366789119 0.1509208682896 352.314017004824 0.218192472586135 354.928638859964 0.278804640762612 358.255381554833 0.346747481674073 363.324622594048 0.409044313017844 369.700044024682 0.456050013115963 376.326552497693 0.493149687318882 383.90964254567 0.51533969042131 391.563087645832 0.521486191917156 395.72529258068 0 450 0.0775391300147876 449.396329038004 0.15092123436146 447.685971589172 0.218192971604858 445.071337728308 0.278805237518871 441.744580622317 0.346748092637934 436.675324162327 0.409044978349884 430.299875845487 0.456050672751564 423.673337329156 0.493150253015108 416.090210848718 0.51534004882998 408.43673018339 0.521486285180745 404.274613176575 0 800 6.28318530717959 800 0.174532925199433 800 0.349065850398866 800 0.523598775598299 800 0.698131700797732 800 0.872664625997165 800 1.0471975511966 800 1.22173047639603 800 1.39626340159546 800 1.5707963267949 800 1.74532925199433 800 1.91986217719376 800 2.0943951023932 800 2.26892802759263 800 2.44346095279206 800 2.61799387799149 800 2.79252680319093 800 2.96705972839036 800 3.14159265358979 800 3.31612557878922 800 3.49065850398866 800 3.66519142918809 800 3.83972435438752 800 4.01425727958696 800 4.18879020478639 800 4.36332312998582 800 4.53785605518525 800 4.71238898038469 800 4.88692190558412 800 5.06145483078355 800 5.23598775598299 800 5.41052068118242 800 5.58505360638185 800 5.75958653158128 800 5.93411945678072 800 6.10865238198015 800 6.28318530717959 450 5.76502671255202 406.853061900168 5.78038331643326 413.337589397812 5.80382582325268 419.309184786033 5.84339274904778 426.217444761952 5.89986744204533 433.184980538269 5.96681943986518 439.141734473506 6.03627258290147 443.619149110997 6.10703525679861 446.828492965207 6.18548781364045 449.039324751509 6.23370669672657 449.754784472325 4.29902152596498 730.434782608696 4.29902152596498 695.652173913043 4.62971548950075 695.652173913043 1.98416378121461 278.260869565217 1.65346981767884 278.260869565217 1.98416378121461 243.478260869565 5.29110341657228 139.130434782609 5.29110341657228 104.347826086957 5.62179738010805 104.347826086957 3.96832756242921 765.217391304348 3.63763359889344 765.217391304348 4.96040945303652 139.130434782609 3.96832756242921 730.434782608696 2.64555170828614 591.304347826087 2.64555170828614 556.521739130435 2.97624567182191 556.521739130435 2.31485774475037 591.304347826087 2.31485774475037 556.521739130435 4.96040945303652 173.913043478261 1.65346981767884 313.04347826087 1.32277585414307 278.260869565217 4.62971548950075 139.130434782609 5.95249134364382 591.304347826087 5.62179738010805 556.521739130435 5.95249134364382 556.521739130435 4.62971548950075 173.913043478261 5.62179738010805 591.304347826087 1.32277585414307 313.04347826087 2.31485774475037 626.086956521739 1.98416378121461 591.304347826087 1.98416378121461 626.086956521739 4.62971548950075 208.695652173913 4.29902152596498 208.695652173913 5.62179738010805 626.086956521739 5.29110341657228 626.086956521739 1.32277585414307 347.826086956522 0.992081890607303 347.826086956522 4.29902152596498 243.478260869565 3.96832756242921 243.478260869565 5.29110341657228 660.869565217391 4.96040945303652 660.869565217391 3.96832756242921 278.260869565217 3.63763359889344 243.478260869565 0.992081890607303 382.608695652174 0.661387927071535 347.826086956522 1.98416378121461 660.869565217391 1.65346981767884 660.869565217391 3.63763359889344 278.260869565217 0.661387927071535 382.608695652174 4.96040945303652 695.652173913043 4.62971548950075 660.869565217391 1.65346981767884 695.652173913043 1.32277585414307 660.869565217391 3.63763359889344 313.04347826087 3.30693963535768 313.04347826087 3.30693963535768 278.260869565217 1.32277585414307 695.652173913043 4.62971548950075 730.434782608696 4.29902152596498 765.217391304348 0.661387927071535 417.391304347826 1.32277585414307 730.434782608696 0.992081890607303 730.434782608696 0.992081890607303 765.217391304348 0.661387927071535 765.217391304348 0.661387927071535 730.434782608696 3.30693963535768 347.826086956522 2.97624567182191 347.826086956522 5.95249134364382 626.086956521739 5.95249134364382 278.260869565217 5.95249134364382 243.478260869565 5.62179738010805 278.260869565217 5.62179738010805 243.478260869565 2.97624567182191 382.608695652174 2.64555170828614 382.608695652174 0.330693963535768 452.173913043478 5.62179738010805 660.869565217391 5.62179738010805 313.04347826087 5.29110341657228 313.04347826087 2.64555170828614 417.391304347826 2.31485774475037 417.391304347826 5.29110341657228 695.652173913043 5.29110341657228 347.826086956522 4.96040945303652 347.826086956522 2.31485774475037 452.173913043478 1.98416378121461 452.173913043478 1.98416378121461 417.391304347826 4.96040945303652 730.434782608696 4.62971548950075 34.7826086956522 4.29902152596498 34.7826086956522 0.330693963535768 34.7826086956522 4.96040945303652 382.608695652174 4.62971548950075 347.826086956522 4.62971548950075 765.217391304348 4.62971548950075 382.608695652174 1.98416378121461 486.956521739131 1.65346981767884 486.956521739131 5.95249134364382 660.869565217391 0.661387927071535 34.7826086956522 4.62971548950075 417.391304347826 4.29902152596498 417.391304347826 4.29902152596498 69.5652173913043 3.96832756242921 34.7826086956522 3.96832756242921 69.5652173913043 1.65346981767884 521.739130434783 1.32277585414307 486.956521739131 1.32277585414307 521.739130434783 5.62179738010805 695.652173913043 4.29902152596498 452.173913043478 3.96832756242921 452.173913043478 3.96832756242921 104.347826086957 3.63763359889344 104.347826086957 3.63763359889344 69.5652173913043 0.330693963535768 69.5652173913043 5.29110341657228 730.434782608696 3.96832756242921 486.956521739131 3.63763359889344 486.956521739131 3.63763359889344 452.173913043478 3.63763359889344 139.130434782609 3.30693963535768 104.347826086957 4.96040945303652 765.217391304348 1.32277585414307 556.521739130435 0.992081890607303 556.521739130435 3.30693963535768 139.130434782609 0.992081890607303 34.7826086956522 3.63763359889344 521.739130434783 3.30693963535768 486.956521739131 5.95249134364382 695.652173913043 0.992081890607303 591.304347826087 0.661387927071535 556.521739130435 3.30693963535768 173.913043478261 2.97624567182191 173.913043478261 3.30693963535768 521.739130434783 0.661387927071535 591.304347826087 2.97624567182191 208.695652173913 0.661387927071535 69.5652173913043 2.64555170828614 208.695652173913 3.30693963535768 556.521739130435 5.62179738010805 730.434782608696 5.29110341657228 765.217391304348 2.64555170828614 243.478260869565 2.31485774475037 208.695652173913 2.97624567182191 591.304347826087 0.661387927071535 626.086956521739 0.330693963535768 591.304347826087 2.31485774475037 243.478260869565 0.330693963535768 626.086956521739 0.330693963535768 660.869565217391 5.95249134364382 730.434782608696 0.330693963535768 104.347826086957 1.32277585414307 34.7826086956522 5.62179738010805 765.217391304348 2.31485774475037 278.260869565217 2.64555170828614 626.086956521739 5.95249134364382 104.347826086957 5.62179738010805 69.5652173913043 5.95249134364382 69.5652173913043 5.95249134364382 765.217391304348 1.98416378121461 313.04347826087 2.31485774475037 660.869565217391 5.62179738010805 139.130434782609 1.65346981767884 347.826086956522 0.992081890607303 69.5652173913043 0.661387927071535 104.347826086957 5.29110341657228 173.913043478261 4.96040945303652 208.695652173913 1.98416378121461 695.652173913043 1.65346981767884 730.434782608696 0.330693963535768 139.130434782609 1.32277585414307 382.608695652174 1.32277585414307 765.217391304348 4.62971548950075 243.478260869565 1.65346981767884 34.7826086956522 0.992081890607303 417.391304347826 5.95249134364382 313.04347826087 4.29902152596498 278.260869565217 0.661387927071535 452.173913043478 3.96832756242921 313.04347826087 5.62179738010805 347.826086956522 1.32277585414307 69.5652173913043 0.992081890607303 104.347826086957 5.29110341657228 382.608695652174 3.63763359889344 347.826086956522 0.330693963535768 486.956521739131 4.96040945303652 417.391304347826 3.30693963535768 382.608695652174 0.661387927071535 139.130434782609 2.97624567182191 417.391304347826 0.330693963535768 173.913043478261 4.62971548950075 452.173913043478 4.96040945303652 34.7826086956522 4.29902152596498 486.956521739131 2.64555170828614 452.173913043478 1.98416378121461 34.7826086956522 3.96832756242921 521.739130434783 4.62971548950075 69.5652173913043 2.31485774475037 486.956521739131 4.29902152596498 104.347826086957 3.63763359889344 556.521739130435 1.65346981767884 69.5652173913043 1.98416378121461 521.739130434783 3.96832756242921 139.130434782609 1.32277585414307 104.347826086957 3.30693963535768 591.304347826087 3.63763359889344 173.913043478261 1.65346981767884 556.521739130435 0.992081890607303 139.130434782609 2.97624567182191 626.086956521739 3.30693963535768 208.695652173913 1.32277585414307 591.304347826087 2.64555170828614 660.869565217391 2.97624567182191 243.478260869565 0.661387927071535 173.913043478261 0.330693963535768 208.695652173913 0.992081890607303 626.086956521739 2.64555170828614 278.260869565217 2.31485774475037 695.652173913043 2.31485774475037 34.7826086956522 0.661387927071535 660.869565217391 2.31485774475037 313.04347826087 1.98416378121461 730.434782608696 1.98416378121461 69.5652173913043 1.65346981767884 765.217391304348 0.330693963535768 695.652173913043 1.98416378121461 347.826086956522 5.95249134364382 347.826086956522 1.65346981767884 104.347826086957 5.95249134364382 139.130434782609 1.65346981767884 382.608695652174 5.62179738010805 382.608695652174 5.62179738010805 173.913043478261 5.29110341657228 208.695652173913 5.29110341657228 417.391304347826 1.32277585414307 417.391304347826 1.32277585414307 139.130434782609 0.992081890607303 173.913043478261 4.96040945303652 452.173913043478 4.96040945303652 243.478260869565 0.661387927071535 208.695652173913 0.992081890607303 452.173913043478 0.330693963535768 243.478260869565 4.62971548950075 486.956521739131 4.62971548950075 278.260869565217 0.661387927071535 486.956521739131 4.29902152596498 313.04347826087 2.64555170828614 34.7826086956522 4.29902152596498 521.739130434783 3.96832756242921 347.826086956522 3.96832756242921 556.521739130435 0.330693963535768 521.739130434783 3.63763359889344 382.608695652174 2.31485774475037 69.5652173913043 3.63763359889344 591.304347826087 5.29110341657228 34.7826086956522 3.30693963535768 417.391304347826 1.98416378121461 104.347826086957 3.30693963535768 626.086956521739 2.97624567182191 452.173913043478 4.96040945303652 69.5652173913043 1.65346981767884 139.130434782609 2.97624567182191 660.869565217391 4.62971548950075 104.347826086957 2.64555170828614 486.956521739131 1.32277585414307 173.913043478261 2.64555170828614 695.652173913043 0.992081890607303 208.695652173913 2.31485774475037 521.739130434783 4.29902152596498 139.130434782609 2.31485774475037 730.434782608696 0.661387927071535 243.478260869565 3.96832756242921 173.913043478261 1.98416378121461 765.217391304348 1.98416378121461 556.521739130435 3.63763359889344 208.695652173913 0.330693963535768 278.260869565217 5.62179738010805 417.391304347826 1.65346981767884 591.304347826087 2.97624567182191 34.7826086956522 3.30693963535768 243.478260869565 2.97624567182191 278.260869565217 5.29110341657228 452.173913043478 1.32277585414307 626.086956521739 0.992081890607303 660.869565217391 4.96040945303652 486.956521739131 2.64555170828614 69.5652173913043 2.64555170828614 313.04347826087 2.31485774475037 104.347826086957 0.661387927071535 695.652173913043 4.62971548950075 521.739130434783 2.31485774475037 347.826086956522 1.98416378121461 139.130434782609 4.29902152596498 556.521739130435 0.330693963535768 730.434782608696 1.65346981767884 173.913043478261 1.98416378121461 382.608695652174 5.95249134364382 173.913043478261 3.96832756242921 591.304347826087 1.65346981767884 417.391304347826 5.62179738010805 208.695652173913 3.63763359889344 626.086956521739 1.32277585414307 208.695652173913 0.992081890607303 243.478260869565 5.29110341657228 243.478260869565 3.30693963535768 660.869565217391 1.32277585414307 452.173913043478 4.96040945303652 278.260869565217 0.661387927071535 278.260869565217 2.97624567182191 695.652173913043 0.992081890607303 486.956521739131 0.330693963535768 313.04347826087 4.62971548950075 313.04347826087 2.64555170828614 730.434782608696 0.661387927071535 521.739130434783 3.30693963535768 34.7826086956522 4.29902152596498 347.826086956522 2.31485774475037 765.217391304348 3.96832756242921 382.608695652174 5.62179738010805 452.173913043478 2.97624567182191 69.5652173913043 3.63763359889344 417.391304347826 0.330693963535768 556.521739130435 5.29110341657228 486.956521739131 5.62179738010805 34.7826086956522 2.64555170828614 104.347826086957 3.30693963535768 452.173913043478 2.31485774475037 139.130434782609 5.29110341657228 69.5652173913043 4.96040945303652 521.739130434783 2.97624567182191 486.956521739131 1.98416378121461 173.913043478261 4.96040945303652 104.347826086957 1.65346981767884 208.695652173913 2.64555170828614 521.739130434783 4.62971548950075 556.521739130435 4.29902152596498 591.304347826087 4.29902152596498 173.913043478261 1.32277585414307 243.478260869565 3.96832756242921 626.086956521739 3.96832756242921 208.695652173913 0.992081890607303 278.260869565217 3.63763359889344 660.869565217391 3.30693963535768 695.652173913043 1.65346981767884 626.086956521739 0.661387927071535 313.04347826087 0.330693963535768 347.826086956522 2.97624567182191 313.04347826087 2.97624567182191 730.434782608696 3.63763359889344 34.7826086956522 2.64555170828614 765.217391304348 0.992081890607303 695.652173913043 2.64555170828614 347.826086956522 5.95249134364382 452.173913043478 3.30693963535768 69.5652173913043 2.31485774475037 382.608695652174 5.62179738010805 486.956521739131 2.97624567182191 104.347826086957 0.330693963535768 765.217391304348 5.95249134364382 208.695652173913 5.29110341657228 521.739130434783 2.64555170828614 139.130434782609 1.65346981767884 452.173913043478 4.96040945303652 556.521739130435 2.31485774475037 173.913043478261 5.29110341657228 278.260869565217 1.98416378121461 208.695652173913 4.62971548950075 591.304347826087 4.29902152596498 626.086956521739 1.65346981767884 243.478260869565 4.96040945303652 313.04347826087 0.992081890607303 521.739130434783 3.96832756242921 660.869565217391 3.63763359889344 695.652173913043 0.992081890607303 313.04347826087 4.29902152596498 382.608695652174 3.96832756242921 417.391304347826 3.30693963535768 730.434782608696 2.97624567182191 765.217391304348 5.95249134364382 34.7826086956522 5.95249134364382 486.956521739131 5.62179738010805 521.739130434783 5.29110341657228 556.521739130435 2.97624567182191 521.739130434783 4.96040945303652 591.304347826087 4.62971548950075 626.086956521739 2.97624567182191 139.130434782609 4.29902152596498 660.869565217391 2.64555170828614 173.913043478261 3.96832756242921 695.652173913043 3.63763359889344 730.434782608696 3.30693963535768 765.217391304348 5.95249134364382 521.739130434783 5.29110341657228 591.304347826087 4.96040945303652 626.086956521739 121 122 123 124 125 126 127 128 129 130 96 131 127 132 128 130 133 121 134 135 136 130 131 133 130 97 96 134 137 138 130 98 97 134 138 135 139 132 127 140 141 125 139 142 132 143 144 145 139 146 142 143 147 144 140 148 141 143 145 110 140 125 124 149 150 137 149 151 150 152 153 146 154 155 147 156 157 148 158 159 153 158 153 152 160 161 155 160 155 154 162 163 159 164 165 157 166 167 151 162 168 163 164 169 165 170 123 171 170 171 161 172 167 166 170 161 160 172 173 167 174 175 176 174 176 168 172 177 173 178 121 123 174 168 162 164 157 156 179 130 121 180 51 169 179 98 130 179 121 178 181 182 177 180 69 70 179 99 98 183 79 184 180 70 71 179 100 99 183 185 182 180 71 72 186 187 175 180 72 51 183 182 181 183 184 185 183 80 79 188 110 74 183 81 80 188 143 110 188 147 143 189 190 2 188 154 147 189 191 192 189 192 190 193 187 186 193 194 187 195 64 65 195 65 66 196 160 154 197 198 191 195 66 67 199 200 194 201 170 160 201 160 196 202 203 198 204 205 206 207 178 123 202 198 197 208 209 40 207 123 170 204 206 200 210 14 15 207 170 201 208 40 41 210 15 16 210 16 17 211 212 203 213 179 178 211 214 212 213 100 179 211 203 202 213 101 100 215 216 205 217 154 188 218 17 18 217 196 154 218 18 19 219 220 214 221 222 209 217 188 74 221 209 208 221 223 222 224 225 216 218 210 17 224 216 215 224 226 225 227 201 196 228 220 219 228 229 220 230 231 232 233 14 210 230 232 223 234 207 201 234 201 227 235 236 237 238 231 230 238 239 231 240 103 102 241 242 226 238 243 239 240 213 178 235 237 229 244 19 20 240 178 207 244 20 21 240 101 213 240 207 234 240 102 101 245 246 236 247 217 74 245 236 235 248 242 241 248 249 242 250 251 243 245 252 246 248 253 249 247 196 217 247 227 196 244 218 19 254 251 250 255 233 210 254 256 251 255 210 218 257 136 252 258 234 227 259 104 103 259 105 104 259 240 234 260 261 256 259 103 240 262 134 136 259 234 258 263 264 253 260 265 261 262 136 257 263 266 264 260 256 254 267 73 266 268 247 74 268 227 247 268 258 227 269 14 233 270 21 22 271 106 105 272 265 260 270 22 23 271 107 106 272 124 126 273 134 262 271 105 259 273 137 134 272 126 265 273 149 137 271 259 258 274 275 276 277 108 107 277 109 108 278 140 124 270 244 21 277 74 109 274 129 275 277 268 74 274 276 13 277 107 271 277 258 268 277 271 258 279 166 151 280 127 129 281 148 140 282 218 244 281 156 148 279 151 149 281 140 278 282 255 218 282 244 270 283 255 282 284 139 127 284 127 280 285 146 139 283 269 233 286 172 166 283 233 255 287 177 172 285 152 146 287 181 177 288 14 269 285 139 284 287 172 286 289 164 156 290 81 183 290 82 81 291 158 152 290 83 82 292 23 24 293 180 169 293 164 289 290 183 181 294 191 189 294 189 2 295 158 291 292 270 23 294 12 11 295 159 158 294 2 12 294 197 191 295 162 159 293 169 164 296 195 67 297 162 295 298 7 6 296 69 180 296 67 68 298 202 197 296 68 69 297 174 162 299 282 270 300 283 282 301 211 202 302 186 175 301 202 298 302 175 174 303 64 195 304 211 301 303 62 63 300 282 299 303 63 64 305 193 186 306 269 283 304 219 214 304 214 211 307 194 193 306 288 269 308 14 288 308 50 14 307 199 194 309 228 219 307 193 305 310 208 41 310 41 42 310 42 43 311 228 309 312 200 199 313 292 24 313 24 25 312 199 307 313 25 26 311 235 229 312 204 200 311 229 228 314 235 311 315 221 208 314 245 235 316 204 312 317 221 315 316 215 205 317 230 223 316 205 204 318 257 252 318 245 314 317 223 221 319 292 313 318 252 245 319 270 292 320 224 215 319 299 270 321 230 317 321 238 230 322 300 299 323 262 257 324 243 238 324 250 243 325 224 320 326 283 300 325 226 224 324 238 321 326 306 283 325 241 226 327 273 262 327 262 323 328 254 250 326 300 322 329 248 241 330 273 327 331 254 328 331 260 254 332 288 306 332 308 288 330 279 149 330 149 273 333 50 308 334 263 253 334 253 248 335 272 260 334 248 329 336 166 279 336 286 166 337 26 27 337 27 28 338 266 263 338 267 266 339 124 272 339 278 124 337 313 26 340 287 286 341 319 313 342 287 340 342 84 83 343 73 267 344 281 278 342 83 290 342 181 287 342 290 181 345 7 298 345 8 7 345 9 8 345 10 9 346 299 319 345 11 10 347 274 13 345 294 11 348 281 344 345 197 294 347 129 274 348 156 281 346 319 341 345 298 197 347 280 129 349 3 1 349 4 3 349 5 4 349 6 5 346 322 299 349 298 6 349 301 298 350 284 280 351 285 284 348 289 156 352 304 301 353 293 289 354 326 322 352 301 349 351 284 350 355 306 326 356 219 304 357 291 152 357 152 285 356 304 352 355 326 354 355 332 306 357 285 351 358 333 308 359 296 180 356 309 219 358 308 332 360 50 333 361 311 309 362 295 291 359 180 293 359 293 353 363 195 296 363 303 195 364 297 295 364 295 362 365 28 29 365 29 30 366 311 361 367 174 297 366 314 311 367 302 174 368 318 314 369 62 303 370 186 302 365 337 28 368 314 366 370 305 186 371 337 365 370 302 367 371 341 313 372 318 368 371 313 337 372 257 318 373 310 43 372 323 257 374 307 305 373 43 44 373 44 45 375 346 341 376 327 323 377 307 374 378 208 310 377 312 307 379 346 375 380 327 376 378 310 373 380 330 327 379 322 346 379 354 322 378 315 208 381 317 315 382 316 312 383 355 354 384 330 380 384 336 279 384 279 330 385 358 332 385 355 383 386 215 316 387 321 317 386 320 215 387 317 381 388 286 336 385 332 355 388 340 286 389 360 333 390 324 321 391 342 340 392 325 320 390 321 387 391 84 342 389 333 358 391 85 84 391 86 85 393 250 324 394 50 360 395 1 111 393 328 250 395 111 112 395 112 113 393 324 390 395 113 114 396 241 325 396 329 241 395 349 1 395 352 349 396 325 392 397 30 31 398 331 328 397 31 32 399 331 398 400 356 352 399 335 260 400 352 395 397 365 30 399 260 331 401 334 329 402 334 401 403 309 356 403 361 309 404 371 365 405 335 399 405 339 272 403 356 400 405 272 335 402 263 334 402 338 263 406 371 404 407 267 338 406 341 371 407 343 267 408 366 361 409 344 278 406 375 341 409 339 405 410 379 375 409 278 339 411 366 408 411 368 366 412 73 343 413 354 379 414 348 344 413 383 354 415 13 2 416 372 368 415 347 13 415 280 347 415 350 280 416 368 411 413 379 410 417 289 348 417 353 289 418 351 350 419 372 416 417 348 414 419 376 323 419 323 372 420 385 383 421 358 385 421 389 358 422 357 351 423 380 376 422 351 418 424 359 353 421 385 420 425 357 422 426 360 389 427 384 380 425 291 357 425 362 291 428 363 296 427 380 423 428 359 424 428 296 359 426 394 360 429 50 394 429 52 50 429 53 52 430 364 362 431 336 384 431 388 336 431 384 427 432 369 303 432 303 363 433 32 33 434 364 430 433 33 34 434 367 297 435 340 388 434 297 364 435 86 391 435 391 340 435 87 86 435 88 87 436 367 434 437 114 115 433 397 32 438 365 397 436 370 367 437 395 114 437 400 395 439 374 305 438 397 433 438 404 365 439 305 370 440 62 369 441 400 437 442 45 46 442 46 47 443 406 404 441 403 400 444 377 374 442 373 45 445 375 406 446 373 442 447 403 441 446 378 373 445 410 375 447 408 361 448 377 444 447 361 403 448 382 312 449 413 410 448 312 377 450 378 446 450 315 378 450 381 315 451 420 383 452 382 448 453 411 408 452 386 316 142 387 381 452 316 382 451 413 449 454 416 411 451 383 413 454 411 453 455 387 142 456 421 420 457 419 416 138 392 320 455 390 387 457 416 454 138 320 386 458 393 390 459 426 389 458 390 455 459 421 456 459 389 421 460 419 457 460 423 376 163 328 393 460 376 419 150 396 392 163 393 458 163 398 328 461 427 423 462 401 329 463 429 394 462 329 396 463 394 426 462 396 150 176 399 398 464 53 429 464 54 53 465 405 399 464 55 54 466 427 461 465 399 176 464 56 55 466 431 427 173 402 401 467 433 34 467 34 35 467 35 36 468 431 466 468 88 435 468 435 388 468 89 88 469 338 402 468 90 89 469 407 338 468 388 431 470 409 405 471 115 116 471 116 117 471 117 118 471 118 119 472 438 433 469 402 173 473 414 344 471 437 115 185 343 407 185 412 343 474 441 437 473 344 409 475 438 472 476 73 412 476 75 73 476 76 75 206 417 414 475 404 438 476 77 76 475 443 404 477 418 350 478 441 474 479 443 475 478 447 441 479 445 406 479 406 443 477 415 2 477 350 415 480 424 353 192 422 418 481 408 447 480 417 206 481 447 478 480 353 417 482 449 410 481 453 408 482 410 445 483 425 422 484 451 449 485 454 453 483 422 192 486 457 454 486 454 485 487 451 484 225 428 424 487 456 420 488 362 425 489 428 225 488 430 362 487 420 451 490 457 486 488 425 483 489 363 428 490 460 457 489 432 363 212 434 430 249 369 432 491 460 490 141 459 456 491 423 460 492 459 141 493 434 212 493 436 434 491 461 423 249 440 369 264 62 440 492 426 459 494 439 370 492 463 426 494 370 436 165 57 56 165 58 57 495 466 461 496 466 495 496 90 468 496 91 90 496 468 466 165 429 463 496 92 91 237 439 494 165 464 429 165 56 464 237 444 374 497 47 48 498 437 471 497 48 49 498 119 120 237 374 439 497 49 13 222 36 37 498 120 110 222 37 38 498 471 119 497 442 47 498 474 437 275 446 442 499 478 474 246 448 444 222 467 36 128 450 446 128 446 275 232 472 433 500 481 478 501 452 448 501 448 246 232 433 467 500 478 499 132 142 381 132 450 128 132 381 450 135 138 386 239 475 472 502 453 481 502 485 453 135 452 501 146 455 142 502 481 500 135 386 452 503 486 485 504 475 239 504 479 475 137 392 138 153 455 146 153 458 455 137 150 392 505 486 503 505 490 486 159 458 153 506 482 445 506 479 504 506 445 479 159 163 458 507 491 490 151 462 150 507 490 505 261 449 482 261 484 449 168 398 163 168 176 398 508 495 461 508 461 491 167 462 151 508 491 507 167 401 462 126 487 484 175 465 176 509 496 495 167 173 401 187 465 175 509 92 496 125 141 456 509 93 92 509 94 93 177 469 173 187 405 465 125 487 126 510 498 110 125 456 487 187 470 405 510 474 498 182 407 469 510 499 474 182 185 407 182 469 177 194 470 187 194 409 470 144 500 499 194 473 409 184 77 476 184 78 77 148 492 141 184 79 78 184 412 185 184 476 412 200 414 473 157 165 463 190 418 477 200 206 414 157 463 492 511 502 500 200 473 194 157 492 148 511 500 144 512 502 511 190 477 2 190 192 418 512 503 485 205 480 206 512 485 502 169 59 58 169 60 59 191 483 192 169 61 60 169 51 61 171 505 503 169 58 165 209 222 38 198 488 483 216 480 205 198 483 191 216 424 480 122 505 171 122 507 505 216 225 424 209 38 39 209 39 40 203 488 198 133 507 122 203 430 488 133 508 507 203 212 430 226 489 225 223 467 222 131 509 495 131 495 508 214 493 212 131 508 133 223 232 467 131 94 509 131 95 94 231 239 472 131 96 95 242 249 432 220 493 214 220 494 436 242 489 226 242 432 489 145 510 110 145 499 510 231 472 232 145 144 499 220 436 493 253 440 249 229 237 494 253 264 440 243 504 239 147 511 144 229 494 220 155 512 511 155 511 147 266 62 264 236 444 237 251 506 504 266 73 62 251 504 243 236 246 444 161 503 512 256 482 506 256 261 482 161 512 155 276 275 442 161 171 503 252 501 246 276 442 497 256 506 251 276 497 13 123 122 171 265 484 261 129 128 275 265 126 484 136 501 252 121 133 122 136 135 501 
+379 587 1 0.681934829863914
+190 20 445.825756949558 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 190 -20 354.174243050442 170 -1.22460635382238e-14 350 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 100 -1.83690953073357e-14 350 86.6025403784438 -50 400 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 86.6025403784439 50 400 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -1.83690953073357e-14 350 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 170 -1.22460635382238e-14 350 190 20 354.174243050442 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 210 -8.57224447675664e-15 350 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 300 -1.22460635382238e-14 350 300 -1.22460635382238e-14 350 300 8.68240888334652 350.75961234939 300 17.1010071662834 353.015368960705 300 25 356.698729810778 300 32.139380484327 361.697777844051 300 38.3022221559489 367.860619515673 300 43.3012701892219 375 300 46.9846310392954 382.898992833717 300 49.2403876506104 391.317591116653 300 50 400 300 49.2403876506104 408.682408883347 300 46.9846310392954 417.101007166283 300 43.3012701892219 425 300 38.3022221559489 432.139380484327 300 32.139380484327 438.302222155949 300 25 443.301270189222 300 17.1010071662835 446.984631039295 300 8.68240888334658 449.24038765061 300 7.27364132466213e-14 450 300 -8.68240888334644 449.24038765061 300 -17.1010071662833 446.984631039295 300 -24.9999999999999 443.301270189222 300 -32.1393804843269 438.302222155949 300 -38.3022221559488 432.139380484327 300 -43.3012701892219 425 300 -46.9846310392954 417.101007166284 300 -49.2403876506104 408.682408883347 300 -50 400 300 -49.2403876506104 391.317591116654 300 -46.9846310392955 382.898992833717 300 -43.301270189222 375 300 -38.302222155949 367.860619515673 300 -32.1393804843271 361.697777844051 300 -25.0000000000002 356.698729810778 300 -17.1010071662836 353.015368960705 300 -8.68240888334674 350.75961234939 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 119.43291878176 45.7886663327529 420.084771232648 135.848107983418 49.8292246503335 404.128967273617 119.43291878176 49.8292246503335 404.128967273617 185.093675588393 -45.7886663327528 420.084771232649 201.508864790051 -36.7861955336566 433.864078581287 185.093675588393 -36.7861955336566 433.864078581287 103.017729580102 45.7886663327529 420.084771232648 267.169621596684 30.7106356344834 360.54297453018 267.169621596684 16.2349734602341 352.709137914968 250.754432395026 16.2349734602341 352.709137914968 250.754432395026 30.7106356344834 360.54297453018 168.678486386735 -45.7886663327528 420.084771232649 152.263297185077 -49.8292246503335 404.128967273617 152.263297185077 -45.7886663327528 420.084771232649 234.339243193367 41.8583239131264 372.652592093879 217.924053991709 30.7106356344834 360.54297453018 217.924053991709 41.8583239131264 372.652592093879 135.848107983418 -49.8292246503335 404.128967273617 234.339243193367 30.7106356344834 360.54297453018 201.508864790051 48.4700132969665 387.72572564296 201.508864790051 41.8583239131264 372.652592093879 119.43291878176 -48.4700132969665 387.72572564296 103.017729580102 -49.8292246503335 404.128967273617 103.017729580102 -48.4700132969665 387.72572564296 119.43291878176 -49.8292246503335 404.128967273617 185.093675588393 48.4700132969665 387.72572564296 267.169621596684 -23.7973696518536 443.973687560324 250.754432395026 -8.22972951403665 449.318065170136 250.754432395026 -23.7973696518536 443.973687560324 267.169621596684 -8.22972951403665 449.318065170136 168.678486386735 49.8292246503335 404.128967273617 168.678486386735 48.4700132969665 387.72572564296 152.263297185077 48.4700132969665 387.72572564296 234.339243193367 -36.7861955336566 433.864078581287 234.339243193367 -23.7973696518536 443.973687560324 217.924053991709 -36.7861955336566 433.864078581287 152.263297185077 49.8292246503335 404.128967273617 201.508864790051 -45.7886663327528 420.084771232649 135.848107983418 45.7886663327529 420.084771232648 103.017729580102 36.7861955336566 433.864078581287 168.678486386735 -49.8292246503335 404.128967273617 283.584810798342 30.7106356344834 360.54297453018 283.584810798342 16.2349734602341 352.709137914968 250.754432395026 41.8583239131264 372.652592093879 135.848107983418 -48.4700132969665 387.72572564296 217.924053991709 48.4700132969665 387.72572564296 103.017729580102 -41.8583239131265 372.652592093879 283.584810798342 -23.7973696518536 443.973687560324 283.584810798342 -8.22972951403665 449.318065170136 185.093675588393 49.8292246503335 404.128967273617 250.754432395026 -36.7861955336566 433.864078581287 217.924053991709 -45.7886663327528 420.084771232649 152.263297185077 45.7886663327529 420.084771232648 185.093675588393 -49.8292246503335 404.128967273617 119.43291878176 36.7861955336566 433.864078581287 152.263297185077 -48.4700132969665 387.72572564296 267.169621596684 41.8583239131264 372.652592093879 234.339243193367 48.4700132969665 387.72572564296 119.43291878176 -41.8583239131265 372.652592093879 201.508864790051 49.8292246503335 404.128967273617 267.169621596684 -36.7861955336566 433.864078581287 234.339243193367 -45.7886663327528 420.084771232649 168.678486386735 45.7886663327529 420.084771232648 201.508864790051 -49.8292246503335 404.128967273617 135.848107983418 36.7861955336566 433.864078581287 168.678486386735 -48.4700132969665 387.72572564296 103.017729580102 23.7973696518537 443.973687560324 283.584810798342 41.8583239131264 372.652592093879 135.848107983418 -41.8583239131265 372.652592093879 250.754432395026 48.4700132969665 387.72572564296 103.017729580102 -30.7106356344834 360.54297453018 283.584810798342 -36.7861955336566 433.864078581287 217.924053991709 49.8292246503335 404.128967273617 250.754432395026 -45.7886663327528 420.084771232649 185.093675588393 45.7886663327529 420.084771232648 217.924053991709 -49.8292246503335 404.128967273617 152.263297185077 36.7861955336566 433.864078581287 185.093675588393 -48.4700132969665 387.72572564296 119.43291878176 23.7973696518537 443.973687560324 152.263297185077 -41.8583239131265 372.652592093879 267.169621596684 48.4700132969665 387.72572564296 119.43291878176 -30.7106356344834 360.54297453018 234.339243193367 49.8292246503335 404.128967273617 201.508864790051 45.7886663327529 420.084771232648 267.169621596684 -45.7886663327528 420.084771232649 234.339243193367 -49.8292246503335 404.128967273617 201.508864790051 -48.4700132969665 387.72572564296 168.678486386735 36.7861955336566 433.864078581287 168.678486386735 -41.8583239131265 372.652592093879 135.848107983418 23.7973696518537 443.973687560324 135.848107983418 -30.7106356344834 360.54297453018 103.017729580102 8.22972951403675 449.318065170136 283.584810798342 48.4700132969665 387.72572564296 250.754432395026 49.8292246503335 404.128967273617 103.017729580102 -16.2349734602342 352.709137914968 283.584810798342 -45.7886663327528 420.084771232649 217.924053991709 45.7886663327529 420.084771232648 250.754432395026 -49.8292246503335 404.128967273617 185.093675588393 36.7861955336566 433.864078581287 217.924053991709 -48.4700132969665 387.72572564296 152.263297185077 23.7973696518537 443.973687560324 185.093675588393 -41.8583239131265 372.652592093879 119.43291878176 8.22972951403675 449.318065170136 152.263297185077 -30.7106356344834 360.54297453018 267.169621596684 49.8292246503335 404.128967273617 119.43291878176 -16.2349734602342 352.709137914968 234.339243193367 45.7886663327529 420.084771232648 267.169621596684 -49.8292246503335 404.128967273617 201.508864790051 36.7861955336566 433.864078581287 234.339243193367 -48.4700132969665 387.72572564296 168.678486386735 23.7973696518537 443.973687560324 201.508864790051 -41.8583239131265 372.652592093879 168.678486386735 -30.7106356344834 360.54297453018 135.848107983418 8.22972951403675 449.318065170136 103.017729580102 -8.22972951403665 449.318065170136 135.848107983418 -16.2349734602342 352.709137914968 283.584810798342 49.8292246503335 404.128967273617 250.754432395026 45.7886663327529 420.084771232648 283.584810798342 -49.8292246503335 404.128967273617 250.754432395026 -48.4700132969665 387.72572564296 217.924053991709 36.7861955336566 433.864078581287 217.924053991709 -41.8583239131265 372.652592093879 185.093675588393 23.7973696518537 443.973687560324 185.093675588393 -30.7106356344834 360.54297453018 152.263297185077 8.22972951403675 449.318065170136 152.263297185077 -16.2349734602342 352.709137914968 119.43291878176 -8.22972951403665 449.318065170136 267.169621596684 -48.4700132969665 387.72572564296 267.169621596684 45.7886663327529 420.084771232648 234.339243193367 -41.8583239131265 372.652592093879 234.339243193367 36.7861955336566 433.864078581287 201.508864790051 -30.7106356344834 360.54297453018 201.508864790051 23.7973696518537 443.973687560324 168.678486386735 -16.2349734602342 352.709137914968 168.678486386735 8.22972951403675 449.318065170136 283.584810798342 -48.4700132969665 387.72572564296 250.754432395026 -41.8583239131265 372.652592093879 135.848107983418 -8.22972951403665 449.318065170136 217.924053991709 -30.7106356344834 360.54297453018 103.017729580102 -23.7973696518536 443.973687560324 283.584810798342 45.7886663327529 420.084771232648 267.169621596684 -41.8583239131265 372.652592093879 250.754432395026 36.7861955336566 433.864078581287 217.924053991709 23.7973696518537 443.973687560324 234.339243193367 -30.7106356344834 360.54297453018 283.584810798342 -41.8583239131265 372.652592093879 103.017729580102 16.2349734602341 352.709137914968 152.263297185077 -8.22972951403665 449.318065170136 119.43291878176 16.2349734602341 352.709137914968 250.754432395026 -30.7106356344834 360.54297453018 217.924053991709 -16.2349734602342 352.709137914968 119.43291878176 -23.7973696518536 443.973687560324 135.848107983418 16.2349734602341 352.709137914968 267.169621596684 36.7861955336566 433.864078581287 267.169621596684 -30.7106356344834 360.54297453018 234.339243193367 -16.2349734602342 352.709137914968 234.339243193367 23.7973696518537 443.973687560324 103.017729580102 30.7106356344834 360.54297453018 152.263297185077 16.2349734602341 352.709137914968 168.678486386735 -8.22972951403665 449.318065170136 283.584810798342 -30.7106356344834 360.54297453018 135.848107983418 -23.7973696518536 443.973687560324 250.754432395026 -16.2349734602342 352.709137914968 119.43291878176 30.7106356344834 360.54297453018 267.169621596684 -16.2349734602342 352.709137914968 103.017729580102 -36.7861955336566 433.864078581287 168.678486386735 16.2349734602341 352.709137914968 283.584810798342 -16.2349734602342 352.709137914968 283.584810798342 36.7861955336566 433.864078581287 250.754432395026 23.7973696518537 443.973687560324 135.848107983418 30.7106356344834 360.54297453018 217.924053991709 8.22972951403675 449.318065170136 103.017729580102 41.8583239131264 372.652592093879 152.263297185077 -23.7973696518536 443.973687560324 152.263297185077 30.7106356344834 360.54297453018 119.43291878176 -36.7861955336566 433.864078581287 267.169621596684 23.7973696518537 443.973687560324 119.43291878176 41.8583239131264 372.652592093879 168.678486386735 30.7106356344834 360.54297453018 234.339243193367 8.22972951403675 449.318065170136 168.678486386735 -23.7973696518536 443.973687560324 135.848107983418 41.8583239131264 372.652592093879 135.848107983418 -36.7861955336566 433.864078581287 103.017729580102 48.4700132969665 387.72572564296 103.017729580102 -45.7886663327528 420.084771232649 217.924053991709 16.2349734602341 352.709137914968 283.584810798342 23.7973696518537 443.973687560324 250.754432395026 8.22972951403675 449.318065170136 185.093675588393 30.7106356344834 360.54297453018 217.924053991709 -8.22972951403665 449.318065170136 185.093675588393 -23.7973696518536 443.973687560324 152.263297185077 41.8583239131264 372.652592093879 119.43291878176 48.4700132969665 387.72572564296 152.263297185077 -36.7861955336566 433.864078581287 234.339243193367 16.2349734602341 352.709137914968 119.43291878176 -45.7886663327528 420.084771232649 201.508864790051 30.7106356344834 360.54297453018 267.169621596684 8.22972951403675 449.318065170136 168.678486386735 41.8583239131264 372.652592093879 234.339243193367 -8.22972951403665 449.318065170136 201.508864790051 -23.7973696518536 443.973687560324 135.848107983418 48.4700132969665 387.72572564296 168.678486386735 -36.7861955336566 433.864078581287 103.017729580102 49.8292246503335 404.128967273617 135.848107983418 -45.7886663327528 420.084771232649 283.584810798342 8.22972951403675 449.318065170136 185.093675588393 41.8583239131264 372.652592093879 217.924053991709 -23.7973696518536 443.973687560324 2.73007580752231 190 3.14159265358979 210 2.73492819040754 187.024366020417 2.7474837119525 184.397529800585 2.77062611730711 181.546913604686 2.80448459564326 178.752969008674 2.84452135903044 176.369667096977 2.89092500251957 174.309971315007 2.94492999675158 172.548649956894 3.00237927612647 171.242034340645 3.06388091972185 170.380301086729 3.122373502916 170.023096521915 3.17866510933174 170.086043866562 3.23145479350909 170.509841698291 3.28906434405541 171.398299667707 3.34521005871398 172.743857915231 3.39324766316843 174.347888840505 3.43516921781859 176.192341023654 3.47191925165955 178.295746540249 3.50290053040403 180.640667676887 3.52729664313396 183.205669615023 3.54456948047501 186.059267040101 3.55262000752568 189.05297923185 3.5511452401824 191.895773051283 3.54202385575198 194.48438891673 3.52281744034578 197.343898776281 3.49366089659563 200.13477025801 3.45876817080794 202.522803249016 3.41850512342417 204.599616537762 3.37227391533675 206.410620564223 3.31908716723907 207.946109646233 3.26136014184309 209.086918743382 3.20502207417703 209.747291812357 3.08481357338775 209.797702468142 3.03041585385138 209.215264429107 2.97982054446045 208.306916927762 2.92244240721551 206.788174560315 2.86816612733564 204.754879178687 2.82577961636135 202.602997991452 2.78967029998251 200.14641042884 2.76054039635132 197.364149940715 2.74008093006067 194.262428648985 2.73264036238492 192.165572916192 5.8716684611121 190 6.28318530717959 170 5.87598882340341 187.19152395552 5.88833055967778 184.516885484041 5.9074527029433 182.039994698179 5.93949613715545 179.223163623154 5.98174936926212 176.597079044967 6.0263279675771 174.551494560294 6.07702721219688 172.81733759401 6.1341410212019 171.42920242427 6.19745940274944 170.463556231093 6.23973611320879 170.118264986057 6.28318530717959 100 4.71238898038469 86.6025403784438 4.84988302442822 86.8732667031317 4.9824100965315 87.6235772593243 5.10887970344934 88.7290516622296 5.26433924207639 90.4840004397121 5.43814296926353 92.7428861391894 5.61159756603283 95.0372320329239 5.77244529009577 96.9671604229308 5.92510064538493 98.4525657430886 6.08684189351647 99.5231396908821 6.1841064433386 99.8776181649079 3.14159265358979 100 4.57489493634131 86.8732667031312 4.44236786423814 87.6235772593223 4.31589825732044 88.7290516622257 4.16043871869357 90.484000439705 3.98663499150652 92.7428861391805 3.81318039473733 95.0372320329138 3.65233267034643 96.9671604293251 3.49967731603553 98.4525657314274 3.33793606869753 99.5231396846886 3.24067151591787 99.877618163893 1.5707963267949 86.6025403784439 2.98604321659331 99.6995349038218 2.836168301898 98.8632990204774 2.69385026307151 97.6290200022515 2.55873212415881 96.1384934421685 2.39426299109247 94.0482819113587 2.22181558536708 91.7501087080715 2.06401881848322 89.779880280166 1.89843078523084 88.0845894011336 1.74034205381637 87.0125187464446 1.65639307408664 86.7079714631655 -8.88178419700125e-16 100 0.155549038831779 99.6995364250708 0.30542359275373 98.8633045221148 0.44774130960487 97.6290308111529 0.582859155090544 96.1385098653288 0.747328095775065 94.0483026744097 0.919775053556721 91.7501351704929 1.07757133347658 89.7799093309045 1.24315877151204 88.0846161813635 1.40124690335627 87.0125364098992 1.48519768772147 86.7079761092912 1.84889274661175e-32 170 0.411516846067488 190 0.0568023201262033 170.202464309206 0.111190443861577 170.784931061703 0.161833030143797 171.694405902748 0.219229844709802 173.214340920064 0.273495595887875 175.24816387627 0.315887495176125 177.401364011892 0.351975748365346 179.857848980619 0.381067644864545 182.637652604668 0.40150997985239 185.737201868648 0.408952371081965 187.834463425865 1.84889274661175e-32 210 0.0568023199990197 209.797535684556 0.111190444137581 209.215068935606 0.16183302951732 208.305594113848 0.219229843519676 206.785659117562 0.273495594881989 204.751836168062 0.315887494328895 202.598636037752 0.351975747677605 200.142151074243 0.381067644351949 197.362347455423 0.40150997954739 194.262798195698 0.408952371002272 192.165536607703 1.84889274661175e-32 300 6.28318530717959 300 0.174532925199433 300 0.349065850398866 300 0.523598775598299 300 0.698131700797732 300 0.872664625997165 300 1.0471975511966 300 1.22173047639603 300 1.39626340159546 300 1.5707963267949 300 1.74532925199433 300 1.91986217719376 300 2.0943951023932 300 2.26892802759263 300 2.44346095279206 300 2.61799387799149 300 2.79252680319093 300 2.96705972839036 300 3.14159265358979 300 3.31612557878922 300 3.49065850398866 300 3.66519142918809 300 3.83972435438752 300 4.01425727958696 300 4.18879020478639 300 4.36332312998582 300 4.53785605518525 300 4.71238898038469 300 4.88692190558412 300 5.06145483078355 300 5.23598775598299 300 5.41052068118242 300 5.58505360638185 300 5.75958653158128 300 5.93411945678072 300 6.10865238198015 300 6.28318530717959 210 5.87598882339807 192.808476042752 5.88833055965779 195.483114512722 5.90745270290179 197.960005297371 5.93949613708999 200.776836372029 5.98174936915421 203.402920949326 6.0263279674235 205.448505433598 6.07702721198942 207.182662399942 6.13414102093299 208.570797574629 6.19745940304688 209.536443767991 6.23973611264938 209.881735017624 1.98416378121461 119.43291878176 1.65346981767884 135.848107983418 1.65346981767884 119.43291878176 4.29902152596498 185.093675588393 3.96832756242921 201.508864790051 3.96832756242921 185.093675588393 1.98416378121461 103.017729580102 0.661387927071534 267.169621596684 0.330693963535767 267.169621596684 0.330693963535767 250.754432395026 0.661387927071534 250.754432395026 4.29902152596498 168.678486386735 4.62971548950075 152.263297185077 4.29902152596498 152.263297185077 0.992081890607302 234.339243193367 0.661387927071534 217.924053991709 0.992081890607302 217.924053991709 4.62971548950075 135.848107983418 0.661387927071534 234.339243193367 1.32277585414307 201.508864790051 0.992081890607302 201.508864790051 4.96040945303651 119.43291878176 4.62971548950075 103.017729580102 4.96040945303651 103.017729580102 4.62971548950075 119.43291878176 1.32277585414307 185.093675588393 3.63763359889344 267.169621596684 3.30693963535768 250.754432395026 3.63763359889344 250.754432395026 3.30693963535768 267.169621596684 1.65346981767884 168.678486386735 1.32277585414307 168.678486386735 1.32277585414307 152.263297185077 3.96832756242921 234.339243193367 3.63763359889344 234.339243193367 3.96832756242921 217.924053991709 1.65346981767884 152.263297185077 4.29902152596498 201.508864790051 1.98416378121461 135.848107983418 2.31485774475037 103.017729580102 4.62971548950075 168.678486386735 0.661387927071534 283.584810798342 0.330693963535767 283.584810798342 0.992081890607302 250.754432395026 4.96040945303651 135.848107983418 1.32277585414307 217.924053991709 5.29110341657228 103.017729580102 3.63763359889344 283.584810798342 3.30693963535768 283.584810798342 1.65346981767884 185.093675588393 3.96832756242921 250.754432395026 4.29902152596498 217.924053991709 1.98416378121461 152.263297185077 4.62971548950075 185.093675588393 2.31485774475037 119.43291878176 4.96040945303651 152.263297185077 0.992081890607302 267.169621596684 1.32277585414307 234.339243193367 5.29110341657228 119.43291878176 1.65346981767884 201.508864790051 3.96832756242921 267.169621596684 4.29902152596498 234.339243193367 1.98416378121461 168.678486386735 4.62971548950075 201.508864790051 2.31485774475037 135.848107983418 4.96040945303651 168.678486386735 2.64555170828614 103.017729580102 0.992081890607302 283.584810798342 5.29110341657228 135.848107983418 1.32277585414307 250.754432395026 5.62179738010805 103.017729580102 3.96832756242921 283.584810798342 1.65346981767884 217.924053991709 4.29902152596498 250.754432395026 1.98416378121461 185.093675588393 4.62971548950075 217.924053991709 2.31485774475037 152.263297185077 4.96040945303651 185.093675588393 2.64555170828614 119.43291878176 5.29110341657228 152.263297185077 1.32277585414307 267.169621596684 5.62179738010805 119.43291878176 1.65346981767884 234.339243193367 1.98416378121461 201.508864790051 4.29902152596498 267.169621596684 4.62971548950075 234.339243193367 4.96040945303651 201.508864790051 2.31485774475037 168.678486386735 5.29110341657228 168.678486386735 2.64555170828614 135.848107983418 5.62179738010805 135.848107983418 2.97624567182191 103.017729580102 1.32277585414307 283.584810798342 1.65346981767884 250.754432395026 5.95249134364382 103.017729580102 4.29902152596498 283.584810798342 1.98416378121461 217.924053991709 4.62971548950075 250.754432395026 2.31485774475037 185.093675588393 4.96040945303651 217.924053991709 2.64555170828614 152.263297185077 5.29110341657228 185.093675588393 2.97624567182191 119.43291878176 5.62179738010805 152.263297185077 1.65346981767884 267.169621596684 5.95249134364382 119.43291878176 1.98416378121461 234.339243193367 4.62971548950075 267.169621596684 2.31485774475037 201.508864790051 4.96040945303651 234.339243193367 2.64555170828614 168.678486386735 5.29110341657228 201.508864790051 5.62179738010805 168.678486386735 2.97624567182191 135.848107983418 3.30693963535768 103.017729580102 5.95249134364382 135.848107983418 1.65346981767884 283.584810798342 1.98416378121461 250.754432395026 4.62971548950075 283.584810798342 4.96040945303651 250.754432395026 2.31485774475037 217.924053991709 5.29110341657228 217.924053991709 2.64555170828614 185.093675588393 5.62179738010805 185.093675588393 2.97624567182191 152.263297185077 5.95249134364382 152.263297185077 3.30693963535768 119.43291878176 4.96040945303651 267.169621596684 1.98416378121461 267.169621596684 5.29110341657228 234.339243193367 2.31485774475037 234.339243193367 5.62179738010805 201.508864790051 2.64555170828614 201.508864790051 5.95249134364382 168.678486386735 2.97624567182191 168.678486386735 4.96040945303651 283.584810798342 5.29110341657228 250.754432395026 3.30693963535768 135.848107983418 5.62179738010805 217.924053991709 3.63763359889344 103.017729580102 1.98416378121461 283.584810798342 5.29110341657228 267.169621596684 2.31485774475037 250.754432395026 2.64555170828614 217.924053991709 5.62179738010805 234.339243193367 5.29110341657228 283.584810798342 0.330693963535767 103.017729580102 3.30693963535768 152.263297185077 0.330693963535767 119.43291878176 5.62179738010805 250.754432395026 5.95249134364382 217.924053991709 3.63763359889344 119.43291878176 0.330693963535767 135.848107983418 2.31485774475037 267.169621596684 5.62179738010805 267.169621596684 5.95249134364382 234.339243193367 2.64555170828614 234.339243193367 0.661387927071534 103.017729580102 0.330693963535767 152.263297185077 3.30693963535768 168.678486386735 5.62179738010805 283.584810798342 3.63763359889344 135.848107983418 5.95249134364382 250.754432395026 0.661387927071534 119.43291878176 5.95249134364382 267.169621596684 3.96832756242921 103.017729580102 0.330693963535767 168.678486386735 5.95249134364382 283.584810798342 2.31485774475037 283.584810798342 2.64555170828614 250.754432395026 0.661387927071534 135.848107983418 2.97624567182191 217.924053991709 0.992081890607302 103.017729580102 3.63763359889344 152.263297185077 0.661387927071534 152.263297185077 3.96832756242921 119.43291878176 2.64555170828614 267.169621596684 0.992081890607302 119.43291878176 0.661387927071534 168.678486386735 2.97624567182191 234.339243193367 3.63763359889344 168.678486386735 0.992081890607302 135.848107983418 3.96832756242921 135.848107983418 1.32277585414307 103.017729580102 4.29902152596498 103.017729580102 0.330693963535767 217.924053991709 2.64555170828614 283.584810798342 2.97624567182191 250.754432395026 0.661387927071534 185.093675588393 3.30693963535768 217.924053991709 3.63763359889344 185.093675588393 0.992081890607302 152.263297185077 1.32277585414307 119.43291878176 3.96832756242921 152.263297185077 0.330693963535767 234.339243193367 4.29902152596498 119.43291878176 0.661387927071534 201.508864790051 2.97624567182191 267.169621596684 0.992081890607302 168.678486386735 3.30693963535768 234.339243193367 3.63763359889344 201.508864790051 1.32277585414307 135.848107983418 3.96832756242921 168.678486386735 1.65346981767884 103.017729580102 4.29902152596498 135.848107983418 2.97624567182191 283.584810798342 0.992081890607302 185.093675588393 3.63763359889344 217.924053991709 172 173 174 175 176 177 172 174 178 179 180 181 179 181 182 175 177 183 184 183 185 186 187 188 184 185 189 186 190 187 191 188 192 193 194 195 193 196 194 191 192 197 198 199 200 198 201 199 202 203 204 205 200 206 205 206 207 202 204 208 209 176 175 209 207 176 210 173 172 210 208 173 211 178 85 212 183 184 211 84 83 211 85 84 213 129 128 213 130 129 212 175 183 213 180 179 213 128 214 213 214 180 215 182 190 216 196 193 216 189 196 215 190 186 217 186 188 218 60 61 218 61 62 218 195 60 218 193 195 219 146 145 217 188 191 219 147 146 219 220 201 219 145 220 221 203 202 219 201 198 221 197 203 222 198 200 222 200 205 223 207 209 224 202 208 223 205 207 224 208 210 225 209 175 226 211 83 226 172 178 226 178 211 225 175 212 227 184 189 227 189 216 228 182 215 228 179 182 229 186 217 229 215 186 230 216 193 231 197 221 230 193 218 232 219 198 231 191 197 232 198 222 233 222 205 233 205 223 234 221 202 234 202 224 235 223 209 235 209 225 236 210 172 236 172 226 237 212 184 238 82 81 238 83 82 239 179 228 237 184 227 239 131 130 239 132 131 240 227 216 239 213 179 239 130 213 241 228 215 240 216 230 242 218 62 241 215 229 242 230 218 242 62 63 242 63 64 243 219 232 243 148 147 243 149 148 243 147 219 244 217 191 244 191 231 245 232 222 246 221 234 246 231 221 245 222 233 247 233 223 247 223 235 248 210 236 248 224 210 249 212 237 250 226 83 250 238 81 250 236 226 249 225 212 250 83 238 251 227 240 251 237 227 252 228 241 252 239 228 253 242 64 254 229 217 253 240 230 253 230 242 254 217 244 255 231 246 256 243 232 256 232 245 257 233 247 255 244 231 257 245 233 258 235 225 259 224 248 259 234 224 258 225 249 260 237 251 261 236 250 261 248 236 260 249 237 262 251 240 263 80 68 263 81 80 264 132 239 264 133 132 264 134 133 264 239 252 262 240 253 265 241 229 266 64 65 266 65 66 265 229 254 267 150 149 268 244 255 267 151 150 267 243 256 267 149 243 269 256 245 269 245 257 268 254 244 270 246 234 270 234 259 271 235 258 272 8 7 271 247 235 272 259 248 273 258 249 272 248 261 273 249 260 274 250 81 275 251 262 274 263 68 274 261 250 274 81 263 276 252 241 275 260 251 276 241 265 277 253 64 277 64 266 277 266 66 277 66 67 278 254 268 279 267 256 278 265 254 280 255 246 279 256 269 281 247 271 281 257 247 280 246 270 282 6 5 283 271 258 282 7 6 283 258 273 282 270 259 282 259 272 282 272 7 284 273 260 284 260 275 284 48 47 285 261 274 285 272 261 286 77 76 286 78 77 287 45 55 288 135 134 287 253 277 287 56 45 288 134 264 288 264 252 287 67 56 288 252 276 287 277 67 287 262 253 289 276 265 290 151 267 290 267 279 290 152 151 289 265 278 291 269 257 292 268 255 291 257 281 293 271 283 292 255 280 294 3 1 293 281 271 294 4 3 294 5 4 294 282 5 294 1 43 294 280 270 295 46 44 294 270 282 295 47 46 295 273 284 295 284 47 296 12 11 295 283 273 296 8 272 296 272 285 297 53 52 297 54 53 297 55 54 297 275 262 298 274 68 297 287 55 297 262 287 298 68 78 298 285 274 298 286 76 298 78 286 299 279 269 300 276 289 299 269 291 301 281 293 300 288 276 302 268 292 301 291 281 303 44 162 303 162 163 303 163 164 302 278 268 303 293 283 303 295 44 304 41 40 303 283 295 304 42 41 304 43 42 305 284 275 304 292 280 305 49 48 304 280 294 305 50 49 305 51 50 304 294 43 305 52 51 306 9 8 305 297 52 306 10 9 305 48 284 306 11 10 305 275 297 306 8 296 307 153 152 306 296 11 307 154 153 307 279 299 307 290 279 307 152 290 308 299 291 308 291 301 309 296 285 309 285 298 310 293 303 310 301 293 311 75 74 311 76 75 312 288 300 312 135 288 312 136 135 312 137 136 310 303 164 313 307 299 314 278 302 313 299 308 314 289 278 315 292 304 316 301 310 315 39 38 316 308 301 315 40 39 317 307 313 315 302 292 317 154 307 315 304 40 318 91 92 317 155 154 319 13 12 318 92 93 317 156 155 319 14 13 319 296 309 320 91 318 321 308 316 320 318 93 319 12 296 321 313 308 320 90 91 322 164 165 323 76 311 322 165 166 323 311 74 322 166 167 322 167 168 324 103 101 322 168 169 323 298 76 322 310 164 325 289 314 326 313 321 326 317 313 325 300 289 324 90 320 324 101 90 327 322 169 328 302 315 327 310 322 329 93 94 329 94 95 327 169 170 328 314 302 330 104 103 327 170 171 331 15 14 330 105 104 327 171 161 331 16 15 330 106 105 327 316 310 331 17 16 332 156 317 331 319 17 331 14 319 332 157 156 332 158 157 333 309 298 332 317 326 330 103 324 334 327 161 333 298 323 335 320 93 334 316 327 334 161 125 335 93 329 334 321 316 336 326 321 336 334 125 337 73 72 337 74 73 338 107 106 336 321 334 338 108 107 339 332 326 338 109 108 339 326 336 340 137 312 338 110 109 339 158 332 339 336 125 340 138 137 338 106 330 339 159 158 340 300 325 339 160 159 340 139 138 339 125 160 340 312 300 341 325 314 342 324 320 342 320 335 341 314 328 343 328 315 343 315 38 343 34 2 343 35 34 343 36 35 343 37 36 343 38 37 344 329 95 344 95 96 345 319 309 344 96 97 345 18 17 346 330 324 345 17 319 345 309 333 346 324 342 347 333 323 347 74 337 347 323 74 348 340 325 349 329 344 349 335 329 350 111 110 348 325 341 351 328 343 351 343 2 351 341 328 350 330 346 350 338 330 350 110 338 352 18 345 352 19 18 353 335 349 352 20 19 352 21 20 353 342 335 354 333 347 355 344 97 355 349 344 354 345 333 355 97 98 355 98 99 356 337 72 355 99 100 357 116 117 357 117 118 356 71 70 357 118 119 356 72 71 357 119 120 356 347 337 357 120 121 358 140 139 358 141 140 358 139 340 358 340 348 359 341 351 360 112 111 360 102 112 359 348 341 360 123 102 360 111 350 361 30 29 361 31 30 361 32 31 361 33 32 361 2 33 362 22 21 363 346 342 362 23 22 362 24 23 362 21 352 363 342 353 364 349 355 364 353 349 365 345 354 366 113 114 366 114 115 366 115 116 365 352 345 367 347 356 367 354 347 366 116 357 368 121 122 368 122 123 368 123 360 369 358 348 369 348 359 370 346 363 371 351 2 371 2 361 371 359 351 370 350 346 372 25 24 372 26 25 373 353 364 372 27 26 373 363 353 372 24 362 374 362 352 375 88 87 375 89 88 375 79 89 375 355 100 374 352 365 375 100 79 181 124 113 181 113 366 376 365 354 376 354 367 194 367 356 194 57 58 187 121 368 187 357 121 194 69 57 194 70 69 194 356 70 377 142 141 377 143 142 377 141 358 378 350 370 377 358 369 378 360 350 199 359 371 204 370 363 199 369 359 204 363 373 379 28 27 379 29 28 174 364 355 174 355 375 379 27 372 379 361 29 177 362 374 177 372 362 180 124 181 185 365 376 185 374 365 190 357 187 190 366 357 192 368 360 196 376 367 196 367 194 192 360 378 192 187 368 201 377 369 201 369 199 203 378 370 203 370 204 173 364 174 206 361 379 173 373 364 206 371 361 176 372 177 178 375 87 178 86 85 178 174 375 176 379 372 178 87 86 214 126 124 214 127 126 214 128 127 214 124 180 183 374 185 182 181 366 183 177 374 189 376 196 182 366 190 188 187 192 189 185 376 195 58 59 195 59 60 195 194 58 220 143 377 220 144 143 220 145 144 220 377 201 200 371 206 197 192 378 200 199 371 197 378 203 208 373 173 207 379 176 207 206 379 208 204 373 
+37 36 1 0
+100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 0 0 0 100 -2.8421709430404e-14 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 
+81 79 1 0.08806932591171
+210 -4.89842541528951e-15 450 190 20 445.825756949558 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 210 -4.89842541528951e-15 580 210 -4.89842541528951e-15 580 209.696155060244 3.47296355333861 580 208.793852415718 6.84040286651337 580 207.320508075689 10 580 205.32088886238 12.8557521937308 580 202.855752193731 15.3208888623796 580 200 17.3205080756888 580 196.840402866513 18.7938524157182 580 193.472963553339 19.6961550602442 580 190 20 580 186.527036446661 19.6961550602442 580 183.159597133487 18.7938524157182 580 180 17.3205080756888 580 177.144247806269 15.3208888623796 580 174.67911113762 12.8557521937308 580 172.679491924311 10 580 171.206147584282 6.84040286651339 580 170.303844939756 3.47296355333863 580 170 2.90945652986485e-14 580 170.303844939756 -3.47296355333857 580 171.206147584282 -6.84040286651334 580 172.679491924311 -9.99999999999996 580 174.67911113762 -12.8557521937308 580 177.144247806269 -15.3208888623795 580 180 -17.3205080756887 580 183.159597133487 -18.7938524157181 580 186.527036446661 -19.6961550602442 580 190 -20 580 193.472963553339 -19.6961550602442 580 196.840402866513 -18.7938524157182 580 200 -17.3205080756888 580 202.855752193731 -15.3208888623796 580 205.32088886238 -12.8557521937308 580 207.320508075689 -10.0000000000001 580 208.793852415718 -6.84040286651346 580 209.696155060244 -3.4729635533387 580 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 0 70 1.5707963267949 65.8257569495584 0.142351747122082 69.9194250413404 0.281055375999813 69.6913111137899 0.414430358933343 69.347170220943 0.57460191467716 68.8041269073138 0.74107398002479 68.1425638775227 0.889050078939067 67.5272086222772 1.03872370599815 66.9355904048767 1.19371599529568 66.4136909245251 1.35602764574802 66.0235624049143 1.46230497436568 65.8768973097914 0 200 6.28318530717959 200 0.174532925199433 200 0.349065850398866 200 0.523598775598299 200 0.698131700797732 200 0.872664625997165 200 1.0471975511966 200 1.22173047639603 200 1.39626340159546 200 1.5707963267949 200 1.74532925199433 200 1.91986217719376 200 2.0943951023932 200 2.26892802759263 200 2.44346095279206 200 2.61799387799149 200 2.79252680319093 200 2.96705972839036 200 3.14159265358979 200 3.31612557878922 200 3.49065850398866 200 3.66519142918809 200 3.83972435438752 200 4.01425727958696 200 4.18879020478639 200 4.36332312998582 200 4.53785605518525 200 4.71238898038469 200 4.88692190558412 200 5.06145483078355 200 5.23598775598299 200 5.41052068118242 200 5.58505360638185 200 5.75958653158128 200 5.93411945678072 200 6.10865238198015 200 6.28318530717959 70 1.72013247146725 65.9222647252579 1.85471909915631 66.1669542432741 2.00716842603721 66.5988697759599 2.1680232039098 67.1857573480384 2.32062944411443 67.8098941354628 2.47268807187481 68.4373513208037 2.63123021656973 69.0362072070267 2.78731777911728 69.5162728316698 2.94626920198406 69.8490981295058 3.09352922962378 69.9907658836172 3.23438566536289 69.965644740411 3.36787183147278 69.7982557092127 3.51774477754683 69.4572871864363 3.67159260869899 68.9670750694232 3.81354864144537 68.4250822054262 3.95037073077329 67.8607493368701 4.08724665603431 67.2968255054819 4.22540029705421 66.7717611852004 4.3657735702699 66.3266934273543 4.5140545776344 65.9948843404291 4.66502022222132 65.8355414042262 4.8073201484896 65.864953696004 4.93853099433839 66.0446495142749 5.08838047165455 66.4104820312536 5.24378635980383 66.9330753759453 5.38898193691902 67.5060059839887 5.53068286483151 68.0952057548532 5.67472839418684 68.6755428997765 5.82601583894822 69.2144577779357 5.97985154473146 69.6418218151269 6.12404711892915 69.8994545576524 13 1 3 15 3 4 15 13 3 16 4 5 16 15 4 17 5 6 17 16 5 18 6 7 18 17 6 19 7 8 19 18 7 20 8 9 20 19 8 21 9 10 21 10 11 21 20 9 22 11 12 22 21 11 23 12 2 23 2 51 23 22 12 24 23 51 24 51 52 25 24 52 25 52 53 26 25 53 26 53 54 27 26 54 27 54 55 28 55 56 28 56 57 28 27 55 29 28 57 29 57 58 30 58 59 30 29 58 31 30 59 31 59 60 32 60 61 32 31 60 33 61 62 33 32 61 34 62 63 34 33 62 35 63 64 35 34 63 36 64 65 36 65 66 36 35 64 37 66 67 37 36 66 38 67 68 38 37 67 39 38 68 39 68 69 40 39 69 40 69 70 40 70 71 41 71 72 41 40 71 42 41 72 42 72 73 43 42 73 43 73 74 43 74 75 44 43 75 44 75 76 45 44 76 45 76 77 46 45 77 46 77 78 47 46 78 47 78 79 48 47 79 48 79 80 49 48 80 49 80 81 14 49 81 14 81 50 
+82 80 1 0.0850572428380306
+190 -20 354.174243050442 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 210 -4.89842541528951e-15 220 210 -4.89842541528951e-15 220 209.696155060244 3.47296355333861 220 208.793852415718 6.84040286651337 220 207.320508075689 10 220 205.32088886238 12.8557521937308 220 202.855752193731 15.3208888623796 220 200 17.3205080756888 220 196.840402866513 18.7938524157182 220 193.472963553339 19.6961550602442 220 190 20 220 186.527036446661 19.6961550602442 220 183.159597133487 18.7938524157182 220 180 17.3205080756888 220 177.144247806269 15.3208888623796 220 174.67911113762 12.8557521937308 220 172.679491924311 10 220 171.206147584282 6.84040286651339 220 170.303844939756 3.47296355333863 220 170 2.90945652986485e-14 220 170.303844939756 -3.47296355333857 220 171.206147584282 -6.84040286651334 220 172.679491924311 -9.99999999999996 220 174.67911113762 -12.8557521937308 220 177.144247806269 -15.3208888623795 220 180 -17.3205080756887 220 183.159597133487 -18.7938524157181 220 186.527036446661 -19.6961550602442 220 190 -20 220 193.472963553339 -19.6961550602442 220 196.840402866513 -18.7938524157182 220 200 -17.3205080756888 220 202.855752193731 -15.3208888623796 220 205.32088886238 -12.8557521937308 220 207.320508075689 -10.0000000000001 220 208.793852415718 -6.84040286651346 220 209.696155060244 -3.4729635533387 220 210 -8.57224447675664e-15 350 190 20 354.174243050442 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 170 -1.22460635382238e-14 350 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 4.71238898038469 134.174243050442 6.28318530717959 130 4.85327844788595 134.088263569143 4.99010063715277 133.847377731445 5.12172498674817 133.48804794237 5.28145061948999 132.924101795035 5.44679451827606 132.254442217558 5.59504002539476 131.640343989945 5.74596228873161 131.058771099956 5.90284904650619 130.554327671456 6.0674637066173 130.183610770056 6.1743819504377 130.047188395291 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 130 1.5707963267949 134.174243050442 0.142410335941526 130.080640928023 0.281090663049982 130.308764554953 0.414594571639405 130.653320488076 0.574833310501752 131.196738404482 0.741299351798358 131.858368701347 0.889330920856856 132.473947824842 1.03897085878836 133.065330153674 1.19381290142985 133.586595046112 1.35600871415747 133.976403384948 1.46230681760685 134.123104386169 3.14159265358979 130 2.99918231731974 130.080640925493 2.86050199126434 130.308764553975 2.72699808025909 130.653320494305 2.56675933962782 131.196738417424 2.4002932985088 131.858368714932 2.25226172953692 132.473947838002 2.10262179161877 133.065330165529 1.94777974892844 133.586595055644 1.78558393613939 133.976403390908 1.67928583429461 134.123104387754 4.57149951279621 134.088263569037 4.43467732344834 133.847377731061 4.30305297377866 133.488047941608 4.14332734099344 132.924101793932 3.97798344210894 132.254442215957 3.8297379348938 131.640343987994 3.67881567144687 131.058771097833 3.52192891353577 130.554327671198 3.35731425490409 130.183610769691 3.25039600893176 130.047188396748 52 14 15 52 50 14 53 15 16 53 52 15 54 53 16 54 16 17 55 17 18 55 54 17 56 55 18 56 18 19 57 56 19 57 19 20 58 20 21 58 57 20 59 58 21 60 21 22 60 59 21 61 22 23 61 60 22 51 61 23 72 23 24 72 51 23 71 24 25 71 72 24 70 71 25 69 25 26 69 70 25 68 26 27 68 69 26 67 27 28 67 68 27 66 28 29 66 67 28 65 29 30 65 66 29 64 30 31 64 65 30 63 31 32 63 64 31 62 63 32 82 32 33 82 62 32 81 33 34 81 82 33 80 34 35 80 81 34 79 35 36 79 80 35 78 36 37 78 79 36 77 78 37 76 37 38 76 77 37 75 76 38 75 38 39 74 75 39 74 39 40 73 74 40 73 40 41 1 73 41 3 1 41 3 41 42 4 3 42 4 42 43 5 4 43 5 43 44 6 5 44 6 44 45 7 6 45 8 7 45 8 45 46 9 8 46 9 46 47 10 9 47 10 47 48 11 10 48 11 48 49 12 11 49 12 49 13 2 12 13 
+37 36 1 0
+50 -1.22460635382238e-14 300 49.2403876506104 8.68240888334652 300 46.9846310392954 17.1010071662834 300 43.3012701892219 25 300 38.3022221559489 32.139380484327 300 32.139380484327 38.3022221559489 300 25 43.3012701892219 300 17.1010071662834 46.9846310392954 300 8.68240888334654 49.2403876506104 300 -2.35367281220533e-14 50 300 -8.68240888334653 49.2403876506104 300 -17.1010071662834 46.9846310392954 300 -25 43.3012701892219 300 -32.1393804843269 38.3022221559489 300 -38.3022221559489 32.139380484327 300 -43.3012701892219 25 300 -46.9846310392954 17.1010071662835 300 -49.2403876506104 8.68240888334658 300 -50 7.27364132466213e-14 300 -49.2403876506104 -8.68240888334644 300 -46.9846310392955 -17.1010071662833 300 -43.301270189222 -24.9999999999999 300 -38.3022221559489 -32.1393804843269 300 -32.1393804843271 -38.3022221559488 300 -25.0000000000001 -43.3012701892219 300 -17.1010071662835 -46.9846310392954 300 -8.68240888334665 -49.2403876506104 300 -1.37223565843669e-13 -50 300 8.68240888334637 -49.2403876506104 300 17.1010071662833 -46.9846310392955 300 24.9999999999999 -43.301270189222 300 32.1393804843268 -38.302222155949 300 38.3022221559488 -32.1393804843271 300 43.3012701892218 -25.0000000000002 300 46.9846310392954 -17.1010071662836 300 49.2403876506104 -8.68240888334674 300 -2.35367281220533e-14 0 300 50 0 49.2403876506104 8.68240888334652 46.9846310392954 17.1010071662834 43.3012701892219 25 38.3022221559489 32.139380484327 32.139380484327 38.3022221559489 25 43.3012701892219 17.1010071662834 46.9846310392954 8.68240888334652 49.2403876506104 0 50 -8.68240888334651 49.2403876506104 -17.1010071662834 46.9846310392954 -25 43.3012701892219 -32.1393804843269 38.3022221559489 -38.3022221559489 32.139380484327 -43.3012701892219 25 -46.9846310392954 17.1010071662835 -49.2403876506104 8.68240888334658 -50 7.105427357601e-14 -49.2403876506104 -8.68240888334644 -46.9846310392955 -17.1010071662834 -43.301270189222 -24.9999999999999 -38.302222155949 -32.1393804843269 -32.139380484327 -38.3022221559488 -25.0000000000001 -43.3012701892219 -17.1010071662836 -46.9846310392954 -8.68240888334665 -49.2403876506104 -1.4210854715202e-13 -50 8.68240888334637 -49.2403876506104 17.1010071662833 -46.9846310392955 24.9999999999999 -43.301270189222 32.1393804843268 -38.302222155949 38.3022221559488 -32.1393804843271 43.3012701892218 -25.0000000000002 46.9846310392954 -17.1010071662836 49.2403876506104 -8.68240888334674 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+37 36 1 0
+20 -4.89842541528951e-15 200 19.6961550602442 3.47296355333861 200 18.7938524157182 6.84040286651337 200 17.3205080756888 10 200 15.3208888623795 12.8557521937308 200 12.8557521937308 15.3208888623796 200 10 17.3205080756888 200 6.84040286651339 18.7938524157182 200 3.47296355333862 19.6961550602442 200 0 20 200 -3.47296355333862 19.6961550602442 200 -6.84040286651339 18.7938524157182 200 -10 17.3205080756888 200 -12.8557521937308 15.3208888623796 200 -15.3208888623795 12.8557521937308 200 -17.3205080756888 10 200 -18.7938524157182 6.84040286651339 200 -19.6961550602442 3.47296355333863 200 -20 2.90945652986485e-14 200 -19.6961550602442 -3.47296355333857 200 -18.7938524157182 -6.84040286651334 200 -17.3205080756888 -9.99999999999996 200 -15.3208888623796 -12.8557521937308 200 -12.8557521937308 -15.3208888623795 200 -10 -17.3205080756887 200 -6.84040286651341 -18.7938524157181 200 -3.47296355333867 -19.6961550602442 200 -5.6843418860808e-14 -20 200 3.47296355333856 -19.6961550602442 200 6.8404028665133 -18.7938524157182 200 9.99999999999994 -17.3205080756888 200 12.8557521937307 -15.3208888623796 200 15.3208888623795 -12.8557521937308 200 17.3205080756887 -10.0000000000001 200 18.7938524157181 -6.84040286651346 200 19.6961550602441 -3.4729635533387 200 0 0 200 20 0 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 
+37 36 1 0
+20 -4.89842541528951e-15 0 19.6961550602442 3.47296355333861 0 18.7938524157182 6.84040286651337 0 17.3205080756888 10 0 15.3208888623795 12.8557521937308 0 12.8557521937308 15.3208888623796 0 10 17.3205080756888 0 6.84040286651339 18.7938524157182 0 3.47296355333862 19.6961550602442 0 0 20 0 -3.47296355333862 19.6961550602442 0 -6.84040286651339 18.7938524157182 0 -10 17.3205080756888 0 -12.8557521937308 15.3208888623796 0 -15.3208888623795 12.8557521937308 0 -17.3205080756888 10 0 -18.7938524157182 6.84040286651339 0 -19.6961550602442 3.47296355333863 0 -20 2.90945652986485e-14 0 -19.6961550602442 -3.47296355333857 0 -18.7938524157182 -6.84040286651334 0 -17.3205080756888 -9.99999999999996 0 -15.3208888623796 -12.8557521937308 0 -12.8557521937308 -15.3208888623795 0 -10 -17.3205080756887 0 -6.84040286651341 -18.7938524157181 0 -3.47296355333867 -19.6961550602442 0 -5.6843418860808e-14 -20 0 3.47296355333856 -19.6961550602442 0 6.8404028665133 -18.7938524157182 0 9.99999999999994 -17.3205080756888 0 12.8557521937307 -15.3208888623796 0 15.3208888623795 -12.8557521937308 0 17.3205080756887 -10.0000000000001 0 18.7938524157181 -6.84040286651346 0 19.6961550602441 -3.4729635533387 0 0 0 0 20 -3.5527136788005e-15 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 
+
+TShapes 57
+Ve
+1e-07
+100 -2.44921270764475e-14 800
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 6.28318530717959
+2  1 2 0 0 6.28318530717959
+2  2 1 0 0 6.28318530717959
+6  1 2 0
+6  2 1 0
+0
+
+0101100
++57 0 -57 0 *
+Wi
+
+0101000
++56 0 *
+Fa
+0  1e-07 1 0
+2  1
+0101000
++55 0 *
+Ve
+3.77011308578173e-06
+86.6025403784438 -50 400
+0 0
+
+0101101
+*
+Ve
+3.77011308578173e-06
+100 -1.83690953073357e-14 350
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  2 0 0 1
+2  3 2 0 0 1
+2  4 3 1 0 1
+6  3 2 0
+6  4 3 0
+0
+
+0101000
++53 0 -52 0 *
+Ve
+1e-07
+100 -2.44921270764475e-14 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 350
+3  5 6CN 2 0 0 350
+7  5 6 2 0
+0
+
+0101000
++50 0 -52 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 6.28318530717959
+2  7 2 0 0 6.28318530717959
+2  8 4 0 0 6.28318530717959
+6  7 2 0
+6  8 4 0
+0
+
+0101100
++50 0 -50 0 *
+Ve
+3.77011308578173e-06
+86.6025403784439 50 400
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  5 0 0 1
+2  9 2 0 0 1
+2  10 3 1 0 1
+6  9 2 0
+6  10 3 0
+0
+
+0101000
++52 0 -47 0 *
+Ve
+3.77011308578173e-06
+100 -2.44921270764475e-14 450
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  6 0 0 1
+2  11 2 0 0 1
+2  12 3 1 0 1
+6  11 2 0
+6  12 3 0
+0
+
+0101000
++45 0 -47 0 *
+Ed
+ 1e-07 1 1 0
+1  3 0 450 800
+3  5 6CN 2 0 450 800
+7  13 14 2 0
+0
+
+0101000
++45 0 -57 0 *
+Ed
+ 3.77011308578173e-06 1 1 0
+1  7 0 0 1
+2  13 2 0 0 1
+2  14 3 1 0 1
+6  15 2 0
+6  16 3 0
+0
+
+0101000
++53 0 -45 0 *
+Wi
+
+0101000
+-51 0 +49 0 +48 0 -49 0 -46 0 +44 0 -43 0 -56 0 +43 0 +42 0 
+*
+Fa
+0  1e-07 2 0
+2  2
+0101000
++41 0 *
+Ve
+7.99539616382488e-05
+190 20 445.825756949558
+0 0
+
+0101101
+*
+Ve
+7.99539616382488e-05
+210 -4.89842541528951e-15 450
+0 0
+
+0101101
+*
+Ed
+ 7.99539616382488e-05 1 1 0
+1  8 0 0 1
+2  15 3 1 0 1
+2  16 5 2 0 1
+6  17 3 0
+6  18 5 0
+0
+
+0101000
++39 0 -38 0 *
+Ed
+ 7.99539616382488e-05 1 1 0
+1  9 0 0 1
+2  17 3 1 0 1
+2  18 5 2 0 1
+6  19 3 0
+6  20 5 0
+0
+
+0101000
++38 0 -39 0 *
+Wi
+
+0101000
+-37 0 -36 0 *
+Ve
+1.92831599071361e-06
+190 -20 354.174243050442
+0 0
+
+0101101
+*
+Ve
+1.92831599071361e-06
+170 -1.22460635382238e-14 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  10 0 0 1
+2  19 3 1 0 1
+2  20 5 3 0 1
+6  21 3 0
+6  22 6 0
+0
+
+0101000
++34 0 -33 0 *
+Ed
+ 1e-07 1 1 0
+1  11 0 100 170
+3  21 22CN 3 0 100 170
+7  23 24 3 4
+0
+
+0101000
++52 4 -33 4 *
+Ve
+1.92831599071361e-06
+190 20 354.174243050442
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  12 0 0 1
+2  23 3 1 0 1
+2  24 5 3 0 1
+6  25 3 0
+6  26 6 0
+0
+
+0101000
++33 0 -30 0 *
+Ve
+1.92831599071361e-06
+210 -8.57224447675664e-15 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  13 0 0 1
+2  25 3 1 0 1
+2  26 5 3 0 1
+6  27 3 0
+6  28 6 0
+0
+
+0101000
++28 0 -30 0 *
+Ve
+1e-07
+50 -1.22460635382238e-14 300
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 210 300
+3  21 22CN 3 0 210 300
+7  29 30 3 4
+0
+
+0101000
++28 4 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 6.28318530717959
+2  27 3 0 0 6.28318530717959
+2  28 6 0 0 6.28318530717959
+6  31 3 4
+6  32 7 0
+0
+
+0101100
++26 0 -26 0 *
+Ed
+ 1.92831599071361e-06 1 1 0
+1  15 0 0 1
+2  29 3 1 0 1
+2  30 5 3 0 1
+6  33 3 0
+6  34 6 0
+0
+
+0101000
++34 0 -28 0 *
+Wi
+
+0101000
+-32 0 +31 1 +51 0 -42 0 -44 0 +46 0 -31 1 -29 0 +27 0 -25 1 
+-24 1 +25 1 +23 0 *
+Fa
+0  1e-07 3 1
+2  3
+0101000
++35 0 +22 0 *
+Wi
+
+0101000
+-48 0 *
+Fa
+0  1e-07 4 0
+2  4
+0101000
+-20 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 200
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 70 200
+3  31 32CN 5 0 70 200
+7  35 36 5 5
+0
+
+0101000
++38 5 -18 0 *
+Ed
+ 1e-07 1 1 0
+1  17 0 0 6.28318530717959
+2  33 5 0 0 6.28318530717959
+2  34 7 0 0 6.28318530717959
+2  35 5 6 0 6.28318530717959
+6  37 5 5
+6  38 8 0
+0
+
+0101100
++18 0 -18 0 *
+Wi
+
+0101000
++36 0 -17 2 -16 2 +17 2 +37 0 *
+Fa
+0  1e-07 5 2
+2  5
+0101000
++15 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 0 130
+3  31 32CN 5 0 0 130
+7  39 40 6 7
+0
+
+0101000
++13 0 -28 7 *
+Ed
+ 1e-07 1 1 0
+1  18 0 0 6.28318530717959
+2  36 5 0 0 6.28318530717959
+2  37 8 0 0 6.28318530717959
+2  38 5 8 0 6.28318530717959
+6  41 6 7
+6  42 9 0
+0
+
+0101100
++13 0 -13 0 *
+Wi
+
+0101000
+-23 0 +12 3 +11 3 -12 3 -27 0 +29 0 +32 0 *
+Fa
+0  1e-07 5 3
+2  6
+0101000
++10 0 *
+Wi
+
+0101000
++24 0 *
+Fa
+0  1e-07 6 0
+2  7
+0101000
++8 0 *
+Wi
+
+0101000
++16 0 *
+Fa
+0  1e-07 7 0
+2  8
+0101000
++6 0 *
+Wi
+
+0101000
+-11 0 *
+Fa
+0  1e-07 8 0
+2  9
+0101000
+-4 0 *
+Sh
+
+0101000
++54 0 +40 0 +21 0 -19 0 +14 0 +9 0 +7 1 +5 2 -3 3 *
+So
+
+0100000
++2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/recettes/troisCylindres.py b/src/TEST_PY/recettes/troisCylindres.py
new file mode 100644 (file)
index 0000000..3fcf56e
--- /dev/null
@@ -0,0 +1,207 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS : 2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# ========================================================================================
+
+import geompy
+import hexablock
+
+# Charger la géométrie
+# ====================
+
+nom = "troisCylindres"
+
+piece = geompy.ImportBREP(nom+".brep")
+
+# Sélectionner des sous-parties de la géométrie
+# ---------------------------------------------
+
+sommets = geompy.SubShapeAllSortedCentres(piece, geompy.ShapeType["VERTEX"])
+aretes  = geompy.SubShapeAllSortedCentres(piece, geompy.ShapeType["EDGE"  ])
+
+moy_b_x, moy_b_y, moy_b_z = geompy.PointCoordinates(sommets[14])
+moy_p_x, moy_p_y, moy_p_z = geompy.PointCoordinates(sommets[ 6])
+moy_g_x, moy_g_y, moy_g_z = geompy.PointCoordinates(sommets[ 3])
+
+grand0, grand_xb, grand_yb, grand_zb,  grand1, grand2, grand3,  grand_rayon = geompy.KindOfShape(aretes[ 0])
+grand4, grand_xh, grand_yh, grand_zh,  grand5, grand6, grand7,  grand8      = geompy.KindOfShape(aretes[ 1])
+
+moyen0, moyen_x , moyen_y , moyen_z ,  moyen1, moyen2, moyen3,  moyen_rayon = geompy.KindOfShape(aretes[20])
+
+petit0, petit_xb, petit_yb, petit_zb,  petit1, petit2, petit3,  petit_rayon = geompy.KindOfShape(aretes[12])
+petit4, petit_xh, petit_yh, petit_zh,  petit5, petit6, petit7,  petit8      = geompy.KindOfShape(aretes[13])
+
+# Construire le modèle de bloc
+# ============================
+
+doc = hexablock.addDocument(nom)
+
+doc.setShape(piece)
+
+# Construire le grand cylindre
+# ----------------------------
+
+grand_base = doc.addVertex(grand_xb, grand_yb, grand_zb)
+grand_oppo = doc.addVertex(grand_xh, grand_yh, grand_zh)
+
+grand_dir = doc.addVectorVertices(grand_base, grand_oppo)
+
+grand_hauteur = grand_dir.getNorm()
+
+grand_cylindre = doc.addCylinder(grand_base, grand_dir, grand_rayon, grand_hauteur)
+
+# Construire le moyen cylindre coté grand
+# ---------------------------------------
+
+moy_g_r1 = 0.8
+moy_g_r2 = 0.5
+
+moy_g_base_x = moy_p_x + (moy_g_x-moy_p_x)*moy_g_r1 + moyen_x - moy_b_x
+moy_g_base_y = moy_p_y + (moy_g_y-moy_p_y)*moy_g_r1 + moyen_y - moy_b_y
+moy_g_base_z = moy_p_z + (moy_g_z-moy_p_z)*moy_g_r1 + moyen_z - moy_b_z
+
+moy_g_base = doc.addVertex(moy_g_base_x, moy_g_base_y, moy_g_base_z)
+moy_g_oppo = doc.addVertex( (grand_xh+grand_xb) * moy_g_r2, (grand_yh+grand_yb) * moy_g_r2, (grand_zh+grand_zb) * moy_g_r2 )
+
+moy_g_dir = doc.addVectorVertices(moy_g_base, moy_g_oppo)
+
+moy_g_hauteur = moy_g_dir.getNorm()
+
+moy_g_cylindre = doc.addCylinder(moy_g_base, moy_g_dir, moyen_rayon, moy_g_hauteur)
+
+# Construire le moyen cylindre coté petit
+# ---------------------------------------
+
+moy_p_r = 0.18
+
+moy_p_base = doc.addVertex(moyen_x, moyen_y, moyen_z)
+moy_b_base = doc.addVertex(moy_b_x, moy_b_y, moy_b_z)
+moy_p_oppo = doc.addVertex( moy_p_x+(moy_g_x-moy_p_x) * moy_p_r, moy_p_y+(moy_g_y-moy_p_y) * moy_p_r, moy_p_z+(moy_g_z-moy_p_z) * moy_p_r )
+
+moy_p_dir = doc.addVectorVertices(moy_b_base, moy_p_oppo)
+
+moy_p_hauteur = moy_p_dir.getNorm()
+
+moy_p_cylindre = doc.addCylinder(moy_p_base, moy_p_dir, moyen_rayon, moy_p_hauteur)
+
+# Construire le petit cylindre
+# ----------------------------
+
+petit_base = doc.addVertex(petit_xb, petit_yb, petit_zb)
+petit_oppo = doc.addVertex(petit_xh, petit_yh, petit_zh)
+
+petit_dir = doc.addVectorVertices(petit_base, petit_oppo)
+
+petit_hauteur = petit_dir.getNorm()
+
+petit_cylindre = doc.addCylinder(petit_base, petit_dir, petit_rayon, petit_hauteur)
+
+# Construire le T et la X
+# -----------------------
+
+en_te = doc.makeCylinders(grand_cylindre, moy_g_cylindre)
+croix = doc.makeCylinders(moy_p_cylindre, petit_cylindre)
+
+# Relier le T et la X
+# -------------------
+
+croix_quads = []
+
+for i in xrange(1, -1, -1):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        quad = croix.getQuadIJ(hexablock.CYL_BIG, i, j, hexablock.CYL_BIG_SLICES)
+        croix_quads.append(quad)
+
+en_te_q = en_te.getQuadIJ(hexablock.CYL_SMALL, 1, hexablock.V_N, 0)
+
+en_te_v0 = en_te.getVertexIJK(hexablock.CYL_SMALL, 2, hexablock.V_N , 0)
+en_te_v1 = en_te.getVertexIJK(hexablock.CYL_SMALL, 2, hexablock.V_NW, 0)
+
+croix_v0 = croix.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_E , hexablock.CYL_BIG_SLICES)
+croix_v1 = croix.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_NE, hexablock.CYL_BIG_SLICES)
+
+prisme = doc.joinQuads(croix_quads, en_te_q,  croix_v0, en_te_v0,  croix_v1, en_te_v1,  1)
+
+# Associer
+# ========
+
+# fkl: comme pour la tuyauterie: associer pour le prisme (sauf si item 142 et 146 de Taches.ods)
+
+# Mailler le modèle de bloc
+# =========================
+
+# Définir 5 groupes de faces
+# --------------------------
+
+groupe_grand_a = doc.addQuadGroup("Grand_A")
+groupe_grand_b = doc.addQuadGroup("Grand_B")
+groupe_moyen_f = doc.addQuadGroup("Moyen")
+groupe_petit_a = doc.addQuadGroup("Petit_A")
+groupe_petit_b = doc.addQuadGroup("Petit_B")
+
+for i in xrange(2):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        quad = en_te.getQuadIJ(hexablock.CYL_BIG  , i, j, 0)
+        groupe_grand_a.addElement(quad)
+
+        quad = en_te.getQuadIJ(hexablock.CYL_BIG  , i, j, hexablock.CYL_BIG_SLICES)
+        groupe_grand_b.addElement(quad)
+
+        quad = croix.getQuadIJ(hexablock.CYL_BIG  , i, j, 0)
+        groupe_moyen_f.addElement(quad)
+
+        quad = croix.getQuadIJ(hexablock.CYL_SMALL, i, j, 0)
+        groupe_petit_a.addElement(quad)
+
+        quad = croix.getQuadIJ(hexablock.CYL_SMALL, i, j, hexablock.CYL_SMALL_SLICES)
+        groupe_petit_b.addElement(quad)
+
+# Définir 3 groupes de volumes
+# ----------------------------
+
+groupe_grand = doc.addHexaGroup("Grand")
+groupe_moyen = doc.addHexaGroup("Moyen")
+groupe_petit = doc.addHexaGroup("Petit")
+
+for i in xrange( doc.countUsedHexa() ):
+    h = doc.getUsedHexa(i)
+    groupe_moyen.addElement(h)
+
+for i in xrange(2):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        for k in [ 0, hexablock.CYL_BIG_SLICES-1 ]:
+            h = en_te.getHexaIJK(hexablock.CYL_BIG, i, j, k)
+            groupe_grand.addElement(h)
+            groupe_moyen.removeElement(h)
+
+        for k in [0, hexablock.CYL_SMALL_SLICES-1 ]:
+            h = croix.getHexaIJK(hexablock.CYL_SMALL, i, j, k)
+            groupe_petit.addElement(h)
+            groupe_moyen.removeElement(h)
+
+# Mailler le modèle de bloc avec association
+# ------------------------------------------
+
+hexablock.addLaws(doc, 10, True)
+
+blocs = hexablock.mesh(doc)
+
+muv, mue, muq, muh = hexablock.dump(doc, blocs)
diff --git a/src/TEST_PY/recettes/tuyau.brep b/src/TEST_PY/recettes/tuyau.brep
new file mode 100755 (executable)
index 0000000..ec768b0
--- /dev/null
@@ -0,0 +1,426 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 0
+Curve2ds 28
+1 0 0 0 1 
+1 0 0 0 1 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+1 0 0 1 0 
+1 0 0 1 0 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 0 0 0 1 
+1 0 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+1 0 -0 6.1232339957367759e-17 -1 
+1 0 -0 6.1232339957367759e-17 -1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+Curves 16
+7 1 0  7 8 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1
+ 0 8 1 8
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 -0.62831853071801369  3.1478202812511471 -3.1478202812511471 -1.2566370068591419  2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  -1.2775986014289811 1.2775986014289811 -2.1687580291316819  -2.3723834259351833 2.3723834259351833 -1.7988274783396521  -3.1478202812517777 3.1478202812517777 -1.256637006859245  -3.5355339059326556 3.5355339059326556 -0.62831853071798205  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 1 0  7 8 2  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1
+ 0 8 1 8
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 -1.4137166941154202  75.000000000003425 15.993478879707238 -2.8274332654334842  74.999999999990621 16.98044886550209 -4.0473618262637086  75.000000000018389 18.373882457535071 -4.8797055655472787  74.999999999974861 19.999999999996184 -5.1762440277824107  75.00000000002386 21.626117542471153 -4.879705565547396  74.999999999984084 23.019551134494474 -4.047361826263554  75.000000000007219 24.006521120294067 -2.8274332654335823  74.999999999998124 24.499999999999748 -1.4137166941153954  75.000000000000014 24.5 -1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 0.62831853071801369  3.1478202812511471 -3.1478202812511471 1.2566370068591419  2.3723834259365431 -2.3723834259365431 1.7988274783398068  1.2775986014269276 -1.2775986014269276 2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  -1.2775986014289811 1.2775986014289811 2.1687580291316819  -2.3723834259351833 2.3723834259351833 1.7988274783396521  -3.1478202812517777 3.1478202812517777 1.256637006859245  -3.5355339059326556 3.5355339059326556 0.62831853071798205  -3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 1.4137166941154202  75.000000000003425 15.993478879707238 2.8274332654334842  74.999999999990621 16.98044886550209 4.0473618262637086  75.000000000018389 18.373882457535071 4.8797055655472787  74.999999999974861 19.999999999996184 5.1762440277824107  75.00000000002386 21.626117542471153 4.879705565547396  74.999999999984084 23.019551134494474 4.047361826263554  75.000000000007219 24.006521120294067 2.8274332654335823  74.999999999998124 24.499999999999748 1.4137166941153954  75.000000000000014 24.5 1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 0.70710678118654757 0 
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 -0.50265482457439326  2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1.0220788811419279 -1.0220788811419279 -1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  -1.0220788811427488 1.0220788811427488 -1.73500642330558  -1.8979067407484411 1.8979067407484411 -1.4390619826715594  -2.5182562250012874 2.5182562250012874 -1.0053096054874726  -2.8284271247461601 2.8284271247461601 -0.50265482457436672  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+1 -3.5355339059327378 3.5355339059327378 -2.4492935982947064e-16 0.70710678118654757 -0.70710678118654757 4.8985871965894125e-17 
+7 1 0  7 8 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1
+ 0 8 1 8
+7 1 0  7 8 2  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1
+ 0 8 1 8
+7 0 0  10 11 2  75 16.399999999999999 4.4408920985006262e-16  74.999999999999105 16.399999999999604 -1.1309733552923305  75.000000000003425 16.79478310376723 -2.2619466123468186  74.999999999990621 17.584359092398095 -3.2378894610108695  75.000000000018389 18.699105966034271 -3.9037644524379904  74.999999999974861 19.999999999989107 -4.1409952222257402  75.00000000002386 21.300894033984143 -3.9037644524380775  74.999999999984084 22.415640907590802 -3.2378894610107412  75.000000000007219 23.205216896237388 -2.261946612346911  74.999999999998124 23.599999999999262 -1.1309733552923047  75.000000000000014 23.600000000000001 2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 0.50265482457439326  2.5182562250010312 -2.5182562250010312 1.0053096054873778  1.8979067407489889 -1.8979067407489889 1.4390619826717084  1.0220788811419279 -1.0220788811419279 1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  -1.0220788811427488 1.0220788811427488 1.73500642330558  -1.8979067407484411 1.8979067407484411 1.4390619826715594  -2.5182562250012874 2.5182562250012874 1.0053096054874726  -2.8284271247461601 2.8284271247461601 0.50265482457436672  -2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 16.399999999999999 -4.4408920985006262e-16  74.999999999999105 16.399999999999604 1.1309733552923305  75.000000000003425 16.79478310376723 2.2619466123468186  74.999999999990621 17.584359092398095 3.2378894610108695  75.000000000018389 18.699105966034271 3.9037644524379904  74.999999999974861 19.999999999989107 4.1409952222257402  75.00000000002386 21.300894033984143 3.9037644524380775  74.999999999984084 22.415640907590802 3.2378894610107412  75.000000000007219 23.205216896237388 2.261946612346911  74.999999999998124 23.599999999999262 1.1309733552923047  75.000000000000014 23.600000000000001 -2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+1 75 15.5 2.7554552980815448e-16 0 1 -6.1232339957367759e-17 
+1 75 24.5 -8.2663658942446333e-16 0 -1 1.8369701987210317e-16 
+Polygon3D 0
+PolygonOnTriangulations 0
+Surfaces 8
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 -0.62831853071801369  1 9.604885542379284 5.6779402750195667 -0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 -1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 -0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 -2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 -1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 -1.4137166941154204  1 74.999999999999105 15.49999999999994 -1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 -1.2566370068591419  1 9.2729214810444986 6.0754899681670214 -1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 -2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 -0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 -4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 -2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 -2.8274332654334846  1 75.000000000003425 15.993478879707238 -2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1 8.6089851336806884 6.8705992041127821 -2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 -2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 -1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 -6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 -3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 -4.0473618262637086  1 74.999999999990621 16.98044886550209 -4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1 7.6716200438365361 7.9931580809223801 -2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 -3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 -1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 -8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 -3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 -4.8797055655472787  1 75.000000000018389 18.373882457535071 -4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  1 6.5777280744114703 9.3031686135167266 -2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 -3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 -1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 -8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 -4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 -5.1762440277824107  1 74.999999999974861 19.999999999996184 -5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 -2.1687580291316819  1 5.4838361049540145 10.613179146115629 -2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 -3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 -1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 -8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 -3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 -4.879705565547396  1 75.00000000002386 21.626117542471153 -4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 -1.7988274783396521  1 4.5464710151344043 11.735738022921637 -2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 -2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 -1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 -6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 -3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 -4.047361826263554  1 74.999999999984084 23.019551134494474 -4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 -1.256637006859245  1 3.8825346677568429 12.530847258869537 -1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 -2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 -0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 -4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 -2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 -2.8274332654335819  1 75.000000000007219 24.006521120294067 -2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 -0.62831853071798205  1 3.5505706064273257 12.928396952016087 -0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 -1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 -0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 -2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 -1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 -1.4137166941153956  1 74.999999999998124 24.499999999999748 -1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 -1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 -2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 0.62831853071801369  1 9.604885542379284 5.6779402750195667 0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 1.4137166941154204  1 74.999999999999105 15.49999999999994 1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 1.2566370068591419  1 9.2729214810444986 6.0754899681670214 1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 2.8274332654334846  1 75.000000000003425 15.993478879707238 2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 1.7988274783398068  1 8.6089851336806884 6.8705992041127821 2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 4.0473618262637086  1 74.999999999990621 16.98044886550209 4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 2.1687580291315651  1 7.6716200438365361 7.9931580809223801 2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 4.8797055655472787  1 75.000000000018389 18.373882457535071 4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  1 6.5777280744114703 9.3031686135167266 2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 5.1762440277824107  1 74.999999999974861 19.999999999996184 5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 2.1687580291316819  1 5.4838361049540145 10.613179146115629 2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 4.879705565547396  1 75.00000000002386 21.626117542471153 4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 1.7988274783396521  1 4.5464710151344043 11.735738022921637 2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 4.047361826263554  1 74.999999999984084 23.019551134494474 4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 1.256637006859245  1 3.8825346677568429 12.530847258869537 1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 2.8274332654335819  1 75.000000000007219 24.006521120294067 2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 0.62831853071798205  1 3.5505706064273257 12.928396952016087 0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 1.4137166941153956  1 74.999999999998124 24.499999999999748 1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 -1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 -1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 1.5086264655892687e-15  1 75.000000000000014 24.5 1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 0.70710678118654757 0 -0 0 -1 
+1 75 15.5 2.7554552980815448e-16 -1 0 0 0 0 -1 -0 -1 -0 
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 -0.70710678118654757 -0 -0.70710678118654757 0.70710678118654757 -0 -0 0 1 
+1 75 15.5 -2.7554552980815448e-16 -1 -0 -0 -0 -0 1 -0 -1 0 
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 -0.50265482457439326  1 9.0159805468328216 6.4281751612018621 -0.58553428033384047  1 17.777778499971209 15.165580394865655 -0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 -0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 -1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 -0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 -1.1309733552923305  1 74.999999999999105 16.399999999999604 -1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1 8.7505280572964637 6.7462367156950842 -1.1710685098071594  1 17.602833142044837 15.553363260898562 -1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 -0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 -3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 -1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 -2.2619466123468186  1 75.000000000003425 16.79478310376723 -2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1 8.2196165014000666 7.3823677049416423 -1.676339470317372  1 17.252938091745996 16.328938600612986 -2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 -0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 -5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 -2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 -3.2378894610108699  1 74.999999999990621 17.584359092398095 -3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 -1.7350064233054643  1 7.4700597701643572 8.2804763628600888 -2.021080247871553  1 16.758945849069651 17.423918941557226 -2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 -1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 -6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 -3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 -3.9037644524379909  1 75.000000000018389 18.699105966034271 -3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  1 6.5953375324381369 9.3285566244738707 -2.1439007788875823  1 16.182463800463946 18.701745707871858 -3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 -1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 -7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 -3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 -4.1409952222257402  1 74.999999999974861 19.999999999989107 -4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 -1.73500642330558  1 5.7206152947181215 10.376636886096147 -2.0210802478716676  1 15.605981751912061 19.97957247426147 -2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 -1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 -6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 -3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 -3.9037644524380779  1 75.00000000002386 21.300894033984143 -3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 -1.4390619826715594  1 4.9710585634781923 11.274745544008159 -1.6763394703172221  1 15.111989509197203 21.074552815149307 -2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 -0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 -5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 -2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 -3.2378894610107416  1 74.999999999984084 22.415640907590802 -3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 -1.0053096054874726  1 4.4401470075837057 11.910876533258277 -1.1710685098072586  1 14.762094458918183 21.850128154895057 -1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 -0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 -3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 -1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 -2.261946612346911  1 75.000000000007219 23.205216896237388 -2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 -0.50265482457436672  1 4.1746945180467883 12.228938087750157 -0.58553428033381372  1 14.587149100984806 22.237911020916648 -0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 -0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 -1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 -0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 -1.1309733552923047  1 74.999999999998124 23.599999999999262 -1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 -2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 -5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 -1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 -4.4408920985006262e-16  1 75 16.399999999999999 -4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 0.50265482457439326  1 9.0159805468328216 6.4281751612018621 0.58553428033384047  1 17.777778499971209 15.165580394865655 0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 1.1309733552923305  1 74.999999999999105 16.399999999999604 1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 1.0053096054873778  1 8.7505280572964637 6.7462367156950842 1.1710685098071594  1 17.602833142044837 15.553363260898562 1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 2.2619466123468186  1 75.000000000003425 16.79478310376723 2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 1.4390619826717084  1 8.2196165014000666 7.3823677049416423 1.676339470317372  1 17.252938091745996 16.328938600612986 2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 3.2378894610108699  1 74.999999999990621 17.584359092398095 3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 1.7350064233054643  1 7.4700597701643572 8.2804763628600888 2.021080247871553  1 16.758945849069651 17.423918941557226 2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 3.9037644524379909  1 75.000000000018389 18.699105966034271 3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  1 6.5953375324381369 9.3285566244738707 2.1439007788875823  1 16.182463800463946 18.701745707871858 3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 4.1409952222257402  1 74.999999999974861 19.999999999989107 4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 1.73500642330558  1 5.7206152947181215 10.376636886096147 2.0210802478716676  1 15.605981751912061 19.97957247426147 2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 3.9037644524380779  1 75.00000000002386 21.300894033984143 3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 1.4390619826715594  1 4.9710585634781923 11.274745544008159 1.6763394703172221  1 15.111989509197203 21.074552815149307 2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 3.2378894610107416  1 74.999999999984084 22.415640907590802 3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 1.0053096054874726  1 4.4401470075837057 11.910876533258277 1.1710685098072586  1 14.762094458918183 21.850128154895057 1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 2.261946612346911  1 75.000000000007219 23.205216896237388 2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 0.50265482457436672  1 4.1746945180467883 12.228938087750157 0.58553428033381372  1 14.587149100984806 22.237911020916648 0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 1.1309733552923047  1 74.999999999998124 23.599999999999262 1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 -2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 -5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 -2.141842990487521e-16  1 75.000000000000014 23.600000000000001 -2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+Triangulations 0
+
+TShapes 42
+Ve
+1.00000011584738e-07
+3.53553390593274 -3.53553390593274 0
+0 0
+
+0101101
+*
+Ve
+2.00001022062862e-07
+75 15.5 -6.88863824520386e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 1
+2  1 1 0 0 1
+2  2 2 0 0 1
+0
+
+0101000
++42 0 -41 0 *
+Ve
+2.00001005003195e-07
+-3.53553390593273 3.53553390593274 -7.40818758532816e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  2 0 0 3.14159265358979
+2  3 1 0 0 3.14159265358979
+2  4 3 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ve
+2.00001041588069e-07
+75 24.5 2.06659147356116e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 1
+2  5 1 0 0 1
+2  6 2 0 0 1
+0
+
+0101000
++39 0 -37 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 3.14159265358979
+2  7 1 0 0 3.14159265358979
+2  8 4 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +38 0 +36 0 -35 0 *
+Fa
+1  1e-07 1 0
+
+0111000
++34 0 *
+Ed
+ 1e-07 1 1 0
+1  5 0 0 3.14159265358979
+2  3 2 0 0 3.14159265358979
+2  9 5 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 3.14159265358979
+2  7 2 0 0 3.14159265358979
+2  10 6 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +32 0 +36 0 -31 0 *
+Fa
+1  1e-07 2 0
+
+0111000
++30 0 *
+Ve
+1.00000003092948e-07
+2.82842712474619 -2.82842712474619 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 1
+2  11 3 0 0 1
+2  12 5 0 0 1
+0
+
+0101000
++42 0 -28 0 *
+Ve
+2.000010012582e-07
+-2.82842712474619 2.82842712474619 9.68596121552874e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  8 0 0 3.14159265358979
+2  13 7 0 0 3.14159265358979
+2  14 3 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0 1
+2  15 3 0 0 1
+2  16 5 0 0 1
+0
+
+0101000
++39 0 -26 0 *
+Wi
+
+0101000
++38 0 -27 0 -25 0 +24 0 *
+Fa
+0  1e-07 3 0
+
+0111000
+-23 0 *
+Ve
+2.00001030198519e-07
+75 16.4 -5.51091059616309e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  10 0 0 1
+2  17 7 0 0 1
+2  18 8 0 0 1
+0
+
+0101000
++28 0 -21 0 *
+Ve
+2.00001064344293e-07
+75 23.5999999999999 1.65327317884893e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 0 1
+2  19 7 0 0 1
+2  20 8 0 0 1
+0
+
+0101000
++26 0 -19 0 *
+Ed
+ 1e-07 1 1 0
+1  12 0 0 3.14159265358979
+2  21 7 0 0 3.14159265358979
+2  22 4 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +25 0 +18 0 -17 0 *
+Fa
+1  1e-07 7 0
+
+0111000
++16 0 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0 3.14159265358979
+2  13 8 0 0 3.14159265358979
+2  23 5 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 3.14159265358979
+2  21 8 0 0 3.14159265358979
+2  24 6 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +14 0 +18 0 -13 0 *
+Fa
+1  1e-07 8 0
+
+0111000
++12 0 *
+Wi
+
+0101000
++32 0 -27 0 -14 0 +24 0 *
+Fa
+0  1e-07 5 0
+
+0111000
+-10 0 *
+Ed
+ 1e-07 1 1 0
+1  15 0 0 0.899999999999999
+2  25 4 0 0 0.899999999999999
+2  26 6 0 0 0.899999999999999
+0
+
+0101000
++41 0 -21 0 *
+Ed
+ 1e-07 1 1 0
+1  16 0 0 0.899999999999999
+2  27 4 0 0 0.899999999999999
+2  28 6 0 0 0.899999999999999
+0
+
+0101000
++37 0 -19 0 *
+Wi
+
+0101000
++35 0 -8 0 -17 0 +7 0 *
+Fa
+0  1e-07 4 0
+
+0111000
+-6 0 *
+Wi
+
+0101000
++31 0 -8 0 -13 0 +7 0 *
+Fa
+0  1e-07 6 0
+
+0111000
+-4 0 *
+Sh
+
+0101100
++33 0 -29 0 +22 0 -15 0 +11 0 -9 0 -5 0 +3 0 *
+So
+
+1100000
++2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/recettes/tuyau.py b/src/TEST_PY/recettes/tuyau.py
new file mode 100644 (file)
index 0000000..697c44d
--- /dev/null
@@ -0,0 +1,220 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS : 2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# ========================================================================================
+
+import geompy
+import hexablock
+
+# Charger la géométrie
+# ====================
+
+nom = "tuyau"
+
+geometrie = geompy.ImportBREP(nom+".brep")
+
+# Sélectionner des sous-parties de la géométrie
+# ---------------------------------------------
+
+aretes = geompy.SubShapeAllSortedCentres(geometrie, geompy.ShapeType["EDGE"])
+faces  = geompy.SubShapeAllSortedCentres(geometrie, geompy.ShapeType["FACE"])
+
+arc_int_bas  = aretes[12]
+arc_int_haut = aretes[13]
+arc_ext_bas  = aretes[11]
+arc_ext_haut = aretes[14]
+
+ell_int_bas  = aretes[2]
+ell_int_haut = aretes[3]
+ell_ext_bas  = aretes[1]
+ell_ext_haut = aretes[4]
+
+gen_int_avan = aretes[8]
+gen_int_arri = aretes[7]
+gen_ext_avan = aretes[9]
+gen_ext_arri = aretes[6]
+
+face_int_bas  = faces[4]
+face_int_haut = faces[5]
+face_ext_bas  = faces[2]
+face_ext_haut = faces[3]
+
+# Construire le modèle de bloc
+# ============================
+
+doc = hexablock.addDocument(nom)
+
+# Définir le tuyau
+# ----------------
+
+base = doc.addVertex(0, 0, 0)
+
+direction = doc.addVector(1, 0, 0)
+
+tuyau = doc.addPipe(base, direction, 1, 2, 10)
+
+# Construire le modele de blocs du tuyau
+# --------------------------------------
+
+depart = doc.addVector(0, 1, 0)
+
+modele = doc.makePipe(tuyau, depart, 1, 4, 1)
+
+# Associer le modèle de bloc à la géométrie
+# =========================================
+
+doc.setShape(geometrie)
+
+# Associer les cercles
+# --------------------
+
+cer_int_dep = modele.getVertexIJK(0, 0, 0)
+cer_ext_dep = modele.getVertexIJK(1, 0, 0)
+
+cer_int = []
+cer_ext = []
+for j in xrange(4):
+    a = modele.getEdgeJ(0, j, 0)
+    cer_int.append(a)
+
+    a = modele.getEdgeJ(1, j, 0)
+    cer_ext.append(a)
+
+doc.associateClosedLine(cer_int_dep, cer_int[0], cer_int[1:], arc_int_haut, 1, True, [arc_int_bas])
+doc.associateClosedLine(cer_ext_dep, cer_ext[0], cer_ext[1:], arc_ext_haut, 1, True, [arc_ext_bas])
+
+# Associer les ellipses
+# ---------------------
+
+ell_int_dep = modele.getVertexIJK(0, 0, 1)
+ell_ext_dep = modele.getVertexIJK(1, 0, 1)
+
+ell_int = []
+ell_ext = []
+for j in xrange(4):
+    a = modele.getEdgeJ(0, j, 1)
+    ell_int.append(a)
+
+    a = modele.getEdgeJ(1, j, 1)
+    ell_ext.append(a)
+
+doc.associateClosedLine(ell_int_dep, ell_int[0], ell_int[1:], ell_int_haut, 1, True, [ell_int_bas])
+doc.associateClosedLine(ell_ext_dep, ell_ext[0], ell_ext[1:], ell_ext_haut, 1, True, [ell_ext_bas])
+
+# Associer les génératrices
+# -------------------------
+
+def generatrice(face):
+    n = 10
+    l = []
+    for i in xrange(0, n+1):
+        v = float(i) / n
+        s = geompy.MakeVertexOnSurface(face, 0.5, v)
+        l.append(s)
+
+    return geompy.MakeInterpol(l)
+
+gen_int_haut = generatrice(face_int_haut)
+gen_ext_haut = generatrice(face_ext_haut)
+gen_int_bas  = generatrice(face_int_bas )
+gen_ext_bas  = generatrice(face_ext_bas )
+
+modele.getEdgeK(0, 0, 0).addAssociation(gen_int_arri, 0, 1)
+modele.getEdgeK(1, 0, 0).addAssociation(gen_ext_arri, 0, 1)
+
+modele.getEdgeK(0, 1, 0).addAssociation(gen_int_haut, 0, 1)
+modele.getEdgeK(1, 1, 0).addAssociation(gen_ext_haut, 0, 1)
+
+modele.getEdgeK(0, 2, 0).addAssociation(gen_int_avan, 0, 1)
+modele.getEdgeK(1, 2, 0).addAssociation(gen_ext_avan, 0, 1)
+
+modele.getEdgeK(0, 3, 0).addAssociation(gen_int_bas , 0, 1)
+modele.getEdgeK(1, 3, 0).addAssociation(gen_ext_bas , 0, 1)
+
+# Associer les faces courbées
+# ---------------------------
+
+modele.getQuadJK(0, 0, 0).addAssociation(face_int_haut)
+modele.getQuadJK(0, 1, 0).addAssociation(face_int_haut)
+modele.getQuadJK(0, 2, 0).addAssociation(face_int_bas )
+modele.getQuadJK(0, 3, 0).addAssociation(face_int_bas )
+
+modele.getQuadJK(1, 0, 0).addAssociation(face_ext_haut)
+modele.getQuadJK(1, 1, 0).addAssociation(face_ext_haut)
+modele.getQuadJK(1, 2, 0).addAssociation(face_ext_bas )
+modele.getQuadJK(1, 3, 0).addAssociation(face_ext_bas )
+
+# Mailler le modèle de bloc
+# =========================
+
+# Définir 3 groupes d'arêtes
+# --------------------------
+
+groupe_cercles      = doc.addEdgeGroup("Cercles")
+groupe_ellipses     = doc.addEdgeGroup("Ellipses")
+groupe_generatrices = doc.addEdgeGroup("Generatrices")
+
+# Définir 4 groupes de faces
+# --------------------------
+
+groupe_couronne  = doc.addQuadGroup("Couronne")
+groupe_ovale     = doc.addQuadGroup("Ovale")
+groupe_interieur = doc.addQuadGroup("Interieur")
+groupe_exterieur = doc.addQuadGroup("Exterieur")
+
+# Constituer les groupes d'arêtes
+# -------------------------------
+
+for i in xrange(2):
+    for j in xrange(4):
+        arete = modele.getEdgeJ(i, j, 0)
+        groupe_cercles.addElement(arete)
+
+        arete = modele.getEdgeJ(i, j, 1)
+        groupe_ellipses.addElement(arete)
+
+        arete = modele.getEdgeK(i, j, 0)
+        groupe_generatrices.addElement(arete)
+
+# Constituer les groupes de faces
+# -------------------------------
+
+for j in xrange(4):
+    quad = modele.getQuadIJ(0, j, 0)
+    groupe_couronne.addElement(quad)
+
+    quad = modele.getQuadIJ(0, j, 1)
+    groupe_ovale.addElement(quad)
+
+    quad = modele.getQuadJK(0, j, 0)
+    groupe_interieur.addElement(quad)
+
+    quad = modele.getQuadJK(1, j, 0)
+    groupe_exterieur.addElement(quad)
+
+# Mailler le modèle de bloc avec ses associations
+# -----------------------------------------------
+
+hexablock.addLaws(doc, 0.7, True)
+
+blocs = hexablock.mesh(doc)
+
+muv, mue, muq, muh = hexablock.dump(doc, blocs)
diff --git a/src/TEST_PY/recettes/tuyauterie.brep b/src/TEST_PY/recettes/tuyauterie.brep
new file mode 100644 (file)
index 0000000..53a6f34
--- /dev/null
@@ -0,0 +1,453 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 4
+1
+              1               0               0               0 
+              0 6.12303176911189e-17               1           -0.85 
+             -0              -1 6.12303176911189e-17            1.21 
+1
+              1               0               0               0 
+              0               1               0 2.12454146990217e-33 
+              0               0               1               0 
+2  2 -1 0
+2  1 -1 0
+Curve2ds 27
+8 0.43213918000000001 1
+7 0 0  8 51 8  0 0.057974973048721644  0.12705880864579566 0.057974973048721644  0.2539099842133129 0.058013130412506338  0.38101230069303388 0.058089233425549794  0.50881796547781766 0.058198420448244463  0.63777598863543805 0.058331366209715796  0.76855845644261167 0.058475210008542951  0.90184942018581316 0.058615837878117798  1.1603908050731355 0.05884638987324451  1.2938176747842225 0.058948538655720792  1.4311004606033966 0.059021738930595521  1.5691233166566314 0.059047237213743158  1.7057690592490571 0.059020605651136274  1.8389589148738439 0.058951314768299831  1.9660231276101112 0.058857055675589999  2.2148472039649869 0.058640879645439452  2.3446449893022403 0.058505685282760289  2.4727406188615979 0.058365061973598448  2.600211396033747 0.058230468440909788  2.7281615831303947 0.058114429959556665  2.8571063406978521 0.058028511035228755  2.9876417533064217 0.05798151257195476  3.2513931986371576 0.057969441199952315  3.3824833645552261 0.058004543027713996  3.5120070075398977 0.058080567537812058  3.6404436556268354 0.058189616224845676  3.7681893264387893 0.058320246353094705  3.8962293587889607 0.058459849104145284  4.025543957259722 0.058596791916897768  4.2177432204344898 0.058772285524456916  4.2771752013433915 0.058822885772890257  4.3376970136244637 0.058869559552688105  4.3995970589881201 0.058911159682938724  4.4630557931214794 0.058946265905414678  4.5281769254055853 0.058973302284005512  4.5949867122135721 0.058990762130679684  4.7324259034809506 0.059004425343315611  4.8020866055298672 0.059000335265522237  4.8713223410804538 0.058984637227204054  4.9395411683433403 0.058958099820587605  5.0064238057271977 0.05892237221742435  5.0718805891607035 0.058879317071258007  5.1361123997452296 0.05883045495943378  5.3440326274238314 0.058654957382429693  5.4833041467557475 0.058509864415703855  5.6197124297447845 0.058358205361044836  5.7540109884226185 0.058216107335680979  5.8869916197472572 0.058098512546392499  6.0191579290315538 0.058016250758760046  6.1510326975834273 0.057974973048721644  6.2831853071795862 0.057974973048721644 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 51 8  2.8046694147196725 1.02  2.8046694147196725 1.0213912939546714  2.8011845510548969 1.0227802996203506  2.7942354653450616 1.0241379265729234  2.7839013968400326 1.0254349604271367  2.7703349173982392 1.0266431582872593  2.7537177602174125 1.0277330463059269  2.7342864002988745 1.0286767812428046  2.6927352547334862 1.0301113321149289  2.6697527632440652 1.0306938080210208  2.6444873924783496 1.0310677074672538  2.6182882098630955 1.0311916223054141  2.5923953514458202 1.0310634969405577  2.5679301999656405 1.0307054881739262  2.5459402087482967 1.0301694383497306  2.5054575074320851 1.0288407275848013  2.4861726626550951 1.0279496064505724  2.46937130733009 1.0269140562461492  2.4552630924128249 1.0257488479109651  2.4441037478952703 1.0244736092007212  2.4362112430789074 1.0231095676972399  2.431915698688933 1.0216853889159643  2.430813020114603 1.0187980182107645  2.434021842821573 1.0173581233843794  2.4409228881612415 1.0159689014616622  2.4511885657293817 1.0146620388947645  2.4644938590098264 1.0134610113362843  2.4805517273753437 1.0123861271608721  2.4991235770257321 1.0114524146105124  2.5296149696364094 1.0103462092464146  2.5394210081235915 1.0100409510848061  2.5497426109398353 1.0097693958490934  2.5605999069330467 1.0095345759778975  2.5719903532561839 1.0093410062416865  2.5838848741973868 1.0091941462977709  2.5962230362528058 1.0090998249408509  2.6217012623105886 1.0090261204022954  2.634662693294922 1.0090483253525369  2.6475046399494779 1.0091324948761671  2.6600187323625426 1.0092754426083117  2.6720659258951187 1.0094713567959464  2.6835751502964555 1.0097139728150133  2.6945408548679346 1.0099985766824588  2.7287664580042592 1.0110647228661329  2.7496719308055635 1.012009078884508  2.7675835125941544 1.0131176172037806  2.7822241068458125 1.0143591469442126  2.7933883989530917 1.0157000849748916  2.8008995112046935 1.0171089226705528  2.8046694147196725 1.018552928924922  2.8046694147196725 1.02 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 51 8  0 0.057974973048721644  0.12705880864579566 0.057974973048721644  0.2539099842133129 0.058013130412506338  0.38101230069303388 0.058089233425549794  0.50881796547781766 0.058198420448244463  0.63777598863543805 0.058331366209715796  0.76855845644261167 0.058475210008542951  0.90184942018581316 0.058615837878117798  1.1603908050731355 0.05884638987324451  1.2938176747842225 0.058948538655720792  1.4311004606033966 0.059021738930595521  1.5691233166566314 0.059047237213743158  1.7057690592490571 0.059020605651136274  1.8389589148738439 0.058951314768299831  1.9660231276101112 0.058857055675589999  2.2148472039649869 0.058640879645439452  2.3446449893022403 0.058505685282760289  2.4727406188615979 0.058365061973598448  2.600211396033747 0.058230468440909788  2.7281615831303947 0.058114429959556665  2.8571063406978521 0.058028511035228755  2.9876417533064217 0.05798151257195476  3.2513931986371576 0.057969441199952315  3.3824833645552261 0.058004543027713996  3.5120070075398977 0.058080567537812058  3.6404436556268354 0.058189616224845676  3.7681893264387893 0.058320246353094705  3.8962293587889607 0.058459849104145284  4.025543957259722 0.058596791916897768  4.2177432204344898 0.058772285524456916  4.2771752013433915 0.058822885772890257  4.3376970136244637 0.058869559552688105  4.3995970589881201 0.058911159682938724  4.4630557931214794 0.058946265905414678  4.5281769254055853 0.058973302284005512  4.5949867122135721 0.058990762130679684  4.7324259034809506 0.059004425343315611  4.8020866055298672 0.059000335265522237  4.8713223410804538 0.058984637227204054  4.9395411683433403 0.058958099820587605  5.0064238057271977 0.05892237221742435  5.0718805891607035 0.058879317071258007  5.1361123997452296 0.05883045495943378  5.3440326274238314 0.058654957382429693  5.4833041467557475 0.058509864415703855  5.6197124297447845 0.058358205361044836  5.7540109884226185 0.058216107335680979  5.8869916197472572 0.058098512546392499  6.0191579290315538 0.058016250758760046  6.1510326975834273 0.057974973048721644  6.2831853071795862 0.057974973048721644 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 51 8  2.8046694147196725 1.02  2.8046694147196725 1.0213912939546714  2.8011845510548969 1.0227802996203506  2.7942354653450616 1.0241379265729234  2.7839013968400326 1.0254349604271367  2.7703349173982392 1.0266431582872593  2.7537177602174125 1.0277330463059269  2.7342864002988745 1.0286767812428046  2.6927352547334862 1.0301113321149289  2.6697527632440652 1.0306938080210208  2.6444873924783496 1.0310677074672538  2.6182882098630955 1.0311916223054141  2.5923953514458202 1.0310634969405577  2.5679301999656405 1.0307054881739262  2.5459402087482967 1.0301694383497306  2.5054575074320851 1.0288407275848013  2.4861726626550951 1.0279496064505724  2.46937130733009 1.0269140562461492  2.4552630924128249 1.0257488479109651  2.4441037478952703 1.0244736092007212  2.4362112430789074 1.0231095676972399  2.431915698688933 1.0216853889159643  2.430813020114603 1.0187980182107645  2.434021842821573 1.0173581233843794  2.4409228881612415 1.0159689014616622  2.4511885657293817 1.0146620388947645  2.4644938590098264 1.0134610113362843  2.4805517273753437 1.0123861271608721  2.4991235770257321 1.0114524146105124  2.5296149696364094 1.0103462092464146  2.5394210081235915 1.0100409510848061  2.5497426109398353 1.0097693958490934  2.5605999069330467 1.0095345759778975  2.5719903532561839 1.0093410062416865  2.5838848741973868 1.0091941462977709  2.5962230362528058 1.0090998249408509  2.6217012623105886 1.0090261204022954  2.634662693294922 1.0090483253525369  2.6475046399494779 1.0091324948761671  2.6600187323625426 1.0092754426083117  2.6720659258951187 1.0094713567959464  2.6835751502964555 1.0097139728150133  2.6945408548679346 1.0099985766824588  2.7287664580042592 1.0110647228661329  2.7496719308055635 1.012009078884508  2.7675835125941544 1.0131176172037806  2.7822241068458125 1.0143591469442126  2.7933883989530917 1.0157000849748916  2.8008995112046935 1.0171089226705528  2.8046694147196725 1.018552928924922  2.8046694147196725 1.02 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0.14999999999999999 1 0 
+2 0 0 1 0 -0 1 0.01095
+8 0.43213918000000001 1
+7 0 0  8 149 22  0 0.058999999999999997  0.097444755976146755 0.058999999999999997  0.18299280762162612 0.058521641903140902  0.25829496841018718 0.057768940923599035  0.32417412578674254 0.056884732409759914  0.38195693195367292 0.055965572417881644  0.43334858016886751 0.055046094579629688  0.48108201489215663 0.054112511302666644  0.56026993328171149 0.052422703987095212  0.59146757280750639 0.051720071469471732  0.62241288384917504 0.050989180927233722  0.65311791529610486 0.050233056775998985  0.68359829813091089 0.049454671379663008  0.71387324542943487 0.048656945050399046  0.74396555236074613 0.047842746048658083  0.80758256191447497 0.046083472533341475  0.84105587306945817 0.045135044819999887  0.87437090852161392 0.044173410978671911  0.90756937566490747 0.043202647374945856  0.94069187295574697 0.042227153094711124  0.97378445245098577 0.041251699834398567  1.0069051823459256 0.040281481791220958  1.069667092487977 0.038469365486382148  1.0992720658796193 0.037625865585019458  1.1289955828212435 0.036795294491045981  1.1588895151731511 0.035982452974340849  1.1890076535219487 0.035193313932941617  1.219405707180548 0.034435022393044287  1.2501413041881648 0.033715895509003321  1.3275088166127853 0.032049710262895457  1.3754588870556894 0.03114372415559611  1.424518486344853 0.030385116549664529  1.4743574040257441 0.029826165004021493  1.5248172660906634 0.029509468859583363  1.5758160193040032 0.029466483544411871  1.6270586359203898 0.029696400111757233  1.7029077956997172 0.030390433569122684  1.7279181467482749 0.030678927609708612  1.7527029912048959 0.031019697281673333  1.7772358933900485 0.031407185364548729  1.8015020492252676 0.031835931511690022  1.8254982862331575 0.032300572250275793  1.849233063537389 0.032795840981307979  1.9001515127741098 0.033924438878308767  1.9272529786535986 0.034567578902873222  1.9540696278854053 0.035239425275528168  1.9806399539897328 0.03593420348992233  2.0070021856227438 0.036646927311130333  2.0331942865765651 0.037373398775652621  2.0592539557792842 0.038110208191415522  2.1416301799610853 0.040472311491245735  2.1971389084073514 0.042112542209706956  2.2528790420508198 0.043766328993326456  2.3095653041977062 0.045427431754279345  2.3678287935637043 0.047089653597724032  2.4286242189952887 0.048744577336104482  2.4927864071158048 0.050383840328209396  2.5937759003593466 0.052697258084849576  2.6249024440053916 0.053377431856473534  2.6562815271820059 0.054027205764306918  2.6879227476252332 0.054643590070235698  2.7198305181643279 0.055223593763220544  2.7520040667217565 0.055764224559296881  2.7844374363131958 0.056262488901574897  2.8538781400175268 0.057224788032794009  2.8909698882365054 0.0576771166538241  2.928353960077211 0.058067976505772688  2.9659946334659613 0.058393460239248546  3.0038553525791638 0.058650283419937402  3.0418928465398505 0.058835913475513028  3.0800512481141933 0.058948698642548397  3.1522150939135072 0.059022927591907727  3.1862142334241819 0.058999775488404273  3.2202071736218301 0.058918240199938694  3.2541495872103576 0.058778634036795112  3.2879992769158011 0.058581882022519426  3.3217161754863298 0.058329521893919323  3.3552623456922452 0.058023704101064257  3.4386154597554421 0.057132380299386873  3.4882077258806876 0.056482872769331408  3.5372247262996472 0.0557276330074402  3.58564126300395 0.054876992081749613  3.6334552316512831 0.053941465860426051  3.6806712153179322 0.052931600189871482  3.7273142573763014 0.051858118934155997  3.8280698332236804 0.049396143218409648  3.8795632875986064 0.048044834522254332  3.9289495282055729 0.046685048526312264  3.9767888403769511 0.045321518749168066  4.0235350102768423 0.043958368779218437  4.0696079462415602 0.042599418104824968  4.1153981326692781 0.041248265148776109  4.1909473062313687 0.039052147176252737  4.2204917193889644 0.038201826366864804  4.250129907265249 0.037362056041529972  4.2799114594740839 0.036537320700094564  4.3098887575562692 0.035733170838363915  4.3401169749795416 0.034956222948102376  4.3706540771385782 0.034214159517033244  4.4474724778245696 0.032478217590645189  4.4950004371946886 0.031519457432078526  4.5436024841531566 0.030693455357571849  4.593012060019408 0.030050019802094971  4.6431083973772598 0.029633342319333074  4.6938794814870928 0.029478768288891708  4.7452020054484949 0.029601399481094127  4.8214890943126898 0.030153445189442837  4.846664959949277 0.030397651806103869  4.8716422231791459 0.030697753783434992  4.8963848533542667 0.031048555803700237  4.9208686489934852 0.031444704415912177  4.9450812377825084 0.031880688035831835  4.969022076573915 0.032350836945968742  5.0203513156955415 0.033431348772318993  5.0476590672803274 0.03405290679318191  5.0746613349639045 0.034706847386681339  5.1013946332204831 0.035386883209281711  5.1278963621760898 0.036087589545400166  5.1542048076085649 0.036804404307406578  5.1803591409475667 0.037533628035623531  5.2361582169629042 0.039116718891454627  5.2657583450099237 0.039972879317022876  5.2952513928349756 0.040836461026652046  5.3246848521098267 0.041703399779020218  5.3541021167586713 0.042570011239862662  5.3835424829581253 0.043432990981971752  5.4130411491372277 0.044289414485197034  5.485779627488462 0.046372448860411815  5.5297251589533474 0.04760570566451848  5.5749009607399307 0.048836547172490571  5.6217883113698965 0.050062630562129666  5.6707878060640793 0.051280867696952295  5.7227182801085563 0.052483067090123521  5.7782389476253906 0.053660768371427831  5.8676012402706368 0.055304807998654282  5.8956689927264287 0.055789143562354981  5.9239403774563755 0.056243033452468338  5.9524121818308418 0.056664427129646151  5.9810776238449348 0.057051369020961924  6.0099263521185255 0.057401998519910971  6.0389444458962336 0.057714549986410367  6.0913196754333772 0.058204372485695828  6.1155781114324768 0.058406850493982719  6.1410412339869431 0.058588651989399609  6.1677384865977452 0.05874403084119599  6.1955772453245848 0.058867629570130885  6.2243428187859164 0.058954479348472845  6.2536984481589366 0.058999999999999997  6.2831853071795862 0.058999999999999997 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+8 0.43213918000000001 1
+7 0 0  8 149 22  4.7123889803846897 0.048999999999999926  4.7966208880928844 0.048999999999999926  4.8705687823774966 0.049553388952159473  4.9353551367342572 0.0504242090388115  4.9916832373536302 0.051455380948773867  5.0407440687321046 0.052535577516685965  5.0840828151649946 0.053624694358571916  5.1240642799743021 0.05473815421032413  5.189739169551645 0.056775650194873219  5.2154411839464236 0.057628203870114518  5.2407475901100335 0.058521359212624885  5.2656511889976318 0.05945283960939466  5.290144997520601 0.060420621952003491  5.3142222485465398 0.061422936636620448  5.3378763908992752 0.062458267564003966  5.3872311377173157 0.064725926244214388  5.4128094008571352 0.065966364829160476  5.4378316676256526 0.067245403979573889  5.4622828096155924 0.068561761619553477  5.4861371403805466 0.069914394942964891  5.5093587746504236 0.071302757844342549  5.5319019875469246 0.072727058349791554  5.5730995669181507 0.075487703087347785  5.5918935647019925 0.076815586964060809  5.610060001753304 0.078172954704011866  5.6275422352759481 0.079560738827393479  5.6442605450748662 0.080980017348607533  5.6601121335560789 0.082432013776265176  5.6749711257266906 0.083918097113186874  5.7090601998176957 0.087699619820017588  5.7272754789731763 0.090078865466081223  5.7422861271748022 0.092545171721189395  5.7532197866704298 0.095074829268770158  5.7593816216817872 0.09765071914959178  5.7602403079116185 0.10025933856619466  5.7557630449099459 0.1028737457504515  5.7420763973787903 0.10671996554095034  5.7363742694169551 0.10798424379487775  5.7296133249398853 0.10923201498892597  5.7218875798824058 0.1104609367109594  5.7132885851957118 0.11166935976625864  5.7039054268473839 0.11285632817752014  5.6938247258213766 0.11402157918485636  5.670646889965627 0.11650095021348718  5.6573164700077712 0.11780752570569314  5.6432430553917579 0.11908624502147105  5.6285150208104078 0.12033804771042861  5.6132054385020504 0.12156383757272352  5.5973720782505358 0.12276448265906362  5.5810574073852264 0.12394081527070679  5.5278562030094971 0.12759827290255232  5.4895844749137437 0.12997148795657359  5.4493824928255847 0.13225720461751894  5.4069738627486092 0.13446975927700411  5.3621068456685936 0.13662068699367216  5.3141113164116707 0.13871091532257768  5.2624002680207234 0.14074035110264177  5.1794641624937414 0.14355734962721917  5.1537119682513497 0.1443791245304786  5.1275786174579707 0.1451587980901527  5.101071704229601 0.14589399649503171  5.0742023316076139 0.14658223728575939  5.0469851115587581 0.14722092935483291  5.0194381649751598 0.14780737294660276  4.9602535702685078 0.14893642906630977  4.9285189898864843 0.14946483050999276  4.8964323634745117 0.14991982270370427  4.8640423983771619 0.15029769228989101  4.8313986521133314 0.1505952870298983  4.7985566581522727 0.15081014899580447  4.7655830516896227 0.15094064776225502  4.7032084291877982 0.15102652638148439  4.6738145833243747 0.15099973652304521  4.644432469757878 0.15090544180587306  4.6151135041638707 0.15074392901072844  4.585907205968752 0.15051607391623809  4.5568611983497576 0.15022334129889517  4.5280212082349589 0.14986778493305936  4.4565423996728457 0.14882839135609593  4.4141785151578503 0.14806860706166369  4.3725160442057653 0.14718124063911861  4.3316199886952189 0.14617589823782434  4.291537412341305 0.14506191773825997  4.2523135816393758 0.14384818147936451  4.2139826592365779 0.14254319923934008  4.1322475991928593 0.13950829866142891  4.0911677613292374 0.13781680740946459  4.0524936820878654 0.13608387980470368  4.0158172852690734 0.13430959398709438  3.9808580524316923 0.1324913122813613  3.9473984588391349 0.13062408546411178  3.915309222268434 0.12869898652640158  3.8647699564185873 0.12541609558845382  3.8456086758192871 0.12410577835926616  3.8270476839097425 0.12276634672551995  3.8091371436296542 0.12139702627269737  3.791948373766437 0.11999683801497874  3.7755738489552271 0.11856459839524222  3.7601271996788808 0.11709891928506415  3.7243759442035036 0.11336891650066601  3.704991082917954 0.1110235914104331  3.6885668464673231 0.10859094933433266  3.6759364944072006 0.10609136216758523  3.6678106119879956 0.1035388854742539  3.6647847354264056 0.10094338391859695  3.6671616815770949 0.098322416804939472  3.6780242015282614 0.094445419552071461  3.6828368062046009 0.093169086762762698  3.6887697526168139 0.091907170910779171  3.6957349392867527 0.090662578272485403  3.703642169998854 0.089437498919070699  3.7123991538001353 0.08823340671654871  3.7219115050001945 0.087051059325757699  3.7439585342537769 0.08453544376274634  3.7567493943704475 0.08320948018147388  3.7703405322482153 0.081911814863836377  3.7846338060406111 0.080641620731522909  3.7995477233277013 0.079398036222618346  3.8150174411160935 0.078180165291603279  3.8309947658389318 0.076987077409354107  3.8662510641488148 0.074481567436999963  3.8856635513675037 0.073176939678848987  3.9056341196483224 0.071902925697917147  3.9261201859530619 0.070658861302484416  3.9470880795689474 0.069444416699883618  3.968513042108635 0.068259596496500471  3.9903792275102186 0.067104739697773572  4.0452020921591494 0.064340988628275433  4.0790976696607286 0.062743717071132202  4.1146182831192544 0.061180887925465798  4.1521082593006602 0.059650412207975984  4.1918622212889911 0.058152112751226316  4.2345540686386336 0.056692466904661648  4.2807277986097638 0.055278541306873236  4.3558601725778274 0.053323123921139637  4.3795621832082876 0.052749761338815218  4.4035300771399424 0.052214647147221127  4.4277521890481548 0.051719611075552958  4.4522139365814466 0.051266429504605159  4.4768978203614918 0.050856825466771088  4.5017834239831211 0.050492468646043003  4.546786290602423 0.049922403497759026  4.5676595894527443 0.049687170830929051  4.5895993900991385 0.049476256442920939  4.6126302045958552 0.049296200456645393  4.6366689775175374 0.049153104052525043  4.6615250859592203 0.04905262946849441  4.6869003395363302 0.048999999999999926  4.7123889803846888 0.048999999999999926 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 149 22  0 0.058999999999999997  0.097444755976146755 0.058999999999999997  0.18299280762162612 0.058521641903140902  0.25829496841018718 0.057768940923599035  0.32417412578674254 0.056884732409759914  0.38195693195367292 0.055965572417881644  0.43334858016886751 0.055046094579629688  0.48108201489215663 0.054112511302666644  0.56026993328171149 0.052422703987095212  0.59146757280750639 0.051720071469471732  0.62241288384917504 0.050989180927233722  0.65311791529610486 0.050233056775998985  0.68359829813091089 0.049454671379663008  0.71387324542943487 0.048656945050399046  0.74396555236074613 0.047842746048658083  0.80758256191447497 0.046083472533341475  0.84105587306945817 0.045135044819999887  0.87437090852161392 0.044173410978671911  0.90756937566490747 0.043202647374945856  0.94069187295574697 0.042227153094711124  0.97378445245098577 0.041251699834398567  1.0069051823459256 0.040281481791220958  1.069667092487977 0.038469365486382148  1.0992720658796193 0.037625865585019458  1.1289955828212435 0.036795294491045981  1.1588895151731511 0.035982452974340849  1.1890076535219487 0.035193313932941617  1.219405707180548 0.034435022393044287  1.2501413041881648 0.033715895509003321  1.3275088166127853 0.032049710262895457  1.3754588870556894 0.03114372415559611  1.424518486344853 0.030385116549664529  1.4743574040257441 0.029826165004021493  1.5248172660906634 0.029509468859583363  1.5758160193040032 0.029466483544411871  1.6270586359203898 0.029696400111757233  1.7029077956997172 0.030390433569122684  1.7279181467482749 0.030678927609708612  1.7527029912048959 0.031019697281673333  1.7772358933900485 0.031407185364548729  1.8015020492252676 0.031835931511690022  1.8254982862331575 0.032300572250275793  1.849233063537389 0.032795840981307979  1.9001515127741098 0.033924438878308767  1.9272529786535986 0.034567578902873222  1.9540696278854053 0.035239425275528168  1.9806399539897328 0.03593420348992233  2.0070021856227438 0.036646927311130333  2.0331942865765651 0.037373398775652621  2.0592539557792842 0.038110208191415522  2.1416301799610853 0.040472311491245735  2.1971389084073514 0.042112542209706956  2.2528790420508198 0.043766328993326456  2.3095653041977062 0.045427431754279345  2.3678287935637043 0.047089653597724032  2.4286242189952887 0.048744577336104482  2.4927864071158048 0.050383840328209396  2.5937759003593466 0.052697258084849576  2.6249024440053916 0.053377431856473534  2.6562815271820059 0.054027205764306918  2.6879227476252332 0.054643590070235698  2.7198305181643279 0.055223593763220544  2.7520040667217565 0.055764224559296881  2.7844374363131958 0.056262488901574897  2.8538781400175268 0.057224788032794009  2.8909698882365054 0.0576771166538241  2.928353960077211 0.058067976505772688  2.9659946334659613 0.058393460239248546  3.0038553525791638 0.058650283419937402  3.0418928465398505 0.058835913475513028  3.0800512481141933 0.058948698642548397  3.1522150939135072 0.059022927591907727  3.1862142334241819 0.058999775488404273  3.2202071736218301 0.058918240199938694  3.2541495872103576 0.058778634036795112  3.2879992769158011 0.058581882022519426  3.3217161754863298 0.058329521893919323  3.3552623456922452 0.058023704101064257  3.4386154597554421 0.057132380299386873  3.4882077258806876 0.056482872769331408  3.5372247262996472 0.0557276330074402  3.58564126300395 0.054876992081749613  3.6334552316512831 0.053941465860426051  3.6806712153179322 0.052931600189871482  3.7273142573763014 0.051858118934155997  3.8280698332236804 0.049396143218409648  3.8795632875986064 0.048044834522254332  3.9289495282055729 0.046685048526312264  3.9767888403769511 0.045321518749168066  4.0235350102768423 0.043958368779218437  4.0696079462415602 0.042599418104824968  4.1153981326692781 0.041248265148776109  4.1909473062313687 0.039052147176252737  4.2204917193889644 0.038201826366864804  4.250129907265249 0.037362056041529972  4.2799114594740839 0.036537320700094564  4.3098887575562692 0.035733170838363915  4.3401169749795416 0.034956222948102376  4.3706540771385782 0.034214159517033244  4.4474724778245696 0.032478217590645189  4.4950004371946886 0.031519457432078526  4.5436024841531566 0.030693455357571849  4.593012060019408 0.030050019802094971  4.6431083973772598 0.029633342319333074  4.6938794814870928 0.029478768288891708  4.7452020054484949 0.029601399481094127  4.8214890943126898 0.030153445189442837  4.846664959949277 0.030397651806103869  4.8716422231791459 0.030697753783434992  4.8963848533542667 0.031048555803700237  4.9208686489934852 0.031444704415912177  4.9450812377825084 0.031880688035831835  4.969022076573915 0.032350836945968742  5.0203513156955415 0.033431348772318993  5.0476590672803274 0.03405290679318191  5.0746613349639045 0.034706847386681339  5.1013946332204831 0.035386883209281711  5.1278963621760898 0.036087589545400166  5.1542048076085649 0.036804404307406578  5.1803591409475667 0.037533628035623531  5.2361582169629042 0.039116718891454627  5.2657583450099237 0.039972879317022876  5.2952513928349756 0.040836461026652046  5.3246848521098267 0.041703399779020218  5.3541021167586713 0.042570011239862662  5.3835424829581253 0.043432990981971752  5.4130411491372277 0.044289414485197034  5.485779627488462 0.046372448860411815  5.5297251589533474 0.04760570566451848  5.5749009607399307 0.048836547172490571  5.6217883113698965 0.050062630562129666  5.6707878060640793 0.051280867696952295  5.7227182801085563 0.052483067090123521  5.7782389476253906 0.053660768371427831  5.8676012402706368 0.055304807998654282  5.8956689927264287 0.055789143562354981  5.9239403774563755 0.056243033452468338  5.9524121818308418 0.056664427129646151  5.9810776238449348 0.057051369020961924  6.0099263521185255 0.057401998519910971  6.0389444458962336 0.057714549986410367  6.0913196754333772 0.058204372485695828  6.1155781114324768 0.058406850493982719  6.1410412339869431 0.058588651989399609  6.1677384865977452 0.05874403084119599  6.1955772453245848 0.058867629570130885  6.2243428187859164 0.058954479348472845  6.2536984481589366 0.058999999999999997  6.2831853071795862 0.058999999999999997 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+8 0 0.43213918000000001
+7 0 0  8 149 22  4.7123889803846897 0.048999999999999926  4.7966208880928844 0.048999999999999926  4.8705687823774966 0.049553388952159473  4.9353551367342572 0.0504242090388115  4.9916832373536302 0.051455380948773867  5.0407440687321046 0.052535577516685965  5.0840828151649946 0.053624694358571916  5.1240642799743021 0.05473815421032413  5.189739169551645 0.056775650194873219  5.2154411839464236 0.057628203870114518  5.2407475901100335 0.058521359212624885  5.2656511889976318 0.05945283960939466  5.290144997520601 0.060420621952003491  5.3142222485465398 0.061422936636620448  5.3378763908992752 0.062458267564003966  5.3872311377173157 0.064725926244214388  5.4128094008571352 0.065966364829160476  5.4378316676256526 0.067245403979573889  5.4622828096155924 0.068561761619553477  5.4861371403805466 0.069914394942964891  5.5093587746504236 0.071302757844342549  5.5319019875469246 0.072727058349791554  5.5730995669181507 0.075487703087347785  5.5918935647019925 0.076815586964060809  5.610060001753304 0.078172954704011866  5.6275422352759481 0.079560738827393479  5.6442605450748662 0.080980017348607533  5.6601121335560789 0.082432013776265176  5.6749711257266906 0.083918097113186874  5.7090601998176957 0.087699619820017588  5.7272754789731763 0.090078865466081223  5.7422861271748022 0.092545171721189395  5.7532197866704298 0.095074829268770158  5.7593816216817872 0.09765071914959178  5.7602403079116185 0.10025933856619466  5.7557630449099459 0.1028737457504515  5.7420763973787903 0.10671996554095034  5.7363742694169551 0.10798424379487775  5.7296133249398853 0.10923201498892597  5.7218875798824058 0.1104609367109594  5.7132885851957118 0.11166935976625864  5.7039054268473839 0.11285632817752014  5.6938247258213766 0.11402157918485636  5.670646889965627 0.11650095021348718  5.6573164700077712 0.11780752570569314  5.6432430553917579 0.11908624502147105  5.6285150208104078 0.12033804771042861  5.6132054385020504 0.12156383757272352  5.5973720782505358 0.12276448265906362  5.5810574073852264 0.12394081527070679  5.5278562030094971 0.12759827290255232  5.4895844749137437 0.12997148795657359  5.4493824928255847 0.13225720461751894  5.4069738627486092 0.13446975927700411  5.3621068456685936 0.13662068699367216  5.3141113164116707 0.13871091532257768  5.2624002680207234 0.14074035110264177  5.1794641624937414 0.14355734962721917  5.1537119682513497 0.1443791245304786  5.1275786174579707 0.1451587980901527  5.101071704229601 0.14589399649503171  5.0742023316076139 0.14658223728575939  5.0469851115587581 0.14722092935483291  5.0194381649751598 0.14780737294660276  4.9602535702685078 0.14893642906630977  4.9285189898864843 0.14946483050999276  4.8964323634745117 0.14991982270370427  4.8640423983771619 0.15029769228989101  4.8313986521133314 0.1505952870298983  4.7985566581522727 0.15081014899580447  4.7655830516896227 0.15094064776225502  4.7032084291877982 0.15102652638148439  4.6738145833243747 0.15099973652304521  4.644432469757878 0.15090544180587306  4.6151135041638707 0.15074392901072844  4.585907205968752 0.15051607391623809  4.5568611983497576 0.15022334129889517  4.5280212082349589 0.14986778493305936  4.4565423996728457 0.14882839135609593  4.4141785151578503 0.14806860706166369  4.3725160442057653 0.14718124063911861  4.3316199886952189 0.14617589823782434  4.291537412341305 0.14506191773825997  4.2523135816393758 0.14384818147936451  4.2139826592365779 0.14254319923934008  4.1322475991928593 0.13950829866142891  4.0911677613292374 0.13781680740946459  4.0524936820878654 0.13608387980470368  4.0158172852690734 0.13430959398709438  3.9808580524316923 0.1324913122813613  3.9473984588391349 0.13062408546411178  3.915309222268434 0.12869898652640158  3.8647699564185873 0.12541609558845382  3.8456086758192871 0.12410577835926616  3.8270476839097425 0.12276634672551995  3.8091371436296542 0.12139702627269737  3.791948373766437 0.11999683801497874  3.7755738489552271 0.11856459839524222  3.7601271996788808 0.11709891928506415  3.7243759442035036 0.11336891650066601  3.704991082917954 0.1110235914104331  3.6885668464673231 0.10859094933433266  3.6759364944072006 0.10609136216758523  3.6678106119879956 0.1035388854742539  3.6647847354264056 0.10094338391859695  3.6671616815770949 0.098322416804939472  3.6780242015282614 0.094445419552071461  3.6828368062046009 0.093169086762762698  3.6887697526168139 0.091907170910779171  3.6957349392867527 0.090662578272485403  3.703642169998854 0.089437498919070699  3.7123991538001353 0.08823340671654871  3.7219115050001945 0.087051059325757699  3.7439585342537769 0.08453544376274634  3.7567493943704475 0.08320948018147388  3.7703405322482153 0.081911814863836377  3.7846338060406111 0.080641620731522909  3.7995477233277013 0.079398036222618346  3.8150174411160935 0.078180165291603279  3.8309947658389318 0.076987077409354107  3.8662510641488148 0.074481567436999963  3.8856635513675037 0.073176939678848987  3.9056341196483224 0.071902925697917147  3.9261201859530619 0.070658861302484416  3.9470880795689474 0.069444416699883618  3.968513042108635 0.068259596496500471  3.9903792275102186 0.067104739697773572  4.0452020921591494 0.064340988628275433  4.0790976696607286 0.062743717071132202  4.1146182831192544 0.061180887925465798  4.1521082593006602 0.059650412207975984  4.1918622212889911 0.058152112751226316  4.2345540686386336 0.056692466904661648  4.2807277986097638 0.055278541306873236  4.3558601725778274 0.053323123921139637  4.3795621832082876 0.052749761338815218  4.4035300771399424 0.052214647147221127  4.4277521890481548 0.051719611075552958  4.4522139365814466 0.051266429504605159  4.4768978203614918 0.050856825466771088  4.5017834239831211 0.050492468646043003  4.546786290602423 0.049922403497759026  4.5676595894527443 0.049687170830929051  4.5895993900991385 0.049476256442920939  4.6126302045958552 0.049296200456645393  4.6366689775175374 0.049153104052525043  4.6615250859592203 0.04905262946849441  4.6869003395363302 0.048999999999999926  4.7123889803846888 0.048999999999999926 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 0.058999999999999997
+1 0 2.0499999999999998 1 0 
+2 0 0 1 0 -0 1 0.058999999999999997
+1 1.5707963267948966 10.995574287564276 -0 -1 
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0.35899999999999999 1 0 
+2 0 0 1 0 -0 1 0.050999999999999997
+8 1.5707963267948966 3.1415926535897931
+1 0 4.7123889803846897 1 0 
+1 0 10.995574287564276 1 0 
+8 0 6.2831853071795862
+1 1.5707963267948966 10.995574287564276 -0 -1 
+8 0 6.2831853071795862
+1 3.1415926535897931 10.995574287564276 -0 -1 
+Curves 13
+7 0 0  8 51 8  -0.0556827994439111 0.01950450835292121 -6.0986372202309624e-20  -0.0556827994439111 0.01950450835292121 0.0013912939546714626  -0.05561482733877663 0.019698554220080794 0.0027802996203490798  -0.055479297426835189 0.020085504939596262 0.0041379265729281217  -0.055273926820561141 0.020659591309432179 0.0054349604271301784  -0.054994320583595782 0.021409775040913341 0.0066431582872640707  -0.054633784934225528 0.022321928701216007 0.0077330463059251909  -0.054186437597229596 0.023378012756673484 0.008676781242804809  -0.053165775269001715 0.025606955756789108 0.010111332114929171  -0.052578065020521585 0.026829197332238503 0.010693808021021335  -0.051896588587147838 0.028155949688751462 0.011067707467253194  -0.051145076568110917 0.029508603254517707 0.011191622305414433  -0.050357505192240408 0.03081945376689893 0.011063496940558594  -0.049576262780124461 0.032034023552038 0.010705488173925677  -0.048847531570446585 0.033107704846841737 0.010169438349730659  -0.047470979410838297 0.035059611066250877 0.0088407275848012695  -0.046788793720451277 0.035970802616840443 0.007949606450570891  -0.04617619046427264 0.036750615963094993 0.0069140562461536843  -0.045648790701466824 0.037394912082808041 0.0057488479109600388  -0.045224242525239586 0.037898174131575868 0.0044736092007243563  -0.044921000963439685 0.038251566074931388 0.0031095676972394477  -0.044755778872954649 0.038443742203634314 0.0016853889159642373  -0.044713360598481321 0.038493070066186616 -0.0012019817892355458  -0.04483677830921691 0.038349507976164515 -0.0026418766156193181  -0.045102620265342695 0.038041105221557049 -0.0040310985383402668  -0.045494945879757172 0.037579674698366865 -0.005337961105232973  -0.045995210481875617 0.036974451246747961 -0.0065389886637167716  -0.04658481870815312 0.036232425344386844 -0.0076138728391275607  -0.047247198127308529 0.03535903616202405 -0.0085475853894874561  -0.048294386003606103 0.033896240770324763 -0.0096537907535854343  -0.048626391656185909 0.033422390608523311 -0.0099590489151942952  -0.048970434803703992 0.032919837956621387 -0.010230604150906037  -0.049326122035805005 0.032386969859520408 -0.010465424022101903  -0.049692143324902842 0.031823214835103246 -0.010658993758313388  -0.050066245756993907 0.031229323172667658 -0.010805853702228896  -0.050445277908306538 0.030607739922240584 -0.010900175059148847  -0.051208687218265082 0.029312802635693136 -0.010973879597704132  -0.05158754159679637 0.028648427447820271 -0.010951674647463366  -0.051952777404993905 0.027984424394642271 -0.010867505123831962  -0.052298803072888422 0.027332015543893109 -0.010724557391688023  -0.052622870295298219 0.026699259443285123 -0.010528643204054014  -0.052924464838840765 0.026090772078251195 -0.01028602718498622  -0.053204734703804005 0.025507606208655931 -0.01000142331754111  -0.054058584300373462 0.023677700171367288 -0.0089352771338671363  -0.05454565464713379 0.022543883650466716 -0.0079909211154902803  -0.054937494791069581 0.021561878503406007 -0.0068823827962242005  -0.055240560879673453 0.020752756589166636 -0.0056408530557814319  -0.055462778847121551 0.020132674200613428 -0.0042999150251120683  -0.055609267090452143 0.019714425545189287 -0.0028910773294460487  -0.0556827994439111 0.01950450835292121 -0.0014470710750779392  -0.0556827994439111 0.01950450835292121 -2.4919709308221516e-18 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+7 0 0  8 51 8  -0.0556827994439111 0.01950450835292121 -6.0986372202309624e-20  -0.0556827994439111 0.01950450835292121 0.0013912939546714626  -0.05561482733877663 0.019698554220080794 0.0027802996203490798  -0.055479297426835189 0.020085504939596262 0.0041379265729281217  -0.055273926820561141 0.020659591309432179 0.0054349604271301784  -0.054994320583595782 0.021409775040913341 0.0066431582872640707  -0.054633784934225528 0.022321928701216007 0.0077330463059251909  -0.054186437597229596 0.023378012756673484 0.008676781242804809  -0.053165775269001715 0.025606955756789108 0.010111332114929171  -0.052578065020521585 0.026829197332238503 0.010693808021021335  -0.051896588587147838 0.028155949688751462 0.011067707467253194  -0.051145076568110917 0.029508603254517707 0.011191622305414433  -0.050357505192240408 0.03081945376689893 0.011063496940558594  -0.049576262780124461 0.032034023552038 0.010705488173925677  -0.048847531570446585 0.033107704846841737 0.010169438349730659  -0.047470979410838297 0.035059611066250877 0.0088407275848012695  -0.046788793720451277 0.035970802616840443 0.007949606450570891  -0.04617619046427264 0.036750615963094993 0.0069140562461536843  -0.045648790701466824 0.037394912082808041 0.0057488479109600388  -0.045224242525239586 0.037898174131575868 0.0044736092007243563  -0.044921000963439685 0.038251566074931388 0.0031095676972394477  -0.044755778872954649 0.038443742203634314 0.0016853889159642373  -0.044713360598481321 0.038493070066186616 -0.0012019817892355458  -0.04483677830921691 0.038349507976164515 -0.0026418766156193181  -0.045102620265342695 0.038041105221557049 -0.0040310985383402668  -0.045494945879757172 0.037579674698366865 -0.005337961105232973  -0.045995210481875617 0.036974451246747961 -0.0065389886637167716  -0.04658481870815312 0.036232425344386844 -0.0076138728391275607  -0.047247198127308529 0.03535903616202405 -0.0085475853894874561  -0.048294386003606103 0.033896240770324763 -0.0096537907535854343  -0.048626391656185909 0.033422390608523311 -0.0099590489151942952  -0.048970434803703992 0.032919837956621387 -0.010230604150906037  -0.049326122035805005 0.032386969859520408 -0.010465424022101903  -0.049692143324902842 0.031823214835103246 -0.010658993758313388  -0.050066245756993907 0.031229323172667658 -0.010805853702228896  -0.050445277908306538 0.030607739922240584 -0.010900175059148847  -0.051208687218265082 0.029312802635693136 -0.010973879597704132  -0.05158754159679637 0.028648427447820271 -0.010951674647463366  -0.051952777404993905 0.027984424394642271 -0.010867505123831962  -0.052298803072888422 0.027332015543893109 -0.010724557391688023  -0.052622870295298219 0.026699259443285123 -0.010528643204054014  -0.052924464838840765 0.026090772078251195 -0.01028602718498622  -0.053204734703804005 0.025507606208655931 -0.01000142331754111  -0.054058584300373462 0.023677700171367288 -0.0089352771338671363  -0.05454565464713379 0.022543883650466716 -0.0079909211154902803  -0.054937494791069581 0.021561878503406007 -0.0068823827962242005  -0.055240560879673453 0.020752756589166636 -0.0056408530557814319  -0.055462778847121551 0.020132674200613428 -0.0042999150251120683  -0.055609267090452143 0.019714425545189287 -0.0028910773294460487  -0.0556827994439111 0.01950450835292121 -0.0014470710750779392  -0.0556827994439111 0.01950450835292121 -2.4919709308221516e-18 
+ 0 9 0.16892038644087748 7 0.31746884501648859 7 0.49261453710585534 7 0.66792465932236034 7 0.74518911870768723 7 0.82315694109047421 7 1 9
+1 -0.005474999999999999 -0.0094829781714396034 -2.6818879148710061e-18 -0.86602540378443871 0.49999999999999994 8.1250169528836513e-33 
+2 -0.12990381056766581 0.074999999999999983 0 -0.86602540378443871 0.49999999999999994 0 -0.49999999999999994 -0.86602540378443871 0 0 0 1 0.01095
+7 0 0  8 149 22  -2.5004412602946946e-18 -0.058999999999999997 -0.97100000000000009  0.0049696825547834765 -0.058999999999999997 -0.97100000000000009  0.0093325834605814621 -0.058521641903140638 -0.97044661104784047  0.013101418333911055 -0.057768940923599514 -0.96957579096118907  0.016318044987109044 -0.056884732409759727 -0.96854461905122546  0.01906948829391493 -0.055965572417881422 -0.96746442248331466  0.021459334749957544 -0.055046094579629862 -0.96637530564142793  0.023628175197915435 -0.054112511302666644 -0.96526184578967589  0.027115117917322969 -0.052422703987095212 -0.96322434980512694  0.028459710217652558 -0.051720071469471732 -0.96237179612988566  0.02976290098580683 -0.050989180927233722 -0.96147864078737522  0.031024133582428753 -0.050233056775998985 -0.96054716039060528  0.032243055025160401 -0.049454671379663008 -0.95957937804799642  0.033419515988642928 -0.048656945050399046 -0.95857706336337944  0.034553570804516612 -0.047842746048658083 -0.95754173243599594  0.036873978825926829 -0.046083472533341475 -0.95527407375578577  0.038048725316158584 -0.04513504481999988 -0.95403363517083961  0.039170290381070366 -0.044173410978671897 -0.95275459602042611  0.040238974608944524 -0.043202647374945856 -0.9514382383804465  0.041254888316309996 -0.042227153094711131 -0.95008560505703521  0.04221803413686076 -0.041251699834398567 -0.94869724215565743  0.043128389610374282 -0.040281481791220958 -0.94727294165020837  0.044748367646809659 -0.038469365486382148 -0.94451229691265259  0.045468595650885534 -0.037625865585019458 -0.94318441303593925  0.046146719631528964 -0.036795294491045981 -0.94182704529598837  0.046782357068906821 -0.035982452974340863 -0.94043926117260646  0.047374697075681461 -0.035193313932941624 -0.9390199826513923  0.047922500397010827 -0.034435022393044287 -0.93756798622373483  0.048424099410548448 -0.033715895509003321 -0.93608190288681326  0.049550587268678427 -0.032049710262895457 -0.93230038017998251  0.050129335444327135 -0.031143724155592592 -0.92992113453391656  0.050587171711697701 -0.030385116549675659 -0.92745482827881653  0.050909234076023921 -0.02982616500400628 -0.92492517073122349  0.05108764048313192 -0.0295094688595939 -0.92234928085041179  0.051114653060183222 -0.02946648354440869 -0.91974066143380462  0.050984454592606476 -0.029696400111757237 -0.91712625424954852  0.050571667092538401 -0.030390433569122684 -0.91328003445904971  0.050398607788464403 -0.030678927609708615 -0.91201575620512221  0.050191230809071875 -0.031019697281673347 -0.91076798501107414  0.049951103907107719 -0.031407185364548743 -0.90953906328904077  0.04967975277356048 -0.031835931511690028 -0.90833064023374144  0.049378661037660358 -0.032300572250275793 -0.9071436718224799  0.049049270266879198 -0.032795840981307979 -0.90597842081514379  0.048277064322970839 -0.033924438878308767 -0.90349904978651274  0.047824221999431246 -0.034567578902873222 -0.90219247429430693  0.047336025571794685 -0.035239425275528168 -0.90091375497852921  0.046813757055684524 -0.03593420348992233 -0.89966195228957158  0.046258407906864529 -0.036646927311130333 -0.89843616242727675  0.04567067902123894 -0.037373398775652621 -0.89723551734093654  0.045050980734852378 -0.038110208191415522 -0.89605918472929325  0.04298386208302421 -0.040472311491245735 -0.89240172709744769  0.041429442674571985 -0.042112542209707393 -0.89002851204342892  0.039723843950829382 -0.043766328993325332 -0.88774279538247469  0.037845978677936057 -0.04542743175428051 -0.8855302407230029  0.035776145563714397 -0.047089653597723449 -0.88337931300632444  0.033469784773098483 -0.048744577336104593 -0.88128908467742306  0.030886977671371708 -0.050383840328209396 -0.8792596488973583  0.026575156672211202 -0.052697258084849576 -0.87644265037278057  0.025215819330877302 -0.053377431856473534 -0.87562087546952128  0.023816328025213974 -0.054027205764306918 -0.87484120190984704  0.022377474975260922 -0.054643590070235698 -0.87410600350496825  0.020900480807449766 -0.055223593763220544 -0.87341776271424065  0.019386994554604055 -0.055764224559296881 -0.87277907064516702  0.017839093655939268 -0.056262488901574897 -0.87219262705339695  0.01448241616914368 -0.057224788032794009 -0.87106357093369036  0.012664341512342765 -0.057677116653824106 -0.87053516949000753  0.010809888176166868 -0.058067976505772702 -0.87008017729629583  0.0089241358183845959 -0.058393460239248546 -0.86970230771010915  0.0070126212750772484 -0.058650283419937388 -0.86940471297010191  0.0050815442706897054 -0.058835913475513021 -0.86918985100419577  0.0031379731280812748 -0.058948698642548397 -0.86905935223774511  -0.00054138091153253646 -0.059022927591907727 -0.86897347361851562  -0.0022765174910491207 -0.058999775488404273 -0.86900026347695458  -0.0040097825514356401 -0.058918240199938694 -0.86909455819412695  -0.0057358409944945447 -0.058778634036795112 -0.8692560709892716  -0.0074495993323682678 -0.058581882022519426 -0.86948392608376202  -0.0091462056875392158 -0.058329521893919323 -0.86977665870110499  -0.010821049792829775 -0.058023704101064257 -0.87013221506694083  -0.014943031956337432 -0.057132380299386873 -0.87117160864390419  -0.017359824269599054 -0.056482872769331449 -0.8719313929383351  -0.019704142205801793 -0.055727633007440158 -0.87281875936088349  -0.021967840188780171 -0.054876992081749572 -0.87382410176217562  -0.024145100895452215 -0.053941465860426072 -0.87493808226173786  -0.026231435167424526 -0.052931600189871496 -0.87615181852063695  -0.028224173344926922 -0.05185811893415599 -0.87745680076066002  -0.032370727810448231 -0.049396143218409648 -0.88049170133857102  -0.034387115788041385 -0.048044834522254345 -0.88218319259053524  -0.036224385786954826 -0.046685048526312251 -0.88391612019529675  -0.037909472216589704 -0.045321518749168066 -0.88569040601290561  -0.039461649306085284 -0.043958368779218451 -0.88750868771863822  -0.040896431853979981 -0.042599418104824947 -0.88937591453588849  -0.042224214328679649 -0.041248265148776109 -0.89130101347359858  -0.044241216211312544 -0.039052147176252737 -0.89458390441154645  -0.044986702488051783 -0.038201826366864804 -0.89589422164073373  -0.0456902688892067 -0.037362056041529972 -0.8972336532744799  -0.046351640358389658 -0.036537320700094564 -0.8986029737273028  -0.046970154271562981 -0.035733170838363915 -0.90000316198502128  -0.047544760437038987 -0.034956222948102376 -0.90143540160475766  -0.048074021095479952 -0.034214159517033244 -0.90290108071493569  -0.049272250486433494 -0.032478217590645189 -0.90663108349933408  -0.049896574586265847 -0.031519457432078825 -0.90897640858956852  -0.050404251921731993 -0.030693455357571325 -0.91140905066566491  -0.050780355152930869 -0.030050019802095027 -0.91390863783241483  -0.051017324340267775 -0.029633342319333619 -0.91646111452574874  -0.051106750202303868 -0.029478768288891333 -0.91905661608140143  -0.051038617096464088 -0.029601399481094127 -0.92167758319506055  -0.050713065514755636 -0.030153445189442837 -0.92555458044792871  -0.050568214107868437 -0.030397651806103869 -0.92683091323723754  -0.050388004021440072 -0.030697753783434992 -0.92809282908922097  -0.050173896324957223 -0.031048555803700237 -0.92933742172751466  -0.049927400545448475 -0.031444704415912177 -0.93056250108092931  -0.049650074667484299 -0.031880688035831835 -0.93176659328345124  -0.049343525133177017 -0.032350836945968742 -0.93294894067424239  -0.048619295141518984 -0.033431348772318993 -0.93546455623725377  -0.048191184908312382 -0.03405290679318191 -0.93679051981852601  -0.047726863342594496 -0.034706847386681339 -0.93808818513616377  -0.047227799336003337 -0.035386883209281711 -0.93935837926847732  -0.04669514347178147 -0.036087589545400166 -0.94060196377738192  -0.046129728024776037 -0.036804404307406578 -0.94181983470839692  -0.045532066961438758 -0.037533628035623531 -0.94301292259064595  -0.04418272296743702 -0.039116718891454627 -0.94551843256300028  -0.043421561648771638 -0.039972879317022876 -0.94682306032115104  -0.042619279339682965 -0.040836461026652046 -0.94809707430208268  -0.041776146432214646 -0.041703399779020218 -0.94934113869751546  -0.040892296354600663 -0.042570011239862662 -0.95055558330011625  -0.039967725571265371 -0.043432990981971752 -0.95174040350349942  -0.039002293582823491 -0.044289414485197034 -0.95289526030222627  -0.03652776835209777 -0.046372448860411815 -0.9556590113717246  -0.034951882413013717 -0.047605705664521082 -0.95725628292886789  -0.03325243898636502 -0.048836547172482328 -0.9588191120745343  -0.031407386455908577 -0.050062630562141122 -0.96034958779202395  -0.029396944428309858 -0.051280867696944135 -0.96184788724877379  -0.027178049517528086 -0.052483067090126068 -0.96330753309533834  -0.024714936087704479 -0.053660768371427831 -0.96472145869312687  -0.020598270110407418 -0.055304807998654282 -0.96667687607886055  -0.019285863235498184 -0.055789143562354981 -0.96725023866118498  -0.017945667415101341 -0.056243033452468338 -0.96778535285277878  -0.01657897879069924 -0.056664427129646151 -0.96828038892444701  -0.015187408703495131 -0.057051369020961903 -0.9687335704953951  -0.013772883694413218 -0.05740199851991095 -0.96914317453322918  -0.012337645504098623 -0.057714549986410367 -0.96950753135395706  -0.009728048402828135 -0.058204372485695828 -0.9700775965022409  -0.008512852637472125 -0.058406850493982719 -0.97031282916907113  -0.0072305586269535852 -0.058588651989399609 -0.97052374355707938  -0.0058797907263685749 -0.05874403084119599 -0.97070379954335484  -0.0044659027958050147 -0.058867629570130885 -0.97084689594747486  -0.0030009782003426765 -0.058954479348472845 -0.97094737053150559  -0.0015038298100531853 -0.058999999999999997 -0.97100000000000009  -1.3823577699190182e-17 -0.058999999999999997 -0.97100000000000009 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+7 0 0  8 149 22  -2.5004412602946946e-18 -0.058999999999999997 -0.97100000000000009  0.0049696825547834765 -0.058999999999999997 -0.97100000000000009  0.0093325834605814621 -0.058521641903140638 -0.97044661104784047  0.013101418333911055 -0.057768940923599514 -0.96957579096118907  0.016318044987109044 -0.056884732409759727 -0.96854461905122546  0.01906948829391493 -0.055965572417881422 -0.96746442248331466  0.021459334749957544 -0.055046094579629862 -0.96637530564142793  0.023628175197915435 -0.054112511302666644 -0.96526184578967589  0.027115117917322969 -0.052422703987095212 -0.96322434980512694  0.028459710217652558 -0.051720071469471732 -0.96237179612988566  0.02976290098580683 -0.050989180927233722 -0.96147864078737522  0.031024133582428753 -0.050233056775998985 -0.96054716039060528  0.032243055025160401 -0.049454671379663008 -0.95957937804799642  0.033419515988642928 -0.048656945050399046 -0.95857706336337944  0.034553570804516612 -0.047842746048658083 -0.95754173243599594  0.036873978825926829 -0.046083472533341475 -0.95527407375578577  0.038048725316158584 -0.04513504481999988 -0.95403363517083961  0.039170290381070366 -0.044173410978671897 -0.95275459602042611  0.040238974608944524 -0.043202647374945856 -0.9514382383804465  0.041254888316309996 -0.042227153094711131 -0.95008560505703521  0.04221803413686076 -0.041251699834398567 -0.94869724215565743  0.043128389610374282 -0.040281481791220958 -0.94727294165020837  0.044748367646809659 -0.038469365486382148 -0.94451229691265259  0.045468595650885534 -0.037625865585019458 -0.94318441303593925  0.046146719631528964 -0.036795294491045981 -0.94182704529598837  0.046782357068906821 -0.035982452974340863 -0.94043926117260646  0.047374697075681461 -0.035193313932941624 -0.9390199826513923  0.047922500397010827 -0.034435022393044287 -0.93756798622373483  0.048424099410548448 -0.033715895509003321 -0.93608190288681326  0.049550587268678427 -0.032049710262895457 -0.93230038017998251  0.050129335444327135 -0.031143724155592592 -0.92992113453391656  0.050587171711697701 -0.030385116549675659 -0.92745482827881653  0.050909234076023921 -0.02982616500400628 -0.92492517073122349  0.05108764048313192 -0.0295094688595939 -0.92234928085041179  0.051114653060183222 -0.02946648354440869 -0.91974066143380462  0.050984454592606476 -0.029696400111757237 -0.91712625424954852  0.050571667092538401 -0.030390433569122684 -0.91328003445904971  0.050398607788464403 -0.030678927609708615 -0.91201575620512221  0.050191230809071875 -0.031019697281673347 -0.91076798501107414  0.049951103907107719 -0.031407185364548743 -0.90953906328904077  0.04967975277356048 -0.031835931511690028 -0.90833064023374144  0.049378661037660358 -0.032300572250275793 -0.9071436718224799  0.049049270266879198 -0.032795840981307979 -0.90597842081514379  0.048277064322970839 -0.033924438878308767 -0.90349904978651274  0.047824221999431246 -0.034567578902873222 -0.90219247429430693  0.047336025571794685 -0.035239425275528168 -0.90091375497852921  0.046813757055684524 -0.03593420348992233 -0.89966195228957158  0.046258407906864529 -0.036646927311130333 -0.89843616242727675  0.04567067902123894 -0.037373398775652621 -0.89723551734093654  0.045050980734852378 -0.038110208191415522 -0.89605918472929325  0.04298386208302421 -0.040472311491245735 -0.89240172709744769  0.041429442674571985 -0.042112542209707393 -0.89002851204342892  0.039723843950829382 -0.043766328993325332 -0.88774279538247469  0.037845978677936057 -0.04542743175428051 -0.8855302407230029  0.035776145563714397 -0.047089653597723449 -0.88337931300632444  0.033469784773098483 -0.048744577336104593 -0.88128908467742306  0.030886977671371708 -0.050383840328209396 -0.8792596488973583  0.026575156672211202 -0.052697258084849576 -0.87644265037278057  0.025215819330877302 -0.053377431856473534 -0.87562087546952128  0.023816328025213974 -0.054027205764306918 -0.87484120190984704  0.022377474975260922 -0.054643590070235698 -0.87410600350496825  0.020900480807449766 -0.055223593763220544 -0.87341776271424065  0.019386994554604055 -0.055764224559296881 -0.87277907064516702  0.017839093655939268 -0.056262488901574897 -0.87219262705339695  0.01448241616914368 -0.057224788032794009 -0.87106357093369036  0.012664341512342765 -0.057677116653824106 -0.87053516949000753  0.010809888176166868 -0.058067976505772702 -0.87008017729629583  0.0089241358183845959 -0.058393460239248546 -0.86970230771010915  0.0070126212750772484 -0.058650283419937388 -0.86940471297010191  0.0050815442706897054 -0.058835913475513021 -0.86918985100419577  0.0031379731280812748 -0.058948698642548397 -0.86905935223774511  -0.00054138091153253646 -0.059022927591907727 -0.86897347361851562  -0.0022765174910491207 -0.058999775488404273 -0.86900026347695458  -0.0040097825514356401 -0.058918240199938694 -0.86909455819412695  -0.0057358409944945447 -0.058778634036795112 -0.8692560709892716  -0.0074495993323682678 -0.058581882022519426 -0.86948392608376202  -0.0091462056875392158 -0.058329521893919323 -0.86977665870110499  -0.010821049792829775 -0.058023704101064257 -0.87013221506694083  -0.014943031956337432 -0.057132380299386873 -0.87117160864390419  -0.017359824269599054 -0.056482872769331449 -0.8719313929383351  -0.019704142205801793 -0.055727633007440158 -0.87281875936088349  -0.021967840188780171 -0.054876992081749572 -0.87382410176217562  -0.024145100895452215 -0.053941465860426072 -0.87493808226173786  -0.026231435167424526 -0.052931600189871496 -0.87615181852063695  -0.028224173344926922 -0.05185811893415599 -0.87745680076066002  -0.032370727810448231 -0.049396143218409648 -0.88049170133857102  -0.034387115788041385 -0.048044834522254345 -0.88218319259053524  -0.036224385786954826 -0.046685048526312251 -0.88391612019529675  -0.037909472216589704 -0.045321518749168066 -0.88569040601290561  -0.039461649306085284 -0.043958368779218451 -0.88750868771863822  -0.040896431853979981 -0.042599418104824947 -0.88937591453588849  -0.042224214328679649 -0.041248265148776109 -0.89130101347359858  -0.044241216211312544 -0.039052147176252737 -0.89458390441154645  -0.044986702488051783 -0.038201826366864804 -0.89589422164073373  -0.0456902688892067 -0.037362056041529972 -0.8972336532744799  -0.046351640358389658 -0.036537320700094564 -0.8986029737273028  -0.046970154271562981 -0.035733170838363915 -0.90000316198502128  -0.047544760437038987 -0.034956222948102376 -0.90143540160475766  -0.048074021095479952 -0.034214159517033244 -0.90290108071493569  -0.049272250486433494 -0.032478217590645189 -0.90663108349933408  -0.049896574586265847 -0.031519457432078825 -0.90897640858956852  -0.050404251921731993 -0.030693455357571325 -0.91140905066566491  -0.050780355152930869 -0.030050019802095027 -0.91390863783241483  -0.051017324340267775 -0.029633342319333619 -0.91646111452574874  -0.051106750202303868 -0.029478768288891333 -0.91905661608140143  -0.051038617096464088 -0.029601399481094127 -0.92167758319506055  -0.050713065514755636 -0.030153445189442837 -0.92555458044792871  -0.050568214107868437 -0.030397651806103869 -0.92683091323723754  -0.050388004021440072 -0.030697753783434992 -0.92809282908922097  -0.050173896324957223 -0.031048555803700237 -0.92933742172751466  -0.049927400545448475 -0.031444704415912177 -0.93056250108092931  -0.049650074667484299 -0.031880688035831835 -0.93176659328345124  -0.049343525133177017 -0.032350836945968742 -0.93294894067424239  -0.048619295141518984 -0.033431348772318993 -0.93546455623725377  -0.048191184908312382 -0.03405290679318191 -0.93679051981852601  -0.047726863342594496 -0.034706847386681339 -0.93808818513616377  -0.047227799336003337 -0.035386883209281711 -0.93935837926847732  -0.04669514347178147 -0.036087589545400166 -0.94060196377738192  -0.046129728024776037 -0.036804404307406578 -0.94181983470839692  -0.045532066961438758 -0.037533628035623531 -0.94301292259064595  -0.04418272296743702 -0.039116718891454627 -0.94551843256300028  -0.043421561648771638 -0.039972879317022876 -0.94682306032115104  -0.042619279339682965 -0.040836461026652046 -0.94809707430208268  -0.041776146432214646 -0.041703399779020218 -0.94934113869751546  -0.040892296354600663 -0.042570011239862662 -0.95055558330011625  -0.039967725571265371 -0.043432990981971752 -0.95174040350349942  -0.039002293582823491 -0.044289414485197034 -0.95289526030222627  -0.03652776835209777 -0.046372448860411815 -0.9556590113717246  -0.034951882413013717 -0.047605705664521082 -0.95725628292886789  -0.03325243898636502 -0.048836547172482328 -0.9588191120745343  -0.031407386455908577 -0.050062630562141122 -0.96034958779202395  -0.029396944428309858 -0.051280867696944135 -0.96184788724877379  -0.027178049517528086 -0.052483067090126068 -0.96330753309533834  -0.024714936087704479 -0.053660768371427831 -0.96472145869312687  -0.020598270110407418 -0.055304807998654282 -0.96667687607886055  -0.019285863235498184 -0.055789143562354981 -0.96725023866118498  -0.017945667415101341 -0.056243033452468338 -0.96778535285277878  -0.01657897879069924 -0.056664427129646151 -0.96828038892444701  -0.015187408703495131 -0.057051369020961903 -0.9687335704953951  -0.013772883694413218 -0.05740199851991095 -0.96914317453322918  -0.012337645504098623 -0.057714549986410367 -0.96950753135395706  -0.009728048402828135 -0.058204372485695828 -0.9700775965022409  -0.008512852637472125 -0.058406850493982719 -0.97031282916907113  -0.0072305586269535852 -0.058588651989399609 -0.97052374355707938  -0.0058797907263685749 -0.05874403084119599 -0.97070379954335484  -0.0044659027958050147 -0.058867629570130885 -0.97084689594747486  -0.0030009782003426765 -0.058954479348472845 -0.97094737053150559  -0.0015038298100531853 -0.058999999999999997 -0.97100000000000009  -1.3823577699190182e-17 -0.058999999999999997 -0.97100000000000009 
+ 0 9 0.068623546075918279 7 0.11385322778022375 7 0.16474102605360236 7 0.20997857762240432 7 0.27716038835682777 7 0.31058166012672478 7 0.34959599695298682 7 0.43435960797271334 7 0.47170937571298865 7 0.51371797917399498 7 0.55105776507644233 7 0.60707195463336927 7 0.67348065683300795 7 0.71601730279657982 7 0.7792050608849922 7 0.81060844589963144 7 0.84727458560147428 7 0.88917660445463709 7 0.9502853401628707 7 0.9779735260978476 7 1 9
+1 0.058999999999999997 -1.4450354975104052e-17 -1.02 0 0 1 
+2 0 0 -1.02 0 0 1 1 0 -0 -0 1 0 0.058999999999999997
+2 0 0 1.0299999999999998 0 0 1 1 0 -0 -0 1 0 0.058999999999999997
+1 -1.2490984808988247e-17 0 -0.97100000000000009 0 -1 0 
+2 0 -0.35899999999999999 -0.92000000000000004 0 -1 0 0 -0 -1 1 0 0 0.050999999999999997
+2 0.058999999999999997 0.17999999999999999 1.03 -1 -0 -0 0 1.2335811384723965e-15 -1 0 -1 -1.2335811384723965e-15 0.17999999999999991
+2 0 0 1.0299999999999998 0 0 1 1 0 -0 -0 1 0 0.058999999999999997
+Polygon3D 0
+PolygonOnTriangulations 26
+25 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 
+p 0.00923476774347953 1 0.43213918 0.4558000475 0.479460915 0.5031217825 0.52678265 0.5504435175 0.574104385 0.5977652525 0.62142612 0.6450869875 0.668747855000001 0.692408722500001 0.716069590000001 0.739730457500001 0.763391325000001 0.787052192500001 0.810713060000001 0.834373927500001 0.858034795000001 0.881695662500001 0.905356530000001 0.929017397500001 0.952678265000001 0.976339132500001 1 
+25 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 
+p 0.00923476774347953 1 0.43213918 0.4558000475 0.479460915 0.5031217825 0.52678265 0.5504435175 0.574104385 0.5977652525 0.62142612 0.6450869875 0.668747855000001 0.692408722500001 0.716069590000001 0.739730457500001 0.763391325000001 0.787052192500001 0.810713060000001 0.834373927500001 0.858034795000001 0.881695662500001 0.905356530000001 0.929017397500001 0.952678265000001 0.976339132500001 1 
+19 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 
+p 0.00923476774347953 1 0 0.026252455185 0.05250491037 0.078757365555 0.10500982074 0.131262275925 0.15751473111 0.183767186295 0.2073943959615 0.22865888466135 0.2499233733612 0.27118786206105 0.2924523507609 0.31371683946075 0.340439755720475 0.369146815465273 0.394983169235591 0.413561174617795 0.43213918 
+19 2 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1 
+p 0.00923476774347953 1 0 0.026252455185 0.05250491037 0.078757365555 0.10500982074 0.131262275925 0.15751473111 0.183767186295 0.2073943959615 0.22865888466135 0.2499233733612 0.27118786206105 0.2924523507609 0.31371683946075 0.340439755720475 0.369146815465273 0.394983169235591 0.413561174617795 0.43213918 
+2 2 45 
+p 0.00923476774347953 1 0.0579749730487216 0.15 
+2 26 44 
+p 0.00923476774347953 1 0.0579749730487216 0.15 
+37 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 45 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+30 43 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 44 
+p 0.00923476774347953 1 0.43213918 0.454536946990279 0.474694937281531 0.492837128543657 0.510979319805783 0.529121511067909 0.547263702330035 0.565405893592162 0.583548084854288 0.606306022432619 0.633519309325808 0.660732596218997 0.687945883112187 0.715159170005376 0.734997656150511 0.749876520759362 0.763653247249039 0.776052301089749 0.788451354930458 0.804403507587046 0.82300208834811 0.847800196029529 0.875698067171125 0.903595938312721 0.931493809454318 0.951831357516541 0.968779314235061 0.984471866752209 0.992235933376104 1 
+30 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 
+p 0.00923476774347953 1 0.43213918 0.454536946990279 0.474694937281531 0.492837128543657 0.510979319805783 0.529121511067909 0.547263702330035 0.565405893592162 0.583548084854288 0.606306022432619 0.633519309325808 0.660732596218997 0.687945883112187 0.715159170005376 0.734997656150511 0.749876520759362 0.763653247249039 0.776052301089749 0.788451354930458 0.804403507587046 0.82300208834811 0.847800196029529 0.875698067171125 0.903595938312721 0.931493809454318 0.951831357516541 0.968779314235061 0.984471866752209 0.992235933376104 1 
+21 44 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 43 
+p 0.00923476774347953 1 0 0.0118764833850204 0.0237529667700408 0.0395882779500679 0.0620748133866454 0.0887969010029412 0.115518988619237 0.14997384851518 0.18604866679718 0.212347209324757 0.23207111622044 0.246864046392203 0.26056120395865 0.274258361525096 0.287955519091543 0.305922393545721 0.326468129895391 0.353862445028284 0.384681049552789 0.408410114776395 0.43213918 
+21 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1 
+p 0.00923476774347953 1 0 0.0118764833850204 0.0237529667700408 0.0395882779500679 0.0620748133866454 0.0887969010029412 0.115518988619237 0.14997384851518 0.18604866679718 0.212347209324757 0.23207111622044 0.246864046392203 0.26056120395865 0.274258361525096 0.287955519091543 0.305922393545721 0.326468129895391 0.353862445028284 0.384681049552789 0.408410114776395 0.43213918 
+2 92 93 
+p 0.00923476774347953 1 0 2.05 
+2 94 130 
+p 0.00923476774347953 1 0 2.05 
+37 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 92 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 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 158 159 160 161 162 163 164 165 93 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+2 2 52 
+p 0.00923476774347953 1 0.059 0.359 
+2 31 51 
+p 0.00923476774347953 1 0.059 0.359 
+37 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 52 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+10 2 83 84 85 86 87 88 89 90 47 
+p 0.00923476774347953 1 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 
+10 1 39 40 41 42 43 44 45 46 38 
+p 0.00923476774347953 1 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 
+37 38 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 47 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 0.00923476774347953 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+Surfaces 9
+2 0 0 0 -0.86602540378443871 0.49999999999999994 0 -0.49999999999999994 -0.86602540378443871 0 0 0 1 0.01095
+2 0 0 -1.02 0 0 1 1 0 -0 -0 1 0 0.058999999999999997
+1 -0.12990381056766581 0.074999999999999983 0 -0.86602540378443871 0.49999999999999994 0 -0.49999999999999994 -0.86602540378443871 0 0 0 1 
+2 0 0 -0.92000000000000004 0 -1 0 0 -0 -1 1 0 0 0.050999999999999997
+1 0 0 -1.02 0 0 1 1 0 -0 -0 1 0 
+1 0 0 1.0299999999999998 0 0 1 1 0 -0 -0 1 0 
+10 1.5707963267948966 3.1415926535897931 4.7123889803846897 10.995574287564276
+5 0 0.17999999999999999 1.03 -1 -0 -0 0 1.2335811384723965e-15 -1 0 -1 -1.2335811384723965e-15 0.17999999999999994 0.058999999999999997
+1 0 -0.35899999999999999 -0.92000000000000004 0 -1 0 0 -0 -1 1 0 0 
+1 0 0 1.0299999999999998 0 0 1 1 0 -0 -0 1 0 
+Triangulations 8
+80 78 1 0.000376268924912778
+-0.0452516081485031 0.0378588424682483 0.0040814575968276 -0.0556827994439111 0.0195045083529212 -2.68188791487101e-18 -0.0449440004035559 0.0382235116836225 0.00262570049051048 -0.0447698960100041 0.0384272869650782 0.00110542603751819 -0.0447389148300229 0.0384633523739504 -0.000449170664265133 -0.0448531919098233 0.0383300298578154 -0.0019871413913789 -0.045105580024204 0.0380327049849712 -0.00347342562505936 -0.0454848031023833 0.0375783538210516 -0.00488210021739919 -0.0459775466574457 0.0369738450901501 -0.00619146483789182 -0.0465698652964758 0.0362249586797729 -0.00738282626269254 -0.047248368026686 0.0353354175121701 -0.00843927704797102 -0.0480013845805218 0.0343054963285484 -0.00934413178463052 -0.0488190360477864 0.0331315819032068 -0.0100775030496812 -0.0496941060301991 0.031804022165388 -0.0106129109281069 -0.0506107030165001 0.0303241939738577 -0.0109081729382156 -0.0515286427056229 0.0287367183035625 -0.0109147757596895 -0.0523754911051059 0.027162620167044 -0.0106209414796212 -0.0531183832008893 0.0256795126330616 -0.0100617790637481 -0.0537549520923741 0.0243188227262401 -0.00927727556389322 -0.0542901464593378 0.0230993503994058 -0.00830159505060414 -0.0547300796136238 0.0220367508689649 -0.0071647244960754 -0.0550807869880959 0.0211449026646725 -0.0058940375050753 -0.0553475695844025 0.0204364021320044 -0.0045160887944694 -0.0555348534379363 0.0199218488750859 -0.00305707430934138 -0.0556459466709498 0.0196094011078699 -0.00154304428303199 -0.0556827994439111 0.0195045083529212 -2.68188791487101e-18 -0.0556368101840428 0.0196353087812375 0.00172214010649706 -0.055497941557225 0.0200244471858943 0.00340452634248419 -0.0552631325751315 0.0206636437636391 0.00501063422149639 -0.0549273164617378 0.0215404250754705 0.00650401500104318 -0.0544838122397786 0.0226387763957884 0.007848037773027 -0.0539246411121843 0.0239401982082393 0.0090053222863341 -0.0532316643852298 0.0254438587288718 0.00994579069174821 -0.0524653480959556 0.0269886499027755 0.0105699543328333 -0.0516824439453187 0.0284591810050448 0.0108846150499938 -0.05084175874558 0.0299351900515401 0.0109384060229904 -0.0499783998668212 0.0313553743935674 0.0107337671578512 -0.0491319767116209 0.0326657143430688 0.0102975318245977 -0.0483451494684189 0.0338193219571295 0.00968147301966754 -0.0474655291809326 0.0350431669744295 0.0087256840036814 -0.0466242186800716 0.036154975112239 0.00747784808900505 -0.0459738887186155 0.0369783932929608 0.00618304263635271 -0.0455786907785877 0.0374644222180483 0.00516411580486915 -0.135378810567666 0.0655170218285604 -2.681887914871e-18 -0.135378810567666 0.0655170218285604 -2.681887914871e-18 -0.135295633015408 0.0656610895751207 0.00190144754545289 -0.135048627666469 0.0660889153892243 0.00374512056941607 -0.134645299653386 0.0667875 0.005475 -0.134097903893742 0.0677356172675501 0.00703852432606761 -0.1334230727307 0.0689044591284707 0.00838818665215281 -0.132641310567666 0.0702585109142802 0.0094829781714396 -0.131776370852374 0.07175663044665 0.0102896341976057 -0.130854534340392 0.0733532981216742 0.0107836448954837 -0.129903810567666 0.075 0.01095 -0.128953086794939 0.0766467018783257 0.0107836448954837 -0.128031250282958 0.0782433695533499 0.0102896341976057 -0.127166310567666 0.0797414890857198 0.0094829781714396 -0.126384548404632 0.0810955408715293 0.00838818665215281 -0.125709717241589 0.0822643827324499 0.00703852432606761 -0.125162321481946 0.0832125 0.00547500000000001 -0.124758993468863 0.0839110846107756 0.00374512056941608 -0.124511988119924 0.0843389104248792 0.0019014475454529 -0.124428810567666 0.0844829781714396 1.59292745010101e-17 -0.124511988119924 0.0843389104248792 -0.00190144754545287 -0.124758993468863 0.0839110846107756 -0.00374512056941605 -0.125162321481946 0.0832125 -0.00547499999999998 -0.125709717241589 0.0822643827324499 -0.00703852432606759 -0.126384548404632 0.0810955408715293 -0.00838818665215279 -0.127166310567666 0.0797414890857198 -0.00948297817143959 -0.128031250282958 0.07824336955335 -0.0102896341976057 -0.128953086794939 0.0766467018783258 -0.0107836448954837 -0.129903810567666 0.075 -0.01095 -0.130854534340392 0.0733532981216743 -0.0107836448954837 -0.131776370852374 0.0717566304466501 -0.0102896341976057 -0.132641310567666 0.0702585109142802 -0.00948297817143962 -0.1334230727307 0.0689044591284707 -0.00838818665215284 -0.134097903893742 0.0677356172675501 -0.00703852432606764 -0.134645299653386 0.0667875 -0.00547500000000004 -0.135048627666469 0.0660889153892244 -0.00374512056941612 -0.135295633015408 0.0656610895751207 -0.00190144754545294 2.75963703894503 0.0581184634528269 6.28318530717959 0.0579749730487216 2.89944317338102 0.0580344019389888 3.04046815805553 0.0579855107519902 3.18262436348129 0.0579767129675233 3.32407786376826 0.0580090185636334 3.46437644984295 0.0580789306458782 3.60372069338022 0.058180171883323 3.74254779763238 0.0583046459541074 3.88151524929184 0.0584431657374539 4.02154764284867 0.0585859957545515 4.16396143309765 0.0587231666278327 4.31049018803561 0.0588443163572547 4.46361741324672 0.0589383693232038 4.62495609786821 0.0589922515026077 4.7926205414376 0.0589934727573824 4.958164219686 0.0589398159162296 5.11794306680756 0.0588416255764575 5.27241798796126 0.0587125654543315 5.4227345379512 0.0585663212086673 5.56991187711454 0.0584160147310254 5.71480438213952 0.0582738121244667 5.8580673344795 0.0581506023638217 6.00024024714361 0.0580555183102414 6.14179737528635 0.0579955039886116 0 0.0579749730487216 0.15792875676578 0.0580005453955325 0.31615626326444 0.0580748508392481 0.47528535461951 0.0581910985845908 0.635989617730726 0.0583386639553074 0.799081436498103 0.0585037536925641 0.965623538480676 0.05867020819723 1.13918123435821 0.0588219030077722 1.30656170677688 0.0589306492208789 1.46146012512916 0.0589878998888336 1.61681749627376 0.0589978496725219 1.76985745149836 0.0589602511219476 1.91774714421665 0.0588823971419436 2.05691513021045 0.0587777885679713 2.21950260159839 0.0586279375619739 2.3898558635916 0.0584552453646625 2.5415697436497 0.0583037521875602 2.65047832487738 0.0582045151945166 0 0.15 6.28318530717959 0.15 0.174532925199433 0.15 0.349065850398866 0.15 0.523598775598299 0.15 0.698131700797732 0.15 0.872664625997165 0.15 1.0471975511966 0.15 1.22173047639603 0.15 1.39626340159546 0.15 1.5707963267949 0.15 1.74532925199433 0.15 1.91986217719376 0.15 2.0943951023932 0.15 2.26892802759263 0.15 2.44346095279206 0.15 2.61799387799149 0.15 2.79252680319093 0.15 2.96705972839036 0.15 3.14159265358979 0.15 3.31612557878922 0.15 3.49065850398866 0.15 3.66519142918809 0.15 3.83972435438752 0.15 4.01425727958696 0.15 4.18879020478639 0.15 4.36332312998582 0.15 4.53785605518525 0.15 4.71238898038469 0.15 4.88692190558412 0.15 5.06145483078355 0.15 5.23598775598299 0.15 5.41052068118242 0.15 5.58505360638185 0.15 5.75958653158128 0.15 5.93411945678072 0.15 6.10865238198015 0.15 67 12 13 67 66 12 68 67 13 69 13 14 69 68 13 70 14 15 70 69 14 71 70 15 72 15 16 72 71 15 73 72 16 74 16 17 74 73 16 75 17 18 75 74 17 76 75 18 77 18 19 77 76 18 78 77 19 78 19 20 79 20 21 79 21 22 79 78 20 80 22 23 80 23 24 80 79 22 45 24 25 45 25 2 45 80 24 44 26 27 44 27 28 46 28 29 46 29 30 46 44 28 47 30 31 47 46 30 48 31 32 48 47 31 49 48 32 49 32 33 50 49 33 51 50 33 51 33 34 52 34 35 52 51 34 53 52 35 54 35 36 54 53 35 55 54 36 55 36 37 56 55 37 57 37 38 57 56 37 58 38 39 58 57 38 59 58 39 59 39 40 60 59 40 60 40 41 61 41 42 61 60 41 62 61 42 62 42 43 62 43 1 63 1 3 63 62 1 63 3 4 63 4 5 63 5 6 63 6 7 64 63 7 64 7 8 64 8 9 65 9 10 65 10 11 65 64 9 66 65 11 66 11 12 
+1922 3681 1 0.00114041616427305
+-0.0452516081485031 0.0378588424682483 0.0040814575968276 -0.0556827994439111 0.0195045083529212 -2.68188791487101e-18 -0.0449440004035559 0.0382235116836225 0.00262570049051048 -0.0447698960100041 0.0384272869650782 0.00110542603751819 -0.0447389148300229 0.0384633523739504 -0.000449170664265133 -0.0448531919098233 0.0383300298578154 -0.0019871413913789 -0.045105580024204 0.0380327049849712 -0.00347342562505936 -0.0454848031023833 0.0375783538210516 -0.00488210021739919 -0.0459775466574457 0.0369738450901501 -0.00619146483789182 -0.0465698652964758 0.0362249586797729 -0.00738282626269254 -0.047248368026686 0.0353354175121701 -0.00843927704797102 -0.0480013845805218 0.0343054963285484 -0.00934413178463052 -0.0488190360477864 0.0331315819032068 -0.0100775030496812 -0.0496941060301991 0.031804022165388 -0.0106129109281069 -0.0506107030165001 0.0303241939738577 -0.0109081729382156 -0.0515286427056229 0.0287367183035625 -0.0109147757596895 -0.0523754911051059 0.027162620167044 -0.0106209414796212 -0.0531183832008893 0.0256795126330616 -0.0100617790637481 -0.0537549520923741 0.0243188227262401 -0.00927727556389322 -0.0542901464593378 0.0230993503994058 -0.00830159505060414 -0.0547300796136238 0.0220367508689649 -0.0071647244960754 -0.0550807869880959 0.0211449026646725 -0.0058940375050753 -0.0553475695844025 0.0204364021320044 -0.0045160887944694 -0.0555348534379363 0.0199218488750859 -0.00305707430934138 -0.0556459466709498 0.0196094011078699 -0.00154304428303199 -0.0556368101840428 0.0196353087812375 0.00172214010649706 -0.055497941557225 0.0200244471858943 0.00340452634248419 -0.0552631325751315 0.0206636437636391 0.00501063422149639 -0.0549273164617378 0.0215404250754705 0.00650401500104318 -0.0544838122397786 0.0226387763957884 0.007848037773027 -0.0539246411121843 0.0239401982082393 0.0090053222863341 -0.0532316643852298 0.0254438587288718 0.00994579069174821 -0.0524653480959556 0.0269886499027755 0.0105699543328333 -0.0516824439453187 0.0284591810050448 0.0108846150499938 -0.05084175874558 0.0299351900515401 0.0109384060229904 -0.0499783998668212 0.0313553743935674 0.0107337671578512 -0.0491319767116209 0.0326657143430688 0.0102975318245977 -0.0483451494684189 0.0338193219571295 0.00968147301966754 -0.0474655291809326 0.0350431669744295 0.0087256840036814 -0.0466242186800716 0.036154975112239 0.00747784808900505 -0.0459738887186155 0.0369783932929608 0.00618304263635271 -0.0455786907785877 0.0374644222180483 0.00516411580486915 0.0285134526101169 -0.0516525230498979 -0.877715450616494 -1.24909848089882e-17 -0.059 -0.971 0.0218689537628893 -0.0547973342071952 -0.873926714079115 0.0152432943309105 -0.0569968566883178 -0.871331307133653 0.00885408422920787 -0.0583318593736884 -0.869774450376816 0.00220533221989951 -0.0589587672676645 -0.869047706339065 -0.00452021703437581 -0.0588265763530881 -0.869200725542687 -0.0111222730604825 -0.057942178304755 -0.870227558960192 -0.0174212632071157 -0.0563693147096274 -0.872067759914168 -0.0232858016806991 -0.0542104365049165 -0.874626313499237 -0.0299133744109193 -0.0508545968961581 -0.878693946864086 -0.0364055526574153 -0.0464288249269798 -0.884283956254603 -0.0414604911606737 -0.0419765142239933 -0.890301047998437 -0.0454599405573964 -0.0376085023052696 -0.896883095205712 -0.048477768906044 -0.0336289431418361 -0.904159988127683 -0.0500125776174735 -0.0313008361062597 -0.910012892931646 -0.0507223820320063 -0.0301370159352354 -0.914685889739203 -0.0509929846912805 -0.0296768550886756 -0.919154017069977 -0.0508974922470173 -0.0298403260381806 -0.923231887915664 -0.0504793502812316 -0.0305424952164638 -0.927268264580091 -0.0495067029638172 -0.032094840909959 -0.932251274982488 -0.0478365171105765 -0.0345349752083268 -0.93768239459427 -0.0448299575819992 -0.0383572010050282 -0.944316145473221 -0.0404672041100315 -0.0429349454880199 -0.951038720348503 -0.0350437353916528 -0.0474651119056726 -0.957053162381158 -0.0280326393130683 -0.0519150376126295 -0.962604825208043 -0.021306012776011 -0.0550186720678838 -0.966336316913799 -0.0146841640586707 -0.0571434367699638 -0.96884027478942 -0.00800353134517232 -0.0584555058032915 -0.970369082432513 -0.00416203854328149 -0.058852336496355 -0.970829113665653 0.00637745658187731 -0.058654309018953 -0.970599683375865 0.0117874105676248 -0.0578105272001434 -0.969619119931822 0.0176689960460276 -0.0562921525018941 -0.967841471905639 0.0241008386445522 -0.0538530347922422 -0.964946071751388 0.0304430307465949 -0.0505393060003243 -0.960917241815508 0.0359655758325551 -0.0467704754890113 -0.956159057637936 0.0418706266966591 -0.0415674240281568 -0.94911788161083 0.0465956891649289 -0.0361917466377736 -0.940732602679552 0.0490639245669559 -0.0327678395054133 -0.933918738986464 0.0503181951744449 -0.030807129660349 -0.928311391809156 0.0508522668789505 -0.0299173353680219 -0.923879041668047 0.0509989666893943 -0.0296665701997348 -0.919675378553317 0.0507964095118238 -0.0300120774554979 -0.915447550387328 0.0502525012386535 -0.030914281417931 -0.911300614417913 0.0490754922156223 -0.0327504516820192 -0.906121929969831 0.0471720570893195 -0.0354371925332016 -0.900614516307052 0.0438194866264632 -0.0395076238297127 -0.893906851632219 0.0389820442404017 -0.0442876957323281 -0.887115352553105 0.0343171875743088 -0.0479930267907713 -0.882272945563165 0.059 -1.44503549751041e-17 -1.02 0.059 -1.44503549751041e-17 1.03 0.059 -1.44503549751041e-17 -1.02 0.0581036574277203 0.0102452424823489 -1.02 0.0554418646263686 0.0201791884562145 -1.02 0.0510954988232819 0.0295 -1.02 0.0451966221440197 0.0379244689715058 -1.02 0.0379244689715058 0.0451966221440197 -1.02 0.0295 0.0510954988232819 -1.02 0.0201791884562145 0.0554418646263686 -1.02 0.0102452424823489 0.0581036574277203 -1.02 3.61258874377601e-18 0.059 -1.02 -0.0102452424823489 0.0581036574277203 -1.02 -0.0201791884562145 0.0554418646263686 -1.02 -0.0295 0.0510954988232819 -1.02 -0.0379244689715058 0.0451966221440197 -1.02 -0.0451966221440197 0.0379244689715058 -1.02 -0.0510954988232819 0.0295 -1.02 -0.0554418646263686 0.0201791884562145 -1.02 -0.0581036574277203 0.010245242482349 -1.02 -0.059 8.58289676310131e-17 -1.02 -0.0581036574277203 -0.0102452424823488 -1.02 -0.0554418646263686 -0.0201791884562144 -1.02 -0.0510954988232819 -0.0294999999999999 -1.02 -0.0451966221440198 -0.0379244689715057 -1.02 -0.0379244689715059 -0.0451966221440196 -1.02 -0.0295000000000001 -0.0510954988232818 -1.02 -0.0201791884562146 -0.0554418646263685 -1.02 -0.010245242482349 -0.0581036574277202 -1.02 -1.6804534651825e-16 -0.059 -1.02 0.0102452424823487 -0.0581036574277203 -1.02 0.0201791884562143 -0.0554418646263687 -1.02 0.0294999999999998 -0.051095498823282 -1.02 0.0379244689715056 -0.0451966221440198 -1.02 0.0451966221440196 -0.037924468971506 -1.02 0.0510954988232818 -0.0295000000000002 -1.02 0.0554418646263685 -0.0201791884562147 -1.02 0.0581036574277202 -0.0102452424823492 -1.02 0.059 -1.44503549751041e-17 1.03 0.0581036574277203 0.0102452424823489 1.03 0.0554418646263686 0.0201791884562145 1.03 0.0510954988232819 0.0295 1.03 0.0451966221440197 0.0379244689715058 1.03 0.0379244689715058 0.0451966221440197 1.03 0.0295 0.0510954988232819 1.03 0.0201791884562145 0.0554418646263686 1.03 0.0102452424823489 0.0581036574277203 1.03 3.61258874377601e-18 0.059 1.03 -0.0102452424823489 0.0581036574277203 1.03 -0.0201791884562145 0.0554418646263686 1.03 -0.0295 0.0510954988232819 1.03 -0.0379244689715058 0.0451966221440197 1.03 -0.0451966221440197 0.0379244689715058 1.03 -0.0510954988232819 0.0295 1.03 -0.0554418646263686 0.0201791884562145 1.03 -0.0581036574277203 0.010245242482349 1.03 -0.059 8.58289676310131e-17 1.03 -0.0581036574277203 -0.0102452424823488 1.03 -0.0554418646263686 -0.0201791884562144 1.03 -0.0510954988232819 -0.0294999999999999 1.03 -0.0451966221440198 -0.0379244689715057 1.03 -0.0379244689715059 -0.0451966221440196 1.03 -0.0295000000000001 -0.0510954988232818 1.03 -0.0201791884562146 -0.0554418646263685 1.03 -0.010245242482349 -0.0581036574277202 1.03 -1.6804534651825e-16 -0.059 1.03 0.0102452424823487 -0.0581036574277203 1.03 0.0201791884562143 -0.0554418646263687 1.03 0.0294999999999998 -0.051095498823282 1.03 0.0379244689715056 -0.0451966221440198 1.03 0.0451966221440196 -0.037924468971506 1.03 0.0510954988232818 -0.0295000000000002 1.03 0.0554418646263685 -0.0201791884562147 1.03 0.0581036574277202 -0.0102452424823492 1.03 -0.00487218138286763 -0.0587984850873935 -0.200000000000001 -0.0237000300545252 -0.0540306262726484 -0.2205 -0.00487218138286763 -0.0587984850873935 -0.2205 -0.0581953169007606 0.00971108082656331 -0.6305 -0.0518889513211828 0.0280808961891873 -0.651 -0.0581953169007606 0.00971108082656331 -0.651 -0.0518889513211828 0.0280808961891873 -0.6305 -0.0237000300545252 -0.0540306262726484 -0.200000000000001 -0.0581953169007606 0.00971108082656331 0.763499999999998 -0.0518889513211828 0.0280808961891873 0.763499999999998 -0.0518889513211828 0.0280808961891873 0.742999999999998 -0.0518889513211828 0.0280808961891873 -0.61 -0.0399596127259187 0.0434077107297148 -0.6305 -0.0237000300545252 -0.0540306262726484 -0.179500000000001 -0.0399596127259187 -0.0434077107297148 -0.200000000000001 -0.0399596127259187 0.0434077107297148 -0.61 -0.0581953169007606 0.00971108082656331 0.742999999999998 -0.0399596127259187 -0.0434077107297148 -0.179500000000001 -0.0518889513211828 0.0280808961891873 0.783999999999998 -0.0399596127259187 0.0434077107297148 0.763499999999998 -0.0399596127259187 0.0434077107297148 -0.5895 -0.0237000300545252 0.0540306262726484 -0.5895 -0.0237000300545252 0.0540306262726484 -0.61 -0.0399596127259187 -0.0434077107297148 -0.159000000000001 -0.0518889513211829 -0.0280808961891873 -0.179500000000001 -0.0518889513211829 -0.0280808961891873 -0.159000000000001 -0.0399596127259187 0.0434077107297148 0.783999999999998 -0.0237000300545252 0.0540306262726484 -0.569 -0.0048721813828676 0.0587984850873935 -0.569 -0.0048721813828676 0.0587984850873935 -0.5895 -0.0399596127259187 0.0434077107297148 0.804499999999998 -0.0237000300545252 0.0540306262726484 0.804499999999998 -0.0237000300545252 0.0540306262726484 0.783999999999998 -0.0518889513211829 -0.0280808961891873 -0.138500000000001 -0.0581953169007606 -0.00971108082656329 -0.159000000000001 -0.0581953169007606 -0.00971108082656329 -0.138500000000001 -0.0581953169007606 -0.00971108082656329 -0.118000000000001 -0.0581953169007606 0.00971108082656331 -0.118000000000001 -0.0581953169007606 0.00971108082656331 -0.138500000000001 -0.0048721813828676 0.0587984850873935 -0.5485 0.0144836437413072 0.0571946156904205 -0.569 0.0144836437413072 0.0571946156904205 -0.5485 -0.0237000300545252 0.0540306262726484 0.824999999999998 -0.0048721813828676 0.0587984850873935 0.804499999999998 -0.0581953169007606 0.00971108082656331 -0.0975000000000007 -0.0518889513211828 0.0280808961891873 -0.0975000000000007 -0.0518889513211828 0.0280808961891873 -0.118000000000001 0.0558032172603374 0.0191572686830763 0.476499999999998 0.0558032172603374 0.0191572686830763 0.455999999999998 0.0144836437413072 0.0571946156904205 -0.528 0.0322699413292232 0.0493928222174892 -0.528 0.0322699413292232 0.0493928222174892 -0.5485 0.0558032172603374 -0.0191572686830763 0.148499999999999 0.0465592900543872 -0.0362385500486904 0.148499999999999 0.0465592900543872 -0.0362385500486904 0.127999999999999 0.0558032172603374 -0.0191572686830763 0.127999999999999 -0.0048721813828676 0.0587984850873935 0.824999999999998 0.0465592900543872 -0.0362385500486904 0.168999999999999 0.0322699413292232 -0.0493928222174892 0.148499999999999 0.0322699413292232 0.0493928222174892 -0.5075 0.0465592900543872 0.0362385500486904 -0.528 0.0465592900543872 0.0362385500486904 -0.5075 0.0322699413292232 -0.0493928222174892 0.168999999999999 -0.0048721813828676 0.0587984850873935 0.845499999999998 0.0144836437413072 0.0571946156904205 0.824999999999998 -0.0518889513211828 0.0280808961891873 -0.0770000000000007 -0.0399596127259187 0.0434077107297148 -0.0770000000000007 -0.0399596127259187 0.0434077107297148 -0.0975000000000007 0.0144836437413072 0.0571946156904205 0.845499999999998 0.0144836437413072 0.0571946156904205 0.865999999999998 0.0322699413292232 0.0493928222174892 0.845499999999998 0.0322699413292232 -0.0493928222174892 0.189499999999999 0.0144836437413071 -0.0571946156904205 0.189499999999999 0.0144836437413071 -0.0571946156904205 0.168999999999999 0.0465592900543872 0.0362385500486904 -0.487 0.0558032172603374 0.0191572686830763 -0.5075 0.0558032172603374 0.0191572686830763 -0.487 0.0144836437413071 -0.0571946156904205 0.209999999999999 -0.00487218138286763 -0.0587984850873935 0.189499999999999 -0.0399596127259187 0.0434077107297148 -0.0565000000000008 -0.0237000300545252 0.0540306262726484 -0.0770000000000007 0.0322699413292232 0.0493928222174892 0.865999999999998 -0.00487218138286763 -0.0587984850873935 0.209999999999999 -0.0237000300545252 0.0540306262726484 -0.0565000000000008 0.0322699413292232 0.0493928222174892 0.886499999999998 0.0465592900543872 0.0362385500486904 0.865999999999998 0.0465592900543872 0.0362385500486904 0.886499999999998 -0.00487218138286763 -0.0587984850873935 0.230499999999999 -0.0237000300545252 -0.0540306262726484 0.209999999999999 -0.0237000300545252 -0.0540306262726484 0.230499999999999 0.0558032172603374 0.0191572686830763 -0.4665 -0.0237000300545252 0.0540306262726484 -0.0360000000000008 -0.0048721813828676 0.0587984850873935 -0.0565000000000008 0.0465592900543872 0.0362385500486904 0.906999999999998 0.0558032172603374 0.0191572686830763 0.906999999999998 0.0558032172603374 0.0191572686830763 0.886499999999998 -0.0048721813828676 0.0587984850873935 -0.0360000000000008 -0.0237000300545252 -0.0540306262726484 0.250999999999999 -0.0399596127259187 -0.0434077107297148 0.230499999999999 -0.0399596127259187 -0.0434077107297148 0.250999999999999 -0.0399596127259187 -0.0434077107297148 0.271499999999999 -0.0518889513211829 -0.0280808961891873 0.250999999999999 -0.0048721813828676 0.0587984850873935 -0.0155000000000007 0.0144836437413072 0.0571946156904205 -0.0155000000000007 0.0144836437413072 0.0571946156904205 -0.0360000000000008 0.0558032172603374 -0.0191572686830763 -0.7945 0.0558032172603374 -0.0191572686830763 -0.815 -0.0518889513211829 -0.0280808961891873 0.271499999999999 0.0465592900543872 -0.0362385500486904 -0.815 0.0465592900543872 -0.0362385500486904 -0.7945 0.0465592900543872 -0.0362385500486904 -0.774 0.0322699413292232 -0.0493928222174892 -0.774 0.0322699413292232 -0.0493928222174892 -0.7945 -0.0518889513211829 -0.0280808961891873 0.291999999999999 -0.0581953169007606 -0.00971108082656329 0.291999999999999 -0.0581953169007606 -0.00971108082656329 0.271499999999999 0.0144836437413072 0.0571946156904205 0.00499999999999923 0.0322699413292232 0.0493928222174892 0.00499999999999923 0.0322699413292232 0.0493928222174892 -0.0155000000000007 0.0558032172603374 0.0191572686830763 0.927499999999998 0.0558032172603374 -0.0191572686830763 0.599499999999998 0.0558032172603374 -0.0191572686830763 0.578999999999998 -0.0581953169007606 -0.00971108082656329 0.312499999999999 -0.0581953169007606 0.00971108082656331 0.291999999999999 0.0465592900543872 -0.0362385500486904 0.599499999999998 0.0465592900543872 -0.0362385500486904 0.578999999999998 0.0322699413292232 -0.0493928222174892 -0.7535 0.0144836437413071 -0.0571946156904205 -0.774 -0.0581953169007606 0.00971108082656331 0.312499999999999 0.0465592900543872 -0.0362385500486904 0.619999999999998 0.0322699413292232 -0.0493928222174892 0.619999999999998 0.0322699413292232 -0.0493928222174892 0.599499999999998 -0.0581953169007606 0.00971108082656331 0.332999999999999 -0.0518889513211828 0.0280808961891873 0.312499999999999 -0.0518889513211828 0.0280808961891873 0.332999999999999 0.0144836437413071 -0.0571946156904205 -0.7535 0.0322699413292232 0.0493928222174892 0.0254999999999992 0.0465592900543872 0.0362385500486904 0.0254999999999992 0.0465592900543872 0.0362385500486904 0.00499999999999923 0.0144836437413071 -0.0571946156904205 -0.733 -0.00487218138286763 -0.0587984850873935 -0.7535 0.0322699413292232 -0.0493928222174892 0.640499999999998 0.0144836437413071 -0.0571946156904205 0.619999999999998 0.0465592900543872 0.0362385500486904 0.0459999999999992 0.0558032172603374 0.0191572686830763 0.0254999999999992 0.0144836437413071 -0.0571946156904205 0.640499999999998 0.0144836437413071 -0.0571946156904205 0.660999999999998 -0.00487218138286763 -0.0587984850873935 0.640499999999998 -0.0518889513211828 0.0280808961891873 0.353499999999999 -0.0399596127259187 0.0434077107297148 0.353499999999999 -0.0399596127259187 0.0434077107297148 0.332999999999999 -0.00487218138286763 -0.0587984850873935 -0.733 -0.00487218138286763 -0.0587984850873935 0.660999999999998 -0.00487218138286763 -0.0587984850873935 -0.7125 -0.0237000300545252 -0.0540306262726484 -0.733 -0.00487218138286763 -0.0587984850873935 0.681499999999998 -0.0237000300545252 -0.0540306262726484 0.681499999999998 -0.0237000300545252 -0.0540306262726484 0.660999999999998 0.0558032172603374 0.0191572686830763 0.0459999999999992 -0.0237000300545252 -0.0540306262726484 -0.7125 -0.0237000300545252 -0.0540306262726484 -0.692 -0.0399596127259187 -0.0434077107297148 -0.692 -0.0399596127259187 -0.0434077107297148 -0.7125 -0.0399596127259187 0.0434077107297148 0.373999999999999 -0.0237000300545252 0.0540306262726484 0.373999999999999 -0.0237000300545252 0.0540306262726484 0.353499999999999 -0.0237000300545252 -0.0540306262726484 0.701999999999998 -0.0399596127259187 -0.0434077107297148 0.681499999999998 -0.0237000300545252 0.0540306262726484 0.394499999999999 -0.0048721813828676 0.0587984850873935 0.373999999999999 -0.0048721813828676 0.0587984850873935 0.394499999999999 -0.0399596127259187 -0.0434077107297148 0.701999999999998 -0.0399596127259187 -0.0434077107297148 -0.6715 -0.0518889513211829 -0.0280808961891873 -0.6715 -0.0518889513211829 -0.0280808961891873 -0.692 -0.0518889513211829 -0.0280808961891873 -0.651 -0.0581953169007606 -0.00971108082656329 -0.6715 -0.0581953169007606 -0.00971108082656329 -0.651 -0.0399596127259187 -0.0434077107297148 0.722499999999998 -0.0518889513211829 -0.0280808961891873 0.701999999999998 -0.0518889513211829 -0.0280808961891873 0.722499999999998 -0.0048721813828676 0.0587984850873935 0.414999999999998 0.0144836437413072 0.0571946156904205 0.414999999999998 0.0144836437413072 0.0571946156904205 0.394499999999999 -0.0518889513211829 -0.0280808961891873 0.742999999999998 -0.0581953169007606 -0.00971108082656329 0.742999999999998 -0.0581953169007606 -0.00971108082656329 0.722499999999998 -0.0581953169007606 -0.00971108082656329 -0.6305 0.0558032172603374 0.0191572686830763 0.0664999999999991 -0.0581953169007606 0.00971108082656331 -0.61 -0.0581953169007606 -0.00971108082656329 0.763499999999998 0.0558032172603374 -0.0191572686830763 -0.2615 0.0465592900543872 -0.0362385500486904 -0.282 0.0558032172603374 -0.0191572686830763 -0.282 0.0144836437413072 0.0571946156904205 0.435499999999998 0.0322699413292232 0.0493928222174892 0.414999999999998 0.0322699413292232 0.0493928222174892 0.435499999999998 0.0465592900543872 -0.0362385500486904 -0.2615 -0.0581953169007606 0.00971108082656331 0.783999999999998 -0.0518889513211828 0.0280808961891873 -0.5895 0.0465592900543872 -0.0362385500486904 -0.241 0.0322699413292232 -0.0493928222174892 -0.2615 0.0322699413292232 -0.0493928222174892 -0.241 -0.0399596127259187 0.0434077107297148 -0.569 0.0322699413292232 0.0493928222174892 0.455999999999998 0.0465592900543872 0.0362385500486904 0.455999999999998 0.0465592900543872 0.0362385500486904 0.435499999999998 0.0322699413292232 -0.0493928222174892 -0.2205 0.0144836437413071 -0.0571946156904205 -0.241 -0.0518889513211828 0.0280808961891873 0.804499999999998 0.0144836437413071 -0.0571946156904205 -0.2205 -0.0237000300545252 0.0540306262726484 -0.5485 0.0465592900543872 0.0362385500486904 0.476499999999998 0.0144836437413071 -0.0571946156904205 -0.200000000000001 -0.0048721813828676 0.0587984850873935 -0.528 -0.00487218138286763 -0.0587984850873935 -0.179500000000001 -0.0399596127259187 0.0434077107297148 0.824999999999998 0.0144836437413072 0.0571946156904205 -0.5075 -0.0237000300545252 -0.0540306262726484 -0.159000000000001 0.0322699413292232 0.0493928222174892 -0.487 -0.0399596127259187 -0.0434077107297148 -0.138500000000001 -0.0237000300545252 0.0540306262726484 0.845499999999998 -0.0048721813828676 0.0587984850873935 0.865999999999998 -0.0518889513211829 -0.0280808961891873 -0.118000000000001 0.0558032172603374 0.0191572686830763 0.496999999999998 0.0465592900543872 0.0362385500486904 -0.4665 0.0144836437413072 0.0571946156904205 0.886499999999998 -0.0581953169007606 -0.00971108082656329 -0.0975000000000007 0.0558032172603374 0.0191572686830763 -0.446 -0.0581953169007606 0.00971108082656331 -0.0770000000000007 0.0322699413292232 0.0493928222174892 0.906999999999998 0.0558032172603374 -0.0191572686830763 0.168999999999999 0.0558032172603374 -0.0191572686830763 -0.774 0.0465592900543872 -0.0362385500486904 0.189499999999999 -0.0518889513211828 0.0280808961891873 -0.0565000000000008 0.0465592900543872 0.0362385500486904 0.927499999999998 0.0465592900543872 -0.0362385500486904 -0.7535 0.0322699413292232 -0.0493928222174892 0.209999999999999 0.0322699413292232 -0.0493928222174892 -0.733 0.0144836437413071 -0.0571946156904205 0.230499999999999 0.0558032172603374 0.0191572686830763 0.947999999999998 -0.0399596127259187 0.0434077107297148 -0.0360000000000008 0.0558032172603374 -0.0191572686830763 0.619999999999998 0.0144836437413071 -0.0571946156904205 -0.7125 -0.00487218138286763 -0.0587984850873935 0.250999999999999 0.0465592900543872 -0.0362385500486904 0.640499999999998 -0.0237000300545252 0.0540306262726484 -0.0155000000000007 -0.0237000300545252 -0.0540306262726484 0.271499999999999 0.0322699413292232 -0.0493928222174892 0.660999999999998 -0.00487218138286763 -0.0587984850873935 -0.692 -0.0399596127259187 -0.0434077107297148 0.291999999999999 -0.0048721813828676 0.0587984850873935 0.00499999999999923 0.0144836437413071 -0.0571946156904205 0.681499999999998 -0.0518889513211829 -0.0280808961891873 0.312499999999999 -0.0237000300545252 -0.0540306262726484 -0.6715 -0.00487218138286763 -0.0587984850873935 0.701999999999998 0.0144836437413072 0.0571946156904205 0.0254999999999992 -0.0581953169007606 -0.00971108082656329 0.332999999999999 -0.0237000300545252 -0.0540306262726484 0.722499999999998 -0.0399596127259187 -0.0434077107297148 -0.651 -0.0518889513211829 -0.0280808961891873 -0.6305 0.0322699413292232 0.0493928222174892 0.0459999999999992 -0.0581953169007606 0.00971108082656331 0.353499999999999 -0.0399596127259187 -0.0434077107297148 0.742999999999998 -0.0518889513211828 0.0280808961891873 0.373999999999999 -0.0581953169007606 -0.00971108082656329 -0.61 0.0465592900543872 0.0362385500486904 0.0664999999999991 -0.0518889513211829 -0.0280808961891873 0.763499999999998 -0.0581953169007606 0.00971108082656331 -0.5895 -0.0399596127259187 0.0434077107297148 0.394499999999999 -0.0581953169007606 -0.00971108082656329 0.783999999999998 -0.0518889513211828 0.0280808961891873 -0.569 -0.0237000300545252 0.0540306262726484 0.414999999999998 -0.0399596127259187 0.0434077107297148 -0.5485 -0.0048721813828676 0.0587984850873935 0.435499999999998 -0.0237000300545252 0.0540306262726484 -0.528 -0.0581953169007606 0.00971108082656331 0.804499999999998 -0.0048721813828676 0.0587984850873935 -0.5075 -0.0518889513211828 0.0280808961891873 0.824999999999998 0.0144836437413072 0.0571946156904205 0.455999999999998 0.0144836437413072 0.0571946156904205 -0.487 0.0558032172603374 0.0191572686830763 0.0869999999999991 -0.0399596127259187 0.0434077107297148 0.845499999999998 0.0558032172603374 -0.0191572686830763 -0.241 0.0322699413292232 0.0493928222174892 -0.4665 0.0465592900543872 0.0362385500486904 -0.446 -0.0237000300545252 0.0540306262726484 0.865999999999998 0.0322699413292232 0.0493928222174892 0.476499999999998 0.0465592900543872 -0.0362385500486904 -0.2205 -0.0048721813828676 0.0587984850873935 0.886499999999998 0.0322699413292232 -0.0493928222174892 -0.200000000000001 0.0465592900543872 0.0362385500486904 0.496999999999998 0.0144836437413072 0.0571946156904205 0.906999999999998 0.0558032172603374 0.0191572686830763 -0.4255 0.0144836437413071 -0.0571946156904205 -0.179500000000001 0.0558032172603374 -0.0191572686830763 -0.7535 0.0322699413292232 0.0493928222174892 0.927499999999998 -0.00487218138286763 -0.0587984850873935 -0.159000000000001 0.0465592900543872 -0.0362385500486904 -0.733 0.0465592900543872 0.0362385500486904 0.947999999999998 -0.0237000300545252 -0.0540306262726484 -0.138500000000001 0.0322699413292232 -0.0493928222174892 -0.7125 -0.0399596127259187 -0.0434077107297148 -0.118000000000001 0.0144836437413071 -0.0571946156904205 -0.692 -0.0518889513211829 -0.0280808961891873 -0.0975000000000007 0.0558032172603374 0.0191572686830763 0.968499999999997 0.0558032172603374 -0.0191572686830763 0.640499999999998 0.0558032172603374 0.0191572686830763 0.517499999999998 0.0465592900543872 -0.0362385500486904 0.660999999999998 -0.00487218138286763 -0.0587984850873935 -0.6715 0.0558032172603374 -0.0191572686830763 0.189499999999999 0.0322699413292232 -0.0493928222174892 0.681499999999998 -0.0581953169007606 -0.00971108082656329 -0.0770000000000007 -0.0237000300545252 -0.0540306262726484 -0.651 -0.0581953169007606 0.00971108082656331 -0.0565000000000008 0.0465592900543872 -0.0362385500486904 0.209999999999999 0.0144836437413071 -0.0571946156904205 0.701999999999998 0.0322699413292232 -0.0493928222174892 0.230499999999999 -0.0399596127259187 -0.0434077107297148 -0.6305 -0.00487218138286763 -0.0587984850873935 0.722499999999998 0.0144836437413071 -0.0571946156904205 0.250999999999999 -0.0518889513211829 -0.0280808961891873 -0.61 -0.0237000300545252 -0.0540306262726484 0.742999999999998 -0.0518889513211828 0.0280808961891873 -0.0360000000000008 -0.00487218138286763 -0.0587984850873935 0.271499999999999 -0.0399596127259187 0.0434077107297148 -0.0155000000000007 -0.0581953169007606 -0.00971108082656329 -0.5895 -0.0237000300545252 -0.0540306262726484 0.291999999999999 -0.0399596127259187 -0.0434077107297148 0.763499999999998 -0.0581953169007606 0.00971108082656331 -0.569 -0.0399596127259187 -0.0434077107297148 0.312499999999999 -0.0237000300545252 0.0540306262726484 0.00499999999999923 -0.0518889513211829 -0.0280808961891873 0.332999999999999 -0.0518889513211828 0.0280808961891873 -0.5485 -0.0518889513211829 -0.0280808961891873 0.783999999999998 -0.0048721813828676 0.0587984850873935 0.0254999999999992 -0.0581953169007606 -0.00971108082656329 0.353499999999999 -0.0399596127259187 0.0434077107297148 -0.528 -0.0581953169007606 0.00971108082656331 0.373999999999999 -0.0581953169007606 -0.00971108082656329 0.804499999999998 0.0144836437413072 0.0571946156904205 0.0459999999999992 -0.0237000300545252 0.0540306262726484 -0.5075 -0.0518889513211828 0.0280808961891873 0.394499999999999 -0.0048721813828676 0.0587984850873935 -0.487 -0.0399596127259187 0.0434077107297148 0.414999999999998 0.0322699413292232 0.0493928222174892 0.0664999999999991 -0.0581953169007606 0.00971108082656331 0.824999999999998 0.0144836437413072 0.0571946156904205 -0.4665 -0.0518889513211828 0.0280808961891873 0.845499999999998 0.0322699413292232 0.0493928222174892 -0.446 -0.0237000300545252 0.0540306262726484 0.435499999999998 -0.0399596127259187 0.0434077107297148 0.865999999999998 0.0465592900543872 0.0362385500486904 -0.4255 -0.0048721813828676 0.0587984850873935 0.455999999999998 -0.0237000300545252 0.0540306262726484 0.886499999999998 0.0465592900543872 0.0362385500486904 0.0869999999999991 -0.0048721813828676 0.0587984850873935 0.906999999999998 0.0558032172603374 0.0191572686830763 -0.405 0.0558032172603374 -0.0191572686830763 -0.733 0.0144836437413072 0.0571946156904205 0.927499999999998 0.0465592900543872 -0.0362385500486904 -0.7125 0.0322699413292232 0.0493928222174892 0.947999999999998 0.0144836437413072 0.0571946156904205 0.476499999999998 0.0322699413292232 0.0493928222174892 0.496999999999998 0.0322699413292232 -0.0493928222174892 -0.692 0.0558032172603374 0.0191572686830763 0.107499999999999 0.0465592900543872 0.0362385500486904 0.968499999999997 0.0144836437413071 -0.0571946156904205 -0.6715 0.0558032172603374 -0.0191572686830763 -0.2205 0.0558032172603374 0.0191572686830763 0.988999999999998 0.0558032172603374 -0.0191572686830763 0.660999999999998 -0.00487218138286763 -0.0587984850873935 -0.651 0.0465592900543872 -0.0362385500486904 0.681499999999998 0.0465592900543872 -0.0362385500486904 -0.200000000000001 0.0465592900543872 0.0362385500486904 0.517499999999998 -0.0237000300545252 -0.0540306262726484 -0.6305 0.0322699413292232 -0.0493928222174892 0.701999999999998 0.0322699413292232 -0.0493928222174892 -0.179500000000001 0.0144836437413071 -0.0571946156904205 -0.159000000000001 0.0144836437413071 -0.0571946156904205 0.722499999999998 -0.0399596127259187 -0.0434077107297148 -0.61 -0.00487218138286763 -0.0587984850873935 0.742999999999998 -0.00487218138286763 -0.0587984850873935 -0.138500000000001 -0.0518889513211829 -0.0280808961891873 -0.5895 -0.0237000300545252 -0.0540306262726484 0.763499999999998 -0.0237000300545252 -0.0540306262726484 -0.118000000000001 -0.0581953169007606 -0.00971108082656329 -0.569 0.0558032172603374 0.0191572686830763 0.537999999999998 0.0558032172603374 -0.0191572686830763 0.209999999999999 -0.0581953169007606 0.00971108082656331 -0.5485 -0.0399596127259187 -0.0434077107297148 0.783999999999998 -0.0399596127259187 -0.0434077107297148 -0.0975000000000007 -0.0518889513211829 -0.0280808961891873 -0.0770000000000007 0.0465592900543872 -0.0362385500486904 0.230499999999999 -0.0518889513211828 0.0280808961891873 -0.528 0.0322699413292232 -0.0493928222174892 0.250999999999999 -0.0518889513211829 -0.0280808961891873 0.804499999999998 0.0144836437413071 -0.0571946156904205 0.271499999999999 -0.0399596127259187 0.0434077107297148 -0.5075 -0.0581953169007606 -0.00971108082656329 -0.0565000000000008 -0.00487218138286763 -0.0587984850873935 0.291999999999999 -0.0581953169007606 -0.00971108082656329 0.824999999999998 -0.0237000300545252 0.0540306262726484 -0.487 -0.0237000300545252 -0.0540306262726484 0.312499999999999 -0.0581953169007606 0.00971108082656331 -0.0360000000000008 -0.0048721813828676 0.0587984850873935 -0.4665 -0.0581953169007606 0.00971108082656331 0.845499999999998 -0.0399596127259187 -0.0434077107297148 0.332999999999999 -0.0518889513211828 0.0280808961891873 -0.0155000000000007 0.0144836437413072 0.0571946156904205 -0.446 -0.0518889513211829 -0.0280808961891873 0.353499999999999 0.0322699413292232 0.0493928222174892 -0.4255 -0.0399596127259187 0.0434077107297148 0.00499999999999923 -0.0581953169007606 -0.00971108082656329 0.373999999999999 -0.0518889513211828 0.0280808961891873 0.865999999999998 0.0465592900543872 0.0362385500486904 -0.405 -0.0399596127259187 0.0434077107297148 0.886499999999998 -0.0237000300545252 0.0540306262726484 0.0254999999999992 -0.0581953169007606 0.00971108082656331 0.394499999999999 -0.0237000300545252 0.0540306262726484 0.906999999999998 -0.0518889513211828 0.0280808961891873 0.414999999999998 0.0558032172603374 0.0191572686830763 -0.3845 -0.0048721813828676 0.0587984850873935 0.0459999999999992 -0.0048721813828676 0.0587984850873935 0.927499999999998 -0.0399596127259187 0.0434077107297148 0.435499999999998 0.0558032172603374 -0.0191572686830763 -0.7125 0.0144836437413072 0.0571946156904205 0.0664999999999991 0.0144836437413072 0.0571946156904205 0.947999999999998 -0.0237000300545252 0.0540306262726484 0.455999999999998 0.0465592900543872 -0.0362385500486904 -0.692 0.0322699413292232 0.0493928222174892 0.0869999999999991 0.0322699413292232 0.0493928222174892 0.968499999999997 0.0322699413292232 -0.0493928222174892 -0.6715 -0.0048721813828676 0.0587984850873935 0.476499999999998 0.0465592900543872 0.0362385500486904 0.988999999999998 0.0144836437413071 -0.0571946156904205 -0.651 0.0558032172603374 0.0191572686830763 1.0095 0.0558032172603374 -0.0191572686830763 0.681499999999998 -0.00487218138286763 -0.0587984850873935 -0.6305 0.0465592900543872 0.0362385500486904 0.107499999999999 0.0144836437413072 0.0571946156904205 0.496999999999998 0.0465592900543872 -0.0362385500486904 0.701999999999998 -0.0237000300545252 -0.0540306262726484 -0.61 0.0322699413292232 -0.0493928222174892 0.722499999999998 0.0144836437413071 -0.0571946156904205 0.742999999999998 0.0322699413292232 0.0493928222174892 0.517499999999998 -0.0399596127259187 -0.0434077107297148 -0.5895 -0.00487218138286763 -0.0587984850873935 0.763499999999998 -0.0518889513211829 -0.0280808961891873 -0.569 -0.0237000300545252 -0.0540306262726484 0.783999999999998 -0.0581953169007606 -0.00971108082656329 -0.5485 0.0558032172603374 0.0191572686830763 0.127999999999999 -0.0581953169007606 0.00971108082656331 -0.528 -0.0399596127259187 -0.0434077107297148 0.804499999999998 0.0558032172603374 -0.0191572686830763 -0.200000000000001 -0.0518889513211828 0.0280808961891873 -0.5075 0.0465592900543872 0.0362385500486904 0.537999999999998 -0.0399596127259187 0.0434077107297148 -0.487 -0.0518889513211829 -0.0280808961891873 0.824999999999998 0.0465592900543872 -0.0362385500486904 -0.179500000000001 0.0558032172603374 0.0191572686830763 0.558499999999998 -0.0581953169007606 -0.00971108082656329 0.845499999999998 -0.0237000300545252 0.0540306262726484 -0.4665 0.0322699413292232 -0.0493928222174892 -0.159000000000001 0.0558032172603374 -0.0191572686830763 0.230499999999999 0.0144836437413071 -0.0571946156904205 -0.138500000000001 -0.0048721813828676 0.0587984850873935 -0.446 0.0465592900543872 -0.0362385500486904 0.250999999999999 -0.0581953169007606 0.00971108082656331 0.865999999999998 0.0144836437413072 0.0571946156904205 -0.4255 -0.0518889513211828 0.0280808961891873 0.886499999999998 -0.00487218138286763 -0.0587984850873935 -0.118000000000001 0.0322699413292232 -0.0493928222174892 0.271499999999999 0.0322699413292232 0.0493928222174892 -0.405 -0.0237000300545252 -0.0540306262726484 -0.0975000000000007 0.0144836437413071 -0.0571946156904205 0.291999999999999 -0.0399596127259187 -0.0434077107297148 -0.0770000000000007 0.0465592900543872 0.0362385500486904 -0.3845 -0.00487218138286763 -0.0587984850873935 0.312499999999999 -0.0399596127259187 0.0434077107297148 0.906999999999998 -0.0237000300545252 0.0540306262726484 0.927499999999998 -0.0237000300545252 -0.0540306262726484 0.332999999999999 -0.0518889513211829 -0.0280808961891873 -0.0565000000000008 -0.0399596127259187 -0.0434077107297148 0.353499999999999 0.0558032172603374 0.0191572686830763 -0.364 -0.0048721813828676 0.0587984850873935 0.947999999999998 -0.0581953169007606 -0.00971108082656329 -0.0360000000000008 0.0558032172603374 -0.0191572686830763 -0.692 -0.0518889513211829 -0.0280808961891873 0.373999999999999 0.0144836437413072 0.0571946156904205 0.968499999999997 -0.0581953169007606 0.00971108082656331 -0.0155000000000007 -0.0581953169007606 -0.00971108082656329 0.394499999999999 0.0465592900543872 -0.0362385500486904 -0.6715 0.0322699413292232 0.0493928222174892 0.988999999999998 -0.0581953169007606 0.00971108082656331 0.414999999999998 -0.0399596127259187 0.0434077107297148 0.0254999999999992 0.0322699413292232 -0.0493928222174892 -0.651 0.0465592900543872 0.0362385500486904 1.0095 -0.0518889513211828 0.0280808961891873 0.435499999999998 0.0558032172603374 -0.0191572686830763 0.701999999999998 0.0144836437413071 -0.0571946156904205 -0.6305 0.0465592900543872 -0.0362385500486904 0.722499999999998 -0.0237000300545252 0.0540306262726484 0.0459999999999992 -0.00487218138286763 -0.0587984850873935 -0.61 0.0322699413292232 -0.0493928222174892 0.742999999999998 -0.0399596127259187 0.0434077107297148 0.455999999999998 -0.0048721813828676 0.0587984850873935 0.0664999999999991 0.0144836437413071 -0.0571946156904205 0.763499999999998 -0.0237000300545252 -0.0540306262726484 -0.5895 -0.00487218138286763 -0.0587984850873935 0.783999999999998 0.0144836437413072 0.0571946156904205 0.0869999999999991 -0.0399596127259187 -0.0434077107297148 -0.569 -0.0237000300545252 0.0540306262726484 0.476499999999998 -0.0237000300545252 -0.0540306262726484 0.804499999999998 -0.0518889513211829 -0.0280808961891873 -0.5485 -0.0048721813828676 0.0587984850873935 0.496999999999998 0.0322699413292232 0.0493928222174892 0.107499999999999 0.0465592900543872 0.0362385500486904 0.127999999999999 -0.0581953169007606 -0.00971108082656329 -0.528 -0.0399596127259187 -0.0434077107297148 0.824999999999998 -0.0581953169007606 0.00971108082656331 -0.5075 0.0144836437413072 0.0571946156904205 0.517499999999998 -0.0518889513211829 -0.0280808961891873 0.845499999999998 -0.0518889513211828 0.0280808961891873 -0.487 0.0322699413292232 0.0493928222174892 0.537999999999998 -0.0581953169007606 -0.00971108082656329 0.865999999999998 -0.0399596127259187 0.0434077107297148 -0.4665 -0.0581953169007606 0.00971108082656331 0.886499999999998 -0.0237000300545252 0.0540306262726484 -0.446 0.0465592900543872 0.0362385500486904 0.558499999999998 0.0558032172603374 0.0191572686830763 0.148499999999999 -0.0048721813828676 0.0587984850873935 -0.4255 -0.0518889513211828 0.0280808961891873 0.906999999999998 0.0144836437413072 0.0571946156904205 -0.405 0.0322699413292232 0.0493928222174892 -0.3845 -0.0399596127259187 0.0434077107297148 0.927499999999998 0.0465592900543872 0.0362385500486904 -0.364 -0.0237000300545252 0.0540306262726484 0.947999999999998 0.0558032172603374 -0.0191572686830763 -0.179500000000001 0.0465592900543872 -0.0362385500486904 -0.159000000000001 0.0558032172603374 0.0191572686830763 0.578999999999998 -0.0048721813828676 0.0587984850873935 0.968499999999997 0.0558032172603374 -0.0191572686830763 0.250999999999999 0.0322699413292232 -0.0493928222174892 -0.138500000000001 0.0558032172603374 0.0191572686830763 -0.3435 0.0558032172603374 -0.0191572686830763 -0.6715 0.0144836437413072 0.0571946156904205 0.988999999999998 0.0465592900543872 -0.0362385500486904 0.271499999999999 0.0322699413292232 0.0493928222174892 1.0095 0.0144836437413071 -0.0571946156904205 -0.118000000000001 0.0322699413292232 -0.0493928222174892 0.291999999999999 0.0558032172603374 -0.0191572686830763 0.722499999999998 0.0465592900543872 -0.0362385500486904 -0.651 -0.00487218138286763 -0.0587984850873935 -0.0975000000000007 0.0465592900543872 -0.0362385500486904 0.742999999999998 0.0144836437413071 -0.0571946156904205 0.312499999999999 0.0322699413292232 -0.0493928222174892 -0.6305 -0.0237000300545252 -0.0540306262726484 -0.0770000000000007 -0.00487218138286763 -0.0587984850873935 0.332999999999999 0.0322699413292232 -0.0493928222174892 0.763499999999998 -0.0399596127259187 -0.0434077107297148 -0.0565000000000008 -0.0237000300545252 -0.0540306262726484 0.353499999999999 0.0144836437413071 -0.0571946156904205 0.783999999999998 0.0144836437413071 -0.0571946156904205 -0.61 -0.0518889513211829 -0.0280808961891873 -0.0360000000000008 -0.00487218138286763 -0.0587984850873935 0.804499999999998 -0.0399596127259187 -0.0434077107297148 0.373999999999999 -0.00487218138286763 -0.0587984850873935 -0.5895 -0.0518889513211829 -0.0280808961891873 0.394499999999999 -0.0581953169007606 -0.00971108082656329 -0.0155000000000007 -0.0237000300545252 -0.0540306262726484 -0.569 -0.0581953169007606 -0.00971108082656329 0.414999999999998 -0.0237000300545252 -0.0540306262726484 0.824999999999998 -0.0581953169007606 0.00971108082656331 0.00499999999999923 -0.0581953169007606 0.00971108082656331 0.435499999999998 -0.0399596127259187 -0.0434077107297148 -0.5485 -0.0399596127259187 -0.0434077107297148 0.845499999999998 -0.0518889513211829 -0.0280808961891873 -0.528 -0.0518889513211828 0.0280808961891873 0.455999999999998 -0.0518889513211828 0.0280808961891873 0.0254999999999992 -0.0581953169007606 -0.00971108082656329 -0.5075 -0.0518889513211829 -0.0280808961891873 0.865999999999998 -0.0399596127259187 0.0434077107297148 0.476499999999998 -0.0581953169007606 0.00971108082656331 -0.487 -0.0581953169007606 -0.00971108082656329 0.886499999999998 -0.0399596127259187 0.0434077107297148 0.0459999999999992 -0.0518889513211828 0.0280808961891873 -0.4665 -0.0237000300545252 0.0540306262726484 0.496999999999998 -0.0237000300545252 0.0540306262726484 0.0664999999999991 -0.0048721813828676 0.0587984850873935 0.0869999999999991 -0.0581953169007606 0.00971108082656331 0.906999999999998 -0.0399596127259187 0.0434077107297148 -0.446 -0.0518889513211828 0.0280808961891873 0.927499999999998 0.0144836437413072 0.0571946156904205 0.107499999999999 -0.0048721813828676 0.0587984850873935 0.517499999999998 -0.0237000300545252 0.0540306262726484 -0.4255 -0.0399596127259187 0.0434077107297148 0.947999999999998 0.0322699413292232 0.0493928222174892 0.127999999999999 -0.0048721813828676 0.0587984850873935 -0.405 0.0144836437413072 0.0571946156904205 -0.3845 0.0144836437413072 0.0571946156904205 0.537999999999998 -0.0237000300545252 0.0540306262726484 0.968499999999997 0.0322699413292232 0.0493928222174892 -0.364 -0.0048721813828676 0.0587984850873935 0.988999999999998 0.0144836437413072 0.0571946156904205 1.0095 0.0465592900543872 0.0362385500486904 0.148499999999999 0.0322699413292232 0.0493928222174892 0.558499999999998 0.0558032172603374 -0.0191572686830763 0.742999999999998 0.0465592900543872 0.0362385500486904 -0.3435 0.0465592900543872 -0.0362385500486904 0.763499999999998 0.0322699413292232 -0.0493928222174892 0.783999999999998 0.0558032172603374 0.0191572686830763 -0.323 0.0558032172603374 -0.0191572686830763 -0.651 0.0144836437413071 -0.0571946156904205 0.804499999999998 -0.00487218138286763 -0.0587984850873935 0.824999999999998 0.0465592900543872 -0.0362385500486904 -0.6305 0.0465592900543872 0.0362385500486904 0.578999999999998 -0.0237000300545252 -0.0540306262726484 0.845499999999998 0.0322699413292232 -0.0493928222174892 -0.61 0.0558032172603374 0.0191572686830763 0.168999999999999 -0.0399596127259187 -0.0434077107297148 0.865999999999998 0.0558032172603374 -0.0191572686830763 -0.159000000000001 0.0558032172603374 0.0191572686830763 0.599499999999998 0.0144836437413071 -0.0571946156904205 -0.5895 0.0558032172603374 -0.0191572686830763 0.271499999999999 0.0465592900543872 -0.0362385500486904 0.291999999999999 0.0465592900543872 -0.0362385500486904 -0.138500000000001 -0.00487218138286763 -0.0587984850873935 -0.569 -0.0518889513211829 -0.0280808961891873 0.886499999999998 0.0322699413292232 -0.0493928222174892 -0.118000000000001 -0.0237000300545252 -0.0540306262726484 -0.5485 0.0322699413292232 -0.0493928222174892 0.312499999999999 -0.0581953169007606 -0.00971108082656329 0.906999999999998 0.0144836437413071 -0.0571946156904205 -0.0975000000000007 0.0144836437413071 -0.0571946156904205 0.332999999999999 -0.00487218138286763 -0.0587984850873935 0.353499999999999 -0.0399596127259187 -0.0434077107297148 -0.528 -0.0581953169007606 0.00971108082656331 0.927499999999998 -0.00487218138286763 -0.0587984850873935 -0.0770000000000007 -0.0237000300545252 -0.0540306262726484 0.373999999999999 -0.0237000300545252 -0.0540306262726484 -0.0565000000000008 -0.0518889513211829 -0.0280808961891873 -0.5075 -0.0518889513211828 0.0280808961891873 0.947999999999998 -0.0399596127259187 -0.0434077107297148 0.394499999999999 -0.0581953169007606 -0.00971108082656329 -0.487 -0.0399596127259187 -0.0434077107297148 -0.0360000000000008 -0.0399596127259187 0.0434077107297148 0.968499999999997 -0.0518889513211829 -0.0280808961891873 0.414999999999998 -0.0518889513211829 -0.0280808961891873 -0.0155000000000007 -0.0581953169007606 0.00971108082656331 -0.4665 -0.0518889513211828 0.0280808961891873 -0.446 -0.0581953169007606 -0.00971108082656329 0.435499999999998 -0.0237000300545252 0.0540306262726484 0.988999999999998 -0.0581953169007606 -0.00971108082656329 0.00499999999999923 -0.0399596127259187 0.0434077107297148 -0.4255 -0.0048721813828676 0.0587984850873935 1.0095 -0.0581953169007606 0.00971108082656331 0.0254999999999992 0.0558032172603374 -0.0191572686830763 0.763499999999998 -0.0581953169007606 0.00971108082656331 0.455999999999998 -0.0237000300545252 0.0540306262726484 -0.405 -0.0518889513211828 0.0280808961891873 0.476499999999998 -0.0518889513211828 0.0280808961891873 0.0459999999999992 0.0465592900543872 -0.0362385500486904 0.783999999999998 -0.0048721813828676 0.0587984850873935 -0.3845 0.0322699413292232 -0.0493928222174892 0.804499999999998 -0.0399596127259187 0.0434077107297148 0.0664999999999991 -0.0399596127259187 0.0434077107297148 0.496999999999998 0.0144836437413072 0.0571946156904205 -0.364 0.0144836437413071 -0.0571946156904205 0.824999999999998 -0.0237000300545252 0.0540306262726484 0.0869999999999991 -0.00487218138286763 -0.0587984850873935 0.845499999999998 -0.0237000300545252 0.0540306262726484 0.517499999999998 -0.0048721813828676 0.0587984850873935 0.107499999999999 0.0322699413292232 0.0493928222174892 -0.3435 0.0144836437413072 0.0571946156904205 0.127999999999999 0.0465592900543872 0.0362385500486904 -0.323 -0.0237000300545252 -0.0540306262726484 0.865999999999998 -0.0048721813828676 0.0587984850873935 0.537999999999998 -0.0399596127259187 -0.0434077107297148 0.886499999999998 0.0558032172603374 0.0191572686830763 -0.3025 0.0322699413292232 0.0493928222174892 0.148499999999999 0.0465592900543872 0.0362385500486904 0.168999999999999 -0.0518889513211829 -0.0280808961891873 0.906999999999998 0.0144836437413072 0.0571946156904205 0.558499999999998 0.0558032172603374 -0.0191572686830763 -0.6305 -0.0581953169007606 -0.00971108082656329 0.927499999999998 0.0465592900543872 -0.0362385500486904 -0.61 0.0322699413292232 0.0493928222174892 0.578999999999998 -0.0581953169007606 0.00971108082656331 0.947999999999998 0.0322699413292232 -0.0493928222174892 -0.5895 0.0558032172603374 0.0191572686830763 -0.9995 -0.0518889513211828 0.0280808961891873 0.968499999999997 0.0465592900543872 0.0362385500486904 0.599499999999998 0.0144836437413071 -0.0571946156904205 -0.569 0.0558032172603374 0.0191572686830763 0.189499999999999 0.0465592900543872 0.0362385500486904 -0.9995 -0.00487218138286763 -0.0587984850873935 -0.5485 -0.0399596127259187 0.0434077107297148 0.988999999999998 -0.0237000300545252 0.0540306262726484 1.0095 -0.0237000300545252 -0.0540306262726484 -0.528 0.0558032172603374 0.0191572686830763 0.619999999999998 0.0558032172603374 -0.0191572686830763 0.783999999999998 -0.0399596127259187 -0.0434077107297148 -0.5075 0.0465592900543872 -0.0362385500486904 0.804499999999998 0.0558032172603374 0.0191572686830763 -0.979 0.0558032172603374 -0.0191572686830763 -0.138500000000001 0.0322699413292232 -0.0493928222174892 0.824999999999998 -0.0518889513211829 -0.0280808961891873 -0.487 0.0322699413292232 0.0493928222174892 -0.9995 0.0465592900543872 -0.0362385500486904 -0.118000000000001 0.0558032172603374 -0.0191572686830763 0.291999999999999 -0.0581953169007606 -0.00971108082656329 -0.4665 0.0144836437413071 -0.0571946156904205 0.845499999999998 0.0465592900543872 0.0362385500486904 -0.979 0.0322699413292232 -0.0493928222174892 -0.0975000000000007 0.0465592900543872 -0.0362385500486904 0.312499999999999 -0.0581953169007606 0.00971108082656331 -0.446 0.0558032172603374 0.0191572686830763 -0.9585 -0.00487218138286763 -0.0587984850873935 0.865999999999998 0.0322699413292232 -0.0493928222174892 0.332999999999999 0.0144836437413071 -0.0571946156904205 -0.0770000000000007 0.0144836437413071 -0.0571946156904205 0.353499999999999 -0.0518889513211828 0.0280808961891873 -0.4255 -0.0237000300545252 -0.0540306262726484 0.886499999999998 -0.00487218138286763 -0.0587984850873935 -0.0565000000000008 -0.00487218138286763 -0.0587984850873935 0.373999999999999 0.0144836437413072 0.0571946156904205 -0.9995 -0.0399596127259187 0.0434077107297148 -0.405 -0.0237000300545252 -0.0540306262726484 -0.0360000000000008 -0.0399596127259187 -0.0434077107297148 0.906999999999998 -0.0237000300545252 -0.0540306262726484 0.394499999999999 -0.0237000300545252 0.0540306262726484 -0.3845 -0.0399596127259187 -0.0434077107297148 -0.0155000000000007 -0.0399596127259187 -0.0434077107297148 0.414999999999998 -0.0048721813828676 0.0587984850873935 -0.364 0.0322699413292232 0.0493928222174892 -0.979 0.0465592900543872 0.0362385500486904 -0.9585 -0.0518889513211829 -0.0280808961891873 0.00499999999999923 -0.0518889513211829 -0.0280808961891873 0.435499999999998 -0.0518889513211829 -0.0280808961891873 0.927499999999998 0.0144836437413072 0.0571946156904205 -0.3435 -0.0581953169007606 -0.00971108082656329 0.947999999999998 -0.0581953169007606 -0.00971108082656329 0.0254999999999992 -0.0581953169007606 -0.00971108082656329 0.455999999999998 -0.0581953169007606 0.00971108082656331 0.968499999999997 -0.0581953169007606 0.00971108082656331 0.0459999999999992 0.0322699413292232 0.0493928222174892 -0.323 -0.0581953169007606 0.00971108082656331 0.476499999999998 0.0558032172603374 0.0191572686830763 -0.938 -0.0518889513211828 0.0280808961891873 0.0664999999999991 -0.0518889513211828 0.0280808961891873 0.988999999999998 -0.0048721813828676 0.0587984850873935 -0.9995 0.0465592900543872 0.0362385500486904 -0.3025 -0.0518889513211828 0.0280808961891873 0.496999999999998 -0.0399596127259187 0.0434077107297148 0.0869999999999991 -0.0399596127259187 0.0434077107297148 1.0095 0.0144836437413072 0.0571946156904205 -0.979 0.0558032172603374 -0.0191572686830763 0.804499999999998 -0.0237000300545252 0.0540306262726484 0.107499999999999 0.0558032172603374 0.0191572686830763 -0.282 0.0322699413292232 0.0493928222174892 -0.9585 0.0465592900543872 -0.0362385500486904 0.824999999999998 -0.0048721813828676 0.0587984850873935 0.127999999999999 0.0558032172603374 -0.0191572686830763 -0.61 -0.0399596127259187 0.0434077107297148 0.517499999999998 0.0322699413292232 -0.0493928222174892 0.845499999999998 0.0465592900543872 0.0362385500486904 -0.938 0.0144836437413072 0.0571946156904205 0.148499999999999 0.0144836437413071 -0.0571946156904205 0.865999999999998 0.0465592900543872 -0.0362385500486904 -0.5895 -0.0237000300545252 0.0540306262726484 0.537999999999998 0.0322699413292232 -0.0493928222174892 -0.569 -0.00487218138286763 -0.0587984850873935 0.886499999999998 0.0558032172603374 0.0191572686830763 -0.9175 0.0322699413292232 0.0493928222174892 0.168999999999999 0.0144836437413071 -0.0571946156904205 -0.5485 -0.0237000300545252 0.0540306262726484 -0.9995 -0.0237000300545252 -0.0540306262726484 0.906999999999998 -0.0048721813828676 0.0587984850873935 0.558499999999998 -0.00487218138286763 -0.0587984850873935 -0.528 -0.0048721813828676 0.0587984850873935 -0.979 -0.0399596127259187 -0.0434077107297148 0.927499999999998 -0.0237000300545252 -0.0540306262726484 -0.5075 0.0144836437413072 0.0571946156904205 0.578999999999998 -0.0518889513211829 -0.0280808961891873 0.947999999999998 0.0144836437413072 0.0571946156904205 -0.9585 -0.0399596127259187 -0.0434077107297148 -0.487 0.0322699413292232 0.0493928222174892 0.599499999999998 0.0322699413292232 0.0493928222174892 -0.938 -0.0581953169007606 -0.00971108082656329 0.968499999999997 0.0465592900543872 0.0362385500486904 0.189499999999999 -0.0518889513211829 -0.0280808961891873 -0.4665 0.0465592900543872 0.0362385500486904 -0.9175 0.0465592900543872 0.0362385500486904 0.619999999999998 -0.0581953169007606 0.00971108082656331 0.988999999999998 0.0558032172603374 0.0191572686830763 0.209999999999999 -0.0581953169007606 -0.00971108082656329 -0.446 -0.0518889513211828 0.0280808961891873 1.0095 -0.0581953169007606 0.00971108082656331 -0.4255 0.0558032172603374 -0.0191572686830763 0.824999999999998 0.0558032172603374 0.0191572686830763 -0.897 -0.0518889513211828 0.0280808961891873 -0.405 0.0465592900543872 -0.0362385500486904 0.845499999999998 -0.0399596127259187 0.0434077107297148 -0.3845 0.0322699413292232 -0.0493928222174892 0.865999999999998 -0.0399596127259187 0.0434077107297148 -0.9995 0.0558032172603374 -0.0191572686830763 -0.118000000000001 0.0144836437413071 -0.0571946156904205 0.886499999999998 -0.0237000300545252 0.0540306262726484 -0.364 -0.0237000300545252 0.0540306262726484 -0.979 0.0465592900543872 -0.0362385500486904 -0.0975000000000007 0.0558032172603374 0.0191572686830763 0.640499999999998 0.0558032172603374 -0.0191572686830763 0.312499999999999 -0.0048721813828676 0.0587984850873935 -0.3435 -0.0048721813828676 0.0587984850873935 -0.9585 0.0322699413292232 -0.0493928222174892 -0.0770000000000007 -0.00487218138286763 -0.0587984850873935 0.906999999999998 0.0465592900543872 -0.0362385500486904 0.332999999999999 0.0144836437413072 0.0571946156904205 -0.938 0.0144836437413072 0.0571946156904205 -0.323 -0.0237000300545252 -0.0540306262726484 0.927499999999998 0.0322699413292232 -0.0493928222174892 0.353499999999999 0.0144836437413071 -0.0571946156904205 -0.0565000000000008 -0.00487218138286763 -0.0587984850873935 -0.0360000000000008 0.0144836437413071 -0.0571946156904205 0.373999999999999 0.0322699413292232 0.0493928222174892 -0.9175 0.0322699413292232 0.0493928222174892 -0.3025 -0.0399596127259187 -0.0434077107297148 0.947999999999998 -0.0237000300545252 -0.0540306262726484 -0.0155000000000007 -0.00487218138286763 -0.0587984850873935 0.394499999999999 0.0465592900543872 0.0362385500486904 -0.897 0.0465592900543872 0.0362385500486904 -0.282 -0.0518889513211829 -0.0280808961891873 0.968499999999997 -0.0399596127259187 -0.0434077107297148 0.00499999999999923 -0.0237000300545252 -0.0540306262726484 0.414999999999998 -0.0399596127259187 -0.0434077107297148 0.435499999999998 -0.0518889513211829 -0.0280808961891873 0.0254999999999992 0.0558032172603374 0.0191572686830763 -0.2615 -0.0581953169007606 -0.00971108082656329 0.988999999999998 -0.0581953169007606 0.00971108082656331 1.0095 0.0558032172603374 -0.0191572686830763 -0.5895 -0.0518889513211829 -0.0280808961891873 0.455999999999998 -0.0581953169007606 -0.00971108082656329 0.0459999999999992 0.0558032172603374 0.0191572686830763 -0.8765 -0.0581953169007606 -0.00971108082656329 0.476499999999998 0.0558032172603374 -0.0191572686830763 0.845499999999998 -0.0518889513211828 0.0280808961891873 -0.9995 -0.0581953169007606 0.00971108082656331 0.0664999999999991 0.0465592900543872 -0.0362385500486904 0.865999999999998 -0.0581953169007606 0.00971108082656331 0.496999999999998 0.0465592900543872 -0.0362385500486904 -0.569 -0.0518889513211828 0.0280808961891873 0.0869999999999991 -0.0399596127259187 0.0434077107297148 -0.979 0.0322699413292232 -0.0493928222174892 -0.5485 0.0322699413292232 -0.0493928222174892 0.886499999999998 -0.0237000300545252 0.0540306262726484 -0.9585 -0.0518889513211828 0.0280808961891873 0.517499999999998 -0.0399596127259187 0.0434077107297148 0.107499999999999 0.0144836437413071 -0.0571946156904205 -0.528 -0.0237000300545252 0.0540306262726484 0.127999999999999 0.0144836437413071 -0.0571946156904205 0.906999999999998 -0.0048721813828676 0.0587984850873935 -0.938 -0.00487218138286763 -0.0587984850873935 -0.5075 -0.00487218138286763 -0.0587984850873935 0.927499999999998 0.0144836437413072 0.0571946156904205 -0.9175 -0.0048721813828676 0.0587984850873935 0.148499999999999 -0.0237000300545252 -0.0540306262726484 0.947999999999998 0.0144836437413072 0.0571946156904205 0.168999999999999 -0.0237000300545252 -0.0540306262726484 -0.487 0.0322699413292232 0.0493928222174892 -0.897 -0.0399596127259187 0.0434077107297148 0.537999999999998 -0.0399596127259187 -0.0434077107297148 0.968499999999997 0.0322699413292232 0.0493928222174892 0.189499999999999 -0.0399596127259187 -0.0434077107297148 -0.4665 -0.0518889513211829 -0.0280808961891873 0.988999999999998 0.0465592900543872 0.0362385500486904 -0.8765 -0.0518889513211829 -0.0280808961891873 -0.446 -0.0237000300545252 0.0540306262726484 0.558499999999998 -0.0048721813828676 0.0587984850873935 0.578999999999998 -0.0581953169007606 -0.00971108082656329 1.0095 -0.0581953169007606 -0.00971108082656329 -0.4255 0.0558032172603374 -0.0191572686830763 0.865999999999998 -0.0581953169007606 0.00971108082656331 -0.405 0.0465592900543872 0.0362385500486904 0.209999999999999 0.0558032172603374 0.0191572686830763 -0.856 0.0465592900543872 -0.0362385500486904 0.886499999999998 0.0144836437413072 0.0571946156904205 0.599499999999998 -0.0581953169007606 0.00971108082656331 -0.9995 0.0322699413292232 -0.0493928222174892 0.906999999999998 -0.0518889513211828 0.0280808961891873 -0.3845 -0.0399596127259187 0.0434077107297148 -0.364 -0.0518889513211828 0.0280808961891873 -0.979 0.0144836437413071 -0.0571946156904205 0.927499999999998 0.0322699413292232 0.0493928222174892 0.619999999999998 -0.0399596127259187 0.0434077107297148 -0.9585 0.0558032172603374 0.0191572686830763 0.230499999999999 -0.0237000300545252 0.0540306262726484 -0.3435 -0.00487218138286763 -0.0587984850873935 0.947999999999998 -0.0237000300545252 0.0540306262726484 -0.938 0.0465592900543872 0.0362385500486904 0.640499999999998 -0.0048721813828676 0.0587984850873935 -0.323 -0.0237000300545252 -0.0540306262726484 0.968499999999997 -0.0048721813828676 0.0587984850873935 -0.9175 0.0144836437413072 0.0571946156904205 -0.3025 -0.0399596127259187 -0.0434077107297148 0.988999999999998 0.0144836437413072 0.0571946156904205 -0.897 0.0322699413292232 0.0493928222174892 -0.282 -0.0518889513211829 -0.0280808961891873 1.0095 0.0558032172603374 -0.0191572686830763 -0.0975000000000007 0.0322699413292232 0.0493928222174892 -0.8765 0.0558032172603374 -0.0191572686830763 0.886499999999998 0.0465592900543872 0.0362385500486904 -0.2615 0.0465592900543872 -0.0362385500486904 -0.0770000000000007 0.0465592900543872 0.0362385500486904 -0.856 0.0465592900543872 -0.0362385500486904 0.906999999999998 0.0558032172603374 0.0191572686830763 0.660999999999998 0.0558032172603374 -0.0191572686830763 0.332999999999999 0.0322699413292232 -0.0493928222174892 -0.0565000000000008 0.0322699413292232 -0.0493928222174892 0.927499999999998 0.0558032172603374 0.0191572686830763 -0.241 0.0144836437413071 -0.0571946156904205 -0.0360000000000008 0.0465592900543872 -0.0362385500486904 0.353499999999999 0.0144836437413071 -0.0571946156904205 0.947999999999998 0.0322699413292232 -0.0493928222174892 0.373999999999999 0.0558032172603374 -0.0191572686830763 -0.569 0.0558032172603374 0.0191572686830763 -0.8355 -0.00487218138286763 -0.0587984850873935 -0.0155000000000007 -0.0581953169007606 -0.00971108082656329 -0.9995 0.0144836437413071 -0.0571946156904205 0.394499999999999 -0.00487218138286763 -0.0587984850873935 0.968499999999997 -0.0237000300545252 -0.0540306262726484 0.00499999999999923 0.0465592900543872 -0.0362385500486904 -0.5485 -0.00487218138286763 -0.0587984850873935 0.414999999999998 -0.0237000300545252 -0.0540306262726484 0.988999999999998 -0.0581953169007606 0.00971108082656331 -0.979 -0.0399596127259187 -0.0434077107297148 0.0254999999999992 0.0322699413292232 -0.0493928222174892 -0.528 -0.0237000300545252 -0.0540306262726484 0.435499999999998 -0.0399596127259187 -0.0434077107297148 1.0095 -0.0518889513211828 0.0280808961891873 -0.9585 -0.0518889513211829 -0.0280808961891873 0.0459999999999992 -0.0399596127259187 -0.0434077107297148 0.455999999999998 0.0144836437413071 -0.0571946156904205 -0.5075 0.0558032172603374 -0.0191572686830763 0.906999999999998 -0.0399596127259187 0.0434077107297148 -0.938 -0.0581953169007606 -0.00971108082656329 0.0664999999999991 -0.0518889513211829 -0.0280808961891873 0.476499999999998 -0.00487218138286763 -0.0587984850873935 -0.487 0.0465592900543872 -0.0362385500486904 0.927499999999998 -0.0581953169007606 0.00971108082656331 0.0869999999999991 -0.0237000300545252 -0.0540306262726484 -0.4665 0.0322699413292232 -0.0493928222174892 0.947999999999998 -0.0581953169007606 -0.00971108082656329 0.496999999999998 -0.0237000300545252 0.0540306262726484 -0.9175 -0.0518889513211828 0.0280808961891873 0.107499999999999 -0.0048721813828676 0.0587984850873935 -0.897 -0.0399596127259187 -0.0434077107297148 -0.446 -0.0581953169007606 0.00971108082656331 0.517499999999998 0.0144836437413071 -0.0571946156904205 0.968499999999997 0.0144836437413072 0.0571946156904205 -0.8765 -0.0399596127259187 0.0434077107297148 0.127999999999999 -0.0518889513211829 -0.0280808961891873 -0.4255 -0.0237000300545252 0.0540306262726484 0.148499999999999 -0.00487218138286763 -0.0587984850873935 0.988999999999998 -0.0237000300545252 -0.0540306262726484 1.0095 -0.0048721813828676 0.0587984850873935 0.168999999999999 0.0322699413292232 0.0493928222174892 -0.856 -0.0581953169007606 -0.00971108082656329 -0.405 -0.0518889513211828 0.0280808961891873 0.537999999999998 0.0558032172603374 -0.0191572686830763 0.927499999999998 -0.0581953169007606 0.00971108082656331 -0.3845 0.0144836437413072 0.0571946156904205 0.189499999999999 0.0465592900543872 0.0362385500486904 -0.8355 -0.0518889513211828 0.0280808961891873 -0.364 0.0465592900543872 -0.0362385500486904 0.947999999999998 -0.0399596127259187 0.0434077107297148 0.558499999999998 -0.0399596127259187 0.0434077107297148 -0.3435 0.0322699413292232 0.0493928222174892 0.209999999999999 0.0322699413292232 -0.0493928222174892 0.968499999999997 0.0144836437413071 -0.0571946156904205 0.988999999999998 0.0558032172603374 0.0191572686830763 -0.815 -0.0237000300545252 0.0540306262726484 -0.323 -0.0237000300545252 0.0540306262726484 0.578999999999998 -0.0518889513211829 -0.0280808961891873 -0.9995 0.0465592900543872 0.0362385500486904 0.230499999999999 -0.00487218138286763 -0.0587984850873935 1.0095 -0.0048721813828676 0.0587984850873935 -0.3025 -0.0581953169007606 -0.00971108082656329 -0.979 0.0558032172603374 -0.0191572686830763 0.947999999999998 -0.0048721813828676 0.0587984850873935 0.599499999999998 0.0465592900543872 -0.0362385500486904 0.968499999999997 0.0144836437413072 0.0571946156904205 -0.282 -0.0581953169007606 0.00971108082656331 -0.9585 0.0144836437413072 0.0571946156904205 0.619999999999998 0.0322699413292232 0.0493928222174892 -0.2615 -0.0518889513211828 0.0280808961891873 -0.938 0.0322699413292232 -0.0493928222174892 0.988999999999998 0.0322699413292232 0.0493928222174892 0.640499999999998 0.0144836437413071 -0.0571946156904205 1.0095 0.0465592900543872 0.0362385500486904 -0.241 -0.0399596127259187 0.0434077107297148 -0.9175 0.0558032172603374 -0.0191572686830763 0.968499999999997 0.0465592900543872 0.0362385500486904 0.660999999999998 -0.0237000300545252 0.0540306262726484 -0.897 0.0465592900543872 -0.0362385500486904 0.988999999999998 0.0558032172603374 0.0191572686830763 -0.2205 -0.0048721813828676 0.0587984850873935 -0.8765 0.0322699413292232 -0.0493928222174892 1.0095 0.0558032172603374 -0.0191572686830763 -0.5485 0.0558032172603374 -0.0191572686830763 0.988999999999998 0.0144836437413072 0.0571946156904205 -0.856 0.0558032172603374 0.0191572686830763 0.250999999999999 0.0465592900543872 -0.0362385500486904 -0.528 0.0465592900543872 -0.0362385500486904 1.0095 0.0558032172603374 -0.0191572686830763 -0.0770000000000007 0.0558032172603374 0.0191572686830763 0.681499999999998 0.0322699413292232 0.0493928222174892 -0.8355 0.0558032172603374 -0.0191572686830763 1.0095 0.0465592900543872 -0.0362385500486904 -0.0565000000000008 0.0322699413292232 -0.0493928222174892 -0.5075 0.0465592900543872 0.0362385500486904 -0.815 0.0558032172603374 -0.0191572686830763 0.353499999999999 0.0322699413292232 -0.0493928222174892 -0.0360000000000008 0.0144836437413071 -0.0571946156904205 -0.487 0.0465592900543872 -0.0362385500486904 0.373999999999999 0.0144836437413071 -0.0571946156904205 -0.0155000000000007 -0.00487218138286763 -0.0587984850873935 -0.4665 0.0322699413292232 -0.0493928222174892 0.394499999999999 -0.00487218138286763 -0.0587984850873935 0.00499999999999923 0.0558032172603374 0.0191572686830763 -0.7945 -0.0399596127259187 -0.0434077107297148 -0.9995 -0.0237000300545252 -0.0540306262726484 -0.446 0.0144836437413071 -0.0571946156904205 0.414999999999998 -0.0237000300545252 -0.0540306262726484 0.0254999999999992 -0.00487218138286763 -0.0587984850873935 0.435499999999998 -0.0399596127259187 -0.0434077107297148 -0.4255 -0.0518889513211829 -0.0280808961891873 -0.979 -0.0399596127259187 -0.0434077107297148 0.0459999999999992 -0.0237000300545252 -0.0540306262726484 0.455999999999998 -0.0581953169007606 -0.00971108082656329 -0.9585 -0.0399596127259187 -0.0434077107297148 0.476499999999998 -0.0518889513211829 -0.0280808961891873 0.0664999999999991 -0.0518889513211829 -0.0280808961891873 -0.405 -0.0581953169007606 -0.00971108082656329 -0.3845 -0.0518889513211829 -0.0280808961891873 0.496999999999998 -0.0581953169007606 0.00971108082656331 -0.938 -0.0581953169007606 -0.00971108082656329 0.0869999999999991 -0.0518889513211828 0.0280808961891873 -0.9175 -0.0581953169007606 0.00971108082656331 -0.364 -0.0581953169007606 -0.00971108082656329 0.517499999999998 -0.0581953169007606 0.00971108082656331 0.107499999999999 -0.0518889513211828 0.0280808961891873 -0.3435 -0.0399596127259187 0.0434077107297148 -0.897 -0.0518889513211828 0.0280808961891873 0.127999999999999 -0.0237000300545252 0.0540306262726484 -0.8765 -0.0581953169007606 0.00971108082656331 0.537999999999998 -0.0399596127259187 0.0434077107297148 0.148499999999999 -0.0399596127259187 0.0434077107297148 -0.323 -0.0237000300545252 0.0540306262726484 0.168999999999999 -0.0518889513211828 0.0280808961891873 0.558499999999998 -0.0048721813828676 0.0587984850873935 -0.856 -0.0237000300545252 0.0540306262726484 -0.3025 -0.0048721813828676 0.0587984850873935 0.189499999999999 0.0144836437413072 0.0571946156904205 -0.8355 -0.0048721813828676 0.0587984850873935 -0.282 -0.0399596127259187 0.0434077107297148 0.578999999999998 0.0322699413292232 0.0493928222174892 -0.815 0.0144836437413072 0.0571946156904205 0.209999999999999 0.0144836437413072 0.0571946156904205 -0.2615 0.0322699413292232 0.0493928222174892 0.230499999999999 0.0465592900543872 0.0362385500486904 -0.7945 0.0322699413292232 0.0493928222174892 -0.241 -0.0237000300545252 0.0540306262726484 0.599499999999998 0.0465592900543872 0.0362385500486904 -0.2205 -0.0048721813828676 0.0587984850873935 0.619999999999998 0.0465592900543872 0.0362385500486904 0.250999999999999 0.0558032172603374 0.0191572686830763 -0.774 -0.0237000300545252 -0.0540306262726484 -0.9995 0.0558032172603374 0.0191572686830763 -0.200000000000001 0.0558032172603374 -0.0191572686830763 -0.528 -0.0399596127259187 -0.0434077107297148 -0.979 0.0144836437413072 0.0571946156904205 0.640499999999998 0.0465592900543872 -0.0362385500486904 -0.5075 -0.0518889513211829 -0.0280808961891873 -0.9585 -0.0581953169007606 -0.00971108082656329 -0.938 0.0558032172603374 0.0191572686830763 0.271499999999999 0.0322699413292232 -0.0493928222174892 -0.487 0.0322699413292232 0.0493928222174892 0.660999999999998 0.0144836437413071 -0.0571946156904205 -0.4665 -0.0581953169007606 0.00971108082656331 -0.9175 -0.00487218138286763 -0.0587984850873935 -0.446 -0.0518889513211828 0.0280808961891873 -0.897 -0.0399596127259187 0.0434077107297148 -0.8765 0.0465592900543872 0.0362385500486904 0.681499999999998 -0.0237000300545252 -0.0540306262726484 -0.4255 -0.0237000300545252 0.0540306262726484 -0.856 -0.0399596127259187 -0.0434077107297148 -0.405 0.0558032172603374 -0.0191572686830763 -0.0565000000000008 -0.0048721813828676 0.0587984850873935 -0.8355 0.0465592900543872 -0.0362385500486904 -0.0360000000000008 0.0558032172603374 0.0191572686830763 0.701999999999998 -0.0518889513211829 -0.0280808961891873 -0.3845 0.0558032172603374 -0.0191572686830763 0.373999999999999 0.0322699413292232 -0.0493928222174892 -0.0155000000000007 0.0465592900543872 -0.0362385500486904 0.394499999999999 0.0144836437413072 0.0571946156904205 -0.815 -0.0581953169007606 -0.00971108082656329 -0.364 0.0144836437413071 -0.0571946156904205 0.00499999999999923 0.0322699413292232 -0.0493928222174892 0.414999999999998 -0.0581953169007606 0.00971108082656331 -0.3435 0.0322699413292232 0.0493928222174892 -0.7945 -0.00487218138286763 -0.0587984850873935 0.0254999999999992 0.0144836437413071 -0.0571946156904205 0.435499999999998 -0.0518889513211828 0.0280808961891873 -0.323 0.0465592900543872 0.0362385500486904 -0.774 -0.0237000300545252 -0.0540306262726484 0.0459999999999992 -0.00487218138286763 -0.0587984850873935 0.455999999999998 0.0558032172603374 0.0191572686830763 -0.7535 -0.0399596127259187 -0.0434077107297148 0.0664999999999991 -0.0399596127259187 0.0434077107297148 -0.3025 -0.0237000300545252 -0.0540306262726484 0.476499999999998 -0.0399596127259187 -0.0434077107297148 0.496999999999998 -0.0518889513211829 -0.0280808961891873 0.0869999999999991 -0.0237000300545252 0.0540306262726484 -0.282 -0.00487218138286763 -0.0587984850873935 -0.9995 -0.0581953169007606 -0.00971108082656329 0.107499999999999 -0.0518889513211829 -0.0280808961891873 0.517499999999998 -0.0048721813828676 0.0587984850873935 -0.2615 -0.0581953169007606 -0.00971108082656329 0.537999999999998 -0.0237000300545252 -0.0540306262726484 -0.979 -0.0581953169007606 0.00971108082656331 0.127999999999999 0.0144836437413072 0.0571946156904205 -0.241 -0.0399596127259187 -0.0434077107297148 -0.9585 -0.0518889513211828 0.0280808961891873 0.148499999999999 -0.0581953169007606 0.00971108082656331 0.558499999999998 -0.0518889513211829 -0.0280808961891873 -0.938 0.0322699413292232 0.0493928222174892 -0.2205 -0.0399596127259187 0.0434077107297148 0.168999999999999 -0.0581953169007606 -0.00971108082656329 -0.9175 -0.0518889513211828 0.0280808961891873 0.578999999999998 0.0465592900543872 0.0362385500486904 -0.200000000000001 -0.0237000300545252 0.0540306262726484 0.189499999999999 -0.0581953169007606 0.00971108082656331 -0.897 -0.0048721813828676 0.0587984850873935 0.209999999999999 -0.0518889513211828 0.0280808961891873 -0.8765 -0.0399596127259187 0.0434077107297148 0.599499999999998 0.0558032172603374 0.0191572686830763 -0.179500000000001 0.0558032172603374 -0.0191572686830763 -0.5075 0.0144836437413072 0.0571946156904205 0.230499999999999 -0.0399596127259187 0.0434077107297148 -0.856 -0.0237000300545252 0.0540306262726484 -0.8355 -0.0237000300545252 0.0540306262726484 0.619999999999998 0.0465592900543872 -0.0362385500486904 -0.487 0.0322699413292232 0.0493928222174892 0.250999999999999 0.0322699413292232 -0.0493928222174892 -0.4665 -0.0048721813828676 0.0587984850873935 -0.815 0.0465592900543872 0.0362385500486904 0.271499999999999 0.0144836437413071 -0.0571946156904205 -0.446 0.0144836437413072 0.0571946156904205 -0.7945 -0.0048721813828676 0.0587984850873935 0.640499999999998 -0.00487218138286763 -0.0587984850873935 -0.4255 0.0144836437413072 0.0571946156904205 0.660999999999998 0.0322699413292232 0.0493928222174892 -0.774 0.0465592900543872 0.0362385500486904 -0.7535 -0.0237000300545252 -0.0540306262726484 -0.405 -0.0399596127259187 -0.0434077107297148 -0.3845 -0.0518889513211829 -0.0280808961891873 -0.364 0.0322699413292232 0.0493928222174892 0.681499999999998 0.0465592900543872 0.0362385500486904 0.701999999999998 0.0558032172603374 0.0191572686830763 -0.733 0.0144836437413071 -0.0571946156904205 -0.9995 -0.0581953169007606 -0.00971108082656329 -0.3435 -0.0581953169007606 0.00971108082656331 -0.323 -0.00487218138286763 -0.0587984850873935 -0.979 0.0558032172603374 0.0191572686830763 0.722499999999998 0.0558032172603374 0.0191572686830763 0.291999999999999 -0.0518889513211829 -0.0280808961891873 -0.9175 -0.0518889513211828 0.0280808961891873 -0.3025 0.0558032172603374 -0.0191572686830763 -0.0360000000000008 -0.0581953169007606 -0.00971108082656329 -0.897 0.0558032172603374 -0.0191572686830763 0.394499999999999 -0.0399596127259187 0.0434077107297148 -0.282 0.0465592900543872 -0.0362385500486904 -0.0155000000000007 -0.0581953169007606 0.00971108082656331 -0.8765 0.0465592900543872 -0.0362385500486904 0.414999999999998 -0.0237000300545252 0.0540306262726484 -0.2615 0.0322699413292232 -0.0493928222174892 0.00499999999999923 -0.0518889513211828 0.0280808961891873 -0.856 0.0322699413292232 -0.0493928222174892 0.435499999999998 0.0144836437413071 -0.0571946156904205 0.0254999999999992 -0.0048721813828676 0.0587984850873935 -0.241 0.0144836437413071 -0.0571946156904205 0.455999999999998 -0.0399596127259187 0.0434077107297148 -0.8355 -0.00487218138286763 -0.0587984850873935 0.476499999999998 -0.00487218138286763 -0.0587984850873935 0.0459999999999992 0.0144836437413072 0.0571946156904205 -0.2205 -0.0237000300545252 0.0540306262726484 -0.815 -0.0237000300545252 -0.0540306262726484 0.496999999999998 -0.0237000300545252 -0.0540306262726484 0.0664999999999991 0.0322699413292232 0.0493928222174892 -0.200000000000001 -0.0048721813828676 0.0587984850873935 -0.7945 -0.0399596127259187 -0.0434077107297148 0.517499999999998 -0.0399596127259187 -0.0434077107297148 0.0869999999999991 0.0465592900543872 0.0362385500486904 -0.179500000000001 0.0144836437413072 0.0571946156904205 -0.774 -0.0518889513211829 -0.0280808961891873 0.107499999999999 -0.0518889513211829 -0.0280808961891873 0.537999999999998 -0.0581953169007606 -0.00971108082656329 0.127999999999999 0.0322699413292232 0.0493928222174892 -0.7535 0.0558032172603374 0.0191572686830763 -0.159000000000001 -0.0581953169007606 0.00971108082656331 0.148499999999999 -0.0581953169007606 -0.00971108082656329 0.558499999999998 0.0558032172603374 -0.0191572686830763 -0.487 0.0465592900543872 0.0362385500486904 -0.733 -0.0581953169007606 0.00971108082656331 0.578999999999998 -0.0518889513211828 0.0280808961891873 0.168999999999999 0.0465592900543872 -0.0362385500486904 -0.4665 -0.0518889513211828 0.0280808961891873 0.599499999999998 -0.0399596127259187 0.0434077107297148 0.189499999999999 0.0322699413292232 -0.0493928222174892 -0.446 -0.0237000300545252 0.0540306262726484 0.209999999999999 0.0558032172603374 0.0191572686830763 -0.7125 0.0322699413292232 -0.0493928222174892 -0.9995 0.0144836437413071 -0.0571946156904205 -0.4255 -0.0048721813828676 0.0587984850873935 0.230499999999999 -0.0399596127259187 0.0434077107297148 0.619999999999998 0.0144836437413071 -0.0571946156904205 -0.979 -0.00487218138286763 -0.0587984850873935 -0.405 0.0144836437413072 0.0571946156904205 0.250999999999999 -0.0518889513211829 -0.0280808961891873 -0.897 -0.0237000300545252 -0.0540306262726484 -0.3845 -0.0237000300545252 0.0540306262726484 0.640499999999998 -0.0581953169007606 -0.00971108082656329 -0.8765 -0.0399596127259187 -0.0434077107297148 -0.364 -0.0581953169007606 0.00971108082656331 -0.856 -0.0518889513211829 -0.0280808961891873 -0.3435 -0.0048721813828676 0.0587984850873935 0.660999999999998 0.0322699413292232 0.0493928222174892 0.271499999999999 0.0465592900543872 0.0362385500486904 0.291999999999999 -0.0518889513211828 0.0280808961891873 -0.8355 -0.0581953169007606 -0.00971108082656329 -0.323 0.0144836437413072 0.0571946156904205 0.681499999999998 -0.0399596127259187 0.0434077107297148 -0.815 -0.0581953169007606 0.00971108082656331 -0.3025 -0.0237000300545252 0.0540306262726484 -0.7945 -0.0518889513211828 0.0280808961891873 -0.282 -0.0048721813828676 0.0587984850873935 -0.774 0.0322699413292232 0.0493928222174892 0.701999999999998 -0.0399596127259187 0.0434077107297148 -0.2615 0.0558032172603374 0.0191572686830763 0.312499999999999 0.0465592900543872 0.0362385500486904 0.722499999999998 -0.0237000300545252 0.0540306262726484 -0.241 0.0144836437413072 0.0571946156904205 -0.7535 -0.0048721813828676 0.0587984850873935 -0.2205 0.0558032172603374 0.0191572686830763 0.742999999999998 0.0322699413292232 0.0493928222174892 -0.733 0.0144836437413072 0.0571946156904205 -0.200000000000001 0.0465592900543872 0.0362385500486904 -0.7125 0.0322699413292232 0.0493928222174892 -0.179500000000001 0.0558032172603374 -0.0191572686830763 -0.0155000000000007 0.0558032172603374 -0.0191572686830763 0.414999999999998 0.0465592900543872 -0.0362385500486904 0.435499999999998 0.0465592900543872 0.0362385500486904 -0.159000000000001 0.0465592900543872 -0.0362385500486904 0.00499999999999923 0.0322699413292232 -0.0493928222174892 0.455999999999998 0.0558032172603374 0.0191572686830763 -0.692 0.0322699413292232 -0.0493928222174892 0.0254999999999992 0.0465592900543872 -0.0362385500486904 -0.9995 0.0144836437413071 -0.0571946156904205 0.476499999999998 0.0558032172603374 0.0191572686830763 -0.138500000000001 0.0322699413292232 -0.0493928222174892 -0.979 0.0144836437413071 -0.0571946156904205 0.0459999999999992 -0.00487218138286763 -0.0587984850873935 0.496999999999998 0.0558032172603374 -0.0191572686830763 -0.4665 -0.00487218138286763 -0.0587984850873935 0.0664999999999991 -0.0518889513211829 -0.0280808961891873 -0.8765 -0.0237000300545252 -0.0540306262726484 0.517499999999998 -0.0237000300545252 -0.0540306262726484 0.0869999999999991 0.0465592900543872 -0.0362385500486904 -0.446 -0.0581953169007606 -0.00971108082656329 -0.856 -0.0399596127259187 -0.0434077107297148 0.537999999999998 0.0322699413292232 -0.0493928222174892 -0.4255 -0.0399596127259187 -0.0434077107297148 0.107499999999999 -0.0518889513211829 -0.0280808961891873 0.558499999999998 -0.0518889513211829 -0.0280808961891873 0.127999999999999 0.0144836437413071 -0.0571946156904205 -0.405 -0.0581953169007606 0.00971108082656331 -0.8355 -0.0581953169007606 -0.00971108082656329 0.578999999999998 -0.0581953169007606 -0.00971108082656329 0.148499999999999 -0.0518889513211828 0.0280808961891873 -0.815 -0.0581953169007606 0.00971108082656331 0.168999999999999 -0.00487218138286763 -0.0587984850873935 -0.3845 -0.0399596127259187 0.0434077107297148 -0.7945 -0.0237000300545252 -0.0540306262726484 -0.364 -0.0518889513211828 0.0280808961891873 0.189499999999999 -0.0237000300545252 0.0540306262726484 -0.774 -0.0581953169007606 0.00971108082656331 0.599499999999998 -0.0399596127259187 -0.0434077107297148 -0.3435 -0.0399596127259187 0.0434077107297148 0.209999999999999 -0.0048721813828676 0.0587984850873935 -0.7535 -0.0518889513211829 -0.0280808961891873 -0.323 -0.0237000300545252 0.0540306262726484 0.230499999999999 0.0144836437413072 0.0571946156904205 -0.733 -0.0518889513211828 0.0280808961891873 0.619999999999998 -0.0399596127259187 0.0434077107297148 0.640499999999998 -0.0581953169007606 -0.00971108082656329 -0.3025 -0.0048721813828676 0.0587984850873935 0.250999999999999 0.0322699413292232 0.0493928222174892 -0.7125 0.0144836437413072 0.0571946156904205 0.271499999999999 0.0465592900543872 0.0362385500486904 -0.692 -0.0237000300545252 0.0540306262726484 0.660999999999998 -0.0581953169007606 0.00971108082656331 -0.282 -0.0518889513211828 0.0280808961891873 -0.2615 -0.0048721813828676 0.0587984850873935 0.681499999999998 -0.0399596127259187 0.0434077107297148 -0.241 0.0558032172603374 0.0191572686830763 -0.6715 0.0322699413292232 0.0493928222174892 0.291999999999999 0.0558032172603374 -0.0191572686830763 -0.9995 -0.0237000300545252 0.0540306262726484 -0.2205 0.0465592900543872 -0.0362385500486904 -0.979 -0.0048721813828676 0.0587984850873935 -0.200000000000001 0.0144836437413072 0.0571946156904205 0.701999999999998 -0.0399596127259187 -0.0434077107297148 -0.8765 0.0465592900543872 0.0362385500486904 0.312499999999999 -0.0518889513211829 -0.0280808961891873 -0.856 0.0144836437413072 0.0571946156904205 -0.179500000000001 0.0322699413292232 0.0493928222174892 0.722499999999998 0.0465592900543872 0.0362385500486904 0.742999999999998 0.0322699413292232 0.0493928222174892 -0.159000000000001 -0.0581953169007606 -0.00971108082656329 -0.8355 0.0465592900543872 0.0362385500486904 -0.138500000000001 -0.0581953169007606 0.00971108082656331 -0.815 -0.0518889513211828 0.0280808961891873 -0.7945 0.0558032172603374 0.0191572686830763 -0.118000000000001 0.0558032172603374 0.0191572686830763 0.763499999999998 0.0558032172603374 -0.0191572686830763 -0.446 0.0558032172603374 -0.0191572686830763 0.435499999999998 -0.0399596127259187 0.0434077107297148 -0.774 0.0558032172603374 0.0191572686830763 0.332999999999999 0.0465592900543872 -0.0362385500486904 0.455999999999998 0.0465592900543872 -0.0362385500486904 -0.4255 0.0558032172603374 -0.0191572686830763 0.00499999999999923 -0.0237000300545252 0.0540306262726484 -0.7535 0.0322699413292232 -0.0493928222174892 0.476499999999998 0.0322699413292232 -0.0493928222174892 -0.405 0.0465592900543872 -0.0362385500486904 0.0254999999999992 0.0144836437413071 -0.0571946156904205 0.496999999999998 -0.0048721813828676 0.0587984850873935 -0.733 0.0144836437413071 -0.0571946156904205 -0.3845 0.0322699413292232 -0.0493928222174892 0.0459999999999992 -0.00487218138286763 -0.0587984850873935 0.517499999999998 0.0144836437413072 0.0571946156904205 -0.7125 -0.00487218138286763 -0.0587984850873935 -0.364 -0.0237000300545252 -0.0540306262726484 0.537999999999998 0.0322699413292232 0.0493928222174892 -0.692 0.0144836437413071 -0.0571946156904205 0.0664999999999991 -0.0399596127259187 -0.0434077107297148 0.558499999999998 -0.0237000300545252 -0.0540306262726484 -0.3435 -0.00487218138286763 -0.0587984850873935 0.0869999999999991 -0.0518889513211829 -0.0280808961891873 0.578999999999998 0.0465592900543872 0.0362385500486904 -0.6715 -0.0399596127259187 -0.0434077107297148 -0.323 -0.0237000300545252 -0.0540306262726484 0.107499999999999 0.0558032172603374 0.0191572686830763 -0.651 -0.0581953169007606 -0.00971108082656329 0.599499999999998 -0.0399596127259187 -0.0434077107297148 0.127999999999999 -0.0518889513211829 -0.0280808961891873 -0.3025 -0.0518889513211829 -0.0280808961891873 0.148499999999999 -0.0581953169007606 0.00971108082656331 0.619999999999998 0.0558032172603374 -0.0191572686830763 -0.979 -0.0581953169007606 -0.00971108082656329 -0.282 -0.0581953169007606 -0.00971108082656329 0.168999999999999 -0.0581953169007606 0.00971108082656331 0.189499999999999 0.0465592900543872 -0.0362385500486904 -0.9585 -0.0581953169007606 0.00971108082656331 -0.2615 -0.0399596127259187 -0.0434077107297148 -0.856 -0.0518889513211828 0.0280808961891873 0.640499999999998 -0.0518889513211828 0.0280808961891873 0.209999999999999 -0.0518889513211828 0.0280808961891873 -0.241 -0.0399596127259187 0.0434077107297148 0.230499999999999 -0.0518889513211829 -0.0280808961891873 -0.8355 -0.0399596127259187 0.0434077107297148 0.660999999999998 -0.0399596127259187 0.0434077107297148 -0.2205 -0.0237000300545252 0.0540306262726484 0.250999999999999 -0.0581953169007606 -0.00971108082656329 -0.815 -0.0237000300545252 0.0540306262726484 -0.200000000000001 -0.0048721813828676 0.0587984850873935 0.271499999999999 -0.0581953169007606 0.00971108082656331 -0.7945 -0.0237000300545252 0.0540306262726484 0.681499999999998 -0.0048721813828676 0.0587984850873935 -0.179500000000001 0.0144836437413072 0.0571946156904205 0.291999999999999 -0.0048721813828676 0.0587984850873935 0.701999999999998 -0.0518889513211828 0.0280808961891873 -0.774 0.0144836437413072 0.0571946156904205 -0.159000000000001 -0.0399596127259187 0.0434077107297148 -0.7535 0.0322699413292232 0.0493928222174892 0.312499999999999 0.0322699413292232 0.0493928222174892 -0.138500000000001 0.0144836437413072 0.0571946156904205 0.722499999999998 -0.0237000300545252 0.0540306262726484 -0.733 0.0465592900543872 0.0362385500486904 -0.118000000000001 -0.0048721813828676 0.0587984850873935 -0.7125 0.0322699413292232 0.0493928222174892 0.742999999999998 0.0465592900543872 0.0362385500486904 0.332999999999999 0.0144836437413072 0.0571946156904205 -0.692 0.0558032172603374 0.0191572686830763 -0.0975000000000007 0.0558032172603374 -0.0191572686830763 -0.4255 0.0465592900543872 0.0362385500486904 0.763499999999998 0.0322699413292232 0.0493928222174892 -0.6715 0.0465592900543872 -0.0362385500486904 -0.405 0.0465592900543872 0.0362385500486904 -0.651 0.0322699413292232 -0.0493928222174892 -0.3845 0.0144836437413071 -0.0571946156904205 -0.364 0.0558032172603374 0.0191572686830763 -0.6305 0.0558032172603374 0.0191572686830763 0.783999999999998 0.0558032172603374 -0.0191572686830763 0.455999999999998 0.0558032172603374 -0.0191572686830763 -0.9585 -0.00487218138286763 -0.0587984850873935 -0.3435 0.0465592900543872 -0.0362385500486904 0.476499999999998 -0.0237000300545252 -0.0540306262726484 -0.856 0.0322699413292232 -0.0493928222174892 0.496999999999998 -0.0237000300545252 -0.0540306262726484 -0.323 0.0558032172603374 0.0191572686830763 0.353499999999999 0.0558032172603374 -0.0191572686830763 0.0254999999999992 0.0144836437413071 -0.0571946156904205 0.517499999999998 -0.0399596127259187 -0.0434077107297148 -0.3025 0.0465592900543872 -0.0362385500486904 0.0459999999999992 -0.00487218138286763 -0.0587984850873935 0.537999999999998 -0.0399596127259187 -0.0434077107297148 -0.8355 -0.0518889513211829 -0.0280808961891873 -0.815 -0.0237000300545252 -0.0540306262726484 0.558499999999998 -0.0518889513211829 -0.0280808961891873 -0.282 0.0322699413292232 -0.0493928222174892 0.0664999999999991 -0.0581953169007606 -0.00971108082656329 -0.7945 -0.0581953169007606 -0.00971108082656329 -0.2615 -0.0399596127259187 -0.0434077107297148 0.578999999999998 0.0144836437413071 -0.0571946156904205 0.0869999999999991 -0.0518889513211829 -0.0280808961891873 0.599499999999998 -0.00487218138286763 -0.0587984850873935 0.107499999999999 -0.0581953169007606 0.00971108082656331 -0.241 -0.0581953169007606 0.00971108082656331 -0.774 -0.0237000300545252 -0.0540306262726484 0.127999999999999 -0.0518889513211828 0.0280808961891873 -0.2205 -0.0518889513211828 0.0280808961891873 -0.7535 -0.0399596127259187 -0.0434077107297148 0.148499999999999 -0.0581953169007606 -0.00971108082656329 0.619999999999998 -0.0399596127259187 0.0434077107297148 -0.733 -0.0399596127259187 0.0434077107297148 -0.200000000000001 -0.0581953169007606 0.00971108082656331 0.640499999999998 -0.0518889513211829 -0.0280808961891873 0.168999999999999 -0.0237000300545252 0.0540306262726484 -0.179500000000001 -0.0581953169007606 -0.00971108082656329 0.189499999999999 -0.0237000300545252 0.0540306262726484 -0.7125 -0.0581953169007606 0.00971108082656331 0.209999999999999 -0.0048721813828676 0.0587984850873935 -0.692 -0.0048721813828676 0.0587984850873935 -0.159000000000001 0.0144836437413072 0.0571946156904205 -0.138500000000001 -0.0518889513211828 0.0280808961891873 0.660999999999998 -0.0518889513211828 0.0280808961891873 0.230499999999999 0.0144836437413072 0.0571946156904205 -0.6715 -0.0399596127259187 0.0434077107297148 0.681499999999998 0.0322699413292232 0.0493928222174892 -0.118000000000001 -0.0399596127259187 0.0434077107297148 0.250999999999999 0.0322699413292232 0.0493928222174892 -0.651 -0.0237000300545252 0.0540306262726484 0.271499999999999 0.0465592900543872 0.0362385500486904 -0.0975000000000007 -0.0237000300545252 0.0540306262726484 0.701999999999998 0.0465592900543872 0.0362385500486904 -0.6305 -0.0048721813828676 0.0587984850873935 0.291999999999999 0.0558032172603374 0.0191572686830763 -0.0770000000000007 0.0144836437413072 0.0571946156904205 0.312499999999999 0.0558032172603374 -0.0191572686830763 -0.405 0.0558032172603374 0.0191572686830763 -0.61 -0.0048721813828676 0.0587984850873935 0.722499999999998 0.0558032172603374 -0.0191572686830763 -0.938 0.0322699413292232 0.0493928222174892 0.332999999999999 0.0465592900543872 -0.0362385500486904 -0.3845 0.0144836437413072 0.0571946156904205 0.742999999999998 -0.00487218138286763 -0.0587984850873935 -0.856 0.0322699413292232 -0.0493928222174892 -0.364 0.0322699413292232 0.0493928222174892 0.763499999999998 0.0144836437413071 -0.0571946156904205 -0.3435 -0.0237000300545252 -0.0540306262726484 -0.8355 0.0465592900543872 0.0362385500486904 0.783999999999998 -0.00487218138286763 -0.0587984850873935 -0.323 -0.0399596127259187 -0.0434077107297148 -0.815 0.0558032172603374 0.0191572686830763 0.804499999999998 -0.0237000300545252 -0.0540306262726484 -0.3025 -0.0518889513211829 -0.0280808961891873 -0.7945 -0.0399596127259187 -0.0434077107297148 -0.282 0.0558032172603374 -0.0191572686830763 0.476499999999998 0.0465592900543872 0.0362385500486904 0.353499999999999 -0.0581953169007606 -0.00971108082656329 -0.774 -0.0518889513211829 -0.0280808961891873 -0.2615 0.0465592900543872 -0.0362385500486904 0.496999999999998 -0.0581953169007606 0.00971108082656331 -0.7535 -0.0581953169007606 -0.00971108082656329 -0.241 0.0322699413292232 -0.0493928222174892 0.517499999999998 0.0144836437413071 -0.0571946156904205 0.537999999999998 -0.0518889513211828 0.0280808961891873 -0.733 -0.00487218138286763 -0.0587984850873935 0.558499999999998 -0.0581953169007606 0.00971108082656331 -0.2205 -0.0399596127259187 0.0434077107297148 -0.7125 0.0558032172603374 0.0191572686830763 0.373999999999999 -0.0237000300545252 -0.0540306262726484 0.578999999999998 0.0558032172603374 -0.0191572686830763 0.0459999999999992 -0.0518889513211828 0.0280808961891873 -0.200000000000001 -0.0237000300545252 0.0540306262726484 -0.692 -0.0399596127259187 -0.0434077107297148 0.599499999999998 0.0465592900543872 -0.0362385500486904 0.0664999999999991 -0.0399596127259187 0.0434077107297148 -0.179500000000001 0.0322699413292232 -0.0493928222174892 0.0869999999999991 -0.0518889513211829 -0.0280808961891873 0.619999999999998 -0.0048721813828676 0.0587984850873935 -0.6715 -0.0237000300545252 0.0540306262726484 -0.159000000000001 0.0144836437413072 0.0571946156904205 -0.651 -0.0048721813828676 0.0587984850873935 -0.138500000000001 -0.0581953169007606 -0.00971108082656329 0.640499999999998 0.0144836437413071 -0.0571946156904205 0.107499999999999 0.0322699413292232 0.0493928222174892 -0.6305 -0.00487218138286763 -0.0587984850873935 0.127999999999999 0.0144836437413072 0.0571946156904205 -0.118000000000001 -0.0237000300545252 -0.0540306262726484 0.148499999999999 0.0465592900543872 0.0362385500486904 -0.61 -0.0581953169007606 0.00971108082656331 0.660999999999998 0.0322699413292232 0.0493928222174892 -0.0975000000000007 -0.0399596127259187 -0.0434077107297148 0.168999999999999 -0.0518889513211829 -0.0280808961891873 0.189499999999999 -0.0518889513211828 0.0280808961891873 0.681499999999998 0.0558032172603374 0.0191572686830763 -0.5895 0.0558032172603374 -0.0191572686830763 -0.9175 0.0465592900543872 0.0362385500486904 -0.0770000000000007 -0.0581953169007606 -0.00971108082656329 0.209999999999999 0.0558032172603374 0.0191572686830763 -0.0565000000000008 -0.0399596127259187 0.0434077107297148 0.701999999999998 -0.0581953169007606 0.00971108082656331 0.230499999999999 0.0558032172603374 -0.0191572686830763 -0.3845 0.0465592900543872 -0.0362385500486904 -0.897 -0.0518889513211828 0.0280808961891873 0.250999999999999 0.0322699413292232 -0.0493928222174892 -0.8765 -0.0399596127259187 0.0434077107297148 0.271499999999999 -0.0237000300545252 0.0540306262726484 0.722499999999998 0.0465592900543872 -0.0362385500486904 -0.364 0.0144836437413071 -0.0571946156904205 -0.856 -0.0237000300545252 0.0540306262726484 0.291999999999999 0.0322699413292232 -0.0493928222174892 -0.3435 -0.0048721813828676 0.0587984850873935 0.742999999999998 0.0144836437413071 -0.0571946156904205 -0.323 -0.00487218138286763 -0.0587984850873935 -0.8355 -0.0048721813828676 0.0587984850873935 0.312499999999999 -0.0237000300545252 -0.0540306262726484 -0.815 -0.00487218138286763 -0.0587984850873935 -0.3025 0.0144836437413072 0.0571946156904205 0.332999999999999 0.0144836437413072 0.0571946156904205 0.763499999999998 -0.0399596127259187 -0.0434077107297148 -0.7945 0.0322699413292232 0.0493928222174892 0.783999999999998 -0.0237000300545252 -0.0540306262726484 -0.282 0.0322699413292232 0.0493928222174892 0.353499999999999 -0.0399596127259187 -0.0434077107297148 -0.2615 -0.0518889513211829 -0.0280808961891873 -0.774 -0.0581953169007606 -0.00971108082656329 -0.7535 -0.0518889513211829 -0.0280808961891873 -0.241 0.0465592900543872 0.0362385500486904 0.804499999999998 -0.0581953169007606 0.00971108082656331 -0.733 0.0465592900543872 0.0362385500486904 0.373999999999999 -0.0581953169007606 -0.00971108082656329 -0.2205 -0.0518889513211828 0.0280808961891873 -0.7125 -0.0581953169007606 0.00971108082656331 -0.200000000000001 0.0558032172603374 0.0191572686830763 0.824999999999998 0.0558032172603374 -0.0191572686830763 0.496999999999998 -0.0399596127259187 0.0434077107297148 -0.692 0.0465592900543872 -0.0362385500486904 0.517499999999998 -0.0518889513211828 0.0280808961891873 -0.179500000000001 -0.0237000300545252 0.0540306262726484 -0.6715 -0.0399596127259187 0.0434077107297148 -0.159000000000001 0.0322699413292232 -0.0493928222174892 0.537999999999998 -0.0048721813828676 0.0587984850873935 -0.651 -0.0237000300545252 0.0540306262726484 -0.138500000000001 0.0144836437413071 -0.0571946156904205 0.558499999999998 0.0144836437413072 0.0571946156904205 -0.6305 -0.00487218138286763 -0.0587984850873935 0.578999999999998 -0.0048721813828676 0.0587984850873935 -0.118000000000001 -0.0237000300545252 -0.0540306262726484 0.599499999999998 0.0322699413292232 0.0493928222174892 -0.61 0.0144836437413072 0.0571946156904205 -0.0975000000000007 0.0558032172603374 0.0191572686830763 0.394499999999999 0.0558032172603374 -0.0191572686830763 0.0664999999999991 -0.0399596127259187 -0.0434077107297148 0.619999999999998 0.0465592900543872 0.0362385500486904 -0.5895 -0.0518889513211829 -0.0280808961891873 0.640499999999998 0.0465592900543872 -0.0362385500486904 0.0869999999999991 0.0322699413292232 0.0493928222174892 -0.0770000000000007 0.0465592900543872 0.0362385500486904 -0.0565000000000008 0.0322699413292232 -0.0493928222174892 0.107499999999999 0.0558032172603374 0.0191572686830763 -0.569 0.0144836437413071 -0.0571946156904205 0.127999999999999 0.0558032172603374 0.0191572686830763 -0.0360000000000008 0.0558032172603374 -0.0191572686830763 -0.897 -0.0581953169007606 -0.00971108082656329 0.660999999999998 -0.00487218138286763 -0.0587984850873935 0.148499999999999 -0.0581953169007606 0.00971108082656331 0.681499999999998 0.0558032172603374 -0.0191572686830763 -0.364 0.0465592900543872 -0.0362385500486904 -0.8765 -0.0237000300545252 -0.0540306262726484 0.168999999999999 -0.0518889513211828 0.0280808961891873 0.701999999999998 -0.0399596127259187 -0.0434077107297148 0.189499999999999 0.0465592900543872 -0.0362385500486904 -0.3435 0.0322699413292232 -0.0493928222174892 -0.856 -0.0518889513211829 -0.0280808961891873 0.209999999999999 0.0322699413292232 -0.0493928222174892 -0.323 0.0144836437413071 -0.0571946156904205 -0.8355 -0.0581953169007606 -0.00971108082656329 0.230499999999999 0.0144836437413071 -0.0571946156904205 -0.3025 -0.0581953169007606 0.00971108082656331 0.250999999999999 -0.00487218138286763 -0.0587984850873935 -0.815 -0.0399596127259187 0.0434077107297148 0.722499999999998 -0.0237000300545252 0.0540306262726484 0.742999999999998 -0.00487218138286763 -0.0587984850873935 -0.282 -0.0237000300545252 -0.0540306262726484 -0.7945 -0.0518889513211828 0.0280808961891873 0.271499999999999 -0.0237000300545252 -0.0540306262726484 -0.2615 -0.0048721813828676 0.0587984850873935 0.763499999999998 -0.0399596127259187 0.0434077107297148 0.291999999999999 -0.0399596127259187 -0.0434077107297148 -0.774 -0.0399596127259187 -0.0434077107297148 -0.241 -0.0518889513211829 -0.0280808961891873 -0.7535 -0.0237000300545252 0.0540306262726484 0.312499999999999 -0.0518889513211829 -0.0280808961891873 -0.2205 -0.0048721813828676 0.0587984850873935 0.332999999999999 0.0144836437413072 0.0571946156904205 0.783999999999998 -0.0581953169007606 -0.00971108082656329 -0.733 -0.0581953169007606 -0.00971108082656329 -0.200000000000001 0.0322699413292232 0.0493928222174892 0.804499999999998 -0.0581953169007606 0.00971108082656331 -0.7125 -0.0581953169007606 0.00971108082656331 -0.179500000000001 -0.0518889513211828 0.0280808961891873 -0.692 0.0465592900543872 0.0362385500486904 0.824999999999998 -0.0518889513211828 0.0280808961891873 -0.159000000000001 -0.0399596127259187 0.0434077107297148 -0.6715 0.0144836437413072 0.0571946156904205 0.353499999999999 0.0322699413292232 0.0493928222174892 0.373999999999999 0.0558032172603374 0.0191572686830763 0.845499999999998 -0.0399596127259187 0.0434077107297148 -0.138500000000001 -0.0237000300545252 0.0540306262726484 -0.651 -0.0237000300545252 0.0540306262726484 -0.118000000000001 0.0558032172603374 -0.0191572686830763 0.517499999999998 -0.0048721813828676 0.0587984850873935 -0.6305 -0.0048721813828676 0.0587984850873935 -0.0975000000000007 0.0465592900543872 -0.0362385500486904 0.537999999999998 0.0144836437413072 0.0571946156904205 -0.61 0.0465592900543872 0.0362385500486904 0.394499999999999 0.0322699413292232 -0.0493928222174892 0.558499999999998 0.0144836437413072 0.0571946156904205 -0.0770000000000007 0.0322699413292232 0.0493928222174892 -0.5895 0.0144836437413071 -0.0571946156904205 0.578999999999998 -0.00487218138286763 -0.0587984850873935 0.599499999999998 0.0465592900543872 0.0362385500486904 -0.569 0.0322699413292232 0.0493928222174892 -0.0565000000000008 -0.0237000300545252 -0.0540306262726484 0.619999999999998 0.0465592900543872 0.0362385500486904 -0.0360000000000008 -0.0399596127259187 -0.0434077107297148 0.640499999999998 0.0558032172603374 0.0191572686830763 -0.5485 0.0558032172603374 0.0191572686830763 -0.0155000000000007 -0.0518889513211829 -0.0280808961891873 0.660999999999998 0.0558032172603374 -0.0191572686830763 -0.8765 0.0558032172603374 -0.0191572686830763 -0.3435 0.0558032172603374 0.0191572686830763 0.414999999999998 0.0465592900543872 -0.0362385500486904 -0.856 -0.0581953169007606 -0.00971108082656329 0.681499999999998 0.0558032172603374 -0.0191572686830763 0.0869999999999991 0.0465592900543872 -0.0362385500486904 -0.323 0.0465592900543872 -0.0362385500486904 0.107499999999999 0.0322699413292232 -0.0493928222174892 -0.8355 0.0322699413292232 -0.0493928222174892 -0.3025 0.0322699413292232 -0.0493928222174892 0.127999999999999 -0.0581953169007606 0.00971108082656331 0.701999999999998 0.0144836437413071 -0.0571946156904205 -0.815 0.0144836437413071 -0.0571946156904205 -0.282 -0.0518889513211828 0.0280808961891873 0.722499999999998 0.0144836437413071 -0.0571946156904205 0.148499999999999 -0.00487218138286763 -0.0587984850873935 0.168999999999999 -0.00487218138286763 -0.0587984850873935 -0.7945 -0.00487218138286763 -0.0587984850873935 -0.2615 -0.0237000300545252 -0.0540306262726484 -0.774 -0.0399596127259187 0.0434077107297148 0.742999999999998 -0.0237000300545252 -0.0540306262726484 -0.241 -0.0237000300545252 -0.0540306262726484 0.189499999999999 -0.0399596127259187 -0.0434077107297148 -0.7535 -0.0399596127259187 -0.0434077107297148 0.209999999999999 -0.0399596127259187 -0.0434077107297148 -0.2205 -0.0237000300545252 0.0540306262726484 0.763499999999998 -0.0518889513211829 -0.0280808961891873 0.230499999999999 -0.0518889513211829 -0.0280808961891873 -0.733 -0.0518889513211829 -0.0280808961891873 -0.200000000000001 -0.0581953169007606 -0.00971108082656329 0.250999999999999 -0.0581953169007606 -0.00971108082656329 -0.7125 -0.0581953169007606 0.00971108082656331 0.271499999999999 -0.0581953169007606 -0.00971108082656329 -0.179500000000001 -0.0581953169007606 0.00971108082656331 -0.159000000000001 -0.0518889513211828 0.0280808961891873 0.291999999999999 -0.0581953169007606 0.00971108082656331 -0.692 -0.0048721813828676 0.0587984850873935 0.783999999999998 -0.0518889513211828 0.0280808961891873 -0.6715 0.0144836437413072 0.0571946156904205 0.804499999999998 -0.0518889513211828 0.0280808961891873 -0.138500000000001 -0.0399596127259187 0.0434077107297148 0.312499999999999 -0.0399596127259187 0.0434077107297148 -0.651 -0.0399596127259187 0.0434077107297148 -0.118000000000001 -0.0237000300545252 0.0540306262726484 0.332999999999999 0.0322699413292232 0.0493928222174892 0.824999999999998 -0.0237000300545252 0.0540306262726484 -0.6305 -0.0237000300545252 0.0540306262726484 -0.0975000000000007 -0.0048721813828676 0.0587984850873935 0.353499999999999 -0.0048721813828676 0.0587984850873935 -0.61 0.0465592900543872 0.0362385500486904 0.845499999999998 -0.0048721813828676 0.0587984850873935 -0.0770000000000007 0.0144836437413072 0.0571946156904205 -0.5895 0.0322699413292232 0.0493928222174892 -0.569 0.0558032172603374 0.0191572686830763 0.865999999999998 0.0144836437413072 0.0571946156904205 -0.0565000000000008 0.0558032172603374 -0.0191572686830763 0.537999999999998 0.0144836437413072 0.0571946156904205 0.373999999999999 0.0465592900543872 -0.0362385500486904 0.558499999999998 0.0465592900543872 0.0362385500486904 -0.5485 0.0322699413292232 0.0493928222174892 0.394499999999999 0.0322699413292232 0.0493928222174892 -0.0360000000000008 0.0322699413292232 -0.0493928222174892 0.578999999999998 0.0465592900543872 0.0362385500486904 -0.0155000000000007 0.0144836437413071 -0.0571946156904205 0.599499999999998 0.0558032172603374 0.0191572686830763 0.00499999999999923 0.0558032172603374 0.0191572686830763 -0.528 0.0465592900543872 0.0362385500486904 0.414999999999998 -0.00487218138286763 -0.0587984850873935 0.619999999999998 0.0558032172603374 -0.0191572686830763 -0.856 -0.0237000300545252 -0.0540306262726484 0.640499999999998 0.0558032172603374 -0.0191572686830763 -0.323 0.0465592900543872 -0.0362385500486904 -0.8355 -0.0399596127259187 -0.0434077107297148 0.660999999999998 0.0465592900543872 -0.0362385500486904 -0.3025 -0.0518889513211829 -0.0280808961891873 0.681499999999998 0.0322699413292232 -0.0493928222174892 -0.815 0.0558032172603374 0.0191572686830763 0.435499999999998 0.0322699413292232 -0.0493928222174892 -0.282 0.0144836437413071 -0.0571946156904205 -0.7945 -0.0581953169007606 -0.00971108082656329 0.701999999999998 0.0144836437413071 -0.0571946156904205 -0.2615 -0.00487218138286763 -0.0587984850873935 -0.774 -0.00487218138286763 -0.0587984850873935 -0.241 0.0558032172603374 -0.0191572686830763 0.107499999999999 -0.0237000300545252 -0.0540306262726484 -0.7535 -0.0581953169007606 0.00971108082656331 0.722499999999998 -0.0399596127259187 -0.0434077107297148 -0.733 -0.0518889513211829 -0.0280808961891873 -0.7125 -0.0581953169007606 -0.00971108082656329 -0.692 -0.0581953169007606 0.00971108082656331 -0.6715 0.0558032172603374 -0.0191572686830763 0.558499999999998 0.0558032172603374 -0.0191572686830763 -0.8355 0.0558032172603374 -0.0191572686830763 -0.3025 2.44491209137882 1.02408145759683 2.80466941471967 1.02 2.43682595242471 1.02262570049051 2.43228317468685 1.02110542603752 2.43147732351593 1.01955082933573 2.43445353651065 1.01801285860862 2.44106375825978 1.01652657437494 2.45109456503888 1.0151178997826 2.46431312024691 1.01380853516211 2.48049660718631 1.01261717373731 2.49945911807856 1.01156072295203 2.52108397202452 1.01065586821537 2.54533209854467 1.00992249695032 2.57228239892396 1.00938708907189 2.60178688339833 1.00909182706178 2.63286888882329 1.00908522424031 2.66316561916797 1.00937905852038 2.69128118220668 1.00993822093625 2.71674340697798 1.01072272443611 2.73931584114892 1.0116984049494 2.75880884681155 1.01283527550392 2.7750518403938 1.01410596249492 2.78788352180574 1.01548391120553 2.79716451764025 1.01694292569066 2.80278503600547 1.01845695571697 2.80231941769651 1.0217221401065 2.7953164453513 1.02340452634248 2.78377467368384 1.0250106342215 2.76786108472268 1.02650401500104 2.74778425147719 1.02784803777303 2.72377580609183 1.02900532228633 2.69571283467172 1.02994579069175 2.66648436882374 1.03056995433283 2.63824692780407 1.03088461504999 2.60945553704275 1.03093840602299 2.58128477911954 1.03073376715785 2.55484428085387 1.0302975318246 2.53117608812927 1.02968147301967 2.50563032671709 1.02872568400368 2.48199849629822 1.027477848089 2.46421419375261 1.02618304263635 2.45359680871256 1.02516411580487 5.21678510256759 0.142284549383506 4.71238898038469 0.0489999999999999 5.09210881641073 0.146073285920885 4.97371410732076 0.148668692866347 4.86302728622468 0.150225549623184 4.74977619301859 0.150952293660935 4.63570036088527 0.150799274457313 4.52274085728771 0.149772441039808 4.41264496310949 0.147932240085832 4.30667530044136 0.145373686500763 4.18068090090791 0.141306053135914 4.04740914706245 0.135716043745398 3.93317531615928 0.129698952001563 3.83275320077941 0.123116904794288 3.74807671672864 0.115840011872317 3.70080964619026 0.109987107068354 3.67770413480935 0.105314110260797 3.66865614859585 0.100845982930023 3.67186494178191 0.0967681120843361 3.68571668723299 0.0927317354199091 3.71676672763877 0.0877487250175123 3.76689048548964 0.0823176054057297 3.84933771250034 0.0756838545267796 3.95657072643189 0.0689612796514967 4.07641468880921 0.0629468376188425 4.21727780416317 0.0573951747919572 4.3429215438403 0.0536636830862009 4.46086101623767 0.05115972521058 4.57631717307016 0.0496309175674873 4.64178684569344 0.0491708863343469 4.82069306641309 0.0494003166241355 4.91352913136335 0.0503808800681784 5.01653081003707 0.0521585280943614 5.13318677592423 0.0550539282486119 5.25454451226385 0.0590827581844917 5.36792725191684 0.0638409423620643 5.50142100122972 0.07088211838917 5.62280229242527 0.0792673973204479 5.69435690919954 0.0860812610135355 5.73380979054753 0.0916886081908445 5.75139933738764 0.0961209583319534 5.75632347492835 0.100324621446683 5.7495352297098 0.104552449612672 5.73167944066085 0.108699385582087 5.69471092788781 0.113878070030169 5.63889576997943 0.119385483692949 5.54948723189013 0.126093148367781 5.43415670461436 0.132884647446895 5.3331412447393 0.137727054436835 6.28318530717959 0 6.28318530717959 2.05 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 2.05 0.174532925199433 2.05 0.349065850398866 2.05 0.523598775598299 2.05 0.698131700797732 2.05 0.872664625997165 2.05 1.0471975511966 2.05 1.22173047639603 2.05 1.39626340159546 2.05 1.5707963267949 2.05 1.74532925199433 2.05 1.91986217719376 2.05 2.0943951023932 2.05 2.26892802759263 2.05 2.44346095279206 2.05 2.61799387799149 2.05 2.79252680319093 2.05 2.96705972839036 2.05 3.14159265358979 2.05 3.31612557878922 2.05 3.49065850398866 2.05 3.66519142918809 2.05 3.83972435438752 2.05 4.01425727958696 2.05 4.18879020478639 2.05 4.36332312998582 2.05 4.53785605518525 2.05 4.71238898038469 2.05 4.88692190558412 2.05 5.06145483078355 2.05 5.23598775598299 2.05 5.41052068118242 2.05 5.58505360638185 2.05 5.75958653158128 2.05 5.93411945678072 2.05 6.10865238198015 2.05 4.62971548950075 0.82 4.29902152596498 0.7995 4.62971548950075 0.7995 2.97624567182191 0.3895 2.64555170828614 0.369 2.97624567182191 0.369 2.64555170828614 0.3895 4.29902152596498 0.82 2.97624567182191 1.7835 2.64555170828614 1.7835 2.64555170828614 1.763 2.64555170828614 0.41 2.31485774475037 0.3895 4.29902152596498 0.840499999999999 3.96832756242921 0.82 2.31485774475037 0.41 2.97624567182191 1.763 3.96832756242921 0.840499999999999 2.64555170828614 1.804 2.31485774475037 1.7835 2.31485774475037 0.4305 1.98416378121461 0.4305 1.98416378121461 0.41 3.96832756242921 0.860999999999999 3.63763359889344 0.840499999999999 3.63763359889344 0.860999999999999 2.31485774475037 1.804 1.98416378121461 0.451 1.65346981767884 0.451 1.65346981767884 0.4305 2.31485774475037 1.8245 1.98416378121461 1.8245 1.98416378121461 1.804 3.63763359889344 0.881499999999999 3.30693963535768 0.860999999999999 3.30693963535768 0.881499999999999 3.30693963535768 0.901999999999999 2.97624567182191 0.901999999999999 2.97624567182191 0.881499999999999 1.65346981767884 0.4715 1.32277585414307 0.451 1.32277585414307 0.4715 1.98416378121461 1.845 1.65346981767884 1.8245 2.97624567182191 0.922499999999999 2.64555170828614 0.922499999999999 2.64555170828614 0.901999999999999 0.330693963535768 1.4965 0.330693963535768 1.476 1.32277585414307 0.492 0.992081890607303 0.492 0.992081890607303 0.4715 5.95249134364382 1.1685 5.62179738010805 1.1685 5.62179738010805 1.148 5.95249134364382 1.148 1.65346981767884 1.845 5.62179738010805 1.189 5.29110341657228 1.1685 0.992081890607303 0.5125 0.661387927071535 0.492 0.661387927071535 0.5125 5.29110341657228 1.189 1.65346981767884 1.8655 1.32277585414307 1.845 2.64555170828614 0.942999999999999 2.31485774475037 0.942999999999999 2.31485774475037 0.922499999999999 1.32277585414307 1.8655 1.32277585414307 1.886 0.992081890607303 1.8655 5.29110341657228 1.2095 4.96040945303652 1.2095 4.96040945303652 1.189 0.661387927071535 0.533 0.330693963535768 0.5125 0.330693963535768 0.533 4.96040945303652 1.23 4.62971548950075 1.2095 2.31485774475037 0.963499999999999 1.98416378121461 0.942999999999999 0.992081890607303 1.886 4.62971548950075 1.23 1.98416378121461 0.963499999999999 0.992081890607303 1.9065 0.661387927071535 1.886 0.661387927071535 1.9065 4.62971548950075 1.2505 4.29902152596498 1.23 4.29902152596498 1.2505 0.330693963535768 0.5535 1.98416378121461 0.983999999999999 1.65346981767884 0.963499999999999 0.661387927071535 1.927 0.330693963535768 1.927 0.330693963535768 1.9065 1.65346981767884 0.983999999999999 4.29902152596498 1.271 3.96832756242921 1.2505 3.96832756242921 1.271 3.96832756242921 1.2915 3.63763359889344 1.271 1.65346981767884 1.0045 1.32277585414307 1.0045 1.32277585414307 0.983999999999999 5.95249134364382 0.2255 5.95249134364382 0.205 3.63763359889344 1.2915 5.62179738010805 0.205 5.62179738010805 0.2255 5.62179738010805 0.246 5.29110341657228 0.246 5.29110341657228 0.2255 3.63763359889344 1.312 3.30693963535768 1.312 3.30693963535768 1.2915 1.32277585414307 1.025 0.992081890607303 1.025 0.992081890607303 1.0045 0.330693963535768 1.9475 5.95249134364382 1.6195 5.95249134364382 1.599 3.30693963535768 1.3325 2.97624567182191 1.312 5.62179738010805 1.6195 5.62179738010805 1.599 5.29110341657228 0.2665 4.96040945303652 0.246 2.97624567182191 1.3325 5.62179738010805 1.64 5.29110341657228 1.64 5.29110341657228 1.6195 2.97624567182191 1.353 2.64555170828614 1.3325 2.64555170828614 1.353 4.96040945303652 0.2665 0.992081890607303 1.0455 0.661387927071535 1.0455 0.661387927071535 1.025 4.96040945303652 0.287 4.62971548950075 0.2665 5.29110341657228 1.6605 4.96040945303652 1.64 0.661387927071535 1.066 0.330693963535768 1.0455 4.96040945303652 1.6605 4.96040945303652 1.681 4.62971548950075 1.6605 2.64555170828614 1.3735 2.31485774475037 1.3735 2.31485774475037 1.353 4.62971548950075 0.287 4.62971548950075 1.681 4.62971548950075 0.3075 4.29902152596498 0.287 4.62971548950075 1.7015 4.29902152596498 1.7015 4.29902152596498 1.681 0.330693963535768 1.066 4.29902152596498 0.3075 4.29902152596498 0.328 3.96832756242921 0.328 3.96832756242921 0.3075 2.31485774475037 1.394 1.98416378121461 1.394 1.98416378121461 1.3735 4.29902152596498 1.722 3.96832756242921 1.7015 1.98416378121461 1.4145 1.65346981767884 1.394 1.65346981767884 1.4145 3.96832756242921 1.722 3.96832756242921 0.3485 3.63763359889344 0.3485 3.63763359889344 0.328 3.63763359889344 0.369 3.30693963535768 0.3485 3.30693963535768 0.369 3.96832756242921 1.7425 3.63763359889344 1.722 3.63763359889344 1.7425 1.65346981767884 1.435 1.32277585414307 1.435 1.32277585414307 1.4145 3.63763359889344 1.763 3.30693963535768 1.763 3.30693963535768 1.7425 3.30693963535768 0.3895 0.330693963535768 1.0865 2.97624567182191 0.41 3.30693963535768 1.7835 5.95249134364382 0.7585 5.62179738010805 0.738 5.95249134364382 0.738 1.32277585414307 1.4555 0.992081890607303 1.435 0.992081890607303 1.4555 5.62179738010805 0.7585 2.97624567182191 1.804 2.64555170828614 0.4305 5.62179738010805 0.779 5.29110341657228 0.7585 5.29110341657228 0.779 2.31485774475037 0.451 0.992081890607303 1.476 0.661387927071535 1.476 0.661387927071535 1.4555 5.29110341657228 0.7995 4.96040945303652 0.779 2.64555170828614 1.8245 4.96040945303652 0.7995 1.98416378121461 0.4715 0.661387927071535 1.4965 4.96040945303652 0.82 1.65346981767884 0.492 4.62971548950075 0.840499999999999 2.31485774475037 1.845 1.32277585414307 0.5125 4.29902152596498 0.860999999999999 0.992081890607303 0.533 3.96832756242921 0.881499999999999 1.98416378121461 1.8655 1.65346981767884 1.886 3.63763359889344 0.901999999999999 0.330693963535768 1.517 0.661387927071535 0.5535 1.32277585414307 1.9065 3.30693963535768 0.922499999999999 0.330693963535768 0.574 2.97624567182191 0.942999999999999 0.992081890607303 1.927 5.95249134364382 1.189 5.95249134364382 0.246 5.62179738010805 1.2095 2.64555170828614 0.963499999999999 0.661387927071535 1.9475 5.62179738010805 0.2665 5.29110341657228 1.23 5.29110341657228 0.287 4.96040945303652 1.2505 0.330693963535768 1.968 2.31485774475037 0.983999999999999 5.95249134364382 1.64 4.96040945303652 0.3075 4.62971548950075 1.271 5.62179738010805 1.6605 1.98416378121461 1.0045 4.29902152596498 1.2915 5.29110341657228 1.681 4.62971548950075 0.328 3.96832756242921 1.312 1.65346981767884 1.025 4.96040945303652 1.7015 3.63763359889344 1.3325 4.29902152596498 0.3485 4.62971548950075 1.722 1.32277585414307 1.0455 3.30693963535768 1.353 4.29902152596498 1.7425 3.96832756242921 0.369 3.63763359889344 0.3895 0.992081890607303 1.066 2.97624567182191 1.3735 3.96832756242921 1.763 2.64555170828614 1.394 3.30693963535768 0.41 0.661387927071535 1.0865 3.63763359889344 1.7835 2.97624567182191 0.4305 2.31485774475037 1.4145 3.30693963535768 1.804 2.64555170828614 0.451 1.98416378121461 1.435 2.31485774475037 0.4715 1.65346981767884 1.4555 1.98416378121461 0.492 2.97624567182191 1.8245 1.65346981767884 0.5125 2.64555170828614 1.845 1.32277585414307 1.476 1.32277585414307 0.533 0.330693963535768 1.107 2.31485774475037 1.8655 5.95249134364382 0.779 0.992081890607303 0.5535 0.661387927071535 0.574 1.98416378121461 1.886 0.992081890607303 1.4965 5.62179738010805 0.7995 1.65346981767884 1.9065 5.29110341657228 0.82 0.661387927071535 1.517 1.32277585414307 1.927 0.330693963535768 0.5945 4.96040945303652 0.840499999999999 5.95249134364382 0.2665 0.992081890607303 1.9475 4.62971548950075 0.860999999999999 5.62179738010805 0.287 0.661387927071535 1.968 4.29902152596498 0.881499999999999 5.29110341657228 0.3075 3.96832756242921 0.901999999999999 4.96040945303652 0.328 3.63763359889344 0.922499999999999 0.330693963535768 1.9885 5.95249134364382 1.6605 0.330693963535768 1.5375 5.62179738010805 1.681 4.62971548950075 0.3485 5.95249134364382 1.2095 5.29110341657228 1.7015 3.30693963535768 0.942999999999999 4.29902152596498 0.369 2.97624567182191 0.963499999999999 5.62179738010805 1.23 4.96040945303652 1.722 5.29110341657228 1.2505 3.96832756242921 0.3895 4.62971548950075 1.7425 4.96040945303652 1.271 3.63763359889344 0.41 4.29902152596498 1.763 2.64555170828614 0.983999999999999 4.62971548950075 1.2915 2.31485774475037 1.0045 3.30693963535768 0.4305 4.29902152596498 1.312 3.96832756242921 1.7835 2.97624567182191 0.451 3.96832756242921 1.3325 1.98416378121461 1.025 3.63763359889344 1.353 2.64555170828614 0.4715 3.63763359889344 1.804 1.65346981767884 1.0455 3.30693963535768 1.3735 2.31485774475037 0.492 2.97624567182191 1.394 3.30693963535768 1.8245 1.32277585414307 1.066 1.98416378121461 0.5125 2.64555170828614 1.4145 1.65346981767884 0.533 2.31485774475037 1.435 0.992081890607303 1.0865 2.97624567182191 1.845 1.32277585414307 0.5535 2.64555170828614 1.8655 0.992081890607303 0.574 1.98416378121461 1.4555 2.31485774475037 1.886 0.661387927071535 0.5945 1.65346981767884 1.476 1.98416378121461 1.9065 0.661387927071535 1.107 1.65346981767884 1.927 0.330693963535768 0.615 5.95249134364382 0.287 1.32277585414307 1.9475 5.62179738010805 0.3075 0.992081890607303 1.968 1.32277585414307 1.4965 0.992081890607303 1.517 5.29110341657228 0.328 0.330693963535768 1.1275 0.661387927071535 1.9885 4.96040945303652 0.3485 5.95249134364382 0.7995 0.330693963535768 2.009 5.95249134364382 1.681 4.62971548950075 0.369 5.62179738010805 1.7015 5.62179738010805 0.82 0.661387927071535 1.5375 4.29902152596498 0.3895 5.29110341657228 1.722 5.29110341657228 0.840499999999999 4.96040945303652 0.860999999999999 4.96040945303652 1.7425 3.96832756242921 0.41 4.62971548950075 1.763 4.62971548950075 0.881499999999999 3.63763359889344 0.4305 4.29902152596498 1.7835 4.29902152596498 0.901999999999999 3.30693963535768 0.451 0.330693963535768 1.558 5.95249134364382 1.23 2.97624567182191 0.4715 3.96832756242921 1.804 3.96832756242921 0.922499999999999 3.63763359889344 0.942999999999999 5.62179738010805 1.2505 2.64555170828614 0.492 5.29110341657228 1.271 3.63763359889344 1.8245 4.96040945303652 1.2915 2.31485774475037 0.5125 3.30693963535768 0.963499999999999 4.62971548950075 1.312 3.30693963535768 1.845 1.98416378121461 0.533 4.29902152596498 1.3325 2.97624567182191 0.983999999999999 1.65346981767884 0.5535 2.97624567182191 1.8655 3.96832756242921 1.353 2.64555170828614 1.0045 1.32277585414307 0.574 3.63763359889344 1.3735 0.992081890607303 0.5945 2.31485774475037 1.025 3.30693963535768 1.394 2.64555170828614 1.886 0.661387927071535 0.615 2.31485774475037 1.9065 1.98416378121461 1.0455 2.97624567182191 1.4145 1.98416378121461 1.927 2.64555170828614 1.435 0.330693963535768 0.6355 1.65346981767884 1.066 1.65346981767884 1.9475 2.31485774475037 1.4555 5.95249134364382 0.3075 1.32277585414307 1.0865 1.32277585414307 1.968 1.98416378121461 1.476 5.62179738010805 0.328 0.992081890607303 1.107 0.992081890607303 1.9885 5.29110341657228 0.3485 1.65346981767884 1.4965 0.661387927071535 2.009 4.96040945303652 0.369 0.330693963535768 2.0295 5.95249134364382 1.7015 4.62971548950075 0.3895 0.661387927071535 1.1275 1.32277585414307 1.517 5.62179738010805 1.722 4.29902152596498 0.41 5.29110341657228 1.7425 4.96040945303652 1.763 0.992081890607303 1.5375 3.96832756242921 0.4305 4.62971548950075 1.7835 3.63763359889344 0.451 4.29902152596498 1.804 3.30693963535768 0.4715 0.330693963535768 1.148 2.97624567182191 0.492 3.96832756242921 1.8245 5.95249134364382 0.82 2.64555170828614 0.5125 0.661387927071535 1.558 2.31485774475037 0.533 3.63763359889344 1.845 5.62179738010805 0.840499999999999 0.330693963535768 1.5785 3.30693963535768 1.8655 1.98416378121461 0.5535 5.29110341657228 0.860999999999999 5.95249134364382 1.2505 4.96040945303652 0.881499999999999 1.65346981767884 0.574 5.62179738010805 1.271 2.97624567182191 1.886 1.32277585414307 0.5945 2.64555170828614 1.9065 4.62971548950075 0.901999999999999 5.29110341657228 1.2915 0.992081890607303 0.615 4.29902152596498 0.922499999999999 4.96040945303652 1.312 3.96832756242921 0.942999999999999 0.661387927071535 0.6355 4.62971548950075 1.3325 2.31485774475037 1.927 1.98416378121461 1.9475 4.29902152596498 1.353 3.63763359889344 0.963499999999999 3.96832756242921 1.3735 0.330693963535768 0.656 1.65346981767884 1.968 3.30693963535768 0.983999999999999 5.95249134364382 0.328 3.63763359889344 1.394 1.32277585414307 1.9885 2.97624567182191 1.0045 3.30693963535768 1.4145 5.62179738010805 0.3485 0.992081890607303 2.009 2.97624567182191 1.435 2.31485774475037 1.0455 5.29110341657228 0.369 0.661387927071535 2.0295 2.64555170828614 1.4555 5.95249134364382 1.722 4.96040945303652 0.3895 5.62179738010805 1.7425 1.98416378121461 1.066 4.62971548950075 0.41 5.29110341657228 1.763 2.31485774475037 1.476 1.65346981767884 1.0865 4.96040945303652 1.7835 4.29902152596498 0.4305 4.62971548950075 1.804 1.32277585414307 1.107 3.96832756242921 0.451 1.98416378121461 1.4965 4.29902152596498 1.8245 3.63763359889344 0.4715 1.65346981767884 1.517 0.992081890607303 1.1275 0.661387927071535 1.148 3.30693963535768 0.492 3.96832756242921 1.845 2.97624567182191 0.5125 1.32277585414307 1.5375 3.63763359889344 1.8655 2.64555170828614 0.533 0.992081890607303 1.558 3.30693963535768 1.886 2.31485774475037 0.5535 2.97624567182191 1.9065 1.98416378121461 0.574 0.661387927071535 1.5785 0.330693963535768 1.1685 1.65346981767884 0.5945 2.64555170828614 1.927 1.32277585414307 0.615 0.992081890607303 0.6355 2.31485774475037 1.9475 0.661387927071535 0.656 1.98416378121461 1.968 5.95249134364382 0.840499999999999 5.62179738010805 0.860999999999999 0.330693963535768 1.599 1.65346981767884 1.9885 5.95249134364382 1.271 5.29110341657228 0.881499999999999 0.330693963535768 0.6765 5.95249134364382 0.3485 1.32277585414307 2.009 5.62179738010805 1.2915 0.992081890607303 2.0295 4.96040945303652 0.901999999999999 5.29110341657228 1.312 5.95249134364382 1.7425 5.62179738010805 0.369 4.62971548950075 0.922499999999999 5.62179738010805 1.763 4.96040945303652 1.3325 5.29110341657228 0.3895 4.29902152596498 0.942999999999999 4.62971548950075 1.353 5.29110341657228 1.7835 3.96832756242921 0.963499999999999 4.29902152596498 1.3735 4.96040945303652 1.804 4.96040945303652 0.41 3.63763359889344 0.983999999999999 4.62971548950075 1.8245 3.96832756242921 1.394 4.62971548950075 0.4305 3.63763359889344 1.4145 3.30693963535768 1.0045 4.29902152596498 0.451 3.30693963535768 1.435 4.29902152596498 1.845 2.97624567182191 1.025 2.97624567182191 1.4555 3.96832756242921 0.4715 3.96832756242921 1.8655 3.63763359889344 0.492 2.64555170828614 1.476 2.64555170828614 1.0455 3.30693963535768 0.5125 3.63763359889344 1.886 2.31485774475037 1.4965 2.97624567182191 0.533 3.30693963535768 1.9065 2.31485774475037 1.066 2.64555170828614 0.5535 1.98416378121461 1.517 1.98416378121461 1.0865 1.65346981767884 1.107 2.97624567182191 1.927 2.31485774475037 0.574 2.64555170828614 1.9475 1.32277585414307 1.1275 1.65346981767884 1.5375 1.98416378121461 0.5945 2.31485774475037 1.968 0.992081890607303 1.148 1.65346981767884 0.615 1.32277585414307 0.6355 1.32277585414307 1.558 1.98416378121461 1.9885 0.992081890607303 0.656 1.65346981767884 2.009 1.32277585414307 2.0295 0.661387927071535 1.1685 0.992081890607303 1.5785 5.95249134364382 1.763 0.661387927071535 0.6765 5.62179738010805 1.7835 5.29110341657228 1.804 0.330693963535768 0.697 5.95249134364382 0.369 4.96040945303652 1.8245 4.62971548950075 1.845 5.62179738010805 0.3895 0.661387927071535 1.599 4.29902152596498 1.8655 5.29110341657228 0.41 0.330693963535768 1.189 3.96832756242921 1.886 5.95249134364382 0.860999999999999 0.330693963535768 1.6195 4.96040945303652 0.4305 5.95249134364382 1.2915 5.62179738010805 1.312 5.62179738010805 0.881499999999999 4.62971548950075 0.451 3.63763359889344 1.9065 5.29110341657228 0.901999999999999 4.29902152596498 0.4715 5.29110341657228 1.3325 3.30693963535768 1.927 4.96040945303652 0.922499999999999 4.96040945303652 1.353 4.62971548950075 1.3735 3.96832756242921 0.492 2.97624567182191 1.9475 4.62971548950075 0.942999999999999 4.29902152596498 1.394 4.29902152596498 0.963499999999999 3.63763359889344 0.5125 2.64555170828614 1.968 3.96832756242921 1.4145 3.30693963535768 0.533 3.96832756242921 0.983999999999999 2.31485774475037 1.9885 3.63763359889344 1.435 3.63763359889344 1.0045 2.97624567182191 0.5535 2.64555170828614 0.574 3.30693963535768 1.4555 1.98416378121461 2.009 3.30693963535768 1.025 2.31485774475037 0.5945 1.65346981767884 2.0295 2.97624567182191 1.0455 5.95249134364382 1.7835 2.97624567182191 1.476 1.98416378121461 0.615 2.64555170828614 1.4965 2.64555170828614 1.066 5.62179738010805 1.804 1.65346981767884 0.6355 5.29110341657228 1.8245 2.31485774475037 1.0865 2.31485774475037 1.517 1.32277585414307 0.656 4.96040945303652 1.845 1.98416378121461 1.107 4.62971548950075 1.8655 1.98416378121461 1.5375 1.65346981767884 1.1275 0.992081890607303 0.6765 1.32277585414307 1.148 0.661387927071535 0.697 4.29902152596498 1.886 1.65346981767884 1.558 3.96832756242921 1.9065 0.330693963535768 0.7175 0.992081890607303 1.1685 0.661387927071535 1.189 3.63763359889344 1.927 1.32277585414307 1.5785 5.95249134364382 0.3895 3.30693963535768 1.9475 5.62179738010805 0.41 0.992081890607303 1.599 2.97624567182191 1.968 5.29110341657228 0.4305 0.330693963535768 0.0205 2.64555170828614 1.9885 0.661387927071535 1.6195 4.96040945303652 0.451 0.330693963535768 1.2095 0.661387927071535 0.0205 4.62971548950075 0.4715 2.31485774475037 2.009 1.98416378121461 2.0295 4.29902152596498 0.492 0.330693963535768 1.64 5.95249134364382 1.804 3.96832756242921 0.5125 5.62179738010805 1.8245 0.330693963535768 0.041 5.95249134364382 0.881499999999999 5.29110341657228 1.845 3.63763359889344 0.533 0.992081890607303 0.0205 5.62179738010805 0.901999999999999 5.95249134364382 1.312 3.30693963535768 0.5535 4.96040945303652 1.8655 0.661387927071535 0.041 5.29110341657228 0.922499999999999 5.62179738010805 1.3325 2.97624567182191 0.574 0.330693963535768 0.0615 4.62971548950075 1.886 5.29110341657228 1.353 4.96040945303652 0.942999999999999 4.96040945303652 1.3735 2.64555170828614 0.5945 4.29902152596498 1.9065 4.62971548950075 0.963499999999999 4.62971548950075 1.394 1.32277585414307 0.0205 2.31485774475037 0.615 4.29902152596498 0.983999999999999 3.96832756242921 1.927 4.29902152596498 1.4145 1.98416378121461 0.6355 3.96832756242921 1.0045 3.96832756242921 1.435 1.65346981767884 0.656 0.992081890607303 0.041 0.661387927071535 0.0615 3.63763359889344 1.025 3.63763359889344 1.4555 3.63763359889344 1.9475 1.32277585414307 0.6765 3.30693963535768 1.968 3.30693963535768 1.0455 3.30693963535768 1.476 2.97624567182191 1.9885 2.97624567182191 1.066 0.992081890607303 0.697 2.97624567182191 1.4965 0.330693963535768 0.082 2.64555170828614 1.0865 2.64555170828614 2.009 1.65346981767884 0.0205 0.661387927071535 0.7175 2.64555170828614 1.517 2.31485774475037 1.107 2.31485774475037 2.0295 1.32277585414307 0.041 5.95249134364382 1.8245 1.98416378121461 1.1275 0.330693963535768 0.738 0.992081890607303 0.0615 5.62179738010805 1.845 1.65346981767884 1.148 5.95249134364382 0.41 2.31485774475037 1.5375 5.29110341657228 1.8655 0.661387927071535 0.082 1.32277585414307 1.1685 4.96040945303652 1.886 5.62179738010805 0.4305 1.98416378121461 1.558 5.29110341657228 0.451 4.62971548950075 1.9065 0.330693963535768 0.1025 0.992081890607303 1.189 4.96040945303652 0.4715 1.98416378121461 0.0205 4.29902152596498 1.927 1.65346981767884 1.5785 4.62971548950075 0.492 1.65346981767884 0.041 3.96832756242921 1.9475 4.29902152596498 0.5125 1.32277585414307 1.599 3.63763359889344 1.968 1.32277585414307 0.0615 3.96832756242921 0.533 0.992081890607303 1.6195 0.992081890607303 0.082 3.30693963535768 1.9885 0.661387927071535 1.2095 3.63763359889344 0.5535 0.661387927071535 0.1025 0.661387927071535 1.64 2.97624567182191 2.009 0.330693963535768 1.23 3.30693963535768 0.574 2.64555170828614 2.0295 2.97624567182191 0.5945 5.95249134364382 1.845 0.330693963535768 0.123 2.64555170828614 0.615 5.62179738010805 1.8655 2.31485774475037 0.6355 5.29110341657228 1.886 2.31485774475037 0.0205 5.95249134364382 0.901999999999999 4.96040945303652 1.9065 1.98416378121461 0.656 1.98416378121461 0.041 5.62179738010805 0.922499999999999 0.330693963535768 1.6605 5.95249134364382 1.3325 1.65346981767884 0.6765 1.65346981767884 0.0615 5.29110341657228 0.942999999999999 4.62971548950075 1.927 5.62179738010805 1.353 1.32277585414307 0.082 1.32277585414307 0.697 4.29902152596498 1.9475 5.29110341657228 1.3735 4.96040945303652 0.963499999999999 4.62971548950075 0.983999999999999 4.96040945303652 1.394 0.992081890607303 0.1025 0.992081890607303 0.7175 3.96832756242921 1.968 4.29902152596498 1.0045 4.62971548950075 1.4145 0.661387927071535 0.123 0.661387927071535 0.738 3.63763359889344 1.9885 3.96832756242921 1.025 4.29902152596498 1.435 3.96832756242921 1.4555 3.63763359889344 1.0455 0.330693963535768 0.7585 3.30693963535768 2.009 2.97624567182191 2.0295 5.95249134364382 0.4305 3.63763359889344 1.476 3.30693963535768 1.066 0.330693963535768 0.1435 3.30693963535768 1.4965 5.95249134364382 1.8655 2.64555170828614 0.0205 2.97624567182191 1.0865 5.62179738010805 1.886 2.97624567182191 1.517 5.62179738010805 0.451 2.64555170828614 1.107 2.31485774475037 0.041 5.29110341657228 0.4715 5.29110341657228 1.9065 1.98416378121461 0.0615 2.64555170828614 1.5375 2.31485774475037 1.1275 4.96040945303652 0.492 1.98416378121461 1.148 4.96040945303652 1.927 1.65346981767884 0.082 4.62971548950075 0.5125 4.62971548950075 1.9475 1.32277585414307 0.1025 1.65346981767884 1.1685 4.29902152596498 1.968 1.32277585414307 1.189 4.29902152596498 0.533 0.992081890607303 0.123 2.31485774475037 1.558 3.96832756242921 1.9885 0.992081890607303 1.2095 3.96832756242921 0.5535 3.63763359889344 2.009 0.661387927071535 0.1435 3.63763359889344 0.574 1.98416378121461 1.5785 1.65346981767884 1.599 3.30693963535768 2.0295 3.30693963535768 0.5945 5.95249134364382 1.886 2.97624567182191 0.615 0.661387927071535 1.23 0.330693963535768 0.164 5.62179738010805 1.9065 1.32277585414307 1.6195 2.97624567182191 0.0205 5.29110341657228 1.927 2.64555170828614 0.6355 2.31485774475037 0.656 2.64555170828614 0.041 4.96040945303652 1.9475 0.992081890607303 1.64 2.31485774475037 0.0615 0.330693963535768 1.2505 1.98416378121461 0.6765 4.62971548950075 1.968 1.98416378121461 0.082 0.661387927071535 1.6605 1.65346981767884 0.697 4.29902152596498 1.9885 1.65346981767884 0.1025 1.32277585414307 0.7175 3.96832756242921 2.009 1.32277585414307 0.123 0.992081890607303 0.738 3.63763359889344 2.0295 5.95249134364382 0.922499999999999 0.992081890607303 0.1435 5.95249134364382 1.9065 0.661387927071535 0.7585 5.62179738010805 0.942999999999999 0.661387927071535 0.164 5.62179738010805 1.927 0.330693963535768 1.681 5.95249134364382 1.353 5.29110341657228 0.963499999999999 5.29110341657228 1.9475 0.330693963535768 0.779 4.96040945303652 0.983999999999999 5.62179738010805 1.3735 4.96040945303652 1.968 5.29110341657228 1.394 5.95249134364382 0.451 0.330693963535768 0.1845 4.62971548950075 1.0045 3.30693963535768 0.0205 4.96040945303652 1.4145 4.62971548950075 1.9885 4.29902152596498 1.025 5.62179738010805 0.4715 4.62971548950075 1.435 4.29902152596498 2.009 2.97624567182191 0.041 3.96832756242921 1.0455 5.29110341657228 0.492 4.29902152596498 1.4555 3.96832756242921 2.0295 2.64555170828614 0.0615 3.63763359889344 1.066 3.96832756242921 1.476 4.96040945303652 0.5125 5.95249134364382 1.927 2.31485774475037 0.082 3.30693963535768 1.0865 3.63763359889344 1.4965 4.62971548950075 0.533 5.62179738010805 1.9475 2.97624567182191 1.107 4.29902152596498 0.5535 5.29110341657228 1.968 3.30693963535768 1.517 1.98416378121461 0.1025 2.64555170828614 1.1275 1.65346981767884 0.123 3.96832756242921 0.574 2.97624567182191 1.5375 4.96040945303652 1.9885 1.32277585414307 0.1435 2.31485774475037 1.148 3.63763359889344 0.5945 1.98416378121461 1.1685 4.62971548950075 2.009 4.29902152596498 2.0295 1.65346981767884 1.189 0.992081890607303 0.164 3.30693963535768 0.615 2.64555170828614 1.558 5.95249134364382 1.9475 2.97624567182191 0.6355 1.32277585414307 1.2095 0.661387927071535 0.1845 2.64555170828614 0.656 5.62179738010805 1.968 2.31485774475037 1.5785 2.31485774475037 0.6765 0.992081890607303 1.23 5.29110341657228 1.9885 4.96040945303652 2.009 0.330693963535768 0.205 1.98416378121461 0.697 1.98416378121461 1.599 3.63763359889344 0.0205 0.661387927071535 1.2505 4.62971548950075 2.0295 1.65346981767884 0.7175 3.30693963535768 0.041 5.95249134364382 1.968 1.65346981767884 1.6195 5.62179738010805 1.9885 1.32277585414307 0.738 2.97624567182191 0.0615 1.32277585414307 1.64 0.992081890607303 0.7585 2.64555170828614 0.082 5.29110341657228 2.009 0.992081890607303 1.6605 4.96040945303652 2.0295 0.661387927071535 0.779 2.31485774475037 0.1025 5.95249134364382 1.9885 0.661387927071535 1.681 1.98416378121461 0.123 5.62179738010805 2.009 0.330693963535768 0.7995 1.65346981767884 0.1435 5.29110341657228 2.0295 5.95249134364382 0.4715 5.95249134364382 2.009 1.32277585414307 0.164 0.330693963535768 1.271 5.62179738010805 0.492 5.62179738010805 2.0295 5.95249134364382 0.942999999999999 0.330693963535768 1.7015 0.992081890607303 0.1845 5.95249134364382 2.0295 5.62179738010805 0.963499999999999 5.29110341657228 0.5125 0.661387927071535 0.205 5.95249134364382 1.3735 5.29110341657228 0.983999999999999 4.96040945303652 0.533 5.62179738010805 1.394 4.96040945303652 1.0045 4.62971548950075 0.5535 5.29110341657228 1.4145 4.62971548950075 1.025 0.330693963535768 0.2255 3.96832756242921 0.0205 4.29902152596498 0.574 4.96040945303652 1.435 4.29902152596498 1.0455 4.62971548950075 1.4555 3.96832756242921 0.5945 3.63763359889344 0.041 3.96832756242921 1.066 4.29902152596498 1.476 3.30693963535768 0.0615 3.96832756242921 1.4965 3.63763359889344 1.0865 3.63763359889344 0.615 3.30693963535768 0.6355 3.63763359889344 1.517 2.97624567182191 0.082 3.30693963535768 1.107 2.64555170828614 0.1025 2.97624567182191 0.656 3.30693963535768 1.5375 2.97624567182191 1.1275 2.64555170828614 0.6765 2.31485774475037 0.123 2.64555170828614 1.148 1.98416378121461 0.1435 2.97624567182191 1.558 2.31485774475037 1.1685 2.31485774475037 0.697 1.98416378121461 1.189 2.64555170828614 1.5785 1.65346981767884 0.164 1.98416378121461 0.7175 1.65346981767884 1.2095 1.32277585414307 0.1845 1.65346981767884 0.738 2.31485774475037 1.599 0.992081890607303 0.205 1.32277585414307 1.23 1.32277585414307 0.7585 0.992081890607303 1.2505 0.661387927071535 0.2255 0.992081890607303 0.779 1.98416378121461 1.6195 0.661387927071535 0.7995 1.65346981767884 1.64 0.661387927071535 1.271 0.330693963535768 0.246 4.29902152596498 0.0205 0.330693963535768 0.82 5.95249134364382 0.492 3.96832756242921 0.041 1.32277585414307 1.6605 5.62179738010805 0.5125 3.63763359889344 0.0615 3.30693963535768 0.082 0.330693963535768 1.2915 5.29110341657228 0.533 0.992081890607303 1.681 4.96040945303652 0.5535 2.97624567182191 0.1025 4.62971548950075 0.574 2.64555170828614 0.123 2.31485774475037 0.1435 0.661387927071535 1.7015 4.29902152596498 0.5945 1.98416378121461 0.164 3.96832756242921 0.615 5.95249134364382 0.963499999999999 1.65346981767884 0.1845 5.62179738010805 0.983999999999999 0.330693963535768 1.722 3.63763359889344 0.6355 5.95249134364382 1.394 5.29110341657228 1.0045 5.62179738010805 1.4145 1.32277585414307 0.205 3.30693963535768 0.656 4.96040945303652 1.025 5.29110341657228 1.435 2.97624567182191 0.6765 0.992081890607303 0.2255 4.62971548950075 1.0455 4.96040945303652 1.4555 2.64555170828614 0.697 0.661387927071535 0.246 4.29902152596498 1.066 4.62971548950075 1.476 0.330693963535768 0.2665 3.96832756242921 1.0865 2.31485774475037 0.7175 4.29902152596498 1.4965 3.96832756242921 1.517 3.63763359889344 1.107 1.98416378121461 0.738 4.62971548950075 0.0205 3.30693963535768 1.1275 3.63763359889344 1.5375 1.65346981767884 0.7585 3.30693963535768 1.558 4.29902152596498 0.041 2.97624567182191 1.148 1.32277585414307 0.779 3.96832756242921 0.0615 2.64555170828614 1.1685 2.97624567182191 1.5785 3.63763359889344 0.082 0.992081890607303 0.7995 2.31485774475037 1.189 3.30693963535768 0.1025 2.64555170828614 1.599 0.661387927071535 0.82 1.98416378121461 1.2095 2.97624567182191 0.123 1.65346981767884 1.23 2.64555170828614 0.1435 2.31485774475037 1.6195 0.330693963535768 0.840499999999999 5.95249134364382 0.5125 1.32277585414307 1.2505 2.31485774475037 0.164 1.98416378121461 0.1845 1.98416378121461 1.64 5.62179738010805 0.533 0.992081890607303 1.271 5.29110341657228 0.5535 1.65346981767884 0.205 0.661387927071535 1.2915 4.96040945303652 0.574 1.32277585414307 0.2255 1.65346981767884 1.6605 4.62971548950075 0.5945 1.32277585414307 1.681 0.992081890607303 0.246 0.661387927071535 0.2665 4.29902152596498 0.615 3.96832756242921 0.6355 3.63763359889344 0.656 0.992081890607303 1.7015 0.661387927071535 1.722 0.330693963535768 0.287 4.96040945303652 0.0205 3.30693963535768 0.6765 2.97624567182191 0.697 4.62971548950075 0.041 0.330693963535768 1.7425 0.330693963535768 1.312 3.63763359889344 0.1025 2.64555170828614 0.7175 5.95249134364382 0.983999999999999 3.30693963535768 0.123 5.95249134364382 1.4145 2.31485774475037 0.738 5.62179738010805 1.0045 2.97624567182191 0.1435 5.62179738010805 1.435 1.98416378121461 0.7585 5.29110341657228 1.025 2.64555170828614 0.164 5.29110341657228 1.4555 4.96040945303652 1.0455 1.65346981767884 0.779 4.96040945303652 1.476 2.31485774475037 0.1845 4.62971548950075 1.4965 4.62971548950075 1.066 1.32277585414307 0.7995 1.98416378121461 0.205 4.29902152596498 1.517 4.29902152596498 1.0865 0.992081890607303 0.82 1.65346981767884 0.2255 3.96832756242921 1.5375 3.96832756242921 1.107 0.661387927071535 0.840499999999999 1.32277585414307 0.246 3.63763359889344 1.1275 3.63763359889344 1.558 3.30693963535768 1.148 0.992081890607303 0.2665 0.330693963535768 0.860999999999999 2.97624567182191 1.1685 3.30693963535768 1.5785 5.95249134364382 0.533 0.661387927071535 0.287 2.97624567182191 1.599 2.64555170828614 1.189 5.62179738010805 0.5535 2.64555170828614 1.6195 2.31485774475037 1.2095 5.29110341657228 0.574 1.98416378121461 1.23 0.330693963535768 0.3075 5.29110341657228 0.0205 4.96040945303652 0.5945 1.65346981767884 1.2505 2.31485774475037 1.64 4.96040945303652 0.041 4.62971548950075 0.615 1.32277585414307 1.271 3.63763359889344 0.123 4.29902152596498 0.6355 1.98416378121461 1.6605 3.30693963535768 0.1435 3.96832756242921 0.656 2.97624567182191 0.164 3.63763359889344 0.6765 1.65346981767884 1.681 0.992081890607303 1.2915 0.661387927071535 1.312 2.64555170828614 0.1845 3.30693963535768 0.697 1.32277585414307 1.7015 2.31485774475037 0.205 2.97624567182191 0.7175 1.98416378121461 0.2255 2.64555170828614 0.738 1.65346981767884 0.246 0.992081890607303 1.722 2.31485774475037 0.7585 0.330693963535768 1.3325 0.661387927071535 1.7425 1.98416378121461 0.779 1.32277585414307 0.2665 1.65346981767884 0.7995 0.330693963535768 1.763 0.992081890607303 0.287 1.32277585414307 0.82 0.661387927071535 0.3075 0.992081890607303 0.840499999999999 5.95249134364382 1.0045 5.95249134364382 1.435 5.62179738010805 1.4555 0.661387927071535 0.860999999999999 5.62179738010805 1.025 5.29110341657228 1.476 0.330693963535768 0.328 5.29110341657228 1.0455 5.62179738010805 0.0205 4.96040945303652 1.4965 0.330693963535768 0.881499999999999 5.29110341657228 0.041 4.96040945303652 1.066 4.62971548950075 1.517 5.95249134364382 0.5535 4.62971548950075 1.0865 3.63763359889344 0.1435 4.29902152596498 1.5375 4.29902152596498 1.107 5.62179738010805 0.574 3.30693963535768 0.164 3.96832756242921 1.558 5.29110341657228 0.5945 3.96832756242921 1.1275 3.63763359889344 1.5785 3.63763359889344 1.148 4.96040945303652 0.615 2.97624567182191 0.1845 3.30693963535768 1.599 3.30693963535768 1.1685 2.64555170828614 0.205 2.97624567182191 1.189 4.62971548950075 0.6355 2.31485774475037 0.2255 4.29902152596498 0.656 2.64555170828614 1.2095 1.98416378121461 0.246 2.97624567182191 1.6195 3.96832756242921 0.6765 2.31485774475037 1.23 1.65346981767884 0.2665 3.63763359889344 0.697 1.98416378121461 1.2505 1.32277585414307 0.287 2.64555170828614 1.64 2.31485774475037 1.6605 3.30693963535768 0.7175 1.65346981767884 1.271 0.992081890607303 0.3075 1.32277585414307 1.2915 0.661387927071535 0.328 1.98416378121461 1.681 2.97624567182191 0.738 2.64555170828614 0.7585 1.65346981767884 1.7015 2.31485774475037 0.779 0.330693963535768 0.3485 0.992081890607303 1.312 5.95249134364382 0.0205 1.98416378121461 0.7995 5.62179738010805 0.041 1.65346981767884 0.82 1.32277585414307 1.722 3.96832756242921 0.1435 0.661387927071535 1.3325 3.63763359889344 0.164 1.32277585414307 0.840499999999999 0.992081890607303 1.7425 0.661387927071535 1.763 0.992081890607303 0.860999999999999 3.30693963535768 0.1845 0.661387927071535 0.881499999999999 2.97624567182191 0.205 2.64555170828614 0.2255 0.330693963535768 0.901999999999999 0.330693963535768 1.7835 5.95249134364382 0.574 5.95249134364382 1.4555 2.31485774475037 0.246 0.330693963535768 1.353 5.62179738010805 1.476 5.62179738010805 0.5945 5.95249134364382 1.025 1.98416378121461 0.2665 5.29110341657228 1.4965 5.29110341657228 0.615 5.62179738010805 1.0455 4.96040945303652 1.517 1.65346981767884 0.287 4.96040945303652 0.6355 5.29110341657228 1.066 4.62971548950075 1.5375 1.32277585414307 0.3075 4.62971548950075 0.656 4.29902152596498 1.558 0.992081890607303 0.328 4.96040945303652 1.0865 3.96832756242921 1.5785 4.29902152596498 0.6765 4.62971548950075 1.107 3.63763359889344 1.599 0.661387927071535 0.3485 3.96832756242921 0.697 4.29902152596498 1.1275 0.330693963535768 0.369 3.30693963535768 1.6195 3.96832756242921 1.148 3.63763359889344 0.7175 3.63763359889344 1.1685 2.97624567182191 1.64 5.95249134364382 0.041 3.30693963535768 0.738 3.30693963535768 1.189 2.97624567182191 1.2095 5.62179738010805 0.0615 2.97624567182191 0.7585 3.96832756242921 0.164 2.64555170828614 1.6605 2.64555170828614 1.23 2.64555170828614 0.779 2.31485774475037 1.2505 3.63763359889344 0.1845 2.31485774475037 1.681 2.31485774475037 0.7995 1.98416378121461 1.271 3.30693963535768 0.205 1.98416378121461 0.82 1.65346981767884 1.2915 2.97624567182191 0.2255 1.98416378121461 1.7015 1.65346981767884 0.840499999999999 1.32277585414307 1.312 1.65346981767884 1.722 2.64555170828614 0.246 1.32277585414307 0.860999999999999 2.31485774475037 0.2665 0.992081890607303 1.3325 0.992081890607303 0.881499999999999 1.32277585414307 1.7425 1.98416378121461 0.287 0.661387927071535 0.901999999999999 1.65346981767884 0.3075 0.992081890607303 1.763 0.661387927071535 1.353 1.32277585414307 0.328 0.330693963535768 0.922499999999999 5.95249134364382 0.5945 0.661387927071535 1.7835 0.992081890607303 0.3485 5.62179738010805 0.615 0.661387927071535 0.369 5.29110341657228 0.6355 4.96040945303652 0.656 0.330693963535768 0.3895 0.330693963535768 1.804 5.95249134364382 1.476 5.95249134364382 0.0615 4.62971548950075 0.6765 5.62179738010805 1.4965 4.29902152596498 0.164 5.29110341657228 1.517 4.29902152596498 0.697 0.330693963535768 1.3735 5.95249134364382 1.0455 4.96040945303652 1.5375 3.96832756242921 0.7175 5.62179738010805 1.066 4.62971548950075 1.558 3.96832756242921 0.1845 3.63763359889344 0.205 4.29902152596498 1.5785 3.63763359889344 0.738 5.29110341657228 1.0865 3.30693963535768 0.2255 3.30693963535768 0.7585 3.96832756242921 1.599 4.96040945303652 1.107 3.63763359889344 1.6195 4.62971548950075 1.1275 2.97624567182191 0.779 2.97624567182191 0.246 4.29902152596498 1.148 2.64555170828614 0.7995 2.64555170828614 0.2665 3.96832756242921 1.1685 3.30693963535768 1.64 2.31485774475037 0.287 2.31485774475037 0.82 2.97624567182191 1.6605 3.63763359889344 1.189 1.98416378121461 0.840499999999999 3.30693963535768 1.2095 1.98416378121461 0.3075 2.97624567182191 1.23 1.65346981767884 0.328 1.65346981767884 0.860999999999999 1.32277585414307 0.881499999999999 2.64555170828614 1.681 2.64555170828614 1.2505 1.32277585414307 0.3485 2.31485774475037 1.7015 0.992081890607303 0.901999999999999 2.31485774475037 1.271 0.992081890607303 0.369 1.98416378121461 1.2915 0.661387927071535 0.922499999999999 1.98416378121461 1.722 0.661387927071535 0.3895 1.65346981767884 1.312 0.330693963535768 0.942999999999999 1.32277585414307 1.3325 5.95249134364382 0.615 0.330693963535768 0.41 1.65346981767884 1.7425 5.95249134364382 0.082 0.992081890607303 1.353 5.62179738010805 0.6355 1.32277585414307 1.763 4.62971548950075 0.164 5.29110341657228 0.656 0.992081890607303 1.7835 4.96040945303652 0.6765 4.29902152596498 0.1845 0.661387927071535 1.804 4.62971548950075 0.697 3.96832756242921 0.205 0.330693963535768 1.8245 4.29902152596498 0.7175 3.63763359889344 0.2255 3.96832756242921 0.738 5.95249134364382 1.4965 0.661387927071535 1.3735 3.30693963535768 0.246 3.63763359889344 0.7585 5.62179738010805 1.517 2.97624567182191 0.2665 3.30693963535768 0.779 5.29110341657228 1.5375 4.96040945303652 1.558 2.64555170828614 0.287 4.62971548950075 1.5785 2.97624567182191 0.7995 2.31485774475037 0.3075 0.330693963535768 1.394 4.29902152596498 1.599 5.95249134364382 1.066 2.64555170828614 0.82 1.98416378121461 0.328 3.96832756242921 1.6195 5.62179738010805 1.0865 2.31485774475037 0.840499999999999 5.29110341657228 1.107 3.63763359889344 1.64 1.65346981767884 0.3485 1.98416378121461 0.860999999999999 1.32277585414307 0.369 1.65346981767884 0.881499999999999 3.30693963535768 1.6605 4.96040945303652 1.1275 0.992081890607303 0.3895 4.62971548950075 1.148 1.32277585414307 0.901999999999999 4.29902152596498 1.1685 0.661387927071535 0.41 2.97624567182191 1.681 0.992081890607303 0.922499999999999 3.96832756242921 1.189 3.63763359889344 1.2095 2.64555170828614 1.7015 0.330693963535768 0.4305 5.95249134364382 0.1025 0.661387927071535 0.942999999999999 3.30693963535768 1.23 0.330693963535768 0.963499999999999 2.31485774475037 1.722 2.97624567182191 1.2505 5.95249134364382 0.6355 5.62179738010805 0.123 2.64555170828614 1.271 5.29110341657228 0.1435 2.31485774475037 1.2915 1.98416378121461 1.7425 5.62179738010805 0.656 4.96040945303652 0.164 1.98416378121461 1.312 5.29110341657228 0.6765 1.65346981767884 1.763 4.96040945303652 0.697 4.62971548950075 0.1845 1.65346981767884 1.3325 4.29902152596498 0.205 4.62971548950075 0.7175 1.32277585414307 1.353 1.32277585414307 1.7835 3.96832756242921 0.2255 0.992081890607303 1.804 4.29902152596498 0.738 0.992081890607303 1.3735 3.96832756242921 0.7585 3.63763359889344 0.246 3.30693963535768 0.2665 3.63763359889344 0.779 0.661387927071535 1.8245 2.97624567182191 0.287 0.661387927071535 1.394 3.30693963535768 0.7995 2.64555170828614 0.3075 2.97624567182191 0.82 0.330693963535768 1.845 5.95249134364382 1.517 2.31485774475037 0.328 5.62179738010805 1.5375 2.64555170828614 0.840499999999999 1.98416378121461 0.3485 2.31485774475037 0.860999999999999 5.29110341657228 1.558 1.65346981767884 0.369 1.98416378121461 0.881499999999999 4.96040945303652 1.5785 1.32277585414307 0.3895 4.62971548950075 1.599 1.65346981767884 0.901999999999999 4.29902152596498 1.6195 0.992081890607303 0.41 1.32277585414307 0.922499999999999 0.330693963535768 1.4145 5.95249134364382 1.0865 3.96832756242921 1.64 0.661387927071535 0.4305 3.63763359889344 1.6605 5.62179738010805 1.107 0.992081890607303 0.942999999999999 0.661387927071535 0.963499999999999 5.29110341657228 1.1275 0.330693963535768 0.451 4.96040945303652 1.148 0.330693963535768 0.983999999999999 5.95249134364382 0.123 3.30693963535768 1.681 4.62971548950075 1.1685 2.97624567182191 1.7015 5.95249134364382 0.656 5.62179738010805 0.1435 4.29902152596498 1.189 2.64555170828614 1.722 3.96832756242921 1.2095 5.62179738010805 0.6765 5.29110341657228 0.164 3.63763359889344 1.23 5.29110341657228 0.697 4.96040945303652 0.1845 3.30693963535768 1.2505 4.96040945303652 0.7175 2.97624567182191 1.271 4.62971548950075 0.205 2.31485774475037 1.7425 1.98416378121461 1.763 4.62971548950075 0.738 4.29902152596498 0.2255 2.64555170828614 1.2915 4.29902152596498 0.7585 1.65346981767884 1.7835 2.31485774475037 1.312 3.96832756242921 0.246 3.96832756242921 0.779 3.63763359889344 0.2665 1.98416378121461 1.3325 3.63763359889344 0.7995 1.65346981767884 1.353 1.32277585414307 1.804 3.30693963535768 0.287 3.30693963535768 0.82 0.992081890607303 1.8245 2.97624567182191 0.3075 2.97624567182191 0.840499999999999 2.64555170828614 0.328 0.661387927071535 1.845 2.64555170828614 0.860999999999999 2.31485774475037 0.3485 1.32277585414307 1.3735 0.992081890607303 1.394 0.330693963535768 1.8655 2.31485774475037 0.881499999999999 1.98416378121461 0.369 1.98416378121461 0.901999999999999 5.95249134364382 1.5375 1.65346981767884 0.3895 1.65346981767884 0.922499999999999 5.62179738010805 1.558 1.32277585414307 0.41 0.661387927071535 1.4145 5.29110341657228 1.5785 1.32277585414307 0.942999999999999 0.992081890607303 0.4305 4.96040945303652 1.599 4.62971548950075 1.6195 0.661387927071535 0.451 0.992081890607303 0.963499999999999 4.29902152596498 1.64 0.661387927071535 0.983999999999999 3.96832756242921 1.6605 0.330693963535768 0.4715 0.330693963535768 1.0045 3.63763359889344 1.681 5.95249134364382 0.1435 5.95249134364382 0.6765 0.330693963535768 1.435 5.62179738010805 0.164 3.30693963535768 1.7015 5.95249134364382 1.107 5.62179738010805 0.697 5.62179738010805 1.1275 5.29110341657228 0.1845 5.29110341657228 0.7175 5.29110341657228 1.148 2.97624567182191 1.722 4.96040945303652 0.205 4.96040945303652 0.738 2.64555170828614 1.7425 4.96040945303652 1.1685 4.62971548950075 1.189 4.62971548950075 0.2255 4.62971548950075 0.7585 4.29902152596498 0.246 2.31485774475037 1.763 4.29902152596498 0.779 4.29902152596498 1.2095 3.96832756242921 0.2665 3.96832756242921 1.23 3.96832756242921 0.7995 1.98416378121461 1.7835 3.63763359889344 1.2505 3.63763359889344 0.287 3.63763359889344 0.82 3.30693963535768 1.271 3.30693963535768 0.3075 2.97624567182191 1.2915 3.30693963535768 0.840499999999999 2.97624567182191 0.860999999999999 2.64555170828614 1.312 2.97624567182191 0.328 1.65346981767884 1.804 2.64555170828614 0.3485 1.32277585414307 1.8245 2.64555170828614 0.881499999999999 2.31485774475037 1.3325 2.31485774475037 0.369 2.31485774475037 0.901999999999999 1.98416378121461 1.353 0.992081890607303 1.845 1.98416378121461 0.3895 1.98416378121461 0.922499999999999 1.65346981767884 1.3735 1.65346981767884 0.41 0.661387927071535 1.8655 1.65346981767884 0.942999999999999 1.32277585414307 0.4305 0.992081890607303 0.451 0.330693963535768 1.886 1.32277585414307 0.963499999999999 5.95249134364382 1.558 1.32277585414307 1.394 5.62179738010805 1.5785 0.661387927071535 0.4715 0.992081890607303 1.4145 0.992081890607303 0.983999999999999 5.29110341657228 1.599 0.661387927071535 1.0045 4.96040945303652 1.6195 0.330693963535768 1.025 0.330693963535768 0.492 0.661387927071535 1.435 4.62971548950075 1.64 5.95249134364382 0.164 4.29902152596498 1.6605 5.95249134364382 0.697 5.62179738010805 0.1845 3.96832756242921 1.681 5.62179738010805 0.7175 3.63763359889344 1.7015 5.29110341657228 0.205 0.330693963535768 1.4555 5.29110341657228 0.738 4.96040945303652 0.2255 3.30693963535768 1.722 4.96040945303652 0.7585 4.62971548950075 0.246 4.62971548950075 0.779 5.95249134364382 1.1275 4.29902152596498 0.2665 2.97624567182191 1.7425 3.96832756242921 0.287 3.63763359889344 0.3075 3.30693963535768 0.328 2.97624567182191 0.3485 5.95249134364382 1.5785 5.95249134364382 0.1845 5.95249134364382 0.7175 166 167 168 169 170 171 169 172 170 166 173 167 174 175 176 177 178 172 179 180 173 177 181 178 174 176 182 179 183 180 184 185 175 186 187 188 189 190 183 186 188 181 189 191 190 184 192 185 193 194 195 196 197 198 193 195 187 199 200 191 199 201 200 202 203 204 196 198 192 205 206 194 205 207 206 208 209 197 202 204 201 210 211 212 213 130 214 215 216 217 218 219 220 215 217 207 218 221 93 208 222 209 218 220 221 210 212 203 223 224 219 225 226 216 225 227 226 223 228 224 229 230 222 231 232 233 231 233 211 229 234 230 235 236 234 237 238 239 237 239 228 240 241 227 240 242 241 243 244 238 245 246 232 235 247 236 243 248 244 245 249 246 250 251 247 250 252 251 253 254 248 253 255 254 256 94 242 257 258 249 259 260 261 257 262 258 259 261 252 263 264 255 263 265 264 266 267 265 268 269 270 271 272 92 266 273 267 271 274 272 271 275 274 276 277 278 268 270 262 279 280 281 282 283 284 282 284 269 279 281 273 285 130 260 286 287 93 288 289 280 276 278 275 286 290 291 292 293 277 288 294 289 286 291 287 295 296 297 298 299 294 295 297 290 298 300 299 292 301 293 302 303 304 305 306 301 302 304 283 307 308 296 309 310 303 307 311 308 312 313 311 314 315 316 305 317 306 312 318 313 314 316 300 319 320 317 321 322 323 309 324 310 319 325 320 321 323 318 326 327 328 329 330 331 329 331 315 332 333 322 334 335 330 334 336 335 326 328 325 332 337 333 338 339 340 338 340 327 341 342 339 341 343 342 344 345 337 344 346 345 347 348 349 347 349 336 350 351 352 350 352 346 353 169 171 353 171 343 354 130 324 355 172 169 356 182 351 355 177 172 357 358 359 360 361 348 360 362 361 357 359 92 356 174 182 357 363 358 364 184 175 365 181 177 364 175 174 366 367 363 365 186 181 366 368 367 369 193 187 370 371 372 369 187 186 373 374 368 375 196 192 373 376 374 377 194 193 377 205 194 370 372 362 375 192 184 378 213 214 379 168 376 379 166 168 380 215 207 381 179 173 382 208 197 380 207 205 383 216 215 381 173 166 384 183 179 384 189 183 383 225 216 382 197 196 385 227 225 385 240 227 386 191 189 386 199 191 387 222 208 378 214 371 387 229 222 388 235 234 389 201 199 390 130 213 391 242 240 391 256 242 388 234 229 389 202 201 392 250 247 393 210 203 392 247 235 394 94 256 393 203 202 395 211 210 395 231 211 396 259 252 397 218 93 397 223 219 398 275 271 397 219 218 398 271 92 396 252 250 398 276 275 399 237 228 399 228 223 400 232 231 400 245 232 401 260 259 402 277 276 402 292 277 401 285 260 403 238 237 403 243 238 404 301 292 405 248 243 404 305 301 405 253 248 406 130 285 407 257 249 407 249 245 408 290 286 408 286 93 408 295 290 409 317 305 410 255 253 409 319 317 411 307 296 410 263 255 411 296 295 412 262 257 413 266 265 413 265 263 414 312 311 412 268 262 414 311 307 415 325 319 416 273 266 415 326 325 417 282 269 416 279 273 418 318 312 418 321 318 419 280 279 420 327 326 417 269 268 419 288 280 421 332 322 420 338 327 422 283 282 421 322 321 423 294 288 424 344 337 423 298 294 425 341 339 425 339 338 422 302 283 426 343 341 427 303 302 428 300 298 424 337 332 428 314 300 429 346 344 429 350 346 426 353 343 427 309 303 430 329 315 430 315 314 431 355 169 431 169 353 432 354 324 433 351 350 434 177 355 433 356 351 434 365 177 435 330 329 435 334 330 436 364 174 437 186 365 436 174 356 438 347 336 437 369 186 432 324 309 439 377 193 439 193 369 438 336 334 440 348 347 441 205 377 441 380 205 442 184 364 442 375 184 443 215 380 444 382 196 443 383 215 440 360 348 445 370 362 444 196 375 446 225 383 447 130 354 446 385 225 448 387 208 449 357 92 449 366 363 450 240 385 445 362 360 450 391 240 448 208 382 451 394 256 452 229 387 453 378 371 449 363 357 453 371 370 454 368 366 451 256 391 454 373 368 452 388 229 455 392 235 455 235 388 456 376 373 456 379 376 457 390 213 458 250 392 458 396 250 459 94 394 460 166 379 461 398 92 460 381 166 461 402 276 462 401 259 463 179 381 461 276 398 463 384 179 464 404 292 464 292 402 462 259 396 457 213 378 465 285 401 466 386 189 466 189 384 467 305 404 467 409 305 468 199 386 468 389 199 465 406 285 469 319 409 469 415 319 470 393 202 470 202 389 471 130 406 472 295 408 473 130 390 472 408 93 472 411 295 474 307 411 475 420 326 474 414 307 476 397 93 476 399 223 476 223 397 477 418 312 475 326 415 478 395 210 478 210 393 477 312 414 479 338 420 480 231 395 480 400 231 481 237 399 482 321 418 481 403 237 479 425 338 482 421 321 483 405 243 484 341 425 483 243 403 485 332 421 484 426 341 485 424 332 486 253 405 487 431 353 486 410 253 488 429 344 487 353 426 489 245 400 489 407 245 490 413 263 491 7 6 491 8 7 491 9 8 490 263 410 492 355 431 491 10 9 491 11 10 491 12 11 492 434 355 491 13 12 488 344 424 493 266 413 491 257 407 494 433 350 493 416 266 491 412 257 495 437 365 495 365 434 496 279 416 496 419 279 494 350 429 497 268 412 498 423 288 499 439 369 497 417 268 500 356 433 498 288 419 499 369 437 501 282 417 500 436 356 501 422 282 502 298 423 503 441 377 502 428 298 504 314 428 503 377 439 504 430 314 505 364 436 506 427 302 506 302 422 507 443 380 508 329 430 507 380 441 505 442 364 509 383 443 509 446 383 508 435 329 510 334 435 511 309 427 512 375 442 512 444 375 511 432 309 513 385 446 513 450 385 510 438 334 514 382 444 514 448 382 515 391 450 516 347 438 515 451 391 517 452 387 517 387 448 518 394 451 518 459 394 516 440 347 519 445 360 520 455 388 520 388 452 521 447 354 522 458 392 522 392 455 521 354 432 523 94 459 519 360 440 524 464 402 524 461 92 524 402 461 525 396 458 526 467 404 525 462 396 527 465 401 528 453 370 528 370 445 529 457 378 526 404 464 527 401 462 530 469 409 530 409 467 531 130 447 532 406 465 532 471 406 529 378 453 533 475 415 534 449 92 534 454 366 534 366 449 535 130 471 533 415 469 536 474 411 536 472 93 536 411 472 537 420 475 537 479 420 538 414 474 539 456 373 539 373 454 538 477 414 540 390 457 541 425 479 541 484 425 542 482 418 543 379 456 542 418 477 543 460 379 540 473 390 544 381 460 545 485 421 546 426 484 544 463 381 546 487 426 545 421 482 547 488 424 548 384 463 548 466 384 549 431 487 549 492 431 547 424 485 550 429 488 551 468 386 552 495 434 552 434 492 553 130 473 554 399 476 554 481 399 555 437 495 551 386 466 550 494 429 556 500 433 554 476 93 555 499 437 557 470 389 557 389 468 556 433 494 558 393 470 559 403 481 560 439 499 559 483 403 560 503 439 561 405 483 558 478 393 562 436 500 561 486 405 563 410 486 562 505 436 564 441 503 564 507 441 563 490 410 565 395 478 566 413 490 567 442 505 565 480 395 566 493 413 567 512 442 568 509 443 568 443 507 569 416 493 570 489 400 569 496 416 571 446 509 571 513 446 570 400 480 572 444 512 573 419 496 574 14 13 573 498 419 574 15 14 575 515 450 574 16 15 574 17 16 574 18 17 574 19 18 574 491 407 576 502 423 574 13 491 572 514 444 576 423 498 575 450 513 574 407 489 577 451 515 578 3 1 577 518 451 578 4 3 578 5 4 578 6 5 578 497 412 579 428 502 578 412 491 579 504 428 580 448 514 581 459 518 580 517 448 578 41 40 582 452 517 578 42 41 578 1 42 578 491 6 583 501 417 581 523 459 584 430 504 582 520 452 584 508 430 585 522 455 586 510 435 583 417 497 586 435 508 587 94 523 588 506 422 585 455 520 588 422 501 589 458 522 590 516 438 591 526 464 592 427 506 590 438 510 589 525 458 591 524 92 593 462 525 591 464 524 593 527 462 592 511 427 594 440 516 595 530 467 596 432 511 597 532 465 595 467 526 598 533 469 596 521 432 597 465 527 598 469 530 594 519 440 599 445 519 600 471 532 600 535 471 601 537 475 602 131 130 602 132 131 602 133 132 602 130 535 601 475 533 603 536 93 604 479 537 603 538 474 605 447 521 599 528 445 603 474 536 604 541 479 606 529 453 605 531 447 607 477 538 606 453 528 607 542 477 608 484 541 609 545 482 608 546 484 609 482 542 610 485 545 610 547 485 611 540 457 612 549 487 611 457 529 613 488 547 612 487 546 613 550 488 614 552 492 614 492 549 615 556 494 616 555 495 617 130 531 615 494 550 616 495 552 618 499 555 619 562 500 618 560 499 619 500 556 620 534 92 620 539 454 621 503 560 622 553 473 622 473 540 621 564 503 620 454 534 623 507 564 624 505 562 625 456 539 625 543 456 626 130 553 623 568 507 624 567 505 627 512 567 628 509 568 629 460 543 629 544 460 628 571 509 627 572 512 630 481 554 631 548 463 632 513 571 632 575 513 630 554 93 630 559 481 633 483 559 631 463 544 634 514 572 635 515 575 634 580 514 633 561 483 635 577 515 636 582 517 637 466 548 637 551 466 638 486 561 639 581 518 638 563 486 640 557 468 639 518 577 636 517 580 641 490 563 640 468 551 641 566 490 642 558 470 643 523 581 644 493 566 643 587 523 644 569 493 645 520 582 645 585 520 642 470 557 646 522 585 647 573 496 647 496 569 646 589 522 648 478 558 648 565 478 649 498 573 650 94 587 651 593 525 652 480 565 649 576 498 653 526 591 654 579 502 653 591 92 651 525 589 653 595 526 655 527 593 655 597 527 652 570 480 654 502 576 656 20 19 657 504 579 656 21 20 656 19 574 656 22 21 656 23 22 656 24 23 657 584 504 658 530 595 658 598 530 656 489 570 659 532 597 660 508 584 656 574 489 659 600 532 660 586 508 661 583 497 661 497 578 662 533 598 663 134 133 663 135 134 662 601 533 663 133 602 663 535 600 664 510 586 661 38 37 663 602 535 661 39 38 665 603 93 661 40 39 661 578 40 665 538 603 666 537 601 665 607 538 667 609 542 666 604 537 664 590 510 668 501 583 669 541 604 667 542 607 668 588 501 670 610 545 671 516 590 669 608 541 670 545 609 672 592 506 673 613 547 672 506 588 674 546 608 671 594 516 674 612 546 673 547 610 675 550 613 676 596 511 677 549 612 675 615 550 676 511 592 677 614 549 678 599 519 679 556 615 678 519 594 679 619 556 680 552 614 681 528 599 680 616 552 682 605 521 682 521 596 683 617 531 684 555 616 684 618 555 685 562 619 681 606 528 686 560 618 687 529 606 686 621 560 685 624 562 688 567 624 688 627 567 687 611 529 689 564 621 689 623 564 690 622 540 690 540 611 691 634 572 683 531 605 692 568 623 692 628 568 691 572 627 693 636 580 694 632 571 695 553 622 694 571 628 696 130 617 697 575 632 693 580 634 698 582 636 697 635 575 699 577 635 698 645 582 695 626 553 699 639 577 700 643 581 701 585 645 700 581 639 702 587 643 701 646 585 703 589 646 703 651 589 704 620 92 704 625 539 702 650 587 704 539 620 705 629 543 706 130 626 707 655 593 705 543 625 707 593 651 708 633 559 708 630 93 709 544 629 710 94 650 709 631 544 708 559 630 711 595 653 712 659 597 713 638 561 712 597 655 713 561 633 714 135 663 715 548 631 714 136 135 715 637 548 714 137 136 711 658 595 711 653 92 714 600 659 716 563 638 714 663 600 717 607 665 717 667 607 718 662 598 719 551 637 718 598 658 716 641 563 717 665 93 719 640 551 720 609 667 721 644 566 720 670 609 721 566 641 722 601 662 723 642 557 724 569 644 725 610 670 724 647 569 725 673 610 722 666 601 723 557 640 726 648 558 727 573 647 728 675 613 727 649 573 729 604 666 726 558 642 729 669 604 728 613 673 730 565 648 731 615 675 732 576 649 733 608 669 732 654 576 733 674 608 731 679 615 734 579 654 730 652 565 734 657 579 735 570 652 736 612 674 735 656 570 737 660 584 736 677 612 738 619 679 737 584 657 739 24 656 738 685 619 740 664 586 739 25 24 741 614 677 740 586 660 739 2 25 739 26 2 739 27 26 739 28 27 741 680 614 742 688 624 739 29 28 739 30 29 742 624 685 743 616 680 744 590 664 744 671 590 745 661 37 743 684 616 745 32 31 746 686 618 745 33 32 745 34 33 746 618 684 745 35 34 745 36 35 745 37 36 747 627 688 747 691 627 748 678 594 749 621 686 748 594 671 750 634 691 749 689 621 751 668 583 751 583 661 750 693 634 752 623 689 753 599 678 752 692 623 754 672 588 753 681 599 754 588 668 755 592 672 756 636 693 756 698 636 757 628 692 755 676 592 757 694 628 758 701 645 759 596 676 760 687 606 761 697 632 758 645 698 760 606 681 761 632 694 759 682 596 762 703 646 763 605 682 764 635 697 764 699 635 762 646 701 765 639 699 766 690 611 763 683 605 765 700 639 767 651 703 767 707 651 768 643 700 769 655 707 768 702 643 769 712 655 770 138 137 770 139 138 766 611 687 771 617 683 772 695 622 770 659 712 770 137 714 770 714 659 773 667 717 774 650 702 773 720 667 774 710 650 773 717 93 772 622 690 775 725 670 775 670 720 776 673 725 771 696 617 776 728 673 777 94 710 778 658 711 778 718 658 779 731 675 779 675 728 778 711 92 780 679 731 781 722 662 782 626 695 782 706 626 781 662 718 780 738 679 783 742 685 784 729 666 784 666 722 785 130 696 783 685 738 786 747 688 787 704 92 787 625 704 788 130 706 789 733 669 789 669 729 790 708 93 790 713 633 790 633 708 787 705 625 786 688 742 791 716 638 792 629 705 793 674 733 792 709 629 791 638 713 794 750 691 793 736 674 794 691 747 795 631 709 796 677 736 795 715 631 797 721 641 797 641 716 796 741 677 798 693 750 799 637 715 800 724 644 800 644 721 799 719 637 798 756 693 801 727 647 802 680 741 803 758 698 804 640 719 801 647 724 802 743 680 804 723 640 803 698 756 805 649 727 806 642 723 807 684 743 807 746 684 805 732 649 808 762 701 809 734 654 806 726 642 810 686 746 810 749 686 811 730 648 809 654 732 811 648 726 808 701 758 812 703 762 813 657 734 813 737 657 814 652 730 815 752 689 814 735 652 815 689 749 812 767 703 816 757 692 817 740 660 818 769 707 819 656 735 817 660 737 819 739 656 816 692 752 818 707 767 820 761 694 821 139 770 820 694 757 821 770 712 821 140 139 822 31 30 822 30 739 822 745 31 821 712 769 823 720 773 824 664 740 825 697 761 824 744 664 825 764 697 823 773 93 823 775 720 826 748 671 827 661 745 828 725 775 827 751 661 829 699 764 828 776 725 829 765 699 830 728 776 830 779 728 831 668 751 826 671 744 832 678 748 831 754 668 833 700 765 834 731 779 833 768 700 834 780 731 835 672 754 835 755 672 836 783 738 836 738 780 832 753 678 837 760 681 838 759 676 839 774 702 838 676 755 839 702 768 840 763 682 841 710 774 841 777 710 840 682 759 837 681 753 842 786 742 843 687 760 843 766 687 842 742 783 844 794 747 844 747 786 845 94 777 846 771 683 846 683 763 847 785 696 848 750 794 849 690 766 849 772 690 850 778 92 850 718 778 850 781 718 848 798 750 847 696 771 851 803 756 851 756 798 852 784 722 853 782 695 853 695 772 852 722 781 854 758 803 855 789 729 855 729 784 856 94 95 854 808 758 856 95 96 856 96 97 857 762 808 858 788 706 859 733 789 860 130 785 859 793 733 861 856 97 857 812 762 862 736 793 863 767 812 863 818 767 861 97 98 861 98 99 862 796 736 864 141 140 865 741 796 864 142 141 864 769 818 858 706 782 864 821 769 866 130 788 864 140 821 865 802 741 867 828 775 867 775 823 868 743 802 868 807 743 867 823 93 869 830 776 869 776 828 870 94 856 871 792 705 872 834 779 873 810 746 871 787 92 871 705 787 872 779 830 874 861 99 873 746 807 874 99 100 874 100 101 875 795 709 875 709 792 876 713 790 877 749 810 878 836 780 876 790 93 877 815 749 876 791 713 878 780 834 879 870 856 880 799 715 881 716 791 879 856 861 881 797 716 882 752 815 883 94 870 880 715 795 882 816 752 884 783 836 885 800 721 885 721 797 886 719 799 886 804 719 884 842 783 887 724 800 888 757 816 887 801 724 888 820 757 889 844 786 890 723 804 889 786 842 890 806 723 891 727 801 892 102 103 893 761 820 891 805 727 894 726 806 895 848 794 894 811 726 893 825 761 896 732 805 896 809 732 892 874 101 892 101 102 897 829 764 898 730 811 897 764 825 895 794 844 899 734 809 900 833 765 900 765 829 901 879 861 899 813 734 898 814 730 901 861 874 902 870 879 903 735 814 904 737 813 903 819 735 905 798 848 904 817 737 905 851 798 906 768 833 907 803 851 902 883 870 907 854 803 908 822 739 906 839 768 909 824 740 909 740 817 908 739 819 910 857 808 910 808 854 911 827 745 912 774 839 912 841 774 911 745 822 913 826 744 914 94 883 915 751 827 916 863 812 917 103 104 918 777 841 913 744 824 918 845 777 915 831 751 917 892 103 916 812 857 919 832 748 919 748 826 920 754 831 921 864 818 921 143 142 921 144 143 922 874 892 921 818 863 920 835 754 921 142 864 923 867 93 924 755 835 925 94 845 923 869 828 923 828 867 922 901 874 924 838 755 926 902 879 927 872 830 928 840 759 926 879 901 929 781 850 927 830 869 928 759 838 930 753 832 929 850 92 929 852 781 931 878 834 930 837 753 932 914 883 932 883 902 933 763 840 933 846 763 931 834 872 934 836 878 935 784 852 936 843 760 935 855 784 936 760 837 934 884 836 937 789 855 938 842 884 939 94 914 937 859 789 940 847 771 941 793 859 938 889 842 940 771 846 941 862 793 942 104 105 943 844 889 942 105 106 944 766 843 944 849 766 945 865 796 942 917 104 943 895 844 945 796 862 946 922 892 947 905 848 946 892 917 948 868 802 947 848 895 948 802 865 949 853 772 950 907 851 949 772 849 951 901 922 952 807 868 950 851 905 952 873 807 953 782 853 951 926 901 954 902 926 955 854 907 955 910 854 956 860 785 954 932 902 956 785 847 957 810 873 957 877 810 953 858 782 958 914 932 959 788 858 960 916 857 958 939 914 960 857 910 961 130 860 962 815 877 963 863 916 962 882 815 963 921 863 964 888 816 963 145 144 963 146 145 963 144 921 964 816 882 965 869 923 965 923 93 965 927 869 966 94 939 967 893 820 967 820 888 968 872 927 968 931 872 959 866 788 969 825 893 970 878 931 971 106 107 970 934 878 971 107 108 972 871 92 969 897 825 971 942 106 972 792 871 972 875 792 973 938 884 974 900 829 975 946 917 974 829 897 975 917 942 976 795 875 977 130 866 978 791 876 976 880 795 979 833 900 973 884 934 978 876 93 979 906 833 978 881 791 980 922 946 981 799 880 982 943 889 980 951 922 983 797 881 983 885 797 981 886 799 982 889 938 984 926 951 985 839 906 984 954 926 986 947 895 987 800 885 988 804 886 988 890 804 986 895 943 987 887 800 985 912 839 989 894 806 990 801 887 991 958 932 992 841 912 990 891 801 989 806 890 992 918 841 993 905 947 993 950 905 991 932 954 994 898 811 994 811 894 995 896 805 996 939 958 996 966 939 997 845 918 995 805 891 997 925 845 998 955 907 999 814 898 999 903 814 1000 899 809 1000 809 896 998 907 950 1001 904 813 1002 908 819 1002 819 903 1001 813 899 1003 94 925 1004 910 955 1004 960 910 1005 963 916 1006 852 929 1005 147 146 1007 909 817 1008 822 908 1005 916 960 1007 817 904 1005 148 147 1006 935 852 1008 911 822 1009 94 966 1010 824 909 1005 146 963 1011 968 927 1012 108 109 1011 965 93 1010 913 824 1006 929 92 1012 109 110 1011 927 965 1012 971 108 1013 915 827 1013 827 911 1014 931 968 1015 919 826 1014 970 931 1016 855 935 1016 937 855 1017 920 831 1018 942 971 1019 941 859 1017 831 915 1020 934 970 1015 826 913 1019 859 937 1018 975 942 1020 973 934 1021 980 946 1022 930 832 1022 832 919 1023 835 920 1023 924 835 1024 945 862 1021 946 975 1025 838 924 1026 938 973 1027 951 980 1024 862 941 1025 928 838 1026 982 938 1028 865 945 1027 984 951 1029 986 943 1030 954 984 1029 943 982 1028 948 865 1031 840 928 1031 933 840 1030 991 954 1032 947 986 1033 846 933 1034 952 868 1034 868 948 1033 940 846 1035 996 958 1036 837 930 1036 936 837 1032 993 947 1035 958 991 1037 998 950 1038 847 940 1039 873 952 1039 957 873 1037 950 993 1040 955 998 1041 966 996 1041 1009 966 1042 877 957 1043 843 936 1042 962 877 1043 944 843 1040 1004 955 1044 949 849 1038 956 847 1045 148 1005 1045 960 1004 1045 1005 960 1045 149 148 1045 150 149 1046 964 882 1046 882 962 1047 1011 93 1047 1014 968 1048 888 964 1049 961 860 1047 968 1011 1044 849 944 1050 94 1009 1051 970 1014 1052 953 853 1048 967 888 1053 110 111 1053 111 112 1051 1020 970 1049 860 956 1053 1012 110 1054 1026 973 1055 893 967 1055 969 893 1052 853 949 1054 973 1020 1056 897 969 1057 971 1012 1058 1029 982 1059 858 953 1056 974 897 1059 959 858 1057 1018 971 1060 975 1018 1060 1021 975 1058 982 1026 1061 130 961 1062 979 900 1063 986 1029 1062 900 974 1064 980 1021 1065 866 959 1065 977 866 1063 1032 986 1066 906 979 1067 993 1032 1066 985 906 1064 1027 980 1068 984 1027 1067 1037 993 1069 912 985 1069 992 912 1070 998 1037 1068 1030 984 1071 991 1030 1070 1040 998 1072 918 992 1073 1045 1004 1072 997 918 1073 150 1045 1071 1035 991 1073 151 150 1074 875 972 1073 152 151 1075 996 1035 1074 976 875 1073 1004 1040 1074 972 92 1076 1047 93 1076 1014 1047 1075 1041 996 1077 925 997 1078 880 976 1077 1003 925 1076 1051 1014 1079 1050 1009 1080 1020 1051 1078 981 880 1079 1009 1041 1081 130 977 1082 881 978 1082 983 881 1083 886 981 1080 1054 1020 1084 1058 1026 1082 978 93 1084 1026 1054 1083 988 886 1085 94 1003 1086 989 890 1087 885 983 1086 890 988 1087 987 885 1088 1063 1029 1089 887 987 1088 1029 1058 1089 990 887 1090 1016 935 1091 94 1050 1090 935 1006 1092 894 989 1092 994 894 1090 1006 92 1093 112 113 1094 891 990 1093 113 114 1095 1067 1032 1096 898 994 1094 995 891 1096 999 898 1097 1019 937 1093 1053 112 1097 937 1016 1095 1032 1063 1098 896 995 1098 1000 896 1099 1070 1037 1100 1057 1012 1100 1012 1053 1101 903 999 1101 1002 903 1102 941 1019 1102 1024 941 1099 1037 1067 1103 899 1000 1103 1001 899 1104 152 1073 1105 1018 1057 1104 153 152 1106 908 1002 1104 154 153 1107 1007 904 1106 1008 908 1104 1073 1040 1107 904 1001 1108 1028 945 1104 1040 1070 1108 945 1024 1109 1076 93 1105 1060 1018 1109 1080 1051 1110 1064 1021 1109 1051 1076 1111 911 1008 1111 1013 911 1112 1010 909 1113 948 1028 1110 1021 1060 1114 1084 1054 1112 909 1007 1113 1034 948 1114 1054 1080 1115 915 1013 1116 1039 952 1115 1017 915 1117 1088 1058 1118 1015 913 1116 952 1034 1119 1027 1064 1119 1068 1027 1118 913 1010 1117 1058 1084 1120 1023 920 1121 1071 1030 1122 957 1039 1121 1030 1068 1123 1022 919 1124 1063 1088 1123 919 1015 1124 1095 1063 1120 920 1017 1122 1042 957 1125 1075 1035 1126 924 1023 1126 1025 924 1127 1046 962 1125 1035 1071 1128 928 1025 1128 1031 928 1129 1067 1095 1127 962 1042 1129 1099 1067 1130 155 154 1130 156 155 1131 1033 933 1132 1041 1075 1130 1070 1099 1132 1079 1041 1133 1048 964 1130 154 1104 1134 1036 930 1133 964 1046 1130 1104 1070 1135 1080 1109 1134 930 1022 1136 967 1048 1135 1109 93 1131 933 1031 1135 1114 1080 1137 940 1033 1138 1091 1050 1137 1038 940 1136 1055 967 1138 1050 1079 1139 1056 969 1139 969 1055 1140 1084 1114 1140 1117 1084 1141 936 1036 1141 1043 936 1142 974 1056 1143 956 1038 1142 1062 974 1144 1124 1088 1144 1088 1117 1145 1129 1095 1146 94 1091 1147 1066 979 1148 944 1043 1149 114 115 1148 1044 944 1149 115 116 1145 1095 1124 1143 1049 956 1147 979 1062 1150 1061 961 1151 1130 1099 1149 1093 114 1151 156 1130 1151 157 156 1152 985 1066 1151 1099 1129 1152 1069 985 1153 1053 1093 1153 1100 1053 1154 1140 1114 1154 1114 1135 1155 1052 949 1154 1135 93 1155 949 1044 1156 1117 1140 1157 1072 992 1158 1105 1057 1159 1059 953 1157 992 1069 1159 953 1052 1158 1057 1100 1156 1144 1117 1160 997 1072 1160 1077 997 1161 1060 1105 1162 1145 1124 1161 1110 1060 1163 959 1059 1162 1124 1144 1164 157 1151 1150 961 1049 1164 1151 1129 1165 1003 1077 1164 158 157 1165 1085 1003 1164 1129 1145 1166 1119 1064 1164 159 158 1166 1064 1110 1167 1156 1140 1163 1065 959 1167 1154 93 1168 1081 977 1169 1121 1068 1168 977 1065 1167 1140 1154 1170 1144 1156 1170 1162 1144 1169 1068 1119 1171 94 1085 1172 1125 1071 1173 1145 1162 1173 1164 1145 1173 159 1164 1174 1090 92 1172 1071 1121 1173 160 159 1174 1097 1016 1173 161 160 1175 1170 1156 1176 1132 1075 1175 1167 93 1174 1016 1090 1176 1075 1125 1175 1156 1167 1177 130 1061 1178 1102 1019 1179 1173 1162 1180 1078 976 1179 1162 1170 1180 1074 92 1178 1019 1097 1179 161 1173 1180 976 1074 1181 130 1081 1179 162 161 1179 163 162 1182 1138 1079 1182 1079 1132 1183 1170 1175 1183 1175 93 1183 1179 1170 1183 163 1179 1184 981 1078 1185 1024 1102 1183 164 163 1183 165 164 1183 93 165 1184 1083 981 1185 1108 1024 1186 1146 1091 1187 983 1082 1187 1087 983 1188 1086 988 1187 1082 93 1189 1028 1108 1186 1091 1138 1188 988 1083 1190 987 1087 1189 1113 1028 1190 1089 987 1191 989 1086 1191 1092 989 1192 1034 1113 1193 990 1089 1192 1116 1034 1193 1094 990 1194 1096 994 1195 94 1146 1196 116 117 1197 1039 1116 1196 117 118 1194 994 1092 1196 1149 116 1198 995 1094 1199 1101 999 1198 1098 995 1199 999 1096 1200 1103 1000 1197 1122 1039 1201 1042 1122 1202 1153 1093 1202 1093 1149 1200 1000 1098 1203 1106 1002 1204 1107 1001 1201 1127 1042 1203 1002 1101 1205 1158 1100 1204 1001 1103 1205 1100 1153 1206 1112 1007 1207 1008 1106 1208 1133 1046 1207 1111 1008 1208 1046 1127 1206 1007 1107 1209 1048 1133 1210 1010 1112 1209 1136 1048 1210 1118 1010 1211 1105 1158 1212 1115 1013 1212 1013 1111 1211 1161 1105 1213 1110 1161 1214 1139 1055 1213 1166 1110 1215 1123 1015 1214 1055 1136 1215 1015 1118 1216 1017 1115 1216 1120 1017 1217 1056 1139 1218 1169 1119 1217 1142 1056 1219 1023 1120 1219 1126 1023 1218 1119 1166 1220 1121 1169 1220 1172 1121 1221 1022 1123 1222 1128 1025 1223 1062 1142 1222 1025 1126 1223 1147 1062 1221 1134 1022 1224 1031 1128 1225 1036 1134 1226 1176 1125 1224 1131 1031 1225 1141 1036 1227 1152 1066 1227 1066 1147 1228 1033 1131 1226 1125 1172 1228 1137 1033 1229 1132 1176 1230 1069 1152 1230 1157 1069 1231 1043 1141 1229 1182 1132 1232 1186 1138 1233 1038 1137 1231 1148 1043 1233 1143 1038 1234 1160 1072 1234 1072 1157 1232 1138 1182 1235 1049 1143 1236 1146 1186 1237 1077 1160 1238 1044 1148 1235 1150 1049 1237 1165 1077 1236 1195 1146 1239 1085 1165 1239 1171 1085 1238 1155 1044 1240 1052 1155 1240 1159 1052 1241 1061 1150 1242 94 1195 1243 118 119 1243 119 120 1244 94 1171 1243 1196 118 1245 1097 1174 1245 1174 92 1246 1149 1196 1246 1202 1149 1241 1177 1061 1245 1178 1097 1247 1059 1159 1247 1163 1059 1248 1102 1178 1249 66 65 1249 1153 1202 1248 1185 1102 1249 1205 1153 1250 1158 1205 1250 1211 1158 1251 130 1177 1252 1108 1185 1252 1189 1108 1250 62 61 1253 1168 1065 1254 1192 1113 1255 1213 1161 1253 1065 1163 1254 1113 1189 1255 1161 1211 1256 1116 1192 1257 1166 1213 1257 1218 1166 1256 1197 1116 1258 1169 1218 1259 1081 1168 1260 1122 1197 1260 1201 1122 1258 1220 1169 1259 1181 1081 1261 1172 1220 1262 1127 1201 1263 1180 92 1262 1208 1127 1263 1078 1180 1263 1184 1078 1261 1226 1172 1264 1176 1226 1265 1083 1184 1264 1229 1176 1266 130 1181 1265 1188 1083 1267 1209 1133 1267 1133 1208 1268 1087 1187 1268 1190 1087 1268 1187 93 1269 1191 1086 1270 1193 1089 1269 1086 1188 1271 1182 1229 1272 1136 1209 1271 1232 1182 1270 1089 1190 1272 1214 1136 1273 1194 1092 1274 1094 1193 1275 1139 1214 1276 1186 1232 1274 1198 1094 1273 1092 1191 1277 1096 1194 1278 1098 1198 1275 1217 1139 1276 1236 1186 1278 1200 1098 1277 1199 1096 1279 1142 1217 1280 1242 1195 1280 1195 1236 1281 1101 1199 1282 1103 1200 1281 1203 1101 1282 1204 1103 1279 1223 1142 1283 94 1242 1284 1106 1203 1285 1147 1223 1286 1107 1204 1284 1207 1106 1286 1206 1107 1285 1227 1147 1287 1112 1206 1288 1212 1111 1287 1210 1112 1289 1152 1227 1288 1111 1207 1289 1230 1152 1290 120 121 1291 1216 1115 1292 1118 1210 1293 1157 1230 1292 1215 1118 1291 1115 1212 1290 1243 120 1294 1221 1123 1293 1234 1157 1295 1196 1243 1294 1123 1215 1295 1246 1196 1296 1219 1120 1296 1120 1216 1297 1237 1160 1295 69 68 1295 70 69 1295 68 1246 1298 1202 1246 1297 1160 1234 1298 67 66 1298 68 67 1298 1246 68 1299 1222 1126 1298 66 1249 1300 1134 1221 1298 1249 1202 1300 1225 1134 1301 1205 1249 1301 1250 1205 1299 1126 1219 1301 1249 65 1302 1165 1237 1301 63 62 1303 1224 1128 1301 64 63 1302 1239 1165 1301 65 64 1301 62 1250 1304 1255 1211 1303 1128 1222 1304 1211 1250 1305 1231 1141 1304 1250 61 1306 1171 1239 1307 1228 1131 1306 1244 1171 1307 1131 1224 1308 1213 1255 1308 1257 1213 1305 1141 1225 1309 1233 1137 1310 1218 1257 1310 1258 1218 1311 1148 1231 1312 94 1244 1309 1137 1228 1313 1248 1178 1314 1235 1143 1314 1143 1233 1313 1178 1245 1315 1261 1220 1315 1220 1258 1311 1238 1148 1316 1264 1226 1313 1245 92 1316 1226 1261 1317 1155 1238 1317 1240 1155 1318 1185 1248 1318 1252 1185 1319 1150 1235 1320 1254 1189 1319 1241 1150 1320 1189 1252 1321 1271 1229 1321 1229 1264 1322 1177 1241 1323 1192 1254 1324 1232 1271 1322 1251 1177 1324 1276 1232 1323 1256 1192 1325 1159 1240 1325 1247 1159 1326 1260 1197 1327 1163 1247 1326 1197 1256 1328 1236 1276 1328 1280 1236 1329 1242 1280 1330 1262 1201 1327 1253 1163 1330 1201 1260 1329 1283 1242 1331 1267 1208 1331 1208 1262 1332 1209 1267 1333 1168 1253 1332 1272 1209 1333 1259 1168 1334 1266 1181 1334 1181 1259 1335 94 1283 1336 121 122 1336 122 123 1336 1290 121 1337 1214 1272 1337 1275 1214 1338 1279 1217 1339 70 1295 1339 1295 1243 1340 130 1266 1339 1243 1290 1341 130 1251 1339 71 70 1338 1217 1275 1339 72 71 1339 44 72 1339 73 44 1342 1304 61 1342 58 1304 1342 59 58 1343 1285 1223 1342 60 59 1342 61 60 1343 1223 1279 1344 1184 1263 1345 1304 58 1344 1263 92 1344 1265 1184 1345 1255 1304 1345 1308 1255 1346 1190 1268 1347 1227 1285 1346 1268 93 1347 1289 1227 1346 1270 1190 1348 1269 1188 1349 1257 1308 1348 1188 1265 1350 1193 1270 1349 1310 1257 1351 1230 1289 1351 1293 1230 1352 1191 1269 1353 1315 1258 1350 1274 1193 1352 1273 1191 1354 1278 1198 1353 1258 1310 1354 1198 1274 1355 1194 1273 1356 1234 1293 1357 1200 1278 1355 1277 1194 1356 1297 1234 1357 1282 1200 1358 1261 1315 1359 1204 1282 1360 1199 1277 1361 1237 1297 1358 1316 1261 1360 1281 1199 1362 1264 1316 1361 1302 1237 1362 1321 1264 1359 1286 1204 1363 1206 1286 1364 1284 1203 1364 1203 1281 1365 1239 1302 1366 1271 1321 1365 1306 1239 1366 1324 1271 1363 1287 1206 1367 1210 1287 1367 1292 1210 1368 1207 1284 1368 1288 1207 1369 1244 1306 1369 1312 1244 1370 1328 1276 1371 1212 1288 1370 1276 1324 1372 1294 1215 1371 1291 1212 1372 1215 1292 1373 1296 1216 1374 1329 1280 1373 1216 1291 1374 1280 1328 1375 94 1312 1376 1299 1219 1377 1221 1294 1377 1300 1221 1378 1318 1248 1378 1248 1313 1379 1283 1329 1380 1225 1300 1379 1335 1283 1380 1305 1225 1376 1219 1296 1381 1303 1222 1378 1313 92 1382 1252 1318 1382 1320 1252 1381 1222 1299 1383 1231 1305 1384 1307 1224 1385 1323 1254 1384 1224 1303 1386 1228 1307 1385 1254 1320 1386 1309 1228 1387 94 1335 1388 123 124 1388 124 125 1389 1256 1323 1388 1336 123 1383 1311 1231 1390 1233 1309 1389 1326 1256 1391 1238 1311 1390 1314 1233 1391 1317 1238 1392 1339 1290 1393 1260 1326 1392 1290 1336 1393 1330 1260 1392 73 1339 1392 74 73 1392 75 74 1394 1319 1235 1394 1235 1314 1395 1345 58 1396 1331 1262 1395 57 56 1395 58 57 1397 1240 1317 1398 1308 1345 1396 1262 1330 1398 1349 1308 1399 1267 1331 1399 1332 1267 1397 1325 1240 1400 1310 1349 1401 1272 1332 1402 1247 1325 1400 1353 1310 1401 1337 1272 1403 1322 1241 1403 1241 1319 1404 1341 1251 1404 1251 1322 1405 1358 1315 1402 1327 1247 1405 1315 1353 1406 1275 1337 1406 1338 1275 1407 1333 1253 1408 1316 1358 1407 1253 1327 1409 1279 1338 1408 1362 1316 1409 1343 1279 1410 1321 1362 1410 1366 1321 1411 1285 1343 1411 1347 1285 1412 1324 1366 1413 1334 1259 1414 1289 1347 1412 1370 1324 1413 1259 1333 1414 1351 1289 1415 130 1341 1416 1266 1334 1417 1293 1351 1418 1328 1370 1418 1374 1328 1417 1356 1293 1419 1297 1356 1416 1340 1266 1420 130 1340 1421 1329 1374 1419 1361 1297 1421 1379 1329 1422 1302 1361 1422 1365 1302 1423 1335 1379 1423 1387 1335 1424 1306 1365 1425 1344 92 1424 1369 1306 1426 1346 93 1426 1270 1346 1426 1350 1270 1425 1265 1344 1427 1274 1350 1425 1348 1265 1428 1312 1369 1428 1375 1312 1427 1354 1274 1429 1352 1269 1430 1357 1278 1429 1269 1348 1431 94 1387 1432 1273 1352 1433 125 126 1433 126 127 1430 1278 1354 1432 1355 1273 1433 1388 125 1434 1282 1357 1434 1359 1282 1435 94 1375 1436 76 75 1436 77 76 1436 78 77 1437 1277 1355 1436 75 1392 1437 1360 1277 1436 1392 1336 1438 1363 1286 1436 1336 1388 1439 1382 1318 1438 1286 1359 1439 1378 92 1440 1281 1360 1441 1345 1395 1442 1287 1363 1440 1364 1281 1441 56 55 1439 1318 1378 1442 1367 1287 1441 1398 1345 1443 1284 1364 1441 1395 56 1443 1368 1284 1444 1385 1320 1444 1320 1382 1445 1400 1349 1446 1372 1292 1445 1349 1398 1447 1389 1323 1446 1292 1367 1448 1288 1368 1449 1377 1294 1449 1294 1372 1448 1371 1288 1447 1323 1385 1450 1291 1371 1451 1326 1389 1450 1373 1291 1452 1353 1400 1452 1405 1353 1453 1300 1377 1451 1393 1326 1454 1296 1373 1454 1376 1296 1455 1408 1358 1455 1358 1405 1453 1380 1300 1456 1299 1376 1457 1330 1393 1457 1396 1330 1458 1362 1408 1456 1381 1299 1458 1410 1362 1459 1331 1396 1459 1399 1331 1460 1384 1303 1461 1412 1366 1462 1305 1380 1462 1383 1305 1463 1332 1399 1460 1303 1381 1461 1366 1410 1464 1307 1384 1465 1418 1370 1463 1401 1332 1464 1386 1307 1466 1337 1401 1467 1390 1309 1465 1370 1412 1467 1309 1386 1468 1421 1374 1466 1406 1337 1469 1391 1311 1468 1374 1418 1469 1311 1383 1470 1317 1391 1471 1409 1338 1472 1314 1390 1473 1379 1421 1472 1394 1314 1471 1338 1406 1470 1397 1317 1473 1423 1379 1474 1403 1319 1474 1319 1394 1475 1387 1423 1476 1402 1325 1477 1343 1409 1477 1411 1343 1475 1431 1387 1478 1347 1411 1478 1414 1347 1476 1325 1397 1479 1327 1402 1479 1407 1327 1480 1417 1351 1480 1351 1414 1481 94 1431 1482 1404 1322 1483 127 128 1484 1419 1356 1482 1322 1403 1483 128 129 1483 129 92 1484 1356 1417 1483 1433 127 1485 1436 1388 1486 1361 1419 1487 1333 1407 1485 78 1436 1486 1422 1361 1487 1413 1333 1485 1388 1433 1488 1441 55 1488 54 53 1489 1415 1341 1488 55 54 1490 1445 1398 1491 1365 1422 1490 1398 1441 1491 1424 1365 1492 1334 1413 1492 1416 1334 1493 1340 1416 1494 1369 1424 1495 1400 1445 1494 1428 1369 1496 1435 1375 1489 1341 1404 1495 1452 1400 1497 1405 1452 1493 1420 1340 1496 1375 1428 1497 1455 1405 1498 1458 1408 1498 1408 1455 1499 94 1435 1500 130 1420 1501 1444 1382 1502 1427 1350 1503 1410 1458 1502 1426 93 1504 130 1415 1501 1382 1439 1501 1439 92 1502 1350 1426 1505 1430 1354 1505 1354 1427 1503 1461 1410 1506 1447 1385 1507 1425 92 1507 1348 1425 1507 1429 1348 1508 1412 1461 1509 1357 1430 1509 1434 1357 1507 92 93 1506 1385 1444 1510 1451 1389 1511 1352 1429 1510 1389 1447 1511 1432 1352 1508 1465 1412 1512 1359 1434 1512 1438 1359 1513 1418 1465 1513 1468 1418 1514 1393 1451 1515 1355 1432 1516 1363 1438 1515 1437 1355 1517 1473 1421 1514 1457 1393 1517 1421 1468 1516 1442 1363 1518 1396 1457 1519 1367 1442 1518 1459 1396 1520 1475 1423 1521 1360 1437 1521 1440 1360 1519 1446 1367 1522 1372 1446 1520 1423 1473 1522 1449 1372 1523 1399 1459 1524 1443 1364 1524 1364 1440 1525 1377 1449 1523 1463 1399 1526 1431 1475 1525 1453 1377 1526 1481 1431 1527 1401 1463 1528 1368 1443 1528 1448 1368 1529 94 1481 1527 1466 1401 1530 1380 1453 1531 1450 1371 1530 1462 1380 1531 1371 1448 1532 1406 1466 1533 1454 1373 1532 1471 1406 1533 1373 1450 1534 1383 1462 1535 1485 1433 1536 1477 1409 1536 1409 1471 1537 1456 1376 1535 1483 92 1537 1376 1454 1535 1433 1483 1538 1381 1456 1538 1460 1381 1539 78 1485 1539 79 78 1540 1478 1411 1534 1469 1383 1539 80 79 1540 1411 1477 1541 1441 1488 1541 1490 1441 1542 1391 1469 1543 1464 1384 1544 1414 1478 1543 1384 1460 1541 1488 53 1545 1386 1464 1544 1480 1414 1546 1445 1490 1546 1495 1445 1542 1470 1391 1547 1476 1397 1545 1467 1386 1548 1417 1480 1549 1390 1467 1548 1484 1417 1549 1472 1390 1547 1397 1470 1550 1497 1452 1550 1452 1495 1551 1486 1419 1551 1419 1484 1552 1394 1472 1553 1498 1455 1554 1479 1402 1553 1455 1497 1552 1474 1394 1555 1422 1486 1555 1491 1422 1556 1482 1403 1554 1402 1476 1557 1487 1407 1558 1503 1458 1559 1424 1491 1559 1494 1424 1558 1458 1498 1560 1508 1461 1556 1403 1474 1560 1461 1503 1561 1489 1404 1562 1428 1494 1562 1496 1428 1557 1407 1479 1563 1492 1413 1564 1513 1465 1564 1465 1508 1565 1435 1496 1565 1499 1435 1563 1413 1487 1566 1517 1468 1561 1404 1482 1566 1468 1513 1567 1416 1492 1568 1504 1415 1568 1415 1489 1569 1473 1517 1570 94 1499 1569 1520 1473 1571 1444 1501 1571 1506 1444 1567 1493 1416 1572 1420 1493 1571 1501 92 1573 1475 1520 1573 1526 1475 1574 1510 1447 1572 1500 1420 1575 1529 1481 1574 1447 1506 1575 1481 1526 1576 1451 1510 1576 1514 1451 1577 1457 1514 1578 94 1529 1579 130 1500 1580 1427 1502 1577 1518 1457 1580 1505 1427 1580 1502 93 1581 80 1539 1582 1459 1518 1581 1539 1485 1581 1485 1535 1583 1509 1430 1583 1430 1505 1582 1523 1459 1581 1535 92 1584 1541 53 1585 1434 1509 1586 1527 1463 1585 1512 1434 1587 130 1504 1584 51 50 1584 52 51 1584 53 52 1586 1463 1523 1588 1511 1429 1589 1438 1512 1588 1507 93 1589 1516 1438 1588 1429 1507 1590 1466 1527 1590 1532 1466 1591 1432 1511 1592 1519 1442 1591 1515 1432 1593 1546 1490 1592 1442 1516 1593 1490 1541 1594 1550 1495 1595 1522 1446 1596 1471 1532 1595 1446 1519 1596 1536 1471 1597 1437 1515 1594 1495 1546 1597 1521 1437 1598 1553 1497 1599 1477 1536 1600 1525 1449 1601 1440 1521 1599 1540 1477 1600 1449 1522 1601 1524 1440 1602 1453 1525 1602 1530 1453 1598 1497 1550 1603 1443 1524 1603 1528 1443 1604 1544 1478 1605 1498 1553 1604 1478 1540 1606 1448 1528 1606 1531 1448 1607 1480 1544 1605 1558 1498 1607 1548 1480 1608 1560 1503 1609 1533 1450 1610 1462 1530 1610 1534 1462 1608 1503 1558 1609 1450 1531 1611 1508 1560 1612 1484 1548 1613 1542 1469 1612 1551 1484 1614 1454 1533 1614 1537 1454 1611 1564 1508 1615 1486 1551 1615 1555 1486 1616 1456 1537 1613 1469 1534 1617 1513 1564 1617 1566 1513 1616 1538 1456 1618 1460 1538 1619 1517 1566 1620 1491 1555 1618 1543 1460 1620 1559 1491 1619 1569 1517 1621 1494 1559 1622 1547 1470 1623 1464 1543 1622 1470 1542 1623 1545 1464 1624 1520 1569 1621 1562 1494 1625 1476 1547 1626 1565 1496 1625 1554 1476 1627 1467 1545 1627 1549 1467 1624 1573 1520 1628 1526 1573 1629 1472 1549 1628 1575 1526 1626 1496 1562 1629 1552 1472 1630 1499 1565 1631 1557 1479 1631 1479 1554 1632 1529 1575 1632 1578 1529 1633 1474 1552 1630 1570 1499 1633 1556 1474 1634 94 1570 1635 1561 1482 1636 1571 92 1635 1482 1556 1636 1574 1506 1637 94 1578 1638 1563 1487 1639 1581 92 1638 1487 1557 1636 1506 1571 1639 80 1581 1639 81 80 1639 82 81 1639 83 82 1640 1568 1489 1641 1510 1574 1642 1492 1563 1641 1576 1510 1642 1567 1492 1643 1584 50 1644 1514 1576 1643 49 48 1643 50 49 1645 1572 1493 1644 1577 1514 1646 1582 1518 1646 1518 1577 1645 1493 1567 1640 1489 1561 1647 1541 1584 1648 1500 1572 1647 1593 1541 1648 1579 1500 1649 1523 1582 1650 1594 1546 1649 1586 1523 1651 130 1579 1650 1546 1593 1652 1527 1586 1652 1590 1527 1653 1550 1594 1653 1598 1550 1654 1596 1532 1654 1532 1590 1655 1583 1505 1655 1580 93 1656 1587 1504 1657 1605 1553 1656 1504 1568 1655 1505 1580 1657 1553 1598 1658 1536 1596 1658 1599 1536 1659 1509 1583 1659 1585 1509 1660 1608 1558 1660 1558 1605 1661 1540 1599 1662 1589 1512 1662 1512 1585 1661 1604 1540 1663 1592 1516 1664 1560 1608 1664 1611 1560 1663 1516 1589 1665 1595 1519 1666 1607 1544 1667 1617 1564 1666 1544 1604 1667 1564 1611 1665 1519 1592 1668 130 1587 1669 1522 1595 1669 1600 1522 1670 1511 1588 1670 1591 1511 1671 1548 1607 1670 1588 93 1672 1619 1566 1671 1612 1548 1672 1566 1617 1673 1525 1600 1674 1515 1591 1673 1602 1525 1674 1597 1515 1675 1551 1612 1675 1615 1551 1676 1601 1521 1677 1610 1530 1678 1569 1619 1677 1530 1602 1678 1624 1569 1679 1555 1615 1676 1521 1597 1679 1620 1555 1680 1573 1624 1680 1628 1573 1681 1559 1620 1682 1534 1610 1683 1524 1601 1682 1613 1534 1683 1603 1524 1684 1575 1628 1681 1621 1559 1684 1632 1575 1685 1606 1528 1685 1528 1603 1686 1562 1621 1686 1626 1562 1687 1609 1531 1688 1578 1632 1689 1622 1542 1688 1637 1578 1687 1531 1606 1690 1630 1565 1690 1565 1626 1691 1614 1533 1691 1533 1609 1689 1542 1613 1692 1537 1614 1692 1616 1537 1693 1547 1622 1694 94 1637 1695 1639 92 1696 1570 1630 1696 1634 1570 1697 1618 1538 1697 1538 1616 1695 83 1639 1695 84 83 1695 85 84 1695 86 85 1698 94 1634 1693 1625 1547 1699 1554 1625 1700 1543 1618 1700 1623 1543 1701 1636 92 1702 89 88 1703 1545 1623 1703 1627 1545 1701 1574 1636 1704 45 43 1701 1641 1574 1699 1631 1554 1705 1629 1549 1706 1638 1557 1704 43 91 1707 1576 1641 1705 1549 1627 1707 1644 1576 1708 46 45 1708 47 46 1708 48 47 1709 1633 1552 1706 1557 1631 1708 1643 48 1710 1577 1644 1711 1563 1638 1710 1646 1577 1709 1552 1629 1712 1582 1646 1713 1584 1643 1713 1647 1584 1712 1649 1582 1711 1642 1563 1714 1635 1556 1715 1593 1647 1714 1556 1633 1716 1652 1586 1717 1640 1561 1715 1650 1593 1716 1586 1649 1717 1561 1635 1718 1645 1567 1719 1594 1650 1718 1567 1642 1720 1572 1645 1721 1590 1652 1721 1654 1590 1719 1653 1594 1720 1648 1572 1722 1656 1568 1723 1596 1654 1723 1658 1596 1724 1598 1653 1724 1657 1598 1725 1660 1605 1726 1599 1658 1725 1605 1657 1726 1661 1599 1727 1579 1648 1727 1651 1579 1722 1568 1640 1728 1664 1608 1729 1668 1587 1729 1587 1656 1730 1604 1661 1730 1666 1604 1728 1608 1660 1731 1667 1611 1731 1611 1664 1732 1607 1666 1733 130 1651 1734 1655 93 1732 1671 1607 1735 1672 1617 1734 1583 1655 1734 1659 1583 1735 1617 1667 1736 1585 1659 1737 1612 1671 1736 1662 1585 1737 1675 1612 1738 1678 1619 1738 1619 1672 1739 1679 1615 1740 1663 1589 1740 1589 1662 1741 1624 1678 1739 1615 1675 1742 1620 1679 1742 1681 1620 1743 1592 1663 1741 1680 1624 1743 1665 1592 1744 1628 1680 1745 1595 1665 1746 1621 1681 1745 1669 1595 1744 1684 1628 1747 1673 1600 1748 1632 1684 1746 1686 1621 1749 1626 1686 1748 1688 1632 1747 1600 1669 1750 130 1668 1751 1591 1670 1749 1690 1626 1752 1677 1602 1751 1674 1591 1753 1637 1688 1753 1694 1637 1752 1602 1673 1751 1670 93 1754 1610 1677 1755 1597 1674 1755 1676 1597 1756 1696 1630 1756 1630 1690 1754 1682 1610 1757 1698 1634 1758 1601 1676 1758 1683 1601 1759 94 1694 1757 1634 1696 1760 1685 1603 1761 94 1698 1762 1702 88 1763 1613 1682 1763 1689 1613 1760 1603 1683 1762 1695 92 1764 1606 1685 1764 1687 1606 1762 87 86 1765 1622 1689 1762 88 87 1766 1641 1701 1766 1707 1641 1762 86 1695 1767 89 1702 1767 1704 91 1768 1609 1687 1765 1693 1622 1768 1691 1609 1766 1701 92 1767 90 89 1767 91 90 1769 1699 1625 1770 1692 1614 1771 1644 1707 1771 1710 1644 1770 1614 1691 1772 45 1704 1772 1708 45 1773 1616 1692 1769 1625 1693 1773 1697 1616 1774 1712 1646 1775 1643 1708 1774 1646 1710 1775 1713 1643 1776 1618 1697 1776 1700 1618 1777 1716 1649 1778 1703 1623 1777 1649 1712 1779 1647 1713 1780 1706 1631 1780 1631 1699 1779 1715 1647 1781 1711 1638 1778 1623 1700 1781 1638 1706 1782 1721 1652 1782 1652 1716 1783 1650 1715 1784 1627 1703 1784 1705 1627 1783 1719 1650 1785 1654 1721 1786 1642 1711 1785 1723 1654 1786 1718 1642 1787 1629 1705 1788 1724 1653 1787 1709 1629 1788 1653 1719 1789 1658 1723 1789 1726 1658 1790 1657 1724 1790 1725 1657 1791 1633 1709 1791 1714 1633 1792 1661 1726 1792 1730 1661 1793 1717 1635 1793 1635 1714 1794 1645 1718 1795 1660 1725 1795 1728 1660 1794 1720 1645 1796 1666 1730 1796 1732 1666 1797 1648 1720 1797 1727 1648 1798 1664 1728 1798 1731 1664 1799 1671 1732 1799 1737 1671 1800 1735 1667 1800 1667 1731 1801 1733 1651 1801 1651 1727 1802 1739 1675 1802 1675 1737 1803 1672 1735 1804 1640 1717 1804 1722 1640 1803 1738 1672 1805 1729 1656 1805 1656 1722 1806 130 1733 1807 1679 1739 1808 1678 1738 1807 1742 1679 1809 1746 1681 1808 1741 1678 1810 1736 1659 1809 1681 1742 1811 1744 1680 1810 1659 1734 1811 1680 1741 1810 1734 93 1812 1749 1686 1813 1740 1662 1813 1662 1736 1814 1748 1684 1815 1668 1729 1814 1684 1744 1812 1686 1746 1816 1663 1740 1816 1743 1663 1817 1690 1749 1818 1688 1748 1819 1665 1743 1817 1756 1690 1818 1753 1688 1819 1745 1665 1820 1669 1745 1821 1759 1694 1820 1747 1669 1821 1694 1753 1822 1757 1696 1822 1696 1756 1815 1750 1668 1823 1752 1673 1823 1673 1747 1824 1698 1757 1825 1754 1677 1825 1677 1752 1824 1761 1698 1826 94 1759 1827 94 1761 1828 1763 1682 1829 1762 92 1829 1702 1762 1830 1707 1766 1829 1767 1702 1830 1771 1707 1828 1682 1754 1830 1766 92 1831 130 1750 1832 1772 1704 1833 1765 1689 1834 1755 1674 1834 1751 93 1835 1710 1771 1832 1704 1767 1834 1674 1751 1836 1676 1755 1835 1774 1710 1837 1775 1708 1838 1777 1712 1833 1689 1763 1836 1758 1676 1837 1708 1772 1838 1712 1774 1839 1760 1683 1840 1693 1765 1841 1779 1713 1839 1683 1758 1841 1713 1775 1840 1769 1693 1842 1716 1777 1842 1782 1716 1843 1780 1699 1843 1699 1769 1844 1764 1685 1844 1685 1760 1845 1687 1764 1845 1768 1687 1846 1783 1715 1847 1721 1782 1846 1715 1779 1847 1785 1721 1848 1788 1719 1849 1706 1780 1850 1723 1785 1851 1770 1691 1850 1789 1723 1848 1719 1783 1851 1691 1768 1852 1790 1724 1853 1773 1692 1852 1724 1788 1854 1792 1726 1853 1692 1770 1854 1726 1789 1849 1781 1706 1855 1786 1711 1856 1697 1773 1857 1725 1790 1855 1711 1781 1856 1776 1697 1858 1796 1730 1859 1700 1776 1857 1795 1725 1858 1730 1792 1860 1728 1795 1860 1798 1728 1859 1778 1700 1861 1703 1778 1862 1799 1732 1861 1784 1703 1862 1732 1796 1863 1802 1737 1864 1705 1784 1865 1800 1731 1866 1718 1786 1866 1794 1718 1865 1731 1798 1863 1737 1799 1867 1803 1735 1868 1720 1794 1864 1787 1705 1869 1807 1739 1870 1709 1787 1867 1735 1800 1871 1808 1738 1869 1739 1802 1870 1791 1709 1872 1809 1742 1868 1797 1720 1872 1742 1807 1873 1793 1714 1874 1801 1727 1871 1738 1803 1875 1811 1741 1875 1741 1808 1876 1746 1809 1874 1727 1797 1873 1714 1791 1877 1804 1717 1878 1814 1744 1876 1812 1746 1879 1733 1801 1879 1806 1733 1878 1744 1811 1880 1817 1749 1877 1717 1793 1880 1749 1812 1881 1748 1814 1881 1818 1748 1882 1753 1818 1883 130 1806 1884 1756 1817 1882 1821 1753 1885 1736 1810 1885 1810 93 1886 1805 1722 1884 1822 1756 1885 1813 1736 1886 1722 1804 1887 1740 1813 1888 1759 1821 1889 1815 1729 1890 1757 1822 1887 1816 1740 1888 1826 1759 1890 1824 1757 1891 1819 1743 1892 1827 1761 1892 1761 1824 1891 1743 1816 1893 1820 1745 1893 1745 1819 1889 1729 1805 1894 94 1827 1894 130 94 1895 94 1826 1896 1750 1815 1897 1747 1820 1897 1823 1747 1898 1832 1767 1899 1752 1823 1900 1771 1830 1898 1767 1829 1899 1825 1752 1898 1829 92 1900 1830 92 1900 1835 1771 1901 1837 1772 1902 1754 1825 1902 1828 1754 1901 1772 1832 1903 1774 1835 1904 1763 1828 1905 1775 1837 1903 1838 1774 1896 1831 1750 1906 130 1831 1905 1841 1775 1907 1842 1777 1907 1777 1838 1904 1833 1763 1908 1779 1841 1908 1846 1779 1909 1840 1765 1910 1847 1782 1911 1783 1846 1910 1782 1842 1912 1850 1785 1909 1765 1833 1912 1785 1847 1911 1848 1783 1913 1834 93 1914 1788 1848 1914 1852 1788 1913 1836 1755 167 1789 1850 167 1854 1789 1913 1755 1834 1915 1769 1840 1916 1857 1790 1915 1843 1769 220 1758 1836 220 1839 1758 1916 1790 1852 180 1792 1854 180 1858 1792 224 1760 1839 224 1844 1760 1917 1795 1857 1917 1860 1795 176 1780 1843 176 1849 1780 190 1796 1858 190 1862 1796 239 1845 1764 1918 1865 1798 239 1764 1844 185 1781 1849 244 1768 1845 200 1799 1862 1918 1798 1860 200 1863 1799 244 1851 1768 1919 1800 1865 185 1855 1781 204 1802 1863 198 1866 1786 1919 1867 1800 254 1770 1851 254 1853 1770 204 1869 1802 170 1803 1867 170 1871 1803 264 1856 1773 198 1786 1855 264 1773 1853 209 1794 1866 209 1868 1794 178 1875 1808 212 1807 1869 212 1872 1807 178 1808 1871 267 1776 1856 233 1876 1809 267 1859 1776 281 1861 1778 230 1797 1868 281 1778 1859 188 1811 1875 230 1874 1797 233 1809 1872 188 1878 1811 246 1880 1812 246 1812 1876 289 1784 1861 289 1864 1784 195 1814 1878 195 1881 1814 236 1879 1801 299 1870 1787 299 1787 1864 206 1818 1881 206 1882 1818 236 1801 1874 258 1817 1880 258 1884 1817 251 1883 1806 316 1791 1870 251 1806 1879 316 1873 1791 217 1888 1821 217 1821 1882 270 1890 1822 331 1793 1873 270 1822 1884 331 1877 1793 261 130 1883 226 1826 1888 226 1895 1826 284 1892 1824 284 1824 1890 335 1804 1877 335 1886 1804 1920 1887 1813 1920 1813 1885 1920 1885 93 291 1816 1887 241 94 1895 291 1891 1816 304 1827 1892 304 1894 1827 297 1819 1891 297 1893 1819 1921 1832 1898 1921 1901 1832 1921 1898 92 308 1820 1893 308 1897 1820 313 1823 1897 313 1899 1823 349 1805 1886 274 1837 1901 349 1889 1805 274 1905 1837 310 130 1894 361 1815 1889 323 1902 1825 323 1825 1899 1922 1903 1835 1922 1900 92 1922 1835 1900 278 1841 1905 278 1908 1841 358 1907 1838 361 1896 1815 358 1838 1903 293 1846 1908 293 1911 1846 333 1904 1828 306 1848 1911 333 1828 1902 345 1909 1833 367 1842 1907 367 1910 1842 306 1914 1848 320 1852 1914 320 1916 1852 374 1912 1847 374 1847 1910 345 1833 1904 168 167 1850 328 1917 1857 352 1915 1840 168 1850 1912 372 1906 1831 372 1831 1896 328 1857 1916 340 1918 1860 352 1840 1909 182 1843 1915 173 180 1854 182 176 1843 173 1854 167 340 1860 1917 183 1858 180 183 190 1858 342 1919 1865 342 1865 1918 175 1849 176 191 1862 190 191 200 1862 171 1867 1919 214 130 1906 171 170 1867 221 1913 93 221 220 1836 175 185 1849 172 178 1871 192 1855 185 221 1836 1913 219 1839 220 201 1863 200 201 204 1863 172 1871 170 192 198 1855 219 224 1839 203 1869 204 181 1875 178 228 1844 224 228 239 1844 181 188 1875 197 209 1866 203 212 1869 197 1866 198 211 1872 212 238 1845 239 187 1878 188 187 195 1878 238 244 1845 211 233 1872 232 246 1876 232 1876 233 248 1851 244 194 1881 195 222 230 1868 248 254 1851 194 206 1881 255 1853 254 222 1868 209 255 264 1853 207 1882 206 207 217 1882 249 1880 246 265 1856 264 234 1874 230 265 267 1856 216 1888 217 216 226 1888 249 258 1880 234 236 1874 247 1879 236 247 251 1879 273 1859 267 227 1895 226 262 270 1884 227 241 1895 273 281 1859 280 1861 281 280 289 1861 262 1884 258 269 1890 270 294 1864 289 252 1883 251 294 299 1864 269 284 1890 252 261 1883 283 304 1892 242 94 241 300 316 1870 300 1870 299 283 1892 284 272 1921 92 315 331 1873 315 1873 316 303 310 1894 272 274 1901 260 130 261 303 1894 304 287 1920 93 272 1901 1921 287 291 1887 287 1887 1920 290 297 1891 290 1891 291 275 1905 274 330 1877 331 275 278 1905 296 1893 297 296 308 1893 277 1908 278 330 335 1877 277 293 1908 311 313 1897 311 1897 308 301 306 1911 336 349 1886 318 1899 313 318 323 1899 301 1911 293 317 1914 306 336 1886 335 322 1902 323 348 1889 349 317 320 1914 322 333 1902 324 130 310 359 358 1903 359 1922 92 359 1903 1922 325 1916 320 325 328 1916 337 1904 333 337 345 1904 348 361 1889 363 1907 358 363 367 1907 346 1909 345 327 340 1917 346 352 1909 362 1896 361 327 1917 328 368 374 1910 339 1918 340 368 1910 367 339 342 1918 351 182 1915 362 372 1896 351 1915 352 371 1906 372 376 168 1912 343 1919 342 343 171 1919 376 1912 374 371 214 1906 
+37 36 1 1.59986714424437e-17
+-0.135378810567666 0.0655170218285604 -2.681887914871e-18 -0.135295633015408 0.0656610895751207 0.00190144754545289 -0.135048627666469 0.0660889153892243 0.00374512056941607 -0.134645299653386 0.0667875 0.005475 -0.134097903893742 0.0677356172675501 0.00703852432606761 -0.1334230727307 0.0689044591284707 0.00838818665215281 -0.132641310567666 0.0702585109142802 0.0094829781714396 -0.131776370852374 0.07175663044665 0.0102896341976057 -0.130854534340392 0.0733532981216742 0.0107836448954837 -0.129903810567666 0.075 0.01095 -0.128953086794939 0.0766467018783257 0.0107836448954837 -0.128031250282958 0.0782433695533499 0.0102896341976057 -0.127166310567666 0.0797414890857198 0.0094829781714396 -0.126384548404632 0.0810955408715293 0.00838818665215281 -0.125709717241589 0.0822643827324499 0.00703852432606761 -0.125162321481946 0.0832125 0.00547500000000001 -0.124758993468863 0.0839110846107756 0.00374512056941608 -0.124511988119924 0.0843389104248792 0.0019014475454529 -0.124428810567666 0.0844829781714396 1.59292745010101e-17 -0.124511988119924 0.0843389104248792 -0.00190144754545287 -0.124758993468863 0.0839110846107756 -0.00374512056941605 -0.125162321481946 0.0832125 -0.00547499999999998 -0.125709717241589 0.0822643827324499 -0.00703852432606759 -0.126384548404632 0.0810955408715293 -0.00838818665215279 -0.127166310567666 0.0797414890857198 -0.00948297817143959 -0.128031250282958 0.07824336955335 -0.0102896341976057 -0.128953086794939 0.0766467018783258 -0.0107836448954837 -0.129903810567666 0.075 -0.01095 -0.130854534340392 0.0733532981216743 -0.0107836448954837 -0.131776370852374 0.0717566304466501 -0.0102896341976057 -0.132641310567666 0.0702585109142802 -0.00948297817143962 -0.1334230727307 0.0689044591284707 -0.00838818665215284 -0.134097903893742 0.0677356172675501 -0.00703852432606764 -0.134645299653386 0.0667875 -0.00547500000000004 -0.135048627666469 0.0660889153892244 -0.00374512056941612 -0.135295633015408 0.0656610895751207 -0.00190144754545294 -0.129903810567666 0.075 0 0.01095 8.60585474410369e-19 0.0107836448954837 0.00190144754545289 0.0102896341976057 0.00374512056941607 0.00948297817143961 0.005475 0.00838818665215281 0.00703852432606761 0.0070385243260676 0.00838818665215281 0.005475 0.0094829781714396 0.00374512056941607 0.0102896341976057 0.00190144754545289 0.0107836448954837 5.19231196666886e-19 0.01095 -0.00190144754545289 0.0107836448954837 -0.00374512056941607 0.0102896341976057 -0.005475 0.0094829781714396 -0.0070385243260676 0.00838818665215281 -0.0083881866521528 0.00703852432606761 -0.0094829781714396 0.00547500000000001 -0.0102896341976057 0.00374512056941608 -0.0107836448954837 0.0019014475454529 -0.01095 1.64730967582016e-17 -0.0107836448954837 -0.00190144754545287 -0.0102896341976057 -0.00374512056941605 -0.00948297817143961 -0.00547499999999998 -0.00838818665215283 -0.00703852432606759 -0.00703852432606762 -0.00838818665215279 -0.00547500000000002 -0.00948297817143959 -0.0037451205694161 -0.0102896341976057 -0.00190144754545292 -0.0107836448954837 -3.07057913709156e-17 -0.01095 0.00190144754545285 -0.0107836448954837 0.00374512056941604 -0.0102896341976057 0.00547499999999997 -0.00948297817143962 0.00703852432606758 -0.00838818665215284 0.00838818665215278 -0.00703852432606764 0.00948297817143958 -0.00547500000000004 0.0102896341976057 -0.00374512056941612 0.0107836448954837 -0.00190144754545293 5.19231196666886e-19 8.60585474410369e-19 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 
+403 717 1 0.000695573526461213
+0.0285134526101169 -0.0516525230498979 -0.877715450616494 -1.24909848089882e-17 -0.059 -0.971 0.0218689537628893 -0.0547973342071952 -0.873926714079115 0.0152432943309105 -0.0569968566883178 -0.871331307133653 0.00885408422920787 -0.0583318593736884 -0.869774450376816 0.00220533221989951 -0.0589587672676645 -0.869047706339065 -0.00452021703437581 -0.0588265763530881 -0.869200725542687 -0.0111222730604825 -0.057942178304755 -0.870227558960192 -0.0174212632071157 -0.0563693147096274 -0.872067759914168 -0.0232858016806991 -0.0542104365049165 -0.874626313499237 -0.0299133744109193 -0.0508545968961581 -0.878693946864086 -0.0364055526574153 -0.0464288249269798 -0.884283956254603 -0.0414604911606737 -0.0419765142239933 -0.890301047998437 -0.0454599405573964 -0.0376085023052696 -0.896883095205712 -0.048477768906044 -0.0336289431418361 -0.904159988127683 -0.0500125776174735 -0.0313008361062597 -0.910012892931646 -0.0507223820320063 -0.0301370159352354 -0.914685889739203 -0.0509929846912805 -0.0296768550886756 -0.919154017069977 -0.0508974922470173 -0.0298403260381806 -0.923231887915664 -0.0504793502812316 -0.0305424952164638 -0.927268264580091 -0.0495067029638172 -0.032094840909959 -0.932251274982488 -0.0478365171105765 -0.0345349752083268 -0.93768239459427 -0.0448299575819992 -0.0383572010050282 -0.944316145473221 -0.0404672041100315 -0.0429349454880199 -0.951038720348503 -0.0350437353916528 -0.0474651119056726 -0.957053162381158 -0.0280326393130683 -0.0519150376126295 -0.962604825208043 -0.021306012776011 -0.0550186720678838 -0.966336316913799 -0.0146841640586707 -0.0571434367699638 -0.96884027478942 -0.00800353134517232 -0.0584555058032915 -0.970369082432513 -0.00416203854328149 -0.058852336496355 -0.970829113665653 -1.24909848089882e-17 -0.059 -0.971 0.00637745658187731 -0.058654309018953 -0.970599683375865 0.0117874105676248 -0.0578105272001434 -0.969619119931822 0.0176689960460276 -0.0562921525018941 -0.967841471905639 0.0241008386445522 -0.0538530347922422 -0.964946071751388 0.0304430307465949 -0.0505393060003243 -0.960917241815508 0.0359655758325551 -0.0467704754890113 -0.956159057637936 0.0418706266966591 -0.0415674240281568 -0.94911788161083 0.0465956891649289 -0.0361917466377736 -0.940732602679552 0.0490639245669559 -0.0327678395054133 -0.933918738986464 0.0503181951744449 -0.030807129660349 -0.928311391809156 0.0508522668789505 -0.0299173353680219 -0.923879041668047 0.0509989666893943 -0.0296665701997348 -0.919675378553317 0.0507964095118238 -0.0300120774554979 -0.915447550387328 0.0502525012386535 -0.030914281417931 -0.911300614417913 0.0490754922156223 -0.0327504516820192 -0.906121929969831 0.0471720570893195 -0.0354371925332016 -0.900614516307052 0.0438194866264632 -0.0395076238297127 -0.893906851632219 0.0389820442404017 -0.0442876957323281 -0.887115352553105 0.0343171875743088 -0.0479930267907713 -0.882272945563165 -1.24909848089882e-17 -0.359 -0.971 -1.24909848089882e-17 -0.359 -0.971 0.00885605706101345 -0.359 -0.970225195403623 0.0174430273096091 -0.359 -0.967924323660081 0.0255 -0.359 -0.964167295593006 0.0327821680940135 -0.359 -0.959068266599068 0.0390682665990679 -0.359 -0.952782168094014 0.0441672955930064 -0.359 -0.9455 0.0479243236600813 -0.359 -0.937443027309609 0.0502251954036226 -0.359 -0.928856057061013 0.051 -0.359 -0.92 0.0502251954036226 -0.359 -0.911143942938987 0.0479243236600813 -0.359 -0.902556972690391 0.0441672955930064 -0.359 -0.8945 0.0390682665990679 -0.359 -0.887217831905987 0.0327821680940135 -0.359 -0.880931733400932 0.0255 -0.359 -0.875832704406994 0.0174430273096092 -0.359 -0.872075676339919 0.00885605706101351 -0.359 -0.869774804596377 7.41911415115537e-17 -0.359 -0.869 -0.00885605706101336 -0.359 -0.869774804596377 -0.017443027309609 -0.359 -0.872075676339919 -0.0254999999999999 -0.359 -0.875832704406994 -0.0327821680940134 -0.359 -0.880931733400932 -0.0390682665990678 -0.359 -0.887217831905986 -0.0441672955930063 -0.359 -0.8945 -0.0479243236600813 -0.359 -0.902556972690391 -0.0502251954036226 -0.359 -0.911143942938986 -0.051 -0.359 -0.92 -0.0502251954036226 -0.359 -0.928856057061013 -0.0479243236600814 -0.359 -0.937443027309609 -0.0441672955930065 -0.359 -0.9455 -0.039068266599068 -0.359 -0.952782168094013 -0.0327821680940137 -0.359 -0.959068266599068 -0.0255000000000002 -0.359 -0.964167295593006 -0.0174430273096093 -0.359 -0.967924323660081 -0.00885605706101367 -0.359 -0.970225195403623 0.0165596729294389 -0.34166666158946 -0.968236679326732 0.0508258091433402 -0.046999908610275 -0.915788453380911 0.0494394135629058 -0.046999908610275 -0.932519759844181 0.0494394135629058 -0.0643332470208152 -0.932519759844181 0.042695490391389 -0.0643332470208152 -0.947894356064244 0.042695490391389 -0.046999908610275 -0.947894356064244 0.0165596729294389 -0.324333323178919 -0.968236679326732 0.00839432410431743 -0.324333323178919 -0.869695573526461 0.0242733170448908 -0.306999984768379 -0.875146838688469 0.00839432410431743 -0.306999984768379 -0.869695573526461 -0.0165596729294389 -0.0643332470208152 -0.968236679326732 0.0494394135629058 -0.202999954305137 -0.932519759844181 0.042695490391389 -0.202999954305137 -0.947894356064244 0.042695490391389 -0.185666615894597 -0.947894356064244 0.0242733170448908 -0.324333323178919 -0.875146838688469 -0.0313248483471731 -0.0643332470208152 -0.960246165979216 0.0242733170448908 -0.34166666158946 -0.875146838688469 0.0375219194443297 -0.34166666158946 -0.885458639847087 0.042695490391389 -0.0816665854313555 -0.947894356064244 0.0313248483471731 -0.0643332470208152 -0.960246165979216 -0.0313248483471731 -0.0816665854313555 -0.960246165979216 -0.042695490391389 -0.0643332470208152 -0.947894356064244 0.0494394135629058 -0.185666615894597 -0.932519759844181 -0.042695490391389 -0.0816665854313555 -0.947894356064244 0.0375219194443297 -0.324333323178919 -0.885458639847087 0.042695490391389 -0.220333292715678 -0.947894356064244 0.0313248483471731 -0.202999954305137 -0.960246165979216 0.0313248483471731 -0.0816665854313555 -0.960246165979216 -0.0165596729294389 -0.185666615894597 -0.968236679326732 -0.0165596729294389 -0.168333277484057 -0.968236679326732 0.0313248483471731 -0.220333292715678 -0.960246165979216 -0.0313248483471731 -0.185666615894597 -0.960246165979216 -0.0313248483471731 -0.168333277484057 -0.960246165979216 0.0313248483471731 -0.0989999238418958 -0.960246165979216 0.0165596729294389 -0.0816665854313555 -0.968236679326732 -0.042695490391389 -0.0989999238418958 -0.947894356064244 -0.0494394135629059 -0.0989999238418958 -0.932519759844181 -0.0494394135629059 -0.0816665854313555 -0.932519759844181 0.0165596729294389 -0.0989999238418958 -0.968236679326732 -0.0313248483471731 -0.202999954305137 -0.960246165979216 -0.042695490391389 -0.185666615894597 -0.947894356064244 -0.042695490391389 -0.202999954305137 -0.947894356064244 0.0313248483471731 -0.237666631126218 -0.960246165979216 0.0165596729294389 -0.220333292715678 -0.968236679326732 -0.0494394135629059 -0.116333262252436 -0.932519759844181 -0.0508258091433402 -0.0989999238418958 -0.915788453380911 -0.0508258091433402 -0.116333262252436 -0.915788453380911 -0.0508258091433402 -0.133666600662976 -0.915788453380911 -0.0467044396594079 -0.133666600662976 -0.899513533342699 -0.0467044396594079 -0.116333262252436 -0.899513533342699 -0.042695490391389 -0.220333292715678 -0.947894356064244 -0.0494394135629059 -0.220333292715678 -0.932519759844181 -0.0494394135629059 -0.202999954305137 -0.932519759844181 0.0165596729294389 -0.237666631126218 -0.968236679326732 0.0165596729294389 -0.254999969536758 -0.968236679326732 -0.0494394135629059 -0.237666631126218 -0.932519759844181 -0.0508258091433402 -0.220333292715678 -0.915788453380911 -0.0467044396594079 -0.150999939073517 -0.899513533342699 -0.0375219194443297 -0.133666600662976 -0.885458639847087 0.0165596729294389 -0.116333262252436 -0.968236679326732 -0.0375219194443297 -0.150999939073517 -0.885458639847087 -0.0508258091433402 -0.046999908610275 -0.915788453380911 -0.0508258091433402 -0.237666631126218 -0.915788453380911 -0.0508258091433402 -0.254999969536758 -0.915788453380911 -0.0467044396594079 -0.237666631126218 -0.899513533342699 -0.0467044396594079 -0.254999969536758 -0.899513533342699 0.0467044396594079 -0.046999908610275 -0.899513533342699 -0.0467044396594079 -0.046999908610275 -0.899513533342699 -0.0375219194443297 -0.168333277484057 -0.885458639847087 -0.0242733170448907 -0.150999939073517 -0.875146838688469 -0.0242733170448907 -0.168333277484057 -0.875146838688469 -0.0467044396594079 -0.272333307947299 -0.899513533342699 -0.0375219194443297 -0.272333307947299 -0.885458639847087 -0.0375219194443297 -0.254999969536758 -0.885458639847087 -0.0467044396594079 -0.0643332470208152 -0.899513533342699 -0.0375219194443297 -0.046999908610275 -0.885458639847087 -0.0375219194443297 -0.0643332470208152 -0.885458639847087 0.0508258091433402 -0.0643332470208152 -0.915788453380911 -0.0375219194443297 -0.289666646357839 -0.885458639847087 -0.0242733170448907 -0.289666646357839 -0.875146838688469 -0.0242733170448907 -0.272333307947299 -0.875146838688469 -0.0242733170448907 -0.185666615894597 -0.875146838688469 -0.00839432410431742 -0.168333277484057 -0.869695573526461 -0.0375219194443297 -0.0816665854313555 -0.885458639847087 -0.0242733170448907 -0.0816665854313555 -0.875146838688469 -0.0242733170448907 -0.0643332470208152 -0.875146838688469 -0.00839432410431742 -0.185666615894597 -0.869695573526461 0.0494394135629058 -0.0816665854313555 -0.932519759844181 -0.0242733170448907 -0.306999984768379 -0.875146838688469 -0.00839432410431742 -0.306999984768379 -0.869695573526461 -0.00839432410431742 -0.289666646357839 -0.869695573526461 -0.0242733170448907 -0.0989999238418958 -0.875146838688469 -0.00839432410431742 -0.0816665854313555 -0.869695573526461 -0.00839432410431742 -0.0989999238418958 -0.869695573526461 0.042695490391389 -0.0989999238418958 -0.947894356064244 -0.00839432410431742 -0.202999954305137 -0.869695573526461 0.00839432410431743 -0.202999954305137 -0.869695573526461 0.00839432410431743 -0.185666615894597 -0.869695573526461 -0.00839432410431742 -0.324333323178919 -0.869695573526461 0.00839432410431743 -0.220333292715678 -0.869695573526461 0.0242733170448908 -0.202999954305137 -0.875146838688469 0.0313248483471731 -0.116333262252436 -0.960246165979216 -0.00839432410431742 -0.116333262252436 -0.869695573526461 0.00839432410431743 -0.0989999238418958 -0.869695573526461 0.00839432410431743 -0.34166666158946 -0.869695573526461 0.0242733170448908 -0.220333292715678 -0.875146838688469 0.00839432410431743 -0.116333262252436 -0.869695573526461 0.0242733170448908 -0.237666631126218 -0.875146838688469 0.0375219194443297 -0.237666631126218 -0.885458639847087 0.0375219194443297 -0.220333292715678 -0.885458639847087 -0.0165596729294389 -0.202999954305137 -0.968236679326732 0.00839432410431743 -0.133666600662976 -0.869695573526461 0.0242733170448908 -0.133666600662976 -0.875146838688469 0.0242733170448908 -0.116333262252436 -0.875146838688469 -0.0313248483471731 -0.220333292715678 -0.960246165979216 0.0375219194443297 -0.254999969536758 -0.885458639847087 0.0467044396594079 -0.237666631126218 -0.899513533342699 0.0467044396594079 -0.254999969536758 -0.899513533342699 -0.042695490391389 -0.237666631126218 -0.947894356064244 0.0242733170448908 -0.150999939073517 -0.875146838688469 0.0375219194443297 -0.150999939073517 -0.885458639847087 0.0375219194443297 -0.133666600662976 -0.885458639847087 0.0467044396594079 -0.272333307947299 -0.899513533342699 0.0508258091433402 -0.254999969536758 -0.915788453380911 0.0165596729294389 -0.133666600662976 -0.968236679326732 -0.0494394135629059 -0.254999969536758 -0.932519759844181 0.0375219194443297 -0.046999908610275 -0.885458639847087 0.0508258091433402 -0.272333307947299 -0.915788453380911 0.0508258091433402 -0.289666646357839 -0.915788453380911 0.0494394135629058 -0.272333307947299 -0.932519759844181 0.0375219194443297 -0.168333277484057 -0.885458639847087 0.0467044396594079 -0.150999939073517 -0.899513533342699 0.0467044396594079 -0.0643332470208152 -0.899513533342699 -0.0508258091433402 -0.272333307947299 -0.915788453380911 0.0494394135629058 -0.289666646357839 -0.932519759844181 0.0508258091433402 -0.0816665854313555 -0.915788453380911 0.0494394135629058 -0.306999984768379 -0.932519759844181 0.042695490391389 -0.306999984768379 -0.947894356064244 0.042695490391389 -0.289666646357839 -0.947894356064244 0.0467044396594079 -0.168333277484057 -0.899513533342699 -0.0467044396594079 -0.289666646357839 -0.899513533342699 0.0467044396594079 -0.185666615894597 -0.899513533342699 0.0508258091433402 -0.185666615894597 -0.915788453380911 0.0508258091433402 -0.168333277484057 -0.915788453380911 0.0494394135629058 -0.0989999238418958 -0.932519759844181 0.042695490391389 -0.324333323178919 -0.947894356064244 0.0313248483471731 -0.324333323178919 -0.960246165979216 0.0313248483471731 -0.306999984768379 -0.960246165979216 0.0508258091433402 -0.202999954305137 -0.915788453380911 -0.0375219194443297 -0.306999984768379 -0.885458639847087 0.0313248483471731 -0.34166666158946 -0.960246165979216 0.042695490391389 -0.116333262252436 -0.947894356064244 -0.0242733170448907 -0.324333323178919 -0.875146838688469 -0.0165596729294389 -0.0816665854313555 -0.968236679326732 0.0494394135629058 -0.220333292715678 -0.932519759844181 -0.00839432410431742 -0.34166666158946 -0.869695573526461 -0.0313248483471731 -0.0989999238418958 -0.960246165979216 0.0313248483471731 -0.133666600662976 -0.960246165979216 0.042695490391389 -0.237666631126218 -0.947894356064244 -0.0165596729294389 -0.220333292715678 -0.968236679326732 -0.042695490391389 -0.116333262252436 -0.947894356064244 -0.0313248483471731 -0.237666631126218 -0.960246165979216 -0.0494394135629059 -0.133666600662976 -0.932519759844181 0.0313248483471731 -0.254999969536758 -0.960246165979216 -0.042695490391389 -0.254999969536758 -0.947894356064244 0.0165596729294389 -0.150999939073517 -0.968236679326732 -0.0508258091433402 -0.150999939073517 -0.915788453380911 -0.0494394135629059 -0.272333307947299 -0.932519759844181 -0.0467044396594079 -0.168333277484057 -0.899513533342699 0.0165596729294389 -0.272333307947299 -0.968236679326732 0.0375219194443297 -0.0643332470208152 -0.885458639847087 -0.0494394135629059 -0.046999908610275 -0.932519759844181 -0.0508258091433402 -0.289666646357839 -0.915788453380911 -0.0508258091433402 -0.0643332470208152 -0.915788453380911 -0.0375219194443297 -0.185666615894597 -0.885458639847087 -0.0467044396594079 -0.306999984768379 -0.899513533342699 0.0467044396594079 -0.0816665854313555 -0.899513533342699 -0.0467044396594079 -0.0816665854313555 -0.899513533342699 -0.0375219194443297 -0.324333323178919 -0.885458639847087 0.0508258091433402 -0.0989999238418958 -0.915788453380911 -0.0242733170448907 -0.202999954305137 -0.875146838688469 -0.0242733170448907 -0.34166666158946 -0.875146838688469 -0.0375219194443297 -0.0989999238418958 -0.885458639847087 -0.0165596729294389 -0.237666631126218 -0.968236679326732 0.0494394135629058 -0.116333262252436 -0.932519759844181 -0.00839432410431742 -0.220333292715678 -0.869695573526461 -0.0313248483471731 -0.254999969536758 -0.960246165979216 0.00839432410431743 -0.237666631126218 -0.869695573526461 -0.0242733170448907 -0.116333262252436 -0.875146838688469 0.042695490391389 -0.133666600662976 -0.947894356064244 0.0242733170448908 -0.254999969536758 -0.875146838688469 -0.042695490391389 -0.272333307947299 -0.947894356064244 -0.00839432410431742 -0.133666600662976 -0.869695573526461 0.0313248483471731 -0.150999939073517 -0.960246165979216 -0.0494394135629059 -0.289666646357839 -0.932519759844181 0.0375219194443297 -0.272333307947299 -0.885458639847087 -0.0508258091433402 -0.306999984768379 -0.915788453380911 0.00839432410431743 -0.150999939073517 -0.869695573526461 0.0165596729294389 -0.168333277484057 -0.968236679326732 0.0467044396594079 -0.289666646357839 -0.899513533342699 0.0242733170448908 -0.168333277484057 -0.875146838688469 -0.0467044396594079 -0.324333323178919 -0.899513533342699 -0.0375219194443297 -0.34166666158946 -0.885458639847087 0.0242733170448908 -0.0643332470208152 -0.875146838688469 0.0508258091433402 -0.306999984768379 -0.915788453380911 -0.0165596729294389 -0.254999969536758 -0.968236679326732 0.0494394135629058 -0.324333323178919 -0.932519759844181 0.0375219194443297 -0.0816665854313555 -0.885458639847087 0.0375219194443297 -0.185666615894597 -0.885458639847087 -0.0313248483471731 -0.272333307947299 -0.960246165979216 0.042695490391389 -0.34166666158946 -0.947894356064244 -0.042695490391389 -0.289666646357839 -0.947894356064244 0.0467044396594079 -0.202999954305137 -0.899513533342699 -0.0165596729294389 -0.0989999238418958 -0.968236679326732 0.0467044396594079 -0.0989999238418958 -0.899513533342699 -0.0313248483471731 -0.116333262252436 -0.960246165979216 -0.0494394135629059 -0.306999984768379 -0.932519759844181 0.0508258091433402 -0.220333292715678 -0.915788453380911 -0.042695490391389 -0.133666600662976 -0.947894356064244 0.0508258091433402 -0.116333262252436 -0.915788453380911 -0.0508258091433402 -0.324333323178919 -0.915788453380911 -0.0494394135629059 -0.150999939073517 -0.932519759844181 0.0494394135629058 -0.237666631126218 -0.932519759844181 -0.0467044396594079 -0.34166666158946 -0.899513533342699 -0.0508258091433402 -0.168333277484057 -0.915788453380911 0.042695490391389 -0.254999969536758 -0.947894356064244 -0.0165596729294389 -0.272333307947299 -0.968236679326732 0.0494394135629058 -0.133666600662976 -0.932519759844181 -0.0313248483471731 -0.289666646357839 -0.960246165979216 -0.0467044396594079 -0.185666615894597 -0.899513533342699 0.0313248483471731 -0.272333307947299 -0.960246165979216 -0.042695490391389 -0.306999984768379 -0.947894356064244 0.042695490391389 -0.150999939073517 -0.947894356064244 0.0165596729294389 -0.289666646357839 -0.968236679326732 -0.0375219194443297 -0.202999954305137 -0.885458639847087 0.0313248483471731 -0.168333277484057 -0.960246165979216 -0.0494394135629059 -0.324333323178919 -0.932519759844181 -0.042695490391389 -0.046999908610275 -0.947894356064244 -0.0508258091433402 -0.34166666158946 -0.915788453380911 -0.0242733170448907 -0.220333292715678 -0.875146838688469 0.0165596729294389 -0.185666615894597 -0.968236679326732 -0.0494394135629059 -0.0643332470208152 -0.932519759844181 -0.0165596729294389 -0.289666646357839 -0.968236679326732 -0.00839432410431742 -0.237666631126218 -0.869695573526461 -0.0313248483471731 -0.306999984768379 -0.960246165979216 -0.0508258091433402 -0.0816665854313555 -0.915788453380911 0.00839432410431743 -0.0643332470208152 -0.869695573526461 -0.042695490391389 -0.324333323178919 -0.947894356064244 0.00839432410431743 -0.254999969536758 -0.869695573526461 -0.0467044396594079 -0.0989999238418958 -0.899513533342699 0.0242733170448908 -0.0816665854313555 -0.875146838688469 -0.0494394135629059 -0.34166666158946 -0.932519759844181 -0.0165596729294389 -0.306999984768379 -0.968236679326732 0.0375219194443297 -0.0989999238418958 -0.885458639847087 0.0242733170448908 -0.272333307947299 -0.875146838688469 -0.0375219194443297 -0.116333262252436 -0.885458639847087 0.0375219194443297 -0.289666646357839 -0.885458639847087 -0.0313248483471731 -0.324333323178919 -0.960246165979216 -0.0242733170448907 -0.133666600662976 -0.875146838688469 -0.042695490391389 -0.34166666158946 -0.947894356064244 0.0467044396594079 -0.306999984768379 -0.899513533342699 0.0467044396594079 -0.116333262252436 -0.899513533342699 -0.0165596729294389 -0.324333323178919 -0.968236679326732 0.0508258091433402 -0.324333323178919 -0.915788453380911 -0.00839432410431742 -0.150999939073517 -0.869695573526461 0.0508258091433402 -0.133666600662976 -0.915788453380911 -0.0313248483471731 -0.34166666158946 -0.960246165979216 0.0494394135629058 -0.34166666158946 -0.932519759844181 -0.0165596729294389 -0.34166666158946 -0.968236679326732 -0.0165596729294389 -0.116333262252436 -0.968236679326732 0.00839432410431743 -0.168333277484057 -0.869695573526461 0.0494394135629058 -0.150999939073517 -0.932519759844181 -0.0313248483471731 -0.133666600662976 -0.960246165979216 -0.042695490391389 -0.150999939073517 -0.947894356064244 0.0242733170448908 -0.185666615894597 -0.875146838688469 0.042695490391389 -0.168333277484057 -0.947894356064244 -0.0494394135629059 -0.168333277484057 -0.932519759844181 0.0375219194443297 -0.202999954305137 -0.885458639847087 -0.0508258091433402 -0.185666615894597 -0.915788453380911 0.0467044396594079 -0.220333292715678 -0.899513533342699 0.0313248483471731 -0.185666615894597 -0.960246165979216 0.0165596729294389 -0.202999954305137 -0.968236679326732 -0.0467044396594079 -0.202999954305137 -0.899513533342699 0.0508258091433402 -0.237666631126218 -0.915788453380911 -0.0375219194443297 -0.220333292715678 -0.885458639847087 -0.00839432410431742 -0.0643332470208152 -0.869695573526461 0.0494394135629058 -0.254999969536758 -0.932519759844181 -0.0242733170448907 -0.237666631126218 -0.875146838688469 0.042695490391389 -0.272333307947299 -0.947894356064244 0.00839432410431743 -0.0816665854313555 -0.869695573526461 -0.00839432410431742 -0.254999969536758 -0.869695573526461 0.0313248483471731 -0.289666646357839 -0.960246165979216 0.0165596729294389 -0.306999984768379 -0.968236679326732 0.0242733170448908 -0.0989999238418958 -0.875146838688469 0.00839432410431743 -0.272333307947299 -0.869695573526461 0.0375219194443297 -0.116333262252436 -0.885458639847087 0.0242733170448908 -0.289666646357839 -0.875146838688469 0.0467044396594079 -0.133666600662976 -0.899513533342699 0.0375219194443297 -0.306999984768379 -0.885458639847087 0.0467044396594079 -0.324333323178919 -0.899513533342699 0.0508258091433402 -0.150999939073517 -0.915788453380911 0.0508258091433402 -0.34166666158946 -0.915788453380911 -0.0165596729294389 -0.133666600662976 -0.968236679326732 0.0494394135629058 -0.168333277484057 -0.932519759844181 -0.0313248483471731 -0.150999939073517 -0.960246165979216 -0.042695490391389 -0.168333277484057 -0.947894356064244 -0.0494394135629059 -0.185666615894597 -0.932519759844181 -0.0508258091433402 -0.202999954305137 -0.915788453380911 -0.0467044396594079 -0.220333292715678 -0.899513533342699 -0.0375219194443297 -0.237666631126218 -0.885458639847087 -0.0242733170448907 -0.254999969536758 -0.875146838688469 -0.00839432410431742 -0.272333307947299 -0.869695573526461 0.00839432410431743 -0.289666646357839 -0.869695573526461 0.0467044396594079 -0.34166666158946 -0.899513533342699 -0.0165596729294389 -0.150999939073517 -0.968236679326732 0.0165596729294389 -0.0643332470208152 -0.968236679326732 2.5483080791105 0.0516525230498979 6.28318530717959 0.059 2.69842514541459 0.0547973342071952 2.83806535412409 0.0569968566883178 2.96709899005554 0.0583318593736884 3.09833736888163 0.0589587672676645 3.23034036002918 0.0588265763530881 3.36144350654417 0.057942178304755 3.4902044063814 0.0563693147096274 3.61574486072379 0.0542104365049165 3.76836881833325 0.0508545968961581 3.93655089681558 0.0464288249269798 4.09079420129765 0.0419765142239933 4.24195603391166 0.0376085023052696 4.39657691325956 0.0336289431418361 4.51528964610026 0.0313008361062597 4.60800128352614 0.0301370159352354 4.69580029810189 0.0296768550886756 4.77580184417805 0.0298403260381806 4.85539095216929 0.0305424952164638 4.95498241065549 0.032094840909959 5.06645453412493 0.0345349752083268 5.20938503250915 0.0383572010050282 5.36668691983052 0.0429349454880199 5.52565110790293 0.0474651119056726 5.70122860570006 0.0519150376126296 5.85220139658127 0.0550186720678838 5.99112609172523 0.0571434367699638 6.12560313624305 0.0584555058032915 6.20148513995915 0.058852336496355 0 0.059 0.125376369506014 0.058654309018953 0.233234562744136 0.0578105272001434 0.353785015517849 0.0562921525018941 0.492199498877033 0.0538530347922422 0.639659618740747 0.0505393060003243 0.782715562444035 0.0467704754890113 0.963147414232909 0.0415674240281568 1.15215275308634 0.0361917466377736 1.29437305861398 0.0327678395054134 1.40709772732558 0.0308071296603489 1.49466315943586 0.029917335368022 1.5771614966377 0.0296665701997347 1.66017901357556 0.030012077455498 1.742210925639 0.0309142814179309 1.84639061320153 0.0327504516820192 1.96070913177636 0.0354371925332016 2.10787762194113 0.0395076238297126 2.2715540635553 0.0442876957323281 2.40348937682447 0.0479930267907713 0 0.359 6.28318530717959 0.359 0.174532925199433 0.359 0.349065850398866 0.359 0.523598775598299 0.359 0.698131700797732 0.359 0.872664625997165 0.359 1.0471975511966 0.359 1.22173047639603 0.359 1.39626340159546 0.359 1.5707963267949 0.359 1.74532925199433 0.359 1.91986217719376 0.359 2.0943951023932 0.359 2.26892802759263 0.359 2.44346095279206 0.359 2.61799387799149 0.359 2.79252680319093 0.359 2.96705972839036 0.359 3.14159265358979 0.359 3.31612557878922 0.359 3.49065850398866 0.359 3.66519142918809 0.359 3.83972435438752 0.359 4.01425727958696 0.359 4.18879020478639 0.359 4.36332312998582 0.359 4.53785605518525 0.359 4.71238898038469 0.359 4.88692190558412 0.359 5.06145483078355 0.359 5.23598775598299 0.359 5.41052068118242 0.359 5.58505360638185 0.359 5.75958653158128 0.359 5.93411945678072 0.359 6.10865238198015 0.359 0.330693963535768 0.34166666158946 1.65346981767884 0.046999908610275 1.32277585414307 0.046999908610275 1.32277585414307 0.0643332470208152 0.992081890607303 0.0643332470208152 0.992081890607303 0.046999908610275 0.330693963535768 0.324333323178919 2.97624567182191 0.324333323178919 2.64555170828614 0.306999984768379 2.97624567182191 0.306999984768379 5.95249134364382 0.0643332470208152 1.32277585414307 0.202999954305137 0.992081890607303 0.202999954305137 0.992081890607303 0.185666615894597 2.64555170828614 0.324333323178919 5.62179738010805 0.0643332470208152 2.64555170828614 0.34166666158946 2.31485774475037 0.34166666158946 0.992081890607303 0.0816665854313555 0.661387927071535 0.0643332470208152 5.62179738010805 0.0816665854313555 5.29110341657228 0.0643332470208152 1.32277585414307 0.185666615894597 5.29110341657228 0.0816665854313555 2.31485774475037 0.324333323178919 0.992081890607303 0.220333292715678 0.661387927071535 0.202999954305137 0.661387927071535 0.0816665854313555 5.95249134364382 0.185666615894597 5.95249134364382 0.168333277484057 0.661387927071535 0.220333292715678 5.62179738010805 0.185666615894597 5.62179738010805 0.168333277484057 0.661387927071535 0.0989999238418958 0.330693963535768 0.0816665854313555 5.29110341657228 0.0989999238418958 4.96040945303652 0.0989999238418958 4.96040945303652 0.0816665854313555 0.330693963535768 0.0989999238418958 5.62179738010805 0.202999954305137 5.29110341657228 0.185666615894597 5.29110341657228 0.202999954305137 0.661387927071535 0.237666631126218 0.330693963535768 0.220333292715678 4.96040945303652 0.116333262252436 4.62971548950075 0.0989999238418958 4.62971548950075 0.116333262252436 4.62971548950075 0.133666600662976 4.29902152596498 0.133666600662976 4.29902152596498 0.116333262252436 5.29110341657228 0.220333292715678 4.96040945303652 0.220333292715678 4.96040945303652 0.202999954305137 0.330693963535768 0.237666631126218 0.330693963535768 0.254999969536758 4.96040945303652 0.237666631126218 4.62971548950075 0.220333292715678 4.29902152596498 0.150999939073517 3.96832756242921 0.133666600662976 0.330693963535768 0.116333262252436 3.96832756242921 0.150999939073517 4.62971548950075 0.046999908610275 4.62971548950075 0.237666631126218 4.62971548950075 0.254999969536758 4.29902152596498 0.237666631126218 4.29902152596498 0.254999969536758 1.98416378121461 0.046999908610275 4.29902152596498 0.046999908610275 3.96832756242921 0.168333277484057 3.63763359889344 0.150999939073517 3.63763359889344 0.168333277484057 4.29902152596498 0.272333307947299 3.96832756242921 0.272333307947299 3.96832756242921 0.254999969536758 4.29902152596498 0.0643332470208152 3.96832756242921 0.046999908610275 3.96832756242921 0.0643332470208152 1.65346981767884 0.0643332470208152 3.96832756242921 0.289666646357839 3.63763359889344 0.289666646357839 3.63763359889344 0.272333307947299 3.63763359889344 0.185666615894597 3.30693963535768 0.168333277484057 3.96832756242921 0.0816665854313555 3.63763359889344 0.0816665854313555 3.63763359889344 0.0643332470208152 3.30693963535768 0.185666615894597 1.32277585414307 0.0816665854313555 3.63763359889344 0.306999984768379 3.30693963535768 0.306999984768379 3.30693963535768 0.289666646357839 3.63763359889344 0.0989999238418958 3.30693963535768 0.0816665854313555 3.30693963535768 0.0989999238418958 0.992081890607303 0.0989999238418958 3.30693963535768 0.202999954305137 2.97624567182191 0.202999954305137 2.97624567182191 0.185666615894597 3.30693963535768 0.324333323178919 2.97624567182191 0.220333292715678 2.64555170828614 0.202999954305137 0.661387927071535 0.116333262252436 3.30693963535768 0.116333262252436 2.97624567182191 0.0989999238418958 2.97624567182191 0.34166666158946 2.64555170828614 0.220333292715678 2.97624567182191 0.116333262252436 2.64555170828614 0.237666631126218 2.31485774475037 0.237666631126218 2.31485774475037 0.220333292715678 5.95249134364382 0.202999954305137 2.97624567182191 0.133666600662976 2.64555170828614 0.133666600662976 2.64555170828614 0.116333262252436 5.62179738010805 0.220333292715678 2.31485774475037 0.254999969536758 1.98416378121461 0.237666631126218 1.98416378121461 0.254999969536758 5.29110341657228 0.237666631126218 2.64555170828614 0.150999939073517 2.31485774475037 0.150999939073517 2.31485774475037 0.133666600662976 1.98416378121461 0.272333307947299 1.65346981767884 0.254999969536758 0.330693963535768 0.133666600662976 4.96040945303652 0.254999969536758 2.31485774475037 0.046999908610275 1.65346981767884 0.272333307947299 1.65346981767884 0.289666646357839 1.32277585414307 0.272333307947299 2.31485774475037 0.168333277484057 1.98416378121461 0.150999939073517 1.98416378121461 0.0643332470208152 4.62971548950075 0.272333307947299 1.32277585414307 0.289666646357839 1.65346981767884 0.0816665854313555 1.32277585414307 0.306999984768379 0.992081890607303 0.306999984768379 0.992081890607303 0.289666646357839 1.98416378121461 0.168333277484057 4.29902152596498 0.289666646357839 1.98416378121461 0.185666615894597 1.65346981767884 0.185666615894597 1.65346981767884 0.168333277484057 1.32277585414307 0.0989999238418958 0.992081890607303 0.324333323178919 0.661387927071535 0.324333323178919 0.661387927071535 0.306999984768379 1.65346981767884 0.202999954305137 3.96832756242921 0.306999984768379 0.661387927071535 0.34166666158946 0.992081890607303 0.116333262252436 3.63763359889344 0.324333323178919 5.95249134364382 0.0816665854313555 1.32277585414307 0.220333292715678 3.30693963535768 0.34166666158946 5.62179738010805 0.0989999238418958 0.661387927071535 0.133666600662976 0.992081890607303 0.237666631126218 5.95249134364382 0.220333292715678 5.29110341657228 0.116333262252436 5.62179738010805 0.237666631126218 4.96040945303652 0.133666600662976 0.661387927071535 0.254999969536758 5.29110341657228 0.254999969536758 0.330693963535768 0.150999939073517 4.62971548950075 0.150999939073517 4.96040945303652 0.272333307947299 4.29902152596498 0.168333277484057 0.330693963535768 0.272333307947299 2.31485774475037 0.0643332470208152 4.96040945303652 0.046999908610275 4.62971548950075 0.289666646357839 4.62971548950075 0.0643332470208152 3.96832756242921 0.185666615894597 4.29902152596498 0.306999984768379 1.98416378121461 0.0816665854313555 4.29902152596498 0.0816665854313555 3.96832756242921 0.324333323178919 1.65346981767884 0.0989999238418958 3.63763359889344 0.202999954305137 3.63763359889344 0.34166666158946 3.96832756242921 0.0989999238418958 5.95249134364382 0.237666631126218 1.32277585414307 0.116333262252436 3.30693963535768 0.220333292715678 5.62179738010805 0.254999969536758 2.97624567182191 0.237666631126218 3.63763359889344 0.116333262252436 0.992081890607303 0.133666600662976 2.64555170828614 0.254999969536758 5.29110341657228 0.272333307947299 3.30693963535768 0.133666600662976 0.661387927071535 0.150999939073517 4.96040945303652 0.289666646357839 2.31485774475037 0.272333307947299 4.62971548950075 0.306999984768379 2.97624567182191 0.150999939073517 0.330693963535768 0.168333277484057 1.98416378121461 0.289666646357839 2.64555170828614 0.168333277484057 4.29902152596498 0.324333323178919 3.96832756242921 0.34166666158946 2.64555170828614 0.0643332470208152 1.65346981767884 0.306999984768379 5.95249134364382 0.254999969536758 1.32277585414307 0.324333323178919 2.31485774475037 0.0816665854313555 2.31485774475037 0.185666615894597 5.62179738010805 0.272333307947299 0.992081890607303 0.34166666158946 5.29110341657228 0.289666646357839 1.98416378121461 0.202999954305137 5.95249134364382 0.0989999238418958 1.98416378121461 0.0989999238418958 5.62179738010805 0.116333262252436 4.96040945303652 0.306999984768379 1.65346981767884 0.220333292715678 5.29110341657228 0.133666600662976 1.65346981767884 0.116333262252436 4.62971548950075 0.324333323178919 4.96040945303652 0.150999939073517 1.32277585414307 0.237666631126218 4.29902152596498 0.34166666158946 4.62971548950075 0.168333277484057 0.992081890607303 0.254999969536758 5.95249134364382 0.272333307947299 1.32277585414307 0.133666600662976 5.62179738010805 0.289666646357839 4.29902152596498 0.185666615894597 0.661387927071535 0.272333307947299 5.29110341657228 0.306999984768379 0.992081890607303 0.150999939073517 0.330693963535768 0.289666646357839 3.96832756242921 0.202999954305137 0.661387927071535 0.168333277484057 4.96040945303652 0.324333323178919 5.29110341657228 0.046999908610275 4.62971548950075 0.34166666158946 3.63763359889344 0.220333292715678 0.330693963535768 0.185666615894597 4.96040945303652 0.0643332470208152 5.95249134364382 0.289666646357839 3.30693963535768 0.237666631126218 5.62179738010805 0.306999984768379 4.62971548950075 0.0816665854313555 2.97624567182191 0.0643332470208152 5.29110341657228 0.324333323178919 2.97624567182191 0.254999969536758 4.29902152596498 0.0989999238418958 2.64555170828614 0.0816665854313555 4.96040945303652 0.34166666158946 5.95249134364382 0.306999984768379 2.31485774475037 0.0989999238418958 2.64555170828614 0.272333307947299 3.96832756242921 0.116333262252436 2.31485774475037 0.289666646357839 5.62179738010805 0.324333323178919 3.63763359889344 0.133666600662976 5.29110341657228 0.34166666158946 1.98416378121461 0.306999984768379 1.98416378121461 0.116333262252436 5.95249134364382 0.324333323178919 1.65346981767884 0.324333323178919 3.30693963535768 0.150999939073517 1.65346981767884 0.133666600662976 5.62179738010805 0.34166666158946 1.32277585414307 0.34166666158946 5.95249134364382 0.34166666158946 5.95249134364382 0.116333262252436 2.97624567182191 0.168333277484057 1.32277585414307 0.150999939073517 5.62179738010805 0.133666600662976 5.29110341657228 0.150999939073517 2.64555170828614 0.185666615894597 0.992081890607303 0.168333277484057 4.96040945303652 0.168333277484057 2.31485774475037 0.202999954305137 4.62971548950075 0.185666615894597 1.98416378121461 0.220333292715678 0.661387927071535 0.185666615894597 0.330693963535768 0.202999954305137 4.29902152596498 0.202999954305137 1.65346981767884 0.237666631126218 3.96832756242921 0.220333292715678 3.30693963535768 0.0643332470208152 1.32277585414307 0.254999969536758 3.63763359889344 0.237666631126218 0.992081890607303 0.272333307947299 2.97624567182191 0.0816665854313555 3.30693963535768 0.254999969536758 0.661387927071535 0.289666646357839 0.330693963535768 0.306999984768379 2.64555170828614 0.0989999238418958 2.97624567182191 0.272333307947299 2.31485774475037 0.116333262252436 2.64555170828614 0.289666646357839 1.98416378121461 0.133666600662976 2.31485774475037 0.306999984768379 1.98416378121461 0.324333323178919 1.65346981767884 0.150999939073517 1.65346981767884 0.34166666158946 5.95249134364382 0.133666600662976 1.32277585414307 0.168333277484057 5.62179738010805 0.150999939073517 5.29110341657228 0.168333277484057 4.96040945303652 0.185666615894597 4.62971548950075 0.202999954305137 4.29902152596498 0.220333292715678 3.96832756242921 0.237666631126218 3.63763359889344 0.254999969536758 3.30693963535768 0.272333307947299 2.97624567182191 0.289666646357839 1.98416378121461 0.34166666158946 5.95249134364382 0.150999939073517 0.330693963535768 0.0643332470208152 88 53 51 89 90 41 88 54 53 88 55 54 91 92 93 88 51 94 91 93 90 95 96 97 98 27 28 99 100 101 98 28 29 98 29 30 95 102 96 98 103 27 104 66 105 106 107 92 108 109 103 104 67 66 99 101 110 104 68 67 108 111 109 104 112 102 113 114 100 104 105 112 106 115 107 116 117 2 113 118 114 116 119 120 121 122 115 116 120 117 123 124 125 123 125 111 121 126 122 127 128 119 127 129 128 130 131 118 132 133 124 132 134 133 135 136 137 138 139 140 130 141 131 138 140 129 142 51 141 135 137 134 143 144 139 145 146 136 147 31 126 145 148 146 149 15 16 143 150 144 149 16 17 149 17 18 151 152 150 149 18 19 149 19 20 151 153 152 154 46 47 154 47 48 154 48 49 149 155 15 156 157 148 154 89 46 156 158 157 159 160 161 162 163 155 162 164 163 165 90 89 165 91 90 159 161 153 166 167 168 169 170 158 171 172 173 169 174 170 175 106 92 171 173 164 166 168 160 176 177 178 176 178 167 175 92 91 179 180 172 179 181 180 182 115 106 183 184 185 186 97 177 183 185 174 186 95 97 187 188 184 182 121 115 189 126 121 190 191 181 192 104 102 192 102 95 192 68 104 192 69 68 187 193 188 192 70 69 190 194 191 195 196 197 198 116 2 198 119 116 195 197 193 198 2 52 198 127 119 199 200 201 202 129 127 189 147 126 199 201 194 202 138 129 203 204 196 203 205 204 206 143 139 206 139 138 207 208 209 210 211 205 212 31 147 213 151 150 214 49 50 213 150 143 214 154 49 207 209 200 210 215 211 216 217 215 218 219 208 220 165 89 221 153 151 220 89 154 216 222 217 223 175 91 224 225 226 218 227 219 223 91 165 221 159 153 228 160 159 228 166 160 229 230 231 224 226 222 232 106 175 233 234 235 229 231 227 232 182 106 236 99 110 237 176 167 237 167 166 233 235 225 238 88 94 238 94 234 238 55 88 239 189 121 240 177 176 238 56 55 240 186 177 238 57 56 236 110 230 239 121 182 241 103 98 242 100 99 241 108 103 241 30 2 241 98 30 243 192 95 243 95 186 243 71 70 243 72 71 244 111 108 244 123 111 242 113 100 245 147 189 243 70 192 246 130 118 247 127 198 247 198 52 247 202 127 248 124 123 248 132 124 249 206 138 249 138 202 250 134 132 246 118 113 250 135 134 251 142 141 245 212 147 252 143 206 253 31 212 252 213 143 254 145 136 254 136 135 251 141 130 255 151 213 255 221 151 256 148 145 257 51 142 258 220 154 259 149 20 258 214 50 259 20 21 259 21 22 256 156 148 259 22 23 260 228 159 258 154 214 258 50 1 261 155 149 260 159 221 262 158 156 263 166 228 261 162 155 263 237 166 264 165 220 262 169 158 264 223 165 265 164 162 266 240 176 267 232 175 266 176 237 268 183 174 268 174 169 269 72 243 265 171 164 269 243 186 267 175 223 269 73 72 270 179 172 269 74 73 269 186 240 271 202 247 272 239 182 272 182 232 271 249 202 271 247 52 273 187 184 274 252 206 270 172 171 273 184 183 275 193 187 274 206 249 276 190 181 275 195 193 277 189 239 276 181 179 278 196 195 277 245 189 279 213 252 280 199 194 279 255 213 281 253 212 282 221 255 280 194 190 282 260 221 278 203 196 283 210 205 283 205 203 284 228 260 285 207 200 281 212 245 286 31 253 284 263 228 287 216 215 285 200 199 288 208 207 288 218 208 289 237 263 287 215 210 289 266 237 290 74 269 290 269 240 291 1 3 291 3 4 290 75 74 290 76 75 292 222 216 290 240 266 293 249 271 292 224 222 291 258 1 293 271 52 294 225 224 295 264 220 293 274 249 296 227 218 297 279 252 294 233 225 298 57 238 297 252 274 298 234 233 298 238 234 298 58 57 296 229 227 298 59 58 299 282 255 300 236 230 295 220 258 301 108 241 301 241 2 299 255 279 302 267 223 301 244 108 303 123 244 300 230 229 304 260 282 305 99 236 305 242 99 303 248 123 304 284 260 306 132 248 302 223 264 307 232 267 306 250 132 308 289 263 309 254 135 310 246 113 310 113 242 308 263 284 309 135 250 311 290 266 311 266 289 307 272 232 311 76 290 311 77 76 311 78 77 312 256 145 313 130 246 314 297 274 312 145 254 314 274 293 314 293 52 315 277 239 316 299 279 315 239 272 317 156 256 313 251 130 316 279 297 318 142 251 318 257 142 317 262 156 319 304 282 319 282 299 320 281 245 321 51 257 322 169 262 320 245 277 323 253 281 323 286 253 324 284 304 324 308 284 322 268 169 325 23 24 325 24 25 325 259 23 326 289 308 327 183 268 326 311 289 326 78 311 328 31 286 326 79 78 329 149 259 330 297 314 329 261 149 330 316 297 327 273 183 330 314 52 331 275 187 331 187 273 332 299 316 333 265 162 332 319 299 333 162 261 334 4 5 334 5 6 334 291 4 335 324 304 335 304 319 336 278 195 337 270 171 337 171 265 338 258 291 336 195 275 338 295 258 339 308 324 339 326 308 339 79 326 339 80 79 339 81 80 340 332 316 341 302 264 340 316 330 342 203 278 343 276 179 340 330 52 342 283 203 343 179 270 341 264 295 344 210 283 345 319 332 345 335 319 344 287 210 346 190 276 347 324 335 348 292 216 349 267 302 349 307 267 347 339 324 347 82 81 347 83 82 347 81 339 348 216 287 350 340 52 351 294 224 346 280 190 350 332 340 351 224 292 350 345 332 352 199 280 353 315 272 352 285 199 353 272 307 354 335 345 354 84 83 354 85 84 355 233 294 355 298 233 354 347 335 355 59 298 355 60 59 354 83 347 355 61 60 356 85 354 356 86 85 356 87 86 357 303 244 356 52 87 357 301 2 356 350 52 358 207 285 356 345 350 356 354 345 357 244 301 358 288 207 359 277 315 360 248 303 359 320 277 360 306 248 361 309 250 361 250 306 362 296 218 362 218 288 363 323 281 363 281 320 364 254 309 364 312 254 365 300 229 365 229 296 366 317 256 366 256 312 367 305 236 367 236 300 368 286 323 368 328 286 369 31 328 369 51 31 370 322 262 371 242 305 370 262 317 372 327 268 371 310 242 373 6 7 373 7 8 373 8 9 372 268 322 373 334 6 374 313 246 374 246 310 375 273 327 376 251 313 376 318 251 375 331 273 377 291 334 378 275 331 377 338 291 378 336 275 379 321 257 379 257 318 380 51 321 381 341 295 381 295 338 382 278 336 382 342 278 109 259 325 383 349 302 384 283 342 109 325 25 109 329 259 384 344 283 383 302 341 125 333 261 125 261 329 385 353 307 386 287 344 386 348 287 385 307 349 387 351 292 133 265 333 387 292 348 388 359 315 133 337 265 388 315 353 389 355 294 389 294 351 389 62 61 137 343 270 137 270 337 389 61 355 390 357 2 390 303 357 391 320 359 391 363 320 390 360 303 392 361 306 146 346 276 392 306 360 393 364 309 101 368 323 393 309 361 146 276 343 394 312 364 394 366 312 157 280 346 101 323 363 114 328 368 157 352 280 395 317 366 395 370 317 114 369 328 131 51 369 170 358 285 170 285 352 396 322 370 396 372 322 185 288 358 163 11 12 163 12 13 397 327 372 185 362 288 397 375 327 188 365 296 173 9 10 173 10 11 173 373 9 398 331 375 188 296 362 398 378 331 180 377 334 180 334 373 197 300 365 197 367 300 399 336 378 399 382 336 191 338 377 400 342 382 204 371 305 204 305 367 191 381 338 211 374 310 400 384 342 96 386 344 201 341 381 211 310 371 217 313 374 96 344 384 112 348 386 217 376 313 201 383 341 112 387 348 226 318 376 209 385 349 401 62 389 401 63 62 401 64 63 401 351 387 401 389 351 226 379 318 402 360 390 402 390 2 235 321 379 402 392 360 235 380 321 209 349 383 219 388 353 219 353 385 120 361 392 120 393 361 94 51 380 128 364 393 128 394 364 231 359 388 231 391 359 103 25 26 103 26 27 140 366 394 140 395 366 103 109 25 111 329 109 111 125 329 110 363 391 110 101 363 144 396 370 144 370 395 124 133 333 124 333 125 100 114 368 152 397 372 100 368 101 152 372 396 134 337 133 134 137 337 118 131 369 161 398 375 118 369 114 403 32 33 136 146 343 403 33 34 136 343 137 403 34 35 161 375 397 168 399 378 141 51 131 168 378 398 148 346 146 93 37 38 178 400 382 93 38 39 155 13 14 178 382 399 148 157 346 155 14 15 158 352 157 158 170 352 107 403 35 107 35 36 97 384 400 107 36 37 155 163 13 97 96 384 102 386 96 102 112 386 174 358 170 174 185 358 164 173 11 164 11 163 105 401 387 172 180 373 105 387 112 172 373 173 105 65 64 105 66 65 122 31 32 184 362 185 184 188 362 105 64 401 117 120 392 117 402 2 117 392 402 119 393 120 119 128 393 181 377 180 122 32 403 181 191 377 90 39 40 90 40 41 129 394 128 193 197 365 129 140 394 193 365 188 194 201 381 194 381 191 139 395 140 139 144 395 90 93 39 92 37 93 196 367 197 196 204 367 150 396 144 92 107 37 150 152 396 200 209 383 115 403 107 205 371 204 115 122 403 205 211 371 215 217 374 200 383 201 215 374 211 153 397 152 153 161 397 208 219 385 208 385 209 222 376 217 160 168 398 160 398 161 222 226 376 225 379 226 227 231 388 225 235 379 126 31 122 167 399 168 167 178 399 89 41 42 89 42 43 89 43 44 227 388 219 89 44 45 234 94 380 89 45 46 230 110 391 230 391 231 177 97 400 234 380 235 177 400 178 
+37 36 1 0
+0.059 -1.44503549751041e-17 -1.02 0.0581036574277203 0.0102452424823489 -1.02 0.0554418646263686 0.0201791884562145 -1.02 0.0510954988232819 0.0295 -1.02 0.0451966221440197 0.0379244689715058 -1.02 0.0379244689715058 0.0451966221440197 -1.02 0.0295 0.0510954988232819 -1.02 0.0201791884562145 0.0554418646263686 -1.02 0.0102452424823489 0.0581036574277203 -1.02 3.61258874377601e-18 0.059 -1.02 -0.0102452424823489 0.0581036574277203 -1.02 -0.0201791884562145 0.0554418646263686 -1.02 -0.0295 0.0510954988232819 -1.02 -0.0379244689715058 0.0451966221440197 -1.02 -0.0451966221440197 0.0379244689715058 -1.02 -0.0510954988232819 0.0295 -1.02 -0.0554418646263686 0.0201791884562145 -1.02 -0.0581036574277203 0.010245242482349 -1.02 -0.059 8.58289676310131e-17 -1.02 -0.0581036574277203 -0.0102452424823488 -1.02 -0.0554418646263686 -0.0201791884562144 -1.02 -0.0510954988232819 -0.0294999999999999 -1.02 -0.0451966221440198 -0.0379244689715057 -1.02 -0.0379244689715059 -0.0451966221440196 -1.02 -0.0295000000000001 -0.0510954988232818 -1.02 -0.0201791884562146 -0.0554418646263685 -1.02 -0.010245242482349 -0.0581036574277202 -1.02 -1.6804534651825e-16 -0.059 -1.02 0.0102452424823487 -0.0581036574277203 -1.02 0.0201791884562143 -0.0554418646263687 -1.02 0.0294999999999998 -0.051095498823282 -1.02 0.0379244689715056 -0.0451966221440198 -1.02 0.0451966221440196 -0.037924468971506 -1.02 0.0510954988232818 -0.0295000000000002 -1.02 0.0554418646263685 -0.0201791884562147 -1.02 0.0581036574277202 -0.0102452424823492 -1.02 0 0 -1.02 0.059 -1.46536699874994e-17 0.0581036574277203 0.0102452424823489 0.0554418646263686 0.0201791884562144 0.0510954988232819 0.0295 0.0451966221440197 0.0379244689715058 0.0379244689715058 0.0451966221440197 0.0295 0.0510954988232819 0.0201791884562145 0.0554418646263686 0.0102452424823489 0.0581036574277203 6.16301172422229e-18 0.059 -0.0102452424823489 0.0581036574277203 -0.0201791884562145 0.0554418646263686 -0.0295 0.0510954988232819 -0.0379244689715058 0.0451966221440197 -0.0451966221440197 0.0379244689715058 -0.0510954988232819 0.0295 -0.0554418646263686 0.0201791884562145 -0.0581036574277203 0.010245242482349 -0.059 8.24908446672018e-17 -0.0581036574277203 -0.0102452424823488 -0.0554418646263686 -0.0201791884562144 -0.0510954988232819 -0.0294999999999999 -0.0451966221440198 -0.0379244689715057 -0.0379244689715059 -0.0451966221440196 -0.0295000000000001 -0.0510954988232818 -0.0201791884562146 -0.0554418646263685 -0.010245242482349 -0.0581036574277202 -1.67309335873458e-16 -0.059 0.0102452424823487 -0.0581036574277203 0.0201791884562143 -0.0554418646263687 0.0294999999999998 -0.051095498823282 0.0379244689715056 -0.0451966221440198 0.0451966221440195 -0.037924468971506 0.0510954988232818 -0.0295000000000002 0.0554418646263685 -0.0201791884562147 0.0581036574277202 -0.0102452424823492 -7.75882179684939e-19 -7.75882179684939e-19 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 
+370 648 1 0.00112884631280738
+0.059 -1.44503549751041e-17 1.03 0.059 -1.44503549751041e-17 1.03 0.0581036574277203 0.0102452424823489 1.03 0.0554418646263686 0.0201791884562145 1.03 0.0510954988232819 0.0295 1.03 0.0451966221440197 0.0379244689715058 1.03 0.0379244689715058 0.0451966221440197 1.03 0.0295 0.0510954988232819 1.03 0.0201791884562145 0.0554418646263686 1.03 0.0102452424823489 0.0581036574277203 1.03 3.61258874377601e-18 0.059 1.03 -0.0102452424823489 0.0581036574277203 1.03 -0.0201791884562145 0.0554418646263686 1.03 -0.0295 0.0510954988232819 1.03 -0.0379244689715058 0.0451966221440197 1.03 -0.0451966221440197 0.0379244689715058 1.03 -0.0510954988232819 0.0295 1.03 -0.0554418646263686 0.0201791884562145 1.03 -0.0581036574277203 0.010245242482349 1.03 -0.059 8.58289676310131e-17 1.03 -0.0581036574277203 -0.0102452424823488 1.03 -0.0554418646263686 -0.0201791884562144 1.03 -0.0510954988232819 -0.0294999999999999 1.03 -0.0451966221440198 -0.0379244689715057 1.03 -0.0379244689715059 -0.0451966221440196 1.03 -0.0295000000000001 -0.0510954988232818 1.03 -0.0201791884562146 -0.0554418646263685 1.03 -0.010245242482349 -0.0581036574277202 1.03 -1.6804534651825e-16 -0.059 1.03 0.0102452424823487 -0.0581036574277203 1.03 0.0201791884562143 -0.0554418646263687 1.03 0.0294999999999998 -0.051095498823282 1.03 0.0379244689715056 -0.0451966221440198 1.03 0.0451966221440196 -0.037924468971506 1.03 0.0510954988232818 -0.0295000000000002 1.03 0.0554418646263685 -0.0201791884562147 1.03 0.0581036574277202 -0.0102452424823492 1.03 0.059 0.18 1.21 0.059 0.00273460445780259 1.06125667198005 0.059 0.0108553282585365 1.09156362579862 0.059 0.024115427318801 1.12 0.059 0.0421120002385838 1.14570176974358 0.059 0.0642982302564227 1.16788799976142 0.059 0.0899999999999997 1.1858845726812 0.059 0.118436374201379 1.19914467174146 0.059 0.148743328019952 1.2072653955422 0.059 0.18 1.21 0.0581036574277203 0.18 1.19975475751765 0.0554418646263686 0.18 1.18982081154379 0.0510954988232819 0.18 1.1805 0.0451966221440197 0.18 1.17207553102849 0.0379244689715058 0.18 1.16480337785598 0.0295 0.18 1.15890450117672 0.0201791884562145 0.18 1.15455813537363 0.0102452424823489 0.18 1.15189634257228 3.61258874377601e-18 0.18 1.151 -0.0102452424823489 0.18 1.15189634257228 -0.0201791884562145 0.18 1.15455813537363 -0.0295 0.18 1.15890450117672 -0.0379244689715058 0.18 1.16480337785598 -0.0451966221440197 0.18 1.17207553102849 -0.0510954988232819 0.18 1.1805 -0.0554418646263686 0.18 1.18982081154379 -0.0581036574277203 0.18 1.19975475751765 -0.059 0.18 1.21 -0.0581036574277203 0.18 1.22024524248235 -0.0554418646263686 0.18 1.23017918845621 -0.0510954988232819 0.18 1.2395 -0.0451966221440198 0.18 1.24792446897151 -0.0379244689715059 0.18 1.25519662214402 -0.0295000000000001 0.18 1.26109549882328 -0.0201791884562146 0.18 1.26544186462637 -0.010245242482349 0.18 1.26810365742772 -1.6804534651825e-16 0.18 1.269 0.0102452424823487 0.18 1.26810365742772 0.0201791884562143 0.18 1.26544186462637 0.0294999999999998 0.18 1.26109549882328 0.0379244689715056 0.18 1.25519662214402 0.0451966221440196 0.18 1.24792446897151 0.0510954988232818 0.18 1.2395 0.0554418646263685 0.18 1.23017918845621 0.0581036574277202 0.18 1.22024524248235 0.059 0.00273460445780259 1.06125667198005 0.059 0.0108553282585365 1.09156362579862 0.059 0.024115427318801 1.12 0.059 0.0421120002385838 1.14570176974358 0.059 0.0642982302564227 1.16788799976142 0.059 0.0899999999999997 1.1858845726812 0.059 0.118436374201379 1.19914467174146 0.059 0.148743328019952 1.2072653955422 -0.0581036574277203 0.0499603113105937 1.13911625481769 -0.0581036574277203 0.0329880675764467 1.11487737875883 -0.059 0.0421120002385839 1.14570176974358 0.0554418646263685 0.0799104057718923 1.20336026251203 0.0510954988232818 0.0453359957706696 1.19048631083343 0.0554418646263685 0.0513272979432382 1.18334615494495 0.0451966221440197 0.108962234485753 1.15304101912684 0.0451966221440197 0.0886756090152483 1.13883617104756 0.0379244689715058 0.11259831107201 1.14674314973923 0.0581036574277203 0.0499603113105937 1.13911625481769 0.0581036574277203 0.0329880675764467 1.11487737875883 0.0554418646263686 0.0415911171496364 1.10991040577189 0.0379244689715057 0.00748937899740922 1.17475359845744 0.0379244689715057 -0.0150259956231665 1.14259831107201 0.0451966221440196 0.0130601715247235 1.1700791485024 0.0554418646263686 0.0575701554221175 1.13273083743039 0.0379244689715058 0.133894529384913 1.15667373942828 0.0294999999999999 0.115547749411641 1.1416345726812 0.0294999999999999 0.135912064032215 1.15113060854185 -0.0451966221440197 0.0464926718982847 1.07859269348544 -0.0451966221440197 0.0400829155298124 1.05467115705416 -0.0510954988232819 0.0385762605717208 1.08147403157051 0.0102452424823487 -0.0437442498669647 1.11143624703979 0.0201791884562143 -0.0518649736676986 1.07088405073887 0.0201791884562143 -0.0412429828134735 1.11052586028437 0.0554418646263686 0.077269162569607 1.15242984457788 0.0510954988232819 0.0647103113105937 1.12673953525782 -0.0510954988232819 0.108346779973272 1.22686560405465 -0.0510954988232819 0.0752499999999997 1.21143232209284 -0.0451966221440198 0.0710377655142468 1.21872812623556 -0.0451966221440198 0.105465441888195 1.23478201538121 -0.0554418646263686 0.0799104057718925 1.20336026251203 0.0102452424823487 -0.0544863278553818 1.07134626620815 0.0510954988232819 0.0832604647421756 1.14528968868941 0.0294999999999999 0.157615968277598 1.156946152157 0.0201791884562144 0.158370706778778 1.1526658174167 -0.059 0.0642982302564228 1.16788799976142 -0.0581036574277203 0.034263689166574 1.15228728466946 0.0581036574277202 0.11493229489916 1.20877205050029 0.0581036574277202 0.0848773787588251 1.19475721293884 0.0510954988232819 0.10475 1.16033682326956 -0.0581036574277203 0.0577127153305347 1.17573631083343 0.0451966221440196 0.039920851497597 1.19693982847528 0.0510954988232818 0.0195136891665738 1.16466400422933 -0.0510954988232819 0.049663176730442 1.10525 0.0451966221440197 0.131407306514564 1.16350732810172 -0.0554418646263686 0.0298175627442894 1.08466193687063 -0.0554418646263686 0.0415911171496364 1.10991040577189 -0.0295 0.0530538478429967 1.0523840317224 -0.0379244689715058 0.0472445883551965 1.05340836090804 0.0201791884562143 -0.0238986358808122 1.14772093231318 0.0294999999999998 -0.0201345726811991 1.14554774941164 0.0581036574277203 0.0708837451823107 1.16003968868941 0.0379244689715058 0.156591639091962 1.1627554116448 -0.010245242482349 -0.0544863278553817 1.07134626620815 -0.0451966221440198 0.142157813094064 1.24461370661421 -0.0379244689715059 0.102978219017845 1.24161560405465 0 -0.0553690529699177 1.0715019144624 0.0510954988232818 0.0752499999999996 1.21143232209284 -0.0379244689715059 0.140895016947942 1.25177537943959 0.0554418646263686 0.100089594228107 1.16840888285036 0.0294999999999998 0.00297057729661632 1.17854532329794 -0.0581036574277203 0.0848773787588253 1.19475721293884 0.0510954988232819 0.128525968429487 1.17142373942828 -0.0554418646263686 0.0575701554221176 1.13273083743039 0.0451966221440197 0.15532884294584 1.16991708447019 0.0581036574277203 0.0951226212411742 1.17701193242355 -0.0379244689715058 0.0533262605717208 1.07610547061509 0 -0.0445865363678321 1.11174281425483 0.0554418646263686 0.125338063129369 1.18018243725571 0.0554418646263685 0.111534685273389 1.21810690622722 -0.0554418646263686 0.111534685273389 1.21810690622722 0.0510954988232819 0.153865949261127 1.17821356682834 0.0379244689715057 0.0352464015425624 1.20251062100259 -0.0581036574277203 0.0708837451823108 1.16003968868941 0.0581036574277203 0.121940453503598 1.18951729298264 0.0102452424823487 -0.0262038160663933 1.14905182871386 0.0554418646263686 0.152247407322171 1.18739277430102 0.0581036574277203 0.150522395706768 1.19717580131409 -0.0451966221440197 0.0569589808731597 1.10103776551425 -0.0201791884562146 -0.0518649736676985 1.07088405073887 -0.0201791884562145 0.0573341825833036 1.05162929322122 0.0581036574277202 0.146964260333136 1.2173549897703 -0.0510954988232819 0.143620706778778 1.23631722425606 0.0451966221440196 0.0710377655142466 1.21872812623556 -0.059 0.0899999999999997 1.1858845726812 -0.0510954988232819 0.0647103113105937 1.12673953525782 0.0201791884562143 -0.000358932074600604 1.18133911338332 -0.0295 0.0588693914581495 1.07408793596778 -0.010245242482349 -0.0437442498669646 1.11143624703979 0.0510954988232818 0.108346779973272 1.22686560405465 0.0294999999999998 0.0314546767020638 1.20702942270338 -0.0581036574277203 0.11493229489916 1.20877205050029 -0.0554418646263686 0.0772691625696071 1.15242984457788 0 -0.026980071504481 1.1495 -0.0379244689715058 0.0632568502607684 1.09740168892799 -0.0295000000000001 -0.0475846389273915 1.07012931223769 -0.0102452424823489 0.0599555367709869 1.05116707775194 0.0554418646263685 0.145239248717733 1.22713801678337 -0.0554418646263686 0.145239248717733 1.22713801678337 0.0379244689715057 0.0674016889279897 1.22502599562317 0.0102452424823487 -0.00239798365881013 1.18305008081559 -0.0581036574277203 0.0951226212411742 1.17701193242355 -0.0201791884562146 -0.0412429828134734 1.11052586028437 -0.0451966221440197 0.071163828952444 1.12132439098475 -0.0201791884562145 0.0629536393305463 1.07260139131287 0.0451966221440196 0.105465441888195 1.23478201538121 -0.059 0.118436374201379 1.19914467174146 -0.0510954988232819 0.0832604647421757 1.14528968868941 0.0201791884562143 0.0286608866166744 1.2103589320746 -0.010245242482349 -0.0262038160663932 1.14905182871386 -0.0295 0.068365427318801 1.09445225058836 -0.0379244689715059 -0.0417753794395912 1.06910498305206 0.0510954988232818 0.143620706778778 1.23631722425606 0 0.0608382618855228 1.0510114294977 0.0294999999999998 0.0644522505883586 1.2301345726812 -0.0581036574277203 0.146964260333136 1.2173549897703 0 -0.00308462190543596 1.18362623871508 -0.0554418646263686 0.100089594228107 1.16840888285036 -0.0379244689715058 0.0767346214797583 1.11664994102972 -0.0295000000000001 -0.0371587349410765 1.10903931562946 -0.0102452424823489 0.0654549063840376 1.07169100455745 0.0379244689715057 0.102978219017845 1.24161560405465 0.0102452424823487 0.0269499191844127 1.21239798365881 -0.0581036574277203 0.121940453503599 1.18951729298264 -0.0451966221440197 0.0886756090152483 1.13883617104756 -0.0201791884562146 -0.0238986358808121 1.14772093231318 -0.0201791884562145 0.072129490518414 1.09227906768682 -0.0451966221440198 -0.0346137066142072 1.06784218690594 0.0102452424823489 0.0599555367709869 1.05116707775194 0.0451966221440196 0.142157813094064 1.24461370661421 -0.059 0.148743328019952 1.2072653955422 0.0201791884562143 0.0622790676868153 1.23389863588081 -0.0510954988232819 0.10475 1.16033682326956 -0.010245242482349 -0.00239798365881009 1.18305008081559 -0.0295 0.0812534231805512 1.11285821618922 -0.0379244689715059 -0.0316156040546478 1.10702178098215 0.0294999999999998 0.100960684370544 1.24715873494108 0 0.0662971928849051 1.07138443734241 -0.0554418646263686 0.125338063129369 1.18018243725571 0 0.0263737612849168 1.21308462190544 -0.0295000000000001 -0.020134572681199 1.14554774941164 -0.0379244689715058 0.0933500589702829 1.13326537852024 -0.0102452424823489 0.0744346707039951 1.09094817128614 -0.0510954988232819 -0.0263172242560575 1.06637929322122 0.0201791884562144 0.0573341825833037 1.05162929322122 0.0379244689715057 0.140895016947942 1.25177537943959 0.0102452424823487 0.0609481712861394 1.23620381606639 -0.0581036574277203 0.150522395706768 1.19717580131409 -0.0451966221440197 0.108962234485753 1.15304101912684 -0.0201791884562146 -0.000358932074600519 1.18133911338332 -0.0201791884562145 0.0845829325517682 1.11006442610383 0.0102452424823489 0.0654549063840376 1.07169100455745 -0.0451966221440198 -0.0247820153812116 1.1045345581118 -0.0510954988232819 0.128525968429487 1.17142373942828 0.0201791884562143 0.0994741397156262 1.25124298281347 -0.0295 0.0971417838107815 1.12874657681945 -0.010245242482349 0.0269499191844128 1.21239798365881 -0.0379244689715059 -0.0150259956231664 1.14259831107201 0 0.0752109261420829 1.0905 -0.0554418646263686 -0.0171380167833718 1.06476075128227 0.0294999999999999 0.0530538478429967 1.0523840317224 0.0294999999999998 0.139870687762306 1.25758463892739 -0.0554418646263686 0.152247407322171 1.18739277430102 0 0.0604999999999996 1.23698007150448 -0.0379244689715058 0.11259831107201 1.14674314973923 -0.0102452424823489 0.0866219841359777 1.10835345867157 -0.0295000000000001 0.00297057729661643 1.17854532329794 -0.0510954988232819 -0.0168656040546477 1.10165322002673 0.0201791884562144 0.0629536393305463 1.07260139131287 -0.0451966221440197 0.131407306514564 1.16350732810172 0.0102452424823487 0.0985637529602047 1.25374424986696 -0.0201791884562146 0.0286608866166745 1.2103589320746 -0.0201791884562145 0.0999355738961709 1.12541706744823 0.0102452424823489 0.0744346707039951 1.09094817128614 -0.0451966221440198 -0.00872812623555773 1.13896223448575 0.0379244689715058 0.0472445883551965 1.05340836090804 -0.0510954988232819 0.153865949261127 1.17821356682834 -0.0581036574277203 -0.00735498977030456 1.06303573966686 0.0201791884562143 0.139115949261126 1.2618649736677 -0.0295 0.115547749411641 1.1416345726812 -0.010245242482349 0.0609481712861395 1.23620381606639 -0.0379244689715059 0.00748937899740935 1.17475359845744 0 0.0873086223826036 1.10777730077207 0.0294999999999999 0.0588693914581496 1.07408793596778 -0.0554418646263686 -0.00810690622721636 1.09846531472661 -0.0379244689715058 0.133894529384913 1.15667373942828 0 0.0982571857451647 1.25458653636783 -0.0102452424823489 0.101646541328433 1.12337801586402 -0.0295000000000001 0.0314546767020639 1.20702942270338 0.0201791884562144 0.0721294905184141 1.09227906768682 -0.0510954988232819 -0.00143232209283991 1.13475 0.0451966221440197 0.0400829155298124 1.05467115705416 -0.059 0.00273460445780265 1.06125667198005 -0.0451966221440197 0.15532884294584 1.16991708447019 0.0102452424823487 0.138653733791845 1.26448632785538 -0.0201791884562145 0.117720932313184 1.13787050948159 0.0102452424823489 0.0866219841359777 1.10835345867157 -0.0201791884562146 0.0622790676868153 1.23389863588081 0.0379244689715058 0.0533262605717208 1.07610547061509 -0.0451966221440198 0.0130601715247237 1.1700791485024 -0.0295 0.135912064032215 1.15113060854185 -0.0581036574277203 0.001227949499711 1.09506770510084 0 0.102222699227929 1.1226913776174 -0.010245242482349 0.0985637529602047 1.25374424986696 0.0294999999999999 0.068365427318801 1.09445225058836 -0.0379244689715059 0.0352464015425625 1.20251062100259 0.0510954988232819 0.0317864331716627 1.05613405073887 -0.0554418646263686 0.00663973748796562 1.13008959422811 -0.0379244689715058 0.156591639091962 1.1627554116448 -0.0102452424823489 0.11905182871386 1.135565329296 -0.0581036574277203 0.0128241986859099 1.05947760429323 0.0201791884562144 0.0845829325517682 1.11006442610383 0 0.138498085537603 1.26536905296992 -0.0295000000000001 0.0644522505883587 1.2301345726812 0.0451966221440197 0.0464926718982846 1.07859269348544 -0.0510954988232819 0.019513689166574 1.16466400422933 0.0581036574277202 -0.00735498977030489 1.06303573966686 -0.0201791884562145 0.137398608687132 1.14704636066945 0.0102452424823489 0.101646541328433 1.12337801586402 -0.059 0.0108553282585365 1.09156362579862 0.0554418646263685 -0.0171380167833721 1.06476075128227 0.0379244689715058 0.0632568502607684 1.09740168892799 0.0581036574277202 0.00122794949971069 1.09506770510084 -0.0201791884562146 0.0994741397156262 1.25124298281347 0.0554418646263686 0.022607225698977 1.05775259267783 0.0510954988232818 -0.0263172242560578 1.06637929322122 -0.0451966221440198 0.0399208514975972 1.19693982847528 -0.0295 0.157615968277598 1.156946152157 0.0554418646263685 -0.00810690622721665 1.09846531472661 0 0.1195 1.13478907385792 -0.0581036574277203 0.0152427870611554 1.12512262124117 0.0294999999999999 0.0812534231805512 1.11285821618922 0.0581036574277202 0.0152427870611551 1.12512262124117 -0.0554418646263686 0.0226072256989771 1.05775259267783 0.0510954988232819 0.0385762605717208 1.08147403157051 -0.010245242482349 0.138653733791845 1.26448632785538 0.0451966221440196 -0.0346137066142074 1.06784218690594 -0.0102452424823489 0.138308995442554 1.14454509361596 0.0510954988232818 -0.016865604054648 1.10165322002673 -0.0379244689715059 0.0674016889279898 1.22502599562317 0.0201791884562144 0.0999355738961709 1.12541706744823 -0.0554418646263686 0.0266538450550501 1.15867270205676 0.0554418646263685 0.00663973748796536 1.13008959422811 0.0451966221440197 0.0569589808731597 1.10103776551425 -0.0581036574277203 0.0204827070173621 1.0880595464964 0.0581036574277203 0.0128241986859098 1.05947760429323 0.0379244689715057 -0.0417753794395914 1.06910498305206 -0.0201791884562145 0.158370706778778 1.1526658174167 -0.0295000000000001 0.100960684370544 1.24715873494108 0.0102452424823489 0.11905182871386 1.135565329296 0.0581036574277202 0.0342636891665738 1.15228728466946 -0.0510954988232819 0.0453359957706698 1.19048631083343 0.0379244689715058 0.0767346214797583 1.11664994102972 0.0451966221440196 -0.0247820153812119 1.1045345581118 -0.059 0.024115427318801 1.12 0.0554418646263686 0.0298175627442894 1.08466193687063 0.0510954988232818 -0.00143232209284017 1.13475 -0.0510954988232819 0.0317864331716628 1.05613405073887 0 0.138615562657594 1.14370280711509 0.0294999999999998 -0.0475846389273917 1.07012931223769 0.0294999999999999 0.0971417838107815 1.12874657681945 -0.0201791884562146 0.139115949261126 1.2618649736677 0.0554418646263685 0.0266538450550499 1.15867270205676 0.0510954988232819 0.0496631767304419 1.10525 -0.0102452424823489 0.158832922248059 1.15004446322901 0.0379244689715057 -0.031615604054648 1.10702178098215 0.0201791884562144 0.117720932313184 1.13787050948159 0.0581036574277202 0.0577127153305345 1.17573631083343 0.0451966221440197 0.071163828952444 1.12132439098475 0.0451966221440196 -0.00872812623555795 1.13896223448575 0.0581036574277203 0.020482707017362 1.0880595464964 -0.0554418646263686 0.0513272979432384 1.18334615494495 0.0102452424823489 0.138308995442554 1.14454509361596 0.0379244689715058 0.0933500589702829 1.13326537852024 0.0294999999999998 -0.0371587349410767 1.10903931562946 0 0.158988570502301 1.14916173811448 -0.0295000000000001 0.139870687762306 1.25758463892739 0.0201791884562144 0.137398608687132 1.14704636066945 0.0102452424823489 0.158832922248059 1.15004446322901 1.5707963267949 10.9955742875643 1.5707963267949 4.71238898038469 1.5707963267949 10.8210413623648 1.5707963267949 10.6465084371654 1.5707963267949 10.471975511966 1.5707963267949 10.2974425867665 1.5707963267949 10.1229096615671 1.5707963267949 9.94837673636768 1.5707963267949 9.77384381116824 1.5707963267949 9.59931088596881 1.5707963267949 9.42477796076938 1.5707963267949 9.25024503556995 1.5707963267949 9.07571211037051 1.5707963267949 8.90117918517108 1.5707963267949 8.72664625997165 1.5707963267949 8.55211333477222 1.5707963267949 8.37758040957278 1.5707963267949 8.20304748437335 1.5707963267949 8.02851455917392 1.5707963267949 7.85398163397448 1.5707963267949 7.67944870877505 1.5707963267949 7.50491578357562 1.5707963267949 7.33038285837619 1.5707963267949 7.15584993317675 1.5707963267949 6.98131700797732 1.5707963267949 6.80678408277789 1.5707963267949 6.63225115757845 1.5707963267949 6.45771823237902 1.5707963267949 6.28318530717959 1.5707963267949 6.10865238198016 1.5707963267949 5.93411945678072 1.5707963267949 5.75958653158129 1.5707963267949 5.58505360638186 1.5707963267949 5.41052068118243 1.5707963267949 5.23598775598299 1.5707963267949 5.06145483078356 1.5707963267949 4.88692190558413 3.14159265358979 10.9955742875643 1.74532925199433 10.9955742875643 1.91986217719376 10.9955742875643 2.0943951023932 10.9955742875643 2.26892802759263 10.9955742875643 2.44346095279206 10.9955742875643 2.61799387799149 10.9955742875643 2.79252680319093 10.9955742875643 2.96705972839036 10.9955742875643 3.14159265358979 4.71238898038469 3.14159265358979 10.8210413623648 3.14159265358979 10.6465084371654 3.14159265358979 10.471975511966 3.14159265358979 10.2974425867665 3.14159265358979 10.1229096615671 3.14159265358979 9.94837673636768 3.14159265358979 9.77384381116824 3.14159265358979 9.59931088596881 3.14159265358979 9.42477796076938 3.14159265358979 9.25024503556995 3.14159265358979 9.07571211037051 3.14159265358979 8.90117918517108 3.14159265358979 8.72664625997165 3.14159265358979 8.55211333477222 3.14159265358979 8.37758040957278 3.14159265358979 8.20304748437335 3.14159265358979 8.02851455917392 3.14159265358979 7.85398163397448 3.14159265358979 7.67944870877505 3.14159265358979 7.50491578357562 3.14159265358979 7.33038285837619 3.14159265358979 7.15584993317675 3.14159265358979 6.98131700797732 3.14159265358979 6.80678408277789 3.14159265358979 6.63225115757845 3.14159265358979 6.45771823237902 3.14159265358979 6.28318530717959 3.14159265358979 6.10865238198016 3.14159265358979 5.93411945678072 3.14159265358979 5.75958653158129 3.14159265358979 5.58505360638186 3.14159265358979 5.41052068118243 3.14159265358979 5.23598775598299 3.14159265358979 5.06145483078356 3.14159265358979 4.88692190558413 1.74532925199433 4.71238898038469 1.91986217719376 4.71238898038469 2.0943951023932 4.71238898038469 2.26892802759263 4.71238898038469 2.44346095279206 4.71238898038469 2.61799387799149 4.71238898038469 2.79252680319093 4.71238898038469 2.96705972839036 4.71238898038469 2.26892802759263 8.02851455917392 2.0943951023932 8.02851455917392 2.26892802759263 7.85398163397448 2.61799387799149 5.06145483078356 2.44346095279206 5.23598775598299 2.44346095279206 5.06145483078356 2.61799387799149 10.2974425867665 2.44346095279206 10.2974425867665 2.61799387799149 10.1229096615671 2.26892802759263 10.8210413623648 2.0943951023932 10.8210413623648 2.0943951023932 10.6465084371654 2.26892802759263 5.58505360638186 2.0943951023932 5.58505360638186 2.26892802759263 5.41052068118243 2.26892802759263 10.6465084371654 2.79252680319093 10.1229096615671 2.61799387799149 9.94837673636768 2.79252680319093 9.94837673636768 1.91986217719376 8.55211333477222 1.74532925199433 8.55211333477222 1.91986217719376 8.37758040957278 1.91986217719376 6.10865238198016 1.74532925199433 5.93411945678072 1.91986217719376 5.93411945678072 2.44346095279206 10.6465084371654 2.26892802759263 10.471975511966 2.79252680319093 7.33038285837619 2.61799387799149 7.33038285837619 2.61799387799149 7.15584993317675 2.79252680319093 7.15584993317675 2.61799387799149 7.50491578357562 1.74532925199433 6.10865238198016 2.44346095279206 10.471975511966 2.96705972839036 9.94837673636768 2.96705972839036 9.77384381116824 2.44346095279206 7.85398163397448 2.26892802759263 7.67944870877505 2.79252680319093 4.88692190558413 2.61799387799149 4.88692190558413 2.61799387799149 10.471975511966 2.44346095279206 7.67944870877505 2.44346095279206 5.41052068118243 2.26892802759263 5.23598775598299 2.0943951023932 8.37758040957278 2.79252680319093 10.2974425867665 1.91986217719376 8.20304748437335 2.0943951023932 8.20304748437335 1.74532925199433 8.90117918517108 1.74532925199433 8.72664625997165 2.0943951023932 5.93411945678072 2.0943951023932 5.75958653158129 2.44346095279206 10.8210413623648 2.96705972839036 10.1229096615671 1.74532925199433 6.45771823237902 2.96705972839036 7.15584993317675 2.79252680319093 6.98131700797732 1.74532925199433 6.28318530717959 2.61799387799149 5.23598775598299 2.96705972839036 6.98131700797732 2.61799387799149 10.6465084371654 2.26892802759263 5.75958653158129 2.61799387799149 7.67944870877505 2.79252680319093 10.471975511966 2.26892802759263 8.20304748437335 2.96705972839036 10.2974425867665 2.61799387799149 10.8210413623648 1.91986217719376 8.72664625997165 1.91986217719376 6.28318530717959 2.79252680319093 10.6465084371654 2.79252680319093 5.06145483078356 2.79252680319093 7.50491578357562 2.96705972839036 10.471975511966 2.44346095279206 5.58505360638186 2.44346095279206 8.02851455917392 2.79252680319093 10.8210413623648 2.0943951023932 6.10865238198016 2.96705972839036 10.6465084371654 2.96705972839036 10.8210413623648 2.0943951023932 8.55211333477222 1.74532925199433 6.63225115757845 1.74532925199433 9.07571211037051 2.96705972839036 4.88692190558413 2.96705972839036 7.33038285837619 2.61799387799149 5.41052068118243 2.61799387799149 7.85398163397448 2.26892802759263 8.37758040957278 2.26892802759263 5.93411945678072 1.91986217719376 8.90117918517108 1.91986217719376 6.45771823237902 2.79252680319093 5.23598775598299 2.44346095279206 5.75958653158129 2.79252680319093 7.67944870877505 2.44346095279206 8.20304748437335 2.0943951023932 6.28318530717959 2.0943951023932 8.72664625997165 1.74532925199433 6.80678408277789 1.74532925199433 9.25024503556995 2.96705972839036 5.06145483078356 2.96705972839036 7.50491578357562 2.61799387799149 5.58505360638186 2.26892802759263 6.10865238198016 2.61799387799149 8.02851455917392 1.91986217719376 6.63225115757845 2.26892802759263 8.55211333477222 1.91986217719376 9.07571211037051 2.79252680319093 5.41052068118243 2.79252680319093 7.85398163397448 2.44346095279206 8.37758040957278 2.44346095279206 5.93411945678072 2.0943951023932 6.45771823237902 2.0943951023932 8.90117918517108 1.74532925199433 6.98131700797732 2.96705972839036 5.23598775598299 1.74532925199433 9.42477796076938 2.61799387799149 5.75958653158129 2.96705972839036 7.67944870877505 2.26892802759263 6.28318530717959 2.61799387799149 8.20304748437335 2.26892802759263 8.72664625997165 1.91986217719376 6.80678408277789 1.91986217719376 9.25024503556995 2.79252680319093 5.58505360638186 2.44346095279206 6.10865238198016 2.79252680319093 8.02851455917392 2.44346095279206 8.55211333477222 2.0943951023932 6.63225115757845 2.0943951023932 9.07571211037051 1.74532925199433 7.15584993317675 1.74532925199433 9.59931088596881 2.96705972839036 5.41052068118243 2.96705972839036 7.85398163397448 2.61799387799149 5.93411945678072 2.61799387799149 8.37758040957278 2.26892802759263 6.45771823237902 2.26892802759263 8.90117918517108 1.91986217719376 6.98131700797732 2.79252680319093 5.75958653158129 1.91986217719376 9.42477796076938 2.79252680319093 8.20304748437335 2.44346095279206 6.28318530717959 2.0943951023932 6.80678408277789 2.44346095279206 8.72664625997165 2.0943951023932 9.25024503556995 1.74532925199433 7.33038285837619 1.74532925199433 9.77384381116824 2.96705972839036 5.58505360638186 2.61799387799149 6.10865238198016 2.96705972839036 8.02851455917392 2.61799387799149 8.55211333477222 2.26892802759263 6.63225115757845 2.26892802759263 9.07571211037051 1.91986217719376 9.59931088596881 1.91986217719376 7.15584993317675 2.79252680319093 8.37758040957278 2.79252680319093 5.93411945678072 2.44346095279206 8.90117918517108 2.44346095279206 6.45771823237902 2.0943951023932 6.98131700797732 2.0943951023932 9.42477796076938 1.74532925199433 7.50491578357562 1.74532925199433 9.94837673636768 2.96705972839036 5.75958653158129 2.96705972839036 8.20304748437335 2.61799387799149 6.28318530717959 2.61799387799149 8.72664625997165 2.26892802759263 9.25024503556995 2.26892802759263 6.80678408277789 1.91986217719376 7.33038285837619 1.91986217719376 9.77384381116824 2.79252680319093 8.55211333477222 2.79252680319093 6.10865238198016 2.44346095279206 6.63225115757845 2.44346095279206 9.07571211037051 2.0943951023932 9.59931088596881 2.0943951023932 7.15584993317675 1.74532925199433 10.1229096615671 2.96705972839036 8.37758040957278 1.74532925199433 7.67944870877505 2.96705972839036 5.93411945678072 2.61799387799149 8.90117918517108 2.61799387799149 6.45771823237902 2.26892802759263 6.98131700797732 2.26892802759263 9.42477796076938 1.91986217719376 9.94837673636768 1.91986217719376 7.50491578357562 2.79252680319093 8.72664625997165 2.79252680319093 6.28318530717959 2.44346095279206 9.25024503556995 2.44346095279206 6.80678408277789 2.0943951023932 9.77384381116824 2.0943951023932 7.33038285837619 1.74532925199433 10.2974425867665 1.74532925199433 7.85398163397448 2.96705972839036 8.55211333477222 2.96705972839036 6.10865238198016 2.61799387799149 9.07571211037051 2.26892802759263 9.59931088596881 2.61799387799149 6.63225115757845 1.91986217719376 10.1229096615671 2.26892802759263 7.15584993317675 2.79252680319093 8.90117918517108 1.91986217719376 7.67944870877505 2.44346095279206 9.42477796076938 2.79252680319093 6.45771823237902 2.0943951023932 9.94837673636768 2.44346095279206 6.98131700797732 1.74532925199433 10.471975511966 2.0943951023932 7.50491578357562 2.96705972839036 8.72664625997165 2.61799387799149 9.25024503556995 1.74532925199433 8.02851455917392 2.26892802759263 9.77384381116824 2.96705972839036 6.28318530717959 2.61799387799149 6.80678408277789 1.91986217719376 10.2974425867665 2.26892802759263 7.33038285837619 1.74532925199433 4.88692190558413 2.79252680319093 9.07571211037051 2.44346095279206 9.59931088596881 1.91986217719376 7.85398163397448 1.74532925199433 5.06145483078356 2.0943951023932 10.1229096615671 1.91986217719376 4.88692190558413 2.79252680319093 6.63225115757845 1.74532925199433 10.6465084371654 1.74532925199433 5.23598775598299 2.44346095279206 7.15584993317675 2.96705972839036 8.90117918517108 1.91986217719376 5.06145483078356 2.61799387799149 9.42477796076938 2.0943951023932 7.67944870877505 2.26892802759263 9.94837673636768 2.0943951023932 4.88692190558413 1.74532925199433 8.20304748437335 1.91986217719376 10.471975511966 2.96705972839036 6.45771823237902 1.74532925199433 5.41052068118243 2.79252680319093 9.25024503556995 1.91986217719376 5.23598775598299 2.61799387799149 6.98131700797732 2.44346095279206 9.77384381116824 2.26892802759263 7.50491578357562 2.0943951023932 5.06145483078356 2.0943951023932 10.2974425867665 1.91986217719376 8.02851455917392 1.74532925199433 10.8210413623648 1.74532925199433 5.58505360638186 2.96705972839036 9.07571211037051 2.79252680319093 6.80678408277789 2.61799387799149 9.59931088596881 2.26892802759263 4.88692190558413 2.44346095279206 7.33038285837619 2.26892802759263 10.1229096615671 1.91986217719376 5.41052068118243 2.0943951023932 7.85398163397448 1.91986217719376 10.6465084371654 2.0943951023932 5.23598775598299 1.74532925199433 8.37758040957278 2.79252680319093 9.42477796076938 1.74532925199433 5.75958653158129 2.44346095279206 9.94837673636768 2.96705972839036 6.63225115757845 2.26892802759263 5.06145483078356 2.0943951023932 10.471975511966 2.96705972839036 9.25024503556995 1.91986217719376 5.58505360638186 2.61799387799149 9.77384381116824 2.44346095279206 4.88692190558413 2.26892802759263 10.2974425867665 2.0943951023932 5.41052068118243 1.91986217719376 10.8210413623648 2.44346095279206 7.50491578357562 2.79252680319093 9.59931088596881 2.44346095279206 10.1229096615671 1.91986217719376 5.75958653158129 2.96705972839036 9.42477796076938 2.96705972839036 6.80678408277789 2.79252680319093 9.77384381116824 2.96705972839036 9.59931088596881 91 92 93 94 95 96 97 98 99 100 101 102 100 42 101 103 104 105 83 37 2 100 43 42 100 102 106 107 108 109 107 97 99 110 111 112 107 99 108 113 114 115 116 106 117 118 119 120 118 120 121 118 122 119 113 123 114 116 117 124 125 126 53 127 93 128 129 94 130 129 130 88 125 109 126 129 88 89 131 124 97 127 128 132 133 103 105 127 91 93 133 134 95 133 105 134 135 110 112 136 131 97 135 112 137 136 97 107 135 137 138 139 14 140 141 115 142 143 44 43 143 100 106 143 106 116 139 13 14 143 43 100 144 125 53 145 27 28 144 52 51 146 121 147 144 53 52 144 107 109 144 109 125 146 70 69 145 28 148 144 136 107 149 95 94 146 147 150 149 133 95 146 150 70 151 124 131 151 116 124 152 142 104 152 141 142 153 132 122 152 104 103 154 131 136 155 92 91 156 51 50 156 144 51 156 136 144 155 138 92 156 154 136 157 44 143 158 111 110 157 45 44 157 143 116 159 123 113 157 116 151 159 145 148 159 148 123 158 140 111 160 151 131 161 149 94 160 131 154 162 153 122 163 156 50 161 94 129 162 122 118 163 154 156 164 103 133 165 91 127 166 157 151 166 46 45 166 45 157 166 151 160 167 113 115 168 50 49 167 115 141 168 163 50 168 160 154 168 154 163 82 90 47 169 166 160 170 110 135 169 49 48 171 27 145 169 48 46 169 168 49 169 160 168 169 46 166 172 13 139 173 161 129 173 90 82 174 121 146 173 129 89 174 146 69 173 82 81 174 162 118 173 89 90 174 68 67 174 69 68 175 164 133 174 118 121 175 133 149 176 127 132 176 165 127 176 132 153 177 135 138 177 138 155 178 141 152 177 170 135 179 140 158 180 145 159 181 175 149 181 149 161 179 172 139 179 139 140 182 152 103 182 178 152 183 153 162 184 91 165 182 103 164 184 155 91 185 159 113 185 113 167 186 110 170 185 180 159 186 158 110 187 25 26 187 26 27 188 11 12 187 27 171 188 12 13 189 173 81 189 181 161 189 161 173 188 13 172 190 174 67 190 183 162 190 67 66 190 162 174 191 164 175 192 141 178 193 165 176 192 167 141 194 145 180 195 170 177 196 172 179 194 171 145 197 175 181 198 153 183 197 191 175 198 193 176 198 176 153 199 177 155 200 178 182 201 180 185 199 155 184 199 195 177 202 196 179 203 25 187 203 24 25 202 158 186 202 179 158 204 181 189 204 197 181 205 11 188 204 81 80 204 189 81 206 182 164 206 164 191 206 200 182 207 183 190 207 190 66 208 201 185 208 185 167 209 184 165 209 165 193 208 167 192 210 170 195 210 186 170 211 187 171 212 205 188 211 171 194 213 191 197 212 172 196 212 188 172 214 192 178 215 193 198 216 195 199 214 178 200 217 180 201 217 194 180 218 196 202 219 23 24 219 24 203 220 9 10 220 10 11 221 213 197 221 197 204 221 204 80 220 11 205 221 79 78 221 80 79 222 198 183 222 215 198 223 200 206 222 65 64 222 66 65 222 183 207 222 207 66 224 184 209 225 201 208 224 199 184 224 216 199 226 218 202 226 186 210 227 203 187 227 187 211 226 202 186 228 191 213 229 205 212 228 223 206 228 206 191 230 209 193 231 208 192 231 192 214 230 193 215 231 225 208 232 211 194 232 194 217 233 210 195 233 195 216 234 196 218 234 229 212 235 22 23 234 212 196 235 23 219 236 8 9 237 213 221 237 221 78 236 9 220 238 214 200 238 200 223 239 222 64 239 215 222 240 216 224 241 201 225 241 217 201 242 218 226 243 205 229 244 203 227 243 220 205 244 219 203 245 224 209 246 223 228 245 209 230 245 240 224 247 226 210 247 210 233 247 242 226 248 225 231 249 227 211 249 211 232 250 229 234 251 21 22 252 7 8 251 22 235 253 237 78 253 246 228 252 8 236 254 215 239 253 228 213 254 230 215 254 239 64 253 77 76 253 78 77 253 213 237 255 248 231 254 64 63 255 231 214 255 214 238 256 233 216 256 216 240 257 234 218 257 218 242 258 217 241 258 232 217 259 235 219 257 250 234 259 219 244 260 220 243 260 236 220 259 251 235 260 252 236 261 240 245 262 223 246 262 238 223 263 225 248 264 242 247 265 243 229 263 241 225 266 227 249 265 229 250 266 244 227 267 6 7 267 7 252 268 230 254 268 261 245 269 21 251 268 62 61 268 63 62 270 246 253 268 254 63 270 253 76 268 245 230 271 247 233 271 233 256 272 248 255 271 264 247 273 249 232 273 232 258 274 250 257 275 252 260 276 269 251 277 240 261 277 256 240 276 251 259 278 238 262 278 255 238 279 257 242 278 272 255 279 242 264 280 241 263 279 274 257 280 258 241 39 1 3 281 243 265 281 260 243 282 276 259 281 275 260 283 5 6 282 259 244 283 6 267 282 244 266 284 21 269 285 261 268 284 19 20 285 268 61 284 20 21 286 262 246 286 246 270 287 264 271 286 76 75 286 270 76 288 265 250 288 250 274 289 248 272 289 263 248 290 283 267 291 266 249 290 267 252 291 249 273 290 252 275 292 287 271 292 256 277 292 271 256 293 269 276 294 274 279 295 272 278 296 275 281 297 258 280 297 273 258 298 4 5 298 5 283 299 276 282 300 261 285 300 61 60 300 277 261 299 293 276 300 285 61 301 264 287 301 294 279 302 18 19 302 19 284 301 279 264 303 281 265 304 278 262 303 296 281 304 262 286 303 265 288 304 74 73 304 75 74 304 286 75 304 295 278 305 280 263 305 263 289 306 298 283 306 283 290 307 266 291 38 46 48 307 282 266 308 36 37 309 287 292 310 288 274 307 299 282 308 37 83 310 274 294 311 284 269 312 35 36 312 36 308 313 290 275 313 275 296 311 269 293 311 302 284 314 83 84 313 306 290 315 272 295 314 308 83 315 289 272 316 3 4 317 35 312 316 4 298 317 34 35 318 291 273 319 292 277 319 300 60 319 309 292 319 59 58 318 273 297 320 308 314 319 60 59 319 277 300 321 294 301 322 293 299 320 312 308 323 296 303 324 320 314 324 314 84 324 84 85 325 18 302 326 298 306 327 304 73 328 33 34 328 34 317 327 295 304 329 287 309 329 301 287 330 312 320 331 280 305 331 297 280 330 317 312 329 321 301 332 288 310 333 322 299 332 303 288 332 323 303 333 299 307 334 320 324 335 306 313 334 330 320 336 302 311 335 326 306 337 3 316 337 39 3 338 33 328 337 40 39 339 309 319 339 319 58 340 289 315 341 294 321 340 305 289 342 324 85 341 310 294 342 334 324 343 291 318 342 85 86 343 333 307 344 335 313 343 307 291 345 338 328 346 311 293 344 296 323 344 313 296 345 328 317 347 316 298 346 293 322 345 317 330 346 336 311 347 298 326 348 345 330 349 16 17 349 17 18 348 330 334 349 18 325 350 321 329 351 33 338 352 323 332 353 327 73 351 31 32 353 295 327 351 32 33 353 73 72 353 315 295 354 334 342 120 297 331 354 348 334 120 318 297 355 326 335 356 339 58 356 57 56 357 338 345 356 58 57 356 329 309 356 309 339 356 350 329 358 310 341 128 322 333 358 332 310 137 302 336 359 342 86 358 352 332 359 86 87 360 335 344 137 325 302 361 357 345 360 355 335 362 41 40 147 331 305 361 345 348 362 316 347 362 337 316 362 40 337 147 305 340 114 31 351 363 333 343 363 128 333 364 341 321 364 321 350 365 360 344 92 336 346 134 348 354 134 361 348 365 344 323 365 323 352 102 347 326 366 114 351 366 338 357 102 326 355 366 351 338 367 350 356 111 16 349 368 315 353 368 340 315 367 356 56 368 353 72 108 352 358 368 72 71 96 342 359 119 318 120 96 354 342 119 363 343 117 355 360 119 343 318 93 322 128 93 346 322 369 341 364 93 92 346 369 108 358 104 357 361 123 29 30 369 358 341 123 30 31 123 31 114 112 349 325 98 117 360 130 359 87 130 96 359 98 360 365 101 362 347 112 111 349 130 87 88 101 42 41 112 325 137 101 347 102 121 120 331 101 41 362 121 331 147 370 364 350 370 367 56 105 104 361 105 361 134 370 56 55 132 128 363 370 350 367 99 365 352 99 352 108 99 98 365 115 114 366 138 336 92 95 134 354 106 102 355 138 137 336 106 355 117 95 354 96 109 108 369 140 14 15 140 15 16 142 115 366 142 366 357 142 357 104 140 16 111 124 117 98 150 147 340 150 340 368 126 370 55 150 71 70 150 368 71 126 54 53 122 363 119 148 28 29 126 55 54 148 29 123 126 109 369 126 369 364 126 364 370 122 132 363 97 124 98 94 96 130 
+37 36 1 0
+-1.24909848089882e-17 -0.359 -0.971 0.00885605706101345 -0.359 -0.970225195403623 0.0174430273096091 -0.359 -0.967924323660081 0.0255 -0.359 -0.964167295593006 0.0327821680940135 -0.359 -0.959068266599068 0.0390682665990679 -0.359 -0.952782168094014 0.0441672955930064 -0.359 -0.9455 0.0479243236600813 -0.359 -0.937443027309609 0.0502251954036226 -0.359 -0.928856057061013 0.051 -0.359 -0.92 0.0502251954036226 -0.359 -0.911143942938987 0.0479243236600813 -0.359 -0.902556972690391 0.0441672955930064 -0.359 -0.8945 0.0390682665990679 -0.359 -0.887217831905987 0.0327821680940135 -0.359 -0.880931733400932 0.0255 -0.359 -0.875832704406994 0.0174430273096092 -0.359 -0.872075676339919 0.00885605706101351 -0.359 -0.869774804596377 7.41911415115537e-17 -0.359 -0.869 -0.00885605706101336 -0.359 -0.869774804596377 -0.017443027309609 -0.359 -0.872075676339919 -0.0254999999999999 -0.359 -0.875832704406994 -0.0327821680940134 -0.359 -0.880931733400932 -0.0390682665990678 -0.359 -0.887217831905986 -0.0441672955930063 -0.359 -0.8945 -0.0479243236600813 -0.359 -0.902556972690391 -0.0502251954036226 -0.359 -0.911143942938986 -0.051 -0.359 -0.92 -0.0502251954036226 -0.359 -0.928856057061013 -0.0479243236600814 -0.359 -0.937443027309609 -0.0441672955930065 -0.359 -0.9455 -0.039068266599068 -0.359 -0.952782168094013 -0.0327821680940137 -0.359 -0.959068266599068 -0.0255000000000002 -0.359 -0.964167295593006 -0.0174430273096093 -0.359 -0.967924323660081 -0.00885605706101367 -0.359 -0.970225195403623 0 -0.359 -0.92 0.051 2.55465136891897e-18 0.0502251954036226 0.00885605706101344 0.0479243236600813 0.0174430273096091 0.0441672955930064 0.0255 0.0390682665990679 0.0327821680940135 0.0327821680940135 0.0390682665990679 0.0255 0.0441672955930064 0.0174430273096091 0.0479243236600813 0.00885605706101346 0.0502251954036226 4.5502609926501e-18 0.051 -0.00885605706101344 0.0502251954036226 -0.0174430273096091 0.0479243236600813 -0.0255 0.0441672955930064 -0.0327821680940135 0.0390682665990679 -0.0390682665990679 0.0327821680940135 -0.0441672955930063 0.0255 -0.0479243236600813 0.0174430273096092 -0.0502251954036226 0.00885605706101351 -0.051 7.19435904079913e-17 -0.0502251954036226 -0.00885605706101336 -0.0479243236600814 -0.017443027309609 -0.0441672955930064 -0.0254999999999999 -0.039068266599068 -0.0327821680940134 -0.0327821680940136 -0.0390682665990678 -0.0255000000000001 -0.0441672955930063 -0.0174430273096092 -0.0479243236600813 -0.00885605706101358 -0.0502251954036226 -1.48105404893309e-16 -0.051 0.0088560570610133 -0.0502251954036226 0.0174430273096089 -0.0479243236600814 0.0254999999999998 -0.0441672955930065 0.0327821680940134 -0.039068266599068 0.0390682665990677 -0.0327821680940137 0.0441672955930063 -0.0255000000000002 0.0479243236600813 -0.0174430273096093 0.0502251954036226 -0.00885605706101367 -2.38863291125713e-18 2.55465136891897e-18 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 
+37 36 1 0
+0.059 1.10588621593521e-17 1.03 0.0581036574277203 0.0102452424823489 1.03 0.0554418646263686 0.0201791884562144 1.03 0.0510954988232819 0.0294999999999999 1.03 0.0451966221440197 0.0379244689715057 1.03 0.0379244689715058 0.0451966221440197 1.03 0.0295 0.0510954988232819 1.03 0.0201791884562145 0.0554418646263686 1.03 0.0102452424823489 0.0581036574277203 1.03 3.61258874377601e-18 0.059 1.03 -0.0102452424823489 0.0581036574277203 1.03 -0.0201791884562145 0.0554418646263686 1.03 -0.0295 0.0510954988232819 1.03 -0.0379244689715058 0.0451966221440197 1.03 -0.0451966221440197 0.0379244689715057 1.03 -0.0510954988232819 0.0295000000000001 1.03 -0.0554418646263686 0.0201791884562144 1.03 -0.0581036574277203 0.0102452424823489 1.03 -0.059 1.10588621593521e-17 1.03 -0.0581036574277203 -0.0102452424823489 1.03 -0.0554418646263686 -0.0201791884562143 1.03 -0.0510954988232819 -0.0294999999999998 1.03 -0.0451966221440198 -0.0379244689715057 1.03 -0.0379244689715059 -0.0451966221440196 1.03 -0.0295000000000001 -0.0510954988232819 1.03 -0.0201791884562146 -0.0554418646263686 1.03 -0.010245242482349 -0.0581036574277203 1.03 -1.6804534651825e-16 -0.0590000000000001 1.03 0.0102452424823487 -0.0581036574277203 1.03 0.0201791884562143 -0.0554418646263688 1.03 0.0294999999999998 -0.0510954988232821 1.03 0.0379244689715056 -0.0451966221440199 1.03 0.0451966221440196 -0.0379244689715061 1.03 0.0510954988232818 -0.0295000000000003 1.03 0.0554418646263685 -0.0201791884562148 1.03 0.0581036574277202 -0.0102452424823491 1.03 0 1.10588621593521e-17 1.03 0.059 3.11030498231779e-18 0.0581036574277203 0.0102452424823489 0.0554418646263686 0.0201791884562145 0.0510954988232819 0.0295 0.0451966221440197 0.0379244689715058 0.0379244689715058 0.0451966221440197 0.0295 0.0510954988232819 0.0201791884562145 0.0554418646263686 0.0102452424823489 0.0581036574277203 6.16301172422229e-18 0.059 -0.0102452424823489 0.0581036574277203 -0.0201791884562145 0.0554418646263686 -0.0295 0.0510954988232819 -0.0379244689715058 0.0451966221440197 -0.0451966221440197 0.0379244689715059 -0.0510954988232819 0.0295 -0.0554418646263686 0.0201791884562145 -0.0581036574277203 0.010245242482349 -0.059 8.63770318292045e-17 -0.0581036574277203 -0.0102452424823488 -0.0554418646263686 -0.0201791884562144 -0.0510954988232819 -0.0294999999999999 -0.0451966221440198 -0.0379244689715057 -0.0379244689715059 -0.0451966221440196 -0.0295000000000001 -0.0510954988232818 -0.0201791884562146 -0.0554418646263685 -0.010245242482349 -0.0581036574277202 -1.67309335873458e-16 -0.059 0.0102452424823487 -0.0581036574277203 0.0201791884562143 -0.0554418646263687 0.0294999999999998 -0.051095498823282 0.0379244689715056 -0.0451966221440198 0.0451966221440195 -0.037924468971506 0.0510954988232818 -0.0295000000000002 0.0554418646263685 -0.0201791884562147 0.0581036574277202 -0.0102452424823492 -7.75882179684939e-19 3.11030498231779e-18 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 
+
+TShapes 42
+Ve
+1e-07
+-0.0452516081485031 0.0378588424682483 0.0040814575968276
+0 0
+
+0101101
+*
+Ve
+2.00001e-07
+-0.0556827994439111 0.0195045083529212 -2.68188791487101e-18
+0 0
+
+0101101
+*
+Ed
+ 2.00001e-07 1 1 0
+1  1 0 0.43213918 1
+2  1 1 0 0.43213918 1
+2  2 2 0 0.43213918 1
+6  1 1 0
+6  2 2 0
+0
+
+0101000
++42 0 -41 0 *
+Ed
+ 2.00001e-07 1 1 0
+1  2 0 0 0.43213918
+2  3 1 0 0 0.43213918
+2  4 2 0 0 0.43213918
+6  3 1 0
+6  4 2 0
+0
+
+0101000
++41 0 -42 0 *
+Ve
+1e-07
+-0.135378810567666 0.0655170218285604 -2.681887914871e-18
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0.0579749730487216 0.15
+3  5 6CN 1 0 0.0579749730487216 0.15
+7  5 6 1 0
+0
+
+0101000
++41 0 -38 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 6.28318530717959
+2  7 1 0 0 6.28318530717959
+2  8 3 0 0 6.28318530717959
+6  7 1 0
+6  8 3 0
+0
+
+0101100
++38 0 -38 0 *
+Wi
+
+0101000
++40 0 +39 0 -37 0 -36 0 +37 0 *
+Fa
+0  1e-07 1 0
+2  1
+0101000
++35 0 *
+Wi
+
+0101000
+-40 0 -39 0 *
+Ve
+3.42021715226519e-06
+0.0285134526101169 -0.0516525230498979 -0.877715450616494
+0 0
+
+0101101
+*
+Ve
+3.42021715226519e-06
+-1.24909848089882e-17 -0.059 -0.971
+0 0
+
+0101101
+*
+Ed
+ 3.42021715226519e-06 1 1 0
+1  5 0 0.43213918 1
+2  9 4 0 0.43213918 1
+2  10 2 0 0.43213918 1
+6  9 2 0
+6  10 4 0
+0
+
+0101000
++32 0 -31 0 *
+Ed
+ 3.42021715226519e-06 1 1 0
+1  6 0 0 0.43213918
+2  11 4 0 0 0.43213918
+2  12 2 0 0 0.43213918
+6  11 2 0
+6  12 4 0
+0
+
+0101000
++31 0 -32 0 *
+Wi
+
+0101000
+-30 0 -29 0 *
+Ve
+1e-07
+0.059 -1.44503549751041e-17 -1.02
+0 0
+
+0101101
+*
+Ve
+1.00000000058742e-07
+0.059 -1.44503549751041e-17 1.03
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 2.05
+3  13 14CN 2 0 0 2.05
+7  13 14 2 0
+0
+
+0101000
++27 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  8 0 0 6.28318530717959
+2  15 2 0 0 6.28318530717959
+2  16 5 0 0 6.28318530717959
+6  15 2 0
+6  16 5 0
+0
+
+0101100
++27 0 -27 0 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0 6.28318530717959
+2  17 2 0 0 6.28318530717959
+2  18 6 0 0 6.28318530717959
+2  19 7 0 0 6.28318530717959
+6  17 6 0
+6  18 2 0
+0
+
+0101100
++26 0 -26 0 *
+Wi
+
+0101000
++25 0 +24 0 -25 0 -23 0 *
+Fa
+0  1e-07 2 0
+2  2
+0101000
++33 0 +28 0 +22 0 *
+Wi
+
+0101000
++36 0 *
+Fa
+0  1e-07 3 0
+2  3
+0101000
++20 0 *
+Ve
+1e-07
+-1.24909848089882e-17 -0.359 -0.971
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  10 0 0.059 0.359
+3  20 21CN 4 0 0.059 0.359
+7  19 20 4 0
+0
+
+0101000
++31 0 -18 0 *
+Ed
+ 1e-07 1 1 0
+1  11 0 0 6.28318530717959
+2  22 4 0 0 6.28318530717959
+2  23 8 0 0 6.28318530717959
+6  21 4 0
+6  22 7 0
+0
+
+0101100
++18 0 -18 0 *
+Wi
+
+0101000
++30 0 +29 0 -17 0 -16 0 +17 0 *
+Fa
+0  1e-07 4 0
+2  4
+0101000
++15 0 *
+Wi
+
+0101000
+-24 0 *
+Fa
+0  1e-07 5 0
+2  5
+0101000
+-13 0 *
+Ve
+1.00000000058742e-07
+0.059 -1.44503549751041e-17 1.03
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  12 0 1.5707963267949 3.14159265358979
+3  24 25G1 7 0 1.5707963267949 3.14159265358979
+7  23 24 6 0
+0
+
+0101000
++26 0 -11 1 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0 6.28318530717959
+2  18 9 0 0 6.28318530717959
+2  26 7 3 0 6.28318530717959
+2  27 7 4 0 6.28318530717959
+6  25 6 4
+6  26 8 0
+0
+
+0101100
++11 0 -11 0 *
+Wi
+
+0101000
++23 0 -10 0 -9 1 +10 0 *
+Fa
+0  1e-07 7 0
+2  6
+0101000
++8 0 *
+Wi
+
+0101000
++16 0 *
+Fa
+0  1e-07 8 0
+2  7
+0101000
++6 0 *
+Wi
+
+0101000
++9 0 *
+Fa
+0  1e-07 9 0
+2  8
+0101000
++4 0 *
+Sh
+
+0101000
++34 0 +21 0 +19 0 +14 0 -12 0 +7 0 +5 0 +3 1 *
+So
+
+0100000
++2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/recettes/tuyauterie.py b/src/TEST_PY/recettes/tuyauterie.py
new file mode 100644 (file)
index 0000000..d18e76d
--- /dev/null
@@ -0,0 +1,259 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS : 2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# ========================================================================================
+
+import math
+
+import geompy
+import hexablock
+
+# Charger la géométrie
+# ====================
+
+nom = "tuyauterie"
+
+geometrie = geompy.ImportBREP(nom+".brep")
+
+# Sélectionner des sous-parties de la géométrie
+# ---------------------------------------------
+
+sommets = geompy.SubShapeAllSortedCentres(geometrie, geompy.ShapeType["VERTEX"])
+aretes  = geompy.SubShapeAllSortedCentres(geometrie, geompy.ShapeType["EDGE"  ])
+faces   = geompy.SubShapeAllSortedCentres(geometrie, geompy.ShapeType["FACE"  ])
+
+petit_arri_v = sommets[0]
+petit_arri_x, petit_arri_y, petit_arri_z = geompy.PointCoordinates(petit_arri_v)
+petit_avan_x, petit_avan_y, petit_avan_z = geompy.PointCoordinates(sommets[1])
+
+moyen_arri_v = sommets[3]
+moyen_arri_x, moyen_arri_y, moyen_arri_z = geompy.PointCoordinates(moyen_arri_v)
+moyen_avan_x, moyen_avan_y, moyen_avan_z = geompy.PointCoordinates(sommets[4])
+
+petit0, petit_x, petit_y, petit_z,  petit1, petit2, petit3,  petit_rayon = geompy.KindOfShape(aretes[0])
+
+moyen0, moyen_x, moyen_y, moyen_z,  moyen1, moyen2, moyen3,  moyen_rayon = geompy.KindOfShape(aretes[4])
+
+grand0, grand_xb, grand_yb, grand_zb,  grand1, grand2, grand3,  grand_rayon = geompy.KindOfShape(aretes[7])
+grand4, grand_xh, grand_yh, grand_zh,  grand5, grand6, grand7,  grand8      = geompy.KindOfShape(aretes[8])
+
+grand_generat = aretes[11]
+
+arc0,  arc_x, arc_y, arc_z,  arc_dx, arc_dy, arc_dz,  arc_rayon, arc_x1, arc_y1, arc_z1,  arc_x2, arc_y2, arc_z2 = geompy.KindOfShape(aretes[12])
+
+face_cylindre = faces[5]
+
+# Construire des géométries intermédiaires
+# ----------------------------------------
+
+arc_sc = geompy.MakeVertex(arc_x , arc_y , arc_z )
+arc_s1 = geompy.MakeVertex(arc_x1, arc_y1, arc_z1)
+arc_s2 = geompy.MakeVertex(arc_x2, arc_y2, arc_z2)
+
+arc_a1 = geompy.MakeEdge(arc_sc, arc_s1)
+arc_a2 = geompy.MakeEdge(arc_sc, arc_s2)
+
+# Construire le modèle de bloc
+# ============================
+
+doc = hexablock.addDocument(nom)
+
+# Construire le grand cylindre en 2 parties
+# -----------------------------------------
+
+grand_base = doc.addVertex(grand_xb, grand_yb, grand_zb)
+grand_oppo = doc.addVertex(grand_xh, grand_yh, grand_zh)
+
+grand_dir_a = doc.addVectorVertices(grand_base, grand_oppo)
+grand_dir_b = doc.addVectorVertices(grand_oppo, grand_base)
+
+grand_hauteur_a = grand_dir_a.getNorm()*0.20
+grand_hauteur_b = grand_dir_b.getNorm()*0.60
+
+grand_cylindre_a = doc.addCylinder(grand_base, grand_dir_a, grand_rayon, grand_hauteur_a)
+grand_cylindre_b = doc.addCylinder(grand_oppo, grand_dir_b, grand_rayon, grand_hauteur_b)
+
+# Construire le moyen cylindre
+# ----------------------------
+
+moyen_base = doc.addVertex(moyen_x, moyen_y, moyen_z)
+
+moyen_arri = doc.addVertex(moyen_arri_x, moyen_arri_y, moyen_arri_z)
+moyen_avan = doc.addVertex(moyen_avan_x, moyen_avan_y, moyen_avan_z)
+
+moyen_dir = doc.addVectorVertices(moyen_arri, moyen_avan)
+
+moyen_hauteur = geompy.MinDistance(moyen_arri_v, grand_generat) - grand_rayon
+
+moyen_cylindre = doc.addCylinder(moyen_base, moyen_dir, moyen_rayon, moyen_hauteur)
+
+# Construire le petit cylindre
+# ----------------------------
+
+petit_base = doc.addVertex(petit_x, petit_y, petit_z)
+
+petit_arri = doc.addVertex(petit_arri_x, petit_arri_y, petit_arri_z)
+petit_avan = doc.addVertex(petit_avan_x, petit_avan_y, petit_avan_z)
+
+petit_dir = doc.addVectorVertices(petit_arri, petit_avan)
+
+petit_hauteur = geompy.MinDistance(petit_arri_v, grand_generat)
+
+petit_cylindre = doc.addCylinder(petit_base, petit_dir, petit_rayon, petit_hauteur)
+
+# Construire les 2 cylindres qui s'intersectent
+# ---------------------------------------------
+
+cylindres_gm = doc.makeCylinders(grand_cylindre_a, moyen_cylindre)
+cylindres_gp = doc.makeCylinders(grand_cylindre_b, petit_cylindre)
+
+# Joindre les 2 croix
+# -------------------
+
+gm_quads = []
+
+for i in xrange(1, -1, -1):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        quad = cylindres_gm.getQuadIJ(hexablock.CYL_BIG, i, j, hexablock.CYL_BIG_SLICES)
+        gm_quads.append(quad)
+
+gp_q = cylindres_gp.getQuadIJ(hexablock.CYL_BIG, 1, hexablock.V_SW, hexablock.CYL_BIG_SLICES)
+
+gp_v0 = cylindres_gp.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_S , hexablock.CYL_BIG_SLICES)
+gp_v1 = cylindres_gp.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_SW, hexablock.CYL_BIG_SLICES)
+
+gm_v0 = cylindres_gm.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_E , hexablock.CYL_BIG_SLICES)
+gm_v1 = cylindres_gm.getVertexIJK(hexablock.CYL_BIG, 2, hexablock.V_NE, hexablock.CYL_BIG_SLICES)
+
+prisme = doc.joinQuads(gm_quads,  gp_q, gm_v0, gp_v0, gm_v1, gp_v1,  1)
+
+# Ajouter le coude au grand cylindre
+# ----------------------------------
+
+coude_quads = []
+
+for i in xrange(1, -1, -1):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        quad = cylindres_gp.getQuadIJ(hexablock.CYL_BIG, i, j, 0)
+        coude_quads.append(quad)
+
+coude_centre = doc.addVertex(arc_x , arc_y , arc_z )
+coude_dir    = doc.addVector(arc_dx, arc_dy, arc_dz)
+coude_angle  = geompy.GetAngle(arc_a1, arc_a2)
+
+coude = doc.revolutionQuads(coude_quads, coude_centre, coude_dir, [coude_angle])
+
+# Associer la géométrie au modèle de bloc
+# =======================================
+
+doc.setShape(geometrie)
+
+# Associer les arêtes du modèle issues du joinQuads
+# -------------------------------------------------
+
+for i in xrange(hexablock.CV_MAXI_EXT):
+    asso_h  = prisme.getHexa(i)
+    asso_a  = [ hexablock.E_CE, hexablock.E_CF, hexablock.E_CE, hexablock.E_CF, hexablock.E_CE, hexablock.E_CF, hexablock.E_CE, hexablock.E_CF ][i]
+    asso_e  = asso_h.getEdge(asso_a)
+    asso_s1 = asso_e.getVertex(0)
+    asso_s2 = asso_e.getVertex(1)
+    asso_v1 = asso_s1.getAssociation()
+    asso_v2 = asso_s2.getAssociation()
+    x1, y1, z1 = geompy.PointCoordinates(asso_v1)
+    x2, y2, z2 = geompy.PointCoordinates(asso_v2)
+    asso_pts = [ asso_v1 ]
+    n = 9
+    pas = math.sqrt( (x2-x1)**2 + (y2-y1)**2 + (z2-z1)**2 ) / n
+    for i in xrange(1, n):
+        x = x1 + (x2 - x1) * i * pas
+        y = y1 + (y2 - y1) * i * pas
+        z = z1 + (z2 - z1) * i * pas
+        asso_v = geompy.MakeVertexOnSurfaceByCoord(face_cylindre, x, y, z)
+        asso_pts.append(asso_v)
+    asso_pts.append(asso_v2)
+    asso_curve = geompy.MakeInterpol(asso_pts)
+    asso_e.addAssociation(asso_curve, 0, 1)
+
+# Associer les quadrangles du modèle issues du joinQuads
+# ------------------------------------------------------
+
+for i in xrange(hexablock.CV_MAXI_EXT):
+    asso_h = prisme.getHexa(i)
+    asso_f = [ hexablock.Q_C, hexablock.Q_F, hexablock.Q_E, hexablock.Q_F, hexablock.Q_E, hexablock.Q_F, hexablock.Q_E, hexablock.Q_F ][i]
+    asso_q = asso_h.getQuad(asso_f)
+    asso_q.addAssociation(face_cylindre)
+
+# Mailler le modèle de bloc
+# =========================
+
+# Définir 4 groupes de faces
+# --------------------------
+
+groupe_d_grand = doc.addQuadGroup("grand:disque")
+groupe_d_moyen = doc.addQuadGroup("moyen:disque")
+groupe_d_petit = doc.addQuadGroup("petit:disque")
+groupe_d_coude = doc.addQuadGroup("coude:disque")
+
+for i in xrange(2):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        quad = cylindres_gm.getQuadIJ(hexablock.CYL_BIG  , i, j, 0)
+        groupe_d_grand.addElement(quad)
+
+        quad = cylindres_gm.getQuadIJ(hexablock.CYL_SMALL, i, j, 0)
+        groupe_d_moyen.addElement(quad)
+
+        quad = cylindres_gp.getQuadIJ(hexablock.CYL_SMALL, i, j, 0)
+        groupe_d_petit.addElement(quad)
+
+for i in xrange( hexablock.CV_MAXI_INT + hexablock.CV_MAXI_EXT ):
+    h = coude.getHexa(i)
+    quad = h.getQuad(hexablock.Q_B)
+    groupe_d_coude.addElement(quad)
+
+# Définir 3 groupes de volumes
+# ----------------------------
+
+groupe_grand = doc.addHexaGroup("grand")
+groupe_moyen = doc.addHexaGroup("moyen")
+groupe_petit = doc.addHexaGroup("petit")
+
+for i in xrange( doc.countUsedHexa() ):
+    h = doc.getUsedHexa(i)
+    groupe_grand.addElement(h)
+
+for i in xrange(2):
+    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+        h = cylindres_gm.getHexaIJK(hexablock.CYL_SMALL, i, j, 0)
+        groupe_moyen.addElement(h)
+        groupe_grand.removeElement(h)
+
+        h = cylindres_gp.getHexaIJK(hexablock.CYL_SMALL, i, j, 0)
+        groupe_petit.addElement(h)
+        groupe_grand.removeElement(h)
+
+# Mailler le modèle de bloc avec ses associations
+# -----------------------------------------------
+
+hexablock.addLaws(doc, 0.02, True)
+
+blocs = hexablock.mesh(doc)
+
+muv, mue, muq, muh = hexablock.dump(doc, blocs)
diff --git a/src/TEST_PY/tees.brep b/src/TEST_PY/tees.brep
new file mode 100755 (executable)
index 0000000..9caa182
--- /dev/null
@@ -0,0 +1,648 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 8
+1
+1.11022302462516e-16               0               1               0 
+              0               1               0               0 
+             -1               0 1.11022302462516e-16             400 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             380 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             220 
+2  1 -1 0
+2  2 -1 0
+2  2 1 3 -1 0
+2  3 -1 0
+2  3 1 2 -1 0
+Curve2ds 38
+1 0 800 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 396.4531264233774  5.7629069293083175 392.92833608277681  5.7694749436140853 389.51230084494648  5.7788372822703087 386.24424709027198  5.7905468978363102 383.14348794697975  5.8042009023008854 380.21545709727701  5.8195042660091962 377.45508725218542  5.8543892203674739 372.04985730479018  5.8742056575325181 369.42820567367704  5.89564313364939 366.96284011636072  5.9186431153591617 364.64644480202827  5.9431911157077195 362.47799188863092  5.969306315324145 360.46051727651405  5.997060367620036 358.60197280754011  6.0537021647479774 355.37514358939779  6.082311505809308 353.97770142062154  6.1125302711814751 352.74076825489283  6.1443482006914323 351.69171562635694  6.1776550181455665 350.86267948835513  6.212224813535169 350.28862243838159  6.2476523776714217 350.00000035532935  6.2831853071795862 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.7833264519171417 86.602540378443834  4.8538221133434041 86.768554360301735  4.9226876586617614 87.096991301102832  4.9896492478955832 87.559643674082267  5.0546217349220237 88.124612677936994  5.1177137403899753 88.763476885346691  5.1791713917111073 89.453947255999054  5.3042530285650589 90.961452312325122  5.3677102240744938 91.784169844339971  5.4305599185356694 92.631457510690808  5.4932602887666402 93.488642372673752  5.5562165742572436 94.341495300176803  5.6198260616794098 95.175736723592024  5.6845162320744418 95.976668732951339  5.8116848841313695 97.413920783548804  5.8739248236055932 98.05887438439521  5.9379452637785519 98.646808131231438  6.0038837402756018 99.157716247916923  6.071712633333922 99.568620170602287  6.1412648768472247 99.855699662295933  6.2121194481632589 99.999999822335369  6.2831853071795862 100 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  0 350  0.033576530560921469 349.99999966423474  0.067082892452182463 350.25770810060493  0.099869308879887875 350.77111458667099  0.13156628624254196 351.51570531988671  0.16195866809536152 352.46209608878792  0.19093398028496456 353.58237755135616  0.21846654983792213 354.85222820605424  0.27426368959368119 357.84920888955003  0.3021491186068328 359.61622715531161  0.32842484744605827 361.54040041871144  0.35316416580412735 363.61204164396673  0.37639683220717668 365.8264229027584  0.39812537333505649 368.18305324271273  0.41831630740511905 370.68769525783222  0.4557439761033848 376.0736018517199  0.47292011875991768 378.9594576910697  0.48830018181480117 382.03427944841542  0.50156023379092929 385.30662787333353  0.51222803597861422 388.77333266748747  0.51976991720685906 392.41514581060738  0.52359877559829915 396.1912597343462  0.52359877559829915 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  -8.8817841970012523e-16 100  0.06715306112184205 100.00000016788263  0.13416540811772926 99.871153979566813  0.2000859947170639 99.614413693494853  0.26450877997241218 99.244989236204376  0.32725315809820543 98.782719490159323  0.38826782246932368 98.247314081382243  0.44764126817363259 97.656293340043064  0.57139795897359669 96.305069830741061  0.63542889192342944 95.53220561073141  0.69827952069100885 94.722154327366113  0.76035187352387279 93.8895784161206  0.82202051989645941 93.048311226451347  0.8836693219130547 92.211706870163411  0.9457321983952216 91.393072001530811  1.0730247241787252 89.809460344875689  1.138267311008704 89.045865019642434  1.2052426425872236 88.333353522290537  1.2742871129404838 87.697209384435382  1.3455881079195908 87.171127692761559  1.4190994971417732 86.793973628457834  1.4946215214818199 86.602540378443862  1.5707963267948957 86.602540378443862 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  0 450  0.033576535464432844 450  0.06708288862795353 449.74229256882165  0.099869310240679354 449.22888491692595  0.13156628503243795 448.48429456674455  0.16195866455356001 447.53790447273542  0.19093398418656715 446.41762209624159  0.21846654988386938 445.14777179147779  0.27426368959368741 442.15079111044957  0.3021491186068106 440.38377284469061  0.32842484744608935 438.45959958128537  0.3531641658041238 436.38795835603389  0.37639683220714382 434.17357709724484  0.39812537333508846 431.81694675728357  0.41831630740511105 429.31230474216915  0.45574397610337858 423.92639814828101  0.4729201187599914 421.04054230892496  0.48830018181460044 417.96572055159834  0.50156023379119397 414.6933721266472  0.51222803597843036 411.22666733252822  0.51976991720691501 407.58485418938534  0.52359877559829915 403.80874026565544  0.52359877559829915 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  3.1415926535897931 100  3.0744395826609292 100  3.0074272532690807 99.871154312247398  2.9415066557379972 99.614413450152753  2.8770838762873723 99.24498917729909  2.8143395030913991 98.782719765237147  2.7533248227475049 98.247313911151892  2.6939513853142487 97.656293338930354  2.5701946946161791 96.305069830740877  2.5061637616664392 95.532205610732049  2.4433131328986759 94.722154327365189  2.3812407800659359 93.889578416120742  2.319572133693443 93.048311226452213  2.257923331676631 92.211706870162374  2.195860455194603 91.393072001531209  2.0685679294110897 89.809460344875959  2.003325342581054 89.04586501964134  1.9363500110025664 88.333353522292768  1.8673055406493542 87.697209384432796  1.7960045456701803 87.171127692763221  1.7224931564479862 86.793973628457351  1.6469711321080045 86.602540378443862  1.5707963267948963 86.602540378443862 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 403.54687357661732  5.7629069293083264 407.0716639172436  5.7694749436140578 410.487699155016  5.7788372822703495 413.75575290976724  5.7905468978362755 416.85651205299661  5.804200902300904 419.78454290273055  5.8195042660091909 422.54491274781367  5.8543892203674712 427.95014269520948  5.874205657532519 430.57179432632284  5.8956431336493971 433.03715988364036  5.9186431153591563 435.35355519797133  5.9431911157077124 437.52200811136817  5.9693063153241566 439.53948272348691  5.9970603676200325 441.39802719245961  6.0537021647981906 444.62485641346274  6.0823115099356198 446.02229896119849  6.1125302674090722 447.25923114449233  6.1443481994298761 448.30828448674504  6.1776550195756252 449.13732104001321  6.2122248094106727 449.71137685489032  6.2476523829853585 450  6.2831853071795862 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.6414515088523443 86.602540378443834  4.5709558474254868 86.76855436030219  4.5020903021086447 87.096991301101312  4.4351287128726282 87.559643674084498  4.3701562258480955 88.124612677935161  4.3070642203791722 88.7634768853476  4.2456065690582925 89.453947255998813  4.1205249322043267 90.961452312325036  4.0570677366948757 91.784169844340013  3.9942180422337055 92.631457510690936  3.9315176720027551 93.48864237267361  3.8685613865121442 94.341495300176661  3.8049518990899482 95.175736723592308  3.7402617286949473 95.976668732951225  3.6130930765252778 97.413920784822892  3.5508531282366924 98.058874567884871  3.4868327051487182 98.646807838009721  3.4208942233135531 99.157716307234637  3.3530653240854145 99.568620428735727  3.2835130923467619 99.855699311460796  3.2126585019782485 100  3.1415926535897931 100 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  2.7300758075223057 190  2.7300758075223057 188.76161711057227  2.73198839472064 187.55133668015193  2.7356595879105567 186.40804485479049  2.7406522245640779 185.33795497726547  2.7466665999124618 184.34258844053036  2.7534345015999824 183.4162771353935  2.7608247966701325 182.54924607309326  2.7805106679886924 180.5313877921306  2.7934228662572296 179.44012090542088  2.8074042576548592 178.42489439075112  2.8224021612079322 177.47714125871727  2.8383853128399443 176.58765276942751  2.8553986657883739 175.75234570339671  2.8735299500160485 174.96696097018872  2.9096367995004702 173.60217638596475  2.927074703391964 173.01544757903642  2.9455701846587412 172.46336132523098  2.9653382299711857 171.94696597602535  2.9865550769566158 171.47070368601692  3.0094637838744882 171.044924719389  3.0342362135094789 170.68192128165288  3.0846904814586811 170.16788483391167  3.110457736212882 169.98675095042276  3.1373772459573144 169.90241768877223  3.1644097931300808 169.92983296212577  3.1907387356792545 170.06246027525333  3.2157117427758561 170.28378283343829  3.2387860886964592 170.56795276727468  3.2857128896829386 171.28490034470798  3.3095267559518353 171.75813983885746  3.3315889559519829 172.28669212661248  3.3520793566732001 172.86264456356133  3.3712426139199891 173.47925753251525  3.3892171781517373 174.13467786991569  3.4061709628706178 174.82956714675092  3.4315765607080646 176.00111900189935  3.4406202276953 176.44739232078726  3.4493683641263591 176.90942117645849  3.4578076048696391 177.38676190073474  3.4659242604470752 177.87897923803828  3.473704317034132 178.38564634539176  3.4811334364598099 178.90634479241825  3.4952602825731667 179.97496970201598  3.5019582387828598 180.52299721930251  3.5082759977769666 181.08420673921333  3.5141984025436779 181.65818491571483  3.5197099661181288 182.24464543072799  3.5247948715823951 182.84342899412766  3.5294369720654961 183.45450334374323  3.5385783136065494 184.81704385450712  3.5430774304692174 185.60147540318962  3.5470027815210834 186.43393805468477  3.550193052094881 187.31387149619184  3.552464823959987 188.23647567906212  3.553634828362437 189.1915419192367  3.5535877444215225 190.16041200836165  3.5507263605782593 192.52143481281828  3.5466264819059488 193.84478773876532  3.540673500034889 195.06679581640853  3.5333903287665258 196.19442250073351  3.5251084225945828 197.2339901412731  3.516072019876451 198.19784034352128  3.5063476353219669 199.100910190511  3.4816461951625191 201.11765616922102  3.4662615750150878 202.17669187279171  3.4497197612770401 203.16359594026292  3.4319965274128248 204.08585426002017  3.4130562502099866 204.9499797977617  3.3927629809540236 205.75731315708825  3.370961354722068 206.5085724462667  3.3350837042681274 207.55059273349855  3.3227385987925833 207.87877699148535  3.3101400373711489 208.18373555748497  3.2973072930831178 208.46471177911445  3.2842597447996993 208.72099547901203  3.2710176981806867 208.95192203202214  3.2576032066711278 209.15687144238044  3.2326080049219881 209.48565334621975  3.2207392065634544 209.6214488622964  3.2084220832166892 209.74086778055747  3.1956632541851522 209.841223344334  3.1824987868080563 209.9195218531847  3.1690046109869345 209.9730562872202  3.1553069337122155 209.99999993142859  3.1415926535897936 210 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 86 13  1.5707963267948968 65.825756949558411  1.6327154712662824 65.825756949558411  1.6932291717524472 65.864006867500905  1.7507575795202066 65.937442892223871  1.8052712051910964 66.036312569896907  1.856761496125801 66.15335170344234  1.9055415063953094 66.282483552944811  1.952099936317812 66.420471346860978  2.0629161296348029 66.778932482089601  2.1250872198225084 67.006800398456491  2.1853339544706767 67.244156185569551  2.2442620112456466 67.487414231305635  2.3025351264202438 67.733314062545347  2.3606629110135016 67.979402450812643  2.4192472016931634 68.223500209089394  2.5302050784324877 68.667615336463385  2.5817194923431264 68.866839100938464  2.6345541235314025 69.06107511247879  2.6893439271069774 69.248614551513228  2.746579728106743 69.426477008510119  2.8069200610078164 69.589274370436641  2.8708713445249514 69.730508107268591  2.9992017060969078 69.932606288496331  3.0640476966405026 70.004909868877107  3.1311719850682302 70.039355662624061  3.1983917367763195 70.028318240219718  3.2641727172498611 69.974453483590707  3.3272181349982342 69.886050094789667  3.3862870149554607 69.774683728264634  3.5081798163713582 69.498670248443474  3.5714250919605042 69.319625207022071  3.6315898963777626 69.124464927538256  3.6892108940849053 68.918088997427191  3.7449840031488155 68.70476714178713  3.7993700099136132 68.486956905337252  3.8529595443561395 68.266363258980974  3.937551875106212 67.914511323779521  3.9686270521261031 67.784481815413258  3.9997344878372516 67.654297451190075  4.0308853739217598 67.524679509972557  4.0620919606083179 67.396357443356322  4.0933675566722023 67.270068875670106  4.124726529435276 67.146559603975803  4.1876412188668342 66.906610876783731  4.2192025058601512 66.790155974378578  4.2508767385050721 66.677978633765278  4.2826801747989798 66.570823982696439  4.3146367579775191 66.469422533765098  4.346778116514594 66.374490184404721  4.3791435641223728 66.286728216889173  4.4504690845129815 66.11210000381476  4.491002003142964 66.024851515159256  4.5335175110851669 65.947703969718717  4.5780101363095511 65.884232047726371  4.6242947661492 65.838676004199897  4.671990288798467 65.815204415050005  4.7203649033722543 65.816217123196935  4.8385980686239742 65.873356695599171  4.9051850188102994 65.955074132754632  4.9674898644093322 66.072897682052684  5.0260608936826561 66.214413321800095  5.0812532833458581 66.371581754615221  5.1336879948128482 66.538559525712174  5.1841437822594489 66.713161178984919  5.3004316740301887 67.141550836337416  5.3644149845568734 67.397608881735124  5.4271937142726046 67.659694988105471  5.4894601011457427 67.92460429403188  5.5518865820242498 68.189151454086755  5.6151397004226302 68.450150063818768  5.6799108441584014 68.704352379472581  5.7820106096441055 69.070516194378229  5.8164404445381965 69.188355493726078  5.850946054836804 69.299959962125172  5.8855291296563488 69.404507511993899  5.9201917940156994 69.501233167507081  5.9549345429758302 69.589436335509944  5.9897541757794714 69.668488076432126  6.0540515696396966 69.796299944449615  6.084361898704401 69.849526935371983  6.1156117040988267 69.896686629941101  6.1478015408718143 69.936560691373231  6.1808677843451756 69.967806999600143  6.2146568822517638 69.989221486740504  6.2488996068735307 69.999999972571445  6.2831853071795862 70 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  3.1415926535897931 210  3.1210614961277394 210.00000010265583  3.1005291311075647 209.93977343220345  3.0802162982823336 209.81934542997405  3.060284995992693 209.64146807704995  3.0408510042354786 209.41030407615489  3.0219936054749454 209.13045541836325  3.0037625031966315 208.80633633462796  2.9570088239511896 207.83713099429386  2.9296594696116953 207.12197755130393  2.9040228867397606 206.31025246004447  2.8800610357605061 205.41069337265455  2.8577522026420392 204.42944864183883  2.8371056950111546 203.36899179251105  2.8181483011816177 202.22871149661322  2.7852216827921472 199.8723811516461  2.7709760875281595 198.67075640785762  2.7583507212744514 197.39099658337528  2.7475970196832398 196.03237707895312  2.739053731187802 194.5987376061355  2.7330886214394798 193.09989869850125  2.7300758075223053 191.554374056744  2.7300758075223053 190 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  8 23 4  0 70  0.051327893655133572 70.000000041062307  0.1026585095332937 69.975913030090624  0.1536145142233849 69.927731557706068  0.20396142023838504 69.856930569898694  0.25355894084285602 69.765831025734656  0.30232997965063024 69.65711085521778  0.35024725499271447 69.533463217305211  0.47547900793230546 69.171622753195393  0.55125596438760471 68.911912620840965  0.62536924204793554 68.628209581487553  0.69830566983646758 68.329050162545343  0.77052910495163474 68.022247356855743  0.84253146084878594 67.71504812589032  0.91487134073599652 67.414277104885272  1.0559406020423046 66.864292017065196  1.1244501887663443 66.612974265628466  1.1944986103494166 66.379922852188102  1.2663529078851745 66.17381782714574  1.340143255040398 66.005326901049187  1.4158015554213002 65.886011034309178  1.4930776239576975 65.825756949558411  1.5707963267948966 65.825756949558411 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 188.40529526822812  5.8749059028716166 186.81699263164407  5.8813321069643507 185.28146610968872  5.8904651265717982 183.8194733092634  5.9018780409367047 182.44087859992891  5.9151979318998391 181.14756859074458  5.9462084611711727 178.64894098900859  5.9641289663954833 177.45327801148096  5.9838251760732435 176.34076071834318  6.0052210062401752 175.31033358514742  6.0282871279818746 174.36355769593391  6.0530414572620703 173.50466322258802  6.1044269515590086 172.03087512917583  6.1308375000050619 171.40311466706285  6.1588814209752867 170.86877872094436  6.1884827860001463 170.44450690892319  6.2194178500469297 170.14859873510889  6.2512650406347934 170  6.2831853071795862 170 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.6326537437960944 134.17424305044165  4.5532394662454161 134.10950158823803  4.4756303392982897 133.98093441747497  4.4000913717954164 133.80144025823813  4.3266832464327729 133.58463698586775  4.2551915157717408 133.34204238483454  4.1106230834163906 132.80607638506953  4.0376765392582641 132.51031302161269  3.9653735469234719 132.20408324999829  3.8931647386010106 131.89522935165351  3.8205023141418311 131.591632576276  3.7468598154328787 131.30105579191766  3.6010565258622278 130.78164824019552  3.5290824764252773 130.54984232049199  3.4551199134103063 130.34511406165251  3.3790487521878019 130.1778232028887  3.3010107446235413 130.05943531939073  3.2213933199517744 130  3.1415926535897931 130 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  7 20 4  0 170  0.030225785850175768 170  0.060403942208535177 170.13323829157676  0.089809656452376707 170.39892023771003  0.11805541204867875 170.78166224300142  0.14492818020641529 171.26570088958786  0.17034350106111606 171.83645995042141  0.22097719814426409 173.20566738156501  0.24587007505197889 174.02300961145505  0.26911311729308007 174.92708234710466  0.29073064043857233 175.91279129804428  0.31070894112663172 176.97782263526184  0.32899625972681701 178.12264337007468  0.36230785920280351 180.61524721177804  0.37725325445837399 181.9676846606753  0.39011764872841503 183.41728858328361  0.40046937309713293 184.96339172675098  0.40780791812416606 186.59601333953287  0.41151684606748784 188.29315701982478  0.41151684606748784 190 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  3.1415926535897931 130  3.0660281889643519 130  2.990583169127206 130.05329228421115  2.9164748151389448 130.15958274693631  2.8440992178683127 130.31074365945841  2.7736158232905277 130.49706344959191  2.70495819896867 130.70955796991018  2.5631379941723229 131.19840252074181  2.490285660793738 131.47942926704206  2.4185365367169682 131.77519479638855  2.3473926232230196 132.07805706842547  2.2763352439147004 132.38049995237745  2.2048371881245359 132.67525479805303  2.0576203695522826 133.23927066004759  1.9818085176967826 133.50790196241167  1.9039233721279634 133.75038739924142  1.8236483193528268 133.95324155007785  1.7409942942068719 134.10007506789546  1.6561384758036586 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  0 210  0.030225781949774877 210.00000015112892  0.060403947046212103 209.86676130590678  0.089809652021665798 209.60108031223749  0.11805541820573318 209.218337305402  0.14492817656264201 208.73429928613263  0.17034350101405416 208.16354005084071  0.22097719814238648 206.79433261849749  0.24587007505078695 205.97699038859366  0.26911311729224341 205.07291765293593  0.29073064043839469 204.0872087019697  0.31070894112672143 203.02217736473835  0.32899625972729307 201.87735662989815  0.36230785920336483 199.38475278817143  0.37725325445872215 198.03231533928286  0.390117648728741 196.58271141667572  0.40046937309720754 195.03660827322122  0.40780791812423445 193.40398666044547  0.41151684606748784 191.70684298016479  0.41151684606748784 190 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+7 0 0  7 20 4  0 130  0.075564454874439413 129.99999993954845  0.15100949674968245 130.05329244438005  0.22511782661739943 130.15958252985621  0.29749345235156621 130.31074383584001  0.36797682046048319 130.49706338173036  0.43663445448953642 130.70955796945879  0.57845465941195773 131.19840252072038  0.65130699279232651 131.47942926702643  0.72305611686996407 131.77519479637638  0.79420003036601372 132.07805706842194  0.86525740967521614 132.38049995237844  0.9367554654670105 132.67525479806048  1.083972284040347 133.23927066005763  1.1597841358952055 133.50790196241874  1.237669281464072 133.75038739924679  1.3179443342382484 133.95324155008026  1.4005983593840572 134.10007506789648  1.4854541777866581 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+1 0 300 1 0 
+2 0 0 1 0 -0 1 50
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 191.59470473177032  5.8749059028716193 193.18300736835764  5.8813321069643223 194.71853389030395  5.8904651265718124 196.18052669073927  5.9018780409366576 197.55912140006541  5.9151979318998142 198.85243140925283  5.9462084611708423 201.35105901096543  5.9641289663948038 202.54672198847359  5.9838251760721368 203.65923928159609  6.0052210062386386 204.68966641477729  6.0282871279797714 205.63644230398049  6.0530414572594031 206.49533677731949  6.1044269515080547 207.96912486937774  6.1308374961490646 208.59688514306879  6.1588814275196162 209.13122176228288  6.1884827812567487 209.55549250885861  6.2194178552699579 209.85140168924835  6.2512650364101381 209.99999984039866  6.2831853071795862 210 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.792124216973205 134.17424305044165  4.871538494524069 134.109501588238  4.9491476214706687 133.98093441747562  5.0246865889741397 133.80144025823762  5.0980947143362885 133.58463698586883  5.1695864449974964 133.342042384835  5.3141548773514753 132.80607638507519  5.3871014215083353 132.51031302162392  5.4594044138419315 132.20408325001534  5.5316132221631182 131.89522935167579  5.60427564662095 131.59163257630365  5.677918145328567 131.30105579194895  5.8237214347629163 130.78164824070652  5.8956954738428466 130.54984239343437  5.9696580651840625 130.34511387364307  6.0457291958282866 130.17782343218008  6.1237672294309933 130.05943515068626  6.2033846302559654 130.00000006384056  6.2831853071795862 130 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 200 1 0 
+2 0 0 1 0 -0 1 20
+1 0 40 1 0 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 20
+1 0 160 1 0 
+Curves 18
+2 0 0 800 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 396.4531264233774  86.768554360301678 -49.712441623392252 392.92833608277681  87.096991301103003 -49.143655969881841 389.51230084494648  87.559643674082039 -48.329700648459557 386.24424709027198  88.124612677937151 -47.303758601946697 383.14348794697975  88.763476885346648 -46.096633933969066 380.21545709727701  89.453947255999054 -44.730534623268426 377.45508725218542  90.961452312325122 -41.584580251230875 372.04985730479018  91.784169844339857 -39.781402281845395 369.42820567367704  92.631457510690922 -37.81125762107866 366.96284011636072  93.48864237267378 -35.675359427746407 364.64644480202827  94.341495300176689 -33.371375094216411 362.47799188863092  95.175736723592081 -30.894400229760695 360.46051727651405  95.976668732951339 -28.235197605551782 358.60197280754011  97.413920783548775 -22.756398616550438 355.37514358939779  98.05887438439548 -19.967859727516355 353.97770142062154  98.646808131230941 -17.001060903351803 352.74076825489283  99.157716247916952 -13.856554777440659 351.69171562635694  99.568620170602742 -10.546176703746648 350.86267948835513  99.855699662295592 -7.0960544318152783 350.28862243838159  99.999999822335354 -3.55329295081635 350.00000035532935  100 0 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 100 -2.4492127076447545e-14 0 0 0 1 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  100 0 350  100.00000016788265 3.357653056092063 349.99999966423474  99.871153979567325 6.7082922507060294 350.25770810060493  99.614413693494157 9.9811535532793023 350.77111458667099  99.244989236204319 13.133667254014087 351.51570531988671  98.782719490160005 16.14106204554367 352.46209608878792  98.247314081381845 18.991065369133018 353.58237755135616  97.656293340043064 21.681267443995591 354.85222820605424  96.305069830741061 27.094898672399299 357.84920888955003  95.532205610731751 29.776083412862121 359.61622715531161  94.722154327365587 32.277992523382729 361.54040041871144  93.889578416120571 34.609753071732321 363.61204164396673  93.048311226451844 36.776998731952766 365.8264229027584  92.211706870163113 38.783329440035715 368.18305324271273  91.393072001530825 40.629443402342417 370.68769525783222  89.809460344875703 44.020678864939597 376.0736018517199  89.045865019642378 45.559762660744155 378.9594576910697  88.333353522290722 46.923337441037496 382.03427944841542  87.697209384435155 48.087216148864847 385.30662787333353  87.171127692761729 49.015295205844701 388.77333266748747  86.793973628457792 49.668405227687359 392.41514581060738  86.602540378443862 50 396.1912597343462  86.602540378443862 50 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  100 0 450  100 3.3576535464432191 450  99.871154312247143 6.7082918702808545 449.74229256882165  99.614413450153194 9.9811536835594623 449.22888491692595  99.244989177299104 13.133667136739369 448.48429456674455  98.782719765236706 16.141061698735722 447.53790447273542  98.247313911152233 18.991065751063456 446.41762209624159  97.656293338930354 21.681267448453593 445.14777179147779  96.305069830740891 27.09489867239995 442.15079111044957  95.532205610732319 29.776083412860999 440.38377284469061  94.722154327364748 32.277992523383702 438.45959958128537  93.88957841612077 34.609753071732086 436.38795835603389  93.048311226452682 36.776998731951778 434.17357709724484  92.211706870162118 38.783329440037349 431.81694675728357  91.393072001531223 40.629443402341558 429.31230474216915  89.809460344875973 44.020678864939015 423.92639814828101  89.045865019641511 45.559762660746543 421.04054230892496  88.333353522292256 46.923337441033972 417.96572055159834  87.697209384433535 48.087216148866737 414.6933721266472  87.17112769276271 49.015295205845263 411.22666733252822  86.793973628457522 49.668405227686577 407.58485418938534  86.602540378443862 50 403.80874026565544  86.602540378443862 50 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 403.54687357661732  86.768554360302232 -49.712441623391754 407.0716639172436  87.09699130110117 -49.143655969883547 410.487699155016  87.559643674084654 -48.329700648456935 413.75575290976724  88.124612677935062 -47.303758601949092 416.85651205299661  88.763476885347615 -46.096633933967624 419.78454290273055  89.453947255998813 -44.730534623268937 422.54491274781367  90.961452312325036 -41.584580251231031 427.95014269520948  91.784169844340013 -39.781402281845253 430.57179432632284  92.631457510690936 -37.811257621078354 433.03715988364036  93.488642372673581 -35.675359427746841 435.35355519797133  94.341495300176646 -33.37137509421671 437.52200811136817  95.175736723592308 -30.89440022975991 439.53948272348691  95.976668732951225 -28.235197605552226 441.39802719245961  97.413920784822892 -22.756398611693562 444.62485641346274  98.058874567884601 -19.967859324472435 446.02229896119849  98.646807838010218 -17.001061271986877 447.25923114449233  99.157716307234622 -13.856554899211012 448.30828448674504  99.568620428735201 -10.546176567483982 449.13732104001321  99.855699311461152 -7.0960548419637099 449.71137685489032  100 -3.5532924194227782 450  100 0 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  190 20 445.82575694955841  188.76161711057227 20 445.82575694955841  187.55133668015193 19.91235337387026 445.86400686750096  186.40804485479049 19.744123905050216 445.93744289222383  185.33795497726547 19.514902285540977 446.03631256989695  184.34258844053036 19.237873159851539 446.15335170344235  183.4162771353935 18.925064118927583 446.28248355294483  182.54924607309326 18.582260868803356 446.42047134686101  180.5313877921306 17.665560569655433 446.7789324820896  179.44012090542088 17.061450737150739 447.00680039845656  178.42489439075112 16.40377787695131 447.2441561855693  177.47714125871727 15.694221315276218 447.4874142313061  176.58765276942751 14.933544392727526 447.73331406254499  175.75234570339671 14.118946812391625 447.97940245081276  174.96696097018872 13.245592454199262 448.22350020908942  173.60217638596475 11.495728687255017 448.66761533646343  173.01544757903642 10.646755069979088 448.86683910093825  172.46336132523098 9.7423084173559129 449.0610751124795  171.94696597602535 8.771423029278985 449.24861455151228  171.47070368601692 7.7249441623440038 449.42647700851086  171.044924719389 6.5904239412074901 449.58927437043644  170.68192128165288 5.3591604830220598 449.73050810726863  170.16788483391167 2.8445553031042996 449.93260628849634  169.98675095042276 1.5578500753039846 450.00490986887729  169.90241768877223 0.21126482985045633 450.03935566262362  169.92983296212577 -1.1418347912938847 450.02831824022019  170.06246027525333 -2.4583899354909087 449.97445348359048  170.28378283343829 -3.704622003922788 449.88605009478971  170.56795276727468 -4.8532125714778402 449.77468372826468  171.28490034470798 -7.1832615379201048 449.49867024844349  171.75813983885746 -8.3610693252848058 449.31962520702172  172.28669212661248 -9.4474000731872163 449.12446492753941  172.86264456356133 -10.451521549066081 448.91808899742563  173.47925753251525 -11.386037243846355 448.70476714178824  174.13467786991569 -12.258255622356449 448.48695690533697  174.82956714675092 -13.076870757778455 448.26636325898102  176.00111900189935 -14.297448989351548 447.91451132377955  176.44739232078726 -14.730560988794394 447.78448181541324  176.90942117645849 -15.148186634249697 447.65429745119013  177.38676190073474 -15.549790747042026 447.5246795099726  177.87897923803828 -15.934838498820188 447.39635744335635  178.38564634539176 -16.302795411557238 447.27006887567012  178.90634479241825 -16.653127357550481 447.14655960397596  179.97496970201598 -17.317464667277328 446.90661087678365  180.52299721930251 -17.631473643437698 446.79015597437859  181.08420673921333 -17.926789246506338 446.67797863376529  181.65818491571483 -18.202858939283349 446.57082398269648  182.24464543072799 -18.459115888765186 446.469422533765  182.84342899412766 -18.694978966144653 446.37449018440464  183.45450334374323 -18.909852746810909 446.28672821688906  184.81704385450712 -19.332245100108075 446.1121000038147  185.60147540318962 -19.539596822360508 446.02485151515918  186.43393805468477 -19.720072090406671 445.94770396971876  187.31387149619184 -19.866415718649087 445.8842320477263  188.23647567906212 -19.970468445414252 445.83867600419984  189.1915419192367 -20.02405348878451 445.81520441504995  190.16041200836165 -20.021926857902038 445.81621712319691  192.52143481281828 -19.89076336064802 445.87335669559917  193.84478773876532 -19.702761135389348 445.95507413275465  195.06679581640853 -19.429423733772833 446.07289768205271  196.19442250073351 -19.093863615052797 446.21441332180007  197.2339901412731 -18.710705503299977 446.37158175461525  198.19784034352128 -18.29082509447235 446.53855952571217  199.100910190511 -17.836992814585784 446.71316117898493  201.11765616922102 -16.678595142648216 447.14155083633744  202.17669187279171 -15.953143137007794 447.39760888173515  203.16359594026292 -15.168455096124706 447.6596949881054  204.08585426002017 -14.322479844337014 447.92460429403201  204.9499797977617 -13.41268261852915 448.1891514540867  205.75731315708825 -12.431663425542878 448.4501500638188  206.5085724462667 -11.371142075518817 448.7043523794726  207.55059273349855 -9.6150274534363902 449.07051619437817  207.87877699148535 -9.0090680862683605 449.18835549372614  208.18373555748497 -8.3889992621684186 449.29995996212511  208.46471177911445 -7.7557979054120896 449.40450751199393  208.72099547901203 -7.1104820307283623 449.50123316750705  208.95192203202214 -6.4541494263144097 449.5894363355099  209.15687144238044 -5.7880163368502879 449.66848807643208  209.48565334621975 -4.5448090320959809 449.7962999444498  209.6214488622964 -3.9537215627022064 449.84952693537196  209.74086778055747 -3.3395736896957944 449.89668662994114  209.841223344334 -2.702739282198082 449.93656069137319  209.9195218531847 -2.0451075411731523 449.9678069996001  209.9730562872202 -1.3706044135127382 449.98922148674052  209.99999993142859 -0.68571400612111455 449.9999999725714  210 -9.1940344226770776e-17 450 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  210 0 450  210.00000010265583 1.0265578731026479 450.00000004106238  209.93977343220345 2.0531775184097456 449.97591303009051  209.81934542997405 3.0681562548346761 449.92773155770618  209.64146807704995 4.0627445455190339 449.85693056989879  209.41030407615489 5.0306400381813221 449.76583102573477  209.13045541836325 5.967555357915689 449.65711085521787  208.80633633462796 6.8708596524406813 449.53346321730521  207.83713099429386 9.18036994382215 449.17162275319538  207.12197755130393 10.523829394329878 448.91191262084078  206.31025246004447 11.774932713181144 448.62820958148819  205.41069337265455 12.936028214861254 448.32905016254443  204.42944864183883 14.00912988520586 448.02224735685644  203.36899179251105 14.995089694532629 447.71504812589012  202.22871149661322 15.894132086087689 447.41427710488529  199.8723811516461 17.445880100292989 446.86429201706522  198.67075640785762 18.112500879287495 446.61297426562851  197.39099658337528 18.699329061251035 446.37992285218809  196.03237707895312 19.196046924645117 446.17381782714585  194.5987376061355 19.588584661696704 446.00532690104916  193.09989869850125 19.861934582966615 445.88601103430921  191.554374056744 20 445.82575694955841  190 20 445.82575694955841 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  188.40529526822812 -20.000000000000004 354.17424305044159  186.81699263164407 -19.85163748421305 354.10950158823778  185.28146610968872 -19.557176296119984 353.98093441747551  183.8194733092634 -19.137252010782827 353.80144025823751  182.44087859992891 -18.609272595736567 353.58463698586797  181.14756859074458 -17.988894519498103 353.34204238483449  178.64894098900859 -16.533946836137474 352.8060763850695  177.45327801148096 -15.688010730209923 352.51031302161272  176.34076071834318 -14.751671354023641 352.20408324999806  175.31033358514742 -13.726821040656557 351.89522935165371  174.36355769593391 -12.613431647889318 351.59163257627586  173.50466322258802 -11.409602762233769 351.30105579191763  172.03087512917583 -8.8933777413809842 350.78164824019547  171.40311466706285 -7.5928607668802197 350.54984232049196  170.86877872094436 -6.2046298165562233 350.34511406165245  170.44450690892319 -4.7324669523921434 350.1778232028887  170.14859873510889 -3.188373618690417 350.05943531939067  170 -1.5960133272396184 349.99999999999994  170 0 349.99999999999994 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 50 -1.2246063538223773e-14 0 0 0 1 
+7 0 0  7 20 4  170 0 350  170 1.5112892925088235 350  170.13323829157676 3.0201974972875441 350.05329228421118  170.39892023771003 4.4882262522719127 350.15958274693634  170.78166224300142 5.8937836338085239 350.31074365945841  171.26570088958786 7.2253835508502897 350.49706344959191  171.83645995042141 8.4787047126246602 350.70955796991018  173.20566738156501 10.962745615245275 351.19840252074181  174.02300961145505 12.175956849896046 351.47942926704201  174.92708234710466 13.300618833567951 351.77519479638875  175.91279129804428 14.338824970520468 352.07805706842532  176.97782263526184 15.29122457343451 352.38049995237753  178.12264337007468 16.156924091174648 352.67525479805306  180.61524721177804 17.724100774430205 353.23927066004762  181.9676846606753 18.42161104257076 353.50790196241178  183.41728858328361 19.017546268068447 353.75038739924128  184.96339172675098 19.493771560366365 353.95324155007802  186.59601333953287 19.830029166827707 354.10007506789543  188.29315701982478 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  210 0 350  210.00000015112892 1.5112890974887772 349.99999993954845  209.86676130590678 3.0201977385758565 350.05329244438008  209.60108031223749 4.4882260331561916 350.15958252985627  209.218337305402 5.8937839375949101 350.31074383584001  208.73429928613263 7.2253833710765241 350.49706338173036  208.16354005084071 8.4787047103152631 350.70955796945879  206.79433261849749 10.962745615153812 351.19840252072038  205.97699038859366 12.175956849838967 351.47942926702643  205.07291765293593 13.300618833526656 351.77519479637635  204.0872087019697 14.338824970513437 352.07805706842197  203.02217736473835 15.291224573438482 352.38049995237844  201.87735662989815 16.156924091197233 352.67525479806051  199.38475278817143 17.724100774456375 353.23927066005763  198.03231533928286 18.421611042587735 353.50790196241871  196.58271141667572 19.017546268081134 353.75038739924679  195.03660827322122 19.493771560372139 353.95324155008029  193.40398666044547 19.830029166829849 354.10007506789646  191.70684298016479 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+2 0 0 300 0 0 1 1 0 -0 -0 1 0 50
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  191.59470473177032 -20.000000000000004 354.17424305044165  193.18300736835764 -19.851637484212873 354.10950158823789  194.71853389030395 -19.557176296121398 353.98093441747574  196.18052669073927 -19.13725201078212 353.80144025823745  197.55912140006541 -18.609272595738776 353.58463698586883  198.85243140925283 -17.988894519499269 353.34204238483494  201.35105901096543 -16.533946836152985 352.80607638507519  202.54672198847359 -15.688010730242384 352.51031302162386  203.65923928159609 -14.751671354075334 352.2040832500154  204.68966641477729 -13.726821040731068 351.89522935167571  205.63644230398049 -12.613431647990538 351.59163257630365  206.49533677731949 -11.409602762363491 351.30105579194895  207.96912486937774 -8.8933777438768757 350.78164824070649  208.59688514306879 -7.592860956872455 350.54984239343435  209.13122176228288 -6.2046294940723943 350.34511387364302  209.55549250885861 -4.7324671867573436 350.17782343218005  209.85140168924835 -3.1883733582241396 350.05943515068623  209.99999984039866 -1.5960135384724008 350.0000000638405  210 0 349.99999999999994 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 20 -4.898425415289509e-15 0 0 0 1 
+2 0 0 200 0 0 1 1 0 -0 -0 1 0 20
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+Polygon3D 0
+PolygonOnTriangulations 42
+37 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 74 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+12 57 58 59 60 61 62 63 64 65 66 67 56 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+2 13 2 
+p 3.2000000008 1 0 350 
+2 14 50 
+p 3.2000000008 1 0 350 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 90 91 92 93 94 95 96 97 98 99 100 79 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+12 68 80 81 82 83 84 85 86 87 88 89 79 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+2 110 74 
+p 3.2000000008 1 450 800 
+2 62 73 
+p 3.2000000008 1 450 800 
+12 1 111 112 113 114 115 116 117 118 119 120 110 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+12 57 69 70 71 72 73 74 75 76 77 78 68 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+33 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+33 2 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 50 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+12 2 34 35 36 37 38 39 40 41 42 43 1 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 44 46 47 48 49 50 51 52 53 54 55 45 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+12 1 73 74 75 76 77 78 79 80 81 82 62 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+2 56 45 
+p 3.2000000008 1 100 170 
+2 90 101 
+p 3.2000000008 1 100 170 
+12 101 103 104 105 106 107 108 109 110 111 112 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 113 114 115 116 117 118 119 120 121 122 123 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+2 161 125 
+p 3.2000000008 1 210 300 
+2 113 124 
+p 3.2000000008 1 210 300 
+37 124 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 158 159 160 125 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 44 162 163 164 165 166 167 168 169 170 171 161 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+2 50 14 
+p 3.2000000008 1 70 200 
+2 1 13 
+p 3.2000000008 1 70 200 
+37 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 14 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+2 13 2 
+p 3.2000000008 1 0 130 
+2 14 50 
+p 3.2000000008 1 0 130 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+Surfaces 8
+1 0 0 800 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 50
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+1 0 0 300 0 0 1 1 0 -0 -0 1 0 
+1 0 0 200 0 0 1 1 0 -0 -0 1 0 
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+Triangulations 9
+37 36 1 0
+100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 0 0 800 100 0 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+512 902 1 1.36386965972777
+86.6025403784438 -50 400 100 -1.83690953073357e-14 350 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 0 100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 100 -1.83690953073357e-14 350 86.6025403784439 50 400 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 100 -2.44921270764475e-14 450 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -2.44921270764475e-14 800 100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 -40.169542465297 -91.5773326655057 730.434782608696 -40.169542465297 -91.5773326655057 695.652173913043 -8.25793454723327 -99.658449300667 695.652173913043 -40.1695424652969 91.5773326655057 278.260869565217 -8.25793454723323 99.658449300667 278.260869565217 -40.1695424652969 91.5773326655057 243.478260869565 54.6948158122427 -83.7166478262529 139.130434782609 54.6948158122427 -83.7166478262529 104.347826086957 78.9140509396393 -61.4212712689668 104.347826086957 -67.7281571625741 -73.5723910673132 765.217391304348 -87.9473751206489 -47.5947393037073 765.217391304348 24.5485487140799 -96.9400265939331 139.130434782609 -67.7281571625741 -73.5723910673132 730.434782608696 -87.9473751206489 47.5947393037074 591.304347826087 -87.9473751206489 47.5947393037074 556.521739130435 -98.6361303402722 16.4594590280734 556.521739130435 -67.7281571625741 73.5723910673132 591.304347826087 -67.7281571625741 73.5723910673132 556.521739130435 24.5485487140799 -96.9400265939331 173.913043478261 -8.25793454723323 99.658449300667 313.04347826087 24.5485487140799 96.940026593933 278.260869565217 -8.25793454723327 -99.658449300667 139.130434782609 94.5817241700635 -32.4699469204684 591.304347826087 78.9140509396393 -61.4212712689668 556.521739130435 94.5817241700635 -32.4699469204684 556.521739130435 -8.25793454723327 -99.658449300667 173.913043478261 78.9140509396393 -61.4212712689668 591.304347826087 24.5485487140799 96.940026593933 313.04347826087 -67.7281571625741 73.5723910673132 626.086956521739 -40.1695424652969 91.5773326655057 591.304347826087 -40.1695424652969 91.5773326655057 626.086956521739 -8.25793454723327 -99.658449300667 208.695652173913 -40.169542465297 -91.5773326655057 208.695652173913 78.9140509396393 -61.4212712689668 626.086956521739 54.6948158122427 -83.7166478262529 626.086956521739 24.5485487140799 96.940026593933 347.826086956522 54.6948158122427 83.7166478262529 347.826086956522 -40.169542465297 -91.5773326655057 243.478260869565 -67.7281571625741 -73.5723910673132 243.478260869565 54.6948158122427 -83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 660.869565217391 -67.7281571625741 -73.5723910673132 278.260869565217 -87.9473751206489 -47.5947393037073 243.478260869565 54.6948158122427 83.7166478262529 382.608695652174 78.9140509396394 61.4212712689668 347.826086956522 -40.1695424652969 91.5773326655057 660.869565217391 -8.25793454723323 99.658449300667 660.869565217391 -87.9473751206489 -47.5947393037073 278.260869565217 78.9140509396394 61.4212712689668 382.608695652174 24.5485487140799 -96.9400265939331 695.652173913043 -8.25793454723327 -99.658449300667 660.869565217391 -8.25793454723323 99.658449300667 695.652173913043 24.5485487140799 96.940026593933 660.869565217391 -87.9473751206489 -47.5947393037073 313.04347826087 -98.6361303402722 -16.4594590280734 313.04347826087 -98.6361303402722 -16.4594590280734 278.260869565217 24.5485487140799 96.940026593933 695.652173913043 -8.25793454723327 -99.658449300667 730.434782608696 -40.169542465297 -91.5773326655057 765.217391304348 78.9140509396394 61.4212712689668 417.391304347826 24.5485487140799 96.940026593933 730.434782608696 54.6948158122427 83.7166478262529 730.434782608696 54.6948158122427 83.7166478262529 765.217391304348 78.9140509396394 61.4212712689668 765.217391304348 78.9140509396394 61.4212712689668 730.434782608696 -98.6361303402722 -16.4594590280734 347.826086956522 -98.6361303402722 16.4594590280734 347.826086956522 94.5817241700635 -32.4699469204684 626.086956521739 94.5817241700635 -32.4699469204684 278.260869565217 94.5817241700635 -32.4699469204684 243.478260869565 78.9140509396393 -61.4212712689668 278.260869565217 78.9140509396393 -61.4212712689668 243.478260869565 -98.6361303402722 16.4594590280734 382.608695652174 -87.9473751206489 47.5947393037074 382.608695652174 94.5817241700635 32.4699469204683 452.173913043478 78.9140509396393 -61.4212712689668 660.869565217391 78.9140509396393 -61.4212712689668 313.04347826087 54.6948158122427 -83.7166478262529 313.04347826087 -87.9473751206489 47.5947393037074 417.391304347826 -67.7281571625741 73.5723910673132 417.391304347826 54.6948158122427 -83.7166478262529 695.652173913043 54.6948158122427 -83.7166478262529 347.826086956522 24.5485487140799 -96.9400265939331 347.826086956522 -67.7281571625741 73.5723910673132 452.173913043478 -40.1695424652969 91.5773326655057 452.173913043478 -40.1695424652969 91.5773326655057 417.391304347826 24.5485487140799 -96.9400265939331 730.434782608696 -8.25793454723327 -99.658449300667 34.7826086956522 -40.169542465297 -91.5773326655057 34.7826086956522 94.5817241700635 32.4699469204683 34.7826086956522 24.5485487140799 -96.9400265939331 382.608695652174 -8.25793454723327 -99.658449300667 347.826086956522 -8.25793454723327 -99.658449300667 765.217391304348 -8.25793454723327 -99.658449300667 382.608695652174 -40.1695424652969 91.5773326655057 486.956521739131 -8.25793454723323 99.658449300667 486.956521739131 94.5817241700635 -32.4699469204684 660.869565217391 78.9140509396394 61.4212712689668 34.7826086956522 -8.25793454723327 -99.658449300667 417.391304347826 -40.169542465297 -91.5773326655057 417.391304347826 -40.169542465297 -91.5773326655057 69.5652173913043 -67.7281571625741 -73.5723910673132 34.7826086956522 -67.7281571625741 -73.5723910673132 69.5652173913043 -8.25793454723323 99.658449300667 521.739130434783 24.5485487140799 96.940026593933 486.956521739131 24.5485487140799 96.940026593933 521.739130434783 78.9140509396393 -61.4212712689668 695.652173913043 -40.169542465297 -91.5773326655057 452.173913043478 -67.7281571625741 -73.5723910673132 452.173913043478 -67.7281571625741 -73.5723910673132 104.347826086957 -87.9473751206489 -47.5947393037073 104.347826086957 -87.9473751206489 -47.5947393037073 69.5652173913043 94.5817241700635 32.4699469204683 69.5652173913043 54.6948158122427 -83.7166478262529 730.434782608696 -67.7281571625741 -73.5723910673132 486.956521739131 -87.9473751206489 -47.5947393037073 486.956521739131 -87.9473751206489 -47.5947393037073 452.173913043478 -87.9473751206489 -47.5947393037073 139.130434782609 -98.6361303402722 -16.4594590280734 104.347826086957 24.5485487140799 -96.9400265939331 765.217391304348 24.5485487140799 96.940026593933 556.521739130435 54.6948158122427 83.7166478262529 556.521739130435 -98.6361303402722 -16.4594590280734 139.130434782609 54.6948158122427 83.7166478262529 34.7826086956522 -87.9473751206489 -47.5947393037073 521.739130434783 -98.6361303402722 -16.4594590280734 486.956521739131 94.5817241700635 -32.4699469204684 695.652173913043 54.6948158122427 83.7166478262529 591.304347826087 78.9140509396394 61.4212712689668 556.521739130435 -98.6361303402722 -16.4594590280734 173.913043478261 -98.6361303402722 16.4594590280734 173.913043478261 -98.6361303402722 -16.4594590280734 521.739130434783 78.9140509396394 61.4212712689668 591.304347826087 -98.6361303402722 16.4594590280734 208.695652173913 78.9140509396394 61.4212712689668 69.5652173913043 -87.9473751206489 47.5947393037074 208.695652173913 -98.6361303402722 -16.4594590280734 556.521739130435 78.9140509396393 -61.4212712689668 730.434782608696 54.6948158122427 -83.7166478262529 765.217391304348 -87.9473751206489 47.5947393037074 243.478260869565 -67.7281571625741 73.5723910673132 208.695652173913 -98.6361303402722 16.4594590280734 591.304347826087 78.9140509396394 61.4212712689668 626.086956521739 94.5817241700635 32.4699469204683 591.304347826087 -67.7281571625741 73.5723910673132 243.478260869565 94.5817241700635 32.4699469204683 626.086956521739 94.5817241700635 32.4699469204683 660.869565217391 94.5817241700635 -32.4699469204684 730.434782608696 94.5817241700635 32.4699469204683 104.347826086957 24.5485487140799 96.940026593933 34.7826086956522 78.9140509396393 -61.4212712689668 765.217391304348 -67.7281571625741 73.5723910673132 278.260869565217 -87.9473751206489 47.5947393037074 626.086956521739 94.5817241700635 -32.4699469204684 104.347826086957 78.9140509396393 -61.4212712689668 69.5652173913043 94.5817241700635 -32.4699469204684 69.5652173913043 94.5817241700635 -32.4699469204684 765.217391304348 -40.1695424652969 91.5773326655057 313.04347826087 -67.7281571625741 73.5723910673132 660.869565217391 78.9140509396393 -61.4212712689668 139.130434782609 -8.25793454723323 99.658449300667 347.826086956522 54.6948158122427 83.7166478262529 69.5652173913043 78.9140509396394 61.4212712689668 104.347826086957 54.6948158122427 -83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 208.695652173913 -40.1695424652969 91.5773326655057 695.652173913043 -8.25793454723323 99.658449300667 730.434782608696 94.5817241700635 32.4699469204683 139.130434782609 24.5485487140799 96.940026593933 382.608695652174 24.5485487140799 96.940026593933 765.217391304348 -8.25793454723327 -99.658449300667 243.478260869565 -8.25793454723323 99.658449300667 34.7826086956522 54.6948158122427 83.7166478262529 417.391304347826 94.5817241700635 -32.4699469204684 313.04347826087 -40.169542465297 -91.5773326655057 278.260869565217 78.9140509396394 61.4212712689668 452.173913043478 -67.7281571625741 -73.5723910673132 313.04347826087 78.9140509396393 -61.4212712689668 347.826086956522 24.5485487140799 96.940026593933 69.5652173913043 54.6948158122427 83.7166478262529 104.347826086957 54.6948158122427 -83.7166478262529 382.608695652174 -87.9473751206489 -47.5947393037073 347.826086956522 94.5817241700635 32.4699469204683 486.956521739131 24.5485487140799 -96.9400265939331 417.391304347826 -98.6361303402722 -16.4594590280734 382.608695652174 78.9140509396394 61.4212712689668 139.130434782609 -98.6361303402722 16.4594590280734 417.391304347826 94.5817241700635 32.4699469204683 173.913043478261 -8.25793454723327 -99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 34.7826086956522 -40.169542465297 -91.5773326655057 486.956521739131 -87.9473751206489 47.5947393037074 452.173913043478 -40.1695424652969 91.5773326655057 34.7826086956522 -67.7281571625741 -73.5723910673132 521.739130434783 -8.25793454723327 -99.658449300667 69.5652173913043 -67.7281571625741 73.5723910673132 486.956521739131 -40.169542465297 -91.5773326655057 104.347826086957 -87.9473751206489 -47.5947393037073 556.521739130435 -8.25793454723323 99.658449300667 69.5652173913043 -40.1695424652969 91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 139.130434782609 24.5485487140799 96.940026593933 104.347826086957 -98.6361303402722 -16.4594590280734 591.304347826087 -87.9473751206489 -47.5947393037073 173.913043478261 -8.25793454723323 99.658449300667 556.521739130435 54.6948158122427 83.7166478262529 139.130434782609 -98.6361303402722 16.4594590280734 626.086956521739 -98.6361303402722 -16.4594590280734 208.695652173913 24.5485487140799 96.940026593933 591.304347826087 -87.9473751206489 47.5947393037074 660.869565217391 -98.6361303402722 16.4594590280734 243.478260869565 78.9140509396394 61.4212712689668 173.913043478261 94.5817241700635 32.4699469204683 208.695652173913 54.6948158122427 83.7166478262529 626.086956521739 -87.9473751206489 47.5947393037074 278.260869565217 -67.7281571625741 73.5723910673132 695.652173913043 -67.7281571625741 73.5723910673132 34.7826086956522 78.9140509396394 61.4212712689668 660.869565217391 -67.7281571625741 73.5723910673132 313.04347826087 -40.1695424652969 91.5773326655057 730.434782608696 -40.1695424652969 91.5773326655057 69.5652173913043 -8.25793454723323 99.658449300667 765.217391304348 94.5817241700635 32.4699469204683 695.652173913043 -40.1695424652969 91.5773326655057 347.826086956522 94.5817241700635 -32.4699469204684 347.826086956522 -8.25793454723323 99.658449300667 104.347826086957 94.5817241700635 -32.4699469204684 139.130434782609 -8.25793454723323 99.658449300667 382.608695652174 78.9140509396393 -61.4212712689668 382.608695652174 78.9140509396393 -61.4212712689668 173.913043478261 54.6948158122427 -83.7166478262529 208.695652173913 54.6948158122427 -83.7166478262529 417.391304347826 24.5485487140799 96.940026593933 417.391304347826 24.5485487140799 96.940026593933 139.130434782609 54.6948158122427 83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 452.173913043478 24.5485487140799 -96.9400265939331 243.478260869565 78.9140509396394 61.4212712689668 208.695652173913 54.6948158122427 83.7166478262529 452.173913043478 94.5817241700635 32.4699469204683 243.478260869565 -8.25793454723327 -99.658449300667 486.956521739131 -8.25793454723327 -99.658449300667 278.260869565217 78.9140509396394 61.4212712689668 486.956521739131 -40.169542465297 -91.5773326655057 313.04347826087 -87.9473751206489 47.5947393037074 34.7826086956522 -40.169542465297 -91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 347.826086956522 -67.7281571625741 -73.5723910673132 556.521739130435 94.5817241700635 32.4699469204683 521.739130434783 -87.9473751206489 -47.5947393037073 382.608695652174 -67.7281571625741 73.5723910673132 69.5652173913043 -87.9473751206489 -47.5947393037073 591.304347826087 54.6948158122427 -83.7166478262529 34.7826086956522 -98.6361303402722 -16.4594590280734 417.391304347826 -40.1695424652969 91.5773326655057 104.347826086957 -98.6361303402722 -16.4594590280734 626.086956521739 -98.6361303402722 16.4594590280734 452.173913043478 24.5485487140799 -96.9400265939331 69.5652173913043 -8.25793454723323 99.658449300667 139.130434782609 -98.6361303402722 16.4594590280734 660.869565217391 -8.25793454723327 -99.658449300667 104.347826086957 -87.9473751206489 47.5947393037074 486.956521739131 24.5485487140799 96.940026593933 173.913043478261 -87.9473751206489 47.5947393037074 695.652173913043 54.6948158122427 83.7166478262529 208.695652173913 -67.7281571625741 73.5723910673132 521.739130434783 -40.169542465297 -91.5773326655057 139.130434782609 -67.7281571625741 73.5723910673132 730.434782608696 78.9140509396394 61.4212712689668 243.478260869565 -67.7281571625741 -73.5723910673132 173.913043478261 -40.1695424652969 91.5773326655057 765.217391304348 -40.1695424652969 91.5773326655057 556.521739130435 -87.9473751206489 -47.5947393037073 208.695652173913 94.5817241700635 32.4699469204683 278.260869565217 78.9140509396393 -61.4212712689668 417.391304347826 -8.25793454723323 99.658449300667 591.304347826087 -98.6361303402722 16.4594590280734 34.7826086956522 -98.6361303402722 -16.4594590280734 243.478260869565 -98.6361303402722 16.4594590280734 278.260869565217 54.6948158122427 -83.7166478262529 452.173913043478 24.5485487140799 96.940026593933 626.086956521739 54.6948158122427 83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 486.956521739131 -87.9473751206489 47.5947393037074 69.5652173913043 -87.9473751206489 47.5947393037074 313.04347826087 -67.7281571625741 73.5723910673132 104.347826086957 78.9140509396394 61.4212712689668 695.652173913043 -8.25793454723327 -99.658449300667 521.739130434783 -67.7281571625741 73.5723910673132 347.826086956522 -40.1695424652969 91.5773326655057 139.130434782609 -40.169542465297 -91.5773326655057 556.521739130435 94.5817241700635 32.4699469204683 730.434782608696 -8.25793454723323 99.658449300667 173.913043478261 -40.1695424652969 91.5773326655057 382.608695652174 94.5817241700635 -32.4699469204684 173.913043478261 -67.7281571625741 -73.5723910673132 591.304347826087 -8.25793454723323 99.658449300667 417.391304347826 78.9140509396393 -61.4212712689668 208.695652173913 -87.9473751206489 -47.5947393037073 626.086956521739 24.5485487140799 96.940026593933 208.695652173913 54.6948158122427 83.7166478262529 243.478260869565 54.6948158122427 -83.7166478262529 243.478260869565 -98.6361303402722 -16.4594590280734 660.869565217391 24.5485487140799 96.940026593933 452.173913043478 24.5485487140799 -96.9400265939331 278.260869565217 78.9140509396394 61.4212712689668 278.260869565217 -98.6361303402722 16.4594590280734 695.652173913043 54.6948158122427 83.7166478262529 486.956521739131 94.5817241700635 32.4699469204683 313.04347826087 -8.25793454723327 -99.658449300667 313.04347826087 -87.9473751206489 47.5947393037074 730.434782608696 78.9140509396394 61.4212712689668 521.739130434783 -98.6361303402722 -16.4594590280734 34.7826086956522 -40.169542465297 -91.5773326655057 347.826086956522 -67.7281571625741 73.5723910673132 765.217391304348 -67.7281571625741 -73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 452.173913043478 -98.6361303402722 16.4594590280734 69.5652173913043 -87.9473751206489 -47.5947393037073 417.391304347826 94.5817241700635 32.4699469204683 556.521739130435 54.6948158122427 -83.7166478262529 486.956521739131 78.9140509396393 -61.4212712689668 34.7826086956522 -87.9473751206489 47.5947393037074 104.347826086957 -98.6361303402722 -16.4594590280734 452.173913043478 -67.7281571625741 73.5723910673132 139.130434782609 54.6948158122427 -83.7166478262529 69.5652173913043 24.5485487140799 -96.9400265939331 521.739130434783 -98.6361303402722 16.4594590280734 486.956521739131 -40.1695424652969 91.5773326655057 173.913043478261 24.5485487140799 -96.9400265939331 104.347826086957 -8.25793454723323 99.658449300667 208.695652173913 -87.9473751206489 47.5947393037074 521.739130434783 -8.25793454723327 -99.658449300667 556.521739130435 -40.169542465297 -91.5773326655057 591.304347826087 -40.169542465297 -91.5773326655057 173.913043478261 24.5485487140799 96.940026593933 243.478260869565 -67.7281571625741 -73.5723910673132 626.086956521739 -67.7281571625741 -73.5723910673132 208.695652173913 54.6948158122427 83.7166478262529 278.260869565217 -87.9473751206489 -47.5947393037073 660.869565217391 -98.6361303402722 -16.4594590280734 695.652173913043 -8.25793454723323 99.658449300667 626.086956521739 78.9140509396394 61.4212712689668 313.04347826087 94.5817241700635 32.4699469204683 347.826086956522 -98.6361303402722 16.4594590280734 313.04347826087 -98.6361303402722 16.4594590280734 730.434782608696 -87.9473751206489 -47.5947393037073 34.7826086956522 -87.9473751206489 47.5947393037074 765.217391304348 54.6948158122427 83.7166478262529 695.652173913043 -87.9473751206489 47.5947393037074 347.826086956522 94.5817241700635 -32.4699469204684 452.173913043478 -98.6361303402722 -16.4594590280734 69.5652173913043 -67.7281571625741 73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 486.956521739131 -98.6361303402722 16.4594590280734 104.347826086957 94.5817241700635 32.4699469204683 765.217391304348 94.5817241700635 -32.4699469204684 208.695652173913 54.6948158122427 -83.7166478262529 521.739130434783 -87.9473751206489 47.5947393037074 139.130434782609 -8.25793454723323 99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 556.521739130435 -67.7281571625741 73.5723910673132 173.913043478261 54.6948158122427 -83.7166478262529 278.260869565217 -40.1695424652969 91.5773326655057 208.695652173913 -8.25793454723327 -99.658449300667 591.304347826087 -40.169542465297 -91.5773326655057 626.086956521739 -8.25793454723323 99.658449300667 243.478260869565 24.5485487140799 -96.9400265939331 313.04347826087 54.6948158122427 83.7166478262529 521.739130434783 -67.7281571625741 -73.5723910673132 660.869565217391 -87.9473751206489 -47.5947393037073 695.652173913043 54.6948158122427 83.7166478262529 313.04347826087 -40.169542465297 -91.5773326655057 382.608695652174 -67.7281571625741 -73.5723910673132 417.391304347826 -98.6361303402722 -16.4594590280734 730.434782608696 -98.6361303402722 16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 34.7826086956522 94.5817241700635 -32.4699469204684 486.956521739131 78.9140509396393 -61.4212712689668 521.739130434783 54.6948158122427 -83.7166478262529 556.521739130435 -98.6361303402722 16.4594590280734 521.739130434783 24.5485487140799 -96.9400265939331 591.304347826087 -8.25793454723327 -99.658449300667 626.086956521739 -98.6361303402722 16.4594590280734 139.130434782609 -40.169542465297 -91.5773326655057 660.869565217391 -87.9473751206489 47.5947393037074 173.913043478261 -67.7281571625741 -73.5723910673132 695.652173913043 -87.9473751206489 -47.5947393037073 730.434782608696 -98.6361303402722 -16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 521.739130434783 54.6948158122427 -83.7166478262529 591.304347826087 24.5485487140799 -96.9400265939331 626.086956521739 5.75958653158129 400 6.28318530717959 350 5.76502671255203 393.146938099824 5.78038331643331 386.662410602174 5.80382582325277 380.690815213948 5.84339274904795 373.782555238023 5.89986744204557 366.815019461706 5.9668194398655 360.858265526469 6.03627258275022 356.380850902333 6.10703525710988 353.171507010994 6.18548781435823 350.960675236214 6.23370669596795 350.245215525427 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 350 0.523598775598299 400 0.077538932748348 350.60366789119 0.1509208682896 352.314017004824 0.218192472586135 354.928638859964 0.278804640762612 358.255381554833 0.346747481674073 363.324622594048 0.409044313017844 369.700044024682 0.456050013115963 376.326552497693 0.493149687318882 383.90964254567 0.51533969042131 391.563087645832 0.521486191917156 395.72529258068 0 450 0.0775391300147876 449.396329038004 0.15092123436146 447.685971589172 0.218192971604858 445.071337728308 0.278805237518871 441.744580622317 0.346748092637934 436.675324162327 0.409044978349884 430.299875845487 0.456050672751564 423.673337329156 0.493150253015108 416.090210848718 0.51534004882998 408.43673018339 0.521486285180745 404.274613176575 0 800 6.28318530717959 800 0.174532925199433 800 0.349065850398866 800 0.523598775598299 800 0.698131700797732 800 0.872664625997165 800 1.0471975511966 800 1.22173047639603 800 1.39626340159546 800 1.5707963267949 800 1.74532925199433 800 1.91986217719376 800 2.0943951023932 800 2.26892802759263 800 2.44346095279206 800 2.61799387799149 800 2.79252680319093 800 2.96705972839036 800 3.14159265358979 800 3.31612557878922 800 3.49065850398866 800 3.66519142918809 800 3.83972435438752 800 4.01425727958696 800 4.18879020478639 800 4.36332312998582 800 4.53785605518525 800 4.71238898038469 800 4.88692190558412 800 5.06145483078355 800 5.23598775598299 800 5.41052068118242 800 5.58505360638185 800 5.75958653158128 800 5.93411945678072 800 6.10865238198015 800 6.28318530717959 450 5.76502671255202 406.853061900168 5.78038331643326 413.337589397812 5.80382582325268 419.309184786033 5.84339274904778 426.217444761952 5.89986744204533 433.184980538269 5.96681943986518 439.141734473506 6.03627258290147 443.619149110997 6.10703525679861 446.828492965207 6.18548781364045 449.039324751509 6.23370669672657 449.754784472325 4.29902152596498 730.434782608696 4.29902152596498 695.652173913043 4.62971548950075 695.652173913043 1.98416378121461 278.260869565217 1.65346981767884 278.260869565217 1.98416378121461 243.478260869565 5.29110341657228 139.130434782609 5.29110341657228 104.347826086957 5.62179738010805 104.347826086957 3.96832756242921 765.217391304348 3.63763359889344 765.217391304348 4.96040945303652 139.130434782609 3.96832756242921 730.434782608696 2.64555170828614 591.304347826087 2.64555170828614 556.521739130435 2.97624567182191 556.521739130435 2.31485774475037 591.304347826087 2.31485774475037 556.521739130435 4.96040945303652 173.913043478261 1.65346981767884 313.04347826087 1.32277585414307 278.260869565217 4.62971548950075 139.130434782609 5.95249134364382 591.304347826087 5.62179738010805 556.521739130435 5.95249134364382 556.521739130435 4.62971548950075 173.913043478261 5.62179738010805 591.304347826087 1.32277585414307 313.04347826087 2.31485774475037 626.086956521739 1.98416378121461 591.304347826087 1.98416378121461 626.086956521739 4.62971548950075 208.695652173913 4.29902152596498 208.695652173913 5.62179738010805 626.086956521739 5.29110341657228 626.086956521739 1.32277585414307 347.826086956522 0.992081890607303 347.826086956522 4.29902152596498 243.478260869565 3.96832756242921 243.478260869565 5.29110341657228 660.869565217391 4.96040945303652 660.869565217391 3.96832756242921 278.260869565217 3.63763359889344 243.478260869565 0.992081890607303 382.608695652174 0.661387927071535 347.826086956522 1.98416378121461 660.869565217391 1.65346981767884 660.869565217391 3.63763359889344 278.260869565217 0.661387927071535 382.608695652174 4.96040945303652 695.652173913043 4.62971548950075 660.869565217391 1.65346981767884 695.652173913043 1.32277585414307 660.869565217391 3.63763359889344 313.04347826087 3.30693963535768 313.04347826087 3.30693963535768 278.260869565217 1.32277585414307 695.652173913043 4.62971548950075 730.434782608696 4.29902152596498 765.217391304348 0.661387927071535 417.391304347826 1.32277585414307 730.434782608696 0.992081890607303 730.434782608696 0.992081890607303 765.217391304348 0.661387927071535 765.217391304348 0.661387927071535 730.434782608696 3.30693963535768 347.826086956522 2.97624567182191 347.826086956522 5.95249134364382 626.086956521739 5.95249134364382 278.260869565217 5.95249134364382 243.478260869565 5.62179738010805 278.260869565217 5.62179738010805 243.478260869565 2.97624567182191 382.608695652174 2.64555170828614 382.608695652174 0.330693963535768 452.173913043478 5.62179738010805 660.869565217391 5.62179738010805 313.04347826087 5.29110341657228 313.04347826087 2.64555170828614 417.391304347826 2.31485774475037 417.391304347826 5.29110341657228 695.652173913043 5.29110341657228 347.826086956522 4.96040945303652 347.826086956522 2.31485774475037 452.173913043478 1.98416378121461 452.173913043478 1.98416378121461 417.391304347826 4.96040945303652 730.434782608696 4.62971548950075 34.7826086956522 4.29902152596498 34.7826086956522 0.330693963535768 34.7826086956522 4.96040945303652 382.608695652174 4.62971548950075 347.826086956522 4.62971548950075 765.217391304348 4.62971548950075 382.608695652174 1.98416378121461 486.956521739131 1.65346981767884 486.956521739131 5.95249134364382 660.869565217391 0.661387927071535 34.7826086956522 4.62971548950075 417.391304347826 4.29902152596498 417.391304347826 4.29902152596498 69.5652173913043 3.96832756242921 34.7826086956522 3.96832756242921 69.5652173913043 1.65346981767884 521.739130434783 1.32277585414307 486.956521739131 1.32277585414307 521.739130434783 5.62179738010805 695.652173913043 4.29902152596498 452.173913043478 3.96832756242921 452.173913043478 3.96832756242921 104.347826086957 3.63763359889344 104.347826086957 3.63763359889344 69.5652173913043 0.330693963535768 69.5652173913043 5.29110341657228 730.434782608696 3.96832756242921 486.956521739131 3.63763359889344 486.956521739131 3.63763359889344 452.173913043478 3.63763359889344 139.130434782609 3.30693963535768 104.347826086957 4.96040945303652 765.217391304348 1.32277585414307 556.521739130435 0.992081890607303 556.521739130435 3.30693963535768 139.130434782609 0.992081890607303 34.7826086956522 3.63763359889344 521.739130434783 3.30693963535768 486.956521739131 5.95249134364382 695.652173913043 0.992081890607303 591.304347826087 0.661387927071535 556.521739130435 3.30693963535768 173.913043478261 2.97624567182191 173.913043478261 3.30693963535768 521.739130434783 0.661387927071535 591.304347826087 2.97624567182191 208.695652173913 0.661387927071535 69.5652173913043 2.64555170828614 208.695652173913 3.30693963535768 556.521739130435 5.62179738010805 730.434782608696 5.29110341657228 765.217391304348 2.64555170828614 243.478260869565 2.31485774475037 208.695652173913 2.97624567182191 591.304347826087 0.661387927071535 626.086956521739 0.330693963535768 591.304347826087 2.31485774475037 243.478260869565 0.330693963535768 626.086956521739 0.330693963535768 660.869565217391 5.95249134364382 730.434782608696 0.330693963535768 104.347826086957 1.32277585414307 34.7826086956522 5.62179738010805 765.217391304348 2.31485774475037 278.260869565217 2.64555170828614 626.086956521739 5.95249134364382 104.347826086957 5.62179738010805 69.5652173913043 5.95249134364382 69.5652173913043 5.95249134364382 765.217391304348 1.98416378121461 313.04347826087 2.31485774475037 660.869565217391 5.62179738010805 139.130434782609 1.65346981767884 347.826086956522 0.992081890607303 69.5652173913043 0.661387927071535 104.347826086957 5.29110341657228 173.913043478261 4.96040945303652 208.695652173913 1.98416378121461 695.652173913043 1.65346981767884 730.434782608696 0.330693963535768 139.130434782609 1.32277585414307 382.608695652174 1.32277585414307 765.217391304348 4.62971548950075 243.478260869565 1.65346981767884 34.7826086956522 0.992081890607303 417.391304347826 5.95249134364382 313.04347826087 4.29902152596498 278.260869565217 0.661387927071535 452.173913043478 3.96832756242921 313.04347826087 5.62179738010805 347.826086956522 1.32277585414307 69.5652173913043 0.992081890607303 104.347826086957 5.29110341657228 382.608695652174 3.63763359889344 347.826086956522 0.330693963535768 486.956521739131 4.96040945303652 417.391304347826 3.30693963535768 382.608695652174 0.661387927071535 139.130434782609 2.97624567182191 417.391304347826 0.330693963535768 173.913043478261 4.62971548950075 452.173913043478 4.96040945303652 34.7826086956522 4.29902152596498 486.956521739131 2.64555170828614 452.173913043478 1.98416378121461 34.7826086956522 3.96832756242921 521.739130434783 4.62971548950075 69.5652173913043 2.31485774475037 486.956521739131 4.29902152596498 104.347826086957 3.63763359889344 556.521739130435 1.65346981767884 69.5652173913043 1.98416378121461 521.739130434783 3.96832756242921 139.130434782609 1.32277585414307 104.347826086957 3.30693963535768 591.304347826087 3.63763359889344 173.913043478261 1.65346981767884 556.521739130435 0.992081890607303 139.130434782609 2.97624567182191 626.086956521739 3.30693963535768 208.695652173913 1.32277585414307 591.304347826087 2.64555170828614 660.869565217391 2.97624567182191 243.478260869565 0.661387927071535 173.913043478261 0.330693963535768 208.695652173913 0.992081890607303 626.086956521739 2.64555170828614 278.260869565217 2.31485774475037 695.652173913043 2.31485774475037 34.7826086956522 0.661387927071535 660.869565217391 2.31485774475037 313.04347826087 1.98416378121461 730.434782608696 1.98416378121461 69.5652173913043 1.65346981767884 765.217391304348 0.330693963535768 695.652173913043 1.98416378121461 347.826086956522 5.95249134364382 347.826086956522 1.65346981767884 104.347826086957 5.95249134364382 139.130434782609 1.65346981767884 382.608695652174 5.62179738010805 382.608695652174 5.62179738010805 173.913043478261 5.29110341657228 208.695652173913 5.29110341657228 417.391304347826 1.32277585414307 417.391304347826 1.32277585414307 139.130434782609 0.992081890607303 173.913043478261 4.96040945303652 452.173913043478 4.96040945303652 243.478260869565 0.661387927071535 208.695652173913 0.992081890607303 452.173913043478 0.330693963535768 243.478260869565 4.62971548950075 486.956521739131 4.62971548950075 278.260869565217 0.661387927071535 486.956521739131 4.29902152596498 313.04347826087 2.64555170828614 34.7826086956522 4.29902152596498 521.739130434783 3.96832756242921 347.826086956522 3.96832756242921 556.521739130435 0.330693963535768 521.739130434783 3.63763359889344 382.608695652174 2.31485774475037 69.5652173913043 3.63763359889344 591.304347826087 5.29110341657228 34.7826086956522 3.30693963535768 417.391304347826 1.98416378121461 104.347826086957 3.30693963535768 626.086956521739 2.97624567182191 452.173913043478 4.96040945303652 69.5652173913043 1.65346981767884 139.130434782609 2.97624567182191 660.869565217391 4.62971548950075 104.347826086957 2.64555170828614 486.956521739131 1.32277585414307 173.913043478261 2.64555170828614 695.652173913043 0.992081890607303 208.695652173913 2.31485774475037 521.739130434783 4.29902152596498 139.130434782609 2.31485774475037 730.434782608696 0.661387927071535 243.478260869565 3.96832756242921 173.913043478261 1.98416378121461 765.217391304348 1.98416378121461 556.521739130435 3.63763359889344 208.695652173913 0.330693963535768 278.260869565217 5.62179738010805 417.391304347826 1.65346981767884 591.304347826087 2.97624567182191 34.7826086956522 3.30693963535768 243.478260869565 2.97624567182191 278.260869565217 5.29110341657228 452.173913043478 1.32277585414307 626.086956521739 0.992081890607303 660.869565217391 4.96040945303652 486.956521739131 2.64555170828614 69.5652173913043 2.64555170828614 313.04347826087 2.31485774475037 104.347826086957 0.661387927071535 695.652173913043 4.62971548950075 521.739130434783 2.31485774475037 347.826086956522 1.98416378121461 139.130434782609 4.29902152596498 556.521739130435 0.330693963535768 730.434782608696 1.65346981767884 173.913043478261 1.98416378121461 382.608695652174 5.95249134364382 173.913043478261 3.96832756242921 591.304347826087 1.65346981767884 417.391304347826 5.62179738010805 208.695652173913 3.63763359889344 626.086956521739 1.32277585414307 208.695652173913 0.992081890607303 243.478260869565 5.29110341657228 243.478260869565 3.30693963535768 660.869565217391 1.32277585414307 452.173913043478 4.96040945303652 278.260869565217 0.661387927071535 278.260869565217 2.97624567182191 695.652173913043 0.992081890607303 486.956521739131 0.330693963535768 313.04347826087 4.62971548950075 313.04347826087 2.64555170828614 730.434782608696 0.661387927071535 521.739130434783 3.30693963535768 34.7826086956522 4.29902152596498 347.826086956522 2.31485774475037 765.217391304348 3.96832756242921 382.608695652174 5.62179738010805 452.173913043478 2.97624567182191 69.5652173913043 3.63763359889344 417.391304347826 0.330693963535768 556.521739130435 5.29110341657228 486.956521739131 5.62179738010805 34.7826086956522 2.64555170828614 104.347826086957 3.30693963535768 452.173913043478 2.31485774475037 139.130434782609 5.29110341657228 69.5652173913043 4.96040945303652 521.739130434783 2.97624567182191 486.956521739131 1.98416378121461 173.913043478261 4.96040945303652 104.347826086957 1.65346981767884 208.695652173913 2.64555170828614 521.739130434783 4.62971548950075 556.521739130435 4.29902152596498 591.304347826087 4.29902152596498 173.913043478261 1.32277585414307 243.478260869565 3.96832756242921 626.086956521739 3.96832756242921 208.695652173913 0.992081890607303 278.260869565217 3.63763359889344 660.869565217391 3.30693963535768 695.652173913043 1.65346981767884 626.086956521739 0.661387927071535 313.04347826087 0.330693963535768 347.826086956522 2.97624567182191 313.04347826087 2.97624567182191 730.434782608696 3.63763359889344 34.7826086956522 2.64555170828614 765.217391304348 0.992081890607303 695.652173913043 2.64555170828614 347.826086956522 5.95249134364382 452.173913043478 3.30693963535768 69.5652173913043 2.31485774475037 382.608695652174 5.62179738010805 486.956521739131 2.97624567182191 104.347826086957 0.330693963535768 765.217391304348 5.95249134364382 208.695652173913 5.29110341657228 521.739130434783 2.64555170828614 139.130434782609 1.65346981767884 452.173913043478 4.96040945303652 556.521739130435 2.31485774475037 173.913043478261 5.29110341657228 278.260869565217 1.98416378121461 208.695652173913 4.62971548950075 591.304347826087 4.29902152596498 626.086956521739 1.65346981767884 243.478260869565 4.96040945303652 313.04347826087 0.992081890607303 521.739130434783 3.96832756242921 660.869565217391 3.63763359889344 695.652173913043 0.992081890607303 313.04347826087 4.29902152596498 382.608695652174 3.96832756242921 417.391304347826 3.30693963535768 730.434782608696 2.97624567182191 765.217391304348 5.95249134364382 34.7826086956522 5.95249134364382 486.956521739131 5.62179738010805 521.739130434783 5.29110341657228 556.521739130435 2.97624567182191 521.739130434783 4.96040945303652 591.304347826087 4.62971548950075 626.086956521739 2.97624567182191 139.130434782609 4.29902152596498 660.869565217391 2.64555170828614 173.913043478261 3.96832756242921 695.652173913043 3.63763359889344 730.434782608696 3.30693963535768 765.217391304348 5.95249134364382 521.739130434783 5.29110341657228 591.304347826087 4.96040945303652 626.086956521739 121 122 123 124 125 126 127 128 129 130 96 131 127 132 128 130 133 121 134 135 136 130 131 133 130 97 96 134 137 138 130 98 97 134 138 135 139 132 127 140 141 125 139 142 132 143 144 145 139 146 142 143 147 144 140 148 141 143 145 110 140 125 124 149 150 137 149 151 150 152 153 146 154 155 147 156 157 148 158 159 153 158 153 152 160 161 155 160 155 154 162 163 159 164 165 157 166 167 151 162 168 163 164 169 165 170 123 171 170 171 161 172 167 166 170 161 160 172 173 167 174 175 176 174 176 168 172 177 173 178 121 123 174 168 162 164 157 156 179 130 121 180 51 169 179 98 130 179 121 178 181 182 177 180 69 70 179 99 98 183 79 184 180 70 71 179 100 99 183 185 182 180 71 72 186 187 175 180 72 51 183 182 181 183 184 185 183 80 79 188 110 74 183 81 80 188 143 110 188 147 143 189 190 2 188 154 147 189 191 192 189 192 190 193 187 186 193 194 187 195 64 65 195 65 66 196 160 154 197 198 191 195 66 67 199 200 194 201 170 160 201 160 196 202 203 198 204 205 206 207 178 123 202 198 197 208 209 40 207 123 170 204 206 200 210 14 15 207 170 201 208 40 41 210 15 16 210 16 17 211 212 203 213 179 178 211 214 212 213 100 179 211 203 202 213 101 100 215 216 205 217 154 188 218 17 18 217 196 154 218 18 19 219 220 214 221 222 209 217 188 74 221 209 208 221 223 222 224 225 216 218 210 17 224 216 215 224 226 225 227 201 196 228 220 219 228 229 220 230 231 232 233 14 210 230 232 223 234 207 201 234 201 227 235 236 237 238 231 230 238 239 231 240 103 102 241 242 226 238 243 239 240 213 178 235 237 229 244 19 20 240 178 207 244 20 21 240 101 213 240 207 234 240 102 101 245 246 236 247 217 74 245 236 235 248 242 241 248 249 242 250 251 243 245 252 246 248 253 249 247 196 217 247 227 196 244 218 19 254 251 250 255 233 210 254 256 251 255 210 218 257 136 252 258 234 227 259 104 103 259 105 104 259 240 234 260 261 256 259 103 240 262 134 136 259 234 258 263 264 253 260 265 261 262 136 257 263 266 264 260 256 254 267 73 266 268 247 74 268 227 247 268 258 227 269 14 233 270 21 22 271 106 105 272 265 260 270 22 23 271 107 106 272 124 126 273 134 262 271 105 259 273 137 134 272 126 265 273 149 137 271 259 258 274 275 276 277 108 107 277 109 108 278 140 124 270 244 21 277 74 109 274 129 275 277 268 74 274 276 13 277 107 271 277 258 268 277 271 258 279 166 151 280 127 129 281 148 140 282 218 244 281 156 148 279 151 149 281 140 278 282 255 218 282 244 270 283 255 282 284 139 127 284 127 280 285 146 139 283 269 233 286 172 166 283 233 255 287 177 172 285 152 146 287 181 177 288 14 269 285 139 284 287 172 286 289 164 156 290 81 183 290 82 81 291 158 152 290 83 82 292 23 24 293 180 169 293 164 289 290 183 181 294 191 189 294 189 2 295 158 291 292 270 23 294 12 11 295 159 158 294 2 12 294 197 191 295 162 159 293 169 164 296 195 67 297 162 295 298 7 6 296 69 180 296 67 68 298 202 197 296 68 69 297 174 162 299 282 270 300 283 282 301 211 202 302 186 175 301 202 298 302 175 174 303 64 195 304 211 301 303 62 63 300 282 299 303 63 64 305 193 186 306 269 283 304 219 214 304 214 211 307 194 193 306 288 269 308 14 288 308 50 14 307 199 194 309 228 219 307 193 305 310 208 41 310 41 42 310 42 43 311 228 309 312 200 199 313 292 24 313 24 25 312 199 307 313 25 26 311 235 229 312 204 200 311 229 228 314 235 311 315 221 208 314 245 235 316 204 312 317 221 315 316 215 205 317 230 223 316 205 204 318 257 252 318 245 314 317 223 221 319 292 313 318 252 245 319 270 292 320 224 215 319 299 270 321 230 317 321 238 230 322 300 299 323 262 257 324 243 238 324 250 243 325 224 320 326 283 300 325 226 224 324 238 321 326 306 283 325 241 226 327 273 262 327 262 323 328 254 250 326 300 322 329 248 241 330 273 327 331 254 328 331 260 254 332 288 306 332 308 288 330 279 149 330 149 273 333 50 308 334 263 253 334 253 248 335 272 260 334 248 329 336 166 279 336 286 166 337 26 27 337 27 28 338 266 263 338 267 266 339 124 272 339 278 124 337 313 26 340 287 286 341 319 313 342 287 340 342 84 83 343 73 267 344 281 278 342 83 290 342 181 287 342 290 181 345 7 298 345 8 7 345 9 8 345 10 9 346 299 319 345 11 10 347 274 13 345 294 11 348 281 344 345 197 294 347 129 274 348 156 281 346 319 341 345 298 197 347 280 129 349 3 1 349 4 3 349 5 4 349 6 5 346 322 299 349 298 6 349 301 298 350 284 280 351 285 284 348 289 156 352 304 301 353 293 289 354 326 322 352 301 349 351 284 350 355 306 326 356 219 304 357 291 152 357 152 285 356 304 352 355 326 354 355 332 306 357 285 351 358 333 308 359 296 180 356 309 219 358 308 332 360 50 333 361 311 309 362 295 291 359 180 293 359 293 353 363 195 296 363 303 195 364 297 295 364 295 362 365 28 29 365 29 30 366 311 361 367 174 297 366 314 311 367 302 174 368 318 314 369 62 303 370 186 302 365 337 28 368 314 366 370 305 186 371 337 365 370 302 367 371 341 313 372 318 368 371 313 337 372 257 318 373 310 43 372 323 257 374 307 305 373 43 44 373 44 45 375 346 341 376 327 323 377 307 374 378 208 310 377 312 307 379 346 375 380 327 376 378 310 373 380 330 327 379 322 346 379 354 322 378 315 208 381 317 315 382 316 312 383 355 354 384 330 380 384 336 279 384 279 330 385 358 332 385 355 383 386 215 316 387 321 317 386 320 215 387 317 381 388 286 336 385 332 355 388 340 286 389 360 333 390 324 321 391 342 340 392 325 320 390 321 387 391 84 342 389 333 358 391 85 84 391 86 85 393 250 324 394 50 360 395 1 111 393 328 250 395 111 112 395 112 113 393 324 390 395 113 114 396 241 325 396 329 241 395 349 1 395 352 349 396 325 392 397 30 31 398 331 328 397 31 32 399 331 398 400 356 352 399 335 260 400 352 395 397 365 30 399 260 331 401 334 329 402 334 401 403 309 356 403 361 309 404 371 365 405 335 399 405 339 272 403 356 400 405 272 335 402 263 334 402 338 263 406 371 404 407 267 338 406 341 371 407 343 267 408 366 361 409 344 278 406 375 341 409 339 405 410 379 375 409 278 339 411 366 408 411 368 366 412 73 343 413 354 379 414 348 344 413 383 354 415 13 2 416 372 368 415 347 13 415 280 347 415 350 280 416 368 411 413 379 410 417 289 348 417 353 289 418 351 350 419 372 416 417 348 414 419 376 323 419 323 372 420 385 383 421 358 385 421 389 358 422 357 351 423 380 376 422 351 418 424 359 353 421 385 420 425 357 422 426 360 389 427 384 380 425 291 357 425 362 291 428 363 296 427 380 423 428 359 424 428 296 359 426 394 360 429 50 394 429 52 50 429 53 52 430 364 362 431 336 384 431 388 336 431 384 427 432 369 303 432 303 363 433 32 33 434 364 430 433 33 34 434 367 297 435 340 388 434 297 364 435 86 391 435 391 340 435 87 86 435 88 87 436 367 434 437 114 115 433 397 32 438 365 397 436 370 367 437 395 114 437 400 395 439 374 305 438 397 433 438 404 365 439 305 370 440 62 369 441 400 437 442 45 46 442 46 47 443 406 404 441 403 400 444 377 374 442 373 45 445 375 406 446 373 442 447 403 441 446 378 373 445 410 375 447 408 361 448 377 444 447 361 403 448 382 312 449 413 410 448 312 377 450 378 446 450 315 378 450 381 315 451 420 383 452 382 448 453 411 408 452 386 316 142 387 381 452 316 382 451 413 449 454 416 411 451 383 413 454 411 453 455 387 142 456 421 420 457 419 416 138 392 320 455 390 387 457 416 454 138 320 386 458 393 390 459 426 389 458 390 455 459 421 456 459 389 421 460 419 457 460 423 376 163 328 393 460 376 419 150 396 392 163 393 458 163 398 328 461 427 423 462 401 329 463 429 394 462 329 396 463 394 426 462 396 150 176 399 398 464 53 429 464 54 53 465 405 399 464 55 54 466 427 461 465 399 176 464 56 55 466 431 427 173 402 401 467 433 34 467 34 35 467 35 36 468 431 466 468 88 435 468 435 388 468 89 88 469 338 402 468 90 89 469 407 338 468 388 431 470 409 405 471 115 116 471 116 117 471 117 118 471 118 119 472 438 433 469 402 173 473 414 344 471 437 115 185 343 407 185 412 343 474 441 437 473 344 409 475 438 472 476 73 412 476 75 73 476 76 75 206 417 414 475 404 438 476 77 76 475 443 404 477 418 350 478 441 474 479 443 475 478 447 441 479 445 406 479 406 443 477 415 2 477 350 415 480 424 353 192 422 418 481 408 447 480 417 206 481 447 478 480 353 417 482 449 410 481 453 408 482 410 445 483 425 422 484 451 449 485 454 453 483 422 192 486 457 454 486 454 485 487 451 484 225 428 424 487 456 420 488 362 425 489 428 225 488 430 362 487 420 451 490 457 486 488 425 483 489 363 428 490 460 457 489 432 363 212 434 430 249 369 432 491 460 490 141 459 456 491 423 460 492 459 141 493 434 212 493 436 434 491 461 423 249 440 369 264 62 440 492 426 459 494 439 370 492 463 426 494 370 436 165 57 56 165 58 57 495 466 461 496 466 495 496 90 468 496 91 90 496 468 466 165 429 463 496 92 91 237 439 494 165 464 429 165 56 464 237 444 374 497 47 48 498 437 471 497 48 49 498 119 120 237 374 439 497 49 13 222 36 37 498 120 110 222 37 38 498 471 119 497 442 47 498 474 437 275 446 442 499 478 474 246 448 444 222 467 36 128 450 446 128 446 275 232 472 433 500 481 478 501 452 448 501 448 246 232 433 467 500 478 499 132 142 381 132 450 128 132 381 450 135 138 386 239 475 472 502 453 481 502 485 453 135 452 501 146 455 142 502 481 500 135 386 452 503 486 485 504 475 239 504 479 475 137 392 138 153 455 146 153 458 455 137 150 392 505 486 503 505 490 486 159 458 153 506 482 445 506 479 504 506 445 479 159 163 458 507 491 490 151 462 150 507 490 505 261 449 482 261 484 449 168 398 163 168 176 398 508 495 461 508 461 491 167 462 151 508 491 507 167 401 462 126 487 484 175 465 176 509 496 495 167 173 401 187 465 175 509 92 496 125 141 456 509 93 92 509 94 93 177 469 173 187 405 465 125 487 126 510 498 110 125 456 487 187 470 405 510 474 498 182 407 469 510 499 474 182 185 407 182 469 177 194 470 187 194 409 470 144 500 499 194 473 409 184 77 476 184 78 77 148 492 141 184 79 78 184 412 185 184 476 412 200 414 473 157 165 463 190 418 477 200 206 414 157 463 492 511 502 500 200 473 194 157 492 148 511 500 144 512 502 511 190 477 2 190 192 418 512 503 485 205 480 206 512 485 502 169 59 58 169 60 59 191 483 192 169 61 60 169 51 61 171 505 503 169 58 165 209 222 38 198 488 483 216 480 205 198 483 191 216 424 480 122 505 171 122 507 505 216 225 424 209 38 39 209 39 40 203 488 198 133 507 122 203 430 488 133 508 507 203 212 430 226 489 225 223 467 222 131 509 495 131 495 508 214 493 212 131 508 133 223 232 467 131 94 509 131 95 94 231 239 472 131 96 95 242 249 432 220 493 214 220 494 436 242 489 226 242 432 489 145 510 110 145 499 510 231 472 232 145 144 499 220 436 493 253 440 249 229 237 494 253 264 440 243 504 239 147 511 144 229 494 220 155 512 511 155 511 147 266 62 264 236 444 237 251 506 504 266 73 62 251 504 243 236 246 444 161 503 512 256 482 506 256 261 482 161 512 155 276 275 442 161 171 503 252 501 246 276 442 497 256 506 251 276 497 13 123 122 171 265 484 261 129 128 275 265 126 484 136 501 252 121 133 122 136 135 501 
+379 587 1 0.681934829863914
+190 20 445.825756949558 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 190 -20 354.174243050442 170 -1.22460635382238e-14 350 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 100 -1.83690953073357e-14 350 86.6025403784438 -50 400 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 86.6025403784439 50 400 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -1.83690953073357e-14 350 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 170 -1.22460635382238e-14 350 190 20 354.174243050442 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 210 -8.57224447675664e-15 350 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 300 -1.22460635382238e-14 350 300 -1.22460635382238e-14 350 300 8.68240888334652 350.75961234939 300 17.1010071662834 353.015368960705 300 25 356.698729810778 300 32.139380484327 361.697777844051 300 38.3022221559489 367.860619515673 300 43.3012701892219 375 300 46.9846310392954 382.898992833717 300 49.2403876506104 391.317591116653 300 50 400 300 49.2403876506104 408.682408883347 300 46.9846310392954 417.101007166283 300 43.3012701892219 425 300 38.3022221559489 432.139380484327 300 32.139380484327 438.302222155949 300 25 443.301270189222 300 17.1010071662835 446.984631039295 300 8.68240888334658 449.24038765061 300 7.27364132466213e-14 450 300 -8.68240888334644 449.24038765061 300 -17.1010071662833 446.984631039295 300 -24.9999999999999 443.301270189222 300 -32.1393804843269 438.302222155949 300 -38.3022221559488 432.139380484327 300 -43.3012701892219 425 300 -46.9846310392954 417.101007166284 300 -49.2403876506104 408.682408883347 300 -50 400 300 -49.2403876506104 391.317591116654 300 -46.9846310392955 382.898992833717 300 -43.301270189222 375 300 -38.302222155949 367.860619515673 300 -32.1393804843271 361.697777844051 300 -25.0000000000002 356.698729810778 300 -17.1010071662836 353.015368960705 300 -8.68240888334674 350.75961234939 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 119.43291878176 45.7886663327529 420.084771232648 135.848107983418 49.8292246503335 404.128967273617 119.43291878176 49.8292246503335 404.128967273617 185.093675588393 -45.7886663327528 420.084771232649 201.508864790051 -36.7861955336566 433.864078581287 185.093675588393 -36.7861955336566 433.864078581287 103.017729580102 45.7886663327529 420.084771232648 267.169621596684 30.7106356344834 360.54297453018 267.169621596684 16.2349734602341 352.709137914968 250.754432395026 16.2349734602341 352.709137914968 250.754432395026 30.7106356344834 360.54297453018 168.678486386735 -45.7886663327528 420.084771232649 152.263297185077 -49.8292246503335 404.128967273617 152.263297185077 -45.7886663327528 420.084771232649 234.339243193367 41.8583239131264 372.652592093879 217.924053991709 30.7106356344834 360.54297453018 217.924053991709 41.8583239131264 372.652592093879 135.848107983418 -49.8292246503335 404.128967273617 234.339243193367 30.7106356344834 360.54297453018 201.508864790051 48.4700132969665 387.72572564296 201.508864790051 41.8583239131264 372.652592093879 119.43291878176 -48.4700132969665 387.72572564296 103.017729580102 -49.8292246503335 404.128967273617 103.017729580102 -48.4700132969665 387.72572564296 119.43291878176 -49.8292246503335 404.128967273617 185.093675588393 48.4700132969665 387.72572564296 267.169621596684 -23.7973696518536 443.973687560324 250.754432395026 -8.22972951403665 449.318065170136 250.754432395026 -23.7973696518536 443.973687560324 267.169621596684 -8.22972951403665 449.318065170136 168.678486386735 49.8292246503335 404.128967273617 168.678486386735 48.4700132969665 387.72572564296 152.263297185077 48.4700132969665 387.72572564296 234.339243193367 -36.7861955336566 433.864078581287 234.339243193367 -23.7973696518536 443.973687560324 217.924053991709 -36.7861955336566 433.864078581287 152.263297185077 49.8292246503335 404.128967273617 201.508864790051 -45.7886663327528 420.084771232649 135.848107983418 45.7886663327529 420.084771232648 103.017729580102 36.7861955336566 433.864078581287 168.678486386735 -49.8292246503335 404.128967273617 283.584810798342 30.7106356344834 360.54297453018 283.584810798342 16.2349734602341 352.709137914968 250.754432395026 41.8583239131264 372.652592093879 135.848107983418 -48.4700132969665 387.72572564296 217.924053991709 48.4700132969665 387.72572564296 103.017729580102 -41.8583239131265 372.652592093879 283.584810798342 -23.7973696518536 443.973687560324 283.584810798342 -8.22972951403665 449.318065170136 185.093675588393 49.8292246503335 404.128967273617 250.754432395026 -36.7861955336566 433.864078581287 217.924053991709 -45.7886663327528 420.084771232649 152.263297185077 45.7886663327529 420.084771232648 185.093675588393 -49.8292246503335 404.128967273617 119.43291878176 36.7861955336566 433.864078581287 152.263297185077 -48.4700132969665 387.72572564296 267.169621596684 41.8583239131264 372.652592093879 234.339243193367 48.4700132969665 387.72572564296 119.43291878176 -41.8583239131265 372.652592093879 201.508864790051 49.8292246503335 404.128967273617 267.169621596684 -36.7861955336566 433.864078581287 234.339243193367 -45.7886663327528 420.084771232649 168.678486386735 45.7886663327529 420.084771232648 201.508864790051 -49.8292246503335 404.128967273617 135.848107983418 36.7861955336566 433.864078581287 168.678486386735 -48.4700132969665 387.72572564296 103.017729580102 23.7973696518537 443.973687560324 283.584810798342 41.8583239131264 372.652592093879 135.848107983418 -41.8583239131265 372.652592093879 250.754432395026 48.4700132969665 387.72572564296 103.017729580102 -30.7106356344834 360.54297453018 283.584810798342 -36.7861955336566 433.864078581287 217.924053991709 49.8292246503335 404.128967273617 250.754432395026 -45.7886663327528 420.084771232649 185.093675588393 45.7886663327529 420.084771232648 217.924053991709 -49.8292246503335 404.128967273617 152.263297185077 36.7861955336566 433.864078581287 185.093675588393 -48.4700132969665 387.72572564296 119.43291878176 23.7973696518537 443.973687560324 152.263297185077 -41.8583239131265 372.652592093879 267.169621596684 48.4700132969665 387.72572564296 119.43291878176 -30.7106356344834 360.54297453018 234.339243193367 49.8292246503335 404.128967273617 201.508864790051 45.7886663327529 420.084771232648 267.169621596684 -45.7886663327528 420.084771232649 234.339243193367 -49.8292246503335 404.128967273617 201.508864790051 -48.4700132969665 387.72572564296 168.678486386735 36.7861955336566 433.864078581287 168.678486386735 -41.8583239131265 372.652592093879 135.848107983418 23.7973696518537 443.973687560324 135.848107983418 -30.7106356344834 360.54297453018 103.017729580102 8.22972951403675 449.318065170136 283.584810798342 48.4700132969665 387.72572564296 250.754432395026 49.8292246503335 404.128967273617 103.017729580102 -16.2349734602342 352.709137914968 283.584810798342 -45.7886663327528 420.084771232649 217.924053991709 45.7886663327529 420.084771232648 250.754432395026 -49.8292246503335 404.128967273617 185.093675588393 36.7861955336566 433.864078581287 217.924053991709 -48.4700132969665 387.72572564296 152.263297185077 23.7973696518537 443.973687560324 185.093675588393 -41.8583239131265 372.652592093879 119.43291878176 8.22972951403675 449.318065170136 152.263297185077 -30.7106356344834 360.54297453018 267.169621596684 49.8292246503335 404.128967273617 119.43291878176 -16.2349734602342 352.709137914968 234.339243193367 45.7886663327529 420.084771232648 267.169621596684 -49.8292246503335 404.128967273617 201.508864790051 36.7861955336566 433.864078581287 234.339243193367 -48.4700132969665 387.72572564296 168.678486386735 23.7973696518537 443.973687560324 201.508864790051 -41.8583239131265 372.652592093879 168.678486386735 -30.7106356344834 360.54297453018 135.848107983418 8.22972951403675 449.318065170136 103.017729580102 -8.22972951403665 449.318065170136 135.848107983418 -16.2349734602342 352.709137914968 283.584810798342 49.8292246503335 404.128967273617 250.754432395026 45.7886663327529 420.084771232648 283.584810798342 -49.8292246503335 404.128967273617 250.754432395026 -48.4700132969665 387.72572564296 217.924053991709 36.7861955336566 433.864078581287 217.924053991709 -41.8583239131265 372.652592093879 185.093675588393 23.7973696518537 443.973687560324 185.093675588393 -30.7106356344834 360.54297453018 152.263297185077 8.22972951403675 449.318065170136 152.263297185077 -16.2349734602342 352.709137914968 119.43291878176 -8.22972951403665 449.318065170136 267.169621596684 -48.4700132969665 387.72572564296 267.169621596684 45.7886663327529 420.084771232648 234.339243193367 -41.8583239131265 372.652592093879 234.339243193367 36.7861955336566 433.864078581287 201.508864790051 -30.7106356344834 360.54297453018 201.508864790051 23.7973696518537 443.973687560324 168.678486386735 -16.2349734602342 352.709137914968 168.678486386735 8.22972951403675 449.318065170136 283.584810798342 -48.4700132969665 387.72572564296 250.754432395026 -41.8583239131265 372.652592093879 135.848107983418 -8.22972951403665 449.318065170136 217.924053991709 -30.7106356344834 360.54297453018 103.017729580102 -23.7973696518536 443.973687560324 283.584810798342 45.7886663327529 420.084771232648 267.169621596684 -41.8583239131265 372.652592093879 250.754432395026 36.7861955336566 433.864078581287 217.924053991709 23.7973696518537 443.973687560324 234.339243193367 -30.7106356344834 360.54297453018 283.584810798342 -41.8583239131265 372.652592093879 103.017729580102 16.2349734602341 352.709137914968 152.263297185077 -8.22972951403665 449.318065170136 119.43291878176 16.2349734602341 352.709137914968 250.754432395026 -30.7106356344834 360.54297453018 217.924053991709 -16.2349734602342 352.709137914968 119.43291878176 -23.7973696518536 443.973687560324 135.848107983418 16.2349734602341 352.709137914968 267.169621596684 36.7861955336566 433.864078581287 267.169621596684 -30.7106356344834 360.54297453018 234.339243193367 -16.2349734602342 352.709137914968 234.339243193367 23.7973696518537 443.973687560324 103.017729580102 30.7106356344834 360.54297453018 152.263297185077 16.2349734602341 352.709137914968 168.678486386735 -8.22972951403665 449.318065170136 283.584810798342 -30.7106356344834 360.54297453018 135.848107983418 -23.7973696518536 443.973687560324 250.754432395026 -16.2349734602342 352.709137914968 119.43291878176 30.7106356344834 360.54297453018 267.169621596684 -16.2349734602342 352.709137914968 103.017729580102 -36.7861955336566 433.864078581287 168.678486386735 16.2349734602341 352.709137914968 283.584810798342 -16.2349734602342 352.709137914968 283.584810798342 36.7861955336566 433.864078581287 250.754432395026 23.7973696518537 443.973687560324 135.848107983418 30.7106356344834 360.54297453018 217.924053991709 8.22972951403675 449.318065170136 103.017729580102 41.8583239131264 372.652592093879 152.263297185077 -23.7973696518536 443.973687560324 152.263297185077 30.7106356344834 360.54297453018 119.43291878176 -36.7861955336566 433.864078581287 267.169621596684 23.7973696518537 443.973687560324 119.43291878176 41.8583239131264 372.652592093879 168.678486386735 30.7106356344834 360.54297453018 234.339243193367 8.22972951403675 449.318065170136 168.678486386735 -23.7973696518536 443.973687560324 135.848107983418 41.8583239131264 372.652592093879 135.848107983418 -36.7861955336566 433.864078581287 103.017729580102 48.4700132969665 387.72572564296 103.017729580102 -45.7886663327528 420.084771232649 217.924053991709 16.2349734602341 352.709137914968 283.584810798342 23.7973696518537 443.973687560324 250.754432395026 8.22972951403675 449.318065170136 185.093675588393 30.7106356344834 360.54297453018 217.924053991709 -8.22972951403665 449.318065170136 185.093675588393 -23.7973696518536 443.973687560324 152.263297185077 41.8583239131264 372.652592093879 119.43291878176 48.4700132969665 387.72572564296 152.263297185077 -36.7861955336566 433.864078581287 234.339243193367 16.2349734602341 352.709137914968 119.43291878176 -45.7886663327528 420.084771232649 201.508864790051 30.7106356344834 360.54297453018 267.169621596684 8.22972951403675 449.318065170136 168.678486386735 41.8583239131264 372.652592093879 234.339243193367 -8.22972951403665 449.318065170136 201.508864790051 -23.7973696518536 443.973687560324 135.848107983418 48.4700132969665 387.72572564296 168.678486386735 -36.7861955336566 433.864078581287 103.017729580102 49.8292246503335 404.128967273617 135.848107983418 -45.7886663327528 420.084771232649 283.584810798342 8.22972951403675 449.318065170136 185.093675588393 41.8583239131264 372.652592093879 217.924053991709 -23.7973696518536 443.973687560324 2.73007580752231 190 3.14159265358979 210 2.73492819040754 187.024366020417 2.7474837119525 184.397529800585 2.77062611730711 181.546913604686 2.80448459564326 178.752969008674 2.84452135903044 176.369667096977 2.89092500251957 174.309971315007 2.94492999675158 172.548649956894 3.00237927612647 171.242034340645 3.06388091972185 170.380301086729 3.122373502916 170.023096521915 3.17866510933174 170.086043866562 3.23145479350909 170.509841698291 3.28906434405541 171.398299667707 3.34521005871398 172.743857915231 3.39324766316843 174.347888840505 3.43516921781859 176.192341023654 3.47191925165955 178.295746540249 3.50290053040403 180.640667676887 3.52729664313396 183.205669615023 3.54456948047501 186.059267040101 3.55262000752568 189.05297923185 3.5511452401824 191.895773051283 3.54202385575198 194.48438891673 3.52281744034578 197.343898776281 3.49366089659563 200.13477025801 3.45876817080794 202.522803249016 3.41850512342417 204.599616537762 3.37227391533675 206.410620564223 3.31908716723907 207.946109646233 3.26136014184309 209.086918743382 3.20502207417703 209.747291812357 3.08481357338775 209.797702468142 3.03041585385138 209.215264429107 2.97982054446045 208.306916927762 2.92244240721551 206.788174560315 2.86816612733564 204.754879178687 2.82577961636135 202.602997991452 2.78967029998251 200.14641042884 2.76054039635132 197.364149940715 2.74008093006067 194.262428648985 2.73264036238492 192.165572916192 5.8716684611121 190 6.28318530717959 170 5.87598882340341 187.19152395552 5.88833055967778 184.516885484041 5.9074527029433 182.039994698179 5.93949613715545 179.223163623154 5.98174936926212 176.597079044967 6.0263279675771 174.551494560294 6.07702721219688 172.81733759401 6.1341410212019 171.42920242427 6.19745940274944 170.463556231093 6.23973611320879 170.118264986057 6.28318530717959 100 4.71238898038469 86.6025403784438 4.84988302442822 86.8732667031317 4.9824100965315 87.6235772593243 5.10887970344934 88.7290516622296 5.26433924207639 90.4840004397121 5.43814296926353 92.7428861391894 5.61159756603283 95.0372320329239 5.77244529009577 96.9671604229308 5.92510064538493 98.4525657430886 6.08684189351647 99.5231396908821 6.1841064433386 99.8776181649079 3.14159265358979 100 4.57489493634131 86.8732667031312 4.44236786423814 87.6235772593223 4.31589825732044 88.7290516622257 4.16043871869357 90.484000439705 3.98663499150652 92.7428861391805 3.81318039473733 95.0372320329138 3.65233267034643 96.9671604293251 3.49967731603553 98.4525657314274 3.33793606869753 99.5231396846886 3.24067151591787 99.877618163893 1.5707963267949 86.6025403784439 2.98604321659331 99.6995349038218 2.836168301898 98.8632990204774 2.69385026307151 97.6290200022515 2.55873212415881 96.1384934421685 2.39426299109247 94.0482819113587 2.22181558536708 91.7501087080715 2.06401881848322 89.779880280166 1.89843078523084 88.0845894011336 1.74034205381637 87.0125187464446 1.65639307408664 86.7079714631655 -8.88178419700125e-16 100 0.155549038831779 99.6995364250708 0.30542359275373 98.8633045221148 0.44774130960487 97.6290308111529 0.582859155090544 96.1385098653288 0.747328095775065 94.0483026744097 0.919775053556721 91.7501351704929 1.07757133347658 89.7799093309045 1.24315877151204 88.0846161813635 1.40124690335627 87.0125364098992 1.48519768772147 86.7079761092912 1.84889274661175e-32 170 0.411516846067488 190 0.0568023201262033 170.202464309206 0.111190443861577 170.784931061703 0.161833030143797 171.694405902748 0.219229844709802 173.214340920064 0.273495595887875 175.24816387627 0.315887495176125 177.401364011892 0.351975748365346 179.857848980619 0.381067644864545 182.637652604668 0.40150997985239 185.737201868648 0.408952371081965 187.834463425865 1.84889274661175e-32 210 0.0568023199990197 209.797535684556 0.111190444137581 209.215068935606 0.16183302951732 208.305594113848 0.219229843519676 206.785659117562 0.273495594881989 204.751836168062 0.315887494328895 202.598636037752 0.351975747677605 200.142151074243 0.381067644351949 197.362347455423 0.40150997954739 194.262798195698 0.408952371002272 192.165536607703 1.84889274661175e-32 300 6.28318530717959 300 0.174532925199433 300 0.349065850398866 300 0.523598775598299 300 0.698131700797732 300 0.872664625997165 300 1.0471975511966 300 1.22173047639603 300 1.39626340159546 300 1.5707963267949 300 1.74532925199433 300 1.91986217719376 300 2.0943951023932 300 2.26892802759263 300 2.44346095279206 300 2.61799387799149 300 2.79252680319093 300 2.96705972839036 300 3.14159265358979 300 3.31612557878922 300 3.49065850398866 300 3.66519142918809 300 3.83972435438752 300 4.01425727958696 300 4.18879020478639 300 4.36332312998582 300 4.53785605518525 300 4.71238898038469 300 4.88692190558412 300 5.06145483078355 300 5.23598775598299 300 5.41052068118242 300 5.58505360638185 300 5.75958653158128 300 5.93411945678072 300 6.10865238198015 300 6.28318530717959 210 5.87598882339807 192.808476042752 5.88833055965779 195.483114512722 5.90745270290179 197.960005297371 5.93949613708999 200.776836372029 5.98174936915421 203.402920949326 6.0263279674235 205.448505433598 6.07702721198942 207.182662399942 6.13414102093299 208.570797574629 6.19745940304688 209.536443767991 6.23973611264938 209.881735017624 1.98416378121461 119.43291878176 1.65346981767884 135.848107983418 1.65346981767884 119.43291878176 4.29902152596498 185.093675588393 3.96832756242921 201.508864790051 3.96832756242921 185.093675588393 1.98416378121461 103.017729580102 0.661387927071534 267.169621596684 0.330693963535767 267.169621596684 0.330693963535767 250.754432395026 0.661387927071534 250.754432395026 4.29902152596498 168.678486386735 4.62971548950075 152.263297185077 4.29902152596498 152.263297185077 0.992081890607302 234.339243193367 0.661387927071534 217.924053991709 0.992081890607302 217.924053991709 4.62971548950075 135.848107983418 0.661387927071534 234.339243193367 1.32277585414307 201.508864790051 0.992081890607302 201.508864790051 4.96040945303651 119.43291878176 4.62971548950075 103.017729580102 4.96040945303651 103.017729580102 4.62971548950075 119.43291878176 1.32277585414307 185.093675588393 3.63763359889344 267.169621596684 3.30693963535768 250.754432395026 3.63763359889344 250.754432395026 3.30693963535768 267.169621596684 1.65346981767884 168.678486386735 1.32277585414307 168.678486386735 1.32277585414307 152.263297185077 3.96832756242921 234.339243193367 3.63763359889344 234.339243193367 3.96832756242921 217.924053991709 1.65346981767884 152.263297185077 4.29902152596498 201.508864790051 1.98416378121461 135.848107983418 2.31485774475037 103.017729580102 4.62971548950075 168.678486386735 0.661387927071534 283.584810798342 0.330693963535767 283.584810798342 0.992081890607302 250.754432395026 4.96040945303651 135.848107983418 1.32277585414307 217.924053991709 5.29110341657228 103.017729580102 3.63763359889344 283.584810798342 3.30693963535768 283.584810798342 1.65346981767884 185.093675588393 3.96832756242921 250.754432395026 4.29902152596498 217.924053991709 1.98416378121461 152.263297185077 4.62971548950075 185.093675588393 2.31485774475037 119.43291878176 4.96040945303651 152.263297185077 0.992081890607302 267.169621596684 1.32277585414307 234.339243193367 5.29110341657228 119.43291878176 1.65346981767884 201.508864790051 3.96832756242921 267.169621596684 4.29902152596498 234.339243193367 1.98416378121461 168.678486386735 4.62971548950075 201.508864790051 2.31485774475037 135.848107983418 4.96040945303651 168.678486386735 2.64555170828614 103.017729580102 0.992081890607302 283.584810798342 5.29110341657228 135.848107983418 1.32277585414307 250.754432395026 5.62179738010805 103.017729580102 3.96832756242921 283.584810798342 1.65346981767884 217.924053991709 4.29902152596498 250.754432395026 1.98416378121461 185.093675588393 4.62971548950075 217.924053991709 2.31485774475037 152.263297185077 4.96040945303651 185.093675588393 2.64555170828614 119.43291878176 5.29110341657228 152.263297185077 1.32277585414307 267.169621596684 5.62179738010805 119.43291878176 1.65346981767884 234.339243193367 1.98416378121461 201.508864790051 4.29902152596498 267.169621596684 4.62971548950075 234.339243193367 4.96040945303651 201.508864790051 2.31485774475037 168.678486386735 5.29110341657228 168.678486386735 2.64555170828614 135.848107983418 5.62179738010805 135.848107983418 2.97624567182191 103.017729580102 1.32277585414307 283.584810798342 1.65346981767884 250.754432395026 5.95249134364382 103.017729580102 4.29902152596498 283.584810798342 1.98416378121461 217.924053991709 4.62971548950075 250.754432395026 2.31485774475037 185.093675588393 4.96040945303651 217.924053991709 2.64555170828614 152.263297185077 5.29110341657228 185.093675588393 2.97624567182191 119.43291878176 5.62179738010805 152.263297185077 1.65346981767884 267.169621596684 5.95249134364382 119.43291878176 1.98416378121461 234.339243193367 4.62971548950075 267.169621596684 2.31485774475037 201.508864790051 4.96040945303651 234.339243193367 2.64555170828614 168.678486386735 5.29110341657228 201.508864790051 5.62179738010805 168.678486386735 2.97624567182191 135.848107983418 3.30693963535768 103.017729580102 5.95249134364382 135.848107983418 1.65346981767884 283.584810798342 1.98416378121461 250.754432395026 4.62971548950075 283.584810798342 4.96040945303651 250.754432395026 2.31485774475037 217.924053991709 5.29110341657228 217.924053991709 2.64555170828614 185.093675588393 5.62179738010805 185.093675588393 2.97624567182191 152.263297185077 5.95249134364382 152.263297185077 3.30693963535768 119.43291878176 4.96040945303651 267.169621596684 1.98416378121461 267.169621596684 5.29110341657228 234.339243193367 2.31485774475037 234.339243193367 5.62179738010805 201.508864790051 2.64555170828614 201.508864790051 5.95249134364382 168.678486386735 2.97624567182191 168.678486386735 4.96040945303651 283.584810798342 5.29110341657228 250.754432395026 3.30693963535768 135.848107983418 5.62179738010805 217.924053991709 3.63763359889344 103.017729580102 1.98416378121461 283.584810798342 5.29110341657228 267.169621596684 2.31485774475037 250.754432395026 2.64555170828614 217.924053991709 5.62179738010805 234.339243193367 5.29110341657228 283.584810798342 0.330693963535767 103.017729580102 3.30693963535768 152.263297185077 0.330693963535767 119.43291878176 5.62179738010805 250.754432395026 5.95249134364382 217.924053991709 3.63763359889344 119.43291878176 0.330693963535767 135.848107983418 2.31485774475037 267.169621596684 5.62179738010805 267.169621596684 5.95249134364382 234.339243193367 2.64555170828614 234.339243193367 0.661387927071534 103.017729580102 0.330693963535767 152.263297185077 3.30693963535768 168.678486386735 5.62179738010805 283.584810798342 3.63763359889344 135.848107983418 5.95249134364382 250.754432395026 0.661387927071534 119.43291878176 5.95249134364382 267.169621596684 3.96832756242921 103.017729580102 0.330693963535767 168.678486386735 5.95249134364382 283.584810798342 2.31485774475037 283.584810798342 2.64555170828614 250.754432395026 0.661387927071534 135.848107983418 2.97624567182191 217.924053991709 0.992081890607302 103.017729580102 3.63763359889344 152.263297185077 0.661387927071534 152.263297185077 3.96832756242921 119.43291878176 2.64555170828614 267.169621596684 0.992081890607302 119.43291878176 0.661387927071534 168.678486386735 2.97624567182191 234.339243193367 3.63763359889344 168.678486386735 0.992081890607302 135.848107983418 3.96832756242921 135.848107983418 1.32277585414307 103.017729580102 4.29902152596498 103.017729580102 0.330693963535767 217.924053991709 2.64555170828614 283.584810798342 2.97624567182191 250.754432395026 0.661387927071534 185.093675588393 3.30693963535768 217.924053991709 3.63763359889344 185.093675588393 0.992081890607302 152.263297185077 1.32277585414307 119.43291878176 3.96832756242921 152.263297185077 0.330693963535767 234.339243193367 4.29902152596498 119.43291878176 0.661387927071534 201.508864790051 2.97624567182191 267.169621596684 0.992081890607302 168.678486386735 3.30693963535768 234.339243193367 3.63763359889344 201.508864790051 1.32277585414307 135.848107983418 3.96832756242921 168.678486386735 1.65346981767884 103.017729580102 4.29902152596498 135.848107983418 2.97624567182191 283.584810798342 0.992081890607302 185.093675588393 3.63763359889344 217.924053991709 172 173 174 175 176 177 172 174 178 179 180 181 179 181 182 175 177 183 184 183 185 186 187 188 184 185 189 186 190 187 191 188 192 193 194 195 193 196 194 191 192 197 198 199 200 198 201 199 202 203 204 205 200 206 205 206 207 202 204 208 209 176 175 209 207 176 210 173 172 210 208 173 211 178 85 212 183 184 211 84 83 211 85 84 213 129 128 213 130 129 212 175 183 213 180 179 213 128 214 213 214 180 215 182 190 216 196 193 216 189 196 215 190 186 217 186 188 218 60 61 218 61 62 218 195 60 218 193 195 219 146 145 217 188 191 219 147 146 219 220 201 219 145 220 221 203 202 219 201 198 221 197 203 222 198 200 222 200 205 223 207 209 224 202 208 223 205 207 224 208 210 225 209 175 226 211 83 226 172 178 226 178 211 225 175 212 227 184 189 227 189 216 228 182 215 228 179 182 229 186 217 229 215 186 230 216 193 231 197 221 230 193 218 232 219 198 231 191 197 232 198 222 233 222 205 233 205 223 234 221 202 234 202 224 235 223 209 235 209 225 236 210 172 236 172 226 237 212 184 238 82 81 238 83 82 239 179 228 237 184 227 239 131 130 239 132 131 240 227 216 239 213 179 239 130 213 241 228 215 240 216 230 242 218 62 241 215 229 242 230 218 242 62 63 242 63 64 243 219 232 243 148 147 243 149 148 243 147 219 244 217 191 244 191 231 245 232 222 246 221 234 246 231 221 245 222 233 247 233 223 247 223 235 248 210 236 248 224 210 249 212 237 250 226 83 250 238 81 250 236 226 249 225 212 250 83 238 251 227 240 251 237 227 252 228 241 252 239 228 253 242 64 254 229 217 253 240 230 253 230 242 254 217 244 255 231 246 256 243 232 256 232 245 257 233 247 255 244 231 257 245 233 258 235 225 259 224 248 259 234 224 258 225 249 260 237 251 261 236 250 261 248 236 260 249 237 262 251 240 263 80 68 263 81 80 264 132 239 264 133 132 264 134 133 264 239 252 262 240 253 265 241 229 266 64 65 266 65 66 265 229 254 267 150 149 268 244 255 267 151 150 267 243 256 267 149 243 269 256 245 269 245 257 268 254 244 270 246 234 270 234 259 271 235 258 272 8 7 271 247 235 272 259 248 273 258 249 272 248 261 273 249 260 274 250 81 275 251 262 274 263 68 274 261 250 274 81 263 276 252 241 275 260 251 276 241 265 277 253 64 277 64 266 277 266 66 277 66 67 278 254 268 279 267 256 278 265 254 280 255 246 279 256 269 281 247 271 281 257 247 280 246 270 282 6 5 283 271 258 282 7 6 283 258 273 282 270 259 282 259 272 282 272 7 284 273 260 284 260 275 284 48 47 285 261 274 285 272 261 286 77 76 286 78 77 287 45 55 288 135 134 287 253 277 287 56 45 288 134 264 288 264 252 287 67 56 288 252 276 287 277 67 287 262 253 289 276 265 290 151 267 290 267 279 290 152 151 289 265 278 291 269 257 292 268 255 291 257 281 293 271 283 292 255 280 294 3 1 293 281 271 294 4 3 294 5 4 294 282 5 294 1 43 294 280 270 295 46 44 294 270 282 295 47 46 295 273 284 295 284 47 296 12 11 295 283 273 296 8 272 296 272 285 297 53 52 297 54 53 297 55 54 297 275 262 298 274 68 297 287 55 297 262 287 298 68 78 298 285 274 298 286 76 298 78 286 299 279 269 300 276 289 299 269 291 301 281 293 300 288 276 302 268 292 301 291 281 303 44 162 303 162 163 303 163 164 302 278 268 303 293 283 303 295 44 304 41 40 303 283 295 304 42 41 304 43 42 305 284 275 304 292 280 305 49 48 304 280 294 305 50 49 305 51 50 304 294 43 305 52 51 306 9 8 305 297 52 306 10 9 305 48 284 306 11 10 305 275 297 306 8 296 307 153 152 306 296 11 307 154 153 307 279 299 307 290 279 307 152 290 308 299 291 308 291 301 309 296 285 309 285 298 310 293 303 310 301 293 311 75 74 311 76 75 312 288 300 312 135 288 312 136 135 312 137 136 310 303 164 313 307 299 314 278 302 313 299 308 314 289 278 315 292 304 316 301 310 315 39 38 316 308 301 315 40 39 317 307 313 315 302 292 317 154 307 315 304 40 318 91 92 317 155 154 319 13 12 318 92 93 317 156 155 319 14 13 319 296 309 320 91 318 321 308 316 320 318 93 319 12 296 321 313 308 320 90 91 322 164 165 323 76 311 322 165 166 323 311 74 322 166 167 322 167 168 324 103 101 322 168 169 323 298 76 322 310 164 325 289 314 326 313 321 326 317 313 325 300 289 324 90 320 324 101 90 327 322 169 328 302 315 327 310 322 329 93 94 329 94 95 327 169 170 328 314 302 330 104 103 327 170 171 331 15 14 330 105 104 327 171 161 331 16 15 330 106 105 327 316 310 331 17 16 332 156 317 331 319 17 331 14 319 332 157 156 332 158 157 333 309 298 332 317 326 330 103 324 334 327 161 333 298 323 335 320 93 334 316 327 334 161 125 335 93 329 334 321 316 336 326 321 336 334 125 337 73 72 337 74 73 338 107 106 336 321 334 338 108 107 339 332 326 338 109 108 339 326 336 340 137 312 338 110 109 339 158 332 339 336 125 340 138 137 338 106 330 339 159 158 340 300 325 339 160 159 340 139 138 339 125 160 340 312 300 341 325 314 342 324 320 342 320 335 341 314 328 343 328 315 343 315 38 343 34 2 343 35 34 343 36 35 343 37 36 343 38 37 344 329 95 344 95 96 345 319 309 344 96 97 345 18 17 346 330 324 345 17 319 345 309 333 346 324 342 347 333 323 347 74 337 347 323 74 348 340 325 349 329 344 349 335 329 350 111 110 348 325 341 351 328 343 351 343 2 351 341 328 350 330 346 350 338 330 350 110 338 352 18 345 352 19 18 353 335 349 352 20 19 352 21 20 353 342 335 354 333 347 355 344 97 355 349 344 354 345 333 355 97 98 355 98 99 356 337 72 355 99 100 357 116 117 357 117 118 356 71 70 357 118 119 356 72 71 357 119 120 356 347 337 357 120 121 358 140 139 358 141 140 358 139 340 358 340 348 359 341 351 360 112 111 360 102 112 359 348 341 360 123 102 360 111 350 361 30 29 361 31 30 361 32 31 361 33 32 361 2 33 362 22 21 363 346 342 362 23 22 362 24 23 362 21 352 363 342 353 364 349 355 364 353 349 365 345 354 366 113 114 366 114 115 366 115 116 365 352 345 367 347 356 367 354 347 366 116 357 368 121 122 368 122 123 368 123 360 369 358 348 369 348 359 370 346 363 371 351 2 371 2 361 371 359 351 370 350 346 372 25 24 372 26 25 373 353 364 372 27 26 373 363 353 372 24 362 374 362 352 375 88 87 375 89 88 375 79 89 375 355 100 374 352 365 375 100 79 181 124 113 181 113 366 376 365 354 376 354 367 194 367 356 194 57 58 187 121 368 187 357 121 194 69 57 194 70 69 194 356 70 377 142 141 377 143 142 377 141 358 378 350 370 377 358 369 378 360 350 199 359 371 204 370 363 199 369 359 204 363 373 379 28 27 379 29 28 174 364 355 174 355 375 379 27 372 379 361 29 177 362 374 177 372 362 180 124 181 185 365 376 185 374 365 190 357 187 190 366 357 192 368 360 196 376 367 196 367 194 192 360 378 192 187 368 201 377 369 201 369 199 203 378 370 203 370 204 173 364 174 206 361 379 173 373 364 206 371 361 176 372 177 178 375 87 178 86 85 178 174 375 176 379 372 178 87 86 214 126 124 214 127 126 214 128 127 214 124 180 183 374 185 182 181 366 183 177 374 189 376 196 182 366 190 188 187 192 189 185 376 195 58 59 195 59 60 195 194 58 220 143 377 220 144 143 220 145 144 220 377 201 200 371 206 197 192 378 200 199 371 197 378 203 208 373 173 207 379 176 207 206 379 208 204 373 
+37 36 1 0
+100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 0 0 0 100 -2.8421709430404e-14 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 
+81 79 1 0.08806932591171
+210 -4.89842541528951e-15 450 190 20 445.825756949558 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 210 -4.89842541528951e-15 580 210 -4.89842541528951e-15 580 209.696155060244 3.47296355333861 580 208.793852415718 6.84040286651337 580 207.320508075689 10 580 205.32088886238 12.8557521937308 580 202.855752193731 15.3208888623796 580 200 17.3205080756888 580 196.840402866513 18.7938524157182 580 193.472963553339 19.6961550602442 580 190 20 580 186.527036446661 19.6961550602442 580 183.159597133487 18.7938524157182 580 180 17.3205080756888 580 177.144247806269 15.3208888623796 580 174.67911113762 12.8557521937308 580 172.679491924311 10 580 171.206147584282 6.84040286651339 580 170.303844939756 3.47296355333863 580 170 2.90945652986485e-14 580 170.303844939756 -3.47296355333857 580 171.206147584282 -6.84040286651334 580 172.679491924311 -9.99999999999996 580 174.67911113762 -12.8557521937308 580 177.144247806269 -15.3208888623795 580 180 -17.3205080756887 580 183.159597133487 -18.7938524157181 580 186.527036446661 -19.6961550602442 580 190 -20 580 193.472963553339 -19.6961550602442 580 196.840402866513 -18.7938524157182 580 200 -17.3205080756888 580 202.855752193731 -15.3208888623796 580 205.32088886238 -12.8557521937308 580 207.320508075689 -10.0000000000001 580 208.793852415718 -6.84040286651346 580 209.696155060244 -3.4729635533387 580 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 0 70 1.5707963267949 65.8257569495584 0.142351747122082 69.9194250413404 0.281055375999813 69.6913111137899 0.414430358933343 69.347170220943 0.57460191467716 68.8041269073138 0.74107398002479 68.1425638775227 0.889050078939067 67.5272086222772 1.03872370599815 66.9355904048767 1.19371599529568 66.4136909245251 1.35602764574802 66.0235624049143 1.46230497436568 65.8768973097914 0 200 6.28318530717959 200 0.174532925199433 200 0.349065850398866 200 0.523598775598299 200 0.698131700797732 200 0.872664625997165 200 1.0471975511966 200 1.22173047639603 200 1.39626340159546 200 1.5707963267949 200 1.74532925199433 200 1.91986217719376 200 2.0943951023932 200 2.26892802759263 200 2.44346095279206 200 2.61799387799149 200 2.79252680319093 200 2.96705972839036 200 3.14159265358979 200 3.31612557878922 200 3.49065850398866 200 3.66519142918809 200 3.83972435438752 200 4.01425727958696 200 4.18879020478639 200 4.36332312998582 200 4.53785605518525 200 4.71238898038469 200 4.88692190558412 200 5.06145483078355 200 5.23598775598299 200 5.41052068118242 200 5.58505360638185 200 5.75958653158128 200 5.93411945678072 200 6.10865238198015 200 6.28318530717959 70 1.72013247146725 65.9222647252579 1.85471909915631 66.1669542432741 2.00716842603721 66.5988697759599 2.1680232039098 67.1857573480384 2.32062944411443 67.8098941354628 2.47268807187481 68.4373513208037 2.63123021656973 69.0362072070267 2.78731777911728 69.5162728316698 2.94626920198406 69.8490981295058 3.09352922962378 69.9907658836172 3.23438566536289 69.965644740411 3.36787183147278 69.7982557092127 3.51774477754683 69.4572871864363 3.67159260869899 68.9670750694232 3.81354864144537 68.4250822054262 3.95037073077329 67.8607493368701 4.08724665603431 67.2968255054819 4.22540029705421 66.7717611852004 4.3657735702699 66.3266934273543 4.5140545776344 65.9948843404291 4.66502022222132 65.8355414042262 4.8073201484896 65.864953696004 4.93853099433839 66.0446495142749 5.08838047165455 66.4104820312536 5.24378635980383 66.9330753759453 5.38898193691902 67.5060059839887 5.53068286483151 68.0952057548532 5.67472839418684 68.6755428997765 5.82601583894822 69.2144577779357 5.97985154473146 69.6418218151269 6.12404711892915 69.8994545576524 13 1 3 15 3 4 15 13 3 16 4 5 16 15 4 17 5 6 17 16 5 18 6 7 18 17 6 19 7 8 19 18 7 20 8 9 20 19 8 21 9 10 21 10 11 21 20 9 22 11 12 22 21 11 23 12 2 23 2 51 23 22 12 24 23 51 24 51 52 25 24 52 25 52 53 26 25 53 26 53 54 27 26 54 27 54 55 28 55 56 28 56 57 28 27 55 29 28 57 29 57 58 30 58 59 30 29 58 31 30 59 31 59 60 32 60 61 32 31 60 33 61 62 33 32 61 34 62 63 34 33 62 35 63 64 35 34 63 36 64 65 36 65 66 36 35 64 37 66 67 37 36 66 38 67 68 38 37 67 39 38 68 39 68 69 40 39 69 40 69 70 40 70 71 41 71 72 41 40 71 42 41 72 42 72 73 43 42 73 43 73 74 43 74 75 44 43 75 44 75 76 45 44 76 45 76 77 46 45 77 46 77 78 47 46 78 47 78 79 48 47 79 48 79 80 49 48 80 49 80 81 14 49 81 14 81 50 
+82 80 1 0.0850572428380306
+190 -20 354.174243050442 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 210 -4.89842541528951e-15 220 210 -4.89842541528951e-15 220 209.696155060244 3.47296355333861 220 208.793852415718 6.84040286651337 220 207.320508075689 10 220 205.32088886238 12.8557521937308 220 202.855752193731 15.3208888623796 220 200 17.3205080756888 220 196.840402866513 18.7938524157182 220 193.472963553339 19.6961550602442 220 190 20 220 186.527036446661 19.6961550602442 220 183.159597133487 18.7938524157182 220 180 17.3205080756888 220 177.144247806269 15.3208888623796 220 174.67911113762 12.8557521937308 220 172.679491924311 10 220 171.206147584282 6.84040286651339 220 170.303844939756 3.47296355333863 220 170 2.90945652986485e-14 220 170.303844939756 -3.47296355333857 220 171.206147584282 -6.84040286651334 220 172.679491924311 -9.99999999999996 220 174.67911113762 -12.8557521937308 220 177.144247806269 -15.3208888623795 220 180 -17.3205080756887 220 183.159597133487 -18.7938524157181 220 186.527036446661 -19.6961550602442 220 190 -20 220 193.472963553339 -19.6961550602442 220 196.840402866513 -18.7938524157182 220 200 -17.3205080756888 220 202.855752193731 -15.3208888623796 220 205.32088886238 -12.8557521937308 220 207.320508075689 -10.0000000000001 220 208.793852415718 -6.84040286651346 220 209.696155060244 -3.4729635533387 220 210 -8.57224447675664e-15 350 190 20 354.174243050442 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 170 -1.22460635382238e-14 350 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 4.71238898038469 134.174243050442 6.28318530717959 130 4.85327844788595 134.088263569143 4.99010063715277 133.847377731445 5.12172498674817 133.48804794237 5.28145061948999 132.924101795035 5.44679451827606 132.254442217558 5.59504002539476 131.640343989945 5.74596228873161 131.058771099956 5.90284904650619 130.554327671456 6.0674637066173 130.183610770056 6.1743819504377 130.047188395291 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 130 1.5707963267949 134.174243050442 0.142410335941526 130.080640928023 0.281090663049982 130.308764554953 0.414594571639405 130.653320488076 0.574833310501752 131.196738404482 0.741299351798358 131.858368701347 0.889330920856856 132.473947824842 1.03897085878836 133.065330153674 1.19381290142985 133.586595046112 1.35600871415747 133.976403384948 1.46230681760685 134.123104386169 3.14159265358979 130 2.99918231731974 130.080640925493 2.86050199126434 130.308764553975 2.72699808025909 130.653320494305 2.56675933962782 131.196738417424 2.4002932985088 131.858368714932 2.25226172953692 132.473947838002 2.10262179161877 133.065330165529 1.94777974892844 133.586595055644 1.78558393613939 133.976403390908 1.67928583429461 134.123104387754 4.57149951279621 134.088263569037 4.43467732344834 133.847377731061 4.30305297377866 133.488047941608 4.14332734099344 132.924101793932 3.97798344210894 132.254442215957 3.8297379348938 131.640343987994 3.67881567144687 131.058771097833 3.52192891353577 130.554327671198 3.35731425490409 130.183610769691 3.25039600893176 130.047188396748 52 14 15 52 50 14 53 15 16 53 52 15 54 53 16 54 16 17 55 17 18 55 54 17 56 55 18 56 18 19 57 56 19 57 19 20 58 20 21 58 57 20 59 58 21 60 21 22 60 59 21 61 22 23 61 60 22 51 61 23 72 23 24 72 51 23 71 24 25 71 72 24 70 71 25 69 25 26 69 70 25 68 26 27 68 69 26 67 27 28 67 68 27 66 28 29 66 67 28 65 29 30 65 66 29 64 30 31 64 65 30 63 31 32 63 64 31 62 63 32 82 32 33 82 62 32 81 33 34 81 82 33 80 34 35 80 81 34 79 35 36 79 80 35 78 36 37 78 79 36 77 78 37 76 37 38 76 77 37 75 76 38 75 38 39 74 75 39 74 39 40 73 74 40 73 40 41 1 73 41 3 1 41 3 41 42 4 3 42 4 42 43 5 4 43 5 43 44 6 5 44 6 44 45 7 6 45 8 7 45 8 45 46 9 8 46 9 46 47 10 9 47 10 47 48 11 10 48 11 48 49 12 11 49 12 49 13 2 12 13 
+37 36 1 0
+50 -1.22460635382238e-14 300 49.2403876506104 8.68240888334652 300 46.9846310392954 17.1010071662834 300 43.3012701892219 25 300 38.3022221559489 32.139380484327 300 32.139380484327 38.3022221559489 300 25 43.3012701892219 300 17.1010071662834 46.9846310392954 300 8.68240888334654 49.2403876506104 300 -2.35367281220533e-14 50 300 -8.68240888334653 49.2403876506104 300 -17.1010071662834 46.9846310392954 300 -25 43.3012701892219 300 -32.1393804843269 38.3022221559489 300 -38.3022221559489 32.139380484327 300 -43.3012701892219 25 300 -46.9846310392954 17.1010071662835 300 -49.2403876506104 8.68240888334658 300 -50 7.27364132466213e-14 300 -49.2403876506104 -8.68240888334644 300 -46.9846310392955 -17.1010071662833 300 -43.301270189222 -24.9999999999999 300 -38.3022221559489 -32.1393804843269 300 -32.1393804843271 -38.3022221559488 300 -25.0000000000001 -43.3012701892219 300 -17.1010071662835 -46.9846310392954 300 -8.68240888334665 -49.2403876506104 300 -1.37223565843669e-13 -50 300 8.68240888334637 -49.2403876506104 300 17.1010071662833 -46.9846310392955 300 24.9999999999999 -43.301270189222 300 32.1393804843268 -38.302222155949 300 38.3022221559488 -32.1393804843271 300 43.3012701892218 -25.0000000000002 300 46.9846310392954 -17.1010071662836 300 49.2403876506104 -8.68240888334674 300 -2.35367281220533e-14 0 300 50 0 49.2403876506104 8.68240888334652 46.9846310392954 17.1010071662834 43.3012701892219 25 38.3022221559489 32.139380484327 32.139380484327 38.3022221559489 25 43.3012701892219 17.1010071662834 46.9846310392954 8.68240888334652 49.2403876506104 0 50 -8.68240888334651 49.2403876506104 -17.1010071662834 46.9846310392954 -25 43.3012701892219 -32.1393804843269 38.3022221559489 -38.3022221559489 32.139380484327 -43.3012701892219 25 -46.9846310392954 17.1010071662835 -49.2403876506104 8.68240888334658 -50 7.105427357601e-14 -49.2403876506104 -8.68240888334644 -46.9846310392955 -17.1010071662834 -43.301270189222 -24.9999999999999 -38.302222155949 -32.1393804843269 -32.139380484327 -38.3022221559488 -25.0000000000001 -43.3012701892219 -17.1010071662836 -46.9846310392954 -8.68240888334665 -49.2403876506104 -1.4210854715202e-13 -50 8.68240888334637 -49.2403876506104 17.1010071662833 -46.9846310392955 24.9999999999999 -43.301270189222 32.1393804843268 -38.302222155949 38.3022221559488 -32.1393804843271 43.3012701892218 -25.0000000000002 46.9846310392954 -17.1010071662836 49.2403876506104 -8.68240888334674 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+37 36 1 0
+20 -4.89842541528951e-15 200 19.6961550602442 3.47296355333861 200 18.7938524157182 6.84040286651337 200 17.3205080756888 10 200 15.3208888623795 12.8557521937308 200 12.8557521937308 15.3208888623796 200 10 17.3205080756888 200 6.84040286651339 18.7938524157182 200 3.47296355333862 19.6961550602442 200 0 20 200 -3.47296355333862 19.6961550602442 200 -6.84040286651339 18.7938524157182 200 -10 17.3205080756888 200 -12.8557521937308 15.3208888623796 200 -15.3208888623795 12.8557521937308 200 -17.3205080756888 10 200 -18.7938524157182 6.84040286651339 200 -19.6961550602442 3.47296355333863 200 -20 2.90945652986485e-14 200 -19.6961550602442 -3.47296355333857 200 -18.7938524157182 -6.84040286651334 200 -17.3205080756888 -9.99999999999996 200 -15.3208888623796 -12.8557521937308 200 -12.8557521937308 -15.3208888623795 200 -10 -17.3205080756887 200 -6.84040286651341 -18.7938524157181 200 -3.47296355333867 -19.6961550602442 200 -5.6843418860808e-14 -20 200 3.47296355333856 -19.6961550602442 200 6.8404028665133 -18.7938524157182 200 9.99999999999994 -17.3205080756888 200 12.8557521937307 -15.3208888623796 200 15.3208888623795 -12.8557521937308 200 17.3205080756887 -10.0000000000001 200 18.7938524157181 -6.84040286651346 200 19.6961550602441 -3.4729635533387 200 0 0 200 20 0 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 
+37 36 1 0
+20 -4.89842541528951e-15 0 19.6961550602442 3.47296355333861 0 18.7938524157182 6.84040286651337 0 17.3205080756888 10 0 15.3208888623795 12.8557521937308 0 12.8557521937308 15.3208888623796 0 10 17.3205080756888 0 6.84040286651339 18.7938524157182 0 3.47296355333862 19.6961550602442 0 0 20 0 -3.47296355333862 19.6961550602442 0 -6.84040286651339 18.7938524157182 0 -10 17.3205080756888 0 -12.8557521937308 15.3208888623796 0 -15.3208888623795 12.8557521937308 0 -17.3205080756888 10 0 -18.7938524157182 6.84040286651339 0 -19.6961550602442 3.47296355333863 0 -20 2.90945652986485e-14 0 -19.6961550602442 -3.47296355333857 0 -18.7938524157182 -6.84040286651334 0 -17.3205080756888 -9.99999999999996 0 -15.3208888623796 -12.8557521937308 0 -12.8557521937308 -15.3208888623795 0 -10 -17.3205080756887 0 -6.84040286651341 -18.7938524157181 0 -3.47296355333867 -19.6961550602442 0 -5.6843418860808e-14 -20 0 3.47296355333856 -19.6961550602442 0 6.8404028665133 -18.7938524157182 0 9.99999999999994 -17.3205080756888 0 12.8557521937307 -15.3208888623796 0 15.3208888623795 -12.8557521937308 0 17.3205080756887 -10.0000000000001 0 18.7938524157181 -6.84040286651346 0 19.6961550602441 -3.4729635533387 0 0 0 0 20 -3.5527136788005e-15 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 
+
+TShapes 57
+Ve
+1e-07
+100 -2.44921270764475e-14 800
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 6.28318530717959
+2  1 2 0 0 6.28318530717959
+2  2 1 0 0 6.28318530717959
+6  1 2 0
+6  2 1 0
+0
+
+0101100
++57 0 -57 0 *
+Wi
+
+0101000
++56 0 *
+Fa
+0  1e-07 1 0
+2  1
+0101000
++55 0 *
+Ve
+3.77011308578173e-06
+86.6025403784438 -50 400
+0 0
+
+0101101
+*
+Ve
+3.77011308578173e-06
+100 -1.83690953073357e-14 350
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  2 0 0 1
+2  3 2 0 0 1
+2  4 3 1 0 1
+6  3 2 0
+6  4 3 0
+0
+
+0101000
++53 0 -52 0 *
+Ve
+1e-07
+100 -2.44921270764475e-14 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 350
+3  5 6CN 2 0 0 350
+7  5 6 2 0
+0
+
+0101000
++50 0 -52 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 6.28318530717959
+2  7 2 0 0 6.28318530717959
+2  8 4 0 0 6.28318530717959
+6  7 2 0
+6  8 4 0
+0
+
+0101100
++50 0 -50 0 *
+Ve
+3.77011308578173e-06
+86.6025403784439 50 400
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  5 0 0 1
+2  9 2 0 0 1
+2  10 3 1 0 1
+6  9 2 0
+6  10 3 0
+0
+
+0101000
++52 0 -47 0 *
+Ve
+3.77011308578173e-06
+100 -2.44921270764475e-14 450
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  6 0 0 1
+2  11 2 0 0 1
+2  12 3 1 0 1
+6  11 2 0
+6  12 3 0
+0
+
+0101000
++45 0 -47 0 *
+Ed
+ 1e-07 1 1 0
+1  3 0 450 800
+3  5 6CN 2 0 450 800
+7  13 14 2 0
+0
+
+0101000
++45 0 -57 0 *
+Ed
+ 3.77011308578173e-06 1 1 0
+1  7 0 0 1
+2  13 2 0 0 1
+2  14 3 1 0 1
+6  15 2 0
+6  16 3 0
+0
+
+0101000
++53 0 -45 0 *
+Wi
+
+0101000
+-51 0 +49 0 +48 0 -49 0 -46 0 +44 0 -43 0 -56 0 +43 0 +42 0 
+*
+Fa
+0  1e-07 2 0
+2  2
+0101000
++41 0 *
+Ve
+7.99539616382488e-05
+190 20 445.825756949558
+0 0
+
+0101101
+*
+Ve
+7.99539616382488e-05
+210 -4.89842541528951e-15 450
+0 0
+
+0101101
+*
+Ed
+ 7.99539616382488e-05 1 1 0
+1  8 0 0 1
+2  15 3 1 0 1
+2  16 5 2 0 1
+6  17 3 0
+6  18 5 0
+0
+
+0101000
++39 0 -38 0 *
+Ed
+ 7.99539616382488e-05 1 1 0
+1  9 0 0 1
+2  17 3 1 0 1
+2  18 5 2 0 1
+6  19 3 0
+6  20 5 0
+0
+
+0101000
++38 0 -39 0 *
+Wi
+
+0101000
+-37 0 -36 0 *
+Ve
+1.92831599071361e-06
+190 -20 354.174243050442
+0 0
+
+0101101
+*
+Ve
+1.92831599071361e-06
+170 -1.22460635382238e-14 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  10 0 0 1
+2  19 3 1 0 1
+2  20 5 3 0 1
+6  21 3 0
+6  22 6 0
+0
+
+0101000
++34 0 -33 0 *
+Ed
+ 1e-07 1 1 0
+1  11 0 100 170
+3  21 22CN 3 0 100 170
+7  23 24 3 4
+0
+
+0101000
++52 4 -33 4 *
+Ve
+1.92831599071361e-06
+190 20 354.174243050442
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  12 0 0 1
+2  23 3 1 0 1
+2  24 5 3 0 1
+6  25 3 0
+6  26 6 0
+0
+
+0101000
++33 0 -30 0 *
+Ve
+1.92831599071361e-06
+210 -8.57224447675664e-15 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  13 0 0 1
+2  25 3 1 0 1
+2  26 5 3 0 1
+6  27 3 0
+6  28 6 0
+0
+
+0101000
++28 0 -30 0 *
+Ve
+1e-07
+50 -1.22460635382238e-14 300
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 210 300
+3  21 22CN 3 0 210 300
+7  29 30 3 4
+0
+
+0101000
++28 4 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 6.28318530717959
+2  27 3 0 0 6.28318530717959
+2  28 6 0 0 6.28318530717959
+6  31 3 4
+6  32 7 0
+0
+
+0101100
++26 0 -26 0 *
+Ed
+ 1.92831599071361e-06 1 1 0
+1  15 0 0 1
+2  29 3 1 0 1
+2  30 5 3 0 1
+6  33 3 0
+6  34 6 0
+0
+
+0101000
++34 0 -28 0 *
+Wi
+
+0101000
+-32 0 +31 1 +51 0 -42 0 -44 0 +46 0 -31 1 -29 0 +27 0 -25 1 
+-24 1 +25 1 +23 0 *
+Fa
+0  1e-07 3 1
+2  3
+0101000
++35 0 +22 0 *
+Wi
+
+0101000
+-48 0 *
+Fa
+0  1e-07 4 0
+2  4
+0101000
+-20 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 200
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 70 200
+3  31 32CN 5 0 70 200
+7  35 36 5 5
+0
+
+0101000
++38 5 -18 0 *
+Ed
+ 1e-07 1 1 0
+1  17 0 0 6.28318530717959
+2  33 5 0 0 6.28318530717959
+2  34 7 0 0 6.28318530717959
+2  35 5 6 0 6.28318530717959
+6  37 5 5
+6  38 8 0
+0
+
+0101100
++18 0 -18 0 *
+Wi
+
+0101000
++36 0 -17 2 -16 2 +17 2 +37 0 *
+Fa
+0  1e-07 5 2
+2  5
+0101000
++15 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 0 130
+3  31 32CN 5 0 0 130
+7  39 40 6 7
+0
+
+0101000
++13 0 -28 7 *
+Ed
+ 1e-07 1 1 0
+1  18 0 0 6.28318530717959
+2  36 5 0 0 6.28318530717959
+2  37 8 0 0 6.28318530717959
+2  38 5 8 0 6.28318530717959
+6  41 6 7
+6  42 9 0
+0
+
+0101100
++13 0 -13 0 *
+Wi
+
+0101000
+-23 0 +12 3 +11 3 -12 3 -27 0 +29 0 +32 0 *
+Fa
+0  1e-07 5 3
+2  6
+0101000
++10 0 *
+Wi
+
+0101000
++24 0 *
+Fa
+0  1e-07 6 0
+2  7
+0101000
++8 0 *
+Wi
+
+0101000
++16 0 *
+Fa
+0  1e-07 7 0
+2  8
+0101000
++6 0 *
+Wi
+
+0101000
+-11 0 *
+Fa
+0  1e-07 8 0
+2  9
+0101000
+-4 0 *
+Sh
+
+0101000
++54 0 +40 0 +21 0 -19 0 +14 0 +9 0 +7 1 +5 2 -3 3 *
+So
+
+0100000
++2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/test_BIELLE_bad_assoc.py b/src/TEST_PY/test_BIELLE_bad_assoc.py
new file mode 100755 (executable)
index 0000000..507389a
--- /dev/null
@@ -0,0 +1,1081 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+
+STEP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/crank.stp")
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("default")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 40.0
+
+r_grd = R
+r_grd_t = R/2
+
+r_pte = R
+r_pte_t = R/2
+
+l = 200.0
+h = 0.019999999553*2
+#h = 40.
+
+# Taille du grand cylindre
+dr_grd = R
+da_grd = 360
+dl_grd = h
+
+nr_grd = 1
+na_grd = 6
+nl_grd = 1
+
+# Taille du petit cylindre
+dr_pte = R
+da_pte = 360
+dl_pte = h
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(l, 0, 0)
+dy = doc.addVector(0, l, 0)
+dz = doc.addVector(0, 0, l)
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+c_grd = doc.addVertex(0, 0, 0)
+c_pte = doc.addVertex(2*l, 0, 0)
+dx_prime = doc.addVectorVertices( c_grd, c_pte )
+
+#=================================================
+# Creation de la grande grille cylindrique
+#=================================================
+
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex( 2*R, 0, h )
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )
+x4 = doc.findVertex( 2*R, 0, 0 )
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+
+#=================================================
+# Creation de la petite grille cylindrique
+#=================================================
+
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#=================================================
+# Assemblage des deux grilles cylindriques
+#=================================================
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )
+
+
+#===================================================================
+# Recuperation des vertex du model hexa bielle pour l association
+#===================================================================
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+# Face du haut grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )
+
+#----------- 
+#x_mod_h_g = doc.findVertex( -alpha_x , -alpha_y , h )
+#y_mod_h_g = doc.findVertex( -alpha_x , 0 , h )
+#z_mod_h_g = doc.findVertex( -alpha_x , alpha_y , h )
+
+#u_mod_h_g = doc.findVertex( alpha_x , -alpha_y , h )
+#v_mod_h_g = doc.findVertex( alpha_x , 0 , h )
+#w_mod_h_g = doc.findVertex( alpha_x , alpha_y , h )
+
+#x_mod_h_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , h )
+#y_mod_h_g_t = doc.findVertex( -alpha_x/2 , 0 , h )
+#z_mod_h_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , h )
+
+#u_mod_h_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , h )
+#v_mod_h_g_t = doc.findVertex( alpha_x/2 , 0 , h )
+#w_mod_h_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , h )
+#-----------
+
+assert x_mod_h_g
+assert y_mod_h_g
+assert z_mod_h_g
+
+assert u_mod_h_g
+assert v_mod_h_g
+assert w_mod_h_g
+
+assert x_mod_h_g_t
+assert y_mod_h_g_t #
+assert z_mod_h_g_t
+
+assert u_mod_h_g_t #
+assert v_mod_h_g_t
+assert w_mod_h_g_t #
+
+
+# Face du haut petit trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )
+
+
+#-----------
+#x_mod_h_p = doc.findVertex( l + alpha_x , -alpha_y , h )
+#y_mod_h_p = doc.findVertex( l + alpha_x , 0 , h )
+#z_mod_h_p = doc.findVertex( l + alpha_x , alpha_y , h )
+
+#u_mod_h_p = doc.findVertex( l - alpha_x , -alpha_y , h )
+#v_mod_h_p = doc.findVertex( l - alpha_x , 0 , h )
+#w_mod_h_p = doc.findVertex( l - alpha_x , alpha_y , h )
+
+#x_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , h )
+#y_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , 0 , h )
+#z_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , h )
+
+#u_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , h )
+#v_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , 0 , h )
+#w_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , h )
+#-----------
+
+#-----------
+assert x_mod_h_p
+assert y_mod_h_p
+assert z_mod_h_p
+
+assert u_mod_h_p
+assert v_mod_h_p
+assert w_mod_h_p
+
+assert x_mod_h_p_t
+assert y_mod_h_p_t
+assert z_mod_h_p_t
+
+assert u_mod_h_p_t
+assert v_mod_h_p_t
+assert w_mod_h_p_t
+#-----------
+
+# Face du bas grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )
+
+#-----------
+#x_mod_b_g = doc.findVertex( -alpha_x , -alpha_y , 0 )
+#y_mod_b_g = doc.findVertex( -alpha_x , 0 , 0 )
+#z_mod_b_g = doc.findVertex( -alpha_x , alpha_y , 0 )
+
+#u_mod_b_g = doc.findVertex( alpha_x , -alpha_y , 0 )
+#v_mod_b_g = doc.findVertex( alpha_x , 0 , 0 )
+#w_mod_b_g = doc.findVertex( alpha_x , alpha_y , 0 )
+
+#x_mod_b_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , 0 )
+#y_mod_b_g_t = doc.findVertex( -alpha_x/2 , 0 , 0 )
+#z_mod_b_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , 0 )
+
+#u_mod_b_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , 0 )
+#v_mod_b_g_t = doc.findVertex( alpha_x/2 , 0 , 0 )
+#w_mod_b_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , 0 )
+#-----------
+
+assert x_mod_b_g
+assert y_mod_b_g
+assert z_mod_b_g
+
+assert u_mod_b_g
+assert v_mod_b_g
+assert w_mod_b_g
+
+assert x_mod_b_g_t
+assert y_mod_b_g_t
+assert z_mod_b_g_t
+
+assert u_mod_b_g_t
+assert v_mod_b_g_t
+assert w_mod_b_g_t
+
+
+# Face du bas petit trou
+
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )
+
+
+#-----------
+#x_mod_b_p = doc.findVertex( l + alpha_x , -alpha_y , 0 )
+#y_mod_b_p = doc.findVertex( l + alpha_x , 0 , 0 )
+#z_mod_b_p = doc.findVertex( l + alpha_x , alpha_y , 0 )
+
+#u_mod_b_p = doc.findVertex( l - alpha_x , -alpha_y , 0 )
+#v_mod_b_p = doc.findVertex( l - alpha_x , 0 , 0 )
+#w_mod_b_p = doc.findVertex( l - alpha_x , alpha_y , 0 )
+
+#x_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , 0 )
+#y_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , 0 , 0 )
+#z_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , 0 )
+
+#u_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , 0 )
+#v_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , 0 , 0 )
+#w_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , 0 )
+#-----------
+
+#-----------
+assert x_mod_b_p
+assert y_mod_b_p
+assert z_mod_b_p
+
+assert u_mod_b_p
+assert v_mod_b_p
+assert w_mod_b_p
+
+assert x_mod_b_p_t
+assert y_mod_b_p_t
+assert z_mod_b_p_t
+
+assert u_mod_b_p_t
+assert v_mod_b_p_t
+assert w_mod_b_p_t
+#-----------
+
+
+
+#===================================================================
+# Recuperation des points de la geometrie bielle pour l association
+#===================================================================
+Bielle_geom = geompy.Import(STEP_PATH, "STEP")
+
+geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+Pt_A = geompy.MakeVertex(0, 0, h/2.)
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+
+
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+geompy.addToStudy( y_h_g , "y_h_g" )
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+geompy.addToStudy( y_b_g , "y_b_g" )
+
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+geompy.addToStudy( v_h_p , "v_h_p" )
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)
+geompy.addToStudy( v_b_p , "v_b_p" )
+
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)
+
+
+
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+geompy.addToStudy( x_h_g , "x_h_g" )
+x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)
+geompy.addToStudy( x_b_g , "x_b_g" )
+
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)
+geompy.addToStudy( z_h_g , "z_h_g" )
+z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)
+geompy.addToStudy( z_b_g , "z_b_g" )
+
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+geompy.addToStudy( w_h_p , "w_h_p" )
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)
+geompy.addToStudy( w_b_p , "w_b_p" )
+
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+geompy.addToStudy( u_h_p , "u_h_p" )
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)
+geompy.addToStudy( u_b_p , "u_b_p" )
+
+
+
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)
+
+
+
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+geompy.addToStudy(y_h_g_t, "y_h_g_t")
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)
+geompy.addToStudy(y_b_g_t, "y_b_g_t")
+
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+geompy.addToStudy(z_h_g_t, "z_h_g_t")
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)
+geompy.addToStudy(z_b_g_t, "z_b_g_t")
+
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+geompy.addToStudy(w_h_g_t, "w_h_g_t")
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)
+geompy.addToStudy(w_b_g_t, "w_b_g_t")
+
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+geompy.addToStudy(v_h_g_t, "v_h_g_t")
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)
+geompy.addToStudy(v_b_g_t, "v_b_g_t")
+
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+geompy.addToStudy(u_h_g_t, "u_h_g_t")
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)
+geompy.addToStudy(u_b_g_t, "u_b_g_t")
+
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+geompy.addToStudy(x_h_g_t, "x_h_g_t")
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)
+geompy.addToStudy(x_b_g_t, "x_b_g_t")
+
+
+
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)
+
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)
+geompy.addToStudy(y_h_p_t, "y_h_p_t")
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)
+geompy.addToStudy(y_b_p_t, "y_b_p_t")
+
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)
+geompy.addToStudy(z_h_p_t, "z_h_p_t")
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)
+geompy.addToStudy(z_b_p_t, "z_b_p_t")
+
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)
+geompy.addToStudy(w_h_p_t, "w_h_p_t")
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)
+geompy.addToStudy(w_b_p_t, "w_b_p_t")
+
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)
+geompy.addToStudy(v_h_p_t, "v_h_p_t")
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)
+geompy.addToStudy(v_b_p_t, "v_b_p_t")
+
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)
+geompy.addToStudy(u_h_p_t, "u_h_p_t")
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)
+geompy.addToStudy(u_b_p_t, "u_b_p_t")
+
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)
+geompy.addToStudy(x_h_p_t, "x_h_p_t")
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)
+geompy.addToStudy(x_b_p_t, "x_b_p_t")
+
+
+
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)
+
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+geompy.addToStudy(u_h_g, "u_h_g")
+
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)
+geompy.addToStudy(u_b_g, "u_b_g")
+
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+geompy.addToStudy(x_h_p, "x_h_p")
+x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)
+geompy.addToStudy(x_b_p, "x_b_p")
+
+
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)
+
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+geompy.addToStudy(w_h_g, "w_h_g")
+
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)
+geompy.addToStudy(w_b_g, "w_b_g")
+
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+geompy.addToStudy(z_h_p, "z_h_p")
+z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)
+geompy.addToStudy(z_b_p, "z_b_p")
+
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+geompy.addToStudy(v_h_g, "v_h_g")
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)
+geompy.addToStudy(v_b_g, "v_b_g")
+
+
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)
+geompy.addToStudy(y_h_p, "y_h_p")
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)
+geompy.addToStudy(y_b_p, "y_b_p")
+
+
+#=======================
+# CREATION ASSOCIATION
+#=======================
+
+#===========================================
+# association des sommets de la face du haut
+#===========================================
+
+# grand trou
+
+x_mod_h_g.setAssociation( x_h_g )
+y_mod_h_g.setAssociation( y_h_g )
+z_mod_h_g.setAssociation( z_h_g )
+u_mod_h_g.setAssociation( u_h_g )
+v_mod_h_g.setAssociation( v_h_g )
+w_mod_h_g.setAssociation( w_h_g )
+
+x_mod_h_g_t.setAssociation( x_h_g_t )
+y_mod_h_g_t.setAssociation( y_h_g_t )
+z_mod_h_g_t.setAssociation( z_h_g_t )
+u_mod_h_g_t.setAssociation( u_h_g_t )
+v_mod_h_g_t.setAssociation( v_h_g_t )
+w_mod_h_g_t.setAssociation( w_h_g_t )
+
+# petit trou
+
+x_mod_h_p.setAssociation( x_h_p )
+y_mod_h_p.setAssociation( y_h_p )
+z_mod_h_p.setAssociation( z_h_p )
+u_mod_h_p.setAssociation( u_h_p )
+v_mod_h_p.setAssociation( v_h_p )
+w_mod_h_p.setAssociation( w_h_p )
+
+x_mod_h_p_t.setAssociation( x_h_p_t )
+y_mod_h_p_t.setAssociation( y_h_p_t )
+z_mod_h_p_t.setAssociation( z_h_p_t )
+u_mod_h_p_t.setAssociation( u_h_p_t )
+v_mod_h_p_t.setAssociation( v_h_p_t )
+w_mod_h_p_t.setAssociation( w_h_p_t )
+
+
+#===========================================
+# association des sommets de la face du bas
+#===========================================
+
+# grand trou
+
+x_mod_b_g.setAssociation( x_b_g )
+y_mod_b_g.setAssociation( y_b_g )
+z_mod_b_g.setAssociation( z_b_g )
+u_mod_b_g.setAssociation( u_b_g )
+v_mod_b_g.setAssociation( v_b_g )
+w_mod_b_g.setAssociation( w_b_g )
+
+x_mod_b_g_t.setAssociation( x_b_g_t )
+y_mod_b_g_t.setAssociation( y_b_g_t )
+z_mod_b_g_t.setAssociation( z_b_g_t )
+u_mod_b_g_t.setAssociation( u_b_g_t )
+v_mod_b_g_t.setAssociation( v_b_g_t )
+w_mod_b_g_t.setAssociation( w_b_g_t )
+
+# petit trou
+
+x_mod_b_p.setAssociation( x_b_p )
+y_mod_b_p.setAssociation( y_b_p )
+z_mod_b_p.setAssociation( z_b_p )
+u_mod_b_p.setAssociation( u_b_p )
+v_mod_b_p.setAssociation( v_b_p )
+w_mod_b_p.setAssociation( w_b_p )
+
+x_mod_b_p_t.setAssociation( x_b_p_t )
+y_mod_b_p_t.setAssociation( y_b_p_t )
+z_mod_b_p_t.setAssociation( z_b_p_t )
+u_mod_b_p_t.setAssociation( u_b_p_t )
+v_mod_b_p_t.setAssociation( v_b_p_t )
+w_mod_b_p_t.setAssociation( w_b_p_t )
+
+
+
+
+#=================================
+# Creation association des edges
+#=================================
+
+
+All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])
+
+## recuperer les arrondies du haut de la geometrie
+
+Edge_Arr_grd_g_h = All_Edges_Bielle[20]
+geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )
+
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )
+
+
+Edge_Arr_grd_d_h = All_Edges_Bielle[22]
+geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )
+
+Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )
+
+
+Edge_Arr_pte_g_h = All_Edges_Bielle[8]
+geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )
+
+Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )
+
+Edge_Arr_pte_d_h = All_Edges_Bielle[10]
+geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )
+
+Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )
+
+# recuperer les arrondies du bas de la geometrie
+
+Edge_Arr_grd_g_b = All_Edges_Bielle[19]
+geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )
+
+Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )
+
+Edge_Arr_grd_d_b = All_Edges_Bielle[21]
+geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )
+
+Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )
+
+Edge_Arr_pte_g_b = All_Edges_Bielle[7]
+geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )
+
+Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )
+
+Edge_Arr_pte_d_b = All_Edges_Bielle[9]
+geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )
+
+Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )
+
+
+# recuperer les grand rayons de la geometrie
+
+Edge_Ray_grd_g_h = All_Edges_Bielle[28]
+geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )
+Edge_Ray_grd_d_h = All_Edges_Bielle[1]
+geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )
+
+Edge_Ray_grd_g_b = All_Edges_Bielle[27]
+geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )
+Edge_Ray_grd_d_b = All_Edges_Bielle[0]
+geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )
+
+
+
+X_pln1 = geompy.MakeVertex( 0 , 0 , 0 )
+Vec_X = geompy.MakeVectorDXDYDZ( 0 , 1 , 0 )
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+
+Parti_Grd_Ray = geompy.MakePartition([ Edge_Ray_grd_g_h , Edge_Ray_grd_d_h , Edge_Ray_grd_g_b , Edge_Ray_grd_d_b ], [ Plan1 ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+geompy.addToStudy( Parti_Grd_Ray , "Parti_Grd_Ray" )
+
+
+All_Edges_Parti_Grd_Ray = geompy.SubShapeAllSorted(Parti_Grd_Ray, geompy.ShapeType["EDGE"])
+
+
+Grd_Ray_0 = All_Edges_Parti_Grd_Ray[0]
+geompy.addToStudy( Grd_Ray_0 , "Grd_Ray_0" ) 
+
+##Edge_Arr_grd_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 0 )
+Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )
+Edge_Grd_Ray_0_mod.addAssociation( Grd_Ray_0, 0., 1. )
+
+
+Grd_Ray_1 = All_Edges_Parti_Grd_Ray[1]
+geompy.addToStudy( Grd_Ray_1 , "Grd_Ray_1" )
+
+##Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 1 )
+Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )
+Edge_Grd_Ray_1_mod.addAssociation( Grd_Ray_1, 0., 1. )
+
+Grd_Ray_2 = All_Edges_Parti_Grd_Ray[2]
+geompy.addToStudy( Grd_Ray_2 , "Grd_Ray_2" )
+
+##Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 0 )
+Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )
+Edge_Grd_Ray_2_mod.addAssociation( Grd_Ray_2, 0., 1. )
+
+Grd_Ray_3 = All_Edges_Parti_Grd_Ray[3]
+geompy.addToStudy( Grd_Ray_3 , "Grd_Ray_3" )
+
+##Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 1 )
+Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )
+Edge_Grd_Ray_3_mod.addAssociation( Grd_Ray_3, 0., 1. )
+
+Grd_Ray_4 = All_Edges_Parti_Grd_Ray[4]
+geompy.addToStudy( Grd_Ray_4 , "Grd_Ray_4" )
+
+Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )
+Edge_Grd_Ray_4_mod.addAssociation( Grd_Ray_4, 0., 1. )
+#Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b , 0., 1. )
+
+
+Grd_Ray_5 = All_Edges_Parti_Grd_Ray[5]
+geompy.addToStudy( Grd_Ray_5 , "Grd_Ray_5" )
+
+Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )
+Edge_Grd_Ray_5_mod.addAssociation( Grd_Ray_5, 0., 1. )
+
+Grd_Ray_6 = All_Edges_Parti_Grd_Ray[6]
+geompy.addToStudy( Grd_Ray_6 , "Grd_Ray_6" )
+
+Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )
+Edge_Grd_Ray_6_mod.addAssociation( Grd_Ray_6, 0., 1. )
+
+Grd_Ray_7 = All_Edges_Parti_Grd_Ray[7]
+geompy.addToStudy( Grd_Ray_7 , "Grd_Ray_7" )
+
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )
+Edge_Arr_grd_g_h_mod.addAssociation( Grd_Ray_7, 0., 1. )
+
+
+# recuperer les rayons des trous de la bielle de la geometrie
+
+Edge_Trou_grd_h = All_Edges_Bielle[26]
+geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )
+
+Edge_Trou_grd_b = All_Edges_Bielle[25]
+geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )
+
+Edge_Trou_pte_h = All_Edges_Bielle[3]
+geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )
+
+Edge_Trou_pte_b = All_Edges_Bielle[2]
+geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )
+
+Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )
+
+All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]
+geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )
+
+Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )
+
+Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]
+geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )
+
+Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )
+
+Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]
+geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )
+
+Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )
+
+Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]
+geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )
+
+Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )
+Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )
+
+Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]
+geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )
+
+Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )
+
+Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]
+geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )
+
+Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )
+
+
+
+Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+geompy.addToStudy( Partition_Trou_grd_bas , "Partition_Trou_grd_bas" )
+
+
+All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])
+
+Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]
+geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )
+
+Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )
+
+Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]
+geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )
+
+Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )
+
+Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]
+geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )
+
+Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )
+
+Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]
+geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )
+
+Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )
+Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )
+
+Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]
+geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )
+
+Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )
+
+Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]
+geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )
+
+Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )
+Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )
+
+
+
+
+
+Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )
+
+
+All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])
+
+Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]
+geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )
+
+Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )
+Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )
+
+Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]
+geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )
+
+Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )
+Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )
+
+Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]
+geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )
+
+Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )
+Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )
+
+Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]
+geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )
+
+Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )
+Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )
+
+Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]
+geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )
+
+Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )
+Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )
+
+Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]
+geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )
+
+Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )
+Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )
+
+
+
+
+Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+geompy.addToStudy( Partition_Trou_pte_bas , "Partition_Trou_pte_bas" )
+
+
+All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])
+
+Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]
+geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )
+
+Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )
+Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )
+
+Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]
+geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )
+
+Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )
+Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )
+
+Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]
+geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )
+
+Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )
+Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )
+
+Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]
+geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )
+
+Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )
+Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )
+
+Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]
+geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )
+
+Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )
+Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )
+
+Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]
+geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )
+
+Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )
+Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )
+
+#====================================
+# CREATION DES FACES DES ARRONDIES
+#====================================
+
+All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])
+
+Face_Arron_1 = All_Face_Arron_Bielle[2]
+geompy.addToStudy(Face_Arron_1, "Face_Arron_1")
+
+Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )
+
+Face_Arron_2 = All_Face_Arron_Bielle[3]
+geompy.addToStudy(Face_Arron_2, "Face_Arron_2")
+
+Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )
+
+Face_Arron_3 = All_Face_Arron_Bielle[8]
+geompy.addToStudy(Face_Arron_3, "Face_Arron_3")
+
+Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )
+
+Face_Arron_4 = All_Face_Arron_Bielle[9]
+geompy.addToStudy(Face_Arron_4, "Face_Arron_4")
+
+Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )
+
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+print Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+
+#n = doc.countLaw()
+#print n
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+mesh = hexablock.mesh(doc, "test_BIELLE_bad_assoc:hexas")
+#mesh = hexablock.mesh(doc, "test_BIELLE_bad_assoc:quads", 2)
+#mesh = hexablock.mesh(doc, "test_BIELLE_bad_assoc:edges", 1)
+#mesh = hexablock.mesh(doc, "test_BIELLE_bad_assoc:nodes", 0)
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
diff --git a/src/TEST_PY/test_BIELLE_no_assoc.py b/src/TEST_PY/test_BIELLE_no_assoc.py
new file mode 100755 (executable)
index 0000000..f699d4a
--- /dev/null
@@ -0,0 +1,1075 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import os
+import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+import SALOMEDS
+
+
+#STEP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/crank.stp")
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument("default")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 40.0
+
+r_grd = R
+r_grd_t = R/2
+
+r_pte = R
+r_pte_t = R/2
+
+l = 200.0
+#h = 0.019999999553*2
+h = 40.
+
+# Taille du grand cylindre
+dr_grd = R
+da_grd = 360
+dl_grd = h
+
+nr_grd = 1
+na_grd = 6
+nl_grd = 1
+
+# Taille du petit cylindre
+dr_pte = R
+da_pte = 360
+dl_pte = h
+
+nr_pte = 1
+na_pte = 6
+nl_pte = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(l, 0, 0)
+dy = doc.addVector(0, l, 0)
+dz = doc.addVector(0, 0, l)
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+c_grd = doc.addVertex(0, 0, 0)
+c_pte = doc.addVertex(2*l, 0, 0)
+dx_prime = doc.addVectorVertices( c_grd, c_pte )
+
+#=================================================
+# Creation de la grande grille cylindrique
+#=================================================
+
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+# 30 = pi/6
+# 60 = pi/3
+# 45 = pi/4
+# 90 = pi/2
+# 180 = pi
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+x1 = doc.findVertex( 2*R, 0, h )
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )
+x4 = doc.findVertex( 2*R, 0, 0 )
+
+quad_11 = doc.findQuad(x1, x2)
+quad_12 = doc.findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+
+#=================================================
+# Creation de la petite grille cylindrique
+#=================================================
+
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )
+
+# on obtient une liste qui contient 6 hexaedres eguaux
+
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )
+
+quad_21 = doc.findQuad(y1, y2)
+quad_22 = doc.findQuad(y1, y3)
+
+#=================================================
+# Assemblage des deux grilles cylindriques
+#=================================================
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )
+
+
+#===================================================================
+# Recuperation des vertex du model hexa bielle pour l association
+#===================================================================
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+alpha_x = 2*R*math.cos(math.pi/3)
+alpha_y = 2*R*math.sin(math.pi/3)
+
+# Face du haut grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )
+
+#----------- 
+#x_mod_h_g = doc.findVertex( -alpha_x , -alpha_y , h )
+#y_mod_h_g = doc.findVertex( -alpha_x , 0 , h )
+#z_mod_h_g = doc.findVertex( -alpha_x , alpha_y , h )
+
+#u_mod_h_g = doc.findVertex( alpha_x , -alpha_y , h )
+#v_mod_h_g = doc.findVertex( alpha_x , 0 , h )
+#w_mod_h_g = doc.findVertex( alpha_x , alpha_y , h )
+
+#x_mod_h_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , h )
+#y_mod_h_g_t = doc.findVertex( -alpha_x/2 , 0 , h )
+#z_mod_h_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , h )
+
+#u_mod_h_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , h )
+#v_mod_h_g_t = doc.findVertex( alpha_x/2 , 0 , h )
+#w_mod_h_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , h )
+#-----------
+
+assert x_mod_h_g
+assert y_mod_h_g
+assert z_mod_h_g
+
+assert u_mod_h_g
+assert v_mod_h_g
+assert w_mod_h_g
+
+assert x_mod_h_g_t
+assert y_mod_h_g_t #
+assert z_mod_h_g_t
+
+assert u_mod_h_g_t #
+assert v_mod_h_g_t
+assert w_mod_h_g_t #
+
+
+# Face du haut petit trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )
+
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )
+
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )
+
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )
+
+
+#-----------
+#x_mod_h_p = doc.findVertex( l + alpha_x , -alpha_y , h )
+#y_mod_h_p = doc.findVertex( l + alpha_x , 0 , h )
+#z_mod_h_p = doc.findVertex( l + alpha_x , alpha_y , h )
+
+#u_mod_h_p = doc.findVertex( l - alpha_x , -alpha_y , h )
+#v_mod_h_p = doc.findVertex( l - alpha_x , 0 , h )
+#w_mod_h_p = doc.findVertex( l - alpha_x , alpha_y , h )
+
+#x_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , h )
+#y_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , 0 , h )
+#z_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , h )
+
+#u_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , h )
+#v_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , 0 , h )
+#w_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , h )
+#-----------
+
+#-----------
+assert x_mod_h_p
+assert y_mod_h_p
+assert z_mod_h_p
+
+assert u_mod_h_p
+assert v_mod_h_p
+assert w_mod_h_p
+
+assert x_mod_h_p_t
+assert y_mod_h_p_t
+assert z_mod_h_p_t
+
+assert u_mod_h_p_t
+assert v_mod_h_p_t
+assert w_mod_h_p_t
+#-----------
+
+# Face du bas grand trou
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )
+
+#-----------
+#x_mod_b_g = doc.findVertex( -alpha_x , -alpha_y , 0 )
+#y_mod_b_g = doc.findVertex( -alpha_x , 0 , 0 )
+#z_mod_b_g = doc.findVertex( -alpha_x , alpha_y , 0 )
+
+#u_mod_b_g = doc.findVertex( alpha_x , -alpha_y , 0 )
+#v_mod_b_g = doc.findVertex( alpha_x , 0 , 0 )
+#w_mod_b_g = doc.findVertex( alpha_x , alpha_y , 0 )
+
+#x_mod_b_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , 0 )
+#y_mod_b_g_t = doc.findVertex( -alpha_x/2 , 0 , 0 )
+#z_mod_b_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , 0 )
+
+#u_mod_b_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , 0 )
+#v_mod_b_g_t = doc.findVertex( alpha_x/2 , 0 , 0 )
+#w_mod_b_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , 0 )
+#-----------
+
+assert x_mod_b_g
+assert y_mod_b_g
+assert z_mod_b_g
+
+assert u_mod_b_g
+assert v_mod_b_g
+assert w_mod_b_g
+
+assert x_mod_b_g_t
+assert y_mod_b_g_t
+assert z_mod_b_g_t
+
+assert u_mod_b_g_t
+assert v_mod_b_g_t
+assert w_mod_b_g_t
+
+
+# Face du bas petit trou
+
+
+## RQ:On remplace la fonction findVertex par getVertexIJK
+
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )
+
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )
+
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )
+
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )
+
+
+#-----------
+#x_mod_b_p = doc.findVertex( l + alpha_x , -alpha_y , 0 )
+#y_mod_b_p = doc.findVertex( l + alpha_x , 0 , 0 )
+#z_mod_b_p = doc.findVertex( l + alpha_x , alpha_y , 0 )
+
+#u_mod_b_p = doc.findVertex( l - alpha_x , -alpha_y , 0 )
+#v_mod_b_p = doc.findVertex( l - alpha_x , 0 , 0 )
+#w_mod_b_p = doc.findVertex( l - alpha_x , alpha_y , 0 )
+
+#x_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , 0 )
+#y_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , 0 , 0 )
+#z_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , 0 )
+
+#u_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , 0 )
+#v_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , 0 , 0 )
+#w_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , 0 )
+#-----------
+
+#-----------
+assert x_mod_b_p
+assert y_mod_b_p
+assert z_mod_b_p
+
+assert u_mod_b_p
+assert v_mod_b_p
+assert w_mod_b_p
+
+assert x_mod_b_p_t
+assert y_mod_b_p_t
+assert z_mod_b_p_t
+
+assert u_mod_b_p_t
+assert v_mod_b_p_t
+assert w_mod_b_p_t
+#-----------
+
+
+
+##===================================================================
+## Recuperation des points de la geometrie bielle pour l association
+##===================================================================
+#Bielle_geom = geompy.Import(STEP_PATH, "STEP")
+
+#geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+#Pt_A = geompy.MakeVertex(0, 0, h/2.)
+#Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+
+
+#Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+#Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+
+## NB:
+## h = haut
+## b = bas
+## g = grand
+## p = petit
+## t = trou
+
+
+#y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+#geompy.addToStudy( y_h_g , "y_h_g" )
+#y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+#geompy.addToStudy( y_b_g , "y_b_g" )
+
+#v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+#geompy.addToStudy( v_h_p , "v_h_p" )
+#v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)
+#geompy.addToStudy( v_b_p , "v_b_p" )
+
+#Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+#Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)
+
+
+
+#x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+#geompy.addToStudy( x_h_g , "x_h_g" )
+#x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)
+#geompy.addToStudy( x_b_g , "x_b_g" )
+
+#z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)
+#geompy.addToStudy( z_h_g , "z_h_g" )
+#z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)
+#geompy.addToStudy( z_b_g , "z_b_g" )
+
+#w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+#geompy.addToStudy( w_h_p , "w_h_p" )
+#w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)
+#geompy.addToStudy( w_b_p , "w_b_p" )
+
+#u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+#geompy.addToStudy( u_h_p , "u_h_p" )
+#u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)
+#geompy.addToStudy( u_b_p , "u_b_p" )
+
+
+
+#Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)
+
+
+
+#y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+#geompy.addToStudy(y_h_g_t, "y_h_g_t")
+#y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)
+#geompy.addToStudy(y_b_g_t, "y_b_g_t")
+
+#z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+#geompy.addToStudy(z_h_g_t, "z_h_g_t")
+#z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)
+#geompy.addToStudy(z_b_g_t, "z_b_g_t")
+
+#w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+#geompy.addToStudy(w_h_g_t, "w_h_g_t")
+#w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)
+#geompy.addToStudy(w_b_g_t, "w_b_g_t")
+
+#v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+#geompy.addToStudy(v_h_g_t, "v_h_g_t")
+#v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)
+#geompy.addToStudy(v_b_g_t, "v_b_g_t")
+
+#u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+#geompy.addToStudy(u_h_g_t, "u_h_g_t")
+#u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)
+#geompy.addToStudy(u_b_g_t, "u_b_g_t")
+
+#x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+#geompy.addToStudy(x_h_g_t, "x_h_g_t")
+#x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)
+#geompy.addToStudy(x_b_g_t, "x_b_g_t")
+
+
+
+#Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)
+
+#y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)
+#geompy.addToStudy(y_h_p_t, "y_h_p_t")
+#y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)
+#geompy.addToStudy(y_b_p_t, "y_b_p_t")
+
+#z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)
+#geompy.addToStudy(z_h_p_t, "z_h_p_t")
+#z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)
+#geompy.addToStudy(z_b_p_t, "z_b_p_t")
+
+#w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)
+#geompy.addToStudy(w_h_p_t, "w_h_p_t")
+#w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)
+#geompy.addToStudy(w_b_p_t, "w_b_p_t")
+
+#v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)
+#geompy.addToStudy(v_h_p_t, "v_h_p_t")
+#v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)
+#geompy.addToStudy(v_b_p_t, "v_b_p_t")
+
+#u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)
+#geompy.addToStudy(u_h_p_t, "u_h_p_t")
+#u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)
+#geompy.addToStudy(u_b_p_t, "u_b_p_t")
+
+#x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)
+#geompy.addToStudy(x_h_p_t, "x_h_p_t")
+#x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)
+#geompy.addToStudy(x_b_p_t, "x_b_p_t")
+
+
+
+#Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)
+
+#u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+#geompy.addToStudy(u_h_g, "u_h_g")
+
+#u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)
+#geompy.addToStudy(u_b_g, "u_b_g")
+
+#x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+#geompy.addToStudy(x_h_p, "x_h_p")
+#x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)
+#geompy.addToStudy(x_b_p, "x_b_p")
+
+
+#Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)
+
+#w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+#geompy.addToStudy(w_h_g, "w_h_g")
+
+#w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)
+#geompy.addToStudy(w_b_g, "w_b_g")
+
+#z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+#geompy.addToStudy(z_h_p, "z_h_p")
+#z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)
+#geompy.addToStudy(z_b_p, "z_b_p")
+
+#Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)
+
+#v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+#geompy.addToStudy(v_h_g, "v_h_g")
+#v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)
+#geompy.addToStudy(v_b_g, "v_b_g")
+
+
+#Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)
+
+#y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)
+#geompy.addToStudy(y_h_p, "y_h_p")
+#y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)
+#geompy.addToStudy(y_b_p, "y_b_p")
+
+
+##=======================
+## CREATION ASSOCIATION
+##=======================
+
+##===========================================
+## association des sommets de la face du haut
+##===========================================
+
+## grand trou
+
+#x_mod_h_g.setAssociation( x_h_g )
+#y_mod_h_g.setAssociation( y_h_g )
+#z_mod_h_g.setAssociation( z_h_g )
+#u_mod_h_g.setAssociation( u_h_g )
+#v_mod_h_g.setAssociation( v_h_g )
+#w_mod_h_g.setAssociation( w_h_g )
+
+#x_mod_h_g_t.setAssociation( x_h_g_t )
+#y_mod_h_g_t.setAssociation( y_h_g_t )
+#z_mod_h_g_t.setAssociation( z_h_g_t )
+#u_mod_h_g_t.setAssociation( u_h_g_t )
+#v_mod_h_g_t.setAssociation( v_h_g_t )
+#w_mod_h_g_t.setAssociation( w_h_g_t )
+
+## petit trou
+
+#x_mod_h_p.setAssociation( x_h_p )
+#y_mod_h_p.setAssociation( y_h_p )
+#z_mod_h_p.setAssociation( z_h_p )
+#u_mod_h_p.setAssociation( u_h_p )
+#v_mod_h_p.setAssociation( v_h_p )
+#w_mod_h_p.setAssociation( w_h_p )
+
+#x_mod_h_p_t.setAssociation( x_h_p_t )
+#y_mod_h_p_t.setAssociation( y_h_p_t )
+#z_mod_h_p_t.setAssociation( z_h_p_t )
+#u_mod_h_p_t.setAssociation( u_h_p_t )
+#v_mod_h_p_t.setAssociation( v_h_p_t )
+#w_mod_h_p_t.setAssociation( w_h_p_t )
+
+
+##===========================================
+## association des sommets de la face du bas
+##===========================================
+
+## grand trou
+
+#x_mod_b_g.setAssociation( x_b_g )
+#y_mod_b_g.setAssociation( y_b_g )
+#z_mod_b_g.setAssociation( z_b_g )
+#u_mod_b_g.setAssociation( u_b_g )
+#v_mod_b_g.setAssociation( v_b_g )
+#w_mod_b_g.setAssociation( w_b_g )
+
+#x_mod_b_g_t.setAssociation( x_b_g_t )
+#y_mod_b_g_t.setAssociation( y_b_g_t )
+#z_mod_b_g_t.setAssociation( z_b_g_t )
+#u_mod_b_g_t.setAssociation( u_b_g_t )
+#v_mod_b_g_t.setAssociation( v_b_g_t )
+#w_mod_b_g_t.setAssociation( w_b_g_t )
+
+## petit trou
+
+#x_mod_b_p.setAssociation( x_b_p )
+#y_mod_b_p.setAssociation( y_b_p )
+#z_mod_b_p.setAssociation( z_b_p )
+#u_mod_b_p.setAssociation( u_b_p )
+#v_mod_b_p.setAssociation( v_b_p )
+#w_mod_b_p.setAssociation( w_b_p )
+
+#x_mod_b_p_t.setAssociation( x_b_p_t )
+#y_mod_b_p_t.setAssociation( y_b_p_t )
+#z_mod_b_p_t.setAssociation( z_b_p_t )
+#u_mod_b_p_t.setAssociation( u_b_p_t )
+#v_mod_b_p_t.setAssociation( v_b_p_t )
+#w_mod_b_p_t.setAssociation( w_b_p_t )
+
+
+
+
+##=================================
+## Creation association des edges
+##=================================
+
+
+#All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])
+
+### recuperer les arrondies du haut de la geometrie
+
+#Edge_Arr_grd_g_h = All_Edges_Bielle[20]
+#geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )
+
+#Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )
+#Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )
+
+
+#Edge_Arr_grd_d_h = All_Edges_Bielle[22]
+#geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )
+
+#Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )
+#Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )
+
+
+#Edge_Arr_pte_g_h = All_Edges_Bielle[8]
+#geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )
+
+#Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )
+#Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )
+
+#Edge_Arr_pte_d_h = All_Edges_Bielle[10]
+#geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )
+
+#Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )
+#Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )
+
+## recuperer les arrondies du bas de la geometrie
+
+#Edge_Arr_grd_g_b = All_Edges_Bielle[19]
+#geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )
+
+#Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )
+#Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )
+
+#Edge_Arr_grd_d_b = All_Edges_Bielle[21]
+#geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )
+
+#Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )
+#Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )
+
+#Edge_Arr_pte_g_b = All_Edges_Bielle[7]
+#geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )
+
+#Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )
+#Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )
+
+#Edge_Arr_pte_d_b = All_Edges_Bielle[9]
+#geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )
+
+#Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )
+#Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )
+
+
+## recuperer les grand rayons de la geometrie
+
+#Edge_Ray_grd_g_h = All_Edges_Bielle[28]
+#geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )
+#Edge_Ray_grd_d_h = All_Edges_Bielle[1]
+#geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )
+
+#Edge_Ray_grd_g_b = All_Edges_Bielle[27]
+#geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )
+#Edge_Ray_grd_d_b = All_Edges_Bielle[0]
+#geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )
+
+
+
+#X_pln1 = geompy.MakeVertex( 0 , 0 , 0 )
+#Vec_X = geompy.MakeVectorDXDYDZ( 0 , 1 , 0 )
+#Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+
+#Parti_Grd_Ray = geompy.MakePartition([ Edge_Ray_grd_g_h , Edge_Ray_grd_d_h , Edge_Ray_grd_g_b , Edge_Ray_grd_d_b ], [ Plan1 ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+#geompy.addToStudy( Parti_Grd_Ray , "Parti_Grd_Ray" )
+
+
+#All_Edges_Parti_Grd_Ray = geompy.SubShapeAllSorted(Parti_Grd_Ray, geompy.ShapeType["EDGE"])
+
+
+#Grd_Ray_0 = All_Edges_Parti_Grd_Ray[0]
+#geompy.addToStudy( Grd_Ray_0 , "Grd_Ray_0" ) 
+
+###Edge_Arr_grd_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 0 )
+#Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )
+#Edge_Grd_Ray_0_mod.addAssociation( Grd_Ray_0, 0., 1. )
+
+
+#Grd_Ray_1 = All_Edges_Parti_Grd_Ray[1]
+#geompy.addToStudy( Grd_Ray_1 , "Grd_Ray_1" )
+
+###Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 1 )
+#Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )
+#Edge_Grd_Ray_1_mod.addAssociation( Grd_Ray_1, 0., 1. )
+
+#Grd_Ray_2 = All_Edges_Parti_Grd_Ray[2]
+#geompy.addToStudy( Grd_Ray_2 , "Grd_Ray_2" )
+
+###Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 0 )
+#Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )
+#Edge_Grd_Ray_2_mod.addAssociation( Grd_Ray_2, 0., 1. )
+
+#Grd_Ray_3 = All_Edges_Parti_Grd_Ray[3]
+#geompy.addToStudy( Grd_Ray_3 , "Grd_Ray_3" )
+
+###Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 1 )
+#Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )
+#Edge_Grd_Ray_3_mod.addAssociation( Grd_Ray_3, 0., 1. )
+
+#Grd_Ray_4 = All_Edges_Parti_Grd_Ray[4]
+#geompy.addToStudy( Grd_Ray_4 , "Grd_Ray_4" )
+
+#Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )
+#Edge_Grd_Ray_4_mod.addAssociation( Grd_Ray_4, 0., 1. )
+##Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b , 0., 1. )
+
+
+#Grd_Ray_5 = All_Edges_Parti_Grd_Ray[5]
+#geompy.addToStudy( Grd_Ray_5 , "Grd_Ray_5" )
+
+#Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )
+#Edge_Grd_Ray_5_mod.addAssociation( Grd_Ray_5, 0., 1. )
+
+#Grd_Ray_6 = All_Edges_Parti_Grd_Ray[6]
+#geompy.addToStudy( Grd_Ray_6 , "Grd_Ray_6" )
+
+#Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )
+#Edge_Grd_Ray_6_mod.addAssociation( Grd_Ray_6, 0., 1. )
+
+#Grd_Ray_7 = All_Edges_Parti_Grd_Ray[7]
+#geompy.addToStudy( Grd_Ray_7 , "Grd_Ray_7" )
+
+#Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )
+#Edge_Arr_grd_g_h_mod.addAssociation( Grd_Ray_7, 0., 1. )
+
+
+## recuperer les rayons des trous de la bielle de la geometrie
+
+#Edge_Trou_grd_h = All_Edges_Bielle[26]
+#geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )
+
+#Edge_Trou_grd_b = All_Edges_Bielle[25]
+#geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )
+
+#Edge_Trou_pte_h = All_Edges_Bielle[3]
+#geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )
+
+#Edge_Trou_pte_b = All_Edges_Bielle[2]
+#geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )
+
+#Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+#geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )
+
+#All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])
+
+#Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]
+#geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )
+
+#Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )
+#Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )
+
+#Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]
+#geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )
+
+#Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )
+#Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )
+
+#Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]
+#geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )
+
+#Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )
+#Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )
+
+#Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]
+#geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )
+
+#Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )
+#Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )
+
+#Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]
+#geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )
+
+#Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )
+#Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )
+
+#Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]
+#geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )
+
+#Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )
+#Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )
+
+
+
+#Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+#geompy.addToStudy( Partition_Trou_grd_bas , "Partition_Trou_grd_bas" )
+
+
+#All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])
+
+#Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]
+#geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )
+
+#Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )
+#Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )
+
+#Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]
+#geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )
+
+#Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )
+#Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )
+
+#Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]
+#geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )
+
+#Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )
+#Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )
+
+#Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]
+#geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )
+
+#Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )
+#Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )
+
+#Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]
+#geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )
+
+#Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )
+#Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )
+
+#Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]
+#geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )
+
+#Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )
+#Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )
+
+
+
+
+
+#Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+#geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )
+
+
+#All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])
+
+#Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]
+#geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )
+
+#Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )
+#Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )
+
+#Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]
+#geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )
+
+#Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )
+#Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )
+
+#Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]
+#geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )
+
+#Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )
+#Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )
+
+#Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]
+#geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )
+
+#Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )
+#Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )
+
+#Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]
+#geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )
+
+#Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )
+#Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )
+
+#Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]
+#geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )
+
+#Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )
+#Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )
+
+
+
+
+#Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+#geompy.addToStudy( Partition_Trou_pte_bas , "Partition_Trou_pte_bas" )
+
+
+#All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])
+
+#Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]
+#geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )
+
+#Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )
+#Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )
+
+#Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]
+#geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )
+
+#Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )
+#Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )
+
+#Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]
+#geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )
+
+#Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )
+#Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )
+
+#Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]
+#geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )
+
+#Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )
+#Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )
+
+#Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]
+#geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )
+
+#Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )
+#Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )
+
+#Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]
+#geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )
+
+#Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )
+#Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )
+
+##====================================
+## CREATION DES FACES DES ARRONDIES
+##====================================
+
+#All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])
+
+#Face_Arron_1 = All_Face_Arron_Bielle[2]
+#geompy.addToStudy(Face_Arron_1, "Face_Arron_1")
+
+#Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )
+
+#Face_Arron_2 = All_Face_Arron_Bielle[3]
+#geompy.addToStudy(Face_Arron_2, "Face_Arron_2")
+
+#Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )
+
+#Face_Arron_3 = All_Face_Arron_Bielle[8]
+#geompy.addToStudy(Face_Arron_3, "Face_Arron_3")
+
+#Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )
+
+#Face_Arron_4 = All_Face_Arron_Bielle[9]
+#geompy.addToStudy(Face_Arron_4, "Face_Arron_4")
+
+#Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )
+
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#=================================================
+# Definir les groupes d elements pour le maillage
+#=================================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+#print Nbr_Vx
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+    
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+
+#n = doc.countLaw()
+#print n
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+mesh = hexablock.mesh(doc, "test_BIELLE_no_assoc")
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
diff --git a/src/TEST_PY/test_HEXABLOCK.py b/src/TEST_PY/test_HEXABLOCK.py
new file mode 100755 (executable)
index 0000000..e53d07d
--- /dev/null
@@ -0,0 +1,418 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import hexablock
+
+
+# ======================================================== test_sphere
+def test_sphere ():
+  doc = hexablock.addDocument ("default")
+  orig = doc.addVertex (0,0,0)
+
+  ncouches = 1
+  k = 0.8
+  decal  = doc.addVector (1,1,1)
+  sphere = doc.makeSpherical (orig, decal, ncouches, k)
+
+  for nc in range(ncouches):
+    cell = sphere.getStrate (nc, Q_A)
+    cell.remove ()
+
+  sphere.saveVtk ("sphere.vtk")
+  print "test_sphere OK"
+
+# ======================================================== test_cartesi1
+def test_cartesi1 ():
+  size_x = 15
+  size_y = 12
+  size_z = 8
+
+  doc = hexablock.addDocument ()
+  orig = doc.addVertex (0,0,0)
+
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 ) #CS_NOT_SPEC (makeCartesian1)
+
+   #for (int nz=0 nz<size_z  nz++)
+       #for (int ny=nz+1 ny<size_y-nz-1  ny++)
+           #for (int nx=nz+1 nx<size_x-nz-1  nx++)
+               
+               ##  grid.getHexa (nx, ny, nz).remove ()
+               #Hexa* cell = grid.getHexa (nx, ny, nz)
+               #cell.remove ()
+
+  grid.saveVtk ("hexa1.vtk")
+  print "test_cartesi1 OK"
+  # doc.dump ()
+
+## ======================================================== afficher
+##define Afficher(elt) afficher (#elt, elt)
+#def afficher (cpchar nom, EltBase* elt):
+
+   #if (elt==NULL)
+      
+      #printf (" .... %s = 0x0\n", nom)
+      #return HOK
+      
+
+   #printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt.getId())
+   #return HOK
+
+# ======================================================== test_find
+def test_find ():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument ()
+
+   orig = doc.addVertex (0,0,0)
+   dirVr  = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+   grid.saveVtk ("mini1.vtk")
+   #doc.dump()
+
+   v00 = doc.findVertex (0, 0, 0)
+   v02 = doc.findVertex (1, 1, 0)
+   v06 = doc.findVertex (1, 1, 1)
+   v08 = doc.findVertex (2, 1, 0)
+   v10 = doc.findVertex (2, 1, 1)
+   v22 = doc.findVertex (2, 1, 2)
+   v26 = doc.findVertex (2, 2, 2)
+
+   assert v00
+   assert v02
+   assert v06
+   assert v08
+   assert v10
+   assert v22
+   assert v26
+
+   assert doc.findEdge (v06, v10)
+   assert doc.findEdge (v10, v06)
+
+
+   assert doc.findQuad (v02, v10)
+   assert doc.findQuad (v06, v08)
+   assert not doc.findQuad (v02, v06)
+
+
+   assert doc.findHexa (v00, v06)
+   assert doc.findHexa (v06, v26)
+   assert doc.findHexa (v26, v06)
+   print "test_find OK"
+
+# ======================================================== test_joint
+def test_joint ():
+  dimx = 11
+  dimy = 11
+  dimz = 2
+  doc = hexablock.addDocument ()
+
+  orig1 = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  grid1 = doc.makeCartesian1(orig1, dirVr, dimx,dimy,dimz , 0, 0, 0 )
+
+  orig2 = doc.addVertex  (dimx/2.0,0,8)
+  vectj = doc.addVector (0,1,0)
+  vecti = doc.addVector (1,0,0)
+  grid2 = doc.makeCylindrical (orig2, vecti, vectj, 1, 180, 1,dimz,dimy,dimx, False)
+  
+  mx = dimx/2
+  my = dimy/2
+  prems = grid1.getQuad1 (hexablock.DIR_Z, mx, my, dimz)
+  cible = grid2.getQuad1 (hexablock.DIR_X, dimz, mx, my)
+
+  v1 = prems.getVertex (0)
+  v2 = cible.getVertex (0)
+  v3 = prems.getVertex (1)
+  v4 = cible.getVertex (3)
+
+  liste  = []
+  miroir = []
+
+  liste += [prems]
+  for nx in range (dimx):
+    if ( nx != mx ):
+      liste += [grid1.getQuad1 (hexablock.DIR_Z, nx, my, dimz)]
+
+  for ny in range (dimy):
+    if ( ny != my ):
+      liste += [grid1.getQuad1 (hexablock.DIR_Z, mx, ny, dimz)]
+
+   # Elements* joint = 
+   #
+  doc.joinQuads(liste, cible, v1, v2, v3, v4, 5)
+  doc.saveVtk ("joint.vtk")
+  print "test_joint OK"
+
+# ======================================================== test_hexa1
+def test_hexa1 ():
+   size_x = 1
+   size_y = 1
+   size_z = 1
+
+   doc = hexablock.addDocument ()
+   orig  = doc.addVertex (0,0,0)
+   dirVr = doc.addVector (1,1,1)
+   #  Elements*  grid = 
+   doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.dump ()
+   print "test_hexa1 OK"
+
+# ======================================================== test_decoupage
+def test_decoupage ():
+  size_x = 2
+  size_y = 1
+  size_z = 1
+
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+  #arete = grid.getEdge ( HEXA_ORB.hexablock.DIR_Z, 0, 0, 0)
+  arete = grid.getEdge1( hexablock.DIR_Z, 0, 0, 0 )
+
+  #doc.dump()
+  doc.saveVtk ("no_decoupe.vtk")
+  doc.cut (arete, 1)
+
+  #doc .dump ()
+  doc .saveVtk ("decoupe.vtk")
+  # doc .saveFile ()
+  print "test_decoupage OK"
+
+# ======================================================== test_gen_xml
+def test_gen_xml ():
+
+  size_x = 2
+  size_y = 2
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  cell    = grid.getHexa (0)
+  face    = cell.getQuad (0)
+  arete   = cell.getEdge (0)
+  noeud   = cell.getVertex (0)
+
+  #CS_TODO?
+  #shape1 = Shape()
+  #shape2 = Shape()
+  #shape3 = Shape()
+
+  #noeud.setAssociation (shape1)
+  #arete.setAssociation (shape2)
+  #face .setAssociation (shape3)
+
+  law1 = doc.addLaw("loi1", 1)
+  law2 = doc.addLaw("loi2", 2)
+  law3 = doc.addLaw("loi3", 3)
+
+  law1.setKind (hexablock.UNIFORM)
+  law2.setKind (hexablock.ARITHMETIC)
+  law3.setKind (hexablock.GEOMETRIC)
+
+  prop1 = doc.getPropagation (0)
+  prop2 = doc.getPropagation (1)
+  prop3 = doc.getPropagation (2)
+
+  prop1.setLaw (law1)
+  prop2.setLaw (law2)
+  prop3.setLaw (law3)
+
+  prop1.setWay (True)
+  prop2.setWay (False)
+  prop3.setWay (True)
+
+  doc .saveVtk ("mini.vtk")
+  doc .setFile ("Essai")
+  doc .saveFile ()
+  print "test_gen_xml OK"
+
+
+
+# ======================================================== test_relecture
+def test_relecture ():
+  doc = hexablock.loadDocument ("Essai")
+
+  #doc .dump ()
+  doc .saveVtk ("restore.vtk")
+  print "test_relecture OK"
+
+# ======================================================== test_clone
+def test_clone ():
+  size_x = 2
+  size_y = 2
+  size_z = 2
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  bond  = doc.addVector (0, 0, 7)
+  #  Elements* grid2 = doc.makeTranslation (grid, bond)
+  doc.makeTranslation (grid, bond)
+
+  doc.saveVtk ("clonage.vtk")
+  #doc.dump()
+  print "test_clone OK"
+
+# ======================================================== test_separ
+def test_separ ():
+  size_x = 2
+  size_y = 2
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  doc .saveVtk ("separ.vtk")
+  #doc .dump()
+  print "test_separ OK"
+
+
+# ======================================================== test_cyl
+def test_cyl ():
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  haut = doc.addVector (0,0,1)
+  base = doc.addVector (1,0,0)
+
+  dr = 1
+  # double da = 360 # degres
+  dl = 1
+  nr = 2
+  na = 9
+  nl = 5
+
+  cyl1 = doc.makeCylindrical(orig,base,haut,dr, 360,dl,nr,na,nl)
+  cyl1.saveVtk ("cylindre_full.vtk")
+
+  cyl2 = doc.makeCylindrical(orig,haut,base,dr, 270,dl,nr,na,nl)
+  cyl2.saveVtk ("cylindre_34.vtk")
+
+  # doc.dump ()
+  print "test_cyl OK"
+
+# ======================================================== test_propagation
+def test_propagation ():
+  size_x = 2
+  size_y = 1
+  size_z = 1
+
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  nb = doc.countPropagation ()
+
+  for nro in range(nb):
+    prop  = doc .getPropagation (nro)
+    edges = prop.getEdges ()
+    print " ____________________________________ Prop nro %s\n"%nro
+    for e in edges:
+      way = e.getWay ()
+      if (way):
+        print "     (%s,%s)\n"%( e.getVertex(0).name, e.getVertex(1).name )
+      else:
+        print "     (%s,%s)\n"%( e.getVertex(1).name, e.getVertex(0).name )
+
+  #doc.dump  ()
+  doc.saveVtk ("test_propagation.vtk")
+  doc.setFile ("test_propagation")
+  doc.saveFile ()
+  print "test_propagation OK"
+
+
+# ======================================================== test_move
+def test_move ():
+  size_x = 1
+  size_y = 1
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  enhaut = doc.addVector (0, 0, 5)
+  devant = doc.addVector (5, 0, 0)
+  agauche = doc.addVector (0, 5, 0)
+
+  #CS_TODO?
+  #matrice = Matrix() 
+  #matrice.defTranslation (enhaut)
+
+  cube    = grid.getHexa (1)
+  dessous = cube.getQuad (0)#(Q_A) #CS_TODO?
+  #dessous.dump()
+
+  grid2 = doc.makeTranslation (grid, devant)
+  doc.makeTranslation (grid, agauche)
+  cube2 = grid2.getHexa (1)
+
+  cube .disconnectQuad (dessous)
+  
+  #CS_TODO?
+  #cube .transform( matrice )
+  #cube2.transform( matrice )
+
+
+  doc .saveVtk ("move.vtk")
+  #doc .dump()
+  print "test_move OK, CS_TODO?"
+
+
+
+
+#test_sphere () KO
+test_cartesi1 ()
+test_find ()
+test_joint ()
+test_hexa1 ()
+test_decoupage ()
+test_gen_xml ()
+#test_relecture () KO
+#test_clone ()
+#test_separ ()
+#test_cyl ()
+#test_propagation ()
+#test_move ()
+
diff --git a/src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py b/src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py
new file mode 100755 (executable)
index 0000000..160270a
--- /dev/null
@@ -0,0 +1,433 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import SALOME
+import geompy
+import smesh
+import hexablock
+import math
+
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument ("default")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour l'intersection des trois cylindres on doit s enservir des modeles predefinis des cylindres deja decoupes
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 5.0
+
+r_pte = R
+
+r_moy = 2*R
+
+r_grd = 4*R
+
+l = 200
+h = 100
+
+# Taille du 1er petit cylindre
+dr_pte_1 = 20
+da_pte_1 = 360
+dl_pte_1 = 200
+
+nr_pte_1 = 1
+na_pte_1 = 4 #remplissage a l interieur de 1 hexa
+nl_pte_1 = 1
+
+# Taille du 1er grand cylindre
+dr_grd_1 = 50
+da_grd_1 = 360
+dl_grd_1 = 150
+
+nr_grd_1 = 1
+na_grd_1 = 12 #remplissage a l interieur de 8 hexas
+nl_grd_1 = 1
+
+# Taille du 2eme petit cylindre
+dr_pte_2 = 50
+da_pte_2 = 360
+dl_pte_2 = 200
+
+nr_pte_2 = 1
+na_pte_2 = 12 #remplissage a l interieur de 8 hexas
+nl_pte_2 = 1
+
+# Taille du 2eme grand cylindre
+dr_grd_2 = 100
+da_grd_2 = 360
+dl_grd_2 = 400
+
+nr_grd_2 = 1
+na_grd_2 = 18 #remplissage a l interieur de 8 hexas
+nl_grd_2 = 1
+
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+DX = doc.addVector( 1 , 0 , 0 )
+DY = doc.addVector( 0 , 1 , 0 )
+DZ = doc.addVector( 0 , 0 , 1 )
+
+
+#===================================
+# Creation des centres de cylindres
+#===================================
+
+C_pte_1 = doc.addVertex( -h , 0 , h )
+C_grd_1 = doc.addVertex( 0 , 0 , 0 )
+
+C_pte_2 = doc.addVertex( 0 , 0 , 3*h )
+C_grd_2 = doc.addVertex( -2*h , 0 , 4*h )
+
+#C_pte_1 = doc.addVertex( 190 , 0 , 220 )
+#C_grd_1 = doc.addVertex( 300 , 0 , 400 )
+
+#C_pte_2 = doc.addVertex( 200 , 0 , 400 )
+#C_grd_2 = doc.addVertex( 0 , 0 , 0 )
+
+
+#================================
+# Creation du 1er petit cylindre
+#================================
+
+Cyl_pte_1 = doc.addCylinder( C_pte_1 , DX , dr_pte_1 , dl_pte_1 )
+#Cyl_pte_1 = doc.addCylinder( C_pte_1 , DX , 5 , 100 )
+#Cyl_pte_1.saveVtk("/tmp/Cyl_pte_1.vtk")
+
+#================================
+# Creation du 1er grand cylindre
+#================================
+
+Cyl_grd_1 = doc.addCylinder( C_grd_1 , DZ , dr_grd_1 , dl_grd_1 )
+#Cyl_grd_1 = doc.addCylinder( C_grd_1 , DZ , 10 , 200 )
+#Cyl_grd_1.saveVtk("/tmp/Cyl_grd_1.vtk")
+
+#================================
+# Creation du 2eme petit cylindre
+#================================
+
+Cyl_pte_2 = doc.addCylinder( C_pte_2 , DZ , dr_pte_2 , dl_pte_2 )
+#Cyl_pte_2 = doc.addCylinder( C_pte_2 , DZ , 10 , 200 )
+#Cyl_pte_2.saveVtk("/tmp/Cyl_pte_2.vtk")
+
+#================================
+# Creation du 2eme grand cylindre
+#================================
+
+Cyl_grd_2 = doc.addCylinder( C_grd_2 , DX , dr_grd_2 , dl_grd_2 )
+#Cyl_grd_2 = doc.addCylinder( C_grd_2 , DX , 20 , 200 )
+#Cyl_grd_2.saveVtk("/tmp/Cyl_grd_2.vtk")
+
+
+
+#=================================
+# Intersection cylindres decoupes
+#=================================
+
+
+Cyl_Decou_Cyl_pte_grd_1 = doc.makeCylinders( Cyl_pte_1 , Cyl_grd_1 )
+
+Cyl_Decou_Cyl_pte_grd_2 = doc.makeCylinders( Cyl_pte_2 , Cyl_grd_2 )
+
+
+
+#====================================================================
+# Recuperation des quads qui servent a fusionner les deux partitions
+#====================================================================
+
+
+
+# reperer les quads du 1er decoupe des cylindres
+# on a besoin des quads IJ dans le plan XY
+
+#ni = 2
+#nj = 4
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 4
+#0 <= k < nk + 1 = 5
+
+#quad_decoup1_x0_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 0 , 0 , 4 )
+
+#vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 0 , 0 , 4 )
+#vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 1 , 2 , 4 )
+
+
+#ni = 2
+#nj = 8
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 8
+#0 <= k < nk + 1 = 5
+
+#quad_decoup1_x1_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 1 , 0 , 4 )
+
+#vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 0 , 4 )
+#vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 1 , 4 )
+
+
+
+
+# reperer les quads du 2eme decoupe des cylindres
+# on a besoin des quads IJ dans le plan XY
+
+#ni = 2
+#nj = 4
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 4
+#0 <= k < nk + 1 = 5
+
+quad_decoup2_x0_y0_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 0 , 0 )
+quad_decoup2_x0_y1_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 1 , 0 )
+quad_decoup2_x0_y2_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 2 , 0 )
+quad_decoup2_x0_y3_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 3 , 0 )
+
+#list_quad_decoup2_x0 = [ quad_decoup2_x0_y0_z0 , quad_decoup2_x0_y1_z0 , quad_decoup2_x0_y2_z0 , quad_decoup2_x0_y3_z0 ]
+
+#vx_1_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 0 , 0 , 0 )
+#vx_2_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 1 , 2 , 0 )
+
+
+
+#ni = 2
+#nj = 8
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 8
+#0 <= k < nk + 1 = 5
+
+#for j in [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ]:
+    #for i in [ 0 , 1 ]:
+       #quad_list = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , i , j , 0 )
+
+quad_decoup2_x1_y0_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 0 , 0 )
+quad_decoup2_x1_y1_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 1 , 0 )
+quad_decoup2_x1_y2_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 2 , 0 )
+quad_decoup2_x1_y3_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 3 , 0 )
+quad_decoup2_x1_y4_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 4 , 0 )
+quad_decoup2_x1_y5_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 5 , 0 )
+quad_decoup2_x1_y6_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 6 , 0 )
+quad_decoup2_x1_y7_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 7 , 0 )
+
+list_quad_decoup2_x1 = [ quad_decoup2_x1_y2_z0 , quad_decoup2_x0_y0_z0 , quad_decoup2_x0_y1_z0 , quad_decoup2_x0_y2_z0 , quad_decoup2_x0_y3_z0 , quad_decoup2_x1_y0_z0 , quad_decoup2_x1_y1_z0 , quad_decoup2_x1_y2_z0 , quad_decoup2_x1_y3_z0 , quad_decoup2_x1_y4_z0 , quad_decoup2_x1_y5_z0 , quad_decoup2_x1_y6_z0 , quad_decoup2_x1_y7_z0 ]
+
+quad_decoup1_x1_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 1 , 0 , 4 )
+
+vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 0 , 4 )
+vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 1 , 4 )
+
+vx_1_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 2 , 2 , 0 )
+vx_2_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 2 , 3 , 0 )
+
+
+jointure = doc.joinQuads( list_quad_decoup2_x1 , quad_decoup1_x1_y0_z4 , vx_1_prim , vx_1 , vx_2_prim , vx_2 , 3 )
+
+
+
+
+#jointure.saveVtk("/tmp/jointure.vtk")
+#doc.saveVtk("/tmp/inter.vtk")
+
+
+##==========================
+## CREATION ASSOCIATION
+##==========================
+
+
+##========================================
+## INTERSECTION DES TROIS CYLINDRES GEOM
+##========================================
+
+#Inter_Cylin_geom = geompy.Import("/export/home/PR_HEX/SCRIPTS/cao_cea/tees.brep", "BREP")
+
+#geompy.addToStudy(Inter_Cylin_geom, "Inter_Cylin_geom")
+#36
+
+## Remarque:
+### 1- On a utiliser les memes parametres de la geometrie des trois cylindres dans l'espace
+###    pour construire notre modele hexa ( intersection des trois cylindres )
+### 2- On conclu qu'on a pas besoin d'une association pts par pts comme les 3 cas tests precedemment
+###    realises
+### 3- l'association sa se fait automatiquement
+### 4- donc on passe directement a la creation du maillage
+
+
+
+
+
+
+
+
+
+##====================================
+## CREATION GROUPES DU MAILLAGE
+##====================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+#print Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+
+
+
+##====================================
+## CREATION MAILLAGE
+##====================================
+
+
+##====================================
+## Definir une loi de discretisation
+##====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+Law = doc.addLaw( "Uniform" , 4 )
+
+#petit test
+n = doc.countLaw()
+print n
+
+# chercher les propagations du modele
+
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+       Propa = doc.getPropagation(j)
+       Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+try:
+    mesh = hexablock.mesh(doc, "test_INTER_3_CYLINDRE_no_assoc")
+except SALOME.SALOME_Exception, ex:
+    print "Mesh computation failed, exception caught:"
+    print "    ", ex.details.text
+except:
+    import traceback
+    print "Mesh computation failed, exception caught:"
+    traceback.print_exc()
+
+
+print "Nombre d'hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+
+#nQuad = doc.countQuad();
+#print "countQuad = ",nQuad
+
+###qds = [2,6,10,14]
+##qds = [2,6,10,14]
+##for j in qds:
+#for j in range(nQuad):
+  #q = doc.getQuad(j)
+  ##ok = smesh.computeQuad(q, False)
+  #ok = smesh.computeQuad(q, True)
+  #print "quad j->",j
+  #print "ok ->",ok
+
+
+## --------------------
+## Maillage hexa�drique
+## --------------------
+#mesh = mesh.ExportMED( "3cyl.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "3cyl.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  4*" -- ijk --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/TEST_PY/test_TUYAU_COURBE_no_assoc.py b/src/TEST_PY/test_TUYAU_COURBE_no_assoc.py
new file mode 100755 (executable)
index 0000000..b326461
--- /dev/null
@@ -0,0 +1,466 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import os
+#import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+#import SALOMEDS
+
+
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/tuyau.brep")
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument ("default")
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour le tuyau on doit creer une grille cylindrique
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 4.5
+
+r = 4.5
+r_t = 3.6
+
+h = 75.0
+
+# Taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+
+#=================================================
+# Creation du centre de la grille cylindrique
+#=================================================
+
+c = doc.addVertex(0, 0, 0)
+
+#=================================================
+# Creation de la grille cylindrique
+#=================================================
+
+grille_cyl = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+
+# on obtient une liste qui contient 4 hexaedres eguaux
+
+# 30� = pi/6
+# 60� = pi/3
+# 45� = pi/4
+# 90� = pi/2
+# 180� = pi
+
+
+#=================================================
+# Model tuyau final
+#=================================================
+
+model_tuyau_fin = grille_cyl
+
+
+#model_tuyau_fin.saveVtk("/tmp/tuyau.vtk")
+#grille_cyl.saveVtk("/tmp/grille_cyl.vtk")
+
+
+
+#===================================================================
+# Recuperation des vertex du model hexa tuyau pour l'association
+#===================================================================
+
+## NB:
+## h = haut
+## b = bas
+## g = grand
+## p = petit
+## t = trou
+
+
+# Face du haut grand rayon
+
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+# Face du haut petit rayon
+
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+
+# Face du bas grand rayon
+
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+# Face du bas petit rayon
+
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+
+
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+
+
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+
+
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+
+
+
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+
+
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+# Face tuyau du haut
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+
+
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+
+
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+
+
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+
+
+
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+
+
+
+# Face tuyau du bas
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+
+
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+
+
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_all_grp")
+Nbr_Hex = doc.countHexa()
+print "doc.countHexa()->",Nbr_Hex
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+#Nbr_elm_hex = Hexa_grp.countElement()
+#print "Hexa_all_grp  countElement() ->",Nbr_elm_hex
+
+for i in range(Nbr_Hex):
+    Hexa_grp = doc.addHexaGroup("Hexa_grp"+str(i))
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+
+Nbr_elm_qad_haut = Quad_grp_haut.countElement()
+print "Nbr_elm_qad_haut ->",Nbr_elm_qad_haut
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+
+Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+# groupe de Edges
+
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+
+Nbr_Vx = doc.countVertex()
+print "doc.countVertex()->",Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+Nbr_elm_vex = Vertex_Nod_Grp.countElement()
+
+if Nbr_elm_vex == Nbr_Vx:
+    print "Vertex node group OK (on group :%s  on model : %s)"%(Nbr_elm_vex, Nbr_Vx)
+else:
+    print "Vertex node group KO (on group :%s  on model : %s)"%(Nbr_elm_vex, Nbr_Vx)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+
+
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh(doc, "test_TUYAU_COURBE_no_assoc")
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexa�drique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.noassoc.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.noassoc.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py b/src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py
new file mode 100755 (executable)
index 0000000..3df354f
--- /dev/null
@@ -0,0 +1,808 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+import os
+import geompy
+import smesh
+import hexablock
+import math
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/tuyau.brep")
+
+
+
+
+#===================================================================
+#               LE MODELE:
+#   (Pour le tuyau on doit creer une grille cylindrique)
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+R = 4.5
+r = 4.5
+r_t = 3.6
+h = 75.0
+
+
+#=================================================
+# Creation du document
+#=================================================
+doc = hexablock.addDocument ("default")
+
+#=================================================
+# Creation du tuyau (grille cylindrique) dans le document
+#=================================================
+# centre de la grille cylindrique
+c = doc.addVertex(0, 0, 0) 
+
+# vecteurs de la grille cylindrique
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+# taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+model_tuyau_fin = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+# note: on obtient une liste qui contient 4 hexaedres eguaux
+
+
+#===================================================================
+# Recuperation des vertex,edges et quads du model pour l'association
+#
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+#===================================================================
+
+#=========================
+#       VERTEX
+#=========================
+
+# Face du haut 
+#   grand rayon
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+#   petit rayon
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+# Face du bas
+#   grand rayon
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+#   petit rayon
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+# v�rifications
+assert x_mod_h
+assert y_mod_h
+assert z_mod_h
+assert u_mod_h
+
+assert x_mod_h_t
+assert y_mod_h_t
+assert z_mod_h_t
+assert u_mod_h_t
+
+assert x_mod_b
+assert y_mod_b
+assert z_mod_b
+assert u_mod_b
+
+assert x_mod_b_t
+assert y_mod_b_t
+assert z_mod_b_t
+assert u_mod_b_t
+
+
+#=========================
+#       EDGES
+#=========================
+
+# Face du haut
+
+#   grand rayon
+edge_mod_face_h_1_1 = doc.findEdge( y_mod_h , z_mod_h )
+edge_mod_face_h_1_2 = doc.findEdge( z_mod_h , u_mod_h )
+edge_mod_face_h_2_1 = doc.findEdge( y_mod_h,  x_mod_h )
+edge_mod_face_h_2_2 = doc.findEdge( x_mod_h,  u_mod_h )
+
+#   petit rayon
+edge_mod_t_face_h_1_1 = doc.findEdge( y_mod_h_t , z_mod_h_t )
+edge_mod_t_face_h_1_2 = doc.findEdge( z_mod_h_t , u_mod_h_t )
+edge_mod_t_face_h_2_1 = doc.findEdge( y_mod_h_t,  x_mod_h_t )
+edge_mod_t_face_h_2_2 = doc.findEdge( x_mod_h_t,  u_mod_h_t )
+
+
+# Face du bas
+
+#   grand rayon
+edge_mod_face_b_1_1 = doc.findEdge( y_mod_b , z_mod_b )
+edge_mod_face_b_1_2 = doc.findEdge( z_mod_b , u_mod_b )
+edge_mod_face_b_2_1 = doc.findEdge( y_mod_b,  x_mod_b )
+edge_mod_face_b_2_2 = doc.findEdge( x_mod_b,  u_mod_b )
+
+#   petit rayon
+edge_mod_t_face_b_1_1 = doc.findEdge( y_mod_b_t , z_mod_b_t )
+edge_mod_t_face_b_1_2 = doc.findEdge( z_mod_b_t , u_mod_b_t )
+edge_mod_t_face_b_2_1 = doc.findEdge( y_mod_b_t,  x_mod_b_t )
+edge_mod_t_face_b_2_2 = doc.findEdge( x_mod_b_t,  u_mod_b_t )
+
+
+
+# Joignant faces haut et du bas
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+# v�rifications
+assert edge_mod_face_h_1_1
+assert edge_mod_face_h_1_2
+assert edge_mod_face_h_2_1
+assert edge_mod_face_h_2_2
+
+assert edge_mod_t_face_h_1_1
+assert edge_mod_t_face_h_1_2
+assert edge_mod_t_face_h_2_1
+assert edge_mod_t_face_h_2_2
+
+assert edge_mod_face_b_1_1
+assert edge_mod_face_b_1_2
+assert edge_mod_face_b_2_1
+assert edge_mod_face_b_2_2
+
+assert edge_mod_t_face_b_1_1
+assert edge_mod_t_face_b_1_2
+assert edge_mod_t_face_b_2_1
+assert edge_mod_t_face_b_2_2
+
+
+assert Edge_Mod_ext_h
+assert Edge_Mod_int_h
+
+assert Edge_Mod_int_b
+assert Edge_Mod_ext_b
+
+assert Edge_Mod_ext_g
+assert Edge_Mod_int_g
+
+assert Edge_Mod_int_d
+assert Edge_Mod_ext_d
+
+
+
+#=========================
+#       QUADS
+#=========================
+Quad_mod_0 = model_tuyau_fin.getQuadJK( 1 , 0 , 0 )
+Quad_mod_1 = model_tuyau_fin.getQuadJK( 1 , 1 , 0 )
+Quad_mod_2 = model_tuyau_fin.getQuadJK( 1 , 2 , 0 )
+Quad_mod_3 = model_tuyau_fin.getQuadJK( 1 , 3 , 0 )
+
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+
+
+#=========================
+#       SOMMETS
+#=========================
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+
+# Face du bas
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+## Grand rayon
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+## Petit rayon
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+# Face du haut
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+## Grand rayon
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+## Petit rayon
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+#=========================
+#       EDGES
+#=========================
+All_Edges_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["EDGE"] )
+
+# Face du haut
+## Grand rayon
+edge_face_h_1   = All_Edges_Tuy_1[11]
+edge_face_h_2   = All_Edges_Tuy_1[14]
+## Petit rayon
+edge_t_face_h_1 = All_Edges_Tuy_1[12]
+edge_t_face_h_2 = All_Edges_Tuy_1[13]
+
+
+# Face du bas
+## Grand rayon
+edge_face_b_1   = All_Edges_Tuy_1[1]
+edge_face_b_2   = All_Edges_Tuy_1[4]
+##  Petit rayon
+edge_t_face_b_1 = All_Edges_Tuy_1[2]
+edge_t_face_b_2 = All_Edges_Tuy_1[3]
+
+
+# Joignant les 2 faces
+
+## edges compl�tes
+Edge_Tuy_ext_h = All_Edges_Tuy_1[6]
+Edge_Tuy_int_h = All_Edges_Tuy_1[7]
+Edge_Tuy_int_b = All_Edges_Tuy_1[8]
+Edge_Tuy_ext_b = All_Edges_Tuy_1[9]
+
+Pt_Z = geompy.MakeVertex( 75 , 20 , 0 )
+Pt_Z_1 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , 10 )
+Pt_Z_2 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , -10 )
+Line_Z1_Z2 = geompy.MakeLineTwoPnt( Pt_Z_1 , Pt_Z_2 )
+
+
+All_Edge_Tuy_ext_h = geompy.SubShapeAllSorted( Edge_Tuy_ext_h , geompy.ShapeType["VERTEX"] )
+
+Vx_Edg_Tuy_ext_h_1 = All_Edge_Tuy_ext_h[0]
+Vx_Edg_Tuy_ext_h_2 = All_Edge_Tuy_ext_h[1]
+
+Vx_Edg_Tuy_ext_h_1_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_1 , -10 , -10 , 0 )
+Vx_Edg_Tuy_ext_h_2_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_2 , 10 , 0 , 0 )
+
+Line_1 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_1, Vx_Edg_Tuy_ext_h_1_trans)
+Line_2 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_2, Vx_Edg_Tuy_ext_h_2_trans)
+
+Wire = geompy.MakeWire([Line_1, Line_2, Edge_Tuy_ext_h])
+Pipe_Z = geompy.MakePipe( Line_Z1_Z2 , Wire )
+Pipe_Ztt = geompy.MakePipe( Line_Z1_Z2 , Edge_Tuy_ext_h )
+Partition_Ztt = geompy.MakePartition([Tuyau_geom], [Pipe_Ztt], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+All_Edges_Tuy_2tt = geompy.SubShapeAllSorted( Partition_Ztt , geompy.ShapeType["EDGE"] )
+
+Edge_Tuy_ext_g = All_Edges_Tuy_2tt[12]
+Edge_Tuy_int_g = All_Edges_Tuy_2tt[13]
+Edge_Tuy_ext_d = All_Edges_Tuy_2tt[10]
+Edge_Tuy_int_d = All_Edges_Tuy_2tt[11]
+
+## une edge en plusieurs(4) morceaux : Edge_Tuy_ext_h
+X_pln1 = geompy.MakeVertexWithRef( Pt_Z , -20 , 0 , 0 )
+Vec_X = geompy.MakeVectorDXDYDZ( 1 , 0 , 0 )
+
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+Plan2 = geompy.MakeTranslation( Plan1 , -20 , 0 , 0 )
+Plan3 = geompy.MakeTranslation( Plan1 , -40 , 0 , 0 )
+
+Partition_Edge_g_d_h_b = geompy.MakePartition([
+    Edge_Tuy_ext_h,
+    Edge_Tuy_int_h,
+    Edge_Tuy_ext_b,
+    Edge_Tuy_int_b,
+    Edge_Tuy_ext_g,
+    Edge_Tuy_int_g,
+    Edge_Tuy_ext_d,
+    Edge_Tuy_int_d], 
+    [Plan1, Plan2, Plan3], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+
+All_Edge_g_d_h_b = geompy.SubShapeAllSorted( Partition_Edge_g_d_h_b , geompy.ShapeType["EDGE"] )
+Edge_Tuy_ext_h_1 = All_Edge_g_d_h_b[0]
+Edge_Tuy_ext_h_2 = All_Edge_g_d_h_b[15]
+Edge_Tuy_ext_h_3 = All_Edge_g_d_h_b[23]
+Edge_Tuy_ext_h_4 = All_Edge_g_d_h_b[31]
+
+
+
+## une edge d�coup�e en plusieurs morceaux n'�pousant pas la g�om�trie: 
+VX_A = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 0.)
+VX_B = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 1.)
+VX_C = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 0.25)
+#VX_Cbis = geompy.MakeVertexWithRef(VX_C, -10, 10, 0)
+VX_Cbis = geompy.MakeVertexWithRef(VX_C, -5, 1, -4)
+
+weird_part = geompy.MakePartition([Edge_Tuy_ext_d], [VX_C], [], [], geompy.ShapeType["EDGE"])
+
+weird_edge0 = geompy.GetEdge(weird_part, VX_C, VX_B)
+weird_edge1 = geompy.MakeEdge(VX_Cbis, VX_C )
+weird_edge2 = geompy.MakeEdge(VX_A, VX_Cbis   )
+
+
+#=========================
+#       FACES
+#=========================
+All_Faces_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["FACE"] )
+
+Face_Tuy_ext_1 = All_Faces_Tuy_1[4]
+Face_Tuy_ext_2 = All_Faces_Tuy_1[5]
+
+Partition_Face = geompy.MakePartition([ Face_Tuy_ext_1 , Face_Tuy_ext_2 ], [ Plan1 , Plan2 , Plan3 , Pipe_Z ], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+
+
+All_Faces_Partition_Face = geompy.SubShapeAllSorted( Partition_Face , geompy.ShapeType["FACE"] )
+
+## -------------------------------------
+Face_0 = All_Faces_Partition_Face[0]
+Face_6 = All_Faces_Partition_Face[6]
+Face_10 = All_Faces_Partition_Face[10]
+Face_14 = All_Faces_Partition_Face[14]
+
+## -------------------------------------
+Face_1 = All_Faces_Partition_Face[1]
+Face_7 = All_Faces_Partition_Face[7]
+Face_11 = All_Faces_Partition_Face[11]
+Face_15 = All_Faces_Partition_Face[15]
+
+## -------------------------------------
+Face_2 = All_Faces_Partition_Face[2]
+Face_4 = All_Faces_Partition_Face[4]
+Face_8 = All_Faces_Partition_Face[8]
+Face_12 = All_Faces_Partition_Face[12]
+
+## -------------------------------------
+Face_3 = All_Faces_Partition_Face[3]
+Face_5 = All_Faces_Partition_Face[5]
+Face_9 = All_Faces_Partition_Face[9]
+Face_13 = All_Faces_Partition_Face[13]
+
+
+
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          VERTEX
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+x_mod_h.setAssociation( x_h )
+y_mod_h.setAssociation( y_h )
+z_mod_h.setAssociation( z_h )
+u_mod_h.setAssociation( u_h )
+
+## Petit rayon
+x_mod_h_t.setAssociation( x_h_t )
+y_mod_h_t.setAssociation( y_h_t )
+z_mod_h_t.setAssociation( z_h_t )
+u_mod_h_t.setAssociation( u_h_t )
+
+
+# Face du bas
+
+## Grand rayon
+x_mod_b.setAssociation( x_b )
+y_mod_b.setAssociation( y_b )
+z_mod_b.setAssociation( z_b )
+u_mod_b.setAssociation( u_b )
+
+## Petit rayon
+x_mod_b_t.setAssociation( x_b_t )
+y_mod_b_t.setAssociation( y_b_t )
+z_mod_b_t.setAssociation( z_b_t )
+u_mod_b_t.setAssociation( u_b_t )
+
+
+##===========================================
+##          EDGES
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+edge_mod_face_h_1_1.addAssociation( edge_face_h_1, 0.5, 1. )
+edge_mod_face_h_1_2.addAssociation( edge_face_h_1, 0., 0.5 )
+edge_mod_face_h_2_1.addAssociation( edge_face_h_2, 0.5, 1. )
+edge_mod_face_h_2_2.addAssociation( edge_face_h_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_h_1_1.addAssociation( edge_t_face_h_1, 0.5, 1. )
+edge_mod_t_face_h_1_2.addAssociation( edge_t_face_h_1, 0., 0.5 )
+edge_mod_t_face_h_2_1.addAssociation( edge_t_face_h_2, 0.5, 1. )
+edge_mod_t_face_h_2_2.addAssociation( edge_t_face_h_2, 0., 0.5 )
+
+# Face du bas
+
+## Grand rayon
+edge_mod_face_b_1_1.addAssociation( edge_face_b_1, 0.5, 1. )
+edge_mod_face_b_1_2.addAssociation( edge_face_b_1, 0., 0.5 )
+edge_mod_face_b_2_1.addAssociation( edge_face_b_2, 0.5, 1. )
+edge_mod_face_b_2_2.addAssociation( edge_face_b_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_b_1_1.addAssociation( edge_t_face_b_1, 0.5, 1. )
+edge_mod_t_face_b_1_2.addAssociation( edge_t_face_b_1, 0., 0.5 )
+edge_mod_t_face_b_2_1.addAssociation( edge_t_face_b_2, 0.5, 1. )
+edge_mod_t_face_b_2_2.addAssociation( edge_t_face_b_2, 0., 0.5 )
+
+
+
+# Joignant les 2 faces
+#Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_1, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_2, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_3, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_4, 0., 1. )
+Edge_Mod_int_h.addAssociation( Edge_Tuy_int_h, 0., 1. )
+
+Edge_Mod_int_b.addAssociation( Edge_Tuy_int_b, 0., 1. )
+Edge_Mod_ext_b.addAssociation( Edge_Tuy_ext_b, 0., 1. )
+
+Edge_Mod_ext_g.addAssociation( Edge_Tuy_ext_g, 0., 1. )
+Edge_Mod_int_g.addAssociation( Edge_Tuy_int_g, 0., 1. )
+
+Edge_Mod_int_d.addAssociation( Edge_Tuy_int_d, 0., 1. )
+#Edge_Mod_ext_d.addAssociation( Edge_Tuy_ext_d, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge0, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge1, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge2, 0., 1. )
+
+
+
+##===========================================
+##          FACES
+##===========================================
+
+#Quad_mod_1.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_1.addAssociation( Face_0 )
+Quad_mod_1.addAssociation( Face_6 )
+Quad_mod_1.addAssociation( Face_10 )
+Quad_mod_1.addAssociation( Face_14 )
+
+#Quad_mod_0.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_0.addAssociation( Face_1 )
+Quad_mod_0.addAssociation( Face_7 )
+Quad_mod_0.addAssociation( Face_11 )
+Quad_mod_0.addAssociation( Face_15 )
+
+#Quad_mod_2.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_2.addAssociation( Face_2 )
+Quad_mod_2.addAssociation( Face_4 )
+Quad_mod_2.addAssociation( Face_8 )
+Quad_mod_2.addAssociation( Face_12 )
+
+#Quad_mod_3.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_3.addAssociation( Face_3 )
+Quad_mod_3.addAssociation( Face_5 )
+Quad_mod_3.addAssociation( Face_9 )
+Quad_mod_3.addAssociation( Face_13 )
+
+
+
+#==========================================================
+#       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+#==========================================================
+#for i,e in enumerate(All_Edges_Tuy_1): geompy.addToStudy( e, "edge_"+str(i) )
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+geompy.addToStudy( x_h, "x_h" )
+geompy.addToStudy( y_h, "y_h" )
+geompy.addToStudy( z_h, "z_h" )
+geompy.addToStudy( u_h, "u_h" )
+geompy.addToStudy( x_h_t, "x_h_t")
+geompy.addToStudy( y_h_t, "y_h_t" )
+geompy.addToStudy( z_h_t, "z_h_t" )
+geompy.addToStudy( u_h_t, "u_h_t" )
+
+geompy.addToStudy( x_b, "x_b")
+geompy.addToStudy( y_b, "y_b" )
+geompy.addToStudy( z_b, "z_b" )
+geompy.addToStudy( u_b, "u_b")
+geompy.addToStudy( x_b_t, "x_b_t" )
+geompy.addToStudy( y_b_t, "y_b_t" )
+geompy.addToStudy( z_b_t, "z_b_t" )
+geompy.addToStudy( u_b_t, "u_b_t" )
+
+
+#geompy.addToStudy(Line_Z1_Z2, "Line_Z1_Z2")
+#geompy.addToStudy(Pipe_Ztt, "Pipe_Ztt")
+#geompy.addToStudy( Partition_Ztt , "Partition_Ztt" )
+geompy.addToStudy( Edge_Tuy_ext_h , "Edge_Tuy_ext_h" )
+geompy.addToStudy( Edge_Tuy_int_h , "Edge_Tuy_int_h" )
+geompy.addToStudy( Edge_Tuy_int_b , "Edge_Tuy_int_b" )
+geompy.addToStudy( Edge_Tuy_ext_b , "Edge_Tuy_ext_b" )
+geompy.addToStudy( Edge_Tuy_ext_g , "Edge_Tuy_ext_g" )
+geompy.addToStudy( Edge_Tuy_int_g , "Edge_Tuy_int_g" )
+geompy.addToStudy( Edge_Tuy_ext_d , "Edge_Tuy_ext_d" )
+geompy.addToStudy( Edge_Tuy_int_d , "Edge_Tuy_int_d" )
+#geompy.addToStudy( Partition_Edge_g_d_h_b , "Partition_Edge_g_d_h_b" )
+geompy.addToStudy( Face_Tuy_ext_1 , "Face_Tuy_ext_1" )
+geompy.addToStudy( Face_Tuy_ext_2 , "Face_Tuy_ext_2" )
+#geompy.addToStudy( Partition_Face , "Partition_Face" )
+geompy.addToStudy( Face_0 , "Face_0" )
+geompy.addToStudy( Face_1 , "Face_1" )
+geompy.addToStudy( Face_2 , "Face_2" )
+geompy.addToStudy( Face_3 , "Face_3" )
+geompy.addToStudy( Face_4 , "Face_4" )
+geompy.addToStudy( Face_5 , "Face_5" )
+geompy.addToStudy( Face_6 , "Face_6" )
+geompy.addToStudy( Face_7 , "Face_7" )
+geompy.addToStudy( Face_8 , "Face_8" )
+geompy.addToStudy( Face_9 , "Face_9" )
+geompy.addToStudy( Face_10 , "Face_10" )
+geompy.addToStudy( Face_11 , "Face_11" )
+geompy.addToStudy( Face_12 , "Face_12" )
+geompy.addToStudy( Face_13 , "Face_13" )
+geompy.addToStudy( Face_14 , "Face_14" )
+geompy.addToStudy( Face_15 , "Face_15" )
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+Nbr_elm_hex = Hexa_grp.countElement()
+print "Hexa_grp.countElement() ->",Nbr_elm_hex
+
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+#Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+#print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+
+# groupe de Edges
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh(doc, "test_TUYAU_COURBE_weird_assoc")
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexa�drique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/test_distrib.py b/src/TEST_PY/test_distrib.py
new file mode 100755 (executable)
index 0000000..a62fc88
--- /dev/null
@@ -0,0 +1,111 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS - 2010 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# ========================================================================================
+
+import geompy
+import hexablock
+
+# Build the geometry to mesh with hexahedra: a sphere
+# ---------------------------------------------------
+
+name = "Sphere"
+
+cx = 0
+cy = 0
+cz = 0
+
+radius = 5
+
+sphere = geompy.MakeSphere(cx, cy, cz, radius)
+
+geompy.addToStudy(sphere, name)
+
+# Add a new document
+# ------------------
+
+doc = hexablock.addDocument(name)
+
+doc.addShape(sphere)
+
+# Build the model of blocks: a catesian grid
+# ------------------------------------------
+
+center = doc.addVertex(cx, cy, cz)
+
+axis_x = doc.addVector(1, 0, 0)
+axis_y = doc.addVector(0, 1, 0)
+axis_z = doc.addVector(0, 0, 1)
+
+doc.makeCartesian(center, axis_x, axis_y, axis_z, 5, 4, 3)
+
+# Associate the model of block to the geometry
+# --------------------------------------------
+
+# Define group of all hexahedra
+# -----------------------------
+
+group_h = doc.addHexaGroup(name+":hexas")
+for i in xrange(doc.countHexa()):
+    e = doc.getHexa(i)
+    group_h.addElement(e)
+
+# Define group of all quadrangles
+# -------------------------------
+
+group_q = doc.addQuadGroup(name+":quadrangles")
+for i in xrange(doc.countQuad()):
+    e = doc.getQuad(i)
+    group_q.addElement(e)
+
+# Define the laws for discretization
+# ----------------------------------
+
+law = doc.addLaw("Uniform" , 3)
+
+# Set the law on all edges of the model of blocks
+# -----------------------------------------------
+
+for i in xrange(doc.countPropagation()):
+    p = doc.getPropagation(i)
+    p.setLaw(law)
+
+# Generate the hexehadral mesh on FactoryServer
+# ---------------------------------------------
+
+mesh_1 = hexablock.mesh(doc)
+
+print "Number of hexaedra   :", mesh_1.NbHexas()
+print "Number of quadrangles:", mesh_1.NbQuadrangles()
+print "Number of segments   :", mesh_1.NbEdges()
+print "Number de nodes      :", mesh_1.NbNodes()
+
+# Generate the hexehadral mesh on FooBar container
+# ------------------------------------------------
+
+container = "FooBar"
+
+mesh_2 = hexablock.mesh(doc, name+":"+container, 3, container)
+
+print "Number of hexaedra   :", mesh_2.NbHexas()
+print "Number of quadrangles:", mesh_2.NbQuadrangles()
+print "Number of segments   :", mesh_2.NbEdges()
+print "Number de nodes      :", mesh_2.NbNodes()
diff --git a/src/TEST_PY/test_unit/asso_grid.py b/src/TEST_PY/test_unit/asso_grid.py
new file mode 100644 (file)
index 0000000..4b5eee1
--- /dev/null
@@ -0,0 +1,62 @@
+# -*- coding: latin-1 -*-
+
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+import geompy
+import hexablock
+import math
+
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")
+
+#==========================================================================
+
+doc = hexablock.addDocument ("default")
+
+
+orig1 = doc.addVertex ( 0, 0,0);
+vz    = doc.addVector (0,0,1);
+vx    = doc.addVector (1,0,0);
+
+dr = 1.0
+dl = 1.0
+nr = 2
+nl = 3
+na = 8
+
+c1 = doc.makeCylindrical (orig1, vx,vz,dr, 300, dl, nr, na, nl, False);
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "Grille:hexas")
+
+print "Nombre d hexaedres:", mesh_hexas.NbHexas()
+print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()
+print "Nombre de segments:", mesh_hexas.NbEdges()
+print "Nombre de noeuds:", mesh_hexas.NbNodes()
+
+
diff --git a/src/TEST_PY/test_unit/bielle.py b/src/TEST_PY/test_unit/bielle.py
new file mode 100644 (file)
index 0000000..b19126d
--- /dev/null
@@ -0,0 +1,239 @@
+# -*- coding: latin-1 -*-\r
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Francis KLOSS - 2011 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France\r
+# ========================================================================================\r
+\r
+import geompy\r
+import hexablock\r
+\r
+# Définir les paramètres\r
+# ----------------------\r
+\r
+nom = "bielle"\r
+\r
+# Construire le modèle de bloc\r
+# ============================\r
+\r
+doc = hexablock.addDocument(nom)\r
+\r
+# Construire les 2 grilles cylindriques\r
+# -------------------------------------\r
+\r
+centre_a = doc.addVertex(0, 0, 0)\r
+centre_b = doc.addVertex(6, 0, 0)\r
+\r
+vecteur_a = doc.addVector(1, 1, 0)\r
+vecteur_z = doc.addVector(0, 0, 1)\r
+vecteur_b = doc.addVector(6, 0, 0)\r
+\r
+grille_a = doc.makeCylindrical(centre_a, vecteur_a, vecteur_z,  1, 360, 1,  1, 4, 1,  False)\r
+\r
+### grille_b = doc.makeTranslation(grille_a, vecteur_b)\r
+grille_b = doc.makeCylindrical(centre_b, vecteur_a, vecteur_z,  2, 360, 1,  1, 4, 1,  False)\r
+\r
+grilles = [ grille_a, grille_b ]\r
+\r
+# Relier les 2 grilles\r
+# --------------------\r
+\r
+quad_a = grille_a.getQuadJK(1, 3, 0)\r
+quad_b = grille_b.getQuadJK(1, 1, 0)\r
+\r
+point_a1 = grille_a.getVertexIJK(1, 0, 0)\r
+point_a2 = grille_a.getVertexIJK(1, 3, 0)\r
+\r
+point_b1 = grille_b.getVertexIJK(1, 1, 0)\r
+point_b2 = grille_b.getVertexIJK(1, 2, 0)\r
+\r
+prisme = doc.joinQuad(quad_a, quad_b,  point_a1, point_b1,  point_a2, point_b2,  3)\r
+\r
+# Associer le modèle de bloc avec la géométrie\r
+# ============================================\r
+\r
+# Charger la géométrie à associer\r
+# -------------------------------\r
+\r
+bielle = geompy.ImportSTEP("crank.stp")\r
+\r
+doc.setShape(bielle)\r
+\r
+# Extraire les subshapes de la géométrie\r
+# --------------------------------------\r
+\r
+g_vertices = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["VERTEX"])\r
+g_edges    = geompy.SubShapeAllSortedCentres(bielle, geompy.ShapeType["EDGE"  ])\r
+\r
+sommets = [ [ 8, 6, 9, 7 ], [ 12, 10, 13, 11 ] ]\r
+\r
+cercles = [ [2, 3], [25, 26] ]\r
+arcs_gr = [ [0, 1], [27, 28] ]\r
+arcs_pe = [ [ 9, 7,  10, 8 ], [ 21, 19,  22, 20 ] ]\r
+\r
+# Associer les 4 cercles intérieurs\r
+# ---------------------------------\r
+\r
+for k in xrange(0, 2):\r
+    for g in xrange(0, 2):\r
+        grille = grilles[g]\r
+        ve = grille.getVertexIJK(0, 1, k)\r
+        le = [ grille.getEdgeJ(0, j, k) for j in xrange(0, 4) ]\r
+        cercle  = g_edges[ cercles[g][k] ]\r
+        doc.associateClosedLine(ve, le[0], le[1:], cercle, 0.625, False, [])\r
+\r
+# Associer les 4 grands arcs de cercle extérieurs\r
+# -----------------------------------------------\r
+\r
+for k in xrange(0, 2):\r
+  g=0\r
+  grille = grilles[g]\r
+  le = [ grille.getEdgeJ(1, j, k) for j in [2, 1, 0] ]\r
+  ed = g_edges[ arcs_gr[g][k] ]\r
+  doc.associateOpenedLine(le[0], le[1:], ed, 0, [], 1)\r
+\r
+for k in xrange(0, 2):\r
+  g=1\r
+  grille = grilles[g]\r
+  le = [ grille.getEdgeJ(1, j, k) for j in [0, 3, 2] ]\r
+  ed = g_edges[ arcs_gr[g][k] ]\r
+  doc.associateOpenedLine(le[0], le[1:], ed, 0, [], 1)\r
+\r
+# Associer les 8 sommets des petits arcs de cercle extérieurs\r
+# -----------------------------------------------------------\r
+\r
+for g, h in [ [0, 1], [1, 2] ]:\r
+  hexa = prisme.getHexa(h)\r
+  for vi in xrange(0, 4):\r
+    nv = 2*(vi/2) + 1 - vi % 2\r
+    vm = hexa.getVertex(nv)\r
+    vg = g_vertices[ sommets[g][vi] ]\r
+    x, y, z = geompy.PointCoordinates(vg)\r
+    vm.setAssociation(vg)\r
+\r
+# Associer les 8 petits arcs de cercle extérieurs\r
+# -----------------------------------------------\r
+\r
+for g, h in [ [0, 0], [1, 2] ]:\r
+  hexa = prisme.getHexa(h)\r
+  for ei in xrange(0, 4):\r
+    nv = 2*(ei/2) + 1 - ei % 2\r
+    em = hexa.getEdge(nv+8)\r
+    eg = g_edges[ arcs_pe[g][ei] ]\r
+    em.clearAssociation()\r
+    em.addAssociation(eg, 0, 1)\r
+\r
+# Associer 4 arcs nouveaux qui complétent les 4 grands arcs de cercle extérieurs\r
+# ------------------------------------------------------------------------------\r
+\r
+for h, ei, ech in [ [0, 0, 0.9], [0, 1, 0.9],  [2, 2, 0.85], [2, 3, 0.85] ]:\r
+  hexa = prisme.getHexa(h)\r
+  em = hexa.getEdge(ei)\r
+  va = em.getVertex(0).getAssociation()\r
+  vb = em.getVertex(1).getAssociation()\r
+  vax, vay, vaz = geompy.PointCoordinates(va)\r
+  vbx, vby, vbz = geompy.PointCoordinates(vb)\r
+  vmx = ( vax + vbx ) / 2.0 * ech\r
+  vmy = ( vay + vby ) / 2.0\r
+  vmz = ( vaz + vbz ) / 2.0\r
+  vm = geompy.MakeVertex(vmx, vmy, vmz)\r
+  eg = geompy.MakeArc(va, vm, vb)\r
+  em.clearAssociation()\r
+  em.addAssociation(eg, 0, 1)\r
+\r
+# Mailler le modèle de bloc\r
+# =========================\r
+\r
+# Définir 5 groupes de faces\r
+# --------------------------\r
+\r
+groupe_trou_p  = doc.addQuadGroup("Trou_petit")\r
+groupe_trou_g  = doc.addQuadGroup("Trou_grand")\r
+groupe_bas     = doc.addQuadGroup("Bas")\r
+groupe_haut    = doc.addQuadGroup("Haut")\r
+groupe_contour = doc.addQuadGroup("Contour")\r
+\r
+for i in xrange(4):\r
+  groupe_trou_p.addElement(grille_a.getQuadJK(0, i, 0))\r
+  groupe_trou_g.addElement(grille_b.getQuadJK(0, i, 0))\r
+\r
+  groupe_bas.addElement( grille_a.getQuadIJ(0, i, 0))\r
+  groupe_bas.addElement( grille_b.getQuadIJ(0, i, 0))\r
+  groupe_haut.addElement(grille_a.getQuadIJ(0, i, 1))\r
+  groupe_haut.addElement(grille_b.getQuadIJ(0, i, 1))\r
+\r
+for i in xrange(3):\r
+  groupe_contour.addElement(grille_a.getQuadJK(1, i, 0))\r
+\r
+for i in [0, 2, 3]:\r
+  groupe_contour.addElement(grille_b.getQuadJK(1, i, 0))\r
+\r
+for i in xrange(0, 3):\r
+  h = prisme.getHexa(i)\r
+\r
+  q = h.getQuad(2)\r
+  groupe_bas.addElement(q)\r
+\r
+  q = h.getQuad(3)\r
+  groupe_haut.addElement(q)\r
+\r
+  q = h.getQuad(4)\r
+  groupe_contour.addElement(q)\r
+  q = h.getQuad(5)\r
+  groupe_contour.addElement(q)\r
+\r
+# Définir 3 groupes de volumes\r
+# ----------------------------\r
+\r
+groupe_cyli_p = doc.addHexaGroup("Cylindre_petit")\r
+groupe_cyli_g = doc.addHexaGroup("Cylindre_grand")\r
+groupe_prisme = doc.addHexaGroup("Prisme")\r
+\r
+for i in xrange(4):\r
+  groupe_cyli_p.addElement(grille_a.getHexa(i))\r
+  groupe_cyli_g.addElement(grille_b.getHexa(i))\r
+\r
+for i in xrange(3):\r
+  groupe_prisme.addElement(prisme.getHexa(i))\r
+\r
+# Mailler le modèle de bloc avec association\r
+# ------------------------------------------\r
+\r
+l = doc.addLaw("Uniform1", 17)\r
+n = doc.countPropagation()\r
+\r
+for i in xrange(n):\r
+  p = doc.getPropagation(i)\r
+  p.setLaw(l)\r
+\r
+l = doc.addLaw("Uniform2", 40)\r
+p = doc.getPropagation(11)\r
+p.setLaw(l)\r
+\r
+blocs = hexablock.mesh (doc)\r
+\r
+print "nombre de sommets     du modèle de bloc: ", doc.countUsedVertex()\r
+print "nombre d'arêtes       du modèle de bloc: ", doc.countUsedEdge()\r
+print "nombre de quadrangles du modèle de bloc: ", doc.countUsedQuad()\r
+print "nombre de blocs       du modèle de bloc: ", doc.countUsedHexa()\r
+\r
+print "Nombre de noeuds      du maillage: ", blocs.NbNodes()\r
+print "Nombre de segments    du maillage: ", blocs.NbEdges()\r
+print "Nombre de quadrangles du maillage: ", blocs.NbQuadrangles()\r
+print "Nombre d'hexaèdres    du maillage: ", blocs.NbHexas()\r
diff --git a/src/TEST_PY/test_unit/hexa_quads.py b/src/TEST_PY/test_unit/hexa_quads.py
new file mode 100644 (file)
index 0000000..15cda17
--- /dev/null
@@ -0,0 +1,254 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+# ================================================================= save_schema
+class FileVtk :
+    def __init__ (self, doc, radical):
+        self.document = doc
+        self.count    = 0
+        self.radical  = radical
+
+    def save (self) :
+        """
+        sauvegarde vtk du modele de bloc
+        """
+        self.count += 1
+        file_name = os.path.join(self.radical + str(self.count) + '.vtk')
+        self.document.saveVtk(file_name)
+
+# ================================================================= add_grid
+def add_grid (doc, size_x, size_y, size_z) :
+    orig = doc.addVertex(0, 0, 0)
+
+    vx = doc.addVector (1, 0, 0)
+    vy = doc.addVector (0, 1, 0)
+    vz = doc.addVector (0, 0, 1)
+    grid = doc.makeCartesian (orig, vx, vy, vz, size_x, size_y, size_z)
+    return grid
+
+# ========================================================== test_hexa_quads_5
+def test_hexa_quads_5 () :
+    doc  = hexablock.addDocument ("default")
+    vtk  = FileVtk (doc, "HexaQuads5");
+    grid = add_grid (doc, 3, 3, 2)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,1,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qb)
+    vtk.save ()
+
+    doc.addHexa5Quads (qa, qc, qd, qe, qf);
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+# ========================================================== test_hexa_quads_ab
+def test_hexa_quads_ab () :
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsAB");
+    grid = add_grid (doc, 1, 1, 3)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (0,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qc)
+    doc.removeQuad (qd)
+    doc.removeQuad (qe)
+    doc.removeQuad (qf)
+    vtk.save ()
+
+    doc.addHexa2Quads (qa, qb)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+# ========================================================== test_hexa_quads_ac
+def test_hexa_quads_ac () :
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsAC");
+    grid = add_grid (doc, 2, 1, 2)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qb)
+    doc.removeQuad (qc)
+    doc.removeQuad (qd)
+    doc.removeQuad (qf)
+    vtk.save ()
+
+    doc.addHexa2Quads (qa, qe)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+# ======================================================= test_hexa_quads_acd
+def test_hexa_quads_acd () :
+
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsACD");
+    grid = add_grid (doc, 3, 1, 2)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qb)
+    doc.removeQuad (qc)
+    doc.removeQuad (qd)
+    vtk.save ()
+
+    doc.addHexa3Quads (qa, qe, qf)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+
+# ======================================================= test_hexa_quads_ace
+def test_hexa_quads_ace () :
+
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsACE");
+    grid = add_grid (doc, 2, 2, 2)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qb)
+    doc.removeQuad (qc)
+    doc.removeQuad (qf)
+    vtk.save ()
+
+    doc.addHexa3Quads (qa, qd, qe)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+# ======================================================= test_hexa_quads_abcd
+def test_hexa_quads_abcd () :
+
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsABCD");
+    grid = add_grid (doc, 3, 1, 3)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qc)
+    doc.removeQuad (qd)
+    vtk.save ()
+
+    doc.addHexa4Quads (qa, qb, qe, qf)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+# ======================================================= test_hexa_quads_abce
+def test_hexa_quads_abce () :
+
+    doc  = hexablock.addDocument()
+    vtk  = FileVtk (doc, "HexaQuadsABCE");
+    grid = add_grid (doc, 3, 2, 2)
+    vtk.save ()
+
+    hexa = grid.getHexaIJK (1,0,1)
+
+    qa = hexa.getQuad (0)
+    qb = hexa.getQuad (1)
+    qc = hexa.getQuad (2)
+    qd = hexa.getQuad (3)
+    qe = hexa.getQuad (4)
+    qf = hexa.getQuad (5)
+
+    doc.removeQuad (qc)
+    doc.removeQuad (qb)
+    vtk.save ()
+
+    doc.addHexa4Quads (qa, qd, qe, qf)
+    vtk.save ()
+
+    doc.removeElements (grid)
+    vtk.save ()
+
+
+# ================================================================= Begin
+
+test_hexa_quads_5  ()
+test_hexa_quads_ab ()
+test_hexa_quads_ac ()
+test_hexa_quads_acd ()
+test_hexa_quads_ace ()
+test_hexa_quads_abcd ()
+test_hexa_quads_abce ()
diff --git a/src/TEST_PY/test_unit/revolution.py b/src/TEST_PY/test_unit/revolution.py
new file mode 100644 (file)
index 0000000..cc210a1
--- /dev/null
@@ -0,0 +1,144 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+# ================================================================= save_schema
+class FileVtk :
+    def __init__ (self, doc, radical):
+        self.document = doc
+        self.count    = 0
+        self.radical  = radical
+
+    def save (self) :
+        """
+        sauvegarde vtk du modele de bloc
+        """
+        self.count += 1
+        file_name = os.path.join(self.radical + str(self.count) + '.vtk')
+        self.document.saveVtk(file_name)
+
+# ======================================================= make_grid
+def make_grid (doc, nr, na, nl) :
+
+    ori  = doc.addVertex ( 0, 0, 0)
+    vx   = doc.addVector ( 1 ,0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+
+    dr = 1
+    da = 360
+    dl = 1
+
+    grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)
+    return grid
+
+
+# ========================================================== test_revolution
+def test_revolution () :
+    doc  = hexablock.addDocument ("default")
+    vtk  = FileVtk (doc, "Revolution");
+    nr = 1
+    na = 6
+    nl = 1
+    grid = make_grid (doc, nr, na, nl)
+    vtk.save ()
+
+    liste = [ ]
+    for nx in range (nr) :
+        for ny in range (na) :
+            cell = grid.getQuadIJ (nx, ny, nl)
+            print " ... cell = ", cell
+            liste.append (cell);
+
+    center = doc.addVertex (0, -10, 0);
+    axis   = doc.addVector (1, 0, 0);
+    angles = [5, 10, 15, 20, 30, 20, 15, 10, 5 ]
+
+    vtk.save ()
+    bloc = doc.revolutionQuads  (liste, center, axis, angles);
+    vtk.save ()
+    return doc
+
+# ========================================================== test_prism
+def test_prism () :
+    doc  = hexablock.addDocument("prism")
+    vtk  = FileVtk (doc, "prism");
+    nr = 1
+    na = 6
+    nl = 1
+    grid = make_grid (doc, nr, na, nl)
+    vtk.save ()
+
+    liste = [ ]
+    for nx in range (nr) :
+        for ny in range (na) :
+            cell = grid.getQuadIJ (nx, ny, nl)
+            print " ... cell = ", cell
+            liste.append (cell);
+
+    axis = doc.addVector (1, 1, 1);
+
+    bloc = doc.prismQuads  (liste, axis, 3)
+    vtk.save ()
+    return doc
+
+# ========================================================== test_prism
+def test_prism_vec () :
+    doc  = hexablock.addDocument("prism_vec")
+    vtk  = FileVtk (doc, "prism_vec");
+    nr = 1
+    na = 6
+    nl = 1
+    grid = make_grid (doc, nr, na, nl)
+    vtk.save ()
+
+    liste = [ ]
+    for nx in range (nr) :
+        for ny in range (na) :
+            cell = grid.getQuadIJ (nx, ny, nl)
+            print " ... cell = ", cell
+            liste.append (cell);
+
+    axis = doc.addVector (1, 1, 1);
+    hauteurs = [1, 3, 7, 15]
+
+    bloc = doc.prismQuadsVec (liste, axis, hauteurs, 0)
+    vtk.save ()
+    return doc
+
+# ================================================================= Begin
+
+###  doc = test_revolution ()
+###  doc = test_prism ()
+doc = test_prism_vec ()
+
+law = doc.addLaw("Uniform", 3)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
+
diff --git a/src/TEST_PY/test_unit/test_asso_lines.py b/src/TEST_PY/test_unit/test_asso_lines.py
new file mode 100644 (file)
index 0000000..c4b44bf
--- /dev/null
@@ -0,0 +1,185 @@
+# -*- coding: latin-1 -*-\r
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Association par lignes\r
+\r
+import hexablock\r
+import os\r
+import geompy\r
+\r
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8\r
+#\r
+#   .             ed_nord1     ed_nord2\r
+#   .          v_nw        v_n         v_ne\r
+#              v9          v10         v11\r
+#   1           +----e18----+----e19----+\r
+#   .           |           |           |\r
+#   .           |           |           |\r
+#   0 ed_west  e13          o          e17  ed_est\r
+#   .           |           |           |\r
+#   .           |           |           |\r
+#  -1           +----e14----+----e16----+\r
+#   .          v6          v10          v8\r
+#   .          v_sw        v_s          v_se\r
+#   .              ed_sud1     ed_sud2\r
+#   .\r
+#   +..........-2...........0...........2...............\r
+\r
+global  ed_west, ed_est, ed_nord1, ed_nord2, ed_sud1, ed_sud2\r
+global  v_sw, v_s , v_se, v_nw, v_n , v_ne\r
+global  p_w, p_e, p_n, p_s, p_n1, p_n2, p_s1, p_s2, p_nw, p_sw, p_ne, p_se\r
+global  arc_s, arc_e, arc_n, arc_w, arc_n1, arc_n2, arc_s1, arc_s2\r
+\r
+\r
+# ======================================================= init_globale\r
+def init_globale (name) :\r
+\r
+    global  ed_west, ed_est, ed_nord1, ed_nord2, ed_sud1, ed_sud2\r
+    global  v_sw, v_s , v_se, v_nw, v_n , v_ne\r
+    global  p_w, p_e, p_n, p_s, p_n1, p_n2, p_s1, p_s2, p_nw, p_sw, p_ne, p_se\r
+    global  arc_s, arc_e, arc_n, arc_w, arc_n1, arc_n2, arc_s1, arc_s2\r
+\r
+    nom  = name\r
+    doc  = hexablock.addDocument (nom)\r
+\r
+    orig = doc.addVertex (-2, -1, -1)\r
+    vx   = doc.addVector (2,0,0)\r
+    vy   = doc.addVector (0,2,0)\r
+    vz   = doc.addVector (0,0,2)\r
+    grid = doc.makeCartesian  (orig, vx, vy, vz, 2, 1, 1) \r
+\r
+    nz = 1\r
+    vz = 1.0\r
+\r
+    ed_west  = grid.getEdgeJ (0, 0, nz)\r
+    ed_est   = grid.getEdgeJ (2, 0, nz)\r
+    ed_nord1 = grid.getEdgeI (0, 1, nz)\r
+    ed_nord2 = grid.getEdgeI (1, 1, nz)\r
+    ed_sud1  = grid.getEdgeI (0, 0, nz)\r
+    ed_sud2  = grid.getEdgeI (1, 0, nz)\r
+\r
+    v_sw    = grid.getVertexIJK (0, 0, nz)\r
+    v_s     = grid.getVertexIJK (1, 0, nz)\r
+    v_se    = grid.getVertexIJK (2, 0, nz)\r
+\r
+    v_nw    = grid.getVertexIJK (0, 1, nz)\r
+    v_n     = grid.getVertexIJK (1, 1, nz)\r
+    v_ne    = grid.getVertexIJK (2, 1, nz)\r
+\r
+    doc.saveVtk (nom + ".vtk");\r
+    ## ______________________________________________________________ Geom\r
+\r
+    p_w   = geompy.MakeVertex (-2.55,  0, vz)\r
+    p_e   = geompy.MakeVertex ( 2.55,  0, vz)\r
+    p_n   = geompy.MakeVertex ( 0,  2.0, vz)\r
+    p_s   = geompy.MakeVertex ( 0, -2.0, vz)\r
+\r
+    p_n1  = geompy.MakeVertex ( 0.5,  2.0, vz)\r
+    p_n2  = geompy.MakeVertex (-0.5,  2.0, vz)\r
+    p_s1  = geompy.MakeVertex (-0.5, -2.0, vz)\r
+    p_s2  = geompy.MakeVertex ( 0.5, -2.0, vz)\r
+\r
+    p_nw  = geompy.MakeVertex (-2,  1, vz)\r
+    p_sw  = geompy.MakeVertex (-2, -1, vz)\r
+    p_ne  = geompy.MakeVertex ( 2,  1, vz)\r
+    p_se  = geompy.MakeVertex ( 2, -1, vz)\r
+\r
+    arc_s = geompy.MakeArc (p_sw, p_s, p_se)\r
+    arc_e = geompy.MakeArc (p_se, p_e, p_ne)\r
+    arc_n = geompy.MakeArc (p_ne, p_n, p_nw)\r
+    arc_w = geompy.MakeArc (p_nw, p_w, p_sw)\r
+\r
+    arc_n1 = geompy.MakeArc (p_ne, p_n1, p_n)\r
+    arc_n2 = geompy.MakeArc (p_n,  p_n2, p_nw)\r
+    arc_s1 = geompy.MakeArc (p_sw, p_s1, p_s)\r
+    arc_s2 = geompy.MakeArc (p_s,  p_s2, p_se)\r
+\r
+    return doc\r
+\r
+# ======================================================= test_asso_mano\r
+def test_asso_mano () :\r
+\r
+    doc = init_globale ("asso_mano")\r
+\r
+    ed_west.addAssociation (arc_w, 0, 1)\r
+    ed_est .addAssociation (arc_e, 0, 1)\r
+\r
+    v_n.setAssociation (p_n)\r
+    ed_nord2.addAssociation (arc_n1, 0.0, 1.0)\r
+    ed_nord1.addAssociation (arc_n2, 0.0, 1.0)\r
+\r
+    v_s.setAssociation (p_s)\r
+    ##  ed_sud1.addAssociation (arc_s, 0.0, 0.5)\r
+    ##  ed_sud2.addAssociation (arc_s, 0.5, 1.0)\r
+\r
+    ed_sud1.addAssociation (arc_s1, 0.0, 1.0)\r
+    ed_sud2.addAssociation (arc_s2, 0.0, 1.0)\r
+\r
+    return doc\r
+\r
+# ======================================================= test_asso_closed\r
+def test_asso_closed () :\r
+\r
+    doc = init_globale ("asso_closed")\r
+\r
+    les_edges = [ ed_sud1, ed_sud2, ed_est, ed_nord1, ed_nord2,  ed_west ]\r
+    les_arcs  = [ arc_s1,  arc_s2,  arc_e,  arc_n1,   arc_n2,    arc_w ]\r
+\r
+    doc.associateClosedLine (v_sw, les_edges[0], les_edges[1:], \r
+                                   les_arcs [0], 0.0, False, les_arcs[1:])\r
+    return doc\r
+\r
+# ======================================================= test_asso_closed_inv\r
+def test_asso_closed_inv () :\r
+\r
+    doc = init_globale ("asso_closed_inv")\r
+\r
+    les_edges = [ ed_sud1, ed_sud2, ed_est, ed_nord1, ed_nord2,  ed_west ]\r
+    les_arcs  = [ arc_s1,  arc_s2,  arc_e,  arc_n1,   arc_n2,    arc_w ]\r
+\r
+    doc.associateClosedLine (v_s , les_edges[0], les_edges[1:], \r
+                                   les_arcs [0], 1.0, True, les_arcs[1:])\r
+    return doc\r
+\r
+# ======================================================= test_asso_opened\r
+def test_asso_opened () :\r
+\r
+    doc = init_globale ("asso_opened")\r
+\r
+    les_edges = [ ed_sud2, ed_est, ed_nord2 ]\r
+    les_arcs  = [ arc_s,   arc_e,  arc_n ]\r
+\r
+    doc.associateOpenedLine (les_edges[0], les_edges[1:], \r
+                             les_arcs [0], 0.5, les_arcs[1:], 0.5)\r
+    return doc\r
+\r
+# ================================================================= Begin\r
+\r
+doc = test_asso_closed_inv  ()\r
+\r
+law = doc.addLaw("Uniform", 3)\r
+\r
+for j in range(doc.countPropagation()):\r
+    propa = doc.getPropagation(j)\r
+    propa.setLaw(law) \r
+\r
+mesh_hexas = hexablock.mesh (doc)\r
+\r
+\r
diff --git a/src/TEST_PY/test_unit/test_bugs.py b/src/TEST_PY/test_unit/test_bugs.py
new file mode 100644 (file)
index 0000000..4d93705
--- /dev/null
@@ -0,0 +1,128 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= bug_quad2
+def bug_quad2 () :
+
+    doc  = hexablock.addDocument ("default")
+
+    ori  = doc.addVertex ( 0, 0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+    vx   = doc.addVector ( 1 ,0, 0)
+
+    dr = 1;
+    dl = 1;
+    phi = 360;
+    nr = 1;
+    na = 8;
+    nl = 1;
+
+    c1 = doc.makeCylindrical (ori, vx,vz,dr, phi,dl, nr,na,nl, False);
+    nvtk = 0;
+    nom = "bugs_hexas";
+    doc.saveVtk ("bugs_hexa_ab1.vtk")
+
+    qa = c1.getQuadJK (0, 0, 0);
+    qb = c1.getQuadJK (0, 4, 0);
+    hexa = doc.addHexa2Quads (qa, qb);
+
+    doc.setFile (nom);
+    doc.saveFile ();
+    doc.saveVtk ("bugs_hexa_ab2.vtk")
+    return doc
+
+# ======================================================= bug_quad3
+def bug_quad3 () :
+
+    doc  = hexablock.addDocument("quad3")
+
+    ori  = doc.addVertex ( 0, 0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+    vx   = doc.addVector ( 1 ,0, 0)
+
+    dr = 1;
+    dl = 1;
+    phi = 360;
+    nr = 1;
+    na = 8;
+    nl = 1;
+
+    c1 = doc.makeCylindrical (ori, vx,vz,dr, phi,dl, nr,na,nl, False);
+    nvtk = 0;
+    nom = "bugs_hexas";
+    doc.saveVtk ("bugs_hexa_acd1.vtk")
+
+    qc = c1.getQuadJK (0, 0, 0);
+    qa = c1.getQuadJK (0, 1, 0);
+    qd = c1.getQuadJK (0, 2, 0);
+
+    hexa = doc.addHexa3Quads (qa, qc, qd);
+
+    doc.setFile (nom);
+    doc.saveFile ();
+    doc.saveVtk ("bugs_hexa_acd2.vtk")
+    return doc
+
+
+# ======================================================= bug_quad3
+def bug_quad1 () :
+
+    doc  = hexablock.addDocument("quad1")
+    centre     = doc.addVertex(0, 0, 0)
+    vecteur_px = doc.addVector(1, 0, 0)
+    vecteur_pz = doc.addVector(0, 0, 1)
+
+    grille = doc.makeCylindrical(centre, vecteur_px, vecteur_pz,  1, 360, 1,  3, 8, 1,  False)
+
+    quad_1 = grille.getQuadIK(0, 1, 0)
+    quad_5 = grille.getQuadIK(0, 5, 0)
+
+    quad_1 = grille.getQuadJK(0, 1, 0)
+    quad_5 = grille.getQuadJK(0, 4, 0)
+    quad_1.setScalar (5)
+
+    doc.saveVtk ("bugs_hexa_ab1.vtk")
+    doc.addHexa2Quads(quad_1, quad_5)
+    doc.saveVtk ("bugs_hexa_ab2.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = bug_quad1  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
diff --git a/src/TEST_PY/test_unit/test_carre.py b/src/TEST_PY/test_unit/test_carre.py
new file mode 100644 (file)
index 0000000..e28a256
--- /dev/null
@@ -0,0 +1,68 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_croix
+def test_croix () :
+
+    nom  = "test_croix"
+    doc  = hexablock.addDocument(nom)
+    doc.setLevel (1)
+    nvtk = 0
+
+    ori = doc.addVertex ( 0, 0, 0)
+    vz  = doc.addVector ( 0, 0, 1)
+    vx  = doc.addVector ( 1 ,0, 0)
+
+    dr    = 1.0
+    angle = 360.0
+    dl    = 1.0
+
+    nr = 1
+    na = 4
+    nl = 5
+    fill = True
+
+    grid = doc.makeCylindrical (ori, vx, vz, dr, angle, dl, nr, na, nl, fill)
+
+    doc.saveVtk ("carre.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_croix  ()
+###  doc = test_pipes  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc)
+muv, mue, muq, muh = hexablock.dump(doc, mesh_hexas)
diff --git a/src/TEST_PY/test_unit/test_cross.py b/src/TEST_PY/test_unit/test_cross.py
new file mode 100644 (file)
index 0000000..05b2e28
--- /dev/null
@@ -0,0 +1,89 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_pipes
+def test_pipes () :
+
+    doc  = hexablock.addDocument ("default")
+
+    ori1 = doc.addVertex ( 0, 0, 0)
+    ori2 = doc.addVertex (-5, 0, 5)
+    vz   = doc.addVector ( 0, 0, 1)
+    vx   = doc.addVector ( 1 ,0, 0)
+
+    nr1 = 2
+    ni1 = 1
+    nl1 = 10
+    nr2 = 1
+    ni2 = 0.5
+    nl2 = 10
+
+    pipe1 = doc.addPipe   (ori1, vz, ni1, nr1, nl1)
+    pipe2 = doc.addPipe   (ori2, vx, ni2, nr2, nl2)
+    grid  = doc.makePipes (pipe1, pipe2)
+
+    doc.saveVtk ("pipes.vtk")
+    return doc
+
+
+# ======================================================= test_croix
+def test_croix () :
+
+    doc  = hexablock.addDocument ("default")
+
+    ori1 = doc.addVertex ( 0, 0, 0)
+    ori2 = doc.addVertex (-5, 0, 5)
+    vz   = doc.addVector ( 0, 0, 1)
+    vx   = doc.addVector ( 1 ,0, 0)
+
+    nr1 = 2
+    nl1 = 10
+    nr2 = 1
+    nl2 = 10
+
+    cyl1 = doc.addCylinder (ori1, vz, nr1, nl1)
+    cyl2 = doc.addCylinder (ori2, vx, nr2, nl2)
+    grid = doc.makeCylinders (cyl1, cyl2)
+    ###  grid = doc.makePipes (cyl1, cyl2)
+
+    doc.saveVtk ("croix.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_pipes  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
+
diff --git a/src/TEST_PY/test_unit/test_cuve.py b/src/TEST_PY/test_unit/test_cuve.py
new file mode 100644 (file)
index 0000000..16f2f68
--- /dev/null
@@ -0,0 +1,71 @@
+# -*- coding: latin-1 -*-\r
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+\r
+# Francis KLOSS - 2011-2012 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France\r
+# =============================================================================================\r
+\r
+import hexablock\r
+\r
+doc = hexablock.addDocument("cuve")\r
+\r
+# Construire la grille cylindrique\r
+# --------------------------------\r
+\r
+centre = doc.addVertex(0, 0, 0)\r
+\r
+vecteur_px = doc.addVector(1, 0, 0)\r
+vecteur_pz = doc.addVector(0, 0, 1)\r
+\r
+grille = doc.makeCylindrical(centre, vecteur_px, vecteur_pz,  1, 360, 1,  3, 8, 1,  False)\r
+\r
+# Ajouter le centre\r
+# -----------------\r
+\r
+quad_0 = grille.getQuadJK(0, 0, 0)\r
+quad_6 = grille.getQuadJK(0, 6, 0)\r
+quad_7 = grille.getQuadJK(0, 7, 0)\r
+\r
+hexa_a = doc.addHexa3Quads(quad_0, quad_6, quad_7)\r
+\r
+quad_2 = grille.getQuadJK(0, 2, 0)\r
+quad_3 = grille.getQuadJK(0, 3, 0)\r
+quad_4 = grille.getQuadJK(0, 4, 0)\r
+\r
+hexa_b = doc.addHexa3Quads(quad_2, quad_3, quad_4)\r
+\r
+quad_1 = grille.getQuadJK(0, 1, 0)\r
+quad_5 = grille.getQuadJK(0, 5, 0)\r
+\r
+quad_a = hexa_a.getQuad(1)\r
+quad_b = hexa_b.getQuad(1)\r
+\r
+hexa_c = doc.addHexa4Quads(quad_1, quad_a, quad_5, quad_b)\r
+\r
+\r
+law = doc.addLaw("Uniform", 3)\r
+\r
+for j in range(doc.countPropagation()):\r
+    propa = doc.getPropagation(j)\r
+    propa.setLaw(law) \r
+\r
+mesh_hexas = hexablock.mesh (doc)\r
+\r
+\r
diff --git a/src/TEST_PY/test_unit/test_cylinders.py b/src/TEST_PY/test_unit/test_cylinders.py
new file mode 100644 (file)
index 0000000..ef33272
--- /dev/null
@@ -0,0 +1,69 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_cylindricals
+def test_cylindricals () :
+
+    doc  = hexablock.addDocument ("rind:hexas")
+
+    orig = doc.addVertex (0, 0, 0)
+    vz   = doc.addVector (0, 0, 1)
+    vx   = doc.addVector (1 ,0, 0)
+
+
+    tdr = [ 1, 2, 0.5 ]
+    tda = [ 30, 30, 30, 10, 10, 10,  10, 10, 10,  10, 10, 10, 
+            30, 30, 30, 10, 10, 10,  10, 10, 10,  10, 10, 10 ]
+    tdl = [ 1, 2, 3  ]
+
+    tdr = [ 1, 1, 1, 1 ]
+    tda = [ 45, 45,  45, 45,  45, 45,  45, 45 ]
+    tdl = [ 1, 1, 1  ]
+
+
+    c1 = doc.makeCylindricals (orig, vx,vz, tdr, tda, tdl, False)
+    ## c1 = doc.makeCylindrical (orig, vx,vz, 1.0, 360.0, 1.0, 3, 8, 3, False)
+
+
+    doc.saveVtk ("cylindricals.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_cylindricals  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc)
+
+
diff --git a/src/TEST_PY/test_unit/test_disco.py b/src/TEST_PY/test_unit/test_disco.py
new file mode 100644 (file)
index 0000000..0d53e73
--- /dev/null
@@ -0,0 +1,68 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+# ======================================================= test_disco_edges
+def test_disco_edges () :
+
+    nom  = "test_disco_edges"
+    doc  = hexablock.addDocument(nom)
+    doc.setLevel (0)
+
+    ori = doc.addVertex ( 0, 0, 0)
+    vz  = doc.addVector ( 0, 0, 1)
+    vy  = doc.addVector ( 0, 1, 1)
+    vx  = doc.addVector ( 1 ,0, 0)
+
+    size_x = 2
+    size_y = 2
+    size_z = 5
+
+    grid = doc.makeCartesian (ori, vx, vy, vz, size_x, size_y, size_z)
+
+    t_hexas = []
+    t_edges = []
+    
+    for nk in range (size_z) :
+        t_hexas.append (grid.getHexaIJK (1,1,nk))
+        t_edges.append (grid.getEdgeK   (1,2,nk))
+
+    disco_edges =  doc.disconnectEdges (t_hexas, t_edges)
+    return doc
+
+# ================================================================= Begin
+
+doc = test_disco_edges  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc)
+muv, mue, muq, muh = hexablock.dump(doc, mesh_hexas)
diff --git a/src/TEST_PY/test_unit/test_double_t.py b/src/TEST_PY/test_unit/test_double_t.py
new file mode 100644 (file)
index 0000000..d02fca6
--- /dev/null
@@ -0,0 +1,166 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_double_t
+def test_double_t () :
+
+    doc  = hexablock.addDocument ("default")
+
+    ori1 = doc.addVertex ( 0, 0, 0)
+    ori2 = doc.addVertex (-5, 0, 5)
+    ori3 = doc.addVertex ( 0, 0, 12)
+    ori4 = doc.addVertex (-5, 0, 17)
+
+    vx   = doc.addVector ( 1 ,0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+
+    nl1 = 10
+    nl2 = 10
+
+    rsmall = 1
+    rmoy   = 2
+    rbig   = 3
+
+    cyl1  = doc.addCylinder (ori1, vz, rbig, nl1)
+    cyl2  = doc.addCylinder (ori2, vx, rmoy, nl2)
+
+    cyl3  = doc.addCylinder (ori3, vz, rbig, nl1)
+    cyl4  = doc.addCylinder (ori4, vx, rmoy, nl2)
+
+    grid1 = doc.makeCylinders (cyl1, cyl2)
+    grid2 = doc.makeCylinders (cyl4, cyl3)
+
+    nx_int = 0
+    nx_ext = 1
+    cyl_big   = 1
+    cyl_small = 0
+    S_E     = 0
+    S_NE    = 1
+    S_N     = 2
+    S_NW    = 3
+    S_MAXI  = 8
+                  ##    Cyl       i     j     k
+    qb = grid1. getQuadIJ (cyl_big, nx_ext, S_E, 4)
+    qh = grid2. getQuadIJ (cyl_big, nx_ext, S_E, 0) 
+
+    vb0 = grid1.getVertexIJK (cyl_big, 2, S_E,  4)  ## cible
+    vb1 = grid1.getVertexIJK (cyl_big, 2, S_NE, 4)
+    vh0 = grid2.getVertexIJK (cyl_big, 2, S_E,  0)   ## depart
+    vh1 = grid2.getVertexIJK (cyl_big, 2, S_NE, 0)
+
+    hliste = []
+
+    hliste.append (qh)
+    for ny in range (S_MAXI) :
+        if ny != S_E :
+          hliste.append (grid2.getQuadIJ (cyl_big, nx_ext, ny, 0)) 
+
+    for ny in range (4) :
+        hliste.append (grid2.getQuadIJ (cyl_big, nx_int, ny, 0)) 
+
+    hauteur = 3
+    doc.joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, hauteur)
+
+    doc.saveVtk ("double_t.vtk")
+    return doc
+
+# ======================================================= test_lorraine
+def test_lorraine () :
+
+    doc  = hexablock.addDocument ("default")
+
+    ori1 = doc.addVertex ( 0, 0, 0)
+    ori2 = doc.addVertex (-5, 0, 5)
+    ori3 = doc.addVertex ( 0, 0, 12)
+    ori4 = doc.addVertex (-5, 0, 17)
+
+    vx   = doc.addVector ( 1 ,0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+
+    nl1 = 10
+    nl2 = 10
+
+    rsmall = 1
+    rmoy   = 3
+    rbig   = 5
+
+    cyl1  = doc.addCylinder (ori1, vz, rmoy,   nl1)
+    cyl2  = doc.addCylinder (ori2, vx, rsmall, nl2)
+
+    cyl3  = doc.addCylinder (ori3, vz, rmoy, nl1)
+    cyl4  = doc.addCylinder (ori4, vx, rbig, nl2)
+
+    grid1 = doc.makeCylinders (cyl1, cyl2)
+    grid2 = doc.makeCylinders (cyl4, cyl3)
+
+    nx_int = 0
+    nx_ext = 1
+    cyl_big   = 1
+    cyl_small = 0
+    S_E     = 0
+    S_NE    = 1
+    S_N     = 2
+    S_NW    = 3
+    S_MAXI  = 8
+                  ##    Cyl       i     j     k
+    qb = grid1. getQuadIJ (cyl_big,   nx_ext, S_E, 4)
+    qh = grid2. getQuadIJ (cyl_small, nx_ext, S_N, 0) 
+
+    vb0 = grid1.getVertexIJK (cyl_big,   2, S_E,  4)  ## cible
+    vb1 = grid1.getVertexIJK (cyl_big,   2, S_NE, 4)
+    vh0 = grid2.getVertexIJK (cyl_small, 2, S_N,  0)   ## depart
+    vh1 = grid2.getVertexIJK (cyl_small, 2, S_NW, 0)
+
+    hliste = []
+
+    hliste.append (qh)
+    for ny in range (S_MAXI) :
+        if ny != S_N :
+          hliste.append (grid2.getQuadIJ (cyl_small, nx_ext, ny, 0)) 
+
+    for ny in range (4) :
+        hliste.append (grid2.getQuadIJ (cyl_small, nx_int, ny, 0)) 
+
+    hauteur = 3
+    doc.joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, hauteur)
+
+    doc.saveVtk ("lorraine.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_lorraine  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
diff --git a/src/TEST_PY/test_unit/test_piquage.py b/src/TEST_PY/test_unit/test_piquage.py
new file mode 100644 (file)
index 0000000..30ecee3
--- /dev/null
@@ -0,0 +1,99 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_pipes
+def test_piquage () :
+
+    doc  = hexablock.addDocument ("default")
+
+    orig = doc.addVertex ( 0, 0, 0)
+    vx   = doc.addVector ( 1 ,0, 0)
+    vy   = doc.addVector ( 0, 1, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+
+    size_x = 3
+    size_y = 3
+    size_z = 3
+
+    grid = doc.makeCartesian (orig, vx, vy, vz, size_x, size_y, size_z)
+
+    c1 = grid.getVertexIJK (1, 2, size_z)
+    c2 = grid.getVertexIJK (1, 1, size_z)
+    c3 = grid.getVertexIJK (2, 1, size_z)
+
+    pa1 = doc.addVertex (-1, -1, 0)
+    pb1 = doc.addVertex ( 1, -1, 0)
+    pc1 = doc.addVertex ( 1,  1, 0)
+    pd1 = doc.addVertex (-1,  1, 0)
+
+    pa2 = doc.addVertex (-2, -2, 0)
+    pb2 = doc.addVertex ( 2, -2, 0)
+    pc2 = doc.addVertex ( 2,  2, 0)
+    pd2 = doc.addVertex (-2,  2, 0)
+
+    edab1 = doc.addEdge (pa1, pb1)
+    edbc1 = doc.addEdge (pb1, pc1)
+    edcd1 = doc.addEdge (pc1, pd1)
+    edda1 = doc.addEdge (pd1, pa1)
+
+    edab2 = doc.addEdge (pa2, pb2)
+    edbc2 = doc.addEdge (pb2, pc2)
+    edcd2 = doc.addEdge (pc2, pd2)
+    edda2 = doc.addEdge (pd2, pa2)
+
+    edaa = doc.addEdge (pa1, pa2)
+    edbb = doc.addEdge (pb1, pb2)
+    edcc = doc.addEdge (pc1, pc2)
+    eddd = doc.addEdge (pd1, pd2)
+
+    qpattern = []
+    qpattern.append (doc.addQuad (edab1, edbc1, edcd1, edda1))
+    qpattern.append (doc.addQuad (edab1, edbb,  edab2, edaa))
+    qpattern.append (doc.addQuad (edbc1, edcc,  edbc2, edbb))
+    qpattern.append (doc.addQuad (edcd1, eddd,  edcd2, edcc))
+    qpattern.append (doc.addQuad (edda1, edaa,  edda2, eddd))
+
+    doc.saveVtk ("replace0.vtk")
+
+    doc.replace (qpattern, pd2,c1, pa2,c2, pb2,c3)
+
+    doc.saveVtk ("replace1.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_piquage  ()
+
+law = doc.addLaw("Uniform", 0)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
diff --git a/src/TEST_PY/test_unit/test_rind.py b/src/TEST_PY/test_unit/test_rind.py
new file mode 100644 (file)
index 0000000..4f656ed
--- /dev/null
@@ -0,0 +1,126 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_sphere
+def test_sphere () :
+
+    doc  = hexablock.addDocument ("default")
+
+    center  = doc.addVertex (0,0,0)
+    radius  = 8
+    orig    = doc.addVertex (0,0,0)
+    vz      = doc.addVector (0,0,1)
+    vx      = doc.addVector (1,0,0)
+    radhole = 1
+    nrad    = 3
+    nang    = 16
+    nhaut   = 8
+
+    doc.makeSphere (center, vx, vz, radius, radhole, orig, nrad, nang, nhaut)
+    doc.saveVtk ("Rind1.vtk")
+    return doc
+
+# ======================================================= test_part_sphere
+def test_part_sphere () :
+
+    doc  = hexablock.addDocument ("default")
+
+    center  = doc.addVertex (0,0,0)
+    radius  = 8
+    orig    = doc.addVertex (0,0,-4)
+    vz      = doc.addVector (0,0,1)
+    vx      = doc.addVector (1,0,0)
+    angle   = 90
+    radhole = 1
+    nrad    = 3
+    nang    = 4
+    nhaut   = 8
+
+    doc.makePartSphere (center, vx, vz, radius, radhole, orig, angle, 
+                        nrad, nang, nhaut)
+    doc.saveVtk ("Rind2.vtk")
+    return doc
+
+# ======================================================= test_rind
+def test_rind () :
+
+    doc  = hexablock.addDocument ("default")
+
+    center  = doc.addVertex (0,0,0)
+    radius  = 8
+    radint  = 7
+    orig    = doc.addVertex (0,0,0)
+    vz      = doc.addVector (0,0,1)
+    vx      = doc.addVector (1,0,0)
+    radhole = 1
+    nrad    = 3
+    nang    = 16
+    nhaut   = 8
+
+    doc.makeRind (center, vx, vz, radius, radint, radhole, orig, 
+                  nrad, nang, nhaut)
+    doc.saveVtk ("Rind3.vtk")
+    return doc
+
+# ======================================================= test_part_rind
+def test_part_rind () :
+
+    doc  = hexablock.addDocument ("default")
+
+    center  = doc.addVertex (0,0,0)
+    radius  = 8
+    radint  = 7
+    orig    = doc.addVertex (0,0,0)
+    vz      = doc.addVector (0,0,1)
+    vx      = doc.addVector (1,0,0)
+    angle   = 90
+    radhole = 1
+    nrad    = 3
+    nang    = 14
+    nhaut   = 8
+
+    doc.makePartRind (center, vx, vz, radius, radint, radhole, orig, angle,
+                      nrad, nang, nhaut)
+    doc.saveVtk ("Rind4.vtk")
+    return doc
+
+# ================================================================= Begin
+
+##test_sphere  ()
+##test_part_sphere  ()
+doc = test_part_rind  ()
+##test_rind  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "rind:hexas")
diff --git a/src/TEST_PY/test_unit/test_sphere.py b/src/TEST_PY/test_unit/test_sphere.py
new file mode 100644 (file)
index 0000000..8bbd723
--- /dev/null
@@ -0,0 +1,56 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= test_sphere
+def test_sphere () :
+
+    doc  = hexablock.addDocument ("rind")
+
+    center   = doc.addVertex (0,0,0)
+    radius   = 1
+    ncouches = 1
+    k        = 1
+
+    doc.makeSpherical (center, radius, ncouches, k)
+    doc.saveVtk ("Sphere.vtk")
+    return doc
+
+# ================================================================= Begin
+
+doc = test_sphere  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc)
+
+
diff --git a/src/TEST_PY/test_unit/test_transfo.py b/src/TEST_PY/test_unit/test_transfo.py
new file mode 100644 (file)
index 0000000..a67b9d8
--- /dev/null
@@ -0,0 +1,125 @@
+# -*- coding: latin-1 -*-
+# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Hexa : Creation d'hexaedres 
+
+import hexablock
+import os
+import geompy
+
+#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+
+
+# ======================================================= make_grid
+def make_grid (doc) :
+
+    ori  = doc.addVertex ( 0, 0, 0)
+    vz   = doc.addVector ( 0, 0, 1)
+    vx   = doc.addVector ( 1 ,0, 0)
+
+    dr = 1
+    da = 360
+    dl = 1
+
+    nr = 1
+    na = 6
+    nl = 1
+    grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)
+    doc .saveVtk ("transfo1.vtk")
+    return grid
+
+# ======================================================= test_translation
+def test_translation () :
+
+    doc  = hexablock.addDocument ("default")
+    grid = make_grid (doc)
+
+    devant = doc.addVector (10, 0, 0)
+    grid2  = doc.makeTranslation (grid, devant)
+
+    doc .saveVtk ("transfo2.vtk")
+    return doc
+
+# ======================================================= test_scale
+def test_scale () :
+
+    doc  = hexablock.addDocument ("default")
+    grid = make_grid (doc)
+
+    dest   = doc.addVertex (15, 0, 0)
+    grid2  = doc.makeScale (grid, dest, 0.5)
+
+    doc .saveVtk ("transfo3.vtk")
+    return doc
+
+# ======================================================= test_sym_point
+def test_sym_point () :
+
+    doc  = hexablock.addDocument ("default")
+    grid = make_grid (doc)
+
+    orig  = doc.addVertex (5, 0, 0)
+    grid2 = doc.makeSymmetryPoint (grid, orig)
+
+    doc .saveVtk ("transfo4.vtk")
+    return doc
+
+# ======================================================= test_sym_line
+def test_sym_line () :
+
+    doc  = hexablock.addDocument ("default")
+    grid = make_grid (doc)
+
+    orig  = doc.addVertex (5, 0, 0)
+    dir   = doc.addVector (0, 0, 1);
+    grid2 = doc.makeSymmetryLine (grid, orig, dir)
+
+    doc .saveVtk ("transfo5.vtk")
+    return doc
+
+# ======================================================= test_sym_plan
+def test_sym_plan () :
+
+    doc  = hexablock.addDocument ("default")
+    grid = make_grid (doc)
+
+    orig  = doc.addVertex (5, 0, 0)
+    dir   = doc.addVector (1, 0, 0);
+    grid2 = doc.makeSymmetryPlane (grid, orig, dir)
+
+    doc .saveVtk ("transfo6.vtk")
+    return doc
+
+# ================================================================= Begin
+
+### doc = test_translation  ()
+doc = test_scale  ()
+### doc = test_sym_point  ()
+### doc = test_sym_line  ()
+### doc = test_sym_plan  ()
+
+law = doc.addLaw("Uniform", 4)
+
+for j in range(doc.countPropagation()):
+    propa = doc.getPropagation(j)
+    propa.setLaw(law) 
+
+mesh_hexas = hexablock.mesh(doc, "maillage:hexas")
+
diff --git a/src/TEST_PY/tuyau.brep b/src/TEST_PY/tuyau.brep
new file mode 100755 (executable)
index 0000000..ec768b0
--- /dev/null
@@ -0,0 +1,426 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 0
+Curve2ds 28
+1 0 0 0 1 
+1 0 0 0 1 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+1 0 0 1 0 
+1 0 0 1 0 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 0 0 0 1 
+1 0 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+1 0 -0 6.1232339957367759e-17 -1 
+1 0 -0 6.1232339957367759e-17 -1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+Curves 16
+7 1 0  7 8 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1
+ 0 8 1 8
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 -0.62831853071801369  3.1478202812511471 -3.1478202812511471 -1.2566370068591419  2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  -1.2775986014289811 1.2775986014289811 -2.1687580291316819  -2.3723834259351833 2.3723834259351833 -1.7988274783396521  -3.1478202812517777 3.1478202812517777 -1.256637006859245  -3.5355339059326556 3.5355339059326556 -0.62831853071798205  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 1 0  7 8 2  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1
+ 0 8 1 8
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 -1.4137166941154202  75.000000000003425 15.993478879707238 -2.8274332654334842  74.999999999990621 16.98044886550209 -4.0473618262637086  75.000000000018389 18.373882457535071 -4.8797055655472787  74.999999999974861 19.999999999996184 -5.1762440277824107  75.00000000002386 21.626117542471153 -4.879705565547396  74.999999999984084 23.019551134494474 -4.047361826263554  75.000000000007219 24.006521120294067 -2.8274332654335823  74.999999999998124 24.499999999999748 -1.4137166941153954  75.000000000000014 24.5 -1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 0.62831853071801369  3.1478202812511471 -3.1478202812511471 1.2566370068591419  2.3723834259365431 -2.3723834259365431 1.7988274783398068  1.2775986014269276 -1.2775986014269276 2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  -1.2775986014289811 1.2775986014289811 2.1687580291316819  -2.3723834259351833 2.3723834259351833 1.7988274783396521  -3.1478202812517777 3.1478202812517777 1.256637006859245  -3.5355339059326556 3.5355339059326556 0.62831853071798205  -3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 1.4137166941154202  75.000000000003425 15.993478879707238 2.8274332654334842  74.999999999990621 16.98044886550209 4.0473618262637086  75.000000000018389 18.373882457535071 4.8797055655472787  74.999999999974861 19.999999999996184 5.1762440277824107  75.00000000002386 21.626117542471153 4.879705565547396  74.999999999984084 23.019551134494474 4.047361826263554  75.000000000007219 24.006521120294067 2.8274332654335823  74.999999999998124 24.499999999999748 1.4137166941153954  75.000000000000014 24.5 1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 0.70710678118654757 0 
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 -0.50265482457439326  2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1.0220788811419279 -1.0220788811419279 -1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  -1.0220788811427488 1.0220788811427488 -1.73500642330558  -1.8979067407484411 1.8979067407484411 -1.4390619826715594  -2.5182562250012874 2.5182562250012874 -1.0053096054874726  -2.8284271247461601 2.8284271247461601 -0.50265482457436672  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+1 -3.5355339059327378 3.5355339059327378 -2.4492935982947064e-16 0.70710678118654757 -0.70710678118654757 4.8985871965894125e-17 
+7 1 0  7 8 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1
+ 0 8 1 8
+7 1 0  7 8 2  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1
+ 0 8 1 8
+7 0 0  10 11 2  75 16.399999999999999 4.4408920985006262e-16  74.999999999999105 16.399999999999604 -1.1309733552923305  75.000000000003425 16.79478310376723 -2.2619466123468186  74.999999999990621 17.584359092398095 -3.2378894610108695  75.000000000018389 18.699105966034271 -3.9037644524379904  74.999999999974861 19.999999999989107 -4.1409952222257402  75.00000000002386 21.300894033984143 -3.9037644524380775  74.999999999984084 22.415640907590802 -3.2378894610107412  75.000000000007219 23.205216896237388 -2.261946612346911  74.999999999998124 23.599999999999262 -1.1309733552923047  75.000000000000014 23.600000000000001 2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 0.50265482457439326  2.5182562250010312 -2.5182562250010312 1.0053096054873778  1.8979067407489889 -1.8979067407489889 1.4390619826717084  1.0220788811419279 -1.0220788811419279 1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  -1.0220788811427488 1.0220788811427488 1.73500642330558  -1.8979067407484411 1.8979067407484411 1.4390619826715594  -2.5182562250012874 2.5182562250012874 1.0053096054874726  -2.8284271247461601 2.8284271247461601 0.50265482457436672  -2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 16.399999999999999 -4.4408920985006262e-16  74.999999999999105 16.399999999999604 1.1309733552923305  75.000000000003425 16.79478310376723 2.2619466123468186  74.999999999990621 17.584359092398095 3.2378894610108695  75.000000000018389 18.699105966034271 3.9037644524379904  74.999999999974861 19.999999999989107 4.1409952222257402  75.00000000002386 21.300894033984143 3.9037644524380775  74.999999999984084 22.415640907590802 3.2378894610107412  75.000000000007219 23.205216896237388 2.261946612346911  74.999999999998124 23.599999999999262 1.1309733552923047  75.000000000000014 23.600000000000001 -2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+1 75 15.5 2.7554552980815448e-16 0 1 -6.1232339957367759e-17 
+1 75 24.5 -8.2663658942446333e-16 0 -1 1.8369701987210317e-16 
+Polygon3D 0
+PolygonOnTriangulations 0
+Surfaces 8
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 -0.62831853071801369  1 9.604885542379284 5.6779402750195667 -0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 -1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 -0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 -2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 -1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 -1.4137166941154204  1 74.999999999999105 15.49999999999994 -1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 -1.2566370068591419  1 9.2729214810444986 6.0754899681670214 -1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 -2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 -0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 -4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 -2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 -2.8274332654334846  1 75.000000000003425 15.993478879707238 -2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1 8.6089851336806884 6.8705992041127821 -2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 -2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 -1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 -6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 -3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 -4.0473618262637086  1 74.999999999990621 16.98044886550209 -4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1 7.6716200438365361 7.9931580809223801 -2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 -3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 -1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 -8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 -3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 -4.8797055655472787  1 75.000000000018389 18.373882457535071 -4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  1 6.5777280744114703 9.3031686135167266 -2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 -3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 -1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 -8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 -4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 -5.1762440277824107  1 74.999999999974861 19.999999999996184 -5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 -2.1687580291316819  1 5.4838361049540145 10.613179146115629 -2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 -3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 -1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 -8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 -3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 -4.879705565547396  1 75.00000000002386 21.626117542471153 -4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 -1.7988274783396521  1 4.5464710151344043 11.735738022921637 -2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 -2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 -1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 -6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 -3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 -4.047361826263554  1 74.999999999984084 23.019551134494474 -4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 -1.256637006859245  1 3.8825346677568429 12.530847258869537 -1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 -2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 -0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 -4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 -2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 -2.8274332654335819  1 75.000000000007219 24.006521120294067 -2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 -0.62831853071798205  1 3.5505706064273257 12.928396952016087 -0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 -1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 -0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 -2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 -1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 -1.4137166941153956  1 74.999999999998124 24.499999999999748 -1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 -1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 -2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 0.62831853071801369  1 9.604885542379284 5.6779402750195667 0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 1.4137166941154204  1 74.999999999999105 15.49999999999994 1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 1.2566370068591419  1 9.2729214810444986 6.0754899681670214 1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 2.8274332654334846  1 75.000000000003425 15.993478879707238 2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 1.7988274783398068  1 8.6089851336806884 6.8705992041127821 2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 4.0473618262637086  1 74.999999999990621 16.98044886550209 4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 2.1687580291315651  1 7.6716200438365361 7.9931580809223801 2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 4.8797055655472787  1 75.000000000018389 18.373882457535071 4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  1 6.5777280744114703 9.3031686135167266 2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 5.1762440277824107  1 74.999999999974861 19.999999999996184 5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 2.1687580291316819  1 5.4838361049540145 10.613179146115629 2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 4.879705565547396  1 75.00000000002386 21.626117542471153 4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 1.7988274783396521  1 4.5464710151344043 11.735738022921637 2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 4.047361826263554  1 74.999999999984084 23.019551134494474 4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 1.256637006859245  1 3.8825346677568429 12.530847258869537 1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 2.8274332654335819  1 75.000000000007219 24.006521120294067 2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 0.62831853071798205  1 3.5505706064273257 12.928396952016087 0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 1.4137166941153956  1 74.999999999998124 24.499999999999748 1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 -1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 -1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 1.5086264655892687e-15  1 75.000000000000014 24.5 1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 0.70710678118654757 0 -0 0 -1 
+1 75 15.5 2.7554552980815448e-16 -1 0 0 0 0 -1 -0 -1 -0 
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 -0.70710678118654757 -0 -0.70710678118654757 0.70710678118654757 -0 -0 0 1 
+1 75 15.5 -2.7554552980815448e-16 -1 -0 -0 -0 -0 1 -0 -1 0 
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 -0.50265482457439326  1 9.0159805468328216 6.4281751612018621 -0.58553428033384047  1 17.777778499971209 15.165580394865655 -0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 -0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 -1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 -0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 -1.1309733552923305  1 74.999999999999105 16.399999999999604 -1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1 8.7505280572964637 6.7462367156950842 -1.1710685098071594  1 17.602833142044837 15.553363260898562 -1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 -0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 -3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 -1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 -2.2619466123468186  1 75.000000000003425 16.79478310376723 -2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1 8.2196165014000666 7.3823677049416423 -1.676339470317372  1 17.252938091745996 16.328938600612986 -2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 -0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 -5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 -2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 -3.2378894610108699  1 74.999999999990621 17.584359092398095 -3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 -1.7350064233054643  1 7.4700597701643572 8.2804763628600888 -2.021080247871553  1 16.758945849069651 17.423918941557226 -2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 -1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 -6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 -3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 -3.9037644524379909  1 75.000000000018389 18.699105966034271 -3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  1 6.5953375324381369 9.3285566244738707 -2.1439007788875823  1 16.182463800463946 18.701745707871858 -3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 -1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 -7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 -3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 -4.1409952222257402  1 74.999999999974861 19.999999999989107 -4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 -1.73500642330558  1 5.7206152947181215 10.376636886096147 -2.0210802478716676  1 15.605981751912061 19.97957247426147 -2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 -1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 -6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 -3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 -3.9037644524380779  1 75.00000000002386 21.300894033984143 -3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 -1.4390619826715594  1 4.9710585634781923 11.274745544008159 -1.6763394703172221  1 15.111989509197203 21.074552815149307 -2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 -0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 -5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 -2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 -3.2378894610107416  1 74.999999999984084 22.415640907590802 -3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 -1.0053096054874726  1 4.4401470075837057 11.910876533258277 -1.1710685098072586  1 14.762094458918183 21.850128154895057 -1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 -0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 -3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 -1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 -2.261946612346911  1 75.000000000007219 23.205216896237388 -2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 -0.50265482457436672  1 4.1746945180467883 12.228938087750157 -0.58553428033381372  1 14.587149100984806 22.237911020916648 -0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 -0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 -1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 -0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 -1.1309733552923047  1 74.999999999998124 23.599999999999262 -1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 -2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 -5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 -1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 -4.4408920985006262e-16  1 75 16.399999999999999 -4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 0.50265482457439326  1 9.0159805468328216 6.4281751612018621 0.58553428033384047  1 17.777778499971209 15.165580394865655 0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 1.1309733552923305  1 74.999999999999105 16.399999999999604 1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 1.0053096054873778  1 8.7505280572964637 6.7462367156950842 1.1710685098071594  1 17.602833142044837 15.553363260898562 1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 2.2619466123468186  1 75.000000000003425 16.79478310376723 2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 1.4390619826717084  1 8.2196165014000666 7.3823677049416423 1.676339470317372  1 17.252938091745996 16.328938600612986 2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 3.2378894610108699  1 74.999999999990621 17.584359092398095 3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 1.7350064233054643  1 7.4700597701643572 8.2804763628600888 2.021080247871553  1 16.758945849069651 17.423918941557226 2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 3.9037644524379909  1 75.000000000018389 18.699105966034271 3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  1 6.5953375324381369 9.3285566244738707 2.1439007788875823  1 16.182463800463946 18.701745707871858 3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 4.1409952222257402  1 74.999999999974861 19.999999999989107 4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 1.73500642330558  1 5.7206152947181215 10.376636886096147 2.0210802478716676  1 15.605981751912061 19.97957247426147 2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 3.9037644524380779  1 75.00000000002386 21.300894033984143 3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 1.4390619826715594  1 4.9710585634781923 11.274745544008159 1.6763394703172221  1 15.111989509197203 21.074552815149307 2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 3.2378894610107416  1 74.999999999984084 22.415640907590802 3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 1.0053096054874726  1 4.4401470075837057 11.910876533258277 1.1710685098072586  1 14.762094458918183 21.850128154895057 1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 2.261946612346911  1 75.000000000007219 23.205216896237388 2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 0.50265482457436672  1 4.1746945180467883 12.228938087750157 0.58553428033381372  1 14.587149100984806 22.237911020916648 0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 1.1309733552923047  1 74.999999999998124 23.599999999999262 1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 -2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 -5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 -2.141842990487521e-16  1 75.000000000000014 23.600000000000001 -2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+Triangulations 0
+
+TShapes 42
+Ve
+1.00000011584738e-07
+3.53553390593274 -3.53553390593274 0
+0 0
+
+0101101
+*
+Ve
+2.00001022062862e-07
+75 15.5 -6.88863824520386e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 1
+2  1 1 0 0 1
+2  2 2 0 0 1
+0
+
+0101000
++42 0 -41 0 *
+Ve
+2.00001005003195e-07
+-3.53553390593273 3.53553390593274 -7.40818758532816e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  2 0 0 3.14159265358979
+2  3 1 0 0 3.14159265358979
+2  4 3 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ve
+2.00001041588069e-07
+75 24.5 2.06659147356116e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 1
+2  5 1 0 0 1
+2  6 2 0 0 1
+0
+
+0101000
++39 0 -37 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 3.14159265358979
+2  7 1 0 0 3.14159265358979
+2  8 4 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +38 0 +36 0 -35 0 *
+Fa
+1  1e-07 1 0
+
+0111000
++34 0 *
+Ed
+ 1e-07 1 1 0
+1  5 0 0 3.14159265358979
+2  3 2 0 0 3.14159265358979
+2  9 5 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 3.14159265358979
+2  7 2 0 0 3.14159265358979
+2  10 6 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +32 0 +36 0 -31 0 *
+Fa
+1  1e-07 2 0
+
+0111000
++30 0 *
+Ve
+1.00000003092948e-07
+2.82842712474619 -2.82842712474619 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 1
+2  11 3 0 0 1
+2  12 5 0 0 1
+0
+
+0101000
++42 0 -28 0 *
+Ve
+2.000010012582e-07
+-2.82842712474619 2.82842712474619 9.68596121552874e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  8 0 0 3.14159265358979
+2  13 7 0 0 3.14159265358979
+2  14 3 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0 1
+2  15 3 0 0 1
+2  16 5 0 0 1
+0
+
+0101000
++39 0 -26 0 *
+Wi
+
+0101000
++38 0 -27 0 -25 0 +24 0 *
+Fa
+0  1e-07 3 0
+
+0111000
+-23 0 *
+Ve
+2.00001030198519e-07
+75 16.4 -5.51091059616309e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  10 0 0 1
+2  17 7 0 0 1
+2  18 8 0 0 1
+0
+
+0101000
++28 0 -21 0 *
+Ve
+2.00001064344293e-07
+75 23.5999999999999 1.65327317884893e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 0 1
+2  19 7 0 0 1
+2  20 8 0 0 1
+0
+
+0101000
++26 0 -19 0 *
+Ed
+ 1e-07 1 1 0
+1  12 0 0 3.14159265358979
+2  21 7 0 0 3.14159265358979
+2  22 4 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +25 0 +18 0 -17 0 *
+Fa
+1  1e-07 7 0
+
+0111000
++16 0 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0 3.14159265358979
+2  13 8 0 0 3.14159265358979
+2  23 5 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 3.14159265358979
+2  21 8 0 0 3.14159265358979
+2  24 6 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +14 0 +18 0 -13 0 *
+Fa
+1  1e-07 8 0
+
+0111000
++12 0 *
+Wi
+
+0101000
++32 0 -27 0 -14 0 +24 0 *
+Fa
+0  1e-07 5 0
+
+0111000
+-10 0 *
+Ed
+ 1e-07 1 1 0
+1  15 0 0 0.899999999999999
+2  25 4 0 0 0.899999999999999
+2  26 6 0 0 0.899999999999999
+0
+
+0101000
++41 0 -21 0 *
+Ed
+ 1e-07 1 1 0
+1  16 0 0 0.899999999999999
+2  27 4 0 0 0.899999999999999
+2  28 6 0 0 0.899999999999999
+0
+
+0101000
++37 0 -19 0 *
+Wi
+
+0101000
++35 0 -8 0 -17 0 +7 0 *
+Fa
+0  1e-07 4 0
+
+0111000
+-6 0 *
+Wi
+
+0101000
++31 0 -8 0 -13 0 +7 0 *
+Fa
+0  1e-07 6 0
+
+0111000
+-4 0 *
+Sh
+
+0101100
++33 0 -29 0 +22 0 -15 0 +11 0 -9 0 -5 0 +3 0 *
+So
+
+1100000
++2 0 *
+
++1 0 
\ No newline at end of file