Salome HOME
Merge branch occ/shape_reparation_2
authorvsr <vsr@opencascade.com>
Wed, 28 Jan 2015 15:16:24 +0000 (18:16 +0300)
committervsr <vsr@opencascade.com>
Wed, 28 Jan 2015 15:23:03 +0000 (18:23 +0300)
36 files changed:
1  2 
doc/salome/examples/CMakeLists.txt
doc/salome/gui/GEOM/input/creating_explode.doc
doc/salome/gui/GEOM/input/dependency_tree.doc
doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc
doc/salome/gui/GEOM/input/tui_test_all.doc
idl/GEOM_Gen.idl
resources/GEOMCatalog.xml.in
src/AdvancedEngine/AdvancedEngine_IOperations.cxx
src/EntityGUI/EntityGUI.cxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GEOM_Displayer.h
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMGUI/GEOM_msg_fr.ts
src/GEOMGUI/GEOM_msg_ja.ts
src/GEOMImpl/GEOMImpl_HealingDriver.cxx
src/GEOMImpl/GEOMImpl_IHealing.hxx
src/GEOMImpl/GEOMImpl_IHealingOperations.cxx
src/GEOMImpl/GEOMImpl_IHealingOperations.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOMUtils/GEOMUtils.cxx
src/GEOMUtils/GEOMUtils.hxx
src/GEOM_I/GEOM_IShapesOperations_i.cc
src/GEOM_I/GEOM_IShapesOperations_i.hh
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_I/GEOM_Object_i.hh
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_SWIG/GEOM_TestAll.py
src/GEOM_SWIG/geomBuilder.py
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/RepairGUI/RepairGUI_FreeFacesDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.cxx
src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx
src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx

index f21bae342270b65b18bd1f65b246598518f62bae,74a84d124ddf57004bb67f7eb4f7e99f2758ff79..d42f84ef5a779475265a2cf3fa9c4b67a6b2fd53
@@@ -37,9 -37,11 +37,11 @@@ SET(GOOD_TEST
    basic_geom_objs_ex07.py  
    basic_geom_objs_ex08.py  
    basic_geom_objs_ex09.py  
+   basic_geom_objs_ex10.py  
    basic_operations_ex01.py  
    basic_operations_ex02.py  
    basic_operations_ex03.py  
+   basic_operations_ex04.py  
    basic_properties.py  
    blocks_operations_ex01.py  
    blocks_operations_ex02.py  
@@@ -64,7 -66,8 +66,8 @@@
    complex_objs_ex07.py  
    complex_objs_ex08.py  
    complex_objs_ex09.py  
-   complex_objs_ex10.py  
+   complex_objs_ex10.py
+   fast_intersection.py
    free_boundaries.py  
    free_faces.py  
    GEOM_box.py  
@@@ -74,7 -77,6 +77,7 @@@
    min_distance.py  
    normal_face.py  
    notebook_geom.py  
 +  polyline.py
    point_coordinates.py  
    primitives_ex01.py  
    primitives_ex02.py  
    transformation_operations_ex11.py  
    transformation_operations_ex12.py  
    transformation_operations_ex13.py  
+   transformation_operations_ex14.py  
    viewing_geom_objs_ex01.py  
    viewing_geom_objs_ex02.py  
    viewing_geom_objs_ex03.py  
index 65a813eb2205ff7b08503a3a9e1ff7580d7da306,6caf20df12b9275f058ac9f177a2e9ccef3409de..c25b719ae4545df649247c7e4442441d8a3d4a05
@@@ -2,49 -2,96 +2,96 @@@
  
  \page create_explode_page Explode
  
- \n To \b Explode an object into sub-shapes, in the <b>Main Menu</b>
- select <b>New Entity > Explode</b>.
+ To \b Explode an object into sub-shapes, in the <b>Main Menu</b>
+ select <b>New Entity > Explode</b>. This operation opens the
+ <b>Sub Shapes Selection</b> dialog box.
  
- \n To create a list of  sub-shapes (vertices, edges, wires etc.) of the
+ \image html neo-obj1.png
+ To create a list of  sub-shapes (vertices, edges, wires etc.) of the
  given shape using the \b Explode operation, you need to define the <b>Main
  Object</b>, which will be exploded and the <b>Type of Sub-shapes</b> you wish to
  obtain from it.
- \n The \b Result of the operation will be a List of \b GEOM_Objects
+ The \b Result of the operation will be a List of \b GEOM_Objects
  (vertexes, edges, wires, faces, shells or solids).
  
- \n Using <b>TUI Commands</b> you can perform this operation in a
+ Available choices in the <b>Sub Shapes Type</b> combo box depend on the type
+ of selected <b>Main Object</b>:
+ - \b Compound: to extract compounds;
+ - \b Compsolid: to extract compsolids;
+ - \b Solid: to extract solids;
+ - \b Shell: to extract shells;
+ - \b Face: to extract faces;
+ - \b Wire: to extract wires;
+ - \b Edge: to extract edges;
+ - \b Vertex: to extract vertices;
+ - \b Shape: to extract top-level contents of the compound shape;
+ - \b Flat: to extract "flat" contents of the compound shape.
+ Note: "flat" contents means top-level simple-type sub-shapes extracted from
+ the compound object recursively (i.e. there is no compounds in the result).
+ For example, if a compound C1 contains a solid S1 and another compound C2 that
+ contains solids S2 and S3 (see picture below):
+ - Explode operation with \b Shape type given as parameter will return S1 and C2;
+ - Explode operation with \b Flat type given as parameter will return S1, S2 and S3.
+ \image html flat_contents.png
+ Switching on <b>Select Sub-shapes</b> check box allows manual selection of sub-shapes
+ to be extracted from the main object. In this mode the user can select sub-shapes
+ directly in 3D viewer.
+ When <b>Select Sub-shapes</b> check box is switched on, additional \b Filter controls
+ allow to automatically pick up entites which satisfy specified threshold value(s).
+ The numerical functor for each sub-shape that is compared with threshold value(s)
+ is computed according to the shape's topological properties:
+ - length for edges and wires
+ - area for faces and shells
+ - volume for solids, compounds, compsolids
+ Filtering capabilities are not available for vertices.
+ In order to filter out some entities:
+ - Activate one or two filtering controls by switching on corresponding check boxes;
+ - Select required threshold comparator type; the following choices are available:
+   - <b>Less Than</b> or <b>Equal or Less Than</b> for the first comparator;
+   - <b>Greater Than</b> or <b>Equal or Greater Than</b> for the second comparator;
+ - Enter required threshold value (values);
+ - Press \b Apply button in the \b Filter group.
+ The entities which satisfy entered filtering parameters will be automatically highlighted
+ in the 3D viewer.
+ Using <b>TUI Commands</b> you can perform this operation in a
  variety of ways:
- <ul>
- <li><em>geompy.ExtractShapes(Shape, Type, isSorted)</em> explodes a
- Shape into sub-shapes of a given Type and returns a List of sub-shapes.
- This method does not return the Shape itself if it matches the
- Type.</li>
- <li><em>geompy.SubShapeAll(Shape, Type)</em> explodes a Shape on
- sub-shapes of a given Type and returns a List of sub-shapes.</li>
- <li><em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape on
- sub-shapes of a given Type and returns a List of IDs of
- sub-shapes.</li>
- <li><em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
- shape on sub-shapes of a given type and sorts them taking into account
- their gravity centers, to provide a stable order of sub-shapes.
- It returns a list of sub-shapes.</li>
- <li><em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
- a shape on sub-shapes of a given type and sorts them taking into
- account their gravity centers, to provide a stable order of sub-shapes.
- It returns a List of IDs of sub-shapes.</li>
- <li><em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
- a compound of sub-shapes of  the Shape,  selected by they indices in a
- list of all sub-shapes of the given Type. Each index is in the range
- [1, Nb_Sub-Shapes_Of_Given_Type].</li>
- <li><em>geompy.SubShapeSortedCentres(Shape, Type, ListOfInd)</em>
- allows to obtain a compound of sub-shapes of the Shape, selected by
- they indices in sorted list of all sub-shapes of the given Type. Each
- index is in the range [1, Nb_Sub-Shapes_Of_Given_Type]</li>
- </ul>
- \n <b>Arguments: </b>1 SHAPE + 1 type of SubShape.
+ - <em>geompy.ExtractShapes(Shape, Type, isSorted)</em> explodes a
+   Shape into sub-shapes of a given Type and returns a List of sub-shapes.
+   This method does not return the Shape itself if it matches the
+   Type.
+ - <em>geompy.SubShapeAll(Shape, Type)</em> explodes a Shape on
+   sub-shapes of a given Type and returns a List of sub-shapes.
+ - <em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape on
+   sub-shapes of a given Type and returns a List of IDs of
+   sub-shapes.
+ - <em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
+   shape on sub-shapes of a given type and sorts them taking into account
 -  their gravity centers, to provide stable order of sub-shapes.
++  their gravity centers, to provide a stable order of sub-shapes.
+   It returns a list of sub-shapes.
+ - <em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
+   a shape on sub-shapes of a given type and sorts them taking into
 -  account their gravity centers, to provide stable order of sub-shapes.
++  account their gravity centers, to provide a stable order of sub-shapes.
+   It returns a List of IDs of sub-shapes.
+ - <em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
+   a compound of sub-shapes of  the Shape,  selected by they indices in a
+   list of all sub-shapes of the given Type. Each index is in the range
+   [1, Nb_Sub-Shapes_Of_Given_Type].
+ - <em>geompy.SubShapeSortedCentres(Shape, Type, ListOfInd)</em>
+   allows to obtain a compound of sub-shapes of the Shape, selected by
+   they indices in sorted list of all sub-shapes of the given Type. Each
+   index is in the range [1, Nb_Sub-Shapes_Of_Given_Type]
  
- \image html neo-obj1.png
+ <b>Arguments: </b>1 SHAPE + 1 type of SubShape.
  
  <b>Example:</b>
  
index 9afc744bceedf7ae992f1f49fe11597d7fef95e2,15a3a76397326014f49f8f3e9382a4a18bba65a5..2f07c9bd33867c731636559d2d5908f1341e3dc9
  
  \anchor dependency_tree_general_description_anchor <h2>General description</h2>
  
 -In order to better understand the relations between the %GEOM 
 -objects in a study the user has a possibility to display the 
 -ascendants and descendant of the object(s) in a family tree.
 -
 -User can build the dependency tree by selecting desirable object 
 -in Object Browser or OCC Viewer and calling "Show dependency tree" 
 -popup item. It will open a new or clear the existing "Dependency 
 -Tree" view window (only one view is supported) and display a 
 -dependency tree for the selected object or objects (multiple 
 -selection is supported). Also user can rebuild the tree if to select 
 -some object(s) right in the "Dependency Tree" view and call 
 -"Rebuild the tree" popup menu item.
 +You can display the ascendants and descendants of object(s) in a tree structure to better understand the relations between the %GEOM 
 +objects in a study .
 +
 +To build the dependency tree, select the necessary object or objects (multiple 
 +selection is supported) in the Object Browser or OCC Viewer and call "Show dependency tree" context menu item. 
  
  \image html tree_example.png
  
 -User can change all necessary parameters of Dependency Tree Viewer 
 -in \ref pref_dependency_tree "Preferences".
 +
 +"Dependency Tree" view window will display the dependency tree for the selected object. 
 +It is also possible to select an object(s) directly in the "Dependency Tree" view and to rebuild the tree by selecting 
 +"Rebuild the tree" context menu item.
 +
 +All necessary parameters of Dependency Tree Viewer can be edited in the \ref pref_dependency_tree "Preferences".
  
  <hr>
  \anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
  Tree nodes in the Dependency Viewer are named according to the study 
  names of the corresponding objects. 
  
 -Non-published objects are shown in the tree as "unpublished" and 
 -colored in special color.
 -
 -All nodes have the fixed size, so the long names are cut and shown 
 -with ellipsis; full name of the object can be seen in the tooltip 
 -if to keep the cursor over the node.
 +All nodes have fixed size, so long names are cut; the full object name can be seen in the tooltip 
 +when the cursor is hovered over the node.
  
  "Dependency Tree" view supports the following states of nodes:
  
 -<ul><li><b>Main node</b> - node of main object(s), which were selected in Object 
 -Browser, OCC Viewer or Dependency Tree Viewer in order to build the 
 -dependency tree;</li></ul>
 +<ul><li><b>Main node</b> - corresponds to the main object(s) selected in Object 
 +Browser, OCC Viewer or Dependency Tree Viewer;</li></ul>
  \image html tree_main_node.png
  
 -<ul><li><b>Default node</b> - node of published in study object, which participate in building of 
 -dependency tree as ascendant or descendant;</li></ul>
 +<ul><li><b>Default node</b> - ascendant or descendant node of the dependency tree corresponding to an object published in the study;</li></ul>
  \image html tree_default_node.png
  
 -<ul><li><b>Unpublished node</b> - the same as "Default node", but 
 -corresponding object was not published in study;</li></ul>
 +<ul><li><b>Unpublished node</b> - corresponds to an object that was not published in the study;</li></ul>
  \image html tree_unpublished_node.png
  
 -<ul><li><b>Highlighted node</b> - the state of node when mouse 
 -cursor is over it;</li></ul>
 +<ul><li><b>Highlighted node</b> - the state of a node when the mouse cursor is hovered over it;</li></ul>
  \image html tree_highlighted_node.png
  
 -<ul><li><b>Selected node</b> - the state of node when user 
 -clicks the left mouse button on node.</li></ul>
 +<ul><li><b>Selected node</b> - the state of node when the user clicks the left mouse button it.</li></ul>
  \image html tree_selected_node.png
  
  <hr>
  \anchor dependency_tree_links_anchor <h2>Links</h2>
  
  Dependency Tree Viewer shows oriented links between nodes to 
 -represent dependency direction. Viewer supports the following states 
 -of links:
 +represent the dependency direction. The viewer supports the following states of links:
  
 -<ul><li><b>Unidirectional link</b> - shows that A object depends on 
 -B object;</li></ul>
 +<ul><li><b>Unidirectional link</b> - shows that object B depends on object A;</li></ul>
  \image html tree_unidir_link.png
  
 -<ul><li><b>Bidirectional link</b> - shows that A object depends on 
 -B object and, at the same time, B object depends on 
 -A object;</li></ul>
 +<ul><li><b>Bidirectional link</b> - shows that object B depends on 
 +object A and, at the same time, object A depends on object B;</li></ul>
  \image html tree_bidir_link.png
  
 -<ul><li><b>Self-dependency link</b> - shows that object depends on 
 -itself;</li></ul>
 +<ul><li><b>Self-dependency link</b> - shows that an object depends on itself;</li></ul>
  \image html tree_selfdep_link.png
  
 -<ul><li><b>Cyclic dependency links</b> - shows cyclic dependency of 
 -some nodes.</li></ul>
 +<ul><li><b>Cyclic dependency links</b> - shows cyclic dependency of some nodes.</li></ul>
  \image html tree_cycldep_link.png
  
  <hr>
 -\anchor dependency_tree_operations_anchor <h2>Operations</h2>
 +\anchor dependency_tree_operations_anchor <h2>Viewer Operations</h2>
  
  The dependency tree of a chosen %GEOM object is displayed in 
  the dedicated 2D view window.
@@@ -86,9 -103,10 +86,9 @@@ Buttons marked with small downward tria
  functionality which can be accessed by locking on them with left 
  mouse button.
  
- \image tree_tool_bar
+ \image html tree_tool_bar.png
  
 -<b>Dump View</b> - exports an object from the viewer in bmp, png or
 -jpeg image format.
 +<b>Dump View</b> - exports the current scene in bmp, png or jpeg image format.
  \image html tree_view_dump.png
  
  <b>Fit all</b> - scales the presentation so that it could fit within
@@@ -122,32 -140,38 +122,32 @@@ levels to be shown in the dependency tr
  <ul>
  <li>Level 1 corresponds to the parents and children of the selected 
  object(s);</li>
 -<li>Level 2 is Level 1 plus the grand-parents and grand-children 
 +<li>Level 2 adds the grand-parents and grand-children 
  of the selected object(s);</li>
  <li>etc...</li>
  </ul>
  
 -<b>Display ascendants</b> - allows user to control the displaying 
 -of ascendants.
 +<b>Display ascendants</b> - allows showing/hiding the ascendants.
  \image html tree_disp_ascendants.png
  
 -<b>Display descendants</b> - allows user to control the displaying 
 -of descendants.
 +<b>Display descendants</b> - allows showing/hiding the descendants.
  \image html tree_disp_descendants.png
  
 -<b>Move nodes</b> - enables/disables of moving the nodes.
 +<b>Move nodes</b> -if checked, it is possible to move nodes in the viewer.
  \image html tree_move_nodes.png
  
 -<b>Update</b> - allows user to update a dependency tree model and the view.
 +<b>Update</b> - updates the dependency tree view, reflecting changes introduced in the hierarchy.
  \image html tree_button_update.png
  
  <hr>
 -\anchor dependency_tree_navigation_anchor <h2>Navigation</h2>
 -
 -Dependency Tree 2D Viewer supports the following navigation mode:
 +\anchor dependency_tree_navigation_anchor <h2>Selection and Shortcuts</h2>
  
  <ul>
 -<li>rectangle selection in this mode is performed by the left mouse 
 -button</li>;
 -<li>multiple selection is available when \b Shift button 
 +<li>It is possible to select multiple nodes in the view by rectangle selection or by clicking nodes when \b Shift button 
  is pressed.</li>
  </ul>
  
 -Also, holding \b Ctrl key with pressed mouse buttons performs 
 +Holding \b Ctrl key with pressed mouse buttons performs 
  the following view transformations:
  <ul>
  <li>Ctrl + left mouse button - zooming;</li>
  </ul>
  
  <hr>
 -\anchor dependency_tree_popup_menu_anchor <h2>Popup Menu</h2>
 +\anchor dependency_tree_popup_menu_anchor <h2>Context Menu</h2>
  
 -After the object has appeared in the Dependency Tree 2D Viewer, 
 -user can select it with left mouse click to change its presentation 
 -parameters and get access to other useful options by right-clicking on 
 -the selected object.
 +The following operations are available from the context menu of the selected object.
  
  \image html tree_popup_menu1.png
  
  <ul>
 -<li>\b Show - allows to show selected object(s) in OCC 3D Viewer;</li>
 -<li><b> Show Only</b> - allows to show only selected object(s) 
 -in OCC 3D Viewer;</li>
 -<li><b> Rebuild the tree</b> - allows to rebuild the dependency tree 
 +<li>\b Show - shows the selected object(s) in OCC 3D Viewer;</li>
 +<li><b> Show Only</b> - shows only the selected object(s) in OCC 3D Viewer;</li>
 +<li><b> Rebuild the tree</b> - rebuilds the dependency tree 
  for selected object(s);</li>
 -<li>\ref reduce_study_page "Reduce study" - allows to reduce study.</li>
 -</ul>
 -
 -Some functionalities are available through right-clicking on 
 -the viewer background:
 +<li>\ref reduce_study_page "Reduce study" - allows reducing the study.</li>
  
  \image html tree_popup_menu2.png
  
 -Dependency Tree 2D Viewer background can be customized using the 
 -"Change background" popup menu command that opens standard 
 -"Select Color" dialog box:
 -
 -\image html selectcolor.png
 +<li>It is also possible to customize the background of Dependency Tree 2D Viewer using the 
 +corresponding context menu command.</li>  
 +</ul>
  
  */
index d7edb52275f6ecb6ff587fe8b72b2fb8e58526e4,2083bcc461cf3cb4493b01b2c2ca2fc8750c105d..4d141752b629aebf3ec4754fea8bc30feb58b436
  <br><h2>Creation of a Local Coordinate System</h2>
  \tui_script{basic_geom_objs_ex09.py}
  
+ \anchor tui_creation_surface
+ <br><h2>Creation of a Surface From Face</h2>
+ \tui_script{basic_geom_objs_ex10.py}
 +\anchor tui_creation_polyline
 +<br><h2>Creation of 2D Polyline</h2>
 +\tui_script{polyline.py}
 +
  */
index e2ecdac384caba56e5259f5d2e07a4dc23b4a10e,56beffc5de137abc085ccd13e4cef45f6f23419e..1718afb0043bb3d64929ae19ab9482eb3250ce7a
  \until Scale4
  
  \anchor swig_all_trsf_more
 -\until MakeOffset
 +\until MakeProjectionOnWire
  
  \anchor swig_ChangeOrientation
  \until ChangeOrientation
  
++\anchor swig_ExtendFaceEdge
++\until ExtendFace
++
++\anchor swig_SurfaceFromFace
++\until MakeSurfaceFromFace
++
  \anchor swig_ExtractShapes
  \until prism_edges
  
 +\until IDlist_f
 +
  \anchor swig_FilletChamfer
  \until End of Local operations
  
  \anchor swig_all_patterns
 -\until MultiRot2D
 +\until MultiRot2Ds
  
  \anchor swig_all_measure
  \until "CheckShape(Prism) = "
@@@ -93,9 -91,6 +99,9 @@@
  \until nameS
  
  \anchor swig_all_decompose
 +\until geompy.RestoreSubShapes(Partition1)
 +
 +\anchor swig_GetSubShapeEdgeSorted
  \until print "DONE"
  
  */
diff --combined idl/GEOM_Gen.idl
index 2917f62cfb22424241cdf8fd88611578d3366552,26412f7e5f13a276593c72c2a29fb39ba8fe3256..5ea2b1b2dc07263e04adb8b10b3336a1143b92a3
@@@ -39,7 -39,7 +39,7 @@@ module GEO
     */
    enum shape_type 
    { 
-     /*!  */
+     /*! A collection of arbitrary shapes */
      COMPOUND,
      /*! A collection of solids */ 
      COMPSOLID, 
      SOLID, 
      /*! A collection of faces connected by some edges of their wire boundaries */
      SHELL,
-     /*! Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a close wire */
+     /*! Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a closed wire */
      FACE, 
-     /*!  A sequence of edges connected by their vertices */
+     /*! A sequence of edges connected by their vertices */
      WIRE, 
      /*! Edge, a shape corresponding to a curve, and bound by a vertex at each extremity */
      EDGE, 
      /*! A zero-dimensional shape corresponding to a point in geometry */
      VERTEX,
-     /*!  */ 
-     SHAPE };
+     /*! Arbitrary shape in a Compound (used for processing of Compounds in some operations) */ 
+     SHAPE,
+     /*! Flat (top-level) contents of a Compound (used for processing of Compounds in some operations) */
+     FLAT
+     };
  
    /*!
     * \brief Marker type
     *  \brief Kind of method to find inside one main shape some sub-shapes,
     *  corresponding to other given shape (its argument)
     *
-    *  Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO()
+    *  Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO(),
+    *  TransferNames()
     */
    enum find_shape_method
    {
      /*! To be used only for multi-transformation result.
       *  Only this method can be used after multi-transformation.
       */
-     FSM_MultiTransformed
+     FSM_MultiTransformed,
+     /*! Use old GetInPlace functionality. */
+     FSM_GetInPlace_Old
    };
  
    /*!
      FDT_String
    };
  
+   /**
+    * This enumeration represents the level of checking shape on
+    * self-interference. It defines which interferferences will be checked.
+    */
+   enum si_check_level
+   {
+     SI_V_V,     // only V/V interferences
+     SI_V_E,     // V/V and V/E interferences
+     SI_E_E,     // V/V, V/E and E/E interferences
+     SI_V_F,     // V/V, V/E, E/E and V/F interferences
+     SI_E_F,     // V/V, V/E, E/E, V/F and E/F interferences
+     SI_ALL      // all interferences
+   };
  
   /*!
     * \brief Object creation parameters
    struct Parameter
    {
      string name;
-     //any value;
      string value;
    };
    typedef sequence<Parameter> Parameters;
      Parameters params;
    };
  
+   /*!
+    * \brief Reporting on shape healing
+    */
+   struct ModifInfo
+   {
+     string name;  // what changed
+     long   count; // how many times
+   };
+   typedef sequence<ModifInfo> ModifStatistics;
  
    typedef sequence<string>       string_array;
    typedef sequence<short>        short_array;
       */
      shape_type GetMaxShapeType();
  
+     /*!
+      *  \brief Returns a name of a sub-shape if the sub-shape is published in the study
+      *  \param subID - sub-shape ID
+      *  \return string - the found name or an empty string if the sub-shape does not
+      *          exits or is not published in the study
+      *
+      * \note Only sub-shapes directly retrieved (using e.g. ExtractSubShapes() or
+      *       via group creation) can be found. Also, as sub-shape can be published in the study
+      *       many times, only the first found name is returned.
+      */
+     string GetSubShapeName(in long subID);
      /*!
       *  \brief Set color of the object.
       *
                                                in double theAngle);
  
      /*!
-      *  \brief Create a filling from the given compound of contours.
-      *  \param theShape Initial shape on which to perform the feature.
-      *  \param theMinDeg a minimal degree of BSpline surface to create
-      *  \param theMaxDeg a maximal degree of BSpline surface to create
-      *  \param theTol2D a 2d tolerance to be reached
-      *  \param theTol3D a 3d tolerance to be reached
-      *  \param theNbIter a number of iteration of approximation algorithm
+      *  \brief Create a face from a given set of contours.
+      *  \param theContours either a list or a compound of edges/wires.
+      *  \param theMinDeg a minimal degree of BSpline surface to create.
+      *  \param theMaxDeg a maximal degree of BSpline surface to create.
+      *  \param theTol2D a 2d tolerance to be reached.
+      *  \param theTol3D a 3d tolerance to be reached.
+      *  \param theNbIter a number of iteration of approximation algorithm.
       *  \param theMethod Kind of method to perform filling operation.
-      *  \param theApprox Boolean indicating if result should be approximated
-      *  \return New GEOM_Object, containing the created filling surface.
+      *  \param theApprox Boolean indicating if result should be approximated.
+      *  \return New GEOM_Object (face), containing the created filling surface.
       */
-     GEOM_Object MakeFilling (in GEOM_Object theShape,
+     GEOM_Object MakeFilling (in ListOfGO theContours,
                               in long theMinDeg, in long theMaxDeg,
                               in double theTol2D, in double theTol3D,
                               in long theNbIter,
       */
      GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
  
+     /**
+      *  \brief Create a face based on surface of theFace limited by theWire.
+      *  \param theFace the face whose surface is used to create a new face.
+      *  \param theWire closed Wire build the face.
+      *  \return New GEOM_Object, containing the created face.
+      */
+     GEOM_Object MakeFaceFromSurface(in GEOM_Object theFace,
+                                     in GEOM_Object theWire);
+     /*!
+      *  \brief Create a face from a set of edges with the given constraints.
+      *  \param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
+      *         - edges should form a closed wire;
+      *         - for each edge, constraint face is optional: if a constraint face is missing
+      *           for some edge, this means that there no constraint associated with this edge.
+      *  \return New GEOM_Object, containing the created face.
+      */
+     GEOM_Object MakeFaceWithConstraints(in ListOfGO theConstraints);
      /*!
       *  \brief Create a shell from the set of faces and shells.
       *  \param theFacesAndShells List of faces and/or shells.
      GEOM_Object MakeCompound (in ListOfGO theShapes);
  
      /*!
-      *  \brief Replace coincident faces in theShape by one face.
-      *  \param theShape Initial shape.
+      *  \brief Make a solid (or solids) from connected set of faces and/or shells.
+      *  \param theFacesOrShells List of faces and/or shells.
+      *  \param isIntersect If TRUE, forces performing intersections between arguments.
+      *
+      *  \return New GEOM_Object, containing the created solid (or compound of solids).
+      */
+     GEOM_Object MakeSolidFromConnectedFaces (in ListOfGO theFacesOrShells, in boolean isIntersect);
+     
+     /*!
+      *  \brief Replace coincident faces in \a theShapes by one face.
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
       *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
-      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
+      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
       */
-     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
+     GEOM_Object MakeGlueFaces (in ListOfGO theShapes, in double theTolerance, in boolean doKeepNonSolids);
  
      /*!
-      *  Find coincident faces in theShape for possible gluing.
-      *  \param theShape Initial shape.
+      *  Find coincident faces in theShapes for possible gluing.
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
       *  \return ListOfGO
       */
-     ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
+     ListOfGO GetGlueFaces (in ListOfGO theShapes, in double theTolerance);
  
      /*!
-      *  \brief Replace coincident faces in theShape by one face
-      *  in compliance with given list of faces
-      *  \param theShape Initial shape.
+      *  \brief Replace coincident faces in \a theShapes by one face
+      *         in compliance with given list of faces
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
       *  \param theFaces List of faces for gluing.
       *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
       *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
       *                        will be glued, otherwise only the edges,
       *                        belonging to <VAR>theFaces</VAR>.
-      *  \return New GEOM_Object, containing a copy of theShape without some faces.
+      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
       */
-     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
-                                      in ListOfGO theFaces, in boolean doKeepNonSolids,
+     GEOM_Object MakeGlueFacesByList (in ListOfGO theShapes, in double theTolerance,
+                                      in ListOfGO theFaces,  in boolean doKeepNonSolids,
                                       in boolean doGlueAllEdges);
  
      /*!
-      *  \brief Replace coincident edges in theShape by one edge.
-      *  \param theShape Initial shape.
+      *  \brief Replace coincident edges in \a theShapes by one edge.
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
-      *  \return New GEOM_Object, containing a copy of theShape without coincident edges.
+      *  \return New GEOM_Object containing copies of theShapes without coincident edges.
       */
-     GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
+     GEOM_Object MakeGlueEdges (in ListOfGO theShapes, in double theTolerance);
  
      /*!
-      *  Find coincident edges in theShape for possible gluing.
-      *  \param theShape Initial shape.
+      *  Find coincident edges in \a theShapes for possible gluing.
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
       *  \return ListOfGO
       */
-     ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
+     ListOfGO GetGlueEdges (in ListOfGO theShapes, in double theTolerance);
  
      /*!
-      *  \brief Replace coincident edges in theShape by one edge
-      *  in compliance with given list of edges
-      *  \param theShape Initial shape.
+      *  \brief Replace coincident edges in \a theShapes by one edge
+      *         in compliance with given list of edges
+      *  \param theShapes Initial shapes.
       *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
       *  \param theEdges List of edges for gluing.
-      *  \return New GEOM_Object, containing a copy of theShape without some edges.
+      *  \return New GEOM_Object containing copies of theShapes without some edges.
       */
-     GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
-                                      in double theTolerance,
+     GEOM_Object MakeGlueEdgesByList (in ListOfGO theShapes,
+                                      in double   theTolerance,
                                       in ListOfGO theEdges);
  
      /*!
       */
      string GetShapeTypeString (in GEOM_Object theShape);
  
+     /*!
+      *  \brief Check if the object is a sub-object of another GEOM object.
+      *
+      *  \param theSubObject Checked sub-object (or its parent object, in case if
+      *                      \a theSubObjectIndex is non-zero).
+      *  \param theSubObjectIndex When non-zero, specifies a sub-shape index that
+      *                           identifies a sub-object within its parent specified via \a theSubObject.
+      *  \param theObject An object that is checked for ownership (or its parent object,
+      *                   in case if \a theObjectIndex is non-zero).
+      *  \param theObjectIndex When non-zero, specifies a sub-shape index that
+      *                        identifies an object within its parent specified via \a theObject.
+      *  \return TRUE, if the given object contains sub-object.
+      */
+     boolean IsSubShapeBelongsTo( in GEOM_Object theSubObject,
+                                  in long        theSubObjectIndex,
+                                  in GEOM_Object theObject,
+                                  in long        theObjectIndex);
      /*!
       *  \brief Count number of faces in the given shape.
       *  \param theShape Shape to count faces in.
                                in long        theShapeType);
  
      /*!
-      *  \brief Get all sub-shapes, shared by all shapes in the list \a theShapes.
+      *  \brief Get sub-shapes, shared by input shapes.
       *  \param theShapes Shapes to find common sub-shapes of.
       *  \param theShapeType Type of sub-shapes to be retrieved.
-      *  \return List of objects, that are sub-shapes of all given shapes.
+      *  \param theMultiShare Specifies what type of shares should be checked:
+      *         - \c TRUE: search sub-shapes from 1st input shape shared with all other input shapes;
+      *         - \c FALSE: causes to search sub-shapes shared between couples of input shapes.
+      *  \note If \a theShapes contains single compound, the shares between all possible couples of 
+      *        its top-level shapes are returned; otherwise, only shares between 1st input shape
+      *        and all rest input shapes are returned.
+      *              
+      *  \return List of all found sub-shapes.
       */
      ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
-                                    in long     theShapeType);
+                                    in long     theShapeType,
+                                  in boolean  theMultiShare);
  
      /*!
       *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
      ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
                             in GEOM_Object theShapeWhat);
  
+     /*!
+      *  \brief Resize the input edge with the new Min and Max parameters.
+      *  The input edge parameters range is [0, 1]. If theMin parameter is
+      *  negative, the input edge is extended, otherwise it is shrinked by
+      *  theMin parameter. If theMax is greater than 1, the edge is extended,
+      *  otherwise it is shrinked by theMax parameter.
+      *  \param theEdge the input edge to be resized.
+      *  \param theMin the minimal parameter value.
+      *  \param theMax the maximal parameter value.
+      *  \return a newly created edge.
+      */
+     GEOM_Object ExtendEdge(in GEOM_Object theEdge,
+                            in double      theMin,
+                            in double      theMax);
+     /*!
+      *  \brief Resize the input face with the new UMin, UMax, VMin and VMax
+      *  parameters. The input face U and V parameters range is [0, 1]. If
+      *  theUMin parameter is negative, the input face is extended, otherwise
+      *  it is shrinked along U direction by theUMin parameter. If theUMax is
+      *  greater than 1, the face is extended, otherwise it is shrinked along
+      *  U direction by theUMax parameter. So as for theVMin, theVMax and
+      *  V direction of the input face.
+      *  \param theFace the input face to be resized.
+      *  \param theUMin the minimal U parameter value.
+      *  \param theUMax the maximal U parameter value.
+      *  \param theVMin the minimal V parameter value.
+      *  \param theVMax the maximal V parameter value.
+      *  \return a newly created face.
+      */
+     GEOM_Object ExtendFace(in GEOM_Object theFace,
+                            in double      theUMin,
+                            in double      theUMax,
+                            in double      theVMin,
+                            in double      theVMax);
+     /*!
+      *  \brief Make a surface from a face. This function takes some face as
+      *  input parameter and creates new GEOM_Object, i.e. topological shape
+      *  by extracting underlying surface of the source face and limiting it
+      *  by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
+      *  parametrical space).
+      *  \param theFace the input face.
+      *  \return a newly created face.
+      */
+     GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace);
 +    /*!
 +     * \brief Explode a shape into edges sorted in a row from a starting point.
 +     * \param theShape - the shape to be exploded on edges.
 +     * \param theStartPoint - the starting point.
 +     * \return Ordered list of edges sorted in a row from a starting point.
 +     */
 +    ListOfGO GetSubShapeEdgeSorted (in GEOM_Object theShape,
 +                                    in GEOM_Object theStartPoint);
 +
    };
  
   // # GEOM_IBlocksOperations: 
       *  - The glue between two quadrangle faces should be applied.
       *    \note Single block is also accepted as a valid compound of blocks.
       *  \param theCompound The compound to check.
 +     *  \param theToleranceC1 the tolerance to check if two neighbor edges are
 +     *         collinear in the common vertex with this tolerance. Negative
 +     *         value means that C1 criterion is not used (old implementation).
       *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
       *  \return TRUE, if the given shape is a compound of blocks.
       */
      boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
 +                                   in double      theToleranceC1,
                                     out BCErrors   theErrors);
  
      /*!
       *  \brief Retrieve all non blocks solids and faces from a shape.
       *
       *  \param theShape The shape to explore.
 +     *  \param theToleranceC1 the tolerance to check if two neighbor edges are
 +     *         collinear in the common vertex with this tolerance. Negative
 +     *         value means that C1 criterion is not used (old implementation).
       *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
       *
       *  \return Group of all non block solids (= not 6 faces, or with 6
       *          faces, but with the presence of non-quadrangular faces).
       */
 -    GEOM_Object GetNonBlocks (in GEOM_Object theShape, out GEOM_Object theNonQuads);
 +    GEOM_Object GetNonBlocks (in GEOM_Object  theShape,
 +                              in double       theToleranceC1,
 +                              out GEOM_Object theNonQuads);
  
      /*!
       *  \brief Remove all seam and degenerated edges from \a theShape.
  
      /*!
       *  Sewing of the given object.
-      *  \param theObject Shape to be processed.
+      *  \param theObjects Shapes to be processed.
       *  \param theTolerance Required tolerance value.
       *  \return New GEOM_Object, containing processed shape.
       */
-     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
+     GEOM_Object Sew (in ListOfGO theObjects, in double theTolerance);
  
      /*!
       *  Sewing of the given object. Allows non-manifold sewing.
-      *  \param theObject Shape to be processed.
+      *  \param theObjects Shapes to be processed.
       *  \param theTolerance Required tolerance value.
       *  \return New GEOM_Object, containing processed shape.
       */
-     GEOM_Object SewAllowNonManifold(in GEOM_Object theObject, in double theTolerance);
+     GEOM_Object SewAllowNonManifold(in ListOfGO theObjects, in double theTolerance);
  
      /*!
-      *  Rebuild the topology of theCompound of solids by removing
-      *  of the faces that are shared by several solids.
-      *  \param theCompound Shape to be processed.
+      *  Rebuild the topology of theSolids by removing
+      *  the faces that are shared by several solids.
+      *  \param theSolids A list of shapes containing solids to be processed.
       *  \return New GEOM_Object, containing processed shape.
       */
-     GEOM_Object RemoveInternalFaces (in GEOM_Object theCompound);
+     GEOM_Object RemoveInternalFaces (in ListOfGO theSolids);
  
      /*!
-      *  \brief Addition of a point to a given edge object.
+      *  \brief Addition of a point to a given edge of \a theObject.
       *  \param theObject Shape to be processed.
       *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
       *                      if -1, then theObject itself is the edge.
       *                  depending on \a isByParameter.
       *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
       *                       if FALSE : \a theValue is treated as a length parameter [0..1]
-      *  \return New GEOM_Object, containing processed shape.
+      *  \return New GEOM_Object, containing the processed shape.
       */
      GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
                              in double theValue, in boolean isByParameter);
  
+     /*!
+      *  \brief Addition of points to a given edge of \a theObject by projecting
+      *         other points to the given edge.
+      *  \param theObject Shape to be processed.
+      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
+      *                      if -1, then theObject itself is the edge.
+      *  \param thePoints Points to project to theEdgeIndex-th edge.
+      *  \return New GEOM_Object, containing the processed shape.
+      */
+     GEOM_Object DivideEdgeByPoint (in GEOM_Object theObject,
+                                    in short       theEdgeIndex,
+                                    in ListOfGO    thePoints);
      /*!
       *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
       *  \param theWire Wire to minimize the number of C1 continuous edges in.
  
      /*!
       *  \brief Get a list of wires (wrapped in GEOM_Object-s),
-      *  that constitute a free boundary of the given shape.
-      *  \param theObject Shape to get free boundary of.
+      *  that constitute a free boundary of the given shapes.
+      *  \param theObjects Shapes to get free boundary of.
       *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
       *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
       *  \return FALSE, if an error(s) occured during the method execution.
       */
-     boolean GetFreeBoundary (in GEOM_Object theObject,
+     boolean GetFreeBoundary (in  ListOfGO theObjects,
                               out ListOfGO theClosedWires,
                               out ListOfGO theOpenWires);
  
       */
      GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
  
+     /*!
+      *  \brief Return information on what has been done by the last called healing method.
+      *  \return ModifStatistics, information container.
+      */
+     ModifStatistics GetStatistics();
    };
  
   // # GEOM_IInsertOperations:
      GEOM_Object MakeCopy (in GEOM_Object theOriginal);
  
      /*!
-      *  \brief Deprecated method. Use Export<FormatName> (from the
-      *  corresponding plugin) instead; here <FormatName> is a name of format.
+      *  \brief Deprecated method. Use Export\<FormatName\> (from the
+      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
       *
       *  \brief Export the given shape into a file with given name.
       *  \param theObject Shape to be stored in the file.
      void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
  
      /*!
-      *  \brief Deprecated method. Use Import<FormatName> (from the
-      *  corresponding plugin) instead; here <FormatName> is a name of format.
+      *  \brief Deprecated method. Use Import\<FormatName\> (from the
+      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
       *
       *  \brief Import a shape from the STL, BREP, IGES or STEP file
       *  (depends on given format) with given name.
       * \return list of all texture IDs avaiable for the current study
       */
      ListOfLong GetAllTextures();
-     
+     /*!
+      *  \brief Non-topological information transfer datum.
+      */
+     struct TransferDatum
+     {
+       string myName;
+       long   myNumber;
+       long   myMaxNumber;
+     };
+     /*!
+      *  \brief Sequence of non-topological information tranfer data.
+      */
+     typedef sequence<TransferDatum> ListOfTransferDatum;
+     /*!
+      *  \brief Transfer non-topological data from one object to another
+      *  \param theObjectFrom the source object of non-topological data
+      *  \param theObjectTo the destination object of non-topological data
+      *  \param theFindMethod method to search sub-shapes of theObjectFrom
+      *         in shape theObjectTo. Possible values are: GEOM::FSM_GetInPlace,
+      *         GEOM::FSM_GetInPlaceByHistory and GEOM::FSM_GetInPlace_Old.
+      *         Other values of GEOM::find_shape_method are not supported.
+      *  \param theResult statistics of the operation. Output parameter. It
+      *         represents a sequence of Transfer Datum. A datum has the type
+      *         (string code), the total number of items of this type and
+      *         the number of transfered items.
+      *  \return true in case of success; otherwise false.
+      */
+     boolean TransferData(in  GEOM_Object         theObjectFrom,
+                          in  GEOM_Object         theObjectTo,
+                          in  find_shape_method   theFindMethod,
+                          out ListOfTransferDatum theResult);
    };
  
   // # GEOM_IKindOfShape:
      /*!
       *  \brief Check a topology of the given shape on self-intersections presence.
       *  \param theShape Shape to check validity of.
+      *  \param theCheckLevel the level of self-interference check.
       *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
       *  \return TRUE, if the shape does not have any self-intersections.
       */
      boolean CheckSelfIntersections (in GEOM_Object theShape,
+                                     in long        theCheckLevel,
                                      out ListOfLong theIntersections);
  
+     /*!
+      *  \brief Detect intersections of the given shapes with algorithm based on mesh intersections.
+      *  \param theShape1 First source object
+      *  \param theShape2 Second source object
+      *  \param theTolerance Specifies a distance between shapes used for detecting gaps:
+      *                       - if \a theTolerance <= 0, algorithm detects intersections
+      *                       - if \a theTolerance > 0, algorithm detects gaps
+      *  \param theDeflection Linear deflection coefficient that specifies quality of tesselation:
+      *                       - if \a theDeflection <= 0, default deflection 0.001 is used
+      *  \param theIntersections1 Output: contains list of sub-shapes IDs from 1st shape that localize intersection
+      *  \param theIntersections2 Output: contains list of sub-shapes IDs from 2nd shape that localize intersection
+      *  \return TRUE, if the are intersections (gaps) between source shapes
+      */
+     boolean FastIntersect (in GEOM_Object theShape1,
+                          in GEOM_Object theShape2,
+                          in double      theTolerance,
+                          in float       theDeflection,
+                          out ListOfLong theIntersections1,
+                          out ListOfLong theIntersections2);
      /*!
       *  \brief Check if the given shape can be an argument for MakeSolid operation
       *  \param theShape Shape to be described.
index 97f3a2c217193914e0c246b0a8120d129619fb66,427b9c16a960ba85015c402de857f0aa1e37f6fa..3ba3cf2a0f24de466a9101c8763bbb96e2640f62
@@@ -33,7 -33,6 +33,7 @@@
    <!-- Geom data types  -->
    <type-list>
      <!-- From GEOM_Gen.idl -->
 +    <objref name="CORBA/Object" id="" />
      <objref name="GEOM/GEOM_Gen" id="IDL:GEOM/GEOM_Gen:1.0" />
      <objref name="GEOM/GEOM_BaseObject" id="IDL:GEOM/GEOM_BaseObject:1.0" />
      <objref name="GEOM/GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0">
        <member name="error" type="GEOM/ShapeErrorType" />
        <member name="incriminated" type="GEOM/ListOfLong" />
      </struct>
-     <sequence name="GEOM/ShapeError"  content="GEOM/ShapeErrors" />
+     <sequence name="GEOM/ShapeErrors"  content="GEOM/ShapeError" />
  
      <!-- From GEOM_Superv.idl -->
      <objref name="GEOM/GEOM_Superv"  id="IDL:GEOM/GEOM_Superv:1.0" />
                </inParameter>
                <inParameter>
                  <inParameter-name>theObject</inParameter-name>
 -                <inParameter-type>Object</inParameter-type>
 +                <inParameter-type>CORBA/Object</inParameter-type>
                  <inParameter-comment>unknown</inParameter-comment>
                </inParameter>
              </inParameter-list>
              </outParameter-list>
              <DataStream-list></DataStream-list>
            </component-service>
+           <component-service>
+             <service-name>MakeFaceWithConstraints</service-name>
+             <service-author>SALOME team</service-author>
+             <service-version>@SALOMEGEOM_VERSION@</service-version>
+             <service-comment>unknown</service-comment>
+             <service-by-default>0</service-by-default>
+             <inParameter-list>
+               <inParameter>
+                 <inParameter-name>theConstraints</inParameter-name>
+                 <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                 <inParameter-comment>unknown</inParameter-comment>
+               </inParameter>
+             </inParameter-list>
+             <outParameter-list>
+               <outParameter>
+                 <outParameter-name>return</outParameter-name>
+                 <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                 <outParameter-comment>unknown</outParameter-comment>
+               </outParameter>
+             </outParameter-list>
+             <DataStream-list></DataStream-list>
+           </component-service>
            <component-service>
              <service-name>MakeSolidShell</service-name>
              <service-author>SALOME team</service-author>
                </outParameter>
              </outParameter-list>
              <DataStream-list></DataStream-list>
+           </component-service>
+           <component-service>
+             <service-name>MakeSolidFromConnectedFaces</service-name>
+             <service-author>SALOME team</service-author>
+             <service-version>@SALOMEGEOM_VERSION@</service-version>
+             <service-comment>unknown</service-comment>
+             <service-by-default>0</service-by-default>
+             <inParameter-list>
+               <inParameter>
+                 <inParameter-name>theFacesOrShells</inParameter-name>
+                 <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                 <inParameter-comment>unknown</inParameter-comment>
+               </inParameter>
+               <inParameter>
+                 <inParameter-name>isIntersect</inParameter-name>
+                 <inParameter-type>boolean</inParameter-type>
+                 <inParameter-comment>unknown</inParameter-comment>
+               </inParameter>
+             </inParameter-list>
+             <outParameter-list>
+               <outParameter>
+                 <outParameter-name>return</outParameter-name>
+                 <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                 <outParameter-comment>unknown</outParameter-comment>
+               </outParameter>
+             </outParameter-list>
+             <DataStream-list></DataStream-list>
            </component-service>
            <component-service>
              <service-name>MakeCompound</service-name>
index ad7650b00065f58628329c1c92108f9cc500c3c4,234407a9e1e827e084426e0e59688f68941802a4..430c8a33cbe6933f5d94d6ef07aef52b58ce4c1d
  
  #define FIND_GROUPS_BY_POINTS 1
  
 +// Undefine below macro to enable workaround about fillet problem in MakePipeTShapeFillet
 +// VSR 30/12/2014: macro enabled
 +#define FILLET_FIX_TOLERANCE
 +
  //=============================================================================
  /*!
   *  Constructor
@@@ -158,9 -154,9 +158,9 @@@ AdvancedEngine_IOperations::~AdvancedEn
   */
  //=============================================================================
  gp_Trsf AdvancedEngine_IOperations::GetPositionTrsf(double theL1, double theL2,
-                                                   Handle(GEOM_Object) theP1,
-                                                   Handle(GEOM_Object) theP2,
-                                                   Handle(GEOM_Object) theP3)
+                                                     Handle(GEOM_Object) theP1,
+                                                     Handle(GEOM_Object) theP2,
+                                                     Handle(GEOM_Object) theP3)
  {
    // Old Local Coordinates System oldLCS
    gp_Pnt P0(0, 0, 0);
   */
  //=============================================================================
  bool AdvancedEngine_IOperations::CheckCompatiblePosition(double& theL1, double& theL2,
-                                                        Handle(GEOM_Object) theP1,
-                                                        Handle(GEOM_Object) theP2,
-                                                        Handle(GEOM_Object) theP3,
-                                                        double theTolerance)
+                                                          Handle(GEOM_Object) theP1,
+                                                          Handle(GEOM_Object) theP2,
+                                                          Handle(GEOM_Object) theP3,
+                                                          double theTolerance)
  {
    SetErrorCode(KO);
    gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
   */
  //=============================================================================
  bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
-                                           double theR1, double theW1, double theL1,
-                                           double theR2, double theW2, double theL2,
-                                           double theH, double theW, double theRF,
-                                           Handle(TColStd_HSequenceOfTransient) theSeq,
-                                           gp_Trsf aTrsf)
+                                             double theR1, double theW1, double theL1,
+                                             double theR2, double theW2, double theL2,
+                                             double theH, double theW, double theRF,
+                                             Handle(TColStd_HSequenceOfTransient) theSeq,
+                                             gp_Trsf aTrsf)
  {
    SetErrorCode(KO);
  
@@@ -1136,10 -1132,10 +1136,10 @@@ bool AdvancedEngine_IOperations::MakeIn
  }
  
  bool AdvancedEngine_IOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
-                                                        double theR1, double theW1, double theL1,
-                                                        double theR2, double theW2, double theL2,
-                                                        double theH, double theW,
-                                                        double theRF, bool isNormal)
+                                                          double theR1, double theW1, double theL1,
+                                                          double theR2, double theW2, double theL2,
+                                                          double theH, double theW,
+                                                          double theRF, bool isNormal)
  {
    SetErrorCode(KO);
  
        if (Abs(aP.X()) <= Precision::Confusion()) {
          if (Abs(aP.Y()) < d1min) {
            vi1 = v;
-         d1min = Abs(aP.Y());
-       }
+           d1min = Abs(aP.Y());
+         }
        } else if (Abs(aP.Y()) <= Precision::Confusion()) {
-       if (Abs(aP.X()) < d2min) {
-         vi2 = v;
-         d2min = Abs(aP.X());
+         if (Abs(aP.X()) < d2min) {
+           vi2 = v;
+           d2min = Abs(aP.X());
          }
        }
      }
          if (Abs(aP.X()) <= Precision::Confusion()) {
            if (Abs(aP.Y()) > d1max) {
              ve1 = v;
-           vertex1 = aVertex;
-           d1max = Abs(aP.Y());
+             vertex1 = aVertex;
+             d1max = Abs(aP.Y());
            }
          } else if (Abs(aP.Y()) <= Precision::Confusion()) {
            if (Abs(aP.X()) > d2max) {
              ve2 = v;
-           vertex2 = aVertex;
-           d2max = Abs(aP.X());
+             vertex2 = aVertex;
+             d2max = Abs(aP.X());
            }
          }
        }
        for (int i=1; i<=edges_e->Length();i++) {
          Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i));
          anObj->GetLastFunction()->SetDescription("");
-       TopoDS_Edge anEdge = TopoDS::Edge(anObj->GetValue());
-       if ( !anEdge.IsNull() && 
-            (sae.FirstVertex(anEdge).IsSame(vertex1) || sae.LastVertex(anEdge).IsSame(vertex1)) && 
-            (sae.FirstVertex(anEdge).IsSame(vertex2) || sae.LastVertex(anEdge).IsSame(vertex2))) {
-         arete_intersect_ext = anObj;
-       }
+         TopoDS_Edge anEdge = TopoDS::Edge(anObj->GetValue());
+         if ( !anEdge.IsNull() && 
+              (sae.FirstVertex(anEdge).IsSame(vertex1) || sae.LastVertex(anEdge).IsSame(vertex1)) && 
+              (sae.FirstVertex(anEdge).IsSame(vertex2) || sae.LastVertex(anEdge).IsSame(vertex2))) {
+           arete_intersect_ext = anObj;
+         }
        }
  
        edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
  
      // Last verification: result should be a block
      std::list<GEOMImpl_IBlocksOperations::BCError> errList;
 -    if (!myBlocksOperations->CheckCompoundOfBlocks(Te3,errList)) {
 +    if (!myBlocksOperations->CheckCompoundOfBlocks(Te3, -1, errList)) {
        SetErrorCode("TShape is not a compound of block");
        return false;
      }
  
  // Mirror and glue faces
  bool AdvancedEngine_IOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
-                                                            double theR1, double theW1, double theL1,
-                                                            double theR2, double theW2, double theL2)
+                                                              double theR1, double theW1, double theL1,
+                                                              double theR2, double theW2, double theL2)
  {
    SetErrorCode(KO);
  
    TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
    TNaming_CopyShape::CopyTool(Te7->GetValue(), aMapTShapes, aShapeCopy);
  
-   Handle(GEOM_Object) Te8 = myShapesOperations->MakeGlueFaces(Te7, 1e-7, true);
+   std::list<Handle(GEOM_Object)> Te7list( 1, Te7 );
+   Handle(GEOM_Object) Te8 = myShapesOperations->MakeGlueFaces(Te7list, 1e-7, true);
    if (Te8.IsNull()) {
      SetErrorCode("Impossible to glue faces of TShape");
      return false;
  
      // Perform gluing
      Te7->GetLastFunction()->SetValue(aShapeCopy);
-     Te8 = myShapesOperations->MakeGlueFaces(Te7, aTolMax, true);
+     Te8 = myShapesOperations->MakeGlueFaces(Te7list, aTolMax, true);
  
      if (Te8.IsNull()) {
        SetErrorCode("Impossible to glue faces of TShape");
@@@ -1849,10 -1846,10 +1850,10 @@@ TopoDS_Shape AdvancedEngine_IOperations
  //purpose  : Static method. Create one thickness reduction element.
  //=======================================================================
  TopoDS_Shape AdvancedEngine_IOperations::MakeThicknessReduction (gp_Ax2 theAxes,
-                                                                const double R, const double W,
-                                                                const double Rthin, const double Wthin,
-                                                                const double Ltrans, const double Lthin,
-                                                                bool fuse)
+                                                                  const double R, const double W,
+                                                                  const double Rthin, const double Wthin,
+                                                                  const double Ltrans, const double Lthin,
+                                                                  bool fuse)
  {
    double aTol = Precision::Confusion();
    if (Rthin < aTol || Wthin < aTol || Ltrans < aTol) {
  //=============================================================================
  Handle(TColStd_HSequenceOfTransient)
    AdvancedEngine_IOperations::MakePipeTShape(double theR1, double theW1, double theL1,
-                                            double theR2, double theW2, double theL2,
-                                            double theRL, double theWL, double theLtransL, double theLthinL,
-                                            double theRR, double theWR, double theLtransR, double theLthinR,
-                                            double theRI, double theWI, double theLtransI, double theLthinI,
-                                            bool theHexMesh)
+                                              double theR2, double theW2, double theL2,
+                                              double theRL, double theWL, double theLtransL, double theLthinL,
+                                              double theRR, double theWR, double theLtransR, double theLthinR,
+                                              double theRI, double theWI, double theLtransI, double theLthinI,
+                                              bool theHexMesh)
  {
    MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
    SetErrorCode(KO);
@@@ -2846,17 -2843,6 +2847,17 @@@ AdvancedEngine_IOperations::MakePipeTSh
    aFillet->GetLastFunction()->SetDescription("");
  
    TopoDS_Shape aFilletShape = aFillet->GetValue();
 +
 +#ifdef FILLET_FIX_TOLERANCE
 +  // VSR: 30/12/2014: temporary workaround about Fillet problem
 +  if (theHexMesh) {
 +    GEOMUtils::FixShapeTolerance(aFilletShape, TopAbs_FACE);
 +  }
 +  else {
 +    GEOMUtils::FixShapeCurves(aFilletShape);
 +  }
 +#endif
 +
    aFunction->SetValue(aFilletShape);
    // END of fillet
  
@@@ -3102,17 -3088,6 +3103,17 @@@ AdvancedEngine_IOperations::MakePipeTSh
    aFillet->GetLastFunction()->SetDescription("");
  
    TopoDS_Shape aFilletShape = aFillet->GetValue();
 +
 +#ifdef FILLET_FIX_TOLERANCE
 +  // VSR: 30/12/2014: temporary workaround about Fillet problem
 +  if (theHexMesh) {
 +    GEOMUtils::FixShapeTolerance(aFilletShape, TopAbs_FACE);
 +  }
 +  else {
 +    GEOMUtils::FixShapeCurves(aFilletShape);
 +  }
 +#endif
 +
    aFunction->SetValue(aFilletShape);
    // END of fillet
  
   */
  //=============================================================================
  Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, double theRatio, 
-                                                                int theOrientation, int thePattern)
+                                                                  int theOrientation, int thePattern)
  {
    SetErrorCode(KO);
    
   */
  //=============================================================================
  Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, 
-                                                                       Handle(GEOM_Object) theVec, 
-                                                                       double theR, 
-                                                                       double theRatio,
-                                                                       int    thePattern)
+                                                                         Handle(GEOM_Object) theVec, 
+                                                                         double theR, 
+                                                                         double theRatio,
+                                                                         int    thePattern)
  {
    SetErrorCode(KO);
  
   */
  //=============================================================================
  Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR, 
-                                                                    double theH,
-                                                                    int    thePattern)
+                                                                      double theH,
+                                                                      int    thePattern)
  {
    SetErrorCode(KO);
    
   */
  //=============================================================================
  Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
-                                                                     int                            theNbMax,
-                                                                     int                            theDegMax,
-                                                                     double                         theDMax)
+                                                                       int                            theNbMax,
+                                                                       int                            theDegMax,
+                                                                       double                         theDMax)
  {
    SetErrorCode(KO);
  
index f8c6d5d0225d6fc908c1dfc00e9ea085b17928de,55d92893026e5cdc5bb0dd81741e2639f9eab2b4..398ebfc45c592bed90ed26e44017445902dc1f87
@@@ -42,7 -42,6 +42,7 @@@
  #include <SUIT_ViewWindow.h>
  #include <SalomeApp_Application.h>
  #include <SalomeApp_Study.h>
 +#include "utilities.h"
  
  #include <TopoDS_Shape.hxx>
  #include <TopoDS.hxx>
@@@ -56,6 -55,7 +56,7 @@@
  #include "EntityGUI_SketcherDlg.h"        // Sketcher
  #include "EntityGUI_3DSketcherDlg.h"      // Sketcher
  #include "EntityGUI_IsolineDlg.h"         // Isoline
+ #include "EntityGUI_SurfFromFaceDlg.h"    // Surface From Face
  #include "EntityGUI_SubShapeDlg.h"        // Method SUBSHAPE
  #include "EntityGUI_FeatureDetectorDlg.h" // Feature Detection
  #include "EntityGUI_PictureImportDlg.h"   // Import Picture in viewer
@@@ -107,6 -107,9 +108,9 @@@ bool EntityGUI::OnGUIEvent( int theComm
    case GEOMOp::OpIsoline:    // ISOLINE
      aDlg = new EntityGUI_IsolineDlg( getGeometryGUI(), parent );
      break;
+   case GEOMOp::OpSurfaceFromFace:    // SURFACE FROM FACE
+     aDlg = new EntityGUI_SurfFromFaceDlg( getGeometryGUI(), parent );
+     break;
    case GEOMOp::OpExplode:    // EXPLODE
      aDlg = new EntityGUI_SubShapeDlg( getGeometryGUI(), parent );
      break;
index c2c0349b012427cc4264ae8fba90264d185ff6d0,439bfe7ee600945b137f04eb86f00b68b9128146..326b9fb28be2e91a17df61b8786e072154b08138
@@@ -48,7 -48,6 +48,7 @@@
  #include <SALOME_ListIO.hxx>
  
  #include <SALOME_Prs.h>
 +#include "utilities.h"
  
  #include <OCCViewer_ViewModel.h>
  #include <SVTK_ViewModel.h>
@@@ -260,7 -259,8 +260,8 @@@ void GEOMBase_Helper::displayPreview( c
                                        const bool   toRemoveFromEngine,
                                        const double lineWidth,
                                        const int    displayMode,
-                                       const int    color )
+                                       const int    color,
+                                       const bool   append )
  {
    if(!display) {
      erasePreview( update );
      return;
    }
  
-   erasePreview( false );
+   if( !append )
+     erasePreview( false );
  
    try {
      SUIT_OverrideCursor wc;
@@@ -408,12 -409,12 +410,12 @@@ void GEOMBase_Helper::erasePreview( con
      {
        SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
        if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
-          aViewManager->getType() == SVTK_Viewer::Type() )
+            aViewManager->getType() == SVTK_Viewer::Type() )
        {
-       SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
-       SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
-       if (aView)
-         aView->Erase( getDisplayer(), *anIter, true );
+         SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
+         SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
+         if (aView)
+           aView->Erase( getDisplayer(), *anIter, true );
        }
      }
      delete *anIter;
@@@ -462,9 -463,9 +464,9 @@@ void GEOMBase_Helper::activate( const i
  //================================================================
  // Function : localSelection
  // Purpose  : Activate selection of sub-shapes in accordance with mode
- //            theMode is from TopAbs_ShapeEnum
+ //            modes are from TopAbs_ShapeEnum
  //================================================================
- void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMode )
+ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const std::list<int> modes )
  {
    SALOME_ListIO aListOfIO;
  
          anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
    }
  
-   getDisplayer()->LocalSelection( aListOfIO, theMode );
+   getDisplayer()->LocalSelection( aListOfIO, modes );
  }
  
  //================================================================
  // Purpose  : Activate selection of sub-shapes in accordance with mode
  //            theMode is from TopAbs_ShapeEnum
  //================================================================
- void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode )
+ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMode )
+ {
+   std::list<int> modes;
+   modes.push_back( theMode );
+   localSelection( theObjs, modes );
+ }
+ //================================================================
+ // Function : localSelection
+ // Purpose  : Activate selection of sub-shapes in accordance with mode
+ //            modes are from TopAbs_ShapeEnum
+ //================================================================
+ void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const std::list<int> modes )
  {
    // If object is null local selection for all objects is activated
    if ( obj->_is_nil() ) {
-     getDisplayer()->LocalSelection( Handle(SALOME_InteractiveObject)(), mode );
+     getDisplayer()->LocalSelection( Handle(SALOME_InteractiveObject)(), modes );
      return;
    }
  
    ObjectList objList;
    objList.push_back( obj );
-   localSelection( objList, mode );
+   localSelection( objList, modes );
  }
  
+ //================================================================
+ // Function : localSelection
+ // Purpose  : Activate selection of sub-shapes in accordance with mode
+ //            mode is from TopAbs_ShapeEnum
+ //================================================================
+ void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode )
+ {
+   std::list<int> modes;
+   modes.push_back( mode );
+   localSelection( obj, modes );
+ }
  
  //================================================================
  // Function : globalSelection
@@@ -844,21 -868,21 +869,21 @@@ bool GEOMBase_Helper::onAccept( const b
              QString aName = getObjectName(obj);
              if (aName.isEmpty()) {
                aName = getNewObjectName(currObj);
-                   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 ) );
-                   }
+                     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
@@@ -1138,10 -1162,10 +1163,10 @@@ GEOM::GEOM_Object_ptr GEOMBase_Helper::
          if ( !CORBA::is_nil( cobject ) ) {
            GEOM::ListOfLong_var indices = cobject->GetSubShapeIndices();
            int length = indices->length();
-         // VSR 18/03/2014: we need only sub-shapes with single sub-shape index (to exclude groups, etc)
-         if ( length == 1 && indices[0] == theIndex ) {
-           object = cobject;
-           break;
+           // VSR 18/03/2014: we need only sub-shapes with single sub-shape index (to exclude groups, etc)
+           if ( length == 1 && indices[0] == theIndex ) {
+             object = cobject;
+             break;
            }
          }
        }
index 6d373e44c444fcecf71f2fca8348c4e0be76c899,1e4f76a6b222442842e27bfe628541bb6615af45..91e935cef02e88a5c16909dc50d9b11b07a68348
@@@ -67,7 -67,6 +67,7 @@@
  
  #include <SALOME_ListIO.hxx>
  #include <SALOME_Prs.h>
 +#include "utilities.h"
  
  #include <SOCC_Prs.h>
  #include <SOCC_ViewModel.h>
  
  // Hard-coded value of shape deflection coefficient for VTK viewer
  const double VTK_MIN_DEFLECTION = 0.001;
 +// If the next macro is defined, the deflection coefficient for VTK presentation
 +// is limited by VTK_MIN_DEFLECTION
 +//#define LIMIT_DEFLECTION_FOR_VTK
  
  // Pixmap caching support
  namespace
@@@ -477,24 -473,25 +477,24 @@@ GEOM_Displayer::GEOM_Displayer( SalomeA
    myHasDisplayMode = false;
  
    int aType = resMgr->integerValue("Geometry", "type_of_marker", (int)Aspect_TOM_PLUS);
 -  myWidth = resMgr->integerValue("Geometry", "edge_width", -1);
 -  myIsosWidth = resMgr->integerValue("Geometry", "isolines_width", -1);
    
 -  myTransparency = resMgr->integerValue("Geometry", "transparency", 0) / 100.;
 -  myHasTransparency = false;
 -
    myTypeOfMarker = (Aspect_TypeOfMarker)(std::min((int)Aspect_TOM_RING3, std::max((int)Aspect_TOM_POINT, aType)));
    myScaleOfMarker = (resMgr->integerValue("Geometry", "marker_scale", 1)-(int)GEOM::MS_10)*0.5 + 1.0;
    myScaleOfMarker = std::min(7.0, std::max(1., myScaleOfMarker));
  
 +  // Next properties provide a way to customize displaying of presentations;
 +  // for instance, this is useful for preview
    myColor = -1;
 -  // This color is used for shape displaying. If it is equal -1 then
 -  // default color is used.
    myTexture = "";
 -
 +  myNbIsos = -1;
    myWidth = -1;
 +  myTransparency = -1;
    myType = -1;
 +  myIsosColor = -1;
 +  myIsosWidth = -1;
 +
 +  // This parameter is used for activisation/deactivisation (selection) of objects to be displayed
    myToActivate = true;
 -  // This parameter is used for activisation/deactivisation of objects to be displayed
  
    // Activate parallel vizualisation only for testing purpose
    // and if the corresponding env variable is set to 1
@@@ -867,34 -864,12 +867,34 @@@ void GEOM_Displayer::updateShapePropert
    int isosWidth = propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt();
    Handle(Prs3d_IsoAspect) uIsoAspect = AISShape->Attributes()->UIsoAspect();
    Handle(Prs3d_IsoAspect) vIsoAspect = AISShape->Attributes()->VIsoAspect();
 -  uIsoAspect->SetColor( isosColor );
 -  uIsoAspect->SetWidth( isosWidth );
 -  uIsoAspect->SetNumber( uIsos );
 -  vIsoAspect->SetColor( isosColor );
 -  vIsoAspect->SetWidth( isosWidth );
 -  vIsoAspect->SetNumber( vIsos );
 +
 +  if ( HasIsosColor() ) {
 +    uIsoAspect->SetColor( (Quantity_NameOfColor)GetIsosColor() );
 +    vIsoAspect->SetColor( (Quantity_NameOfColor)GetIsosColor() );
 +  }
 +  else {
 +    uIsoAspect->SetColor( isosColor );
 +    vIsoAspect->SetColor( isosColor );
 +  }
 +
 +  if ( HasIsosWidth() ) {
 +    uIsoAspect->SetWidth( GetIsosWidth() );
 +    vIsoAspect->SetWidth( GetIsosWidth() );
 +  }
 +  else {
 +    uIsoAspect->SetWidth( isosWidth );
 +    vIsoAspect->SetWidth( isosWidth );
 +  }
 +  
 +  if ( HasNbIsos() ) {
 +    uIsoAspect->SetNumber( GetNbIsos() );
 +    vIsoAspect->SetNumber( GetNbIsos() );
 +  }
 +  else {
 +    uIsoAspect->SetNumber( uIsos );
 +    vIsoAspect->SetNumber( vIsos );
 +  }
 +
    AISShape->Attributes()->SetUIsoAspect( uIsoAspect );
    AISShape->Attributes()->SetVIsoAspect( vIsoAspect );
  
@@@ -1046,11 -1021,7 +1046,11 @@@ void GEOM_Displayer::updateActorPropert
    // actor->SetShape(myShape,aDefPropMap.value(GEOM::propertyName( GEOM::Deflection )).toDouble(),myType == GEOM_VECTOR);
    /////////////////////////////////////////////////////////////////////////
    if ( !actor->getTopo().IsSame( myShape ) )
 +#ifdef LIMIT_DEFLECTION_FOR_VTK
      actor->SetShape( myShape, VTK_MIN_DEFLECTION, myType == GEOM_VECTOR );
 +#else
 +    actor->SetShape( myShape, qMax( propMap.value( GEOM::propertyName( GEOM::Deflection ) ).toDouble(), GEOM::minDeflection() ), myType == GEOM_VECTOR );
 +#endif
  
    // set material
    Material_Model material;
  
    // - set number of iso-lines
    int nbIsos[2]= { 1, 1 };
 -  QStringList isos = propMap.value( GEOM::propertyName( GEOM::NbIsos ) ).toString().split( GEOM::subSectionSeparator() );
 -  nbIsos[0] = isos[0].toInt();
 -  nbIsos[1] = isos[1].toInt();
 +  if ( HasNbIsos() ) {
 +    nbIsos[0] = GetNbIsos();
 +    nbIsos[1] = GetNbIsos();
 +  }
 +  else {
 +    QStringList isos = propMap.value( GEOM::propertyName( GEOM::NbIsos ) ).toString().split( GEOM::subSectionSeparator() );
 +    nbIsos[0] = isos[0].toInt();
 +    nbIsos[1] = isos[1].toInt();
 +  }
    actor->SetNbIsos( nbIsos );
  
    // - set iso-lines width
 -  actor->SetIsosWidth( propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt() );
 +  actor->SetIsosWidth( HasIsosWidth() ? GetIsosWidth() : propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt() );
  
    // - set iso-lines color
 -  c = propMap.value( GEOM::propertyName( GEOM::IsosColor ) ).value<QColor>();
 +  if ( HasIsosColor() )
 +    c = SalomeApp_Tools::color( Quantity_Color((Quantity_NameOfColor)GetIsosColor()) );
 +  else
 +    c = propMap.value( GEOM::propertyName( GEOM::IsosColor ) ).value<QColor>();
    actor->SetIsosColor( c.redF(), c.greenF(), c.blueF() );
  
    // set colors
@@@ -1835,7 -1797,7 +1835,7 @@@ void GEOM_Displayer::internalReset(
   *  of their sub-shapes (with opened local context for OCC viewer)
   */
  //=================================================================
- void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const int theMode )
+ void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const std::list<int> modes )
  {
    SUIT_Session* session = SUIT_Session::session();
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
      if (!theIO.IsNull() && !vf->isVisible(theIO))
        Display(theIO);
      SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() );
-     vf->LocalSelection( prs, theMode );
+     vf->LocalSelection( prs, modes );
      delete prs;  // delete presentation because displayer is its owner
    }
  }
  
+ //=================================================================
+ /*!
+  *  GEOM_Displayer::LocalSelection
+  *  Activate selection of CAD shapes with activisation of selection
+  *  of their sub-shapes (with opened local context for OCC viewer)
+  */
+ //=================================================================
+ void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const int theMode )
+ {
+   std::list<int> modes;
+   modes.push_back( theMode );
+   LocalSelection( theIO, modes );
+ }
  //=================================================================
  /*!
   *  GEOM_Displayer::globalSelection
@@@ -1970,11 -1946,25 +1984,25 @@@ void GEOM_Displayer::GlobalSelection( c
   *  of their sub-shapes (with opened local context for OCC viewer)
   */
  //=================================================================
- void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const int theMode )
+ void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const std::list<int> modes )
  {
    SALOME_ListIteratorOfListIO Iter( theIOList );
    for ( ; Iter.More(); Iter.Next() )
-     LocalSelection( Iter.Value(), theMode );
+     LocalSelection( Iter.Value(), modes );
+ }
+ //=================================================================
+ /*!
+  *  GEOM_Displayer::LocalSelection
+  *  Activate selection of CAD shapes with activisation of selection
+  *  of their sub-shapes (with opened local context for OCC viewer)
+  */
+ //=================================================================
+ void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const int theMode )
+ {
+   std::list<int> modes;
+   modes.push_back( theMode );
+   LocalSelection( theIOList, modes );
  }
  
  //=================================================================
@@@ -2060,9 -2050,15 +2088,9 @@@ void GEOM_Displayer::UnsetColor(
  //=================================================================
  double GEOM_Displayer::SetTransparency( const double transparency )
  {
 -  double aPrevTransparency = myTransparency;
 -  if ( transparency < 0 ) {
 -    UnsetTransparency();
 -  }
 -  else {
 -    myTransparency = transparency;
 -    myHasTransparency = true;
 -  }
 -  return aPrevTransparency;
 +  double prevTransparency = myTransparency;
 +  myTransparency = transparency;
 +  return prevTransparency;
  }
  
  //=================================================================
@@@ -2084,7 -2080,7 +2112,7 @@@ double GEOM_Displayer::GetTransparency(
  //=================================================================
  bool GEOM_Displayer::HasTransparency() const
  {
 -  return myHasTransparency;
 +  return myTransparency >= 0;
  }
  
  //=================================================================
  //=================================================================
  double GEOM_Displayer::UnsetTransparency()
  {
 -  double aPrevTransparency = myTransparency;
 -  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
 -  myTransparency = resMgr->integerValue("Geometry", "transparency", 0) / 100.;
 -  myHasTransparency = false;
 -  return aPrevTransparency;
 +  return SetTransparency( -1 );
  }
  
 -
  //=================================================================
  /*!
   *  GEOM_Displayer::SetTexture
 - *  Set color for shape displaying. If it is equal -1 then default color is used.
 - *  Available values are from Quantity_NameOfColor enumeration
   */
  //=================================================================
  void GEOM_Displayer::SetTexture( const std::string& texureFileName )
  {
 -  if(texureFileName!="")
 -  {
 -    myTexture = texureFileName;
 -  }
 +  myTexture = texureFileName;
  }
  
  bool GEOM_Displayer::HasTexture() const
@@@ -2144,6 -2150,7 +2172,6 @@@ void GEOM_Displayer::UnsetWidth(
    myWidth = -1;
  }
  
 -
  int GEOM_Displayer::GetIsosWidth() const
  {
    return myIsosWidth;
@@@ -2159,49 -2166,6 +2187,49 @@@ bool GEOM_Displayer::HasIsosWidth() con
    return myIsosWidth != -1;
  }
  
 +int GEOM_Displayer::SetNbIsos( const int nbIsos )
 +{
 +  int prevNbIsos = myNbIsos;
 +  myNbIsos = nbIsos;
 +  return prevNbIsos;
 +}
 +
 +int GEOM_Displayer::UnsetNbIsos()
 +{
 +  return SetNbIsos( -1 );
 +}
 +
 +int GEOM_Displayer::GetNbIsos() const
 +{
 +  return myNbIsos;
 +}
 +
 +bool GEOM_Displayer::HasNbIsos() const
 +{
 +  return myNbIsos >= 0;
 +}
 +
 +int GEOM_Displayer::SetIsosColor( const int color )
 +{
 +  int prevColor = myIsosColor;
 +  myIsosColor = color;
 +  return prevColor;
 +}
 +
 +int GEOM_Displayer::GetIsosColor() const
 +{
 +  return myIsosColor;
 +}
 +
 +bool GEOM_Displayer::HasIsosColor() const
 +{
 +  return myIsosColor != -1;
 +}
 +
 +int GEOM_Displayer::UnsetIsosColor()
 +{
 +  return SetIsosColor( -1 );
 +}
  
  //=================================================================
  /*!
index cd8f465e6b00213340767e5ac2265eb7ac72f617,03b00c0c6d0de66b31e893416583a65a8106e9de..110785ee26a0b3d8fae40898204566b707b92814
@@@ -162,20 -162,7 +162,20 @@@ public
    void          SetIsosWidth  ( const int );
    int           GetIsosWidth  () const;
    bool          HasIsosWidth  () const;
 + 
 +  /* Set nb iso-libes for displaying. Use -1 to set default values. */
 +  int           SetNbIsos( const int );
 +  int           UnsetNbIsos();
 +  int           GetNbIsos() const;
 +  bool          HasNbIsos() const;
    
 +  /* Set color for iso-lines displaying. If it is equal -1 then default color is used.
 +     Available values are from Quantity_NameOfColor enumeration */
 +  int           SetIsosColor  ( const int );
 +  int           UnsetIsosColor();
 +  int           GetIsosColor  () const;
 +  bool          HasIsosColor  () const;
 + 
    /* Set display mode shape displaying. If it is equal -1 then display mode is used. */
    int           SetDisplayMode( const int );
    int           GetDisplayMode() const;
    bool          ToActivate() const;
  
    /* Activate/Deactivate selection*/
+   void         LocalSelection( const Handle(SALOME_InteractiveObject)&, const std::list<int> );
    void         LocalSelection( const Handle(SALOME_InteractiveObject)&, const int );
+   void         LocalSelection( const SALOME_ListIO& theIOList, const std::list<int> );
    void         LocalSelection( const SALOME_ListIO& theIOList, const int );
    void         GlobalSelection( const int = GEOM_ALLOBJECTS, const bool = false );
    void         GlobalSelection( const TColStd_MapOfInteger&, const bool = false, const QList<int>* = 0 );
@@@ -302,14 -291,13 +304,14 @@@ protected
    int                              myColor;
    double                           myWidth;
    int                              myIsosWidth;
 +  int                              myNbIsos;
 +  int                              myIsosColor;
    bool                             myToActivate;
    int                              myDisplayMode;
    bool                             myHasDisplayMode;
    Aspect_TypeOfMarker              myTypeOfMarker;
    double                           myScaleOfMarker;
    double                           myTransparency;
 -  bool                             myHasTransparency;
  
  private:
    SalomeApp_Application* myApp;
index c7fe96da756500972651a90b04eb5fa7b85e2bfa,94cdfeff432f063e1c4913a38a3bf92353daf979..c44395e9bfce664855385ce5400104f0089e2a80
@@@ -38,6 -38,14 +38,14 @@@ Do you still want to delete these objec
          <source>DEVIDE_EDGE_NEW_OBJECT_NAME</source>
          <translation>NewObject</translation>
      </message>
+     <message>
+         <source>DEVIDE_EDGE_BAD_PROJ_MSG</source>
+         <translation>Projection outside the edge</translation>
+     </message>
+     <message>
+         <source>DEVIDE_EDGE_BY_PROJ_POINT</source>
+         <translation>Points to project</translation>
+     </message>
      <message>
          <source>ERROR_SHAPE_TYPE</source>
          <translation>Object of incorrect type selected!
@@@ -407,10 -415,6 +415,10 @@@ Please, select face, shell or solid an
          <source>GEOM_NONBLOCKS</source>
          <translation>NonBlocksGroup</translation>
      </message>
 +    <message>
 +        <source>GEOM_USE_C1_CRITERION</source>
 +        <translation>Use C1 criterion</translation>
 +    </message>
      <message>
          <source>GEOM_CHECK_INFOS</source>
          <translation>Object And Its Topological Information</translation>
          <translation>Detect Self-intersections</translation>
      </message>
      <message>
-         <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
-         <translation>Detection of self-intersections failed</translation>
-     </message>
-     <message>
-         <source>GEOM_NO_SELF_INTERSECTIONS</source>
-         <translation>There are no self-intersections in the shape</translation>
-     </message>
-     <message>
-         <source>GEOM_SELF_INTERSECTIONS_FOUND</source>
-         <translation>Some self-intersections detected</translation>
-     </message>
-     <message>
-         <source>GEOM_CHECK_SELF_INTERSECTIONS_ERRORS</source>
-         <translation>Warning: there were errors during the operation, so the list may be incomplete.</translation>
+         <source>GEOM_FAST_CHECK_INTERSECTIONS</source>
+         <translation>Fast intersection</translation>
      </message>
      <message>
          <source>GEOM_CIRCLE</source>
      </message>
      <message>
          <source>GEOM_DIVIDE_EDGE_TITLE</source>
-         <translation>Addition of point</translation>
+         <translation>Addition of points</translation>
      </message>
      <message>
          <source>GEOM_DX</source>
          <source>GEOM_FACE_FFW</source>
          <translation>Face creation from wires and/or edges</translation>
      </message>
+     <message>
+         <source>GEOM_FACE_FROM_SURFACE</source>
+         <translation>Face creation from surface bounded by wire</translation>
+     </message>
      <message>
          <source>GEOM_FACE_OPT</source>
          <translation>Try to create a planar face</translation>
      </message>
+     <message>
+         <source>GEOM_FACE_FFWC</source>
+         <translation>Face creation from wire and constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_CONSTRAINTS</source>
+         <translation>Constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_FACE_CONSTRAINT</source>
+         <translation>Constraint Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SOLID_FROM_FACE_OPT</source>
+         <translation>Intersect/sew shapes</translation>
+     </message>
      <message>
          <source>MAKE_FACE_TOLERANCE_TOO_BIG</source>
          <translation>Cannot build a planar face: required tolerance is
      </message>
      <message>
          <source>GEOM_FILLING_COMPOUND</source>
-         <translation>Input compound</translation>
+         <translation>Input contours</translation>
      </message>
      <message>
          <source>GEOM_FILLING_MAX_DEG</source>
          <source>GEOM_FREE_FACES</source>
          <translation>Free faces</translation>
      </message>
+     <message>
+         <source>GEOM_FREE_FACES_NAME</source>
+         <translation>Free_face</translation>
+     </message>
      <message>
          <source>GEOM_FREE_FACES_TITLE</source>
          <translation>Free faces</translation>
          <source>GEOM_GLUE_EDGES_TITLE</source>
          <translation>Glue edges</translation>
      </message>
+     <message>
+         <source>GEOM_GLUE_EDGES_DETECT_TITLE</source>
+         <translation>Coincident edges detection</translation>
+     </message>
+     <message>
+         <source>GEOM_GLUE_FACES_DETECT_TITLE</source>
+         <translation>Coincident faces detection</translation>
+     </message>
      <message>
          <source>GLUE_ERROR_STICKED_SHAPES</source>
          <translation>The tolerance value is too big. Sticked shapes are detected.</translation>
          <translation>Division pattern</translation>
      </message>
      <message>
-         <source>GEOM_PROJECTION</source>
-         <translation>Projection</translation>
+         <source>GEOM_PROJECTION_ON_FACE</source>
+         <translation>Projection on Face</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJECTION_ON_WIRE</source>
+         <translation>Projection on Wire</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJECTION_ON_EDGE</source>
+         <translation>Projection on Edge</translation>
      </message>
      <message>
          <source>GEOM_PROJECTION_TITLE</source>
-         <translation>Projection on Face</translation>
+         <translation>Projection</translation>
      </message>
      <message>
-         <source>GEOM_SOURCE_OBJECT</source>
+         <source>GEOM_PROJ_ON_FACE_SOURCE</source>
          <translation>Source vertex, edge or wire</translation>
      </message>
+     <message>
+         <source>GEOM_PROJ_ON_FACE_TARGET</source>
+         <translation>Target face</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJ_ON_WIRE_SOURCE</source>
+         <translation>Source vertex</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJ_ON_WIRE_TARGET</source>
+         <translation>Target wire</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJ_ON_EDGE_SOURCE</source>
+         <translation>Source vertex</translation>
+     </message>
+     <message>
+         <source>GEOM_PROJ_ON_EDGE_TARGET</source>
+         <translation>Target edge</translation>
+     </message>
      <message>
          <source>GEOM_SOLUTION</source>
          <translation>Solution :</translation>
          <source>GEOM_SOLUTION_I</source>
          <translation>Solution %1</translation>
      </message>
-     <message>
-         <source>GEOM_TARGET_OBJECT</source>
-         <translation>Target face</translation>
-     </message>
      <message>
          <source>GEOM_WITH_CONTACT</source>
          <translation>With contact</translation>
      </message>
      <message>
          <source>GEOM_SECTION</source>
-         <translation>Section</translation>
+         <translation>Intersection</translation>
      </message>
      <message>
          <source>GEOM_SECTION_TITLE</source>
-         <translation>Section Of Two Objects</translation>
+         <translation>Intersection Of Two Objects</translation>
      </message>
      <message>
          <source>GEOM_SELECTED_FACE</source>
          <source>GEOM_SELECTED_SHAPE</source>
          <translation>Selected shape</translation>
      </message>
+     <message>
+         <source>GEOM_SELECTED_SHAPES</source>
+         <translation>Selected shapes</translation>
+     </message>
      <message>
          <source>GEOM_SELECTION</source>
          <translation>Selection</translation>
          <source>GEOM_SOLID_TITLE</source>
          <translation>Solid Construction</translation>
      </message>
+     <message>
+         <source>GEOM_SOLID_SHELLS</source>
+         <translation>Make Solid From Shells</translation>
+     </message>
+     <message>
+         <source>GEOM_SOLID_FACES</source>
+         <translation>Make Solid From Connected Set Of Faces/Shells</translation>
+     </message>
      <message>
          <source>GEOM_SPHERE</source>
          <translation>Sphere</translation>
      </message>
      <message>
          <source>GEOM_SUPRESSFACE</source>
 -        <translation>Supress Face</translation>
 +        <translation>Suppress Face</translation>
      </message>
      <message>
          <source>GEOM_SUPRESSFACE_SELECT</source>
          <source>MEN_CHECK_SELF_INTERSECTIONS</source>
          <translation>Detect Self-intersections</translation>
      </message>
+     <message>
+         <source>MEN_FAST_CHECK_INTERSECTIONS</source>
+         <translation>Fast intersection</translation>
+     </message>
      <message>
          <source>MEN_CHECK_FREE_BNDS</source>
          <translation>Check Free Boundaries</translation>
      </message>
      <message>
          <source>MEN_SECTION</source>
-         <translation>Section</translation>
+         <translation>Intersection</translation>
      </message>
      <message>
          <source>MEN_SELECT_ONLY</source>
          <source>MEN_ISOLINE</source>
          <translation>Isoline</translation>
      </message>
+     <message>
+         <source>MEN_SURFACE_FROM_FACE</source>
+         <translation>Surface From Face</translation>
+     </message>
      <message>
          <source>MEN_SOLID</source>
          <translation>Solid</translation>
      </message>
+     <message>
+         <source>MEN_SOLID_FROM_FACES</source>
+         <translation>Solid from connected faces</translation>
+     </message>
      <message>
          <source>MEN_SOLID_SEL_ONLY</source>
          <translation>Solid</translation>
          <source>MEN_POP_PREDEF_MATER_CUSTOM</source>
          <translation>Custom...</translation>
      </message>
+     <message>
+         <source>MEN_EDGE_EXTEND</source>
+         <translation>Extended Edge</translation>
+     </message>
+     <message>
+         <source>MEN_FACE_EXTEND</source>
+         <translation>Extended Face</translation>
+     </message>
      <message>
          <source>NAME_LBL</source>
          <translation>Name: </translation>
      </message>
      <message>
          <source>REMOVE_HOLES_NEW_OBJ_NAME</source>
 -        <translation>SupressHoles</translation>
 +        <translation>SuppressHoles</translation>
      </message>
      <message>
          <source>REMOVE_INT_WIRES_NEW_OBJ_NAME</source>
          <translation>Detect Self-intersections</translation>
      </message>
      <message>
+         <source>STB_FAST_CHECK_INTERSECTIONS</source>
+         <translation>Fast intersection</translation>
+    </message>
+    <message>
          <source>STB_CHECK_FREE_BNDS</source>
          <translation>Check free boundaries</translation>
      </message>
      </message>
      <message>
          <source>STB_SECTION</source>
-         <translation>Section</translation>
+         <translation>Intersection</translation>
      </message>
      <message>
          <source>STB_SEWING</source>
          <source>STB_ISOLINE</source>
          <translation>Create U- or V-Isoline</translation>
      </message>
+     <message>
+         <source>STB_SURFACE_FROM_FACE</source>
+         <translation>Create a Surface From Face</translation>
+     </message>
      <message>
          <source>STB_SOLID</source>
          <translation>Build a solid</translation>
      </message>
      <message>
          <source>SUPRESS_FACE_NEW_OBJ_NAME</source>
 -        <translation>SupressFaces</translation>
 +        <translation>SuppressFaces</translation>
      </message>
      <message>
          <source>ShHealOper_ErrorExecution_msg</source>
          <source>TOP_CHECK_SELF_INTERSECTIONS</source>
          <translation>Detect Self-intersections</translation>
      </message>
+     <message>
+         <source>TOP_FAST_CHECK_INTERSECTIONS</source>
+         <translation>Fast intersection</translation>
+     </message>
      <message>
          <source>TOP_CHECK_FREE_BNDS</source>
          <translation>Check free boundaries</translation>
      </message>
      <message>
          <source>TOP_SECTION</source>
-         <translation>Section</translation>
+         <translation>Intersection</translation>
      </message>
      <message>
          <source>TOP_SEWING</source>
          <source>TOP_ISOLINE</source>
          <translation>Isoline</translation>
      </message>
+     <message>
+         <source>TOP_SURFACE_FROM_FACE</source>
+         <translation>Surface From Face</translation>
+     </message>
      <message>
          <source>TOP_SOLID</source>
          <translation>Build solid</translation>
      </message>
      <message>
          <source>GEOM_REMOVE_WEBS</source>
-         <translation>Compound of solids</translation>
+         <translation>Solids</translation>
      </message>
      <message>
          <source>REMOVE_WEBS_NEW_OBJ_NAME</source>
          <source>STB_UNION_FACES</source>
          <translation>Union faces</translation>
      </message>
+     <message>
+         <source>TOP_INSPECT_OBJECT</source>
+         <translation>Inspect Object</translation>
+     </message>
+     <message>
+         <source>MEN_INSPECT_OBJECT</source>
+         <translation>Inspect Object</translation>
+     </message>
+     <message>
+         <source>STB_INSPECT_OBJECT</source>
+         <translation>Inspect Object</translation>
+     </message>
      <message>
          <source>TOP_NORMALE</source>
          <translation>Normal to a face</translation>
          <source>STB_GET_SHARED_SHAPES</source>
          <translation>Get shared shapes</translation>
      </message>
+     <message>
+         <source>TOP_TRANSFER_DATA</source>
+         <translation>Transfer Data</translation>
+     </message>
+     <message>
+         <source>MEN_TRANSFER_DATA</source>
+         <translation>Transfer Data</translation>
+     </message>
+     <message>
+         <source>STB_TRANSFER_DATA</source>
+         <translation>Transfer Data</translation>
+     </message>
+     <message>
+         <source>TOP_EXTENSION</source>
+         <translation>Extend Edge or Face</translation>
+     </message>
+     <message>
+         <source>MEN_EXTENSION</source>
+         <translation>Extension</translation>
+     </message>
+     <message>
+         <source>STB_EXTENSION</source>
+         <translation>Extend Edge or Face</translation>
+     </message>
      <message>
          <source>GEOM_PUBLISH_RESULT_GRP</source>
          <translation>Advanced options</translation>
@@@ -5112,6 -5244,46 +5248,46 @@@ shells and solids on the other hand.</t
          <source>CC_PNT_ITEM_X_Y_Z</source>
          <translation>X=%1, Y=%2, Z=%3</translation>
      </message>
+     <message>
+         <source>GEOM_FILTER</source>
+         <translation>Filter</translation>
+     </message>
+     <message>
+         <source>GEOM_LESS_THAN</source>
+         <translation>Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_LESSOREQUAL_THAN</source>
+         <translation>Equal or Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREAT_THAN</source>
+         <translation>Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREATOREQUAL_THAN</source>
+         <translation>Equal or Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_SOME_SHAPES_SELECTED</source>
+         <translation>%1 shape(s) has(have) been selected</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SHAPES_SELECTED</source>
+         <translation>There are no shapes that meet filtering parameters</translation>
+     </message>
+     <message>
+         <source>GEOM_HEALING_STATS_TITLE</source>
+         <translation>What is done</translation>
+     </message>
+     <message>
+         <source>GEOM_HEALING_STATS_COL_1</source>
+         <translation>Count</translation>
+     </message>
+     <message>
+         <source>GEOM_HEALING_STATS_COL_2</source>
+         <translation>Modication</translation>
+     </message>
  </context>
  <context>
      <name>GeometryGUI</name>
@@@ -6584,6 -6756,22 +6760,22 @@@ Please close this message box and selec
          <translation>Enabling this option may result in a very time-consuming operation for some input shapes.
  Would you like to continue?</translation>
      </message>
+     <message>
+         <source>WIDTH_FACTOR_TOL</source>
+         <translation>Width factor tol.</translation>
+     </message>
+     <message>
+         <source>VOLUME_TOL</source>
+         <translation>Volume tol.</translation>
+     </message>
+     <message>
+         <source>TO_MERGE_SOLIDS</source>
+         <translation>To merge solids</translation>
+     </message>
+     <message>
+         <source>SELECT_ALL</source>
+         <translation>Select All</translation>
+     </message>
  </context>
  <context>
      <name>GEOMToolsGUI_DeleteDlg</name>
@@@ -6771,6 -6959,10 +6963,10 @@@ Do you want to create new material?</tr
          <source>GEOM_SHARED_SHAPE</source>
          <translation>Shared_%1</translation>
      </message>
+     <message>
+         <source>GEOM_SHARED_SHAPES_MULTISHARE</source>
+         <translation>Shared by all</translation>
+     </message>
  </context>
  <context>
      <name>GEOMToolsGUI_PublishDlg</name>
          <translation>UnionFaces</translation>
      </message>
  </context>
+ <context>
+     <name>RepairGUI_InspectObjectDlg</name>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_TITLE</source>
+         <translation>Inspect object</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_MAIN_SHAPE</source>
+         <translation>Main shape</translation>
+     </message>
+     <message>
+     <source>GEOM_INSPECT_OBJECT_SHOW</source>
+         <translation>Show Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_SHOW_ONLY</source>
+         <translation>Show Only Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_HIDE</source>
+         <translation>Hide Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_PUBLISH</source>
+         <translation>Publish Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_NAME</source>
+         <translation>Name</translation>
+     </message>
+ </context>
  <context>
      <name>GEOMGUI_CreationInfoWdg</name>
      <message>
          <translation>V-Isoline</translation>
      </message>
  </context>
+ <context>
+     <name>MeasureGUI_CheckSelfIntersectionsDlg</name>
+     <message>
+         <source>GEOM_CHECK_INTE_INTERSECTIONS</source>
+         <translation>Self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUBSHAPES</source>
+         <translation>Sub-shapes</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_CHECK_LEVEL</source>
+         <translation>Level of check</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUMMARY</source>
+         <translation>Summary</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_COMPUTE</source>
+         <translation>Compute self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTION_NAME</source>
+         <translation>Self_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SELF_INTERSECTIONS</source>
+         <translation>There are no self-intersections in the shape</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTIONS_FOUND</source>
+         <translation>Some self-intersections detected</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
+         <translation>Detection of self-intersections failed</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_ERRORS</source>
+         <translation>Warning: there were errors during the operation, so the list may be incomplete.</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_V</source>
+         <translation>Vertex to Vertex</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_E</source>
+         <translation>Vertex to Edge + all above</translation>
+     </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_E</source>
+     <translation>Edge to Edge + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_V_F</source>
+     <translation>Vertex to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_F</source>
+     <translation>Edge to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_ALL</source>
+     <translation>Face to Face + all above</translation>
+   </message>
+ </context>
+ <context>
+     <name>MeasureGUI_FastCheckIntersectionsDlg</name>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DEFLECT</source>
+         <translation>Deflection coefficient</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DETECT_GAPS</source>
+         <translation>Detect gaps with tolerance</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_SUBSHAPES</source>
+         <translation>Sub-shapes of Object %1:</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_COMPUTE</source>
+         <translation>Compute intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_NAME</source>
+         <translation>Fast_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_FAILS</source>
+         <translation>No intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_OBJ</source>
+         <translation>Objects And Results</translation>
+     </message>
+ </context>
+ <context>
+     <name>TransformationGUI_ExtensionDlg</name>
+     <message>
+         <source>GEOM_EXTENSION_TITLE</source>
+         <translation>Extension of Edge or Face</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION</source>
+         <translation>Extension</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN</source>
+         <translation>First Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX</source>
+         <translation>Last Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_U</source>
+         <translation>First U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_U</source>
+         <translation>Last U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_V</source>
+         <translation>First V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_V</source>
+         <translation>Last V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_EDGE_NAME</source>
+         <translation>ExtendedEdge</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_FACE_NAME</source>
+         <translation>ExtendedFace</translation>
+     </message>
+ </context>
+ <context>
+     <name>EntityGUI_SurfFromFaceDlg</name>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_TITLE</source>
+         <translation>Surface From Face Construction</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE</source>
+         <translation>Surface From Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_NAME</source>
+         <translation>SurfaceFromFace</translation>
+     </message>
+ </context>
+ <context>
+     <name>OperationGUI_TransferDataDlg</name>
+     <message>
+         <source>GEOM_TRANSFER_DATA_TITLE</source>
+         <translation>Transfer Data</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA</source>
+         <translation>Transfer Data</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_FROM</source>
+         <translation>Source Shape</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_TO</source>
+         <translation>Destination Shape</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_METHOD</source>
+         <translation>Type of Detection Operation</translation>
+     </message>
+     <message>
+         <source>GEOM_TD_METHOD_GETINPLACE</source>
+         <translation>Get In Place</translation>
+     </message>
+     <message>
+         <source>GEOM_TD_METHOD_GETINPLACE_OLD</source>
+         <translation>Get In Place (old)</translation>
+     </message>
+     <message>
+         <source>GEOM_TD_METHOD_GETINPLACE_HISTORY</source>
+         <translation>Get In Place By History</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_INFO</source>
+         <translation>Transfer Data: Information</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_NOT_COPIED</source>
+         <translation>There is nothing to be copied.</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_COPIED</source>
+         <translation>The following data are copied:</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_NAMES</source>
+         <translation>Names: %1 of %2</translation>
+     </message>
+     <message>
+         <source>GEOM_TRANSFER_DATA_MATERIALS</source>
+         <translation>Materials: %1 of %2</translation>
+     </message>
+ </context>
  </TS>
index 78b45c0bdc898643baebac3b5730ddedd083b56a,c2bb2c69048fcda74ceb6ff90adda1a14d2cd19a..e3e610c0b8db2b0c86383e160b7f648c59c09111
@@@ -38,7 -38,7 +38,7 @@@
      <message>
          <source>DEP_OBJECT</source>
          <translation>L&apos;objet choisi a été utilisé pour créer un autre objet ou est référencé par un autre module.
 -La suppression de cet objet peut entrainer un export python invalide. 
 +La suppression de cet objet peut entrainer un export python invalide.
  
  Voulez-vous tout de même supprimer ces objets ?</translation>
      </message>
@@@ -185,7 -185,7 +185,7 @@@ Choisissez une face, une coque ou un so
      </message>
      <message>
          <source>GEOM_BEZIER</source>
 -        <translation>Bezier</translation>
 +        <translation>Bézier</translation>
      </message>
      <message>
          <source>GEOM_BINORMAL</source>
      </message>
      <message>
          <source>GEOM_BNDBOX_TITLE</source>
 -        <translation>Boîte englobante</translation>
 +        <translation>Informations sur la Boîte englobante</translation>
      </message>
      <message>
          <source>GEOM_BOX</source>
 -        <translation>Boite</translation>
 +        <translation>Boîte</translation>
      </message>
      <message>
          <source>GEOM_BOX_OBJ</source>
      </message>
      <message>
          <source>GEOM_BSplineRestriction</source>
 -        <translation>Limitation BSpline</translation>
 +        <translation>LimitationB-Spline</translation>
      </message>
      <message>
          <source>GEOM_BUT_APPLY</source>
      </message>
      <message>
          <source>GEOM_CHAMFER_FACES</source>
 -        <translation>Chanfrein sur des faces</translation>
 +        <translation>Chanfrein sur les faces sélectionnées</translation>
      </message>
      <message>
          <source>GEOM_CHAMFER_TITLE</source>
      </message>
      <message>
          <source>GEOM_GETNONBLOCKS_TITLE</source>
 -        <translation>Récupérer les solides non-hexahédres et les faces non-quadrangles</translation>
 +        <translation>Récupérer les solides qui ne sontpas des hexahédres et les faces qui ne sont pas des quadrangles</translation>
      </message>
      <message>
          <source>GEOM_GETNONBLOCKS</source>
 -        <translation>Récupérer les solides non blocs</translation>
 +        <translation>Récupérer les solides qui ne sont pas des blocs</translation>
      </message>
      <message>
          <source>GEOM_NONBLOCKS</source>
      </message>
      <message>
          <source>GEOM_CHECK_INFOS</source>
 -        <translation>Objet et son information topologique</translation>
 +        <translation>Objet et ses informations topologiques</translation>
      </message>
      <message>
          <source>GEOM_CHECK_SHAPE</source>
          <source>GEOM_CHECK_SELF_INTERSECTIONS</source>
          <translation>Détecter les auto-intersections</translation>
      </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
          <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
          <translation>La détection d&apos;auto-intersections a échoué</translation>
      </message>
      <message>
          <source>GEOM_CYLINDER_ANGLE_ERR</source>
 -        <translation>Les valeurs de l'angle 0 et 360 sont à éviter pour construire des volumes sains. Veuillez décocher la case "Angle" pour utiliser le constructeur de cylindre complet.</translation>
 +        <translation>Les valeurs de l&apos;angle 0 et 360 sont à éviter pour construire des volumes sains. Veuillez décocher la case &quot;Angle&quot; pour utiliser le constructeur de cylindre complet.</translation>
      </message>
      <message>
          <source>GEOM_D1</source>
          <source>GEOM_FACE_OPT</source>
          <translation>Privilégier la création d&apos;une face plane</translation>
      </message>
+     <message>
+         <source>GEOM_FACE_FFWC</source>
+         <translation type="unfinished">Face creation from wire and constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_CONSTRAINTS</source>
+         <translation type="unfinished">Constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_FACE_CONSTRAINT</source>
+         <translation type="unfinished">Constraint Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SOLID_FROM_FACE_OPT</source>
+         <translation type="unfinished">Intersect/sew shapes</translation>
+     </message>
      <message>
          <source>MAKE_FACE_TOLERANCE_TOO_BIG</source>
          <translation>Impossible de construire une face plane: 
          <source>GEOM_SOLID_TITLE</source>
          <translation>Construction d&apos;un solide</translation>
      </message>
+     <message>
+         <source>GEOM_SOLID_SHELLS</source>
+         <translation type="unfinished">Make Solid From Shells</translation>
+     </message>
+     <message>
+         <source>GEOM_SOLID_FACES</source>
+         <translation type="unfinished">Make Solid From Connected Set Of Faces/Shells</translation>
+     </message>
      <message>
          <source>GEOM_SPHERE</source>
          <translation>Sphère</translation>
          <source>MEN_CHECK_SELF_INTERSECTIONS</source>
          <translation>Détections des auto-intersections</translation>
      </message>
+     <message>
+         <source>MEN_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
          <source>MEN_CHECK_FREE_BNDS</source>
          <translation>Contrôler les contours libres</translation>
      </message>
      <message>
          <source>MEN_POP_VERTICES</source>
 -        <translation type="unfinished">Show Vertices</translation>
 +        <translation>Montrer les sommets</translation>
      </message>
      <message>
          <source>MEN_PREFERENCES</source>
          <source>MEN_SOLID</source>
          <translation>Solide</translation>
      </message>
+     <message>
+         <source>MEN_SOLID_FROM_FACES</source>
+         <translation type="unfinished">Solid from connected faces</translation>
+     </message>
      <message>
          <source>MEN_SOLID_SEL_ONLY</source>
          <translation>Solide</translation>
      </message>
      <message>
          <source>MEN_VERTICES_MODE_ON</source>
 -        <translation type="unfinished">Show Vertices</translation>
 +        <translation>Montrer les sommets</translation>
      </message>
      <message>
          <source>MEN_VERTICES_MODE_OFF</source>
 -        <translation type="unfinished">Hide Vertices</translation>
 +        <translation>Cacher les sommets</translation>
      </message>
      <message>
          <source>MEN_WIREFRAME</source>
          <source>STB_CHECK_SELF_INTERSECTIONS</source>
          <translation>Détecte les auto-intersections</translation>
      </message>
+     <message>
+         <source>STB_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+    </message>
      <message>
          <source>STB_CHECK_FREE_BNDS</source>
          <translation>Vérifier les contours libres</translation>
      </message>
      <message>
          <source>STB_POP_VERTICES</source>
 -        <translation type="unfinished">Show Vertices</translation>
 +        <translation>Montrer les sommets</translation>
      </message>
      <message>
          <source>STB_POP_SETTEXTURE</source>
          <source>TOP_CHECK_SELF_INTERSECTIONS</source>
          <translation>Détection des auto-intersections</translation>
      </message>
+     <message>
+         <source>TOP_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
          <source>TOP_CHECK_FREE_BNDS</source>
          <translation>Valider les contours libres</translation>
          <source>STB_UNION_FACES</source>
          <translation>Unir les faces</translation>
      </message>
+     <message>
+         <source>TOP_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
+     <message>
+         <source>MEN_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
+     <message>
+         <source>STB_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
      <message>
          <source>TOP_NORMALE</source>
          <translation>Vecteur normal à une face</translation>
      </message>
      <message>
          <source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
 -        <translation type="unfinished">Show dependency tree</translation>
 +        <translation>Montrer l&apos;arbre des dépendances</translation>
      </message>
      <message>
          <source>MEN_POP_SHOW_REDUCE_STUDY</source>
 -        <translation type="unfinished">Reduce study</translation>
 +        <translation>Etude réduite</translation>
      </message>
      <message>
          <source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
      </message>
      <message>
          <source>PREF_TAB_DEPENDENCY_VIEW</source>
 -        <translation type="unfinished">Dependency Tree</translation>
 +        <translation>Arbre des dépendances</translation>
      </message>
      <message>
          <source>PREF_HIERARCHY_TYPE</source>
 -        <translation type="unfinished">Hierarchy type</translation>
 +        <translation>Type de hiérarchie</translation>
      </message>
      <message>
          <source>MEN_ONLY_ASCENDANTS</source>
 -        <translation type="unfinished">Display only ascendants tree</translation>
 +        <translation>Montrer seulement les liens ascendants</translation>
      </message>
      <message>
          <source>MEN_ONLY_DESCENDANTS</source>
 -        <translation type="unfinished">Display only descendants tree</translation>
 +        <translation>Montrer seulement les liens descendants</translation>
      </message>
      <message>
          <source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
 -        <translation type="unfinished">Display both ascendants and descendants trees</translation>
 +        <translation>Montrer les liens ascendants et descendants</translation>
      </message>
      <message>
          <source>GEOM_MOVE_POSSIBILITY</source>
 -        <translation type="unfinished">Possibility to move nodes</translation>
 +        <translation>Possibilité de déplacer des noeuds</translation>
      </message>
      <message>
          <source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
 -        <translation type="unfinished">Color</translation>
 +        <translation>Couleur</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
 -        <translation type="unfinished">Background color</translation>
 +        <translation>Couleur du fond</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
 -        <translation type="unfinished">Default node color</translation>
 +        <translation>Couleur des noeuds par défaut</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
 -        <translation type="unfinished">Main node color</translation>
 +        <translation>Couleur des noeuds principaux</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
 -        <translation type="unfinished">Unpublished node color</translation>
 +        <translation>Couleur des noeuds non publiés</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
 -        <translation type="unfinished">Selected node color</translation>
 +        <translation>Couleurs des noeuds sélectionnés</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
 -        <translation type="unfinished">Arrow color</translation>
 +        <translation>Couleur des flèches par défaut</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
 -        <translation type="unfinished">Highlighted arrow color</translation>
 +        <translation>Couleur des flèches en surbrillance</translation>
      </message>
      <message>
          <source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
 -        <translation type="unfinished">Selected arrow color</translation>
 +        <translation>Couleur des flèches sélectionnées</translation>
      </message>
      <message>
          <source>GEOM_ALL_IMPORT_FILES</source>
@@@ -5100,6 -5156,34 +5156,34 @@@ le paramètre &apos;%1&apos; aux préfÃ
          <source>CC_PNT_ITEM_X_Y_Z</source>
          <translation>X=%1, Y=%2, Z=%3</translation>
      </message>
+     <message>
+         <source>GEOM_FILTER</source>
+         <translation type="unfinished">Filter</translation>
+     </message>
+     <message>
+         <source>GEOM_LESS_THAN</source>
+         <translation type="unfinished">Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_LESSOREQUAL_THAN</source>
+         <translation type="unfinished">Equal or Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREAT_THAN</source>
+         <translation type="unfinished">Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREATOREQUAL_THAN</source>
+         <translation type="unfinished">Equal or Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_SOME_SHAPES_SELECTED</source>
+         <translation type="unfinished">%1 shape(s) has(have) been selected</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SHAPES_SELECTED</source>
+         <translation type="unfinished">There are no shapes that meet filtering parameters</translation>
+     </message>
  </context>
  <context>
      <name>GeometryGUI</name>
@@@ -6612,6 -6696,22 +6696,22 @@@ Fermez cette boîte d&apos;alerte et ch
          <translation>L&apos;activation de cette option peut résulter en une perte de temps sur certains objets.
  Voulez-vous continuer?</translation>
      </message>
+     <message>
+         <source>WIDTH_FACTOR_TOL</source>
+         <translation type="unfinished">Width factor tol.</translation>
+     </message>
+     <message>
+         <source>VOLUME_TOL</source>
+         <translation type="unfinished">Volume tol.</translation>
+     </message>
+     <message>
+         <source>TO_MERGE_SOLIDS</source>
+         <translation type="unfinished">To merge solids</translation>
+     </message>
+     <message>
+         <source>SELECT_ALL</source>
+         <translation>Tout sélectionner</translation>
+     </message>
  </context>
  <context>
      <name>GEOMToolsGUI_DeleteDlg</name>
@@@ -6799,6 -6899,10 +6899,10 @@@ Voulez-vous en créer un nouveau ?</tra
          <source>GEOM_SHARED_SHAPE</source>
          <translation>Partagé_%1</translation>
      </message>
+     <message>
+         <source>GEOM_SHARED_SHAPES_MULTISHARE</source>
+         <translation type="unfinished">Shared by all</translation>
+     </message>
  </context>
  <context>
      <name>GEOMToolsGUI_PublishDlg</name>
      <name>GEOMToolsGUI_ReduceStudyDlg</name>
      <message>
          <source>GEOM_REDUCE_STUDY_TITLE</source>
 -        <translation type="unfinished">Reduce study</translation>
 +        <translation>Etude réduite</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_KEPT_OBJECTS</source>
 -        <translation type="unfinished">Objects to be kept</translation>
 +        <translation>Objets à conserver</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_REMOVE_OBJECTS</source>
 -        <translation type="unfinished">Objects to be removed</translation>
 +        <translation>Objets à enlever</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_NAME</source>
 -        <translation type="unfinished">Name</translation>
 +        <translation>Nom</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_OPTIONS</source>
 -        <translation type="unfinished">Options</translation>
 +        <translation>Options</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_INTERMEDIATES</source>
 -        <translation type="unfinished">Intermediate objects</translation>
 +        <translation>Objets intermédiaires</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_SUB_OBJECTS</source>
 -        <translation type="unfinished">Sub-objects</translation>
 +        <translation>Sous-objets</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_KEEP</source>
 -        <translation type="unfinished">Keep</translation>
 +        <translation>Conserver</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_UNPUBLISH</source>
 -        <translation type="unfinished">Unpublish</translation>
 +        <translation>Dépublier</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_REMOVE</source>
 -        <translation type="unfinished">Remove</translation>
 +        <translation>Enlever</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_REMOVE_EMPTY_FOLDER</source>
 -        <translation type="unfinished">Remove empty folders</translation>
 +        <translation>Enlever les dossiers vide</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_SOFT_REMOVAL</source>
 -        <translation type="unfinished">Soft removal</translation>
 +        <translation>Dépublication seulement</translation>
      </message>
      <message>
          <source>GEOM_REDUCE_STUDY_WARNING_DELETE</source>
 -        <translation type="unfinished">Do you really want to delete intermediate objects? After applying this operation study will be broken.</translation>
 +        <translation>Voulez-vous vraiment supprimer les objets intermédiaires ? Après la confirmation de cette opération, l&apos;étude sera cassée.</translation>
      </message>
  </context>
  <context>
          <translation>UnirFaces</translation>
      </message>
  </context>
+ <context>
+     <name>RepairGUI_InspectObjectDlg</name>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_TITLE</source>
+         <translation type="unfinished">Inspect object</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_MAIN_SHAPE</source>
+         <translation type="unfinished">Main shape</translation>
+     </message>
+     <message>
+     <source>GEOM_INSPECT_OBJECT_SHOW</source>
+         <translation type="unfinished">Show Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_SHOW_ONLY</source>
+         <translation type="unfinished">Show Only Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_HIDE</source>
+         <translation type="unfinished">Hide Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_PUBLISH</source>
+         <translation type="unfinished">Publish Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_NAME</source>
+         <translation type="unfinished">Name</translation>
+     </message>
+ </context>
  <context>
      <name>GEOMGUI_CreationInfoWdg</name>
      <message>
          <translation>V-Isoligne</translation>
      </message>
  </context>
+ <context>
+     <name>MeasureGUI_CheckSelfIntersectionsDlg</name>
+     <message>
+         <source>GEOM_CHECK_INTE_INTERSECTIONS</source>
+         <translation type="unfinished">Self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUBSHAPES</source>
+         <translation type="unfinished">Sub-shapes</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_CHECK_LEVEL</source>
+         <translation type="unfinished">Level of check</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUMMARY</source>
+         <translation type="unfinished">Summary</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_COMPUTE</source>
+         <translation type="unfinished">Compute self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTION_NAME</source>
+         <translation type="unfinished">Self_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SELF_INTERSECTIONS</source>
+         <translation type="unfinished">There are no self-intersections in the shape</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTIONS_FOUND</source>
+         <translation type="unfinished">Some self-intersections detected</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
+         <translation type="unfinished">Detection of self-intersections failed</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_ERRORS</source>
+         <translation type="unfinished">Warning: there were errors during the operation, so the list may be incomplete.</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_V</source>
+         <translation type="unfinished">Vertex to Vertex</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_E</source>
+         <translation type="unfinished">Vertex to Edge + all above</translation>
+     </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_E</source>
+     <translation type="unfinished">Edge to Edge + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_V_F</source>
+     <translation type="unfinished">Vertex to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_F</source>
+     <translation type="unfinished">Edge to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_ALL</source>
+     <translation type="unfinished">Face to Face + all above</translation>
+   </message>
+ </context>
+ <context>
+     <name>MeasureGUI_FastCheckIntersectionsDlg</name>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DEFLECT</source>
+         <translation type="unfinished">Deflection coefficient</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DETECT_GAPS</source>
+         <translation type="unfinished">Detect gaps with tolerance</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_SUBSHAPES</source>
+         <translation type="unfinished">Sub-shapes of Object %1:</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_COMPUTE</source>
+         <translation type="unfinished">Compute intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_NAME</source>
+         <translation type="unfinished">Fast_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_FAILS</source>
+         <translation type="unfinished">No intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_OBJ</source>
+         <translation type="unfinished">Objects And Results</translation>
+     </message>
+ </context>
+ <context>
+     <name>TransformationGUI_ExtensionDlg</name>
+     <message>
+         <source>GEOM_EXTENSION_TITLE</source>
+         <translation type="unfinished">Extension of Edge or Face</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION</source>
+         <translation type="unfinished">Extension</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN</source>
+         <translation type="unfinished">First Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX</source>
+         <translation type="unfinished">Last Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_U</source>
+         <translation type="unfinished">First U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_U</source>
+         <translation type="unfinished">Last U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_V</source>
+         <translation type="unfinished">First V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_V</source>
+         <translation type="unfinished">Last V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_EDGE_NAME</source>
+         <translation type="unfinished">ExtendedEdge</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_FACE_NAME</source>
+         <translation type="unfinished">ExtendedFace</translation>
+     </message>
+ </context>
+ <context>
+     <name>EntityGUI_SurfFromFaceDlg</name>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_TITLE</source>
+         <translation type="unfinished">Surface From Face Construction</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE</source>
+         <translation type="unfinished">Surface From Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_NAME</source>
+         <translation type="unfinished">SurfaceFromFace</translation>
+     </message>
+ </context>
  </TS>
index ea954d1af3d08ed7ff30e0d6c3e44679ccad3497,ae9d818df91d34e1476120f1b65df9fdd2dac10b..a8e0ee46ac87cf0deecfe7085fae41643cc8d2b9
        <source>GEOM_CHECK_SELF_INTERSECTIONS</source>
        <translation>自己交差の検出</translation>
      </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
        <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
        <translation>自己交差の検出に失敗しました</translation>
        <source>GEOM_CYLINDER_TITLE</source>
        <translation>円柱の作成</translation>
      </message>
 +    <message>
 +      <source>GEOM_CYLINDER_ANGLE_ERR</source>
 +      <translation type="unfinished">Angle values 0 and 360 are unsafe to build proper volumes. Please uncheck the "Angle" box to use the regular cylinder constructor.</translation>
 +    </message>
      <message>
        <source>GEOM_D1</source>
        <translation>D1 を:</translation>
        <source>GEOM_FACE_OPT</source>
        <translation>平らなフェースを作成</translation>
      </message>
+     <message>
+         <source>GEOM_FACE_FFWC</source>
+         <translation type="unfinished">Face creation from wire and constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_CONSTRAINTS</source>
+         <translation type="unfinished">Constraints</translation>
+     </message>
+     <message>
+         <source>GEOM_FACE_CONSTRAINT</source>
+         <translation type="unfinished">Constraint Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SOLID_FROM_FACE_OPT</source>
+         <translation type="unfinished">Intersect/sew shapes</translation>
+     </message>
      <message>
        <source>MAKE_FACE_TOLERANCE_TOO_BIG</source>
        <translation>平坦な面を作成できません: 作成された顔があまりにも高い耐性</translation>
      </message>
      <message>
        <source>GEOM_PRP_EXPORT</source>
 -      <translation>ジオメトリを %1 にエクスポート</translation>
 +      <translation>ジオメトリを %1 にエクスポート...</translation>
      </message>
      <message>
        <source>GEOM_PRP_LOADING</source>
        <source>GEOM_SOLID_TITLE</source>
        <translation>ソリッドの構築</translation>
      </message>
+     <message>
+       <source>GEOM_SOLID_SHELLS</source>
+       <translation type="unfinished">Make Solid From Shells</translation>
+     </message>
+     <message>
+       <source>GEOM_SOLID_FACES</source>
+       <translation type="unfinished">Make Solid From Connected Set Of Faces/Shells</translation>
+     </message>
      <message>
        <source>GEOM_SPHERE</source>
        <translation>Sphere</translation>
        <source>MEN_CURVE_CREATOR</source>
        <translation>カーブの作成</translation>
      </message>
 +    <message>
 +      <source>TOP_CURVE_CREATOR</source>
 +      <translation type="unfinished">Create 2D polyline</translation>
 +    </message>
 +    <message>
 +      <source>STB_CURVE_CREATOR</source>
 +      <translation type="unfinished">Create 2D polyline</translation>
 +    </message>
      <message>
        <source>MEN_ALL_SEL_ONLY</source>
        <translation>全選択</translation>
        <source>MEN_CHECK_SELF_INTERSECTIONS</source>
        <translation>自己交差の確認</translation>
      </message>
+     <message>
+         <source>MEN_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
        <source>MEN_CHECK_FREE_BNDS</source>
        <translation>自由境界の確認</translation>
      </message>
      <message>
        <source>MEN_IMPORT</source>
 -      <translation>インポート</translation>
 +      <translation>インポート...</translation>
      </message>
      <message>
        <source>MEN_INERTIA</source>
        <source>MEN_SOLID</source>
        <translation>ソリッド</translation>
      </message>
+     <message>
+         <source>MEN_SOLID_FROM_FACES</source>
+         <translation type="unfinished">Solid from connected faces</translation>
+     </message>
      <message>
        <source>MEN_SOLID_SEL_ONLY</source>
        <translation>ソリッド</translation>
        <translation>表示モード</translation>
      </message>
      <message>
 -        <source>PREF_TRANSPARENCY</source>
 -        <translation>透明度</translation>
 +      <source>PREF_TRANSPARENCY</source>
 +      <translation>透明度</translation>
      </message>
      <message>
        <source>PREF_FREE_BOUND_COLOR</source>
      </message>
      <message>
        <source>REMOVE_HOLES_NEW_OBJ_NAME</source>
 -      <translation>SupressHoles</translation>
 +      <translation>SuppressHoles</translation>
      </message>
      <message>
        <source>REMOVE_INT_WIRES_NEW_OBJ_NAME</source>
        <source>STB_CHECK_SELF_INTERSECTIONS</source>
        <translation>自己交差の確認</translation>
      </message>
+     <message>
+         <source>STB_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+    </message>
      <message>
        <source>STB_CHECK_FREE_BNDS</source>
        <translation>自由境界をチェック</translation>
      </message>
      <message>
        <source>SUPRESS_FACE_NEW_OBJ_NAME</source>
 -      <translation>SupressFaces</translation>
 +      <translation>SuppressFaces</translation>
      </message>
      <message>
        <source>ShHealOper_ErrorExecution_msg</source>
        <source>TOP_CHECK_SELF_INTERSECTIONS</source>
        <translation>自己交差の確認</translation>
      </message>
+     <message>
+         <source>TOP_FAST_CHECK_INTERSECTIONS</source>
+         <translation type="unfinished">Fast intersection</translation>
+     </message>
      <message>
        <source>TOP_CHECK_FREE_BNDS</source>
        <translation>自由境界を確認</translation>
        <source>STB_UNION_FACES</source>
        <translation>連合に直面しています。</translation>
      </message>
+     <message>
+         <source>TOP_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
+     <message>
+         <source>MEN_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
+     <message>
+         <source>STB_INSPECT_OBJECT</source>
+         <translation type="unfinished">Inspect Object</translation>
+     </message>
      <message>
        <source>TOP_NORMALE</source>
        <translation>フェースに垂直</translation>
        <translation>オブジェクトの基準寸法を管理</translation>
      </message>
      <message>
 -        <source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
 -        <translation type="unfinished">Show dependency tree</translation>
 +      <source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
 +      <translation type="unfinished">Show dependency tree</translation>
      </message>
      <message>
 -        <source>MEN_POP_SHOW_REDUCE_STUDY</source>
 -        <translation type="unfinished">Reduce study</translation>
 +      <source>MEN_POP_REDUCE_STUDY</source>
 +      <translation type="unfinished">Reduce study</translation>
      </message>
      <message>
        <source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
        <translation>プレビュー</translation>
      </message>
      <message>
 -        <source>PREF_TAB_DEPENDENCY_VIEW</source>
 -        <translation type="unfinished">Dependency Tree</translation>
 +      <source>PREF_TAB_DEPENDENCY_VIEW</source>
 +      <translation type="unfinished">Dependency Tree</translation>
      </message>
      <message>
 -        <source>PREF_HIERARCHY_TYPE</source>
 -        <translation type="unfinished">Hierarchy type</translation>
 +      <source>PREF_HIERARCHY_TYPE</source>
 +      <translation type="unfinished">Hierarchy type</translation>
      </message>
      <message>
 -        <source>MEN_ONLY_ASCENDANTS</source>
 -        <translation type="unfinished">Display only ascendants tree</translation>
 +      <source>MEN_ONLY_ASCENDANTS</source>
 +      <translation type="unfinished">Display only ascendants tree</translation>
      </message>
      <message>
 -        <source>MEN_ONLY_DESCENDANTS</source>
 -        <translation type="unfinished">Display only descendants tree</translation>
 +      <source>MEN_ONLY_DESCENDANTS</source>
 +      <translation type="unfinished">Display only descendants tree</translation>
      </message>
      <message>
 -        <source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
 -        <translation type="unfinished">Display both ascendants and descendants trees</translation>
 +      <source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
 +      <translation type="unfinished">Display both ascendants and descendants trees</translation>
      </message>
      <message>
 -        <source>GEOM_MOVE_POSSIBILITY</source>
 -        <translation type="unfinished">Possibility to move nodes</translation>
 +      <source>GEOM_MOVE_POSSIBILITY</source>
 +      <translation type="unfinished">Possibility to move nodes</translation>
      </message>
      <message>
 -        <source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
 -        <translation type="unfinished">Color</translation>
 +      <source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
 +      <translation type="unfinished">Color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
 -        <translation type="unfinished">Background color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
 +      <translation type="unfinished">Background color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
 -        <translation type="unfinished">Default node color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
 +      <translation type="unfinished">Default node color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
 -        <translation type="unfinished">Main node color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
 +      <translation type="unfinished">Main node color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
 -        <translation type="unfinished">Unpublished node color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
 +      <translation type="unfinished">Unpublished node color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
 -        <translation type="unfinished">Selected node color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
 +      <translation type="unfinished">Selected node color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
 -        <translation type="unfinished">Arrow color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
 +      <translation type="unfinished">Default arrow color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
 -        <translation type="unfinished">Highlighted arrow color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
 +      <translation type="unfinished">Highlighted arrow color</translation>
      </message>
      <message>
 -        <source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
 -        <translation type="unfinished">Selected arrow color</translation>
 +      <source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
 +      <translation type="unfinished">Selected arrow color</translation>
      </message>
      <message>
        <source>GEOM_ALL_IMPORT_FILES</source>
        <source>CC_PNT_ITEM_X_Y_Z</source>
        <translation>X=%1, Y=%2, Z=%3</translation>
      </message>
+     <message>
+         <source>GEOM_FILTER</source>
+         <translation type="unfinished">Filter</translation>
+     </message>
+     <message>
+         <source>GEOM_LESS_THAN</source>
+         <translation type="unfinished">Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_LESSOREQUAL_THAN</source>
+         <translation type="unfinished">Equal or Less Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREAT_THAN</source>
+         <translation type="unfinished">Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_GREATOREQUAL_THAN</source>
+         <translation type="unfinished">Equal or Greater Than</translation>
+     </message>
+     <message>
+         <source>GEOM_SOME_SHAPES_SELECTED</source>
+         <translation type="unfinished">%1 shape(s) has(have) been selected</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SHAPES_SELECTED</source>
+         <translation type="unfinished">There are no shapes that meet filtering parameters</translation>
+     </message>
    </context>
    <context>
      <name>GeometryGUI</name>
      <message>
        <source>TOOL_BASIC</source>
 -      <translation>基礎オブジェクト</translation>
 +      <translation type="unfinished">Basic</translation>
      </message>
      <message>
        <source>TOOL_BLOCKS</source>
 -      <translation>ブロック分割</translation>
 +      <translation type="unfinished">Blocks</translation>
      </message>
      <message>
        <source>TOOL_BOOLEAN</source>
 -      <translation>ブーリアン操作</translation>
 +      <translation type="unfinished">Boolean operations</translation>
      </message>
      <message>
        <source>TOOL_FEATURES</source>
 -      <translation>フィーチャー</translation>
 +      <translation type="unfinished">Modification</translation>
      </message>
      <message>
        <source>TOOL_GENERATION</source>
 -      <translation>押し出し/回転</translation>
 +      <translation type="unfinished">Generation</translation>
      </message>
      <message>
        <source>TOOL_PRIMITIVES</source>
 -      <translation>基本図形</translation>
 +      <translation type="unfinished">Primitives</translation>
      </message>
      <message>
        <source>TOOL_TRANSFORMATION</source>
 -      <translation>変形/移動/回転</translation>
 +      <translation type="unfinished">Transformation</translation>
      </message>
      <message>
        <source>TOOL_BUILD</source>
 -      <translation>構築</translation>
 +      <translation type="unfinished">Build</translation>
      </message>
      <message>
        <source>TOOL_OPERATIONS</source>
 -      <translation>操作</translation>
 +      <translation type="unfinished">Operations</translation>
      </message>
      <message>
        <source>TOOL_PICTURES</source>
 -      <translation>画像</translation>
 +      <translation type="unfinished">Pictures</translation>
      </message>
      <message>
        <source>TOOL_ADVANCED</source>
 -      <translation>高度なツール</translation>
 +      <translation type="unfinished">Advanced</translation>
      </message>
      <message>
        <source>TOOL_MEASURES</source>
 -      <translation>情報/測定</translation>
 +      <translation type="unfinished">Measures</translation>
      </message>
      <message>
        <source>TOOL_IMPORTEXPORT</source>
 -      <translation>インポート/エクスポート</translation>
 +      <translation type="unfinished">Import / Export XAO</translation>
 +    </message>
 +    <message>
 +      <source>TABLE_SECTION</source>
 +      <translation type="unfinished">Section</translation>
 +    </message>
 +    <message>
 +      <source>TABLE_INDEX</source>
 +      <translation type="unfinished">Index</translation>
 +    </message>
 +    <message>
 +      <source>TABLE_X</source>
 +      <translation type="unfinished">X</translation>
 +    </message>
 +    <message>
 +      <source>TABLE_Y</source>
 +      <translation type="unfinished">Y</translation>
      </message>
    </context>
    <context>
        <translation>フェース 2 V</translation>
      </message>
    </context>
 -  <context>
 -    <name>CurveCreator_NewPointDlg</name>
 -    <message>
 -      <source>ADD_NEW_POINT</source>
 -      <translation>新しい点の追加</translation>
 -    </message>
 -    <message>
 -      <source>X_COORD</source>
 -      <translation>X</translation>
 -    </message>
 -    <message>
 -      <source>Y_COORD</source>
 -      <translation>Y</translation>
 -    </message>
 -    <message>
 -      <source>Z_COORD</source>
 -      <translation>Z</translation>
 -    </message>
 -    <message>
 -      <source>ADD_BTN</source>
 -      <translation>追加</translation>
 -    </message>
 -    <message>
 -      <source>ADD_CONTINUE_BTN</source>
 -      <translation>追加して継続</translation>
 -    </message>
 -    <message>
 -      <source>ADD_NEW_POINT_TO_%1</source>
 -      <translation>新しい点を%1に追加</translation>
 -    </message>
 -    <message>
 -      <source>SET_POINT_COORDINATES</source>
 -      <translation>点座標の設定</translation>
 -    </message>
 -  </context>
    <context>
      <name>CurveCreator_NewSectionDlg</name>
      <message>
 -      <source>NAME</source>
 -      <translation>名前</translation>
 +      <source>SECTION_NAME</source>
 +      <translation type="unfinished">Name</translation>
      </message>
      <message>
 -      <source>LINE_TYPE</source>
 -      <translation>ライン</translation>
 +      <source>SECTION_LINE_TYPE</source>
 +      <translation type="unfinished">Type</translation>
      </message>
      <message>
 -      <source>POLYLINE_TYPE</source>
 -      <translation>ポリライン</translation>
 +      <source>SECTION_POLYLINE_TYPE</source>
 +      <translation type="unfinished">Polyline</translation>
      </message>
      <message>
 -      <source>SPLINE_TYPE</source>
 -      <translation>スプライン</translation>
 +      <source>SECTION_SPLINE_TYPE</source>
 +      <translation type="unfinished">Spline</translation>
      </message>
      <message>
 -      <source>LINE_CLOSED</source>
 -      <translation>閉じたライン</translation>
 +      <source>SECTION_LINE_CLOSED</source>
 +      <translation type="unfinished">Closed</translation>
      </message>
      <message>
 -      <source>OK</source>
 -      <translation>Ok</translation>
 +      <source>SECTION_ADD_BTN</source>
 +      <translation type="unfinished">Add</translation>
      </message>
      <message>
 -      <source>ADD_BTN</source>
 -      <translation>追加</translation>
 +      <source>SECTION_OK_BTN</source>
 +      <translation type="unfinished">Ok</translation>
      </message>
      <message>
 -      <source>ADD_CONTINUE_BTN</source>
 -      <translation>追加して継続</translation>
 +      <source>SECTION_CANCEL_BTN</source>
 +      <translation type="unfinished">Cancel</translation>
      </message>
      <message>
        <source>ADD_NEW_SECTION</source>
      <name>CurveCreator_TreeViewModel</name>
      <message>
        <source>X=%1, Y=%2</source>
 -      <translation>X=%1, Y=%2</translation>
 +      <translation type="unfinished">X=%1, Y=%2</translation>
      </message>
      <message>
        <source>X=%1, Y=%2, Z=%3</source>
 -      <translation>X=%1, Y=%2, Z=%3</translation>
 +      <translation type="unfinished">X=%1, Y=%2, Z=%3</translation>
      </message>
    </context>
    <context>
      <name>CurveCreator_Widget</name>
      <message>
 -      <source>CURVE_NAME_TLT</source>
 -      <translation>カーブの名前</translation>
 -    </message>
 -    <message>
 -      <source>SECTION_GROUP_TLT</source>
 -      <translation>断面グループ</translation>
 +      <source>SECTION_GROUP_TITLE</source>
 +      <translation type="unfinished">Sections</translation>
      </message>
      <message>
        <source>UNDO</source>
        <source>NEW_SECTION_TLT</source>
        <translation>新しい断面の挿入</translation>
      </message>
 -    <message>
 -      <source>INSERT_SECTION_BEFORE</source>
 -      <translation>前に断面を挿入</translation>
 -    </message>
 -    <message>
 -      <source>INSERT_SECTION_BEFORE_TLT</source>
 -      <translation>前に断面を挿入</translation>
 -    </message>
 -    <message>
 -      <source>INSERT_SECTION_AFTER</source>
 -      <translation>後に断面の挿入</translation>
 -    </message>
 -    <message>
 -      <source>INSERT_SECTION_AFTER_TLT</source>
 -      <translation>後に断面の挿入</translation>
 -    </message>
      <message>
        <source>ADDITION_MODE</source>
        <translation>追加モード</translation>
        <source>DETECTION_MODE_TLT</source>
        <translation>検出モード</translation>
      </message>
 -    <message>
 -      <source>INSERT_POINT_BEFORE</source>
 -      <translation>前に点の挿入</translation>
 -    </message>
 -    <message>
 -      <source>INSERT_POINT_BEFORE_TLT</source>
 -      <translation>前に点の挿入</translation>
 -    </message>
 -    <message>
 -      <source>INSERT_POINT_AFTER</source>
 -      <translation>後に点の挿入</translation>
 -    </message>
      <message>
        <source>CLOSE_SECTIONS</source>
        <translation>断面を閉じる</translation>
        <source>JOIN_TLT</source>
        <translation>選択した断面を結合</translation>
      </message>
 -    <message>
 -      <source>STEP_UP</source>
 -      <translation>上昇</translation>
 -    </message>
 -    <message>
 -      <source>STEP_UP_TLT</source>
 -      <translation>選択したオブジェクトを上昇</translation>
 -    </message>
 -    <message>
 -      <source>STEP_DOWN</source>
 -      <translation>下降</translation>
 -    </message>
 -    <message>
 -      <source>STEP_DOWN_TLT</source>
 -      <translation>選択したオブジェクトを下降</translation>
 -    </message>
      <message>
        <source>CLEAR_ALL</source>
        <translation>すべて消去</translation>
        <translation>すべての断面を結合</translation>
      </message>
    </context>
 +  <context>
 +    <name>EntityGUI_PolylineDlg</name>
 +    <message>
 +      <source>POLYLINE_DLG_TITLE</source>
 +      <translation type="unfinished">Polyline Construction</translation>
 +    </message>
 +    <message>
 +      <source>POLYLINE_TITLE</source>
 +      <translation type="unfinished">Polyline</translation>
 +    </message>
 +    <message>
 +      <source>POLYLINE_NAME</source>
 +      <translation type="unfinished">Polyline</translation>
 +    </message>
 +    <message>
 +      <source>POLYLINE_IMPORT</source>
 +      <translation type="unfinished">Import polyline</translation>
 +    </message>
 +    <message>
 +      <source>POLYLINE_ADD_SECTION</source>
 +      <translation type="unfinished">Add section</translation>
 +    </message>
 +    <message>
 +      <source>POLYLINE_EDIT_SECTION</source>
 +      <translation type="unfinished">Edit section</translation>
 +    </message>
 +  </context>
    <context>
      <name>EntityGUI_SketcherDlg</name>
      <message>
      </message>
      <message>
        <source>X</source>
 -      <translation>X</translation>
 +      <translation type="unfinished">X</translation>
      </message>
      <message>
        <source>Y</source>
 -      <translation>Y</translation>
 +      <translation type="unfinished">Y</translation>
      </message>
      <message>
        <source>Z</source>
 -      <translation>Z</translation>
 +      <translation type="unfinished">Z</translation>
      </message>
    </context>
    <context>
      <name>OperationGUI_ChamferDlg</name>
      <message>
        <source>D</source>
 -      <translation>D</translation>
 +      <translation type="unfinished">D</translation>
      </message>
      <message>
        <source>FACE_1</source>
        <source>TIME_CONSUMING</source>
        <translation>このオプションを有効にすると、特定のオブジェクトを時間の無駄が可能性があります。続行しますか。</translation>
      </message>
+     <message>
+       <source>WIDTH_FACTOR_TOL</source>
+       <translation type="unfinished">Width factor tol.</translation>
+     </message>
+     <message>
+       <source>VOLUME_TOL</source>
+       <translation type="unfinished">Volume tol.</translation>
+     </message>
+     <message>
+       <source>TO_MERGE_SOLIDS</source>
+       <translation type="unfinished">To merge solids</translation>
+     </message>
+     <message>
+       <source>SELECT_ALL</source>
+       <translation>全選択</translation>
+     </message>
    </context>
    <context>
      <name>GEOMToolsGUI_DeleteDlg</name>
        <source>GEOM_SHARED_SHAPE</source>
        <translation>Shared_%1</translation>
      </message>
+     <message>
+         <source>GEOM_SHARED_SHAPES_MULTISHARE</source>
+         <translation type="unfinished">Shared by all</translation>
+     </message>
    </context>
    <context>
      <name>GEOMToolsGUI_PublishDlg</name>
    <context>
      <name>GEOMToolsGUI_ReduceStudyDlg</name>
      <message>
 -        <source>GEOM_REDUCE_STUDY_TITLE</source>
 -        <translation type="unfinished">Reduce study</translation>
 +      <source>GEOM_REDUCE_STUDY_TITLE</source>
 +      <translation type="unfinished">Reduce study</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_KEPT_OBJECTS</source>
 -        <translation type="unfinished">Objects to be kept</translation>
 +      <source>GEOM_REDUCE_STUDY_KEPT_OBJECTS</source>
 +      <translation type="unfinished">Objects to be kept</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_REMOVE_OBJECTS</source>
 -        <translation type="unfinished">Objects to be removed</translation>
 +      <source>GEOM_REDUCE_STUDY_REMOVE_OBJECTS</source>
 +      <translation type="unfinished">Objects to be removed</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_NAME</source>
 -        <translation type="unfinished">Name</translation>
 +      <source>GEOM_REDUCE_STUDY_NAME</source>
 +      <translation type="unfinished">Name</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_OPTIONS</source>
 -        <translation type="unfinished">Options</translation>
 +      <source>GEOM_REDUCE_STUDY_OPTIONS</source>
 +      <translation type="unfinished">Options</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_INTERMEDIATES</source>
 -        <translation type="unfinished">Intermediate objects</translation>
 +      <source>GEOM_REDUCE_STUDY_INTERMEDIATES</source>
 +      <translation type="unfinished">Intermediate objects</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_SUB_OBJECTS</source>
 -        <translation type="unfinished">Sub-objects</translation>
 +      <source>GEOM_REDUCE_STUDY_SUB_OBJECTS</source>
 +      <translation type="unfinished">Sub-objects</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_KEEP</source>
 -        <translation type="unfinished">Keep</translation>
 +      <source>GEOM_REDUCE_STUDY_KEEP</source>
 +      <translation type="unfinished">Keep</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_UNPUBLISH</source>
 -        <translation type="unfinished">Unpublish</translation>
 +      <source>GEOM_REDUCE_STUDY_UNPUBLISH</source>
 +      <translation type="unfinished">Unpublish</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_REMOVE</source>
 -        <translation type="unfinished">Remove</translation>
 +      <source>GEOM_REDUCE_STUDY_REMOVE</source>
 +      <translation type="unfinished">Remove</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_REMOVE_EMPTY_FOLDER</source>
 -        <translation type="unfinished">Remove empty folders</translation>
 +      <source>GEOM_REDUCE_STUDY_REMOVE_EMPTY_FOLDER</source>
 +      <translation type="unfinished">Remove empty folders</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_SOFT_REMOVAL</source>
 -        <translation type="unfinished">Soft removal</translation>
 +      <source>GEOM_REDUCE_STUDY_SOFT_REMOVAL</source>
 +      <translation type="unfinished">Soft removal</translation>
      </message>
      <message>
 -        <source>GEOM_REDUCE_STUDY_WARNING_DELETE</source>
 -        <translation type="unfinished">Do you really want to delete intermediate objects? After applying this operation study will be broken.</translation>
 +      <source>GEOM_REDUCE_STUDY_WARNING_DELETE</source>
 +      <translation type="unfinished">Do you really want to delete intermediate objects? After applying this operation study will be broken.</translation>
      </message>
    </context>
    <context>
        <translation>UnionFaces</translation>
      </message>
    </context>
+   <context>
+     <name>RepairGUI_InspectObjectDlg</name>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_TITLE</source>
+         <translation type="unfinished">Inspect object</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_MAIN_SHAPE</source>
+         <translation type="unfinished">Main shape</translation>
+     </message>
+     <message>
+     <source>GEOM_INSPECT_OBJECT_SHOW</source>
+         <translation type="unfinished">Show Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_SHOW_ONLY</source>
+         <translation type="unfinished">Show Only Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_HIDE</source>
+         <translation type="unfinished">Hide Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_PUBLISH</source>
+         <translation type="unfinished">Publish Selected</translation>
+     </message>
+     <message>
+         <source>GEOM_INSPECT_OBJECT_NAME</source>
+         <translation type="unfinished">Name</translation>
+     </message>
+   </context>
    <context>
      <name>GEOMGUI_CreationInfoWdg</name>
      <message>
        <translation>V-Isoline</translation>
      </message>
    </context>
+ <context>
+     <name>MeasureGUI_CheckSelfIntersectionsDlg</name>
+     <message>
+         <source>GEOM_CHECK_INTE_INTERSECTIONS</source>
+         <translation type="unfinished">Self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUBSHAPES</source>
+         <translation type="unfinished">Sub-shapes</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_CHECK_LEVEL</source>
+         <translation type="unfinished">Level of check</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_SUMMARY</source>
+         <translation type="unfinished">Summary</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_COMPUTE</source>
+         <translation type="unfinished">Compute self-intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTION_NAME</source>
+         <translation type="unfinished">Self_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_NO_SELF_INTERSECTIONS</source>
+         <translation type="unfinished">There are no self-intersections in the shape</translation>
+     </message>
+     <message>
+         <source>GEOM_SELF_INTERSECTIONS_FOUND</source>
+         <translation type="unfinished">Some self-intersections detected</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_FAILED</source>
+         <translation type="unfinished">Detection of self-intersections failed</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_SELF_INTERSECTIONS_ERRORS</source>
+         <translation type="unfinished">Warning: there were errors during the operation, so the list may be incomplete.</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_V</source>
+         <translation type="unfinished">Vertex to Vertex</translation>
+     </message>
+     <message>
+         <source>GEOM_CHECK_INTE_V_E</source>
+         <translation type="unfinished">Vertex to Edge + all above</translation>
+     </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_E</source>
+     <translation type="unfinished">Edge to Edge + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_V_F</source>
+     <translation type="unfinished">Vertex to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_E_F</source>
+     <translation type="unfinished">Edge to Face + all above</translation>
+   </message>
+   <message>
+     <source>GEOM_CHECK_INTE_ALL</source>
+     <translation type="unfinished">Face to Face + all above</translation>
+   </message>
+ </context>
+ <context>
+     <name>MeasureGUI_FastCheckIntersectionsDlg</name>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DEFLECT</source>
+         <translation type="unfinished">Deflection coefficient</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_DETECT_GAPS</source>
+         <translation type="unfinished">Detect gaps with tolerance</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_SUBSHAPES</source>
+         <translation type="unfinished">Sub-shapes of Object %1:</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_INT_COMPUTE</source>
+         <translation type="unfinished">Compute intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_NAME</source>
+         <translation type="unfinished">Fast_intersection</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_INTERSECTION_FAILS</source>
+         <translation type="unfinished">No intersections</translation>
+     </message>
+     <message>
+         <source>GEOM_FAST_CHECK_OBJ</source>
+         <translation type="unfinished">Objects And Results</translation>
+     </message>
+ </context>
+ <context>
+     <name>TransformationGUI_ExtensionDlg</name>
+     <message>
+         <source>GEOM_EXTENSION_TITLE</source>
+         <translation type="unfinished">Extension of Edge or Face</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION</source>
+         <translation type="unfinished">Extension</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN</source>
+         <translation type="unfinished">First Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX</source>
+         <translation type="unfinished">Last Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_U</source>
+         <translation type="unfinished">First U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_U</source>
+         <translation type="unfinished">Last U-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MIN_V</source>
+         <translation type="unfinished">First V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_MAX_V</source>
+         <translation type="unfinished">Last V-Parameter</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_EDGE_NAME</source>
+         <translation type="unfinished">ExtendedEdge</translation>
+     </message>
+     <message>
+         <source>GEOM_EXTENSION_FACE_NAME</source>
+         <translation type="unfinished">ExtendedFace</translation>
+     </message>
+ </context>
+ <context>
+     <name>EntityGUI_SurfFromFaceDlg</name>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_TITLE</source>
+         <translation type="unfinished">Surface From Face Construction</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE</source>
+         <translation type="unfinished">Surface From Face</translation>
+     </message>
+     <message>
+         <source>GEOM_SURF_FROM_FACE_NAME</source>
+         <translation type="unfinished">SurfaceFromFace</translation>
+     </message>
+ </context>
  </TS>
index 966cd0334af5a9891bce8d47b768ea0781bdccff,51154eb638b116c43c4ae70a04c6a7b3169ade0f..edce49658cdb93a9dcece06a8ca2831fc0fcda1f
@@@ -20,6 -20,8 +20,6 @@@
  // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  //
  
 -#include <Standard_Stream.hxx>
 -
  #include <GEOMImpl_HealingDriver.hxx>
  #include <GEOMImpl_Types.hxx>
  #include <GEOMImpl_IHealing.hxx>
  
  #include <TNaming_CopyShape.hxx>
  
 -#include <ShapeFix_ShapeTolerance.hxx>
 -#include <ShapeFix_Shape.hxx>
 -
  #include <BRep_Builder.hxx>
  #include <BRepAdaptor_Curve.hxx>
 -#include <BRepCheck_Analyzer.hxx>
  #include <BRepTools_WireExplorer.hxx>
  
  #include <TopExp.hxx>
@@@ -136,9 -142,10 +136,10 @@@ Standard_Integer GEOMImpl_HealingDriver
      Sew(&HI, anOriginalShape, aShape, true);
      break;
    case REMOVE_INTERNAL_FACES:
-     RemoveInternalFaces(anOriginalShape, aShape);
+     RemoveInternalFaces(&HI, anOriginalShape, aShape);
      break;
    case DIVIDE_EDGE:
+   case DIVIDE_EDGE_BY_POINT:
      AddPointOnEdge(&HI, anOriginalShape, aShape);
      break;
    case CHANGE_ORIENTATION:
@@@ -209,6 -216,8 +210,8 @@@ Standard_Boolean GEOMImpl_HealingDriver
    if (!aHealer.isDone())
      raiseNotDoneExeption( ShHealOper_NotError );
  
+   SaveStatistics( aHealer );
    return Standard_True;
  }
  
  //function :  SupressFaces
  //purpose  :
  //=======================================================================
- void SuppressFacesRec (const TopTools_SequenceOfShape& theShapesFaces,
-                        const TopoDS_Shape&             theOriginalShape,
-                        TopoDS_Shape&                   theOutShape)
+ void GEOMImpl_HealingDriver::SuppressFacesRec (const TopTools_SequenceOfShape& theShapesFaces,
+                                                const TopoDS_Shape&             theOriginalShape,
+                                                TopoDS_Shape&                   theOutShape) const
  {
    if ((theOriginalShape.ShapeType() != TopAbs_COMPOUND &&
         theOriginalShape.ShapeType() != TopAbs_COMPSOLID))
@@@ -300,6 -309,21 +303,21 @@@ Standard_Boolean GEOMImpl_HealingDriver
        theOutShape = GEOMImpl_GlueDriver::GlueFaces(aSh, Precision::Confusion(), Standard_True);
      }
    }
+   // count removed faces
+   TopTools_IndexedMapOfShape faces;
+   TopExp::MapShapes(theOriginalShape, TopAbs_FACE, faces);
+   int nbBefore = faces.Extent();
+   faces.Clear();
+   TopExp::MapShapes(theOutShape, TopAbs_FACE, faces);
+   int nbAfter = faces.Extent();
+   if ( nbAfter < nbBefore )
+   {
+     ShHealOper_Tool tool;
+     ShHealOper_ModifStats& stats = tool.GetStatistics();
+     stats.AddModif( "Face removed", nbBefore - nbAfter );
+     SaveStatistics( tool );
+   }
  
    return Standard_True;
  }
@@@ -340,6 -364,8 +358,8 @@@ Standard_Boolean GEOMImpl_HealingDriver
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
@@@ -376,6 -402,8 +396,8 @@@ Standard_Boolean GEOMImpl_HealingDriver
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
@@@ -412,6 -440,8 +434,8 @@@ Standard_Boolean GEOMImpl_HealingDriver
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
  //function :  Sew
  //purpose  :
  //=======================================================================
- Standard_Boolean GEOMImpl_HealingDriver::Sew (GEOMImpl_IHealing* theHI,
+ Standard_Boolean GEOMImpl_HealingDriver::Sew (GEOMImpl_IHealing*  theHI,
                                                const TopoDS_Shape& theOriginalShape,
-                                               TopoDS_Shape& theOutShape,
-                                               Standard_Boolean isAllowNonManifold) const
+                                               TopoDS_Shape&       theOutShape,
+                                               Standard_Boolean    isAllowNonManifold) const
  {
    Standard_Real aTol = theHI->GetTolerance();
  
-   ShHealOper_Sewing aHealer (theOriginalShape, aTol);
+   TopoDS_Compound faceCompound;
+   BRep_Builder builder;
+   builder.MakeCompound( faceCompound );
+   TopExp_Explorer faceExp( theOriginalShape, TopAbs_FACE );
+   for ( ; faceExp.More(); faceExp.Next() )
+     builder.Add( faceCompound, faceExp.Current() );
+   
+   Handle(TColStd_HSequenceOfTransient) otherObjs = theHI->GetShapes();
+   for ( int ind = 1; ind <= otherObjs->Length(); ind++)
+   {
+     Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(otherObjs->Value(ind));
+     TopoDS_Shape aShape = aRefShape->GetValue();
+     if (aShape.IsNull())
+       Standard_NullObject::Raise("Null object given");
+     for ( faceExp.Init( aShape, TopAbs_FACE ); faceExp.More(); faceExp.Next() )
+       builder.Add( faceCompound, faceExp.Current() );
+   }
+   ShHealOper_Sewing aHealer (faceCompound, aTol);
  
    // Set non-manifold mode.
    aHealer.SetNonManifoldMode(isAllowNonManifold);
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
  //function : RemoveInternalFaces
  //purpose  :
  //=======================================================================
- Standard_Boolean GEOMImpl_HealingDriver::RemoveInternalFaces (const TopoDS_Shape& theOriginalShape,
-                                                               TopoDS_Shape& theOutShape) const
+ Standard_Boolean
+ GEOMImpl_HealingDriver::RemoveInternalFaces (GEOMImpl_IHealing*  theHI,
+                                              const TopoDS_Shape& theOriginalShape,
+                                              TopoDS_Shape&       theOutShape) const
  {
+   // get all input shapes
+   TopTools_SequenceOfShape shapeSeq;
+   shapeSeq.Append( theOriginalShape );
+   Handle(TColStd_HSequenceOfTransient) otherObjs = theHI->GetShapes();
+   if ( !otherObjs.IsNull() )
+     for ( int ind = 1; ind <= otherObjs->Length(); ind++)
+     {
+       Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(otherObjs->Value(ind));
+       TopoDS_Shape aShape = aRefShape->GetValue();
+       if (aShape.IsNull())
+         Standard_NullObject::Raise("Null object given");
+       shapeSeq.Append( aShape );
+     }
+   // pass input shapes to the algorithm
    GEOMAlgo_RemoverWebs aTool;
-   aTool.SetShape(theOriginalShape);
+   if ( shapeSeq.Length() == 1 )
+   {
+     aTool.SetShape( shapeSeq.First() );
+   }
+   else
+   {
+     TopoDS_Compound solidCompound;
+     BRep_Builder builder;
+     builder.MakeCompound( solidCompound );
+     for ( int ind = 1; ind <= shapeSeq.Length(); ++ind )
+       for ( TopExp_Explorer so( shapeSeq( ind ), TopAbs_SOLID ); so.More(); so.Next() )
+         builder.Add( solidCompound, so.Current() );
+     aTool.SetShape( solidCompound );
+   }
+   // run the algorithm
    aTool.Perform();
  
    if (aTool.ErrorStatus() == 0) { // OK
  //function :  AddPointOnEdge
  //purpose  :
  //=======================================================================
- Standard_Boolean GEOMImpl_HealingDriver::AddPointOnEdge (GEOMImpl_IHealing* theHI,
+ Standard_Boolean GEOMImpl_HealingDriver::AddPointOnEdge (GEOMImpl_IHealing*  theHI,
                                                           const TopoDS_Shape& theOriginalShape,
-                                                          TopoDS_Shape& theOutShape) const
+                                                          TopoDS_Shape&       theOutShape) const
  {
    Standard_Boolean isByParameter = theHI->GetIsByParameter();
-   Standard_Integer anIndex = theHI->GetIndex();
-   Standard_Real aValue = theHI->GetDevideEdgeValue();
+   Standard_Integer       anIndex = theHI->GetIndex();
+   Standard_Real           aValue = theHI->GetDevideEdgeValue();
+   TopoDS_Shape pointToProject;
+   {
+     Handle(TColStd_HSequenceOfTransient) funs = theHI->GetShapes();
+     if ( !funs.IsNull() && funs->Length() > 0 ) {
+       TopoDS_Compound vCompound;
+       BRep_Builder builder;
+       builder.MakeCompound( vCompound );
+       pointToProject = vCompound;
+       for ( int ind = 1; ind <= funs->Length(); ind++)
+       {
+         Handle(GEOM_Function) vFun = Handle(GEOM_Function)::DownCast(funs->Value(ind));
+         TopoDS_Shape vertex = vFun->GetValue();
+         if ( vertex.IsNull() )
+           Standard_NullObject::Raise("Null vertex given");
+         builder.Add( vCompound, vertex );
+       }
+     }
+   }
  
    ShHealOper_EdgeDivide aHealer (theOriginalShape);
  
    Standard_Boolean aResult = Standard_False;
-   if (anIndex == -1) { // apply algorythm for the whole shape which is EDGE
-     if (theOriginalShape.ShapeType() == TopAbs_EDGE)
-       aResult = aHealer.Perform(TopoDS::Edge(theOriginalShape), aValue, isByParameter);
+   if (anIndex == -1) { // apply algorithm for the whole shape which is EDGE
+     if (theOriginalShape.ShapeType() == TopAbs_EDGE) {
+       if ( pointToProject.IsNull() )
+         aResult = aHealer.Perform(TopoDS::Edge(theOriginalShape), aValue, isByParameter);
+       else
+         aResult = aHealer.Perform(TopoDS::Edge(theOriginalShape), pointToProject);
+     }
    } else {
      TopTools_IndexedMapOfShape aShapes;
      TopExp::MapShapes(theOriginalShape, aShapes);
      TopoDS_Shape aEdgeShape = aShapes.FindKey(anIndex);
-     if (aEdgeShape.ShapeType() == TopAbs_EDGE)
-       aResult = aHealer.Perform(TopoDS::Edge(aEdgeShape), aValue, isByParameter);
+     if (aEdgeShape.ShapeType() == TopAbs_EDGE) {
+       if ( pointToProject.IsNull() )
+         aResult = aHealer.Perform(TopoDS::Edge(aEdgeShape), aValue, isByParameter);
+       else
+         aResult = aHealer.Perform(TopoDS::Edge(aEdgeShape), pointToProject);
+     }
    }
  
    if (aResult)
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
@@@ -523,6 -636,8 +630,8 @@@ Standard_Boolean GEOMImpl_HealingDriver
    else
      raiseNotDoneExeption( aHealer.GetErrorStatus() );
  
+   SaveStatistics( aHealer );
    return aResult;
  }
  
@@@ -535,21 -650,89 +644,86 @@@ void GEOMImpl_HealingDriver::LimitToler
                                               TopoDS_Shape& theOutShape) const
  {
    Standard_Real aTol = theHI->GetTolerance();
 +  TopAbs_ShapeEnum aType = theHI->GetType();
 +
    if (aTol < Precision::Confusion())
      aTol = Precision::Confusion();
  
    // 1. Make a copy to prevent the original shape changes.
    TopoDS_Shape aShapeCopy;
-   TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
-   TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
+   {
+     TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
+     TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
+   }
 -  // 2. Limit tolerance.
 -  ShapeFix_ShapeTolerance aSFT;
 -  aSFT.LimitTolerance(aShapeCopy, aTol, aTol, TopAbs_SHAPE);
  
 -  // 3. Fix obtained shape.
 -  Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape (aShapeCopy);
 -  aSfs->Perform();
 -  theOutShape = aSfs->Shape();
 -
 -  BRepCheck_Analyzer ana (theOutShape, Standard_True);
 -  if (!ana.IsValid())
 +  // 2. Limit tolerance.
 +  if (!GEOMUtils::FixShapeTolerance(aShapeCopy, aType, aTol))
      StdFail_NotDone::Raise("Non valid shape result");
  
++  // 3. Set the result
 +  theOutShape = aShapeCopy;
++
+   // 4. Collect statistics
+   {
+     ShHealOper_Tool tool;
+     ShHealOper_ModifStats& stats = tool.GetStatistics();
+     int nb[3] = { 0,0,0 };
+     TopTools_IndexedMapOfShape aShapes;
+     TopExp::MapShapes( theOutShape, TopAbs_VERTEX, aShapes);
+     for ( int i = 1; i <= aShapes.Extent(); ++i )
+     {
+       const TopoDS_Vertex& v = TopoDS::Vertex( aShapes( i ));
+       double tol = BRep_Tool::Tolerance( v );
+       if      ( tol < aTol ) nb[0]++;
+       else if ( tol > aTol ) nb[2]++;
+       else                   nb[1]++;
+     }
+     if ( nb[0] > 0 )
+       stats.AddModif( "Tolerance of vertex decreased for shape validity", nb[0] );
+     if ( nb[1] > 0 )
+       stats.AddModif( "Tolerance of vertex limited as requested", nb[1] );
+     if ( nb[2] > 0 )
+       stats.AddModif( "Tolerance of vertex increased for shape validity", nb[2] );
+     nb[0] = nb[1] = nb[2] = 0;
+     aShapes.Clear();
+     TopExp::MapShapes( theOutShape, TopAbs_EDGE, aShapes);
+     for ( int i = 1; i <= aShapes.Extent(); ++i )
+     {
+       const TopoDS_Edge& e = TopoDS::Edge( aShapes( i ));
+       double tol = BRep_Tool::Tolerance( e );
+       if      ( tol < aTol ) nb[0]++;
+       else if ( tol > aTol ) nb[2]++;
+       else                   nb[1]++;
+     }
+     if ( nb[0] > 0 )
+       stats.AddModif( "Tolerance of edge decreased for shape validity", nb[0] );
+     if ( nb[1] > 0 )
+       stats.AddModif( "Tolerance of edge limited as requested", nb[1] );
+     if ( nb[2] > 0 )
+       stats.AddModif( "Tolerance of edge increased for shape validity", nb[2] );
+     nb[0] = nb[1] = nb[2] = 0;
+     aShapes.Clear();
+     TopExp::MapShapes( theOutShape, TopAbs_FACE, aShapes);
+     for ( int i = 1; i <= aShapes.Extent(); ++i )
+     {
+       const TopoDS_Face& f = TopoDS::Face( aShapes( i ));
+       double tol = BRep_Tool::Tolerance( f );
+       if      ( tol < aTol ) nb[0]++;
+       else if ( tol > aTol ) nb[2]++;
+       else                   nb[1]++;
+     }
+     if ( nb[0] > 0 )
+       stats.AddModif( "Tolerance of face decreased for shape validity", nb[0] );
+     if ( nb[1] > 0 )
+       stats.AddModif( "Tolerance of face limited as requested", nb[1] );
+     if ( nb[2] > 0 )
+       stats.AddModif( "Tolerance of face increased for shape validity", nb[2] );
+     SaveStatistics( tool );
+   }
  }
  
  //=======================================================================
@@@ -595,7 -778,7 +769,7 @@@ void GEOMImpl_HealingDriver::FuseCollin
      removeAll = true;
  
    if (!removeAll) {
-     for (unsigned int ind = 1; ind <= aVerts->Length(); ind++) {
+     for ( int ind = 1; ind <= aVerts->Length(); ind++) {
        Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aVerts->Value(ind));
        TopoDS_Shape aShape_i = aRefShape->GetValue();
        if (aShape_i.IsNull())
    }
    theOutShape = aFinalWire;
  
 -  BRepCheck_Analyzer ana (theOutShape, Standard_True);
 -  if (!ana.IsValid())
 +  if (!GEOMUtils::CheckShape(theOutShape, true))
      StdFail_NotDone::Raise("Non valid shape result");
  }
  
@@@ -869,7 -1053,7 +1043,7 @@@ GetCreationInformation(std::string
    case SEWING:
    case SEWING_NON_MANIFOLD:
      theOperationName = "SEWING";
-     AddParam( theParams, "Selected shape", aCI.GetOriginal() );
+     AddParam( theParams, "Selected shapes", aCI.GetOriginalAndShapes() );
      AddParam( theParams, "Allow Non Manifold", ( aType == SEWING_NON_MANIFOLD ));
      AddParam( theParams, "Tolerance", aCI.GetTolerance() );
      break;
      AddParam( theParams, "By parameter", aCI.GetIsByParameter() );
      AddParam( theParams, "Value", aCI.GetDevideEdgeValue() );
      break;
+   case DIVIDE_EDGE_BY_POINT:
+     theOperationName = "POINT_ON_EDGE";
+     if ( aCI.GetIndex() > 0 )
+       AddParam( theParams, "Edge", "#" ) << aCI.GetIndex() << " of " << aCI.GetOriginal();
+     else
+       AddParam( theParams, "Edge", aCI.GetOriginal() );
+     AddParam( theParams, "Points", aCI.GetShapes() );
+     break;
    case CHANGE_ORIENTATION:
      theOperationName = "CHANGE_ORIENTATION";
      AddParam( theParams, "Selected shape", aCI.GetOriginal() );
      theOperationName = "LIMIT_TOLERANCE";
      AddParam( theParams, "Selected shape", aCI.GetOriginal() );
      AddParam( theParams, "Tolerance", aCI.GetTolerance() );
 +    AddParam( theParams, "Type", aCI.GetType() );
      break;
    case FUSE_COLLINEAR_EDGES:
      theOperationName = "FUSE_EDGES";
      break;
    case REMOVE_INTERNAL_FACES:
      theOperationName = "REMOVE_WEBS";
-     AddParam( theParams, "Selected shape", aCI.GetOriginal() );
+     AddParam( theParams, "Selected shapes", aCI.GetOriginalAndShapes() );
      break;
    default:
      return false;
    
    return true;
  }
+ //================================================================================
+ /*!
+  * \brief Pass a record of what is done to the operation
+  */
+ //================================================================================
+ void GEOMImpl_HealingDriver::SaveStatistics( const ShHealOper_Tool& healer, bool add ) const
+ {
+   if ( healer.GetStatistics().GetData().empty() )
+     return;
+   if (Label().IsNull()) return;
+   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
+   if (aFunction.IsNull()) return;
+   GEOMImpl_IHealing HI (aFunction);
+   ShHealOper_ModifStats * stats = HI.GetStatistics();
+   if ( !stats ) return;
+   if ( add )
+     stats->Add( healer.GetStatistics() );
+   else
+     *stats = healer.GetStatistics();
+ }
  IMPLEMENT_STANDARD_HANDLE (GEOMImpl_HealingDriver,GEOM_BaseDriver);
  
  IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_HealingDriver,GEOM_BaseDriver);
index 4324a66628ff6a1888a2b9a01a2fdb354281d0b0,06e354db2b5e74f5b3c65dd76d6ac0be95fe9c7f..c0284e7e26d74e548c12911153e82ce32545165a
@@@ -24,8 -24,8 +24,9 @@@
  
  #include <TColStd_HArray1OfInteger.hxx>
  #include <TColStd_HArray1OfExtendedString.hxx>
 -#include "TColStd_HSequenceOfTransient.hxx"
 +#include <TColStd_HSequenceOfTransient.hxx>
 +#include <TopAbs.hxx>
+ #include <ShHealOper_ModifStats.hxx>
  
  class GEOMImpl_IHealing
  {
@@@ -43,7 -43,7 +44,7 @@@ public
      ARG_IS_BY_PARAMETER         =  9,
      ARG_SUBSHAPE_INDEX          = 10,
      ARG_LIST_SHAPES             = 11,
 -    ARG_STATISTICS              =  4
 +    ARG_TYPE                    = 12
    };
  
    GEOMImpl_IHealing(Handle(GEOM_Function) theFunction): _func(theFunction) {}
@@@ -57,7 -57,7 +58,7 @@@
    void SetValues( const Handle(TColStd_HArray1OfExtendedString)& arr ) {  if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_VALUES, arr); }
    Handle(TColStd_HArray1OfExtendedString) GetValues() { return _func->GetStringArray(ARG_SHAPE_PROCESS_VALUES); }
  
-   void SetOriginal( Handle(GEOM_Function)& f ) { _func->SetReference(ARG_ORIGINAL, f); }
+   void SetOriginal( Handle(GEOM_Function) f ) { _func->SetReference(ARG_ORIGINAL, f); }
    Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ARG_ORIGINAL); }
  
    void SetFaces( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); }
@@@ -75,9 -75,6 +76,9 @@@
    void SetTolerance( Standard_Real val ) { _func->SetReal(ARG_TOLERANCE, val); }
    Standard_Real GetTolerance() { return _func->GetReal(ARG_TOLERANCE); }
  
 +  void SetType( TopAbs_ShapeEnum val ) { _func->SetInteger(ARG_TYPE, (Standard_Integer)val); }
 +  TopAbs_ShapeEnum GetType() { TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)(_func->GetInteger(ARG_TYPE)); return _func->IsDone() ? type : TopAbs_SHAPE; }
 +
    void SetDevideEdgeValue( Standard_Real val ) { _func->SetReal(ARG_DEV_EDGE_VALUE, val); }
    Standard_Real GetDevideEdgeValue() { return _func->GetReal(ARG_DEV_EDGE_VALUE); }
  
    Handle(TColStd_HSequenceOfTransient) GetShapes()
    { return _func->GetReferenceList(ARG_LIST_SHAPES); }
  
 -  void SetStatistics( ShHealOper_ModifStats * ms )
+   Handle(TColStd_HSequenceOfTransient) GetOriginalAndShapes()
+   {
+     Handle(TColStd_HSequenceOfTransient) funs = GetShapes();
+     if ( funs.IsNull() ) funs = new TColStd_HSequenceOfTransient;
+     funs->Prepend( GetOriginal() );
+     return funs;
+   }
 -  ShHealOper_ModifStats * GetStatistics()
++  void SetStatistics( ShHealOper_ModifStats* ms )
+   {
+     if ( ms ) ms->Clear();
+     _func->SetCallBackData( (void*) ms );
+   }
++  ShHealOper_ModifStats* GetStatistics()
+   {
+     return (ShHealOper_ModifStats*) _func->GetCallBackData();
+   }
  private:
    Handle(GEOM_Function) _func;
  };
index 443ae83d6ff65ffe106e730eedd0565b0bef4a7f,865867dac5a564a54f7fee39148eebbc7d9712ad..43aee783e670c9ca943f588d67d694e54730997f
  #endif
  
  #include <Standard_Version.hxx>
- #include <Standard_Stream.hxx>
  
  #include <GEOMImpl_IHealingOperations.hxx>
  #include <GEOM_PythonDump.hxx>
  #include <GEOMImpl_HealingDriver.hxx>
  #include <GEOMImpl_Types.hxx>
  #include <GEOMImpl_IHealing.hxx>
  #include <GEOMImpl_IVector.hxx>
  #include <GEOMImpl_VectorDriver.hxx>
  #include <GEOMImpl_CopyDriver.hxx>
+ #include <ShHealOper_ModifStats.hxx>
+ #include <ShHealOper_ShapeProcess.hxx>
  
  #include <Basics_OCCTVersion.hxx>
  
- #include "utilities.h"
+ #include <utilities.h>
  #include <OpUtil.hxx>
  #include <Utils_ExceptHandlers.hxx>
  
- #include <ShHealOper_ShapeProcess.hxx>
+ #include <BRep_Builder.hxx>
  #include <ShapeAnalysis_FreeBounds.hxx>
- #include <TopoDS_Compound.hxx>
- #include <TopExp_Explorer.hxx>
  #include <TColStd_HArray1OfExtendedString.hxx>
  #include <TColStd_HSequenceOfTransient.hxx>
  #include <TCollection_AsciiString.hxx>
- #include <TDF_Tool.hxx>
+ #include <TopExp_Explorer.hxx>
+ #include <TopTools_SequenceOfShape.hxx>
+ #include <TopoDS_Compound.hxx>
  
  #include <Standard_Failure.hxx>
  #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
@@@ -68,6 -63,7 +63,7 @@@
  GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
  : GEOM_IOperations(theEngine, theDocID)
  {
+   myModifStats = new ShHealOper_ModifStats;
    MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
  }
  
@@@ -78,6 -74,7 +74,7 @@@
  //=============================================================================
  GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations()
  {
+   delete myModifStats;
    MESSAGE("GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations");
  }
  
@@@ -138,6 -135,7 +135,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
      HI.SetParameters( theParams );
      HI.SetValues( theValues );
    }
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
@@@ -277,6 -275,11 +275,11 @@@ bool GEOMImpl_IHealingOperations::GetPa
    } else if( theOperation == "DropSmallEdges" ) {
      theParams.push_back( "DropSmallEdges.Tolerance3d" );
  
+   } else if( theOperation == "DropSmallSolids" ) {
+     theParams.push_back( "DropSmallSolids.WidthFactorThreshold" );
+     theParams.push_back( "DropSmallSolids.VolumeThreshold" );
+     theParams.push_back( "DropSmallSolids.MergeSolids" );
    } else if( theOperation == "BSplineRestriction" ) {
      theParams.push_back( "BSplineRestriction.SurfaceMode" );
      theParams.push_back( "BSplineRestriction.Curve3dMode" );
@@@ -345,6 -348,7 +348,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    GEOMImpl_IHealing HI (aFunction);
    HI.SetFaces(theFaces);
    HI.SetOriginal(aLastFunction);
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
@@@ -413,6 -417,7 +417,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    HI.SetWires( theWires );
    HI.SetIsCommonVertex( isCommonVertex );
    HI.SetOriginal( aLastFunction );
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
@@@ -480,6 -485,7 +485,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    GEOMImpl_IHealing HI(aFunction);
    HI.SetWires( theWires );
    HI.SetOriginal( aLastFunction );
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
@@@ -546,6 -552,7 +552,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    GEOMImpl_IHealing HI(aFunction);
    HI.SetWires( theWires );
    HI.SetOriginal( aLastFunction );
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
   *  Sew
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IHealingOperations::Sew (Handle(GEOM_Object) theObject,
-                                                       double theTolerance,
-                                                       bool isAllowNonManifold)
+ Handle(GEOM_Object)
+ GEOMImpl_IHealingOperations::Sew (std::list<Handle(GEOM_Object)>& theObjects,
+                                   double                          theTolerance,
+                                   bool                            isAllowNonManifold)
  {
    // set error code, check parameters
    SetErrorCode(KO);
  
-   if (theObject.IsNull())
+   if (theObjects.empty())
      return NULL;
  
-   Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
-   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
+   Handle(TColStd_HSequenceOfTransient) objects =
+     GEOM_Object::GetLastFunctions( theObjects );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
  
    // Add a new object
    Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
  
    //Add the function
    int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
-   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), aFunctionType);
+   Handle(GEOM_Function) aFunction =
+     aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), aFunctionType);
    if (aFunction.IsNull()) return NULL;
  
    //Check if the function is set correctly
    // prepare "data container" class IHealing
    GEOMImpl_IHealing HI(aFunction);
    HI.SetTolerance( theTolerance );
-   HI.SetOriginal( aLastFunction );
+   HI.SetOriginal( theObjects.front()->GetLastFunction() ); objects->Remove(1);
+   HI.SetShapes( objects );
+   HI.SetStatistics( myModifStats );
  
    //Compute the result
    try {
    //Make a Python command
    GEOM::TPythonDump pd(aFunction);
    
-   pd << aNewObject << " = geompy.Sew(" << theObject << ", " << theTolerance;
+   pd << aNewObject << " = geompy.Sew(" << theObjects << ", " << theTolerance;
  
    if (isAllowNonManifold) {
-     pd << ", true";
+     pd << ", True";
    }
  
    pd << ")";
   *  RemoveInternalFaces
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveInternalFaces (Handle(GEOM_Object) theObject)
+ Handle(GEOM_Object)
+ GEOMImpl_IHealingOperations::RemoveInternalFaces (std::list< Handle(GEOM_Object)> & theSolids)
  {
    // set error code, check parameters
    SetErrorCode(KO);
  
-   if (theObject.IsNull())
+   if (theSolids.empty())
      return NULL;
  
-   Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
-   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
+   Handle(TColStd_HSequenceOfTransient) objects = GEOM_Object::GetLastFunctions( theSolids );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
  
    // Add a new object
    Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
  
    //Add the function
-   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INTERNAL_FACES);
+   Handle(GEOM_Function)
+     aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INTERNAL_FACES);
    if (aFunction.IsNull()) return NULL;
  
    //Check if the function is set correctly
  
    // prepare "data container" class IHealing
    GEOMImpl_IHealing HI (aFunction);
-   HI.SetOriginal(aLastFunction);
+   HI.SetOriginal( theSolids.front()->GetLastFunction() ); objects->Remove(1);
+   HI.SetShapes( objects );
+   HI.SetStatistics( myModifStats );
  
    //Compute the result
    try {
    }
  
    //Make a Python command
-   GEOM::TPythonDump(aFunction) << aNewObject << " = geompy.RemoveInternalFaces(" << theObject << ")";
+   GEOM::TPythonDump(aFunction) << aNewObject << " = geompy.RemoveInternalFaces(" << theSolids << ")";
  
    SetErrorCode(OK);
    return aNewObject;
@@@ -734,6 -754,7 +754,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    HI.SetDevideEdgeValue( theValue );
    HI.SetIsByParameter( isByParameter );
    HI.SetOriginal( aLastFunction );
+   HI.SetStatistics( myModifStats );
  
    //Compute the translation
    try {
    return aNewObject;
  }
  
+ //=============================================================================
+ /*!
+  *  DivideEdgeByPoint
+  */
+ //=============================================================================
+ Handle(GEOM_Object)
+ GEOMImpl_IHealingOperations::DivideEdgeByPoint (Handle(GEOM_Object)               theObject,
+                                                 int                               theIndex,
+                                                 std::list< Handle(GEOM_Object)> & thePoints)
+ {
+   // set error code, check parameters
+   SetErrorCode(KO);
+   if (theObject.IsNull() || thePoints.empty() )
+     return NULL;
+   Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
+   if (aLastFunction.IsNull() )
+     return NULL; //There is no function which creates an object to be processed
+   Handle(TColStd_HSequenceOfTransient) aPointFunc = GEOM_Object::GetLastFunctions( thePoints );
+   if ( aPointFunc.IsNull() || aPointFunc->IsEmpty() ) {
+     SetErrorCode("NULL argument points");
+     return NULL;
+   }
+   // Add a new object
+   Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+   //Add the function
+   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
+   if (aFunction.IsNull()) return NULL;
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
+   // prepare "data container" class IHealing
+   GEOMImpl_IHealing HI(aFunction);
+   HI.SetIndex     ( theIndex );
+   HI.SetOriginal  ( aLastFunction );
+   HI.SetShapes    ( aPointFunc );
+   HI.SetStatistics( myModifStats );
+   //Compute the translation
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Healing driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump(aFunction)
+     << aNewObject << " = geompy.DivideEdgeByPoint(" << theObject
+     << ", " << theIndex << ", " << thePoints << ")";
+   SetErrorCode(OK);
+   return aNewObject;
+ }
  //=============================================================================
  /*!
   *  FuseCollinearEdgesWithinWire
@@@ -782,6 -871,7 +871,7 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
    if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
  
    GEOMImpl_IHealing aCI (aFunction);
+   aCI.SetStatistics( myModifStats );
  
    Handle(GEOM_Function) aRefShape = theWire->GetLastFunction();
    if (aRefShape.IsNull()) return NULL;
   *  GetFreeBoundary
   */
  //=============================================================================
- bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(GEOM_Object) theObject,
+ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTransient)& theObjects,
                                                     Handle(TColStd_HSequenceOfTransient)& theClosed,
                                                     Handle(TColStd_HSequenceOfTransient)& theOpen )
  {
    // set error code, check parameters
    SetErrorCode(KO);
  
-   if ( theObject.IsNull() || theClosed.IsNull() || theOpen.IsNull() )
+   if ( theObjects.IsNull() || theObjects->Length() == 0 ||
+        theClosed.IsNull()  || theOpen.IsNull() )
      return false;
  
-   TopoDS_Shape aShape = theObject->GetValue();
-   if ( aShape.IsNull() )
-     return false;
+   TopoDS_Shape aShape;
+   TopTools_SequenceOfShape shapes;
+   for ( int ind = 1; ind <= theObjects->Length(); ind++)
+   {
+     Handle(GEOM_Object) aRefShape = Handle(GEOM_Object)::DownCast( theObjects->Value(ind));
+     if ( aRefShape.IsNull() )
+       return false;
+     aShape = aRefShape->GetValue();
+     if ( aShape.IsNull() )
+       return false;
+     shapes.Append( aShape );
+   }
+   if ( shapes.Length() > 1 )
+   {
+     TopoDS_Compound compound;
+     BRep_Builder builder;
+     builder.MakeCompound( compound );
+     for ( int i = 1; i <= shapes.Length(); ++i )
+       builder.Add( compound, shapes( i ) );
+     aShape = compound;
+   }
  
    // get free boundary shapes
  
        pd << "empty_list";
      }
  
-     pd << ") = geompy.GetFreeBoundary(" << theObject << ")";
+     pd << ") = geompy.GetFreeBoundary(" << theObjects << ")";
    }
  
    SetErrorCode(OK);
@@@ -947,6 -1058,9 +1058,9 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
      // prepare "data container" class IVector
      GEOMImpl_IVector aVI (aFunction);
      aVI.SetCurve(aLastFunction);
+     myModifStats->Clear();
+     myModifStats->AddModif( "Vector reversed" );
    }
    else {
      //Add the function
      // prepare "data container" class IHealing
      GEOMImpl_IHealing HI (aFunction);
      HI.SetOriginal(aLastFunction);
+     HI.SetStatistics( myModifStats );
    }
  
    //Compute the translation
@@@ -1014,6 -1129,9 +1129,9 @@@ Handle(GEOM_Object) GEOMImpl_IHealingOp
      // prepare "data container" class IVector
      GEOMImpl_IVector aVI (aFunction);
      aVI.SetCurve(aLastFunction);
+     myModifStats->Clear();
+     myModifStats->AddModif( "Vector reversed" );
    }
    else {
      //Add the function
      // prepare "data container" class IHealing
      GEOMImpl_IHealing aHI (aFunction);
      aHI.SetOriginal(aLastFunction);
+     aHI.SetStatistics( myModifStats );
    }
  
    // Compute the result
   */
  //=============================================================================
  Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Object) theObject,
 -                                                                 double theTolerance)
 +                                                                 double theTolerance,
 +                                                                 TopAbs_ShapeEnum theType)
  {
    // Set error code, check parameters
    SetErrorCode(KO);
    GEOMImpl_IHealing HI (aFunction);
    HI.SetOriginal(aLastFunction);
    HI.SetTolerance(theTolerance);
 +  HI.SetType(theType);
+   HI.SetStatistics( myModifStats );
  
    // Compute
    try {
index 77c9fa3924aa720ef3cb12ccdb970db465b79668,df2952a9a679709d473a993d2b08c0223235b4bc..af111fff0859a62c10e5b7f8ffe4bf741f44d63e
  #include "GEOM_Engine.hxx"
  #include "GEOM_Object.hxx"
  
 +#include <TopAbs.hxx>
  #include <TColStd_HArray1OfExtendedString.hxx>
  #include <TColStd_HArray1OfInteger.hxx>
  
  #include <list>
  
+ class ShHealOper_ModifStats;
  class GEOMImpl_IHealingOperations : public GEOM_IOperations {
   public:
    Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
    Standard_EXPORT Handle(GEOM_Object) FillHoles( Handle(GEOM_Object) theObject,
                                   const Handle(TColStd_HArray1OfInteger)& theWires);
  
-   Standard_EXPORT Handle(GEOM_Object) Sew( Handle(GEOM_Object) theObject,
-                            double theTolerance,
-                            bool isAllowNonManifold);
+   Standard_EXPORT Handle(GEOM_Object) Sew( std::list<Handle(GEOM_Object)> & theObject,
+                                            double                           theTolerance,
+                                            bool                             isAllowNonManifold);
  
-   Standard_EXPORT Handle(GEOM_Object) RemoveInternalFaces (Handle(GEOM_Object) theObject);
+   Standard_EXPORT Handle(GEOM_Object) RemoveInternalFaces (std::list< Handle(GEOM_Object)> & theSolids);
  
    Standard_EXPORT Handle(GEOM_Object) DivideEdge( Handle(GEOM_Object) theObject,
-                                                   int theIndex,
-                                                   double theValue,
-                                                   bool isByParameter );
+                                                   int                 theIndex,
+                                                   double              theValue,
+                                                   bool                isByParameter );
+   Standard_EXPORT Handle(GEOM_Object) DivideEdgeByPoint( Handle(GEOM_Object)             theObject,
+                                                          int                             theIndex,
+                                                          std::list<Handle(GEOM_Object)>& thePoint );
  
    Standard_EXPORT Handle(GEOM_Object) FuseCollinearEdgesWithinWire
                                       (Handle(GEOM_Object) theWire,
    // this function does not use Function-Driver mechanism, it just computes the free
    // boundary edges and returns them in the sequence.  It is called just for information reasons
    // and it's not intended for history/undo/redo/etc..
-   Standard_EXPORT bool GetFreeBoundary ( Handle(GEOM_Object) theObject,
-                          Handle(TColStd_HSequenceOfTransient)& theOutClosedWires,
-                          Handle(TColStd_HSequenceOfTransient)& theOutOpenWires );
+   Standard_EXPORT bool GetFreeBoundary ( Handle(TColStd_HSequenceOfTransient)& theObjects,
+                                          Handle(TColStd_HSequenceOfTransient)& theOutClosedWires,
+                                          Handle(TColStd_HSequenceOfTransient)& theOutOpenWires );
  
    Standard_EXPORT Handle(GEOM_Object) ChangeOrientation( Handle(GEOM_Object) theObject);
    Standard_EXPORT Handle(GEOM_Object) ChangeOrientationCopy( Handle(GEOM_Object) theObject);
  
    Standard_EXPORT Handle(GEOM_Object) LimitTolerance( Handle(GEOM_Object) theObject,
 -                                                      double theTolerance );
 +                                                      double theTolerance,
 +                                                      TopAbs_ShapeEnum theType = TopAbs_SHAPE );
  
+   const ShHealOper_ModifStats* GetStatistics() { return myModifStats; }
+ private:
+   ShHealOper_ModifStats* myModifStats;
  };
  
  #endif
index 0cf9dd339f55ad7e1832c97600e10b5826e43e0c,3d7601a7677560a757c5e473b92184bf4008e499..ae0103de6b828c5c38e69ce9285aa76962688d33
@@@ -20,6 -20,6 +20,8 @@@
  // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  //
  
++#include <Basics_OCCTVersion.hxx>
++
  #include <GEOMImpl_IMeasureOperations.hxx>
  #include <GEOMImpl_IMeasure.hxx>
  #include <GEOMImpl_MeasureDriver.hxx>
@@@ -30,6 -30,7 +32,7 @@@
  #include <GEOMAlgo_AlgoTools.hxx>
  #include <GEOMAlgo_KindOfName.hxx>
  #include <GEOMAlgo_ShapeInfoFiller.hxx>
+ #include <OCC2VTK_Tools.h>
  
  #include <GEOM_PythonDump.hxx>
  
@@@ -48,6 -49,7 +51,9 @@@
  #include <BRepClass3d_SolidClassifier.hxx>
  #include <BRepClass_FaceClassifier.hxx>
  #include <BRepExtrema_DistShapeShape.hxx>
++#if OCC_VERSION_LARGE > 0x06080000
+ #include <BRepExtrema_ShapeProximity.hxx>
++#endif
  #include <BRepGProp.hxx>
  #include <BRepTools.hxx>
  #include <BRep_Tool.hxx>
@@@ -1501,6 -1503,7 +1507,7 @@@ TCollection_AsciiString GEOMImpl_IMeasu
  //=============================================================================
  bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
                           (Handle(GEOM_Object)                 theShape,
+                           const SICheckLevel                  theCheckLevel,
                            Handle(TColStd_HSequenceOfInteger)& theIntersections)
  {
    SetErrorCode(KO);
    //
    BOPAlgo_CheckerSI aCSI; // checker of self-interferences
    aCSI.SetArguments(aLCS);
+   aCSI.SetLevelOfCheck(theCheckLevel);
  
    // 1. Launch the checker
    aCSI.Perform();
    return isGood;
  }
  
+ //=============================================================================
+ /*!
+  *  FastIntersect
+  */
+ //=============================================================================
+ bool GEOMImpl_IMeasureOperations::FastIntersect (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2,
+                                                  double theTolerance, float theDeflection,
+                                                  Handle(TColStd_HSequenceOfInteger)& theIntersections1,
+                                                  Handle(TColStd_HSequenceOfInteger)& theIntersections2)
+ {
+   SetErrorCode(KO);
+   bool isGood = false;
++#if OCC_VERSION_LARGE > 0x06080000
++
+   if (theIntersections1.IsNull())
+     theIntersections1 = new TColStd_HSequenceOfInteger;
+   else
+     theIntersections1->Clear();
+   if (theIntersections2.IsNull())
+     theIntersections2 = new TColStd_HSequenceOfInteger;
+   else
+     theIntersections2->Clear();
+   if (theShape1.IsNull() || theShape2.IsNull()) {
+     SetErrorCode("Objects have NULL Shape");
+     return isGood;
+   }
+   if (theShape1 == theShape2) {
+     SetErrorCode("Objects are equal");
+     return isGood;
+   }
+   Handle(GEOM_Function) aRefShape1 = theShape1->GetLastFunction();
+   Handle(GEOM_Function) aRefShape2 = theShape2->GetLastFunction();
+   if (aRefShape1.IsNull() || aRefShape2.IsNull()) return isGood;
+   TopoDS_Shape aShape1 = aRefShape1->GetValue();
+   TopoDS_Shape aShape2 = aRefShape2->GetValue();
+   if (aShape1.IsNull() || aShape2.IsNull()) return isGood;
+   // 0. Prepare data
+   TopoDS_Shape aScopy1, aScopy2;
+   GEOMAlgo_AlgoTools::CopyShape(aShape1, aScopy1);
+   GEOMAlgo_AlgoTools::CopyShape(aShape2, aScopy2);
+   float aDeflection = (theDeflection <= 0.) ? 0.001 : theDeflection;
+   GEOM::MeshShape(aScopy1, aDeflection);
+   GEOM::MeshShape(aScopy2, aDeflection);
+   //
+   // Map sub-shapes and their indices
+   TopTools_IndexedMapOfShape anIndices1, anIndices2;
+   TopExp::MapShapes(aScopy1, anIndices1);
+   TopExp::MapShapes(aScopy2, anIndices2);
+   BOPCol_ListOfShape aLCS1, aLCS2;
+   aLCS1.Append(aScopy1); aLCS2.Append(aScopy2);
+   //
+   BRepExtrema_ShapeProximity aBSP; // checker of fast interferences
+   aBSP.LoadShape1(aScopy1); aBSP.LoadShape2(aScopy2);
+   aBSP.SetTolerance((theTolerance <= 0.) ? 0.0 : theTolerance);
+   // 1. Launch the checker
+   aBSP.Perform();
+  
+   // 2. Get sets of IDs of overlapped faces
+   for (BRepExtrema_OverlappedSubShapes::Iterator anIt1 (aBSP.OverlapSubShapes1()); anIt1.More(); anIt1.Next()) {
+     const TopoDS_Shape& aS1 = aBSP.GetSubShape1(anIt1.Key());
+     theIntersections1->Append(anIndices1.FindIndex(aS1));
+   }
+   
+   for (BRepExtrema_OverlappedSubShapes::Iterator anIt2 (aBSP.OverlapSubShapes2()); anIt2.More(); anIt2.Next()) {
+     const TopoDS_Shape& aS2 = aBSP.GetSubShape2(anIt2.Key());
+     theIntersections2->Append(anIndices2.FindIndex(aS2));
+   }
+   isGood = !theIntersections1->IsEmpty() && !theIntersections1->IsEmpty();
+   if (aBSP.IsDone())
+     SetErrorCode(OK);
++#endif // OCC_VERSION_LARGE > 0x06080000
++
+   return isGood;
+ }
++
  //=============================================================================
  /*!
   *  IsGoodForSolid
@@@ -1654,9 -1740,11 +1749,11 @@@ TCollection_AsciiString GEOMImpl_IMeasu
  
    try {
      OCC_CATCH_SIGNALS;
-     int iType, nbTypes [TopAbs_SHAPE];
-     for (iType = 0; iType < TopAbs_SHAPE; ++iType)
+     int iType, nbTypes [TopAbs_SHAPE], nbFlatType [TopAbs_SHAPE];
+     for (iType = 0; iType < TopAbs_SHAPE; ++iType) {
        nbTypes[iType] = 0;
+       nbFlatType[iType] = 0;
+     }
      nbTypes[aShape.ShapeType()]++;
  
      TopTools_MapOfShape aMapOfShape;
  
      TopTools_ListIteratorOfListOfShape itL (aListOfShape);
      for (; itL.More(); itL.Next()) {
-       TopoDS_Iterator it (itL.Value());
+       TopoDS_Shape sp = itL.Value();
+       TopoDS_Iterator it (sp);
        for (; it.More(); it.Next()) {
          TopoDS_Shape s = it.Value();
          if (aMapOfShape.Add(s)) {
            aListOfShape.Append(s);
            nbTypes[s.ShapeType()]++;
+           if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
+           nbFlatType[s.ShapeType()]++;
+           }
          }
        }
      }
      Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n";
      Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n";
      Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n";
-     Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent());
+     Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent()) + "\n";
+     if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
+       Astr = Astr + " --------------------- \n Flat content : \n";
+       if (nbFlatType[TopAbs_VERTEX] > 0)
+       Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
+       if (nbFlatType[TopAbs_EDGE] > 0)
+       Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
+       if (nbFlatType[TopAbs_WIRE] > 0)
+       Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
+       if (nbFlatType[TopAbs_FACE] > 0)
+       Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
+       if (nbFlatType[TopAbs_SHELL] > 0)
+       Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
+       if (nbFlatType[TopAbs_SOLID] > 0)
+       Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
+     }
    }
    catch (Standard_Failure) {
      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
index f7df593adf9d02fabfb17911189d3e6a54f59ab7,9f1ee5e88f8385ee1dfa53f0bb666246d041ab7f..da74684cba267292447d91ad69b57c501a0928cd
@@@ -25,7 -25,7 +25,7 @@@
  //  Author    : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
  //  Project   : SALOME
  
- #include <Standard_Stream.hxx>
//#include <Standard_Stream.hxx>
  
  #include "GEOMImpl_IShapesOperations.hxx"
  
  #include "GEOMImpl_VectorDriver.hxx"
  #include "GEOMImpl_ShapeDriver.hxx"
  #include "GEOMImpl_GlueDriver.hxx"
+ #include "GEOMImpl_FillingDriver.hxx"
  
  #include "GEOMImpl_IVector.hxx"
  #include "GEOMImpl_IShapes.hxx"
+ #include "GEOMImpl_IShapeExtend.hxx"
  #include "GEOMImpl_IGlue.hxx"
+ #include "GEOMImpl_IFilling.hxx"
  
  #include "GEOMImpl_Block6Explorer.hxx"
  #include "GEOMImpl_IHealingOperations.hxx"
  
  #include "GEOMAlgo_ClsfBox.hxx"
  #include "GEOMAlgo_ClsfSolid.hxx"
- #include "GEOMAlgo_CoupleOfShapes.hxx"
  #include "GEOMAlgo_FinderShapeOn1.hxx"
  #include "GEOMAlgo_FinderShapeOnQuad.hxx"
  #include "GEOMAlgo_FinderShapeOn2.hxx"
  #include "GEOMAlgo_GetInPlace.hxx"
+ #include "GEOMAlgo_GetInPlaceAPI.hxx"
  #include "GEOMAlgo_GlueDetector.hxx"
- #include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
- #include "GEOMAlgo_ListOfCoupleOfShapes.hxx"
- #include <Basics_OCCTVersion.hxx>
  
  #include <utilities.h>
- #include <OpUtil.hxx>
- #include <Utils_ExceptHandlers.hxx>
- #include <TFunction_DriverTable.hxx>
- #include <TFunction_Driver.hxx>
- #include <TFunction_Logbook.hxx>
- #include <TDataStd_Integer.hxx>
- #include <TDataStd_IntegerArray.hxx>
- #include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
- #include <TDF_Tool.hxx>
- #include <BRepExtrema_ExtCF.hxx>
- #include <BRepExtrema_DistShapeShape.hxx>
  
- #include <BRep_Tool.hxx>
- #include <BRep_Builder.hxx>
- #include <BRepTools.hxx>
- #include <BRepGProp.hxx>
  #include <BRepAdaptor_Curve.hxx>
  #include <BRepAdaptor_Surface.hxx>
- #include <BRepBndLib.hxx>
- #include <BRepMesh_IncrementalMesh.hxx>
- #include <TopAbs.hxx>
+ #include <BRepTools.hxx>
+ #include <BRep_Builder.hxx>
+ #include <BRep_Tool.hxx>
+ #include <GeomLib_Tool.hxx>
+ #include <Geom_CylindricalSurface.hxx>
+ #include <Geom_Plane.hxx>
+ #include <Geom_SphericalSurface.hxx>
+ #include <Geom_Surface.hxx>
+ #include <Precision.hxx>
+ #include <TColStd_HArray1OfInteger.hxx>
+ #include <TDF_Tool.hxx>
+ #include <TDataStd_Integer.hxx>
+ #include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
  #include <TopExp.hxx>
  #include <TopExp_Explorer.hxx>
- #include <TopLoc_Location.hxx>
- #include <TopoDS.hxx>
- #include <TopoDS_Shape.hxx>
- #include <TopoDS_Solid.hxx>
- #include <TopoDS_Face.hxx>
- #include <TopoDS_Edge.hxx>
- #include <TopoDS_Vertex.hxx>
- #include <TopoDS_Compound.hxx>
- #include <TopoDS_Iterator.hxx>
- #include <TopTools_Array1OfShape.hxx>
  #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
  #include <TopTools_IndexedMapOfShape.hxx>
  #include <TopTools_ListIteratorOfListOfShape.hxx>
- #include <TopTools_MapOfShape.hxx>
  #include <TopTools_MapOfOrientedShape.hxx>
- #include <Geom_Surface.hxx>
- #include <Geom_Plane.hxx>
- #include <Geom_SphericalSurface.hxx>
- #include <Geom_CylindricalSurface.hxx>
- #include <GeomAdaptor_Surface.hxx>
- #include <GeomLib_Tool.hxx>
- #include <Geom2d_Curve.hxx>
- #include <Bnd_Box.hxx>
- #include <GProp_GProps.hxx>
- #include <TColStd_Array1OfReal.hxx>
- #include <TColStd_HArray1OfInteger.hxx>
- #include <TColStd_ListIteratorOfListOfInteger.hxx>
- #include <TColStd_ListOfInteger.hxx>
+ #include <TopTools_MapOfShape.hxx>
+ #include <TopTools_SequenceOfShape.hxx>
+ #include <TopoDS.hxx>
+ #include <TopoDS_Compound.hxx>
+ #include <TopoDS_Edge.hxx>
+ #include <TopoDS_Face.hxx>
+ #include <TopoDS_Iterator.hxx>
+ #include <TopoDS_Shape.hxx>
+ #include <TopoDS_Solid.hxx>
+ #include <TopoDS_Vertex.hxx>
  #include <gp_Cylinder.hxx>
- #include <gp_Lin.hxx>
  #include <gp_Pnt.hxx>
  
  #include <vector>
- #include <algorithm>
- #include <functional>
  
- #include <Standard_NullObject.hxx>
  #include <Standard_Failure.hxx>
  #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
  
- // Includes added for GetInPlace algorithm improvement
- #include <GEOMImpl_MeasureDriver.hxx>
- #include <GEOMImpl_IMeasure.hxx>
- #include <BRepBuilderAPI_MakeVertex.hxx>
+ namespace {
  
- #include <BRepClass_FaceClassifier.hxx>
- #include <BRepClass3d_SolidClassifier.hxx>
- #include <Precision.hxx>
+   void AddFlatSubShapes(const TopoDS_Shape& S, TopTools_ListOfShape& L, TopTools_MapOfShape& M)
+   {
+     if (S.ShapeType() != TopAbs_COMPOUND) {
+       L.Append(S);
+     }
+     else {
+       TopoDS_Iterator It(S, Standard_True, Standard_True);
+       for (; It.More(); It.Next()) {
+       TopoDS_Shape SS = It.Value();
+       if (M.Add(SS))
+         AddFlatSubShapes(SS, L, M);
+       }
+     }
+   }
+ }
  
 +namespace
 +{
 +  const double MAX_TOLERANCE = 1.e-7;
 +
 +  /**
 +   * \brief Returns the vertex from theWhere shape that is coincident with
 +   * theVertex.
 +   *
 +   * \param theWhere the shape where the coinsident vertex is searched.
 +   * \param theVertex the vertex to be searched.
 +   * \return the coincident vertex if it is found. Otherwise null object.
 +   */
 +  static TopoDS_Vertex getSameVertex(const TopoDS_Shape  &theWhere,
 +                                     const TopoDS_Vertex &theVertex)
 +  {
 +    TopoDS_Vertex       aResult;
 +    gp_Pnt              aPoint = BRep_Tool::Pnt(theVertex);
 +    TopExp_Explorer     anExp(theWhere, TopAbs_VERTEX);
 +    TopTools_MapOfShape aMap;
 +    
 +    for(; anExp.More(); anExp.Next()) {
 +      const TopoDS_Shape &aLocalShape = anExp.Current();
 +
 +      if(!aMap.Add(aLocalShape)) {
 +        continue;
 +      }
 +
 +      TopoDS_Vertex aVertex = TopoDS::Vertex(aLocalShape);
 +      gp_Pnt        aPoint2 = BRep_Tool::Pnt(aVertex);
 +
 +      if(aPoint.Distance(aPoint2) <= MAX_TOLERANCE) {
 +        aResult = aVertex;
 +        break;
 +      }
 +    }
 +
 +    return aResult;
 +  }
 +} // end of namespace
 +
  //=============================================================================
  /*!
   *   constructor:
@@@ -596,6 -534,178 +574,178 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
    return aShape;
  }
  
+ //=============================================================================
+ /*!
+  *  MakeFaceFromSurface
+  */
+ //=============================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceFromSurface
+                                               (Handle(GEOM_Object) theFace,
+                                                Handle(GEOM_Object) theWire)
+ {
+   SetErrorCode(KO);
+   //Add a new object
+   Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+   //Add a new function
+   Handle(GEOM_Function) aFunction =
+     aShape->AddFunction(GEOMImpl_ShapeDriver::GetID(), FACE_FROM_SURFACE);
+   if (aFunction.IsNull()) {
+     return NULL;
+   }
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) {
+     return NULL;
+   }
+   GEOMImpl_IShapes aCI (aFunction);
+   Handle(TColStd_HSequenceOfTransient) aShapesSeq =
+     new TColStd_HSequenceOfTransient;
+   Handle(GEOM_Function) aRefFace = theFace->GetLastFunction();
+   Handle(GEOM_Function) aRefWire = theWire->GetLastFunction();
+   if (aRefFace.IsNull()) {
+     SetErrorCode("NULL argument face for the face construction");
+     return NULL;
+   }
+   if (aRefWire.IsNull()) {
+     SetErrorCode("NULL argument wire for the face construction");
+     return NULL;
+   }
+   aShapesSeq->Append(aRefFace);
+   aShapesSeq->Append(aRefWire);
+   aCI.SetShapes(aShapesSeq);
+   //Compute the face
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump (aFunction) << aShape
+     << " = geompy.MakeFaceFromSurface(" << theFace << ", " << theWire << ")";
+   SetErrorCode(OK);
+   return aShape;
+ }
+ //=============================================================================
+ /*!
+  *  MakeFaceWithConstraints
+  */
+ //=============================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWithConstraints
+                              (std::list<Handle(GEOM_Object)> theConstraints)
+ {
+   SetErrorCode(KO);
+   //Add a new object
+   Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+   //Add a new function
+   Handle(GEOM_Function) aFunction =
+     aShape->AddFunction(GEOMImpl_FillingDriver::GetID(), FILLING_ON_CONSTRAINTS);
+   if (aFunction.IsNull()) return NULL;
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_FillingDriver::GetID()) return NULL;
+   GEOMImpl_IFilling aCI (aFunction);
+   Handle(TColStd_HSequenceOfTransient) aConstraints = new TColStd_HSequenceOfTransient;
+   // Shapes
+   std::list<Handle(GEOM_Object)>::iterator it = theConstraints.begin();
+   while (it != theConstraints.end()) {
+     Handle(GEOM_Object) anObject = (*it);
+     if ( anObject.IsNull() || anObject->GetValue().ShapeType() != TopAbs_EDGE ) {
+       SetErrorCode("NULL argument edge for the face construction");
+       return NULL;
+     }
+     Handle(GEOM_Function) aRefSh = anObject->GetLastFunction();
+     aConstraints->Append(aRefSh);
+     it++;
+     if ( it != theConstraints.end() ) {
+       Handle(GEOM_Object) aFace = (*it);
+       if ( aFace.IsNull() ) {
+         // null constraint face - it is a valid case
+         it++;
+         continue;
+       }
+       if ( aFace->GetValue().ShapeType() != TopAbs_FACE )
+         // constraint face can be omitted - it is a valid case
+         continue;
+       if ( IsSubShapeBelongsTo( anObject, 0, aFace, 0 ) ) {
+         // valid constraint
+         aRefSh = aFace->GetLastFunction();
+         aConstraints->Append(aRefSh);
+         it++;
+       }
+       else {
+         // bad constraint
+         SetErrorCode("Face is NULL or not connected to the Edge");
+         return NULL;
+       }
+     }
+   }
+   aCI.SetShapes( aConstraints );
+   //Compute the shape
+   Standard_Boolean isWarning = Standard_False;
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     // to provide warning
+     if (!aFunction->GetValue().IsNull()) {
+       isWarning = Standard_True;
+     } else {
+       return NULL;
+     }
+   }
+   //Make a Python command
+   GEOM::TPythonDump pd (aFunction);
+   pd << aShape << " = geompy.MakeFaceWithConstraints([";
+   // Constraints
+   it = theConstraints.begin();
+   if (it != theConstraints.end() ) {
+     pd << (*it++);
+     while (it != theConstraints.end()) {
+       Handle(GEOM_Object) anObject = (*it++);
+       if( !anObject.IsNull() )
+         pd << ", " << anObject;
+     }
+   }
+   pd << "])";
+   // to provide warning
+   if (!isWarning) SetErrorCode(OK);
+   return aShape;
+ }
  //=============================================================================
  /*!
   *  MakeShell
@@@ -701,19 -811,94 +851,94 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
    return aShape;
  }
  
+ //=============================================================================
+ /*!
+  *  MakeSolidFromConnectedFaces
+  */
+ //=============================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidFromConnectedFaces
+                              (std::list<Handle(GEOM_Object)> theFacesOrShells,
+                               const Standard_Boolean isIntersect)
+ {
+   SetErrorCode(KO);
+   //Add a new object
+   Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
+   //Add a new function
+   Handle(GEOM_Function) aFunction =
+     aSolid->AddFunction(GEOMImpl_ShapeDriver::GetID(), SOLID_FACES);
+   if (aFunction.IsNull()) return NULL;
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL;
+   GEOMImpl_IShapes aCI (aFunction);
+   Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient;
+   // Shapes
+   std::list<Handle(GEOM_Object)>::iterator it = theFacesOrShells.begin();
+   for (; it != theFacesOrShells.end(); it++) {
+     Handle(GEOM_Function) aRefSh = (*it)->GetLastFunction();
+     if (aRefSh.IsNull()) {
+       SetErrorCode("NULL argument shape for the shape construction");
+       return NULL;
+     }
+     aShapesSeq->Append(aRefSh);
+   }
+   aCI.SetShapes(aShapesSeq);
+   aCI.SetIsIntersect(isIntersect);
+   //Compute the shape
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump pd (aFunction);
+   pd << aSolid << " = geompy.MakeSolidFromConnectedFaces([";
+   // Shapes
+   it = theFacesOrShells.begin();
+   if (it != theFacesOrShells.end()) {
+     pd << (*it++);
+     while (it != theFacesOrShells.end()) {
+       pd << ", " << (*it++);
+     }
+   }
+   pd << "]," << (isIntersect ? "True" : "False") << ")";
+   SetErrorCode(OK);
+   return aSolid;
+ }
  //=============================================================================
  /*!
   *  MakeGlueFaces
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFaces
                                                (Handle(GEOM_Object) theShape,
-                                                  const Standard_Real theTolerance,
-                                                  const Standard_Boolean doKeepNonSolids)
+ Handle(GEOM_Object)
GEOMImpl_IShapesOperations::MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
+                                            const Standard_Real               theTolerance,
+                                            const Standard_Boolean            doKeepNonSolids)
  {
    SetErrorCode(KO);
  
-   if (theShape.IsNull()) return NULL;
+   Handle(TColStd_HSequenceOfTransient) objects = GEOM_Object::GetLastFunctions( theShapes );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
  
    //Add a new Glued object
    Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
  
    GEOMImpl_IGlue aCI (aFunction);
  
-   Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-   if (aRefShape.IsNull()) return NULL;
-   aCI.SetBase(aRefShape);
+   aCI.SetBase( objects );
    aCI.SetTolerance(theTolerance);
    aCI.SetKeepNonSolids(doKeepNonSolids);
  
  
    //Make a Python command
    GEOM::TPythonDump(aFunction) << aGlued << " = geompy.MakeGlueFaces("
-     << theShape << ", " << theTolerance << ")";
+     << theShapes << ", " << theTolerance << ")";
  
    // to provide warning
    if (!isWarning) SetErrorCode(OK);
@@@ -846,16 -1028,25 +1068,25 @@@ Handle(TColStd_HSequenceOfTransient) GE
   *  MakeGlueFacesByList
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFacesByList
                                                (Handle(GEOM_Object) theShape,
-                                                  const Standard_Real theTolerance,
-                                                  std::list<Handle(GEOM_Object)> theFaces,
-                                                  const Standard_Boolean doKeepNonSolids,
-                                                  const Standard_Boolean doGlueAllEdges)
+ Handle(GEOM_Object)
GEOMImpl_IShapesOperations::MakeGlueFacesByList(std::list< Handle(GEOM_Object) >& theShapes,
+                                                 const Standard_Real               theTolerance,
+                                                 std::list<Handle(GEOM_Object)> &  theFaces,
+                                                 const Standard_Boolean            doKeepNonSolids,
+                                                 const Standard_Boolean            doGlueAllEdges)
  {
    SetErrorCode(KO);
  
-   if (theShape.IsNull()) return NULL;
+   Handle(TColStd_HSequenceOfTransient) objects = GEOM_Object::GetLastFunctions( theShapes );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
+   Handle(TColStd_HSequenceOfTransient) aFaces = GEOM_Object::GetLastFunctions( theFaces );
+   if ( aFaces.IsNull() ) {
+     SetErrorCode("NULL argument shape for the shape construction");
+     return NULL;
+   }
  
    //Add a new Glued object
    Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
  
    GEOMImpl_IGlue aCI (aFunction);
  
-   Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-   if (aRefShape.IsNull()) return NULL;
-   aCI.SetBase(aRefShape);
+   aCI.SetBase( objects );
    aCI.SetTolerance(theTolerance);
    aCI.SetKeepNonSolids(doKeepNonSolids);
    aCI.SetGlueAllEdges(doGlueAllEdges);
-   Handle(TColStd_HSequenceOfTransient) aFaces = new TColStd_HSequenceOfTransient;
-   std::list<Handle(GEOM_Object)>::iterator it = theFaces.begin();
-   for (; it != theFaces.end(); it++) {
-     Handle(GEOM_Function) aRefSh = (*it)->GetLastFunction();
-     if (aRefSh.IsNull()) {
-       SetErrorCode("NULL argument shape for the shape construction");
-       return NULL;
-     }
-     aFaces->Append(aRefSh);
-   }
    aCI.SetFaces(aFaces);
  
    //Compute the sub-shape value
  
    GEOM::TPythonDump pd(aFunction);
    pd << aGlued << " = geompy.MakeGlueFacesByList("
-      << theShape << ", " << theTolerance << ", [";
-   // Faces
-   it = theFaces.begin();
-   if (it != theFaces.end()) {
-     pd << (*it++);
-     while (it != theFaces.end()) {
-       pd << ", " << (*it++);
-     }
-   }
-   pd << "], " << (bool)doKeepNonSolids << ", " << (bool)doGlueAllEdges << ")";
+      << theShapes << ", " << theTolerance << ", " << theFaces << ", "
+      << (bool)doKeepNonSolids << ", " << (bool)doGlueAllEdges << ")";
  
    // to provide warning
    if (!isWarning) SetErrorCode(OK);
   *  MakeGlueEdges
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueEdges
                                                (Handle(GEOM_Object) theShape,
-                                                  const Standard_Real theTolerance)
+ Handle(GEOM_Object)
GEOMImpl_IShapesOperations::MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
+                                            const Standard_Real               theTolerance)
  {
    SetErrorCode(KO);
  
-   if (theShape.IsNull()) return NULL;
+   Handle(TColStd_HSequenceOfTransient) objects = GEOM_Object::GetLastFunctions( theShapes );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
  
    //Add a new Glued object
    Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
  
    GEOMImpl_IGlue aCI (aFunction);
  
-   Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-   if (aRefShape.IsNull()) return NULL;
-   aCI.SetBase(aRefShape);
+   aCI.SetBase( objects );
    aCI.SetTolerance(theTolerance);
    aCI.SetKeepNonSolids(true);
  
  
    //Make a Python command
    GEOM::TPythonDump(aFunction) << aGlued << " = geompy.MakeGlueEdges("
-     << theShape << ", " << theTolerance << ")";
+     << theShapes << ", " << theTolerance << ")";
  
    // to provide warning
    if (!isWarning) SetErrorCode(OK);
   *  GetGlueShapes
   */
  //=============================================================================
- Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueShapes
                                                (Handle(GEOM_Object)    theShape,
-                                                  const Standard_Real    theTolerance,
-                                                  const TopAbs_ShapeEnum theType)
+ Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IShapesOperations::GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
+                                            const Standard_Real               theTolerance,
+                                            const TopAbs_ShapeEnum            theType)
  {
    SetErrorCode(KO);
  
-   if (theShape.IsNull()) return NULL;
-   TopoDS_Shape aShape = theShape->GetValue();
-   if (aShape.IsNull()) return NULL;
+   TopoDS_Shape aShape;
+   TopTools_SequenceOfShape shapes;
+   std::list< Handle(GEOM_Object) >::iterator s = theShapes.begin();
+   Handle(GEOM_Object) lastCreatedGO;
+   for ( ; s != theShapes.end(); ++s )
+   {
+     Handle(GEOM_Object) go = *s;
+     if ( go.IsNull() ) return NULL;
+     aShape = go->GetValue();
+     if ( aShape.IsNull() ) return NULL;
+     shapes.Append( aShape );
+     lastCreatedGO = GEOM::GetCreatedLast( lastCreatedGO, go );
+   }
+   if ( shapes.Length() > 1 )
+   {
+     TopoDS_Compound compound;
+     BRep_Builder builder;
+     builder.MakeCompound( compound );
+     for ( int i = 1; i <= shapes.Length(); ++i )
+       builder.Add( compound, shapes( i ) );
+     aShape = compound;
+   }
  
    Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
  
    Standard_Integer iErr = aGluer.ErrorStatus();
    if (iErr) return NULL;
  
-   TCollection_AsciiString anAsciiList, anEntry;
-   TopTools_IndexedMapOfShape anIndices;
-   TopExp::MapShapes(aShape, anIndices);
+   std::vector< TopTools_IndexedMapOfShape* > anIndices( shapes.Length(), NULL );
    Handle(TColStd_HArray1OfInteger) anArray;
    Handle(GEOM_Object) anObj;
  
    GEOMUtils::SortShapes(listOnePerSet, Standard_False);
  
    TopTools_ListIteratorOfListOfShape aListIt (listOnePerSet);
-   for (; aListIt.More(); aListIt.Next()) {
+   for (; aListIt.More(); aListIt.Next())
+   {
      TopoDS_Shape aValue = aListIt.Value();
-     anArray = new TColStd_HArray1OfInteger(1,1);
-     anArray->SetValue(1, anIndices.FindIndex(aValue));
-     anObj = GetEngine()->AddSubShape(theShape, anArray);
-     if (!anObj.IsNull()) {
-       aSeq->Append(anObj);
-       // for python command
-       TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-       anAsciiList += anEntry;
-       anAsciiList += ",";
+     // find a shape to add aValue as a sub-shape
+     anObj.Nullify();
+     s = theShapes.begin();
+     for ( int i = 0; i < shapes.Length(); ++i, ++s )
+     {
+       Handle(GEOM_Object) object = *s;
+       if ( !anIndices[i] ) {
+         anIndices[i] = new TopTools_IndexedMapOfShape;
+         TopExp::MapShapes( object->GetValue(), *anIndices[i]);
+       }
+       if (int index = anIndices[i]->FindIndex( aValue )) {
+         anArray = new TColStd_HArray1OfInteger(1,1);
+         anArray->SetValue(1, index);
+         anObj = GetEngine()->AddSubShape( object, anArray);
+         break;
+       }
      }
+     if (!anObj.IsNull())
+       aSeq->Append(anObj);
    }
+   for ( size_t i = 0 ; i < anIndices.size(); ++i )
+     delete anIndices[i];
  
    // Make a Python command
-   if (anAsciiList.Length() > 0) {
-     anAsciiList.Trunc(anAsciiList.Length() - 1);
-     Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+   if ( aSeq->Length() > 0)
+   {
+     Handle(GEOM_Function) aFunction = lastCreatedGO->GetLastFunction();
      GEOM::TPythonDump pd (aFunction, /*append=*/true);
-     pd << "[" << anAsciiList.ToCString();
-     if (theType == TopAbs_FACE)
-       pd << "] = geompy.GetGlueFaces(" << theShape << ", " << theTolerance << ")";
-     else if (theType == TopAbs_EDGE)
-       pd << "] = geompy.GetGlueEdges(" << theShape << ", " << theTolerance << ")";
+     pd << aSeq
+        << " = geompy." << (theType == TopAbs_FACE ? "GetGlueFaces" : "GetGlueEdges" )
+        << "( " << theShapes << ", " << theTolerance << ")";
    }
  
    SetErrorCode(OK);
   *  MakeGlueEdgesByList
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueEdgesByList
                                                (Handle(GEOM_Object) theShape,
-                                                  const Standard_Real theTolerance,
-                                                  std::list<Handle(GEOM_Object)> theEdges)
+ Handle(GEOM_Object)
GEOMImpl_IShapesOperations::MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
+                                                  const Standard_Real               theTolerance,
+                                                  std::list<Handle(GEOM_Object)>&   theEdges)
  {
    SetErrorCode(KO);
  
-   if (theShape.IsNull()) return NULL;
+   Handle(TColStd_HSequenceOfTransient) objects = GEOM_Object::GetLastFunctions( theShapes );
+   if ( objects.IsNull() || objects->IsEmpty() ) {
+     SetErrorCode("NULL argument shape");
+     return NULL;
+   }
+   Handle(TColStd_HSequenceOfTransient) anEdges = GEOM_Object::GetLastFunctions( theEdges );
+   if ( anEdges.IsNull() ) {
+     SetErrorCode("NULL argument shape for the shape construction");
+     return NULL;
+   }
    //Add a new Glued object
    Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
  
  
    GEOMImpl_IGlue aCI (aFunction);
  
-   Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-   if (aRefShape.IsNull()) return NULL;
-   aCI.SetBase(aRefShape);
+   aCI.SetBase( objects );
    aCI.SetTolerance(theTolerance);
    aCI.SetKeepNonSolids(true);
-   Handle(TColStd_HSequenceOfTransient) anEdges = new TColStd_HSequenceOfTransient;
-   std::list<Handle(GEOM_Object)>::iterator it = theEdges.begin();
-   for (; it != theEdges.end(); it++) {
-     Handle(GEOM_Function) aRefSh = (*it)->GetLastFunction();
-     if (aRefSh.IsNull()) {
-       SetErrorCode("NULL argument shape for the shape construction");
-       return NULL;
-     }
-     anEdges->Append(aRefSh);
-   }
    aCI.SetFaces(anEdges);
  
    //Compute the sub-shape value
  
    GEOM::TPythonDump pd (aFunction);
    pd << aGlued << " = geompy.MakeGlueEdgesByList("
-      << theShape << ", " << theTolerance << ", [";
-   // Edges
-   it = theEdges.begin();
-   if (it != theEdges.end()) {
-     pd << (*it++);
-     while (it != theEdges.end()) {
-       pd << ", " << (*it++);
-     }
-   }
-   pd << "])";
+      << theShapes << ", " << theTolerance << ", " << theEdges << " )";
  
    // to provide warning
    if (!isWarning) SetErrorCode(OK);
  //=============================================================================
  Handle(TColStd_HSequenceOfTransient)
  GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShape,
-                                                 const Standard_Boolean theGroupsOnly)
+                                                   const Standard_Boolean theGroupsOnly)
  {
    // note: this method does not return fields
  
        Handle(GEOM_BaseObject) obj = Handle(GEOM_BaseObject)::DownCast( results->Value(i));
        obj->GetEntryString();
        if ( i < results->Length() )
-       anAsciiList += ",";
+         anAsciiList += ",";
      }
      
      GEOM::TPythonDump pd (theShape->GetLastFunction(), /*append=*/true);
  
  Handle(TColStd_HSequenceOfTransient)
  GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShape,
-                                                 const Standard_Integer theTypes)
+                                                   const Standard_Integer theTypes)
  {
    SetErrorCode(KO);
  
        bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
        bool isField    = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
        if (theTypes & Groups    && isGroup ||
-         theTypes & SubShapes && isSubShape ||
-         theTypes & Fields    && isField) {
+           theTypes & SubShapes && isSubShape ||
+           theTypes & Fields    && isField) {
          aSeq->Append(anObj);
        }
      }
@@@ -1273,17 -1455,20 +1495,20 @@@ Handle(TColStd_HSequenceOfTransient) GE
    TopTools_ListOfShape listShape;
  
    if (aShape.ShapeType() == TopAbs_COMPOUND &&
-       (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
-        TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPSOLID ||
-        TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPOUND))
+       (theShapeType == TopAbs_SHAPE || theShapeType == TopAbs_FLAT || theShapeType == TopAbs_COMPOUND))
    {
      TopoDS_Iterator It (aShape, Standard_True, Standard_True);
      for (; It.More(); It.Next()) {
-       if (mapShape.Add(It.Value())) {
-         if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
-             TopAbs_ShapeEnum(theShapeType) == It.Value().ShapeType()) {
-           listShape.Append(It.Value());
+       TopoDS_Shape SS = It.Value();
+       if (mapShape.Add(SS)) {
+       if (theShapeType == TopAbs_FLAT) {
+           AddFlatSubShapes(SS, listShape, mapShape);
+       }
+         else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
+         listShape.Append(SS);
          }
+         // VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
+         // it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
        }
      }
    }
          listShape.Append(exp.Current());
    }
  
-   if (listShape.IsEmpty()) {
+   if (listShape.IsEmpty()){
      //SetErrorCode("The given shape has no sub-shapes of the requested type");
      SetErrorCode(NOT_FOUND_ANY); // NPAL18017
      return aSeq;
        // Put this subshape in the list of sub-shapes of theMainShape
        aMainShape->AddSubShapeReference(aFunction);
      }
      if (!anObj.IsNull()) {
-       aSeq->Append(anObj);
+           aSeq->Append(anObj);
  
-       // for python command
-       TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-       anAsciiList += anEntry;
-       anAsciiList += ",";
-     }
-   }
+           // for python command
+           TDF_Tool::Entry(anObj->GetEntry(), anEntry);
+           anAsciiList += anEntry;
+           anAsciiList += ",";
+         }
+       }
  
    //Make a Python command
    anAsciiList.Trunc(anAsciiList.Length() - 1);
@@@ -1397,16 -1581,17 +1621,17 @@@ Handle(TColStd_HSequenceOfInteger) GEOM
    TopTools_ListOfShape listShape;
  
    if (aShape.ShapeType() == TopAbs_COMPOUND &&
-       (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
-        TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPSOLID ||
-        TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPOUND))
+       (theShapeType == TopAbs_SHAPE || theShapeType == TopAbs_FLAT || theShapeType == TopAbs_COMPOUND))
    {
      TopoDS_Iterator It (aShape, Standard_True, Standard_True);
      for (; It.More(); It.Next()) {
-       if (mapShape.Add(It.Value())) {
-         if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
-             TopAbs_ShapeEnum(theShapeType) == It.Value().ShapeType()) {
-           listShape.Append(It.Value());
+       TopoDS_Shape SS = It.Value();
+       if (mapShape.Add(SS)) {
+       if (theShapeType == TopAbs_FLAT) {
+           AddFlatSubShapes(SS, listShape, mapShape);
+       }
+         else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
+           listShape.Append(SS);
          }
        }
      }
@@@ -1784,6 -1969,39 +2009,39 @@@ TCollection_AsciiString GEOMImpl_IShape
    return aTypeName;
  }
  
+ //=============================================================================
+ /*!
+  *  IsSubShapeBelongsTo
+  */
+ //=============================================================================
+ Standard_Boolean GEOMImpl_IShapesOperations::IsSubShapeBelongsTo( Handle(GEOM_Object) theSubObject,
+                                                                   const Standard_Integer theSubObjectIndex,
+                                                                   Handle(GEOM_Object) theObject,
+                                                                   const Standard_Integer theObjectIndex)
+ {
+   if ( theObject.IsNull() || theSubObject.IsNull() )
+     return false;
+   TopoDS_Shape shape    = theObject->GetValue();
+   TopoDS_Shape subShape = theSubObject->GetValue();
+   if ( shape.IsNull() || subShape.IsNull() )
+     return false;
+   TopTools_IndexedMapOfShape anIndices;
+   if ( theObjectIndex > 0 ) {
+     TopExp::MapShapes( shape, anIndices );
+     shape = anIndices.FindKey(theObjectIndex);
+   }
+   if ( theSubObjectIndex > 0 ) {
+     TopExp::MapShapes( subShape, anIndices );
+     subShape = anIndices.FindKey(theSubObjectIndex);
+   }
+   TopExp::MapShapes( shape, anIndices );
+   return anIndices.Contains( subShape );
+ }
  //=============================================================================
  /*!
   *  NumberOfSubShapes
@@@ -1825,33 -2043,41 +2083,41 @@@ Standard_Integer GEOMImpl_IShapesOperat
    */
  
    try {
-     OCC_CATCH_SIGNALS;
-     int iType, nbTypes [TopAbs_SHAPE];
-     for (iType = 0; iType < TopAbs_SHAPE; ++iType)
-       nbTypes[iType] = 0;
-     nbTypes[aShape.ShapeType()]++;
-     TopTools_MapOfShape aMapOfShape;
-     aMapOfShape.Add(aShape);
-     TopTools_ListOfShape aListOfShape;
-     aListOfShape.Append(aShape);
-     TopTools_ListIteratorOfListOfShape itL (aListOfShape);
-     for (; itL.More(); itL.Next()) {
-       TopoDS_Iterator it (itL.Value());
-       for (; it.More(); it.Next()) {
-         TopoDS_Shape s = it.Value();
-         if (aMapOfShape.Add(s)) {
-           aListOfShape.Append(s);
-           nbTypes[s.ShapeType()]++;
+     if (theShapeType == TopAbs_FLAT) {
+       TopTools_MapOfShape aMapOfShape;
+       TopTools_ListOfShape aListOfShape;
+       AddFlatSubShapes(aShape, aListOfShape, aMapOfShape);
+       nbShapes = aListOfShape.Extent();
+     }
+     else {
+       OCC_CATCH_SIGNALS;
+       int iType, nbTypes [TopAbs_SHAPE];
+       for (iType = 0; iType < TopAbs_SHAPE; ++iType)
+         nbTypes[iType] = 0;
+       nbTypes[aShape.ShapeType()]++;
+       
+       TopTools_MapOfShape aMapOfShape;
+       aMapOfShape.Add(aShape);
+       TopTools_ListOfShape aListOfShape;
+       aListOfShape.Append(aShape);
+       
+       TopTools_ListIteratorOfListOfShape itL (aListOfShape);
+       for (; itL.More(); itL.Next()) {
+         TopoDS_Iterator it (itL.Value());
+         for (; it.More(); it.Next()) {
+           TopoDS_Shape s = it.Value();
+           if (aMapOfShape.Add(s)) {
+             aListOfShape.Append(s);
+             nbTypes[s.ShapeType()]++;
+           }
          }
        }
+       
+       if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE)
+         nbShapes = aMapOfShape.Extent();
+       else
+         nbShapes = nbTypes[theShapeType];
      }
-     if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE)
-       nbShapes = aMapOfShape.Extent();
-     else
-       nbShapes = nbTypes[theShapeType];
    }
    catch (Standard_Failure) {
      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
@@@ -2026,7 -2252,7 +2292,7 @@@ Handle(TColStd_HSequenceOfTransient) GE
    }
  
    if (aSeq->IsEmpty()) {
-     SetErrorCode("The given shapes have no shared sub-shapes of the requested type");
+     SetErrorCode(NOT_FOUND_ANY);
      return aSeq;
    }
  
  //=======================================================================
  //function : GetSharedShapes
  //purpose  :
+ //
+ // NOTE on the implementation
+ // 
+ // 1) Resulting sub-shapes are published as a children of the 1st input shape
+ //    from theShapes list. Due to this reason only direct sub-shapes of the 1st
+ //    shape can be contained in the result of the operation (i.e. shares between
+ //    2nd/3rd, etc couples cannot be retrieved.
+ // 2) An exception from above case is when a single compound is specified as an
+ //    input. In this case we search shares between its top-level content, so we
+ //    are able to search shares between all possible couples of shapes.
+ // 3) Parameter theMultiShare controls what types of shares to search:
+ //    - True: get sub-shapes that are shared between ALL input shapes;
+ //    - False: get shares between couples of input sub-shapes (see points 1 and 2).
+ //
+ // Thus, we have the following cases:
+ // [1] theShapes = N shapes (N>1), theMultiShare = True
+ //     Result: sub-shapes that are shared by all theShapes
+ // [2] theShapes = N shapes (N>1), theMultiShare = False
+ //     Result: sub-shapes of 1st shape from theShapes that are shared with any shape
+ //     from theShapes
+ // [3] theShapes = 1 shape, theMultiShare = True
+ //     Result: sub-shapes that are shared by all top-level sub-objects of theShapes[0]
+ // [4] theShapes = 1 shape, theMultiShare = False
+ //     Result: sub-shapes of all possible couples of all top-level sub-objects of
+ //     theShapes[0].
  //=======================================================================
  Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes
-                                      (std::list<Handle(GEOM_Object)> theShapes,
-                                       const Standard_Integer         theShapeType)
+                                      (std::list<Handle(GEOM_Object)> & theShapes,
+                                       const Standard_Integer           theShapeType,
+                                       const bool                       theMultiShare)
  {
    SetErrorCode(KO);
  
    int aLen = theShapes.size();
    if (aLen < 1) return NULL;
  
-   int ind = 1;
    std::list<Handle(GEOM_Object)>::iterator it = theShapes.begin();
  
-   Handle(GEOM_Object) aMainObj = (*it++);
+   // main object is always first in the input list
+   // it is the object from which sub-shapes indices are taken
+   // and where results are published
+   Handle(GEOM_Object) aMainObj = *it;
    Handle(GEOM_Function) aMainShape = aMainObj->GetLastFunction();
-   if (aMainShape.IsNull()) {
-     SetErrorCode("NULL shape for GetSharedShapes");
-     return NULL;
-   }
-   TopoDS_Shape aShape1 = aMainShape->GetValue();
-   if (aShape1.IsNull()) return NULL;
-   TopTools_IndexedMapOfShape anIndices;
-   TopExp::MapShapes(aShape1, anIndices);
-   TopTools_IndexedMapOfShape mapSelected;
-   TopExp::MapShapes(aShape1, TopAbs_ShapeEnum(theShapeType), mapSelected);
  
-   // Find shared shapes
-   BRep_Builder B;
-   TopoDS_Compound aCurrSelection;
-   for (; it != theShapes.end(); it++, ind++) {
+   // collect all shapes from the input list (including first one) for processing
+   TopTools_SequenceOfShape shapeSeq;
+   for (; it != theShapes.end(); it++) {
      Handle(GEOM_Function) aRefShape = (*it)->GetLastFunction();
      if (aRefShape.IsNull()) {
        SetErrorCode("NULL shape for GetSharedShapes");
        return NULL;
      }
+     TopoDS_Shape aShape = aRefShape->GetValue();
+     if (aShape.IsNull()) {
+       SetErrorCode("NULL shape for GetSharedShapes");
+       return NULL;
+     }
+     shapeSeq.Append( aShape );
+   }
  
-     TopoDS_Compound aCompound;
-     B.MakeCompound(aCompound);
+   // if only single shape is specified as input
+   // collect all ites top-level sub-shapes for processing
+   if ( shapeSeq.Length() == 1 )
+   {
+     TopoDS_Shape aShape = shapeSeq.First();
+     shapeSeq.Clear();
+     for ( TopoDS_Iterator it( aShape ); it.More(); it.Next() )
+       shapeSeq.Append( it.Value() );
+   }
  
-     TopoDS_Shape aShape2 = aRefShape->GetValue();
-     if (aShape2.IsNull()) return NULL;
+   // map all sub-shapes in a main shape to their indices
+   TopTools_IndexedMapOfShape anIndices;
+   TopExp::MapShapes(aMainShape->GetValue(), anIndices);
+   TopTools_MapOfShape mapShape;
  
-     TopTools_MapOfShape mapShape2;
-     TopExp_Explorer exp (aShape2, TopAbs_ShapeEnum(theShapeType));
-     for (; exp.More(); exp.Next()) {
-       TopoDS_Shape aSS = exp.Current();
-       if (mapShape2.Add(aSS) && mapSelected.Contains(aSS)) {
-         B.Add(aCompound, aSS);
+   // find shared shapes
+   // here we will collect all shares
+   TopTools_ListOfShape aShared;
+   // number of iterations
+   int nbIters  =  theMultiShare || theShapes.size() > 1 ? 1 : shapeSeq.Length()-1;
+   // numShares factor to search (i.e. by what nb of shapes each found sub-shape should be shared)
+   int nbShares =  theMultiShare ? shapeSeq.Length()-1 : 1;
+     
+   for ( int iter = 1; iter <= nbIters; iter++) {
+     for ( int ind = iter+1; ind <= shapeSeq.Length(); ind++) {
+       if ( ind-1+nbShares > shapeSeq.Length() ) break;
+       TopoDS_Compound aCurrSelection;
+       TopoDS_Shape aShape1 = shapeSeq.Value( iter );
+       TopTools_IndexedMapOfShape mapSelected;
+       TopExp::MapShapes(aShape1, TopAbs_ShapeEnum(theShapeType), mapSelected);
+       for ( int s = 0; s < nbShares; s++ ) {
+         BRep_Builder B;
+         TopoDS_Compound aCompound;
+         B.MakeCompound(aCompound);
+         const TopoDS_Shape& aShape2 = shapeSeq.Value( ind+s );
+         TopTools_MapOfShape mapShape2;
+         TopExp_Explorer exp (aShape2, TopAbs_ShapeEnum(theShapeType));
+         for (; exp.More(); exp.Next()) {
+           const TopoDS_Shape& aSS = exp.Current();
+           if (mapShape2.Add(aSS) && mapSelected.Contains(aSS)) {
+             B.Add(aCompound, aSS);
+           }
+         }
+         mapSelected.Clear();
+         aCurrSelection = aCompound;
+         TopExp::MapShapes(aCurrSelection, TopAbs_ShapeEnum(theShapeType), mapSelected);
+       }
+       TopoDS_Iterator itSel(aCurrSelection, Standard_True, Standard_True);
+       for (; itSel.More(); itSel.Next()) {
+         const TopoDS_Shape& aSS = itSel.Value();
+         if (mapShape.Add(aSS) )
+         aShared.Append(aSS);
        }
      }
-     mapSelected.Clear();
-     TopExp::MapShapes(aCompound, TopAbs_ShapeEnum(theShapeType), mapSelected);
-     aCurrSelection = aCompound;
    }
  
-   // Create GEOM_Object for each found shared shape (collected in aCurrSelection)
-   Handle(GEOM_Object) anObj;
-   Handle(TColStd_HArray1OfInteger) anArray;
    Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-   TCollection_AsciiString anAsciiList, anEntry;
  
-   TopoDS_Iterator itSel (aCurrSelection, Standard_True, Standard_True);
-   for (; itSel.More(); itSel.Next()) {
-     anArray = new TColStd_HArray1OfInteger(1,1);
-     anArray->SetValue(1, anIndices.FindIndex(itSel.Value()));
+   if (aShared.IsEmpty()){
+     SetErrorCode(NOT_FOUND_ANY);
+     return aSeq;
+   }
+   // create GEOM_Object for each found shared shape (collected in aShared)
+   TCollection_AsciiString anAsciiList;
+   Handle(GEOM_Object) anObj;
+   TopTools_ListIteratorOfListOfShape itSub (aShared);
+   for (; itSub.More(); itSub.Next()) {
+     TopoDS_Shape aValue = itSub.Value();
+     Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
+     anArray->SetValue(1, anIndices.FindIndex(aValue));
      anObj = GetEngine()->AddSubShape(aMainObj, anArray);
      aSeq->Append(anObj);
  
      // for python command
+     TCollection_AsciiString anEntry;
      TDF_Tool::Entry(anObj->GetEntry(), anEntry);
      anAsciiList += anEntry;
      anAsciiList += ",";
    }
  
-   if (aSeq->IsEmpty()) {
-     SetErrorCode("The given shapes have no shared sub-shapes of the requested type");
-     return aSeq;
-   }
-   // Make a Python command
+   // make a Python command
    anAsciiList.Trunc(anAsciiList.Length() - 1);
  
-   // IPAL22904: TC6.5.0: order of python commands is wrong after dump study
-   Handle(TColStd_HSequenceOfTransient) anObjects = new TColStd_HSequenceOfTransient;
-   for( it = theShapes.begin(); it != theShapes.end(); it++ )
-   {
-     Handle(GEOM_Object) anObj = *it;
-     if( !anObj.IsNull() )
-       anObjects->Append( anObj );
-   }
-   // Get the function of the latest published object
-   Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast( anObjects )->GetLastFunction();
-   if( aFunction.IsNull() ) // just in case
-     aFunction = aMainShape;
-   GEOM::TPythonDump pd (aFunction, /*append=*/true);
+   GEOM::TPythonDump pd (anObj->GetLastFunction());
    pd << "[" << anAsciiList.ToCString()
-      << "] = geompy.GetSharedShapesMulti([";
+      << "] = geompy.GetSharedShapesMulti(";
+   if ( aLen > 1 )
+     pd << "[";
  
    it = theShapes.begin();
    pd << (*it++);
    while (it != theShapes.end()) {
      pd << ", " << (*it++);
    }
+   if ( aLen > 1 )
+     pd << "]";
  
-   pd << "], " << TopAbs_ShapeEnum(theShapeType) << ")";
+   pd << ", " << TopAbs_ShapeEnum(theShapeType) << ", " << theMultiShare << ")";
  
    SetErrorCode(OK);
    return aSeq;
@@@ -2675,44 -2951,6 +2991,44 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
    return aRes;
  }
  
 +//=============================================================================
 +/*!
 + *  GetSubShapeEdgeSorted
 + */
 +//=============================================================================
 +Handle(TColStd_HSequenceOfTransient)
 +    GEOMImpl_IShapesOperations::GetSubShapeEdgeSorted
 +                          (const Handle(GEOM_Object) &theShape,
 +                           const Handle(GEOM_Object) &theStartPoint)
 +{
 +  // Get the sorted edges indices.
 +  Handle(TColStd_HSequenceOfInteger) aSortedIDs =
 +    getSubShapeEdgeSortedIDs(theShape, theStartPoint);
 +
 +  // Get object by indices.
 +  TCollection_AsciiString              anAsciiList;
 +  Handle(TColStd_HSequenceOfTransient) aSeq =
 +    getObjectsShapesOn(theShape, aSortedIDs, anAsciiList);
 +
 +  if (aSeq.IsNull() || aSeq->IsEmpty()) {
 +    SetErrorCode("Empty sequence of edges");
 +    return NULL;
 +  }
 +
 +  // Make a Python command
 +  Handle(GEOM_Object)   anObj     =
 +    Handle(GEOM_Object)::DownCast(aSeq->Value(1));
 +  Handle(GEOM_Function) aFunction = anObj->GetLastFunction();
 +
 +  GEOM::TPythonDump(aFunction)
 +    << "[" << anAsciiList.ToCString() << "] = geompy.GetSubShapeEdgeSorted("
 +    << theShape << ", " << theStartPoint << ")";
 +
 +  SetErrorCode(OK);
 +
 +  return aSeq;
 +}
 +
  //=======================================================================
  //function : getShapesOnSurfaceIDs
    /*!
@@@ -2854,152 -3092,6 +3170,152 @@@ Handle(TColStd_HSequenceOfTransient) GE
    return aSeq;
  }
  
 +//=============================================================================
 +/*!
 + *  getSubShapeEdgeSortedIDs
 + */
 +//=============================================================================
 +Handle(TColStd_HSequenceOfInteger)
 +    GEOMImpl_IShapesOperations::getSubShapeEdgeSortedIDs
 +                               (const Handle(GEOM_Object) &theShape,
 +                                const Handle(GEOM_Object) &theStartPoint)
 +{
 +  Handle(TColStd_HSequenceOfInteger) aResult;
 +
 +  if (theShape.IsNull() || theStartPoint.IsNull()) {
 +    SetErrorCode("NULL GEOM object");
 +    return aResult;
 +  }
 +
 +  const TopoDS_Shape aShape      = theShape->GetValue();
 +  const TopoDS_Shape aStartPoint = theStartPoint->GetValue();
 +
 +  if (aShape.IsNull() || aStartPoint.IsNull()) {
 +    SetErrorCode("NULL Shape");
 +    return aResult;
 +  }
 +
 +  if (aStartPoint.ShapeType() != TopAbs_VERTEX) {
 +    SetErrorCode("Starting point is not a vertex");
 +    return aResult;
 +  }
 +
 +  TopExp_Explorer      anExp(aShape, TopAbs_EDGE);
 +  TopTools_MapOfShape  aMapFence;
 +  TopTools_ListOfShape anEdges;
 +
 +  for (; anExp.More(); anExp.Next()) {
 +    const TopoDS_Shape &anEdge = anExp.Current();
 +
 +    if (aMapFence.Add(anEdge)) {
 +      anEdges.Append(anEdge);
 +    }
 +  }
 +
 +  if (anEdges.IsEmpty()) {
 +    SetErrorCode("Shape doesn't contain edges");
 +    return aResult;
 +  }
 +
 +  // Step 1: Sort edges
 +  GEOMUtils::SortShapes(anEdges, Standard_False);
 +
 +  TopTools_ListIteratorOfListOfShape anIter(anEdges);
 +  TopoDS_Vertex                      aV[2];
 +  TopTools_DataMapOfShapeListOfShape aMapVE;
 +
 +  // Step 2: Fill the map vertex - list of edges.
 +  for (; anIter.More(); anIter.Next()) {
 +    TopoDS_Edge anEdge = TopoDS::Edge(anIter.Value());
 +
 +    TopExp::Vertices(anEdge, aV[0], aV[1]);
 +
 +    const Standard_Integer aNbV = aV[0].IsSame(aV[1]) ? 1 : 2;
 +    Standard_Integer       i;
 +
 +    for (i = 0; i < aNbV; ++i) {
 +      if (aV[i].IsNull() == Standard_False) {
 +        if (!aMapVE.IsBound(aV[i])) {
 +          // There is no this vertex in the map.
 +          aMapVE.Bind(aV[i], TopTools_ListOfShape());
 +        }
 +
 +        // Add the edge to the list bound with the vertex aV[i].
 +        TopTools_ListOfShape &aLEdges = aMapVE.ChangeFind(aV[i]);
 +
 +        aLEdges.Append(anEdge);
 +      }
 +    }
 +  }
 +
 +  // Step 3: Find starting point in aMapVE.
 +  TopoDS_Vertex aStartVtx = TopoDS::Vertex(aStartPoint);
 +
 +  if (!aMapVE.IsBound(aStartVtx)) {
 +    aStartVtx = getSameVertex(aShape, aStartVtx);
 +
 +    if (aStartVtx.IsNull()) {
 +      SetErrorCode("Invalid Starting point");
 +      return aResult;
 +    }
 +  }
 +
 +  TopTools_IndexedMapOfShape anIndices;
 +  TopTools_MapOfShape        aMapVFence;
 +  TopoDS_Shape               aCurVtx  = aStartVtx;
 +  TopoDS_Edge                aCurEdge =
 +    TopoDS::Edge(aMapVE.Find(aCurVtx).First());
 +
 +  aResult = new TColStd_HSequenceOfInteger;
 +  TopExp::MapShapes(aShape, anIndices);
 +
 +  // Step 4: Fill the list of sorted edges.
 +  while (aMapVFence.Add(aCurVtx)) {
 +    // Append the ID of the current edge to the list of sorted.
 +    aResult->Append(anIndices.FindIndex(aCurEdge));
 +    TopExp::Vertices(aCurEdge, aV[0], aV[1]);
 +
 +    // Get the next vertex.
 +    if (aCurVtx.IsSame(aV[0])) {
 +      if (aCurVtx.IsSame(aV[1])) {
 +        // There is no next vertex.
 +        break;
 +      } else {
 +        aCurVtx = aV[1];
 +      }
 +    } else {
 +      aCurVtx = aV[0];
 +    }
 +
 +    if (aCurVtx.IsNull()) {
 +      // There is no next vertex.
 +      break;
 +    }
 +
 +    // Get the next edge.
 +    const TopTools_ListOfShape         &aLEdges = aMapVE.Find(aCurVtx);
 +    TopTools_ListIteratorOfListOfShape  anEIter(aLEdges);
 +
 +    for (; anEIter.More(); anEIter.Next()) {
 +      const TopoDS_Shape &aLocalEdge = anEIter.Value();
 +
 +      if (aLocalEdge.IsNull() == Standard_False) {
 +        if (!aCurEdge.IsSame(aLocalEdge)) {
 +          aCurEdge = TopoDS::Edge(aLocalEdge);
 +          break;
 +        }
 +      }
 +    }
 +
 +    if (!anEIter.More()) {
 +      // There is no next edge.
 +      break;
 +    }
 +  }
 +
 +  return aResult;
 +}
 +
  //=======================================================================
  //function : getShapesOnSurface
  /*!
@@@ -3847,208 -3939,6 +4163,6 @@@ Handle(TColStd_HSequenceOfInteger
    return aSeqOfIDs;
  }
  
- //=============================================================================
- /*!
-  *  GetInPlaceOfShape
-  */
- //=============================================================================
- static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
-                                const TopTools_IndexedMapOfShape& theWhereIndices,
-                                const TopoDS_Shape& theWhat,
-                                TColStd_ListOfInteger& theModifiedList)
- {
-   if (theWhereFunction.IsNull() || theWhat.IsNull()) return false;
-   if (theWhereIndices.Contains(theWhat)) {
-     // entity was not changed by the operation
-     Standard_Integer aWhatIndex = theWhereIndices.FindIndex(theWhat);
-     theModifiedList.Append(aWhatIndex);
-     return true;
-   }
-   // try to find in history
-   TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
-   // search in history for all argument shapes
-   Standard_Boolean isFound = Standard_False;
-   Standard_Boolean isGood = Standard_False;
-   TDF_LabelSequence aLabelSeq;
-   theWhereFunction->GetDependency(aLabelSeq);
-   Standard_Integer nbArg = aLabelSeq.Length();
-   for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) {
-     TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
-     Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
-     TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
-     TopTools_IndexedMapOfShape anArgumentIndices;
-     TopExp::MapShapes(anArgumentShape, anArgumentIndices);
-     if (anArgumentIndices.Contains(theWhat)) {
-       isFound = Standard_True;
-       Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(theWhat);
-       // Find corresponding label in history
-       TDF_Label anArgumentHistoryLabel =
-         theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False);
-       if (anArgumentHistoryLabel.IsNull()) {
-         // Lost History of operation argument. Possibly, all its entities was removed.
-         isGood = Standard_True;
-       }
-       else {
-         TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False);
-         if (aWhatHistoryLabel.IsNull()) {
-           // Removed entity ? Compound ? Compsolid ? Shell ? Wire
-           isGood = Standard_False;
-         } else {
-           Handle(TDataStd_IntegerArray) anIntegerArray;
-           if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
-             //Error: Empty modifications history for the sought shape.
-             isGood = Standard_False;
-           }
-           else {
-             isGood = Standard_True;
-             Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length();
-             for (imod = 1; imod <= aModifLen; imod++) {
-               theModifiedList.Append(anIntegerArray->Array()->Value(imod));
-             }
-           }
-         }
-       }
-     }
-   }
-   isFound = isGood;
-   if (!isFound) {
-     // try compound/compsolid/shell/wire element by element
-     bool isFoundAny = false;
-     TopTools_MapOfShape mapShape;
-     if (theWhat.ShapeType() == TopAbs_COMPOUND ||
-         theWhat.ShapeType() == TopAbs_COMPSOLID) {
-       // recursive processing of compound/compsolid
-       TopoDS_Iterator anIt (theWhat, Standard_True, Standard_True);
-       for (; anIt.More(); anIt.Next()) {
-         if (mapShape.Add(anIt.Value())) {
-           TopoDS_Shape curWhat = anIt.Value();
-           isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-           if (isFoundAny) isFound = Standard_True;
-         }
-       }
-     }
-     else if (theWhat.ShapeType() == TopAbs_SHELL) {
-       // try to replace a shell by its faces images
-       TopExp_Explorer anExp (theWhat, TopAbs_FACE);
-       for (; anExp.More(); anExp.Next()) {
-         if (mapShape.Add(anExp.Current())) {
-           TopoDS_Shape curWhat = anExp.Current();
-           isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-           if (isFoundAny) isFound = Standard_True;
-         }
-       }
-     }
-     else if (theWhat.ShapeType() == TopAbs_WIRE) {
-       // try to replace a wire by its edges images
-       TopExp_Explorer anExp (theWhat, TopAbs_EDGE);
-       for (; anExp.More(); anExp.Next()) {
-         if (mapShape.Add(anExp.Current())) {
-           TopoDS_Shape curWhat = anExp.Current();
-           isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-           if (isFoundAny) isFound = Standard_True;
-         }
-       }
-     }
-     else {
-       // Removed entity
-     }
-   }
-   return isFound;
- }
- //=============================================================================
- /*!
-  *  GetShapeProperties
-  */
- //=============================================================================
- void GEOMImpl_IShapesOperations::GetShapeProperties( const TopoDS_Shape aShape, Standard_Real tab[],
-                                                      gp_Pnt & aVertex )
- {
-   GProp_GProps theProps;
-   gp_Pnt aCenterMass;
-   //TopoDS_Shape aPntShape;
-   Standard_Real aShapeSize;
-   if    (aShape.ShapeType() == TopAbs_VERTEX) aCenterMass = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
-   else if (aShape.ShapeType() == TopAbs_EDGE) BRepGProp::LinearProperties(aShape,  theProps);
-   else if (aShape.ShapeType() == TopAbs_FACE) BRepGProp::SurfaceProperties(aShape, theProps);
-   else                                        BRepGProp::VolumeProperties(aShape,  theProps);
-   if (aShape.ShapeType() == TopAbs_VERTEX)
-     aShapeSize = 1;
-   else {
-     aCenterMass = theProps.CentreOfMass();
-     aShapeSize  = theProps.Mass();
-   }
- //   aPntShape = BRepBuilderAPI_MakeVertex(aCenterMass).Shape();
- //   aVertex   = BRep_Tool::Pnt( TopoDS::Vertex( aPntShape ) );
-   aVertex = aCenterMass;
-   tab[0] = aVertex.X();
-   tab[1] = aVertex.Y();
-   tab[2] = aVertex.Z();
-   tab[3] = aShapeSize;
-   return;
- }
- namespace {
-   //================================================================================
-   /*!
-    * \brief Return normal to face at extrema point
-    */
-   //================================================================================
-   gp_Vec GetNormal (const TopoDS_Face& face, const BRepExtrema_DistShapeShape& extrema)
-   {
-     gp_Vec defaultNorm(1,0,0); // to have same normals on different faces
-     try {
-       // get UV at extrema point
-       Standard_Real u,v, f,l;
-       switch ( extrema.SupportTypeShape2(1) ) {
-       case BRepExtrema_IsInFace: {
-         extrema.ParOnFaceS2(1, u, v );
-         break;
-       }
-       case BRepExtrema_IsOnEdge: {
-         TopoDS_Edge edge = TopoDS::Edge( extrema.SupportOnShape2(1));
-         Handle(Geom2d_Curve) pcurve = BRep_Tool::CurveOnSurface( edge, face, f,l );
-         extrema.ParOnEdgeS2( 1, u );
-         gp_Pnt2d uv = pcurve->Value( u );
-         u = uv.Coord(1);
-         v = uv.Coord(2);
-         break;
-       }
-       case BRepExtrema_IsVertex: return defaultNorm;
-       }
-       // get derivatives
-       BRepAdaptor_Surface surface( face, false );
-       gp_Vec du, dv; gp_Pnt p;
-       surface.D1( u, v, p, du, dv );
-       return du ^ dv;
-     } catch (Standard_Failure ) {
-     }
-     return defaultNorm;
-   }
- }
  //=============================================================================
  /*!
   *  case GetInPlace:
@@@ -4070,47 -3960,10 +4184,10 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
      return NULL;
    }
  
-   // Compute confusion tolerance.
-   Standard_Real    aTolConf = Precision::Confusion();
-   Standard_Integer i;
-   for (i = 0; i < 2; ++i) {
-     TopExp_Explorer anExp(i == 0 ? aWhere : aWhat, TopAbs_VERTEX);
-     for (; anExp.More(); anExp.Next()) {
-       const TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
-       const Standard_Real aTolVtx = BRep_Tool::Tolerance(aVtx);
-       if (aTolVtx > aTolConf) {
-         aTolConf = aTolVtx;
-       }
-     }
-   }
-   // Compute mass tolerance.
-   Bnd_Box       aBoundingBox;
-   Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-   Standard_Real aMassTol;
-   BRepBndLib::Add(aWhere, aBoundingBox);
-   BRepBndLib::Add(aWhat,  aBoundingBox);
-   aBoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-   aMassTol = Max(aXmax - aXmin, aYmax - aYmin);
-   aMassTol = Max(aMassTol, aZmax - aZmin);
-   aMassTol *= aTolConf;
    // Searching for the sub-shapes inside the ShapeWhere shape
    GEOMAlgo_GetInPlace aGIP;
-   aGIP.SetTolerance(aTolConf);
-   aGIP.SetTolMass(aMassTol);
-   aGIP.SetTolCG(aTolConf);
-   aGIP.SetArgument(aWhat);
-   aGIP.SetShapeWhere(aWhere);
  
-   aGIP.Perform();
-   int iErr = aGIP.ErrorStatus();
-   if (iErr) {
+   if (!GEOMAlgo_GetInPlaceAPI::GetInPlace(aWhere, aWhat, aGIP)) {
      SetErrorCode("Error in GEOMAlgo_GetInPlace");
      return NULL;
    }
   *  default:
   */
  //=============================================================================
- Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
-                                                                Handle(GEOM_Object) theShapeWhat)
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlaceOld
+                             (Handle(GEOM_Object) theShapeWhere,
+                              Handle(GEOM_Object) theShapeWhat)
  {
    SetErrorCode(KO);
  
    if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return NULL;
  
-   TopoDS_Shape aWhere = theShapeWhere->GetValue();
-   TopoDS_Shape aWhat  = theShapeWhat->GetValue();
-   TopoDS_Shape aPntShape;
-   TopoDS_Vertex aVertex;
+   TopoDS_Shape           aWhere = theShapeWhere->GetValue();
+   TopoDS_Shape           aWhat  = theShapeWhat->GetValue();
+   TopTools_ListOfShape   aModifiedList;
+   const Standard_Integer iErr   =
+     GEOMAlgo_GetInPlaceAPI::GetInPlaceOld(aWhere, aWhat, aModifiedList);
  
-   if (aWhere.IsNull() || aWhat.IsNull()) {
-     SetErrorCode("Error: aWhere and aWhat TopoDS_Shape are Null.");
-     return NULL;
-   }
+   if (iErr) {
+     switch (iErr) {
+       case 1:
+         SetErrorCode("Error: aWhere and aWhat TopoDS_Shape are Null.");
+         break;
+       case 2:
+         SetErrorCode
+           ("Error: An attempt to extract a shape of not supported type.");
+         break;
+       case 3:
+         SetErrorCode(NOT_FOUND_ANY);
+         break;
+       default:
+         SetErrorCode("Shape driver failed");
+         break;
+     }
  
-   Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction();
-   if (aWhereFunction.IsNull()) {
-     SetErrorCode("Error: aWhereFunction is Null.");
      return NULL;
    }
  
    TopTools_IndexedMapOfShape aWhereIndices;
    TopExp::MapShapes(aWhere, aWhereIndices);
  
-   TColStd_ListOfInteger aModifiedList;
-   Standard_Integer aWhereIndex;
-   Handle(TColStd_HArray1OfInteger) aModifiedArray;
-   Handle(GEOM_Object) aResult;
+   Handle(TColStd_HArray1OfInteger)   aModifiedArray =
+     new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
+   TopTools_ListIteratorOfListOfShape anIterModif (aModifiedList);
+   Standard_Integer                   imod;
  
-   bool isFound = false;
-   TopAbs_ShapeEnum iType = TopAbs_SOLID;
-   //Standard_Real    aWhat_Mass = 0., aWhere_Mass = 0.;
-   Standard_Real    tab_aWhat[4],    tab_aWhere[4];
-   Standard_Real    dl_l = 1e-3;
-   Standard_Real    min_l, Tol_0D, Tol_1D, Tol_2D, Tol_3D, Tol_Mass;
-   Standard_Real    aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-   Bnd_Box          BoundingBox;
-   gp_Pnt           aPnt, aPnt_aWhat, tab_Pnt[2];
-   GProp_GProps     aProps;
-   // Find the iType of the aWhat shape
-   /*
-   if      ( aWhat.ShapeType() == TopAbs_VERTEX )                                         iType = TopAbs_VERTEX;
-   else if ( aWhat.ShapeType() == TopAbs_EDGE  || aWhat.ShapeType() == TopAbs_WIRE )      iType = TopAbs_EDGE;
-   else if ( aWhat.ShapeType() == TopAbs_FACE  || aWhat.ShapeType() == TopAbs_SHELL )     iType = TopAbs_FACE;
-   else if ( aWhat.ShapeType() == TopAbs_SOLID || aWhat.ShapeType() == TopAbs_COMPSOLID ) iType = TopAbs_SOLID;
-   else if ( aWhat.ShapeType() == TopAbs_COMPOUND ) {
-     // Only the iType of the first shape in the compound is taken into account
-     TopoDS_Iterator It (aWhat, Standard_False, Standard_False);
-     if ( !It.More() ) {
-       SetErrorCode("Error: theShapeWhat is an empty COMPOUND.");
-       return NULL;
-     }
-     TopAbs_ShapeEnum compType = It.Value().ShapeType();
-     if      ( compType == TopAbs_VERTEX )                               iType = TopAbs_VERTEX;
-     else if ( compType == TopAbs_EDGE  || compType == TopAbs_WIRE )     iType = TopAbs_EDGE;
-     else if ( compType == TopAbs_FACE  || compType == TopAbs_SHELL)     iType = TopAbs_FACE;
-     else if ( compType == TopAbs_SOLID || compType == TopAbs_COMPSOLID) iType = TopAbs_SOLID;
-   }
-   else {
-     SetErrorCode("Error: An attempt to extract a shape of not supported type.");
-     return NULL;
-   }
-   */
-   iType = GEOMUtils::GetTypeOfSimplePart(aWhat);
-   if (iType == TopAbs_SHAPE) {
-     SetErrorCode("Error: An attempt to extract a shape of not supported type.");
-     return NULL;
-   }
+   for (imod = 1; anIterModif.More(); anIterModif.Next(), imod++) {
+     const Standard_Integer anIndex =
+       aWhereIndices.FindIndex(anIterModif.Value());
  
-   TopExp_Explorer Exp_aWhat  ( aWhat,  iType );
-   TopExp_Explorer Exp_aWhere ( aWhere, iType );
-   TopExp_Explorer Exp_Edge   ( aWhere, TopAbs_EDGE );
-   // Find the shortest edge in theShapeWhere shape
-   BRepBndLib::Add(aWhere, BoundingBox);
-   BoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-   min_l = fabs(aXmax - aXmin);
-   if( min_l < fabs(aYmax - aYmin) ) min_l = fabs(aYmax - aYmin);
-   if( min_l < fabs(aZmax - aZmin) ) min_l = fabs(aZmax - aZmin);
-   min_l /= dl_l;
-   // Mantis issue 0020908 BEGIN
-   if (!Exp_Edge.More()) {
-     min_l = Precision::Confusion();
-   }
-   // Mantis issue 0020908 END
-   for ( Standard_Integer nbEdge = 0; Exp_Edge.More(); Exp_Edge.Next(), nbEdge++ ) {
-     TopExp_Explorer Exp_Vertex( Exp_Edge.Current(), TopAbs_VERTEX);
-     for ( Standard_Integer nbVertex = 0; Exp_Vertex.More(); Exp_Vertex.Next(), nbVertex++ ) {
-       aPnt = BRep_Tool::Pnt( TopoDS::Vertex( Exp_Vertex.Current() ) );
-       tab_Pnt[nbVertex] = aPnt;
-     }
-     if ( ! tab_Pnt[0].IsEqual(tab_Pnt[1], dl_l) ) {
-       BRepGProp::LinearProperties(Exp_Edge.Current(), aProps);
-       if ( aProps.Mass() < min_l ) min_l = aProps.Mass();
-     }
+     aModifiedArray->SetValue(imod, anIndex);
    }
  
-   // Compute tolerances
-   Tol_0D = dl_l;
-   Tol_1D = dl_l * min_l;
-   Tol_2D = dl_l * ( min_l * min_l) * ( 2. + dl_l);
-   Tol_3D = dl_l * ( min_l * min_l * min_l ) * ( 3. + (3 * dl_l) + (dl_l * dl_l) );
-   if (Tol_0D < Precision::Confusion()) Tol_0D = Precision::Confusion();
-   if (Tol_1D < Precision::Confusion()) Tol_1D = Precision::Confusion();
-   if (Tol_2D < Precision::Confusion()) Tol_2D = Precision::Confusion();
-   if (Tol_3D < Precision::Confusion()) Tol_3D = Precision::Confusion();
-   //if (Tol_1D > 1.0) Tol_1D = 1.0;
-   //if (Tol_2D > 1.0) Tol_2D = 1.0;
-   //if (Tol_3D > 1.0) Tol_3D = 1.0;
-   Tol_Mass = Tol_3D;
-   if ( iType == TopAbs_VERTEX )    Tol_Mass = Tol_0D;
-   else if ( iType == TopAbs_EDGE ) Tol_Mass = Tol_1D;
-   else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D;
-   // Compute the ShapeWhat Mass
-   /*
-   for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) {
-     if ( iType == TopAbs_VERTEX ) {
-       aWhat_Mass += 1;
-       continue;
-     }
-     else if ( iType == TopAbs_EDGE ) BRepGProp::LinearProperties(Exp_aWhat.Current(),  aProps);
-     else if ( iType == TopAbs_FACE ) BRepGProp::SurfaceProperties(Exp_aWhat.Current(), aProps);
-     else                             BRepGProp::VolumeProperties(Exp_aWhat.Current(),  aProps);
-     aWhat_Mass += aProps.Mass();
-   }
-   */
-   // Searching for the sub-shapes inside the ShapeWhere shape
-   TopTools_MapOfShape map_aWhere;
-   for ( Exp_aWhere.ReInit(); Exp_aWhere.More(); Exp_aWhere.Next() ) {
-     if (!map_aWhere.Add(Exp_aWhere.Current()))
-       continue; // skip repeated shape to avoid mass addition
-     GetShapeProperties( Exp_aWhere.Current(), tab_aWhere, aPnt );
-     for ( Exp_aWhat.ReInit(); Exp_aWhat.More(); Exp_aWhat.Next() ) {
-       GetShapeProperties( Exp_aWhat.Current(), tab_aWhat, aPnt_aWhat );
-       if ( fabs(tab_aWhat[3] - tab_aWhere[3]) <= Tol_Mass && aPnt_aWhat.Distance(aPnt) <= Tol_1D )
-         isFound = true;
-       else {
-         if ( (tab_aWhat[3] - tab_aWhere[3]) > Tol_Mass ) {
-           aPntShape = BRepBuilderAPI_MakeVertex( aPnt ).Shape();
-           aVertex   = TopoDS::Vertex( aPntShape );
-           BRepExtrema_DistShapeShape aWhereDistance ( aVertex, Exp_aWhere.Current() );
-           BRepExtrema_DistShapeShape aWhatDistance  ( aVertex, Exp_aWhat.Current() );
-           if ( aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
-                fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= Tol_1D )
-           {
-             // 0020162: "EDF 961 GEOM : Getinplace is getting additionnal orthogonal faces"
-             // aVertex must be projected to the same point on Where and on What
-             gp_Pnt pOnWhat  = aWhatDistance.PointOnShape2(1);
-             gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
-             isFound = ( pOnWhat.Distance(pOnWhere) <= Tol_1D );
-             if ( isFound && iType == TopAbs_FACE )
-             {
-               // check normals at pOnWhat and pOnWhere
-               const double angleTol = M_PI/180.;
-               gp_Vec normToWhat  = GetNormal( TopoDS::Face(Exp_aWhat.Current()), aWhatDistance);
-               gp_Vec normToWhere = GetNormal( TopoDS::Face(Exp_aWhere.Current()), aWhereDistance);
-               if ( normToWhat * normToWhere < 0 )
-                 normToWhat.Reverse();
-               isFound = ( normToWhat.Angle( normToWhere ) < angleTol );
-             }
-           }
-         }
-       }
-       if ( isFound ) {
-         aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current());
-         aModifiedList.Append(aWhereIndex);
-         //aWhere_Mass += tab_aWhere[3];
-         isFound = false;
-         break;
-       }
-     }
-     //if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass )
-       //break;
-   }
-   if (aModifiedList.Extent() == 0) { // Not found any Results
-     SetErrorCode(NOT_FOUND_ANY);
-     return NULL;
-   }
-   aModifiedArray = new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
-   TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
-   for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++)
-     aModifiedArray->SetValue(imod, anIterModif.Value());
    //Add a new object
-   aResult = GetEngine()->AddSubShape(theShapeWhere, aModifiedArray);
+   Handle(GEOM_Object) aResult =
+     GetEngine()->AddSubShape(theShapeWhere, aModifiedArray);
    if (aResult.IsNull()) {
      SetErrorCode("Error in algorithm: result found, but cannot be returned.");
      return NULL;
      << theShapeWhere << ", " << theShapeWhat << ", False)";
  
    SetErrorCode(OK);
    return aResult;
  }
  
@@@ -4431,11 -4143,13 +4367,13 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
  
    //Fill array of indices
    TopTools_IndexedMapOfShape aWhereIndices;
    TopExp::MapShapes(aWhere, aWhereIndices);
  
    // process shape
-   TColStd_ListOfInteger aModifiedList;
-   bool isFound = GetInPlaceOfShape(aWhereFunction, aWhereIndices, aWhat, aModifiedList);
+   TopTools_ListOfShape aModifiedList;
+   bool isFound = GEOMAlgo_GetInPlaceAPI::GetInPlaceByHistory
+     (aWhereFunction, aWhereIndices, aWhat, aModifiedList);
  
    if (!isFound || aModifiedList.Extent() < 1) {
      SetErrorCode("Error: No history found for the sought shape or its sub-shapes.");
    }
  
    Standard_Integer nbFound = aModifiedList.Extent();
-   TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
+   TopTools_ListIteratorOfListOfShape anIterModif (aModifiedList);
    if ( nbFound > 1 )
    {
      // remove sub-shapes inappropriate for group creation
      TopAbs_ShapeEnum subType = TopAbs_SHAPE;
      while ( anIterModif.More() ) {
-       TopAbs_ShapeEnum type = aWhereIndices( anIterModif.Value() ).ShapeType();
+       TopAbs_ShapeEnum type = anIterModif.Value().ShapeType();
        bool okForGroup = ( type == TopAbs_VERTEX || type == TopAbs_EDGE ||
                            type == TopAbs_FACE   || type == TopAbs_SOLID );
        if ( okForGroup ) {
      new TColStd_HArray1OfInteger( 1, nbFound );
    anIterModif.Initialize(aModifiedList);
    for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++)
-     aModifiedArray->SetValue(imod, anIterModif.Value());
+     aModifiedArray->SetValue
+         (imod, aWhereIndices.FindIndex(anIterModif.Value()));
  
    //Add a new object
    Handle(GEOM_Object) aResult = GetEngine()->AddSubShape(theShapeWhere, aModifiedArray);
    return aResult;
  }
  
 -#define MAX_TOLERANCE 1.e-7
 -
  //=======================================================================
  //function : isSameEdge
  //purpose  : Returns True if two edges coincide
@@@ -4756,8 -4473,17 +4695,8 @@@ Handle(GEOM_Object) GEOMImpl_IShapesOpe
  
    switch (aWhat.ShapeType()) {
      case TopAbs_VERTEX: {
 -      gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aWhat));
 -      TopExp_Explorer E(aWhere, TopAbs_VERTEX);
 -      for(; E.More(); E.Next()) {
 -        if(!aMap.Add(E.Current())) continue;
 -        gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
 -        if(P.Distance(P2) <= MAX_TOLERANCE) {
 -          isFound = true;
 -          aSubShape = E.Current();
 -          break;
 -        }
 -      }
 +      aSubShape = getSameVertex(aWhere, TopoDS::Vertex(aWhat));
 +      isFound   = !aSubShape.IsNull();
        break;
                          }
      case TopAbs_EDGE: {
@@@ -4931,3 -4657,199 +4870,199 @@@ Handle(TColStd_HSequenceOfInteger) GEOM
      return NULL;
    }
  }
+ //=======================================================================
+ //function : ExtendEdge
+ //purpose  :
+ //=======================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendEdge
+                                       (const Handle(GEOM_Object) &theEdge,
+                                        const Standard_Real        theMin,
+                                        const Standard_Real        theMax)
+ {
+   SetErrorCode(KO);
+   if (theEdge.IsNull()) {
+     return NULL;
+   }
+   //Add a new Edge object
+   Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+   //Add a new Vector function
+   Handle(GEOM_Function) aFunction =
+     aResEdge->AddFunction(GEOMImpl_ShapeDriver::GetID(), EDGE_UV);
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) {
+     return NULL;
+   }
+   GEOMImpl_IShapeExtend aCI (aFunction);
+   Handle(GEOM_Function) anEdge = theEdge->GetLastFunction();
+   if (anEdge.IsNull()) {
+     return NULL;
+   }
+   aCI.SetShape(anEdge);
+   aCI.SetUMin(theMin);
+   aCI.SetUMax(theMax);
+   //Compute the Edge value
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump(aFunction)
+              << aResEdge  << " = geompy.ExtendEdge("
+              << theEdge << ", " << theMin << ", " << theMax << ")";
+   SetErrorCode(OK);
+   return aResEdge;
+ }
+ //=======================================================================
+ //function : ExtendFace
+ //purpose  :
+ //=======================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace
+                                       (const Handle(GEOM_Object) &theFace,
+                                        const Standard_Real        theUMin,
+                                        const Standard_Real        theUMax,
+                                        const Standard_Real        theVMin,
+                                        const Standard_Real        theVMax)
+ {
+   SetErrorCode(KO);
+   if (theFace.IsNull()) {
+     return NULL;
+   }
+   //Add a new Face object
+   Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+   //Add a new Vector function
+   Handle(GEOM_Function) aFunction =
+     aResFace->AddFunction(GEOMImpl_ShapeDriver::GetID(), FACE_UV);
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) {
+     return NULL;
+   }
+   GEOMImpl_IShapeExtend aCI (aFunction);
+   Handle(GEOM_Function) aFace = theFace->GetLastFunction();
+   if (aFace.IsNull()) {
+     return NULL;
+   }
+   aCI.SetShape(aFace);
+   aCI.SetUMin(theUMin);
+   aCI.SetUMax(theUMax);
+   aCI.SetVMin(theVMin);
+   aCI.SetVMax(theVMax);
+   //Compute the Face value
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump(aFunction)
+              << aResFace  << " = geompy.ExtendFace("
+              << theFace << ", " << theUMin << ", " << theUMax << ", "
+              << theVMin << ", " << theVMax << ")";
+   SetErrorCode(OK);
+   return aResFace;
+ }
+ //=======================================================================
+ //function : MakeSurfaceFromFace
+ //purpose  :
+ //=======================================================================
+ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace
+                                       (const Handle(GEOM_Object) &theFace)
+ {
+   SetErrorCode(KO);
+   if (theFace.IsNull()) {
+     return NULL;
+   }
+   //Add a new Face object
+   Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+   //Add a new Vector function
+   Handle(GEOM_Function) aFunction =
+     aResFace->AddFunction(GEOMImpl_ShapeDriver::GetID(), SURFACE_FROM_FACE);
+   //Check if the function is set correctly
+   if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) {
+     return NULL;
+   }
+   GEOMImpl_IShapeExtend aCI (aFunction);
+   Handle(GEOM_Function) aFace = theFace->GetLastFunction();
+   if (aFace.IsNull()) {
+     return NULL;
+   }
+   aCI.SetShape(aFace);
+   //Compute the Face value
+   try {
+     OCC_CATCH_SIGNALS;
+     if (!GetSolver()->ComputeFunction(aFunction)) {
+       SetErrorCode("Shape driver failed");
+       return NULL;
+     }
+   }
+   catch (Standard_Failure) {
+     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+     SetErrorCode(aFail->GetMessageString());
+     return NULL;
+   }
+   //Make a Python command
+   GEOM::TPythonDump(aFunction)
+              << aResFace  << " = geompy.MakeSurfaceFromFace("
+              << theFace << ")";
+   SetErrorCode(OK);
+   return aResFace;
+ }
index 59af88e00f70dae336ea2834ef39c0e95c4d799f,002f338e611bd1b2d54a1d88b7fff0279f97088e..0b767615fbbdc26fd513cb426fe760cf90fe91a3
  
  #include "GEOMAlgo_State.hxx"
  
- #include <TopoDS_Shape.hxx>
- #include <TopTools_ListOfShape.hxx>
- #include <NCollection_DataMap.hxx>
  #include <TColStd_HSequenceOfTransient.hxx>
  #include <TColStd_HSequenceOfInteger.hxx>
  
- #include <Handle_Geom_Surface.hxx>
- #include <gp_Pnt.hxx>
+ #include <Geom_Surface.hxx>
  
  #include <list>
- #include <functional>
  
  class GEOM_Engine;
  class Handle(GEOM_Object);
  class Handle(TColStd_HArray1OfInteger);
+ class TopoDS_Shape;
  
  class GEOMImpl_IShapesOperations : public GEOM_IOperations
  {
    Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
                                                       const bool isPlanarWanted);
  
+   Standard_EXPORT Handle(GEOM_Object) MakeFaceFromSurface
+                                               (Handle(GEOM_Object) theFace,
+                                                Handle(GEOM_Object) theWire);
+                                                
+   Standard_EXPORT Handle(GEOM_Object) MakeFaceWithConstraints (std::list<Handle(GEOM_Object)> theConstraints);
    Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
  
    Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
  
    Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
  
-   Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (Handle(GEOM_Object) theShape,
+   Standard_EXPORT Handle(GEOM_Object) MakeSolidFromConnectedFaces (std::list<Handle(GEOM_Object)> theFacesOrShells,
+                                                                    const Standard_Boolean isIntersect);
+   Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
                                                       const Standard_Real theTolerance,
                                                       const Standard_Boolean doKeepNonSolids);
  
-   //Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueFaces (Handle(GEOM_Object) theShape,
-   //                                                                   const Standard_Real theTolerance);
-   Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (Handle(GEOM_Object) theShape,
+   Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
                                                             const Standard_Real theTolerance,
-                                                            std::list<Handle(GEOM_Object)> theFaces,
+                                                            std::list<Handle(GEOM_Object)>& theFaces,
                                                             const Standard_Boolean doKeepNonSolids,
                                                             const Standard_Boolean doGlueAllEdges);
  
-   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (Handle(GEOM_Object) theShape,
+   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
                                                       const Standard_Real theTolerance);
  
-   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (Handle(GEOM_Object) theShape,
+   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
                                                                        const Standard_Real theTolerance,
                                                                        const TopAbs_ShapeEnum theType);
  
-   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (Handle(GEOM_Object) theShape,
+   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
                                                             const Standard_Real theTolerance,
-                                                            std::list<Handle(GEOM_Object)> theEdges);
+                                                            std::list<Handle(GEOM_Object)> theEdges);
  
    Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
-                                                                            const Standard_Boolean theGroupsOnly);
+                                                                              const Standard_Boolean theGroupsOnly);
    Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
-                                                                            const Standard_Integer theTypes = All);
+                                                                              const Standard_Integer theTypes = All);
    
    enum ExplodeType {
      EXPLODE_OLD_INCLUDE_MAIN,
  
    Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
  
+   Standard_EXPORT Standard_Boolean IsSubShapeBelongsTo(Handle(GEOM_Object) theSubObject,
+                                                        const Standard_Integer theSubObjectIndex,
+                                                        Handle(GEOM_Object) theObject,
+                                                        const Standard_Integer theObjectIndex);
    Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object)    theShape,
                                                        const Standard_Integer theShapeType);
  
                       const Standard_Integer theShapeType);
  
    Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-     GetSharedShapes (std::list<Handle(GEOM_Object)> theShapes,
-                      const Standard_Integer         theShapeType);
+     GetSharedShapes (std::list<Handle(GEOM_Object)>& theShapes,
+                      const Standard_Integer          theShapeType,
+                      const bool                      theMultiShare = true);
  
    Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
      GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
                                                              Handle(GEOM_Object)    theCenter,
                                                              const Standard_Real    theRadius);
  
-   void GetShapeProperties(const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt & aPnt);
    Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
                                                    Handle(GEOM_Object) theShapeWhat);
  
                                         const Standard_Integer theShapeType,
                                         GEOMAlgo_State theState);
  
 -                            ExtendEdge(const Handle(GEOM_Object) &theEdge,
++  /*!
++   * \brief Resize the input edge with the new Min and Max parameters.
++   * The input edge parameters range is [0, 1]. If theMin parameter is
++   * negative, the input edge is extended, otherwise it is shrinked by
++   * theMin parameter. If theMax is greater than 1, the edge is extended,
++   * otherwise it is shrinked by theMax parameter
++   * \param theEdge the input edge to be resized
++   * \param theMin the minimal parameter value
++   * \param theMax the maximal parameter value
++   * \retval Handle(GEOM_Object) - newly created edge
++   */
+   Standard_EXPORT Handle(GEOM_Object)
 -                            ExtendFace(const Handle(GEOM_Object) &theFace,
++                            ExtendEdge(const Handle(GEOM_Object)& theEdge,
+                                        const Standard_Real        theMin,
+                                        const Standard_Real        theMax);
++  /*!
++   * \brief Resize the input face with the new UMin, UMax, VMin and VMax
++   * parameters. The input face U and V parameters range is [0, 1]. If
++   * theUMin parameter is negative, the input face is extended, otherwise
++   * it is shrinked along U direction by theUMin parameter. If theUMax is
++   * greater than 1, the face is extended, otherwise it is shrinked along
++   * U direction by theUMax parameter. So as for theVMin, theVMax and
++   * V direction of the input face.
++   * \param theFace the input face to be resized
++   * \param theUMin the minimal U parameter value
++   * \param theUMax the maximal U parameter value
++   * \param theVMin the minimal V parameter value
++   * \param theVMax the maximal V parameter value
++   * \retval Handle(GEOM_Object) - newly created face
++   */
+   Standard_EXPORT Handle(GEOM_Object)
 -
++                            ExtendFace(const Handle(GEOM_Object)& theFace,
+                                        const Standard_Real        theUMin,
+                                        const Standard_Real        theUMax,
+                                        const Standard_Real        theVMin,
+                                        const Standard_Real        theVMax);
++  
++  /*!
++   * \brief Make a surface from a face. This function takes some face as
++   * input parameter and creates new GEOM_Object, i.e. topological shape
++   * by extracting underlying surface of the source face and limiting it
++   * by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
++   * parametrical space).
++   * \param theFace the input face
++   * \retval Handle(GEOM_Object) - newly created face
++   */
+   Standard_EXPORT Handle(GEOM_Object)
+                    MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace);
 +  /*!
 +   * \brief Explode a shape into edges sorted in a row from a starting point.
 +   * \param theShape - the shape to be exploded on edges.
 +   * \param theStartPoint - the starting point.
 +   * \return Ordered list of edges sorted in a row from a starting point.
 +   */
 +  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
 +    GetSubShapeEdgeSorted (const Handle(GEOM_Object) &theShape,
 +                           const Handle(GEOM_Object) &theStartPoint);
 +
   private:
    Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)>      theShapes,
                                   const Standard_Integer         theObjectType,
                         const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
                         TCollection_AsciiString &                 theShapeEntries);
  
 +  /*!
 +   * \brief Explode a shape into edges sorted in a row from a starting point.
 +   * \param theShape - the shape to be exploded on edges.
 +   * \param theStartPoint - the starting point.
 +   * \return Ordered list of edges sorted in a row from a starting point.
 +   */
 +  Handle(TColStd_HSequenceOfInteger) getSubShapeEdgeSortedIDs
 +                                (const Handle(GEOM_Object) &theShape,
 +                                 const Handle(GEOM_Object) &theStartPoint);
 +
    /*!
     * \brief Select the object created last
     * \param theObj1 - Object 1
index 055276d899ed323b6379bfa9942166ef19a06835,5b5cc2574a167a061354e90e033e212f285b127f..75fa4b94b3784e8d888f739f2a41bfdb7872fe06
@@@ -26,6 -26,7 +26,6 @@@
  
  #include <Basics_OCCTVersion.hxx>
  
 -#include <utilities.h>
  #include <OpUtil.hxx>
  #include <Utils_ExceptHandlers.hxx>
  
  #include <BRepClass3d_SolidClassifier.hxx>
  
  #include <BRepBuilderAPI_MakeFace.hxx>
 +#include <BRepBuilderAPI_Sewing.hxx>
 +
 +#include <BRepCheck_Analyzer.hxx>
  
  #include <Bnd_Box.hxx>
  
 +#include <BOPTools_AlgoTools.hxx>
 +
  #include <TopAbs.hxx>
  #include <TopExp.hxx>
  #include <TopoDS.hxx>
  
  #include <ShapeAnalysis.hxx>
  #include <ShapeFix_Shape.hxx>
 +#include <ShapeFix_ShapeTolerance.hxx>
  
  #include <ProjLib.hxx>
  #include <ElSLib.hxx>
  
  #include <vector>
  #include <sstream>
 +#include <algorithm>
  
  #include <Standard_Failure.hxx>
  #include <Standard_NullObject.hxx>
  
  #define STD_SORT_ALGO 1
  
 +// When the following macro is defined, ShapeFix_ShapeTolerance function is used to set max tolerance of curve
 +// in GEOMUtils::FixShapeCurves function; otherwise less restrictive BRep_Builder::UpdateEdge/UpdateVertex
 +// approach is used
 +// VSR (29/12/2014): macro disabled
 +//#define USE_LIMIT_TOLERANCE
 +
  namespace
  {
    /**
                                 TopoDS_Shape  &theModifiedShape,
                                 Standard_Real &theAddDist)
    {
 -    Standard_Boolean isModified = Standard_False;
      TopExp_Explorer anExp;
      int nbf = 0;
  
          const Standard_Boolean isShell =
            (sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
  
 -        if( isShell || S->IsUPeriodic() ) {
 -          // non solid case or any periodic surface (Mantis 22454).
 -          double U1,U2,V1,V2;
 -          // changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
 -          //S->Bounds(U1,U2,V1,V2); changed by
 -          ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
 -          // end of changes for 020677 (dmv)
 -          Handle(Geom_RectangularTrimmedSurface) TrS1 =
 -            new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
 -          Handle(Geom_RectangularTrimmedSurface) TrS2 =
 -            new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
 +        if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
 +          Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
 +          gp_Pnt PC = SS->Location();
            BRep_Builder B;
 -          TopoDS_Face F1,F2;
 -          TopoDS_Shape aMShape;
 -
 -          if (isShell) {
 -            B.MakeCompound(TopoDS::Compound(aMShape));
 -          } else {
 -            B.MakeShell(TopoDS::Shell(aMShape));
 -          }
 -
 -          B.MakeFace(F1,TrS1,1.e-7);
 -          B.Add(aMShape,F1);
 -          B.MakeFace(F2,TrS2,1.e-7);
 -          B.Add(aMShape,F2);
 -          Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
 -
 -          if (!isShell) {
 -            // The original shape is a solid.
 -            TopoDS_Solid aSolid;
 -
 -            B.MakeSolid(aSolid);
 -            B.Add(aSolid, aMShape);
 -            aMShape = aSolid;
 -          }
 -
 -          sfs->Init(aMShape);
 -          sfs->SetPrecision(1.e-6);
 -          sfs->SetMaxTolerance(1.0);
 -          sfs->Perform();
 -          theModifiedShape = sfs->Shape();
 -          isModified = Standard_True;
 +          TopoDS_Vertex V;
 +          B.MakeVertex(V,PC,1.e-7);
 +          theModifiedShape = V;
 +          theAddDist = SS->Radius();
 +          return Standard_True;
          }
 -        else {
 -          if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
 -            Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
 -            gp_Pnt PC = SS->Location();
 -            BRep_Builder B;
 -            TopoDS_Vertex V;
 -            B.MakeVertex(V,PC,1.e-7);
 -            theModifiedShape = V;
 -            theAddDist = SS->Radius();
 -            isModified = Standard_True;
 -          }
 -          else {
 -            Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
 -            gp_Ax3 ax3 = TS->Position();
 -            Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
 -            BRep_Builder B;
 -            TopoDS_Edge E;
 -            B.MakeEdge(E,C,1.e-7);
 -            theModifiedShape = E;
 -            theAddDist = TS->MinorRadius();
 -            isModified = Standard_True;
 -          }
 +        if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) {
 +          Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
 +          gp_Ax3 ax3 = TS->Position();
 +          Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
 +          BRep_Builder B;
 +          TopoDS_Edge E;
 +          B.MakeEdge(E,C,1.e-7);
 +          theModifiedShape = E;
 +          theAddDist = TS->MinorRadius();
 +          return Standard_True;
          }
 -      } else {
 -        theModifiedShape = theShape;
 +
 +        // non solid case or any periodic surface (Mantis 22454).
 +        double U1,U2,V1,V2;
 +        // changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
 +        //S->Bounds(U1,U2,V1,V2); changed by
 +        ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
 +        // end of changes for 020677 (dmv)
 +        Handle(Geom_RectangularTrimmedSurface) TrS1 =
 +          new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
 +        Handle(Geom_RectangularTrimmedSurface) TrS2 =
 +          new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
 +        TopoDS_Shape aMShape;
 +        
 +        TopoDS_Face F1 = BRepBuilderAPI_MakeFace(TrS1, Precision::Confusion());
 +        TopoDS_Face F2 = BRepBuilderAPI_MakeFace(TrS2, Precision::Confusion());
 +        
 +        if (isShell) {
 +          BRep_Builder B;
 +          B.MakeCompound(TopoDS::Compound(aMShape));
 +          B.Add(aMShape, F1);
 +          B.Add(aMShape, F2);
 +        } else {
 +          // The original shape is a solid.
 +          BRepBuilderAPI_Sewing aSewing (Precision::Confusion()*10.0);
 +          aSewing.Add(F1);
 +          aSewing.Add(F2);
 +          aSewing.Perform();
 +          aMShape = aSewing.SewedShape();
 +          BRep_Builder B;
 +          TopoDS_Solid aSolid;
 +          B.MakeSolid(aSolid);
 +          B.Add(aSolid, aMShape);
 +          aMShape = aSolid;
 +        }
 +        
 +        Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
 +        sfs->Init(aMShape);
 +        sfs->SetPrecision(1.e-6);
 +        sfs->SetMaxTolerance(1.0);
 +        sfs->Perform();
 +        theModifiedShape = sfs->Shape();
 +        return Standard_True;
        }
      }
 -    else
 -      theModifiedShape = theShape;
 -
 -    return isModified;
 +    
 +    theModifiedShape = theShape;
 +    return Standard_False;
    }
  
-   //=======================================================================
-   //function : ShapeToDouble
-   //purpose  : used by CompareShapes::operator()
-   //=======================================================================
-   std::pair<double, double> ShapeToDouble (const TopoDS_Shape& S, bool isOldSorting)
-   {
-     // Computing of CentreOfMass
-     gp_Pnt GPoint;
-     double Len;
-     if (S.ShapeType() == TopAbs_VERTEX) {
-       GPoint = BRep_Tool::Pnt(TopoDS::Vertex(S));
-       Len = (double)S.Orientation();
-     }
-     else {
-       GProp_GProps GPr;
-       // BEGIN: fix for Mantis issue 0020842
-       if (isOldSorting) {
-         BRepGProp::LinearProperties(S, GPr);
-       }
-       else {
-         if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
-           BRepGProp::LinearProperties(S, GPr);
-         }
-         else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
-           BRepGProp::SurfaceProperties(S, GPr);
-         }
-         else {
-           BRepGProp::VolumeProperties(S, GPr);
-         }
-       }
-       // END: fix for Mantis issue 0020842
-       GPoint = GPr.CentreOfMass();
-       Len = GPr.Mass();
-     }
-     double dMidXYZ = GPoint.X() * 999.0 + GPoint.Y() * 99.0 + GPoint.Z() * 0.9;
-     return std::make_pair(dMidXYZ, Len);
-   }
    void parseWard( const GEOMUtils::LevelsList &theLevelList, std::string &treeStr )
    {
      treeStr.append( "{" );
  
  }
  
+ //=======================================================================
+ //function : ShapeToDouble
+ //purpose  : used by CompareShapes::operator()
+ //=======================================================================
+ std::pair<double, double> GEOMUtils::ShapeToDouble (const TopoDS_Shape& S, bool isOldSorting)
+ {
+   // Computing of CentreOfMass
+   gp_Pnt GPoint;
+   double Len;
+   if (S.ShapeType() == TopAbs_VERTEX) {
+     GPoint = BRep_Tool::Pnt(TopoDS::Vertex(S));
+     Len = (double)S.Orientation();
+   }
+   else {
+     GProp_GProps GPr;
+     // BEGIN: fix for Mantis issue 0020842
+     if (isOldSorting) {
+       BRepGProp::LinearProperties(S, GPr);
+     }
+     else {
+       if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
+         BRepGProp::LinearProperties(S, GPr);
+       }
+       else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
+         BRepGProp::SurfaceProperties(S, GPr);
+       }
+       else {
+         BRepGProp::VolumeProperties(S, GPr);
+       }
+     }
+     // END: fix for Mantis issue 0020842
+     GPoint = GPr.CentreOfMass();
+     Len = GPr.Mass();
+   }
+   double dMidXYZ = GPoint.X() * 999.0 + GPoint.Y() * 99.0 + GPoint.Z() * 0.9;
+   return std::make_pair(dMidXYZ, Len);
+ }
  //=======================================================================
  //function : GetPosition
  //purpose  :
@@@ -1044,19 -1039,19 +1044,19 @@@ gp_Pnt GEOMUtils::ConvertClickToPoint( 
  // function : ConvertTreeToString()
  // purpose  : Returns the string representation of dependency tree
  //=======================================================================
 -void GEOMUtils::ConvertTreeToString( const TreeModel &tree,
 -                                     std::string &treeStr )
 +void GEOMUtils::ConvertTreeToString( const TreeModeltree,
 +                                     std::string& dependencyStr )
  {
    TreeModel::const_iterator i;
    for ( i = tree.begin(); i != tree.end(); ++i ) {
 -    treeStr.append( i->first );
 -    treeStr.append( "-" );
 +    dependencyStr.append( i->first );
 +    dependencyStr.append( "-" );
      std::vector<LevelInfo> upLevelList = i->second.first;
 -    treeStr.append( "upward" );
 -    parseWard( upLevelList, treeStr );
 +    dependencyStr.append( "upward" );
 +    parseWard( upLevelList, dependencyStr );
      std::vector<LevelInfo> downLevelList = i->second.second;
 -    treeStr.append( "downward" );
 -    parseWard( downLevelList, treeStr );
 +    dependencyStr.append( "downward" );
 +    parseWard( downLevelList, dependencyStr );
    }
  }
  
  // function : ConvertStringToTree()
  // purpose  : Returns the dependency tree
  //=======================================================================
 -void GEOMUtils::ConvertStringToTree( const std::string &theData,
 -                                     TreeModel &tree )
 +void GEOMUtils::ConvertStringToTree( const std::string& dependencyStr,
 +                                     TreeModeltree )
  {
    std::size_t cursor = 0;
  
 -  while( theData.find('-',cursor) != std::string::npos ) //find next selected object
 +  while( dependencyStr.find('-',cursor) != std::string::npos ) //find next selected object
    {
 -    std::size_t objectIndex = theData.find( '-', cursor );
 -    std::string objectEntry = theData.substr( cursor, objectIndex - cursor );
 +    std::size_t objectIndex = dependencyStr.find( '-', cursor );
 +    std::string objectEntry = dependencyStr.substr( cursor, objectIndex - cursor );
      cursor = objectIndex;
  
 -    std::size_t upwardIndexBegin = theData.find("{",cursor) + 1;
 -    std::size_t upwardIndexFinish = theData.find("}",upwardIndexBegin);
 -    LevelsList upwardList = parseWard( theData, cursor );
 +    std::size_t upwardIndexBegin = dependencyStr.find("{",cursor) + 1;
 +    std::size_t upwardIndexFinish = dependencyStr.find("}",upwardIndexBegin);
 +    LevelsList upwardList = parseWard( dependencyStr, cursor );
  
 -    LevelsList downwardList = parseWard( theData, cursor );
 +    LevelsList downwardList = parseWard( dependencyStr, cursor );
  
      tree[objectEntry] = std::pair<LevelsList,LevelsList>( upwardList, downwardList );
    }
  }
 +
 +bool GEOMUtils::CheckShape( TopoDS_Shape& shape,
 +                            bool checkGeometry )
 +{
 +  BRepCheck_Analyzer analyzer( shape, checkGeometry );
 +  return analyzer.IsValid();
 +}
 +
 +bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
 +                                   TopAbs_ShapeEnum type,
 +                                   Standard_Real tolerance,
 +                                   bool checkGeometry )
 +{
 +  ShapeFix_ShapeTolerance aSft;
 +  aSft.LimitTolerance( shape, tolerance, tolerance, type );
 +  Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape( shape );
 +  aSfs->Perform();
 +  shape = aSfs->Shape();
 +  return CheckShape( shape, checkGeometry );
 +}
 +
 +bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
 +                                   Standard_Real tolerance,
 +                                   bool checkGeometry )
 +{
 +  return FixShapeTolerance( shape, TopAbs_SHAPE, tolerance, checkGeometry );
 +}
 +
 +bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
 +                                   bool checkGeometry )
 +{
 +  return FixShapeTolerance( shape, Precision::Confusion(), checkGeometry );
 +}
 +
 +bool GEOMUtils::FixShapeCurves( TopoDS_Shape& shape )
 +{
 +  Standard_Real aT, aTolE, aD, aDMax;
 +  TopExp_Explorer aExpF, aExpE;
 +  NCollection_DataMap<TopoDS_Edge, Standard_Real, TopTools_ShapeMapHasher> aDMETol;
 +  aExpF.Init(shape, TopAbs_FACE);
 +  for (; aExpF.More(); aExpF.Next()) {
 +    const TopoDS_Face& aF = *(TopoDS_Face*)&aExpF.Current();
 +    aExpE.Init(aF, TopAbs_EDGE);
 +    for (; aExpE.More(); aExpE.Next()) {
 +      const TopoDS_Edge& aE = *(TopoDS_Edge*)&aExpE.Current();
 +      try {
 +        if (!BOPTools_AlgoTools::ComputeTolerance(aF, aE, aDMax, aT)) {
 +          continue;
 +        }
 +      }
 +      catch(...) {
 +        continue;
 +      }
 +      aTolE = BRep_Tool::Tolerance(aE);
 +      if (aDMax < aTolE) continue;
 +      if (aDMETol.IsBound(aE)) {
 +        aD = aDMETol.Find(aE);
 +        if (aDMax > aD) {
 +          aDMETol.UnBind(aE);
 +          aDMETol.Bind(aE, aDMax);
 +        }
 +      }
 +      else {
 +        aDMETol.Bind(aE, aDMax);
 +      }
 +    }
 +  }
 +  NCollection_DataMap<TopoDS_Edge, Standard_Real, TopTools_ShapeMapHasher>::Iterator aDMETolIt(aDMETol);
 +#ifdef USE_LIMIT_TOLERANCE
 +  ShapeFix_ShapeTolerance sat;
 +#else
 +  BRep_Builder b;
 +#endif
 +  for (; aDMETolIt.More(); aDMETolIt.Next()) {
 +#ifdef USE_LIMIT_TOLERANCE
 +    sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value()*1.001);
 +#else
 +    TopoDS_Iterator itv(aDMETolIt.Key());
 +    for (; itv.More(); itv.Next())
 +      b.UpdateVertex(TopoDS::Vertex(itv.Value()), aDMETolIt.Value()*1.001);
 +    b.UpdateEdge(aDMETolIt.Key(), aDMETolIt.Value()*1.001);
 +#endif
 +  }
 +  return CheckShape( shape );
 +}
 +
 +bool GEOMUtils::Write( const TopoDS_Shape& shape, const char* fileName )
 +{
 +  return BRepTools::Write( shape, fileName );
 +}
index 48cef6533ce9574f6d287faf718a2e297d241b53,0fd9d22a06f7369d8f69c67f97885a32c04b8c80..dfd8e653fdb21b10e20a5c5366b34370191aebf7
@@@ -60,6 -60,28 +60,28 @@@ namespace GEOMUtil
    typedef std::vector<LevelInfo> LevelsList;
    typedef std::map<std::string,std::pair<LevelsList,LevelsList> > TreeModel;
  
+   /*!
+    * \brief Compute numerical functor for the shape.
+    *
+    * Resulting value can be used to sort out shapes according to some parameter.
+    * 
+    * Returns a pair of two values (dist, functor) where
+    * - \a dist is a some value that is computed according to the center of mass of given shape;
+    * - \a functor is a numerical functor value
+    *
+    * The numerical functor is computed according to the shape's topological properties as follows:
+    * - orientation for vertices 
+    * - length for edges and wires
+    * - area for faces and shells
+    * - volume for solids, compounds, compsolids
+    *
+    * If \a isOldSorting parameter is set to \c true, for all cases linear properties of the shape
+    * are used (to support backward compatibility in some methods). By default, this parameter is
+    * set to \c false.
+    */
+   Standard_EXPORT std::pair<double, double> ShapeToDouble (const TopoDS_Shape& theShape,
+                                                            bool isOldSorting = false);
    /*!
     * \brief Get Local Coordinate System, corresponding to the given shape.
     *
     */
    Standard_EXPORT gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) theView );
  
 -  Standard_EXPORT void ConvertTreeToString( const TreeModel &theTree,
 -                                          std::string &DependencyStr );
 +  /*!
 +   * \brief Convert dependency tree data to the string representation
 +   *
 +   * \param tree dependency tree data
 +   * \param dependencyStr output string
 +   */
 +  Standard_EXPORT void ConvertTreeToString( const TreeModel& tree,
 +                                          std::string& dependencyStr );
 +
 +  /*!
 +   * \brief Restore dependency tree data from the string representation
 +   *
 +   * \param dependencyStr string representation of tree data
 +   * \param tree output dependency tree data
 +   */
 +  Standard_EXPORT void ConvertStringToTree( const std::string& dependencyStr,
 +                                          TreeModel& tree );
  
 -  Standard_EXPORT void ConvertStringToTree( const std::string &theDependencyStr,
 -                                          TreeModel &tree );
 +  /*!
 +   * \brief Check shape
 +   *
 +   * \param shape input shape object
 +   * \param checkGeometry when set to \c true, causes check of underlying geometry
 +   *        in addition to the topology
 +   * \return \c true if shape is valid or \c false otherwise
 +   */
 +  Standard_EXPORT bool CheckShape( TopoDS_Shape& shape, bool checkGeometry = false );
 +  
 +  /*!
 +   * \brief Limit shape tolerance to the given value
 +   *
 +   * \param shape shape being fixed
 +   * \param type topology type which tolerance is to be limited; TopAbs_SHAPE means
 +   *             all types of topology
 +   * \param tolerance expected tolerance value (1e-7 by default)
 +   * \param checkGeometry check geometry validity of result
 +   * \return \c true if resulting shape is valid
 +   *
 +   * \note Resulting tolerance of the shape is not mandatory equal to requested value
 +   *       as it might be changed by fixshape operation in order to get valid shape where possible
 +   * \note By default, result only checked for topology validity; check of geometry can be done by
 +   *       passing \c true to \a checkGeometry parameter
 +   */
 +  Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
 +                                          TopAbs_ShapeEnum type,
 +                                          Standard_Real tolerance = Precision::Confusion(),
 +                                          bool checkGeometry = false );
  
 +  /*!
 +   * \brief Limit shape tolerance to the given value
 +   * This is overloaded function, it behaves exactly as previous one
 +   */
 +  Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
 +                                          Standard_Real tolerance = Precision::Confusion(),
 +                                          bool checkGeometry = false );
 +
 +  /*!
 +   * \brief Limit shape tolerance to the given value
 +   * This is overloaded function, it behaves exactly as previous one
 +   */
 +  Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
 +                                          bool checkGeometry );
 +
 +  /*!
 +   * \brief Fix curves of the given shape
 +   * 
 +   * The function checks each curve of the input shape in the following way:
 +   * - compute deviation of the curve from the underlying surface in a set of points
 +   *   computed with the certain discretization step value
 +   * - find maximum tolerance between computed deviation values
 +   * - limit tolerance of the curve with the computed maximum value
 +   * 
 +   * \param shape shape being fixed
 +   * \return \c true if resulting shape is valid
 +   */
 +  Standard_EXPORT bool FixShapeCurves( TopoDS_Shape& shape );
 +
 +  /*!
 +   * \brief Write shape to the BREP file
 +   *
 +   * \param source shape
 +   * \return \c true if file was written or \c false otherwise
 +   */
 +  Standard_EXPORT bool Write( const TopoDS_Shape& shape,
 +                              const char* fileName );
  };
  
  #endif
index e7f4c7b903c52f837607f7713ffa29ca67178141,1fa7f1fb903398eab45624cc8c926d9ca00fa0c9..2ff91518be37c0f932f76af72b6696f9faf99001
@@@ -246,6 -246,70 +246,70 @@@ GEOM::GEOM_Object_ptr GEOM_IShapesOpera
    return GetObject(anObject);
  }
  
+ //=============================================================================
+ /*!
+  *  MakeFaceFromSurface
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceFromSurface
+                                   (GEOM::GEOM_Object_ptr theFace,
+                                    GEOM::GEOM_Object_ptr theWire)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   //Get the reference face and wire
+   Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
+   Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
+   if (aFace.IsNull() || aWire.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   //Create the Face
+   Handle(GEOM_Object) anObject =
+     GetOperations()->MakeFaceFromSurface(aFace, aWire);
+   if (anObject.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   return GetObject(anObject);
+ }
+ //=============================================================================
+ /*!
+  *  MakeFaceWithConstraints
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWithConstraints
+                                                 (const GEOM::ListOfGO& theConstraints)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   //Get the shapes
+   std::list<Handle(GEOM_Object)> aConstraints;
+   for( int ind = 0; ind < theConstraints.length(); ind++ ) {
+     Handle(GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
+     aConstraints.push_back(anObject);
+   }
+   // Make Face
+   Handle(GEOM_Object) anObject =
+     GetOperations()->MakeFaceWithConstraints( aConstraints );
+   // enable warning status
+   if (anObject.IsNull())
+     return aGEOMObject._retn();
+   return GetObject(anObject);
+ }
  //=============================================================================
  /*!
   *  MakeShell
@@@ -345,8 -409,8 +409,8 @@@ GEOM::GEOM_Object_ptr GEOM_IShapesOpera
   *  MakeCompound
   */
  //=============================================================================
- GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound
                                      (const GEOM::ListOfGO& theShapes)
+ GEOM::GEOM_Object_ptr
GEOM_IShapesOperations_i::MakeCompound (const GEOM::ListOfGO& theShapes)
  {
    GEOM::GEOM_Object_var aGEOMObject;
  
    return GetObject(anObject);
  }
  
+ //=============================================================================
+ /*!
+  *  MakeSolidFromConnectedFaces
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidFromConnectedFaces
+                                       (const GEOM::ListOfGO& theFacesOrShells,
+                                        const CORBA::Boolean  isIntersect)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   int ind, aLen;
+   std::list<Handle(GEOM_Object)> aShapes;
+   //Get the shapes
+   aLen = theFacesOrShells.length();
+   for (ind = 0; ind < aLen; ind++) {
+     Handle(GEOM_Object) aSh = GetObjectImpl(theFacesOrShells[ind]);
+     if (aSh.IsNull()) return aGEOMObject._retn();
+     aShapes.push_back(aSh);
+   }
+   // Make Solid
+   Handle(GEOM_Object) anObject =
+     GetOperations()->MakeSolidFromConnectedFaces(aShapes, isIntersect);
+   if (!GetOperations()->IsDone() || anObject.IsNull())
+     return aGEOMObject._retn();
+   return GetObject(anObject);
+ }
  //=============================================================================
  /*!
   *  MakeGlueFaces
   */
  //=============================================================================
- GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             CORBA::Double   theTolerance,
-                                             CORBA::Boolean  doKeepNonSolids)
+ GEOM::GEOM_Object_ptr
GEOM_IShapesOperations_i::MakeGlueFaces (const GEOM::ListOfGO& theShapes,
+                                          CORBA::Double         theTolerance,
+                                          CORBA::Boolean  doKeepNonSolids)
  {
    GEOM::GEOM_Object_var aGEOMObject;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aGEOMObject._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aGEOMObject._retn();
  
    //Perform the gluing
    Handle(GEOM_Object) anObject =
-     GetOperations()->MakeGlueFaces(aShape, theTolerance, doKeepNonSolids);
+     GetOperations()->MakeGlueFaces(aShapes, theTolerance, doKeepNonSolids);
    //if (!GetOperations()->IsDone() || anObject.IsNull())
    // to allow warning
    if (anObject.IsNull())
   *  GetGlueFaces
   */
  //=============================================================================
- GEOM::ListOfGO* GEOM_IShapesOperations_i::GetGlueFaces
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             const CORBA::Double   theTolerance)
+ GEOM::ListOfGO*
GEOM_IShapesOperations_i::GetGlueFaces (const GEOM::ListOfGO& theShapes,
+                                         const CORBA::Double   theTolerance)
  {
    GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aSeq._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aSeq._retn();
  
    Handle(TColStd_HSequenceOfTransient) aHSeq =
-     //GetOperations()->GetGlueFaces(aShape, theTolerance);
-     GetOperations()->GetGlueShapes(aShape, theTolerance, TopAbs_FACE);
+     GetOperations()->GetGlueShapes(aShapes, theTolerance, TopAbs_FACE);
  
    //if (!GetOperations()->IsDone() || aHSeq.IsNull())
    // to allow warning
   *  MakeGlueFacesByList
   */
  //=============================================================================
- GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             CORBA::Double   theTolerance,
-                                             const GEOM::ListOfGO& theFaces,
-                                             CORBA::Boolean doKeepNonSolids,
-                                             CORBA::Boolean doGlueAllEdges)
+ GEOM::GEOM_Object_ptr
GEOM_IShapesOperations_i::MakeGlueFacesByList (const GEOM::ListOfGO& theShapes,
+                                                CORBA::Double         theTolerance,
+                                                const GEOM::ListOfGO& theFaces,
+                                                CORBA::Boolean        doKeepNonSolids,
+                                                CORBA::Boolean        doGlueAllEdges)
  {
    GEOM::GEOM_Object_var aGEOMObject;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aGEOMObject._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aGEOMObject._retn();
  
-   int ind, aLen;
-   std::list<Handle(GEOM_Object)> aFaces;
    //Get the shapes
-   aLen = theFaces.length();
-   for (ind = 0; ind < aLen; ind++) {
-     Handle(GEOM_Object) aSh = GetObjectImpl(theFaces[ind]);
-     if (aSh.IsNull()) return aGEOMObject._retn();
-     aFaces.push_back(aSh);
-   }
+   std::list<Handle(GEOM_Object)> aFaces;
+   if (! GetListOfObjectsImpl( theFaces, aFaces ))
+     return aGEOMObject._retn();
  
    //Perform the gluing
    Handle(GEOM_Object) anObject =
-     GetOperations()->MakeGlueFacesByList(aShape, theTolerance, aFaces, doKeepNonSolids, doGlueAllEdges);
+     GetOperations()->MakeGlueFacesByList(aShapes, theTolerance, aFaces,
+                                          doKeepNonSolids, doGlueAllEdges);
    //if (!GetOperations()->IsDone() || anObject.IsNull())
    // to allow warning
    if (anObject.IsNull())
   *  MakeGlueEdges
   */
  //=============================================================================
- GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueEdges
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             CORBA::Double   theTolerance)
+ GEOM::GEOM_Object_ptr
GEOM_IShapesOperations_i::MakeGlueEdges (const GEOM::ListOfGO& theShapes,
+                                          CORBA::Double         theTolerance)
  {
    GEOM::GEOM_Object_var aGEOMObject;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aGEOMObject._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aGEOMObject._retn();
  
    //Perform the gluing
    Handle(GEOM_Object) anObject =
-     GetOperations()->MakeGlueEdges(aShape, theTolerance);
+     GetOperations()->MakeGlueEdges(aShapes, theTolerance);
    //if (!GetOperations()->IsDone() || anObject.IsNull())
    // to allow warning
    if (anObject.IsNull())
   *  GetGlueEdges
   */
  //=============================================================================
- GEOM::ListOfGO* GEOM_IShapesOperations_i::GetGlueEdges
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             const CORBA::Double   theTolerance)
+ GEOM::ListOfGO*
GEOM_IShapesOperations_i::GetGlueEdges (const GEOM::ListOfGO& theShapes,
+                                         const CORBA::Double   theTolerance)
  {
    GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aSeq._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aSeq._retn();
  
    Handle(TColStd_HSequenceOfTransient) aHSeq =
-     GetOperations()->GetGlueShapes(aShape, theTolerance, TopAbs_EDGE);
+     GetOperations()->GetGlueShapes(aShapes, theTolerance, TopAbs_EDGE);
  
    //if (!GetOperations()->IsDone() || aHSeq.IsNull())
    // to allow warning
   *  MakeGlueEdgesByList
   */
  //=============================================================================
- GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueEdgesByList
                                           (GEOM::GEOM_Object_ptr theShape,
-                                             CORBA::Double   theTolerance,
-                                             const GEOM::ListOfGO& theEdges)
+ GEOM::GEOM_Object_ptr
GEOM_IShapesOperations_i::MakeGlueEdgesByList (const GEOM::ListOfGO& theShapes,
+                                                CORBA::Double         theTolerance,
+                                                const GEOM::ListOfGO& theEdges)
  {
    GEOM::GEOM_Object_var aGEOMObject;
  
    GetOperations()->SetNotDone();
  
    //Get the reference objects
-   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
-   if (aShape.IsNull()) return aGEOMObject._retn();
+   std::list< Handle(GEOM_Object) > aShapes;
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aGEOMObject._retn();
  
-   int ind, aLen;
-   std::list<Handle(GEOM_Object)> anEdges;
    //Get the shapes
-   aLen = theEdges.length();
-   for (ind = 0; ind < aLen; ind++) {
-     Handle(GEOM_Object) aSh = GetObjectImpl(theEdges[ind]);
-     if (aSh.IsNull()) return aGEOMObject._retn();
-     anEdges.push_back(aSh);
-   }
+   std::list<Handle(GEOM_Object)> anEdges;
+   if (! GetListOfObjectsImpl( theEdges, anEdges ))
+     return aGEOMObject._retn();
  
    //Perform the gluing
    Handle(GEOM_Object) anObject =
-     GetOperations()->MakeGlueEdgesByList(aShape, theTolerance, anEdges);
+     GetOperations()->MakeGlueEdgesByList(aShapes, theTolerance, anEdges);
    //if (!GetOperations()->IsDone() || anObject.IsNull())
    // to allow warning
    if (anObject.IsNull())
   *  GetExistingSubObjects
   */
  //=============================================================================
- GEOM::ListOfGO* GEOM_IShapesOperations_i::GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
-                                                                  CORBA::Boolean        theGroupsOnly)
+ GEOM::ListOfGO*
+ GEOM_IShapesOperations_i::GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
+                                                  CORBA::Boolean        theGroupsOnly)
  {
    GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
  
@@@ -912,6 -1007,25 +1007,25 @@@ char* GEOM_IShapesOperations_i::GetShap
    return CORBA::string_dup(aDescription.ToCString());
  }
  
+ //=============================================================================
+ /*!
+  *  IsSubShapeBelongsTo
+  */
+ //=============================================================================
+ CORBA::Boolean GEOM_IShapesOperations_i::IsSubShapeBelongsTo( GEOM::GEOM_Object_ptr theSubObject,
+                                                               const CORBA::Long theSubObjectIndex,
+                                                               GEOM::GEOM_Object_ptr theObject,
+                                                               const CORBA::Long theObjectIndex)
+ {
+   Handle(GEOM_Object) aSubObject = GetObjectImpl( theSubObject );
+   Handle(GEOM_Object) anObject = GetObjectImpl( theObject );
+   if( anObject.IsNull() || aSubObject.IsNull() )
+     return false;
+   // Get parameters
+   return GetOperations()->IsSubShapeBelongsTo( aSubObject, theSubObjectIndex, anObject, theObjectIndex );
+ }
  //=============================================================================
  /*!
   *  NumberOfFaces
@@@ -1041,7 -1155,8 +1155,8 @@@ GEOM::ListOfGO* GEOM_IShapesOperations_
  //=============================================================================
  GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSharedShapesMulti
                                            (const GEOM::ListOfGO& theShapes,
-                                            const CORBA::Long     theShapeType)
+                                            const CORBA::Long     theShapeType,
+                                            CORBA::Boolean        theMultiShare)
  {
    //Set a not done flag
    GetOperations()->SetNotDone();
  
    //Get the shapes
    std::list<Handle(GEOM_Object)> aShapes;
-   int aLen = theShapes.length();
-   for (int ind = 0; ind < aLen; ind++) {
-     Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
-     if (aSh.IsNull()) return aSeq._retn();
-     aShapes.push_back(aSh);
-   }
+   if (! GetListOfObjectsImpl( theShapes, aShapes ))
+     return aSeq._retn();
  
    Handle(TColStd_HSequenceOfTransient) aHSeq =
-     GetOperations()->GetSharedShapes(aShapes, theShapeType);
+     GetOperations()->GetSharedShapes(aShapes, theShapeType, theMultiShare);
    if (!GetOperations()->IsDone() || aHSeq.IsNull())
      return aSeq._retn();
  
@@@ -1907,43 -2018,100 +2018,141 @@@ GEOM::ListOfLong* GEOM_IShapesOperation
    return aSeq._retn();
  }
  
+ //=============================================================================
+ /*!
+  *  ExtendEdge
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ExtendEdge
+                                   (GEOM::GEOM_Object_ptr theEdge,
+                                    CORBA::Double         theMin,
+                                    CORBA::Double         theMax)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   //Get the reference objects
+   Handle(GEOM_Object) anEdge = GetObjectImpl(theEdge);
+   if (anEdge.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   //Get Shapes in place of aShapeWhat
+   Handle(GEOM_Object) aNewEdge =
+     GetOperations()->ExtendEdge(anEdge, theMin, theMax);
+   if (!GetOperations()->IsDone() || aNewEdge.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   return GetObject(aNewEdge);
+ }
+ //=============================================================================
+ /*!
+  *  ExtendFace
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ExtendFace
+                                   (GEOM::GEOM_Object_ptr theFace,
+                                    CORBA::Double         theUMin,
+                                    CORBA::Double         theUMax,
+                                    CORBA::Double         theVMin,
+                                    CORBA::Double         theVMax)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   //Get the reference objects
+   Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
+   if (aFace.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   //Get Shapes in place of aShapeWhat
+   Handle(GEOM_Object) aNewFace =
+     GetOperations()->ExtendFace(aFace, theUMin, theUMax, theVMin, theVMax);
+   if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   return GetObject(aNewFace);
+ }
+ //=============================================================================
+ /*!
+  *  MakeSurfaceFromFace
+  */
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSurfaceFromFace
+                                   (GEOM::GEOM_Object_ptr theFace)
+ {
+   GEOM::GEOM_Object_var aGEOMObject;
+   //Set a not done flag
+   GetOperations()->SetNotDone();
+   //Get the reference object
+   Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
+   if (aFace.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   //Get Shapes in place of aShapeWhat
+   Handle(GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace);
+   if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
+     return aGEOMObject._retn();
+   }
+   return GetObject(aNewFace);
+ }
++
 +//=============================================================================
 +/*!
 + *  GetSubShapeEdgeSorted
 + */
 +//=============================================================================
 +GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSubShapeEdgeSorted
 +                                        (GEOM::GEOM_Object_ptr theShape,
 +                                         GEOM::GEOM_Object_ptr theStartPoint)
 +{
 +  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
 +
 +  //Set a not done flag
 +  GetOperations()->SetNotDone();
 +
 +  //Get the reference objects
 +  Handle(GEOM_Object) aShape      = GetObjectImpl(theShape);
 +  Handle(GEOM_Object) aStartPoint = GetObjectImpl(theStartPoint);
 +
 +  if (aShape.IsNull() || aStartPoint.IsNull()) {
 +    return aSeq._retn();
 +  }
 +
 +  //Get Shapes On Shape
 +  Handle(TColStd_HSequenceOfTransient) aHSeq =
 +      GetOperations()->GetSubShapeEdgeSorted(aShape, aStartPoint);
 +
 +  if (!GetOperations()->IsDone() || aHSeq.IsNull())
 +    return aSeq._retn();
 +
 +  const Standard_Integer aLength = aHSeq->Length();
 +  Standard_Integer       i;
 +
 +  aSeq->length(aLength);
 +
 +  for (i = 1; i <= aLength; i++) {
 +    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
 +  }
 +
 +  return aSeq._retn();
 +}
index 5baa75ce3cf0c6b74143612661966f594bd131f5,9d0dbb464f79378bf46778a09fc3e1d580565635..5c74ca2c1bdfad1c5d353653c88fbcf717170a64
@@@ -64,6 -64,11 +64,11 @@@ class GEOM_I_EXPORT GEOM_IShapesOperati
    GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
                                         CORBA::Boolean  isPlanarWanted);
  
+   GEOM::GEOM_Object_ptr MakeFaceFromSurface(GEOM::GEOM_Object_ptr theFace,
+                                             GEOM::GEOM_Object_ptr theWire);
+   GEOM::GEOM_Object_ptr MakeFaceWithConstraints (const GEOM::ListOfGO& theConstraints);
+   
    GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
  
    GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
  
    GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
  
-   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
+   GEOM::GEOM_Object_ptr MakeSolidFromConnectedFaces (const GEOM::ListOfGO& theFacesOrShells,
+                                                      CORBA::Boolean isIntersect);
+   GEOM::GEOM_Object_ptr MakeGlueFaces (const GEOM::ListOfGO& theShape,
                                         CORBA::Double         theTolerance,
                                         CORBA::Boolean        doKeepNonSolids);
  
-   GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
+   GEOM::ListOfGO* GetGlueFaces (const GEOM::ListOfGO& theShape,
                                  CORBA::Double         theTolerance);
  
-   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
+   GEOM::GEOM_Object_ptr MakeGlueFacesByList (const GEOM::ListOfGO& theShape,
                                               CORBA::Double         theTolerance,
                                               const GEOM::ListOfGO& theFaces,
                                               CORBA::Boolean doKeepNonSolids,
                                               CORBA::Boolean doGlueAllEdges);
  
-   GEOM::GEOM_Object_ptr MakeGlueEdges (GEOM::GEOM_Object_ptr theShape,
+   GEOM::GEOM_Object_ptr MakeGlueEdges (const GEOM::ListOfGO& theShape,
                                         CORBA::Double         theTolerance);
  
-   GEOM::ListOfGO* GetGlueEdges (GEOM::GEOM_Object_ptr theShape,
+   GEOM::ListOfGO* GetGlueEdges (const GEOM::ListOfGO& theShape,
                                  CORBA::Double         theTolerance);
  
-   GEOM::GEOM_Object_ptr MakeGlueEdgesByList (GEOM::GEOM_Object_ptr theShape,
+   GEOM::GEOM_Object_ptr MakeGlueEdgesByList (const GEOM::ListOfGO& theShape,
                                               CORBA::Double         theTolerance,
                                               const GEOM::ListOfGO& theEdges);
  
  
    char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
  
+   CORBA::Boolean IsSubShapeBelongsTo( GEOM::GEOM_Object_ptr theSubobject,
+                                       const CORBA::Long theSubObjectIndex,
+                                       GEOM::GEOM_Object_ptr theObject,
+                                       const CORBA::Long theObjectIndex );
    CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
    CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
    CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
                                     CORBA::Long           theShapeType);
  
    GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
-                                         CORBA::Long           theShapeType);
+                                         CORBA::Long           theShapeType,
+                                         CORBA::Boolean        theMultiShare);
  
    GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
                                      CORBA::Long           theShapeType,
    GEOM::ListOfLong* GetSameIDs  (GEOM::GEOM_Object_ptr theShapeWhere,
                                   GEOM::GEOM_Object_ptr theShapeWhat);
  
+   GEOM::GEOM_Object_ptr ExtendEdge(GEOM::GEOM_Object_ptr theEdge,
+                                    CORBA::Double         theMin,
+                                    CORBA::Double         theMax);
+   GEOM::GEOM_Object_ptr ExtendFace(GEOM::GEOM_Object_ptr theFace,
+                                    CORBA::Double         theUMin,
+                                    CORBA::Double         theUMax,
+                                    CORBA::Double         theVMin,
+                                    CORBA::Double         theVMax);
+   GEOM::GEOM_Object_ptr MakeSurfaceFromFace(GEOM::GEOM_Object_ptr theFace);
 +  GEOM::ListOfGO* GetSubShapeEdgeSorted (GEOM::GEOM_Object_ptr theShape,
 +                                         GEOM::GEOM_Object_ptr theStartPoint);
 +
    ::GEOMImpl_IShapesOperations* GetOperations()
    { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
  };
index 08f2d1afdc783a5bdc40486f5df4d8515d4c49da,920aa557ad979f7078849e407354923fb4c01913..2e2e4b45c0c697a0159a8ab7d1879367ea25c266
@@@ -36,6 -36,7 +36,7 @@@
  #include <TCollection_AsciiString.hxx>
  #include <TDF_Label.hxx>
  #include <TDF_Tool.hxx>
+ #include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
  #include <TopAbs.hxx>
  #include <TopoDS_Iterator.hxx>
  
@@@ -158,6 -159,47 +159,47 @@@ GEOM::shape_type GEOM_Object_i::GetMaxS
    return getMinMaxShapeType( _impl->GetValue(), false );
  }
  
+ //================================================================================
+ /*!
+  * GetSubShapeName
+  */
+ //================================================================================
+ char* GEOM_Object_i::GetSubShapeName(CORBA::Long subID)
+ {
+   CORBA::String_var name("");
+   Handle(GEOM_Function) aMainFun = _impl->GetLastFunction();
+   if ( aMainFun.IsNull() ) return name._retn();
+   const TDataStd_ListOfExtendedString& aListEntries = aMainFun->GetSubShapeReferences();
+   TDataStd_ListIteratorOfListOfExtendedString anIt( aListEntries );
+   for (; anIt.More(); anIt.Next())
+   {
+     TCollection_AsciiString anEntry = anIt.Value();
+     Handle(GEOM_BaseObject) anObj =
+       GEOM_Engine::GetEngine()->GetObject( _impl->GetDocID(), anEntry.ToCString(), false );
+     if ( anObj.IsNull() ) continue;
+     TCollection_AsciiString aSubName = anObj->GetName();
+     if ( aSubName.IsEmpty() ) continue;
+     Handle(GEOM_Function) aFun = anObj->GetLastFunction();
+     if ( aFun.IsNull() ) continue;
+   
+     GEOM_ISubShape ISS( aFun );
+     Handle(TColStd_HArray1OfInteger) subIDs = ISS.GetIndices();
+     if ( subIDs.IsNull() || subIDs->Length() != 1 ) continue;
+     if ( subIDs->Value( subIDs->Lower() ) == subID )
+     {
+       name = aSubName.ToCString();
+       break;
+     }
+   }
+   return name._retn();
+ }
  //=============================================================================
  /*!
   *  SetColor
@@@ -364,19 -406,15 +406,19 @@@ bool GEOM_Object_i::IsShape(
    return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER;
  }
  
 -bool GEOM_Object_i::IsSame(GEOM::GEOM_Object_ptr other)
 +bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
  {
 -  TopoDS_Shape thisShape  = _impl->GetValue();
 -  TopoDS_Shape otherShape;
 -  if ( !CORBA::is_nil( other ) ) {
 +  bool result = false;
 +
 +  GEOM::GEOM_Object_var shapePtr = GEOM::GEOM_Object::_narrow( other );
 +  if ( !CORBA::is_nil( shapePtr ) ) {
      Handle(GEOM_Object) otherObject = Handle(GEOM_Object)::DownCast
 -      ( GEOM_Engine::GetEngine()->GetObject( other->GetStudyID(), other->GetEntry(), false ));
 -    if ( !otherObject.IsNull() )
 -      otherShape = otherObject->GetValue();
 +      ( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), shapePtr->GetEntry(), false ));
 +    if ( !otherObject.IsNull() ) {
 +      TopoDS_Shape thisShape  = _impl->GetValue();
 +      TopoDS_Shape otherShape = otherObject->GetValue();
 +      result = !thisShape.IsNull() && !otherShape.IsNull() && thisShape.IsSame( otherShape );
 +    }
    }
 -  return thisShape.IsSame( otherShape );
 +  return result;
  }
index b2002026960df70b98e94ee10e380ac53195a5a2,dffc72663598cde6d20ab28eedfd0de965d8f46b..176164936bcc8b603f6b2ff8e93cc3d69d022ca6
@@@ -47,6 -47,8 +47,8 @@@ class GEOM_I_EXPORT GEOM_Object_i : pub
  
    virtual GEOM::shape_type GetMaxShapeType();
  
+   virtual char* GetSubShapeName(CORBA::Long subID);
    virtual void SetColor(const SALOMEDS::Color& theColor);
  
    virtual SALOMEDS::Color GetColor();
@@@ -75,7 -77,7 +77,7 @@@
  
    virtual GEOM::GEOM_Object_ptr GetMainShape();
  
 -  virtual bool IsSame(GEOM::GEOM_Object_ptr other);
 +  virtual bool IsSame(GEOM::GEOM_BaseObject_ptr other);
  
    virtual bool IsShape();
  
index 0324e6e59bda01f69228d32c2c90427ebd9af8e7,7c4409f7eaf4667e2e355f8b0032d43fed84a44d..58217549227f4226831e8c3456b6429a1c1e9bfc
@@@ -1453,8 -1453,11 +1453,11 @@@ GEOM::GEOM_Object_ptr GEOM_Superv_i::Ma
    beginService( " GEOM_Superv_i::MakeFilling" );
    MESSAGE("GEOM_Superv_i::MakeFilling");
    get3DPrimOp();
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( 1 );
+   objList[0] = theShape;
    GEOM::GEOM_Object_ptr anObj =
-     my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D,
+     my3DPrimOp->MakeFilling(objList, theMinDeg, theMaxDeg, theTol2D, theTol3D,
                              theNbIter, theMethod, theApprox);
    endService( " GEOM_Superv_i::MakeFilling" );
    return anObj;
@@@ -2271,6 -2274,24 +2274,24 @@@ GEOM::GEOM_Object_ptr GEOM_Superv_i::Ma
    return NULL;
  }
  
+ //=============================================================================
+ //  MakeFaceWithConstraints:
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWithConstraints (GEOM::GEOM_List_ptr theConstraints)
+ {
+   beginService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+   MESSAGE("GEOM_Superv_i::MakeFaceWithConstraints");
+   if (GEOM_List_i<GEOM::ListOfGO>* aConstraints =
+       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theConstraints, myPOA).in())) {
+     getShapesOp();
+     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWithConstraints(aConstraints->GetList());
+     endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+     return anObj;
+   }
+   endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+   return NULL;
+ }
  //=============================================================================
  //  MakeShell:
  //=============================================================================
@@@ -2338,6 -2359,25 +2359,25 @@@ GEOM::GEOM_Object_ptr GEOM_Superv_i::Ma
    return NULL;
  }
  
+ //=============================================================================
+ //  MakeSolidFromConnectedFaces:
+ //=============================================================================
+ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidFromConnectedFaces (GEOM::GEOM_List_ptr theFacesOrShells,
+                                                                   CORBA::Boolean isIntersect)
+ {
+   beginService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+   MESSAGE("GEOM_Superv_i::MakeSolidFromConnectedFaces");
+   if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
+       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesOrShells, myPOA).in())) {
+     getShapesOp();
+     GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidFromConnectedFaces(aListImpl->GetList(), isIntersect);
+     endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+     return anObj;
+   }
+   endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+   return NULL;
+ }
  //=============================================================================
  //  MakeGlueFaces:
  //=============================================================================
@@@ -2348,8 -2388,11 +2388,11 @@@ GEOM::GEOM_Object_ptr GEOM_Superv_i::Ma
    beginService( " GEOM_Superv_i::MakeGlueFaces" );
    MESSAGE("GEOM_Superv_i::MakeGlueFaces");
    getShapesOp();
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( 1 );
+   objList[0] = theShape;
    GEOM::GEOM_Object_ptr anObj =
-     myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
+     myShapesOp->MakeGlueFaces(objList, theTolerance, doKeepNonSolids);
    endService( " GEOM_Superv_i::MakeGlueFaces" );
    return anObj;
  }
@@@ -2363,7 -2406,10 +2406,10 @@@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetG
    beginService( " GEOM_Superv_i::GetGlueFaces" );
    MESSAGE("GEOM_Superv_i::GetGlueFaces");
    getShapesOp();
-   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( 1 );
+   objList[0] = theShape;
+   GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(objList, theTolerance);
    GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
    MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
    endService( " GEOM_Superv_i::GetGlueFaces" );
@@@ -2382,8 -2428,11 +2428,11 @@@ GEOM::GEOM_Object_ptr GEOM_Superv_i::Ma
    beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
    MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
    getShapesOp();
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( 1 );
+   objList[0] = theShape;
    GEOM::GEOM_Object_ptr anObj =
-     myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces,
+     myShapesOp->MakeGlueFacesByList(objList, theTolerance, theFaces,
                                      doKeepNonSolids, doGlueAllEdges);
    endService( " GEOM_Superv_i::MakeGlueFacesByList" );
    return anObj;
@@@ -2713,7 -2762,7 +2762,7 @@@ CORBA::Boolean GEOM_Superv_i::CheckComp
    beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
    MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
    getBlocksOp();
 -  CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
 +  CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, -1., theErrors);
    endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
    return aRes;
  }
index 46c79bc52b87308a15a444a7216e8b7a3b44ea34,2fef6a4c569b1c6e9a5e16df5116792e68157fcd..85c7b8aff298b9df6b7e4cf5da3692a3e1adc40f
@@@ -178,6 -178,13 +178,13 @@@ def TestAll (geompy, math)
    Face2    = geompy.MakeFace(Sketcher, WantPlanarFace)
    Face3    = geompy.MakeFaceHW (100., 200., 1)       #(2 Doubles, 1 Int)->GEOM_Object
    Face4    = geompy.MakeFaceObjHW (vz, 200., 100.)   #(1 GEOM_Object, 2 Doubles)->GEOM_Object
+   Face5    = geompy.MakeFaceFromSurface(Face, Sketcher) #(2 GEOM_Objects)->GEOM_Object
+   
+   Cut2 = geompy.MakeCutList(Sphere1, [Box1], True)
+   #(List of GEOM_Object)->GEOM_Object
+   Face6 = geompy.MakeFaceWithConstraints([geompy.GetSubShape(Cut2, [5]),  geompy.GetSubShape(Cut2, [3]), 
+                                           geompy.GetSubShape(Cut2, [11]), geompy.GetSubShape(Cut2, [3]),
+                                           geompy.GetSubShape(Cut2, [13]), geompy.GetSubShape(Cut2, [3])])
    Disk     = geompy.MakeDiskPntVecR (p0, vz, radius) #(2 GEOM_Object, 1 Double)->GEOM_Object
    Disk2    = geompy.MakeDiskThreePnt(p0, p200, pz)   #(3 GEOM_Object)->GEOM_Object
    Disk3    = geompy.MakeDiskR(100., 1)               #(1 Doubles, 1 Int)->GEOM_Object
                                 prism1_faces[3], prism1_faces[4],
                                 prism1_faces[5], prism1_faces[2]])
    Solid    = geompy.MakeSolid([Shell1])              #(List of GEOM_Object)->GEOM_Object
+   
+   Box1_translation = geompy.MakeTranslation(Box1, 10, 0, 0)
+   Box1_shell = geompy.SubShapeAllSorted(Box1, geompy.ShapeType["SHELL"])[0]
+   Box1_translation_shell = geompy.SubShapeAllSorted(Box1_translation, geompy.ShapeType["SHELL"])[0]
+   
+   Solid_from_shells = geompy.MakeSolidFromConnectedFaces([Box1_shell, Box1_translation_shell], 1) #(List of GEOM_Object, Boolean)->GEOM_Object
+   
    # Create Isoline
    Isoline = geompy.MakeIsoline(Face1, True, 0.5)     #(1 GEOM_Object, Boolean, Double)->GEOM_Object
  
    Line3 = geompy.MakeLineTwoFaces(prism1_faces[0], prism1_faces[1]) #(2 GEOM_Object)->GEOM_Object
  
    #Create advanced objects
 -  Copy             = geompy.MakeCopy(Box)                      #(GEOM_Object)->GEOM_Object
    Prism            = geompy.MakePrismVecH(Face, vz, 100.0)     #(2 GEOM_Object, Double)->GEOM_Object
    Prism2Ways       = geompy.MakePrismVecH2Ways(Face, vz, 10.0) #(2 GEOM_Object, Double)->GEOM_Object
    PrismTwoPnt      = geompy.MakePrism(Face2, p0, pxyz)         #(3 GEOM_Object)->GEOM_Object
                                          tol2d, tol3d, nbiter)  #(GEOM_Object, 4 Doubles, Short)->GEOM_Object
    Pipe             = geompy.MakePipe(Wire, Edge)               #(2 GEOM_Object)->GEOM_Object
    Sewing           = geompy.MakeSewing([Face, S], precision)   #(List Of GEOM_Object, Double)->GEOM_Object
 +  Copy             = geompy.MakeCopy(Box)                      #(GEOM_Object)->GEOM_Object
  
    #Transform objects
    Translation = geompy.MakeTranslationTwoPoints(Box, px, pz)    #(3 GEOM_Object)->GEOM_Object
    Position    = geompy.MakePosition(Box, cs1, cs2)   #(3 GEOM_Object)->GEOM_Object
    Position2   = geompy.PositionAlongPath(Box, Arc, 0.5, 1, 0)  #(2 GEOM_Object, 1 Double, 2 Bool)->GEOM_Object
    Offset      = geompy.MakeOffset(Box, 10.)          #(GEOM_Object, Double)->GEOM_Object
 -  Orientation = geompy.ChangeOrientation(Box)
    ProjOnWire  = geompy.MakeProjectionOnWire(p0, Wire)
 +  Orientation = geompy.ChangeOrientation(Box)
+   ExtEdge     = geompy.ExtendEdge(Edge1, -0.3, 1.3)
+   ExtFace     = geompy.ExtendFace(Face5, -0.3, 1.3, -0.1, 1.1)
+   Surface     = geompy.MakeSurfaceFromFace(Face5)
  
    #IDList for Fillet/Chamfer
    prism_edges = geompy.ExtractShapes(Prism, geompy.ShapeType["EDGE"], True)
  
    id_Common  = geompy.addToStudy(Common,  "Common")
    id_Cut     = geompy.addToStudy(Cut,     "Cut")
+   id_Cut2    = geompy.addToStudy(Cut2,    "Cut2")
    id_Fuse    = geompy.addToStudy(Fuse,    "Fuse")
    id_Section = geompy.addToStudy(Section, "Section")
  
    id_Face2    = geompy.addToStudy(Face2,    "Face from Sketcher")
    id_Face3    = geompy.addToStudy(Face3,    "Face Height Width")
    id_Face4    = geompy.addToStudy(Face4,    "Face Plane_HW")
+   id_Face5    = geompy.addToStudy(Face5,    "Face from surface and wire")
+   id_Face6    = geompy.addToStudy(Face6,    "Face from edges with constraints")
    id_Disk     = geompy.addToStudy(Disk,     "Disk PntVecR")
    id_Disk2    = geompy.addToStudy(Disk2,    "Disk Three Points")
    id_Disk3    = geompy.addToStudy(Disk3,    "Disk OXY Radius")
    id_Prism1   = geompy.addToStudy(Prism1,     "Prism by Two Pnt")
    id_Shell1   = geompy.addToStudy(Shell1,   "Shell from Prism1 faces")
    id_Solid    = geompy.addToStudy(Solid,    "Solid")
+   id_Solid1   = geompy.addToStudy(Solid_from_shells,   "Solid1")
+   
    id_Compound = geompy.addToStudy(Compound, "Compound")
  
    id_Plane2   = geompy.addToStudy(Plane2,   "Plane on Face")
    id_Offset      = geompy.addToStudy(Offset,        "Offset")
    id_Orientation = geompy.addToStudy(Orientation,   "Orientation")
    id_ProjOnWire  = geompy.addToStudy(ProjOnWire[1], "ProjOnWire")
+   id_ExtEdge     = geompy.addToStudy(ExtEdge,       "ExtendedEdge")
+   id_ExtFace     = geompy.addToStudy(ExtFace,       "ExtendedFace")
+   id_Surface     = geompy.addToStudy(Surface,       "Surface From Face")
  
    id_Fillet   = geompy.addToStudy(Fillet,   "Fillet")
    id_Fillet2  = geompy.addToStudy(Fillet2,  "Fillet2")
  
    id_Partition  = geompy.addToStudy(Partition, "Partition")
    id_Partition1 = geompy.addToStudy(Partition1, "Half Partition")
+   
    #Decompose objects
  
    # SubShape
    geompy.RestoreSubShapes(Partition, [Box])
    geompy.RestoreSubShapes(Partition1)
  
 +  # GetSubShapeEdgeSorted
 +  p1 = geompy.GetFirstVertex(Sketcher)
 +  p2 = geompy.GetFirstVertex(Sketcher3d_1)
 +  p3 = geompy.GetFirstVertex(Sketcher3d_2)
 +  geompy.GetSubShapeEdgeSorted(Sketcher, p1, "OrderedEdges")
 +  geompy.GetSubShapeEdgeSorted(Sketcher3d_1, p2, "OrderedEdges")
 +  geompy.GetSubShapeEdgeSorted(Sketcher3d_2, p3, "OrderedEdges")
 +
 +
    print "DONE"
index be89ae1a32728d249a204d974d8b9cf3b21f646a,b5d4c2406cf4689c2a1c02e9c54af657ad2ebc93..fad3398cba4f5a6a59da4a1db3478d9bd3d03024
mode 100644,100755..100755
@@@ -80,7 -80,7 +80,7 @@@
  ## # create and publish cylinder
  ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
  ## # get non blocks from cylinder
 -## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
 +## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
  ## @endcode
  ##
  ## Above example will publish both result compounds (first with non-hexa solids and
@@@ -88,7 -88,7 +88,7 @@@
  ## However, if second command is invoked as
  ##
  ## @code
 -## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
 +## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
  ## @endcode
  ##
  ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
@@@ -517,6 -517,14 +517,14 @@@ def EnumToLong(theItem)
      if hasattr(theItem, "_v"): ret = theItem._v
      return ret
  
+ ## Pack an argument into a list
+ def ToList( arg ):
+     if isinstance( arg, list ):
+         return arg
+     if hasattr( arg, "__getitem__" ):
+         return list( arg )
+     return [ arg ]
  ## Information about closed/unclosed state of shell or wire
  #  @ingroup l1_geomBuilder_auxiliary
  class info:
@@@ -551,7 -559,7 +559,7 @@@ class geomBuilder(object, GEOM._objref_
          ## Enumeration ShapeType as a dictionary. \n
          ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
          #  @ingroup l1_geomBuilder_auxiliary
-         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
+         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
  
          ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
          #  and a list of parameters, describing the shape.
              self._autoPublish(anObj, theName, "revolution")
              return anObj
  
-         ## Create a filling from the given compound of contours.
-         #  @param theShape the compound of contours
-         #  @param theMinDeg a minimal degree of BSpline surface to create
-         #  @param theMaxDeg a maximal degree of BSpline surface to create
-         #  @param theTol2D a 2d tolerance to be reached
-         #  @param theTol3D a 3d tolerance to be reached
-         #  @param theNbIter a number of iteration of approximation algorithm
-         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
+         ## Create a face from a given set of contours.
+         #  @param theContours either a list or a compound of edges/wires.
+         #  @param theMinDeg a minimal degree of BSpline surface to create.
+         #  @param theMaxDeg a maximal degree of BSpline surface to create.
+         #  @param theTol2D a 2d tolerance to be reached.
+         #  @param theTol3D a 3d tolerance to be reached.
+         #  @param theNbIter a number of iteration of approximation algorithm.
+         #  @param theMethod Kind of method to perform filling operation
+         #         (see GEOM.filling_oper_method enum).
          #  @param isApprox if True, BSpline curves are generated in the process
          #                  of surface construction. By default it is False, that means
          #                  the surface is created using given curves. The usage of
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing the created filling surface.
+         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
          #
          #  @ref tui_creation_filling "Example"
          @ManageTransactions("PrimOp")
-         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
+         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
                          theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
              """
-             Create a filling from the given compound of contours.
+             Create a face from a given set of contours.
  
              Parameters:
-                 theShape the compound of contours
-                 theMinDeg a minimal degree of BSpline surface to create
-                 theMaxDeg a maximal degree of BSpline surface to create
-                 theTol2D a 2d tolerance to be reached
-                 theTol3D a 3d tolerance to be reached
-                 theNbIter a number of iteration of approximation algorithm
-                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
+                 theContours either a list or a compound of edges/wires.
+                 theMinDeg a minimal degree of BSpline surface to create.
+                 theMaxDeg a maximal degree of BSpline surface to create.
+                 theTol2D a 2d tolerance to be reached.
+                 theTol3D a 3d tolerance to be reached.
+                 theNbIter a number of iteration of approximation algorithm.
+                 theMethod Kind of method to perform filling operation
+                           (see GEOM.filling_oper_method enum).
                  isApprox if True, BSpline curves are generated in the process
                           of surface construction. By default it is False, that means
                           the surface is created using given curves. The usage of
                           Approximation makes the algorithm work slower, but allows
-                          building the surface for rather complex cases
+                          building the surface for rather complex cases.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing the created filling surface.
+                 New GEOM.GEOM_Object (face), containing the created filling surface.
  
              Example of usage:
                  filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
              """
              # Example: see GEOM_TestAll.py
              theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
-             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
+             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
                                              theTol2D, theTol3D, theNbIter,
                                              theMethod, isApprox)
              RaiseIfFailed("MakeFilling", self.PrimOp)
              return anObj
  
  
-         ## Create a filling from the given compound of contours.
-         #  This method corresponds to MakeFilling with isApprox=True
-         #  @param theShape the compound of contours
-         #  @param theMinDeg a minimal degree of BSpline surface to create
-         #  @param theMaxDeg a maximal degree of BSpline surface to create
-         #  @param theTol3D a 3d tolerance to be reached
+         ## Create a face from a given set of contours.
+         #  This method corresponds to MakeFilling() with isApprox=True.
+         #  @param theContours either a list or a compound of edges/wires.
+         #  @param theMinDeg a minimal degree of BSpline surface to create.
+         #  @param theMaxDeg a maximal degree of BSpline surface to create.
+         #  @param theTol3D a 3d tolerance to be reached.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing the created filling surface.
+         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
          #
          #  @ref tui_creation_filling "Example"
          @ManageTransactions("PrimOp")
-         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
+         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
              """
              Create a filling from the given compound of contours.
-             This method corresponds to MakeFilling with isApprox=True
+             This method corresponds to MakeFilling() with isApprox=True.
  
              Parameters:
-                 theShape the compound of contours
-                 theMinDeg a minimal degree of BSpline surface to create
-                 theMaxDeg a maximal degree of BSpline surface to create
-                 theTol3D a 3d tolerance to be reached
+                 theContours either a list or a compound of edges/wires.
+                 theMinDeg a minimal degree of BSpline surface to create.
+                 theMaxDeg a maximal degree of BSpline surface to create.
+                 theTol3D a 3d tolerance to be reached.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing the created filling surface.
+                 New GEOM.GEOM_Object (face), containing the created filling surface.
  
              Example of usage:
                  filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
              """
              # Example: see GEOM_TestAll.py
              theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
-             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
+             anObj = self.PrimOp.MakeFilling(theContours, theMinDeg, theMaxDeg,
                                              0, theTol3D, 0, GEOM.FOM_Default, True)
              RaiseIfFailed("MakeFillingNew", self.PrimOp)
              anObj.SetParameters(Parameters)
                  New GEOM.GEOM_Object, containing the created face.
              """
              # Example: see GEOM_TestAll.py
-             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
+             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
              if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
                  print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
              else:
              anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
              return anObj
  
+         ## Create a face based on a surface from given face bounded
+         #  by given wire.
+         #  @param theFace the face whose surface is used to create a new face.
+         #  @param theWire the wire that will bound a new face.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #
+         #  @return New GEOM.GEOM_Object, containing the created face.
+         #
+         #  @ref tui_creation_face "Example"
+         @ManageTransactions("ShapesOp")
+         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
+             """
+             Create a face based on a surface from given face bounded
+             by given wire.
+             Parameters:
+                 theFace the face whose surface is used to create a new face.
+                 theWire the wire that will bound a new face.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created face.
+             """
+             # Example: see GEOM_TestAll.py
+             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
+             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
+             self._autoPublish(anObj, theName, "face")
+             return anObj
+           
+         ## Create a face from a set of edges with the given constraints.
+         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
+         #         - edges should form a closed wire;
+         #         - for each edge, constraint face is optional: if a constraint face is missing
+         #           for some edge, this means that there no constraint associated with this edge.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         # 
+         # @return New GEOM.GEOM_Object, containing the created face.
+         # 
+         # @ref tui_creation_face "Example"
+         @ManageTransactions("ShapesOp")
+         def MakeFaceWithConstraints(self, theConstraints, theName=None):
+             """
+             Create a face from a set of edges with the given constraints.
+             Parameters:
+                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
+                         - edges should form a closed wire;
+                         - for each edge, constraint face is optional: if a constraint face is missing
+                           for some edge, this means that there no constraint associated with this edge.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created face.
+             """
+             # Example: see GEOM_TestAll.py
+             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
+             if anObj is None:
+                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
+             self._autoPublish(anObj, theName, "face")
+             return anObj
          ## Create a shell from the set of faces and shells.
          #  @param theFacesAndShells List of faces and/or shells.
          #  @param theName Object name; when specified, this parameter is used
                  New GEOM.GEOM_Object, containing the created shell.
              """
              # Example: see GEOM_TestAll.py
-             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
+             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
              RaiseIfFailed("MakeShell", self.ShapesOp)
              self._autoPublish(anObj, theName, "shell")
              return anObj
                  New GEOM.GEOM_Object, containing the created solid.
              """
              # Example: see GEOM_TestAll.py
+             theShells = ToList(theShells)
              if len(theShells) == 1:
                  descr = self._IsGoodForSolid(theShells[0])
                  #if len(descr) > 0:
                  New GEOM.GEOM_Object, containing the created compound.
              """
              # Example: see GEOM_TestAll.py
-             anObj = self.ShapesOp.MakeCompound(theShapes)
+             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
              RaiseIfFailed("MakeCompound", self.ShapesOp)
              self._autoPublish(anObj, theName, "compound")
              return anObj
+         
+         ## Create a solid (or solids) from the set of faces and/or shells.
+         #  @param theFacesOrShells List of faces and/or shells.
+         #  @param isIntersect If TRUE, forces performing intersections
+         #         between arguments; otherwise (default) intersection is not performed.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #
+         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
+         #
+         #  @ref tui_creation_solid_from_faces "Example"
+         @ManageTransactions("ShapesOp")
+         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
+             """
+             Create a solid (or solids) from the set of connected faces and/or shells.
+             Parameters:
+                 theFacesOrShells List of faces and/or shells.
+                 isIntersect If TRUE, forces performing intersections
+                         between arguments; otherwise (default) intersection is not performed
+                 theName Object name; when specified, this parameter is used.
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
+             """
+             # Example: see GEOM_TestAll.py
+             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
+             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
+             self._autoPublish(anObj, theName, "solid")
+             return anObj
  
          # end of l3_advanced
          ## @}
          #  @param theShape Shape to find free faces in.
          #  @return List of IDs of all free faces, contained in theShape.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_free_faces_page "Example"
          @ManageTransactions("ShapesOp")
          def GetFreeFacesIDs(self,theShape):
              """
              self._autoPublish(aList, theName, "shared")
              return aList
  
-         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
-         #  @param theShapes Shapes to find common sub-shapes of.
-         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
+         ## Get sub-shapes, shared by input shapes.
+         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
+         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
+         #  @param theMultiShare Specifies what type of shares should be checked:
+         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
+         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return List of objects, that are sub-shapes of all given shapes.
+         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
+         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
+         #        and all rest input shapes are returned.
          #
-         #  @ref swig_GetSharedShapes "Example"
+         #  @return List of all found sub-shapes.
+         #
+         #  Examples:
+         #  - @ref tui_shared_shapes "Example 1"
+         #  - @ref swig_GetSharedShapes "Example 2"
          @ManageTransactions("ShapesOp")
-         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
+         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
              """
-             Get all sub-shapes, shared by all shapes in the list theShapes.
+             Get sub-shapes, shared by input shapes.
  
              Parameters:
-                 theShapes Shapes to find common sub-shapes of.
-                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
+                 theShapes Either a list or compound of shapes to find common sub-shapes of.
+                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
+                 theMultiShare Specifies what type of shares should be checked:
+                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
+                   - False: causes to search sub-shapes shared between couples of input shapes.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
  
+             Note: if theShapes contains single compound, the shares between all possible couples of 
+                   its top-level shapes are returned; otherwise, only shares between 1st input shape
+                   and all rest input shapes are returned.
              Returns:
-                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
+                 List of all found sub-shapes.
              """
              # Example: see GEOM_TestOthers.py
-             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
+             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
              RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
              self._autoPublish(aList, theName, "shared")
              return aList
              RaiseIfFailed("GetSameIDs", self.ShapesOp)
              return anObj
  
+         ## Resize the input edge with the new Min and Max parameters.
+         #  The input edge parameters range is [0, 1]. If theMin parameter is
+         #  negative, the input edge is extended, otherwise it is shrinked by
+         #  theMin parameter. If theMax is greater than 1, the edge is extended,
+         #  otherwise it is shrinked by theMax parameter.
+         #  @param theEdge the input edge to be resized.
+         #  @param theMin the minimal parameter value.
+         #  @param theMax the maximal parameter value.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #  @return New GEOM.GEOM_Object, containing the created edge.
+         #
+         #  @ref tui_extend "Example"
+         @ManageTransactions("ShapesOp")
+         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
+             """
+             Resize the input edge with the new Min and Max parameters.
+             The input edge parameters range is [0, 1]. If theMin parameter is
+             negative, the input edge is extended, otherwise it is shrinked by
+             theMin parameter. If theMax is greater than 1, the edge is extended,
+             otherwise it is shrinked by theMax parameter.
+             Parameters:
+                 theEdge the input edge to be resized.
+                 theMin the minimal parameter value.
+                 theMax the maximal parameter value.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created edge.
+             """
+             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
+             RaiseIfFailed("ExtendEdge", self.ShapesOp)
+             self._autoPublish(anObj, theName, "edge")
+             return anObj
+         ## Resize the input face with the new UMin, UMax, VMin and VMax
+         #  parameters. The input face U and V parameters range is [0, 1]. If
+         #  theUMin parameter is negative, the input face is extended, otherwise
+         #  it is shrinked along U direction by theUMin parameter. If theUMax is
+         #  greater than 1, the face is extended, otherwise it is shrinked along
+         #  U direction by theUMax parameter. So as for theVMin, theVMax and
+         #  V direction of the input face.
+         #  @param theFace the input face to be resized.
+         #  @param theUMin the minimal U parameter value.
+         #  @param theUMax the maximal U parameter value.
+         #  @param theVMin the minimal V parameter value.
+         #  @param theVMax the maximal V parameter value.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #  @return New GEOM.GEOM_Object, containing the created face.
+         #
+         #  @ref tui_extend "Example"
+         @ManageTransactions("ShapesOp")
+         def ExtendFace(self, theFace, theUMin, theUMax,
+                        theVMin, theVMax, theName=None):
+             """
+             Resize the input face with the new UMin, UMax, VMin and VMax
+             parameters. The input face U and V parameters range is [0, 1]. If
+             theUMin parameter is negative, the input face is extended, otherwise
+             it is shrinked along U direction by theUMin parameter. If theUMax is
+             greater than 1, the face is extended, otherwise it is shrinked along
+             U direction by theUMax parameter. So as for theVMin, theVMax and
+             V direction of the input face.
+             Parameters:
+                 theFace the input face to be resized.
+                 theUMin the minimal U parameter value.
+                 theUMax the maximal U parameter value.
+                 theVMin the minimal V parameter value.
+                 theVMax the maximal V parameter value.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created face.
+             """
+             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
+                                              theVMin, theVMax)
+             RaiseIfFailed("ExtendFace", self.ShapesOp)
+             self._autoPublish(anObj, theName, "face")
+             return anObj
+         ## This function takes some face as input parameter and creates new
+         #  GEOM_Object, i.e. topological shape by extracting underlying surface
+         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
+         #  parameters of the source face (in the parametrical space).
+         #  @param theFace the input face.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #  @return New GEOM.GEOM_Object, containing the created face.
+         #
+         #  @ref tui_creation_surface "Example"
+         @ManageTransactions("ShapesOp")
+         def MakeSurfaceFromFace(self, theFace, theName=None):
+             """
+             This function takes some face as input parameter and creates new
+             GEOM_Object, i.e. topological shape by extracting underlying surface
+             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
+             parameters of the source face (in the parametrical space).
+             Parameters:
+                 theFace the input face.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing the created face.
+             """
+             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
+             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
+             self._autoPublish(anObj, theName, "surface")
+             return anObj
  
          # end of l4_obtain
          ## @}
              self._autoPublish(ListObj, theName, "subshape")
              return ListObj
  
 +        ## Explode a shape into edges sorted in a row from a starting point.
 +        #  @param theShape the shape to be exploded on edges.
 +        #  @param theStartPoint the starting point.
 +        #  @param theName Object name; when specified, this parameter is used
 +        #         for result publication in the study. Otherwise, if automatic
 +        #         publication is switched on, default value is used for result name.
 +        #  @return List of GEOM.GEOM_Object that is actually an ordered list
 +        #          of edges sorted in a row from a starting point.
 +        #
 +        #  @ref swig_GetSubShapeEdgeSorted "Example"
 +        @ManageTransactions("ShapesOp")
 +        def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
 +            """
 +            Explode a shape into edges sorted in a row from a starting point.
 +
 +            Parameters:
 +                theShape the shape to be exploded on edges.
 +                theStartPoint the starting point.
 +                theName Object name; when specified, this parameter is used
 +                        for result publication in the study. Otherwise, if automatic
 +                        publication is switched on, default value is used for result name.
 +
 +            Returns:
 +                List of GEOM.GEOM_Object that is actually an ordered list
 +                of edges sorted in a row from a starting point.
 +            """
 +            # Example: see GEOM_TestAll.py
 +            ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
 +            RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
 +            self._autoPublish(ListObj, theName, "SortedEdges")
 +            return ListObj
 +
+         ## Check if the object is a sub-object of another GEOM object.
+         #  @param aSubObject Checked sub-object (or its parent object, in case if
+         #         \a theSubObjectIndex is non-zero).
+         #  @param anObject An object that is checked for ownership (or its parent object,
+         #         in case if \a theObjectIndex is non-zero).
+         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
+         #         identifies a sub-object within its parent specified via \a theSubObject.
+         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
+         #         identifies an object within its parent specified via \a theObject.
+         #  @return TRUE, if the given object contains sub-object.
+         @ManageTransactions("ShapesOp")
+         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
+             """
+             Check if the object is a sub-object of another GEOM object.
+             
+             Parameters:
+                 aSubObject Checked sub-object (or its parent object, in case if
+                     \a theSubObjectIndex is non-zero).
+                 anObject An object that is checked for ownership (or its parent object,
+                     in case if \a theObjectIndex is non-zero).
+                 aSubObjectIndex When non-zero, specifies a sub-shape index that
+                     identifies a sub-object within its parent specified via \a theSubObject.
+                 anObjectIndex When non-zero, specifies a sub-shape index that
+                     identifies an object within its parent specified via \a theObject.
+             Returns
+                 TRUE, if the given object contains sub-object.
+             """
+             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
+             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
+             return IsOk
          # end of l4_decompose
          ## @}
  
          #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
          #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
          #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
+         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
+         #  - \b DropSmallSolids.WidthFactorThreshold - defines maximum value of <em>2V/S</em> of a solid which is considered small, where \a V is volume and \a S is surface area of the solid. \n
+         #  - \b DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria. \n
+         #  - \b DropSmallSolids.MergeSolids - if "1", small solids are removed; if "0" small solids are merged to adjacent non-small solids or left untouched if cannot be merged. \n
          #
          #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
          #    surfaces in segments using a certain angle. \n
                  theShape Shape to be processed.
                  theValues List of values of parameters, in the same order
                            as parameters are listed in theParameters list.
-                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
+                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
                  theParameters List of names of parameters
-                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
+                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
                       * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
                   * FixFaceSize - removes small faces, such as spots and strips.
                       * FixFaceSize.Tolerance - defines minimum possible face size.
-                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
+                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
                       * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
+                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
+                      * DropSmallSolids.WidthFactorThreshold - defines maximum value of 2V/S of a solid which is considered small, where V is volume and S is surface area of the solid.
+                      * DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria.
+                      * DropSmallSolids.MergeSolids - if '1', small solids are removed; if '0' small solids are merged to adjacent non-small solids or left untouched if cannot be merged.
                   * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
                                  in segments using a certain angle.
                       * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
              self._autoPublish(anObj, theName, "suppressFaces")
              return anObj
  
-         ## Sewing of some shapes into single shape.
+         ## Sewing of faces into a single shell.
          #  @param ListShape Shapes to be processed.
          #  @param theTolerance Required tolerance value.
          #  @param AllowNonManifold Flag that allows non-manifold sewing.
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing processed shape.
+         #  @return New GEOM.GEOM_Object, containing a result shell.
          #
          #  @ref tui_sewing "Example"
          def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
              """
-             Sewing of some shapes into single shape.
+             Sewing of faces into a single shell.
  
              Parameters:
                  ListShape Shapes to be processed.
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing processed shape.
+                 New GEOM.GEOM_Object, containing containing a result shell.
              """
              # Example: see GEOM_TestHealing.py
-             comp = self.MakeCompound(ListShape)
              # note: auto-publishing is done in self.Sew()
-             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
+             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
              return anObj
  
-         ## Sewing of the given object.
-         #  @param theObject Shape to be processed.
+         ## Sewing of faces into a single shell.
+         #  @param ListShape Shapes to be processed.
          #  @param theTolerance Required tolerance value.
          #  @param AllowNonManifold Flag that allows non-manifold sewing.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing processed shape.
+         #  @return New GEOM.GEOM_Object, containing a result shell.
          @ManageTransactions("HealOp")
-         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
+         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
              """
-             Sewing of the given object.
+             Sewing of faces into a single shell.
  
              Parameters:
-                 theObject Shape to be processed.
+                 ListShape Shapes to be processed.
                  theTolerance Required tolerance value.
                  AllowNonManifold Flag that allows non-manifold sewing.
                  theName Object name; when specified, this parameter is used
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing processed shape.
+                 New GEOM.GEOM_Object, containing a result shell.
              """
              # Example: see MakeSewing() above
              theTolerance,Parameters = ParseParameters(theTolerance)
              if AllowNonManifold:
-                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
+                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
              else:
-                 anObj = self.HealOp.Sew(theObject, theTolerance)
+                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
              # To avoid script failure in case of good argument shape
+             # (Fix of test cases geom/bugs11/L7,L8)
              if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
-                 return theObject
+                 return anObj
              RaiseIfFailed("Sew", self.HealOp)
              anObj.SetParameters(Parameters)
              self._autoPublish(anObj, theName, "sewed")
              return anObj
  
-         ## Rebuild the topology of theCompound of solids by removing
-         #  of the faces that are shared by several solids.
-         #  @param theCompound Shape to be processed.
+         ## Rebuild the topology of theSolids by removing
+         #  the faces that are shared by several solids.
+         #  @param theSolids A compound or a list of solids to be processed.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
          #  @ref tui_remove_webs "Example"
          @ManageTransactions("HealOp")
-         def RemoveInternalFaces (self, theCompound, theName=None):
+         def RemoveInternalFaces (self, theSolids, theName=None):
              """
-             Rebuild the topology of theCompound of solids by removing
-             of the faces that are shared by several solids.
+             Rebuild the topology of theSolids by removing
+             the faces that are shared by several solids.
  
              Parameters:
-                 theCompound Shape to be processed.
+                 theSolids A compound or a list of solids to be processed.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
                  New GEOM.GEOM_Object, containing processed shape.
              """
              # Example: see GEOM_TestHealing.py
-             anObj = self.HealOp.RemoveInternalFaces(theCompound)
+             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
              RaiseIfFailed("RemoveInternalFaces", self.HealOp)
              self._autoPublish(anObj, theName, "removeWebs")
              return anObj
              self._autoPublish(anObj, theName, "divideEdge")
              return anObj
  
+         ## Addition of points to a given edge of \a theObject by projecting
+         #  other points to the given edge.
+         #  @param theObject Shape to be processed.
+         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
+         #                      if -1, then theObject itself is the edge.
+         #  @param thePoints List of points to project to theEdgeIndex-th edge.
+         #  @param theName Object name; when specified, this parameter is used
+         #         for result publication in the study. Otherwise, if automatic
+         #         publication is switched on, default value is used for result name.
+         #
+         #  @return New GEOM.GEOM_Object, containing processed shape.
+         #
+         #  @ref tui_add_point_on_edge "Example"
+         @ManageTransactions("HealOp")
+         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
+             """
+             Addition of points to a given edge of \a theObject by projecting
+             other points to the given edge.
+             Parameters:
+                 theObject Shape to be processed.
+                 theEdgeIndex The edge or its index to be divided within theObject's shape,
+                              if -1, then theObject itself is the edge.
+                 thePoints List of points to project to theEdgeIndex-th edge.
+                 theName Object name; when specified, this parameter is used
+                         for result publication in the study. Otherwise, if automatic
+                         publication is switched on, default value is used for result name.
+             Returns:
+                 New GEOM.GEOM_Object, containing processed shape.
+             """
+             # Example: see GEOM_TestHealing.py
+             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
+                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
+             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
+             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
+             self._autoPublish(anObj, theName, "divideEdge")
+             return anObj
          ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
          #  @param theWire Wire to minimize the number of C1 continuous edges in.
          #  @param theVertices A list of vertices to suppress. If the list
          #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
          #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_free_boundaries_page "Example"
          @ManageTransactions("HealOp")
          def GetFreeBoundary(self, theObject, theName=None):
              """
                   theOpenWires: Open wires on the free boundary of the given shape.
              """
              # Example: see GEOM_TestHealing.py
-             anObj = self.HealOp.GetFreeBoundary(theObject)
+             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
              RaiseIfFailed("GetFreeBoundary", self.HealOp)
              self._autoPublish(anObj[1], theName, "closedWire")
              self._autoPublish(anObj[2], theName, "openWire")
              return anObj
  
-         ## Replace coincident faces in theShape by one face.
-         #  @param theShape Initial shape.
+         ## Replace coincident faces in \a theShapes by one face.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
          #  @param doKeepNonSolids If FALSE, only solids will present in the result,
          #                         otherwise all initial shapes.
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
+         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
          #
          #  @ref tui_glue_faces "Example"
          @ManageTransactions("ShapesOp")
-         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
+         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
              """
-             Replace coincident faces in theShape by one face.
+             Replace coincident faces in theShapes by one face.
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between faces, which can be considered as coincident.
                  doKeepNonSolids If FALSE, only solids will present in the result,
                                  otherwise all initial shapes.
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
+                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
              """
              # Example: see GEOM_Spanner.py
              theTolerance,Parameters = ParseParameters(theTolerance)
-             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
+             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
              if anObj is None:
                  raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
              anObj.SetParameters(Parameters)
              self._autoPublish(anObj, theName, "glueFaces")
              return anObj
  
-         ## Find coincident faces in theShape for possible gluing.
-         #  @param theShape Initial shape.
+         ## Find coincident faces in \a theShapes for possible gluing.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between faces,
          #                      which can be considered as coincident.
          #  @param theName Object name; when specified, this parameter is used
          #
          #  @ref tui_glue_faces "Example"
          @ManageTransactions("ShapesOp")
-         def GetGlueFaces(self, theShape, theTolerance, theName=None):
+         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
              """
-             Find coincident faces in theShape for possible gluing.
+             Find coincident faces in theShapes for possible gluing.
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between faces,
                               which can be considered as coincident.
                  theName Object name; when specified, this parameter is used
              Returns:
                  GEOM.ListOfGO
              """
-             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
+             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
              RaiseIfFailed("GetGlueFaces", self.ShapesOp)
              self._autoPublish(anObj, theName, "facesToGlue")
              return anObj
  
-         ## Replace coincident faces in theShape by one face
+         ## Replace coincident faces in \a theShapes by one face
          #  in compliance with given list of faces
-         #  @param theShape Initial shape.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between faces,
          #                      which can be considered as coincident.
          #  @param theFaces List of faces for gluing.
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing a copy of theShape
-         #          without some faces.
+         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
          #
          #  @ref tui_glue_faces "Example"
          @ManageTransactions("ShapesOp")
-         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
+         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
                                  doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
              """
-             Replace coincident faces in theShape by one face
+             Replace coincident faces in theShapes by one face
              in compliance with given list of faces
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between faces,
                               which can be considered as coincident.
                  theFaces List of faces for gluing.
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing a copy of theShape
-                     without some faces.
+                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
              """
-             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
+             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
                                                        doKeepNonSolids, doGlueAllEdges)
              if anObj is None:
                  raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
              self._autoPublish(anObj, theName, "glueFaces")
              return anObj
  
-         ## Replace coincident edges in theShape by one edge.
-         #  @param theShape Initial shape.
+         ## Replace coincident edges in \a theShapes by one edge.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
+         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
          #
          #  @ref tui_glue_edges "Example"
          @ManageTransactions("ShapesOp")
-         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
+         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
              """
-             Replace coincident edges in theShape by one edge.
+             Replace coincident edges in theShapes by one edge.
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between edges, which can be considered as coincident.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
+                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
              """
              theTolerance,Parameters = ParseParameters(theTolerance)
-             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
+             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
              if anObj is None:
                  raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
              anObj.SetParameters(Parameters)
              self._autoPublish(anObj, theName, "glueEdges")
              return anObj
  
-         ## Find coincident edges in theShape for possible gluing.
-         #  @param theShape Initial shape.
+         ## Find coincident edges in \a theShapes for possible gluing.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between edges,
          #                      which can be considered as coincident.
          #  @param theName Object name; when specified, this parameter is used
          #
          #  @ref tui_glue_edges "Example"
          @ManageTransactions("ShapesOp")
-         def GetGlueEdges(self, theShape, theTolerance, theName=None):
+         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
              """
-             Find coincident edges in theShape for possible gluing.
+             Find coincident edges in theShapes for possible gluing.
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between edges,
                               which can be considered as coincident.
                  theName Object name; when specified, this parameter is used
              Returns:
                  GEOM.ListOfGO
              """
-             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
+             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
              RaiseIfFailed("GetGlueEdges", self.ShapesOp)
              self._autoPublish(anObj, theName, "edgesToGlue")
              return anObj
  
-         ## Replace coincident edges in theShape by one edge
+         ## Replace coincident edges in theShapes by one edge
          #  in compliance with given list of edges.
-         #  @param theShape Initial shape.
+         #  @param theShapes Initial shapes, either a list or compound of shapes.
          #  @param theTolerance Maximum distance between edges,
          #                      which can be considered as coincident.
          #  @param theEdges List of edges for gluing.
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #
-         #  @return New GEOM.GEOM_Object, containing a copy of theShape
-         #          without some edges.
+         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
          #
          #  @ref tui_glue_edges "Example"
          @ManageTransactions("ShapesOp")
-         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
+         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
              """
-             Replace coincident edges in theShape by one edge
+             Replace coincident edges in theShapes by one edge
              in compliance with given list of edges.
  
              Parameters:
-                 theShape Initial shape.
+                 theShapes Initial shapes, either a list or compound of shapes.
                  theTolerance Maximum distance between edges,
                               which can be considered as coincident.
                  theEdges List of edges for gluing.
                          publication is switched on, default value is used for result name.
  
              Returns:
-                 New GEOM.GEOM_Object, containing a copy of theShape
-                 without some edges.
+                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
              """
-             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
+             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
              if anObj is None:
                  raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
              self._autoPublish(anObj, theName, "glueEdges")
          #  @param theShape2 Second argument for boolean operation.
          #  @param checkSelfInte The flag that tells if the arguments should
          #         be checked for self-intersection prior to the operation.
+         #         If a self-intersection detected the operation fails.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
-         #
-         #  @note This algorithm doesn't find all types of self-intersections.
-         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-         #        vertex/face and edge/face intersections. Face/face
-         #        intersections detection is switched off as it is a
-         #        time-consuming operation that gives an impact on performance.
-         #        To find all self-intersections please use
-         #        CheckSelfIntersections() method.
-         #
          #  @return New GEOM.GEOM_Object, containing the result shape.
          #
          #  @ref tui_section "Example 1"
                  theShape1 First argument for boolean operation.
                  theShape2 Second argument for boolean operation.
                  checkSelfInte The flag that tells if the arguments should
-                               be checked for self-intersection prior to
-                               the operation.
+                               be checked for self-intersection prior to the operation.
+                               If a self-intersection detected the operation fails.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
-             Note:
-                     This algorithm doesn't find all types of self-intersections.
-                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-                     vertex/face and edge/face intersections. Face/face
-                     intersections detection is switched off as it is a
-                     time-consuming operation that gives an impact on performance.
-                     To find all self-intersections please use
-                     CheckSelfIntersections() method.
              Returns:
                  New GEOM.GEOM_Object, containing the result shape.
  
              self._autoPublish(anObj, theName, "offset")
              return anObj
  
-         ## Create new object as projection of the given one on a 2D surface.
+         ## Create new object as projection of the given one on another.
          #  @param theSource The source object for the projection. It can be a point, edge or wire.
-         #  @param theTarget The target object. It can be planar or cylindrical face.
+         #         Edge and wire are acceptable if @a theTarget is a face.
+         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          @ManageTransactions("TrsfOp")
          def MakeProjection(self, theSource, theTarget, theName=None):
              """
-             Create new object as projection of the given one on a 2D surface.
+             Create new object as projection of the given one on another.
  
              Parameters:
                  theSource The source object for the projection. It can be a point, edge or wire.
-                 theTarget The target object. It can be planar or cylindrical face.
+                           Edge and wire are acceptable if theTarget is a face.
+                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
          ## Perform an Archimde operation on the given shape with given parameters.
          #  The object presenting the resulting face is returned.
          #  @param theShape Shape to be put in water.
-         #  @param theWeight Weight og the shape.
+         #  @param theWeight Weight of the shape.
          #  @param theWaterDensity Density of the water.
          #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
          #  @param theName Object name; when specified, this parameter is used
  
              Parameters:
                  theShape Shape to be put in water.
-                 theWeight Weight og the shape.
+                 theWeight Weight of the shape.
                  theWaterDensity Density of the water.
                  theMeshDeflection Deflection of the mesh, using to compute the section.
                  theName Object name; when specified, this parameter is used
          ## Get point coordinates
          #  @return [x, y, z]
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_point_coordinates_page "Example"
          @ManageTransactions("MeasuOp")
          def PointCoordinates(self,Point):
              """
          #  theSurfArea: Area of surface of the given shape.\n
          #  theVolume:   Volume of the given shape.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_basic_properties_page "Example"
          @ManageTransactions("MeasuOp")
          def BasicProperties(self,theShape):
              """
          #  Ymin,Ymax: Limits of shape along OY axis.
          #  Zmin,Zmax: Limits of shape along OZ axis.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_bounding_box_page "Example"
          @ManageTransactions("MeasuOp")
          def BoundingBox (self, theShape, precise=False):
              """
          #
          #  @return New GEOM.GEOM_Object, containing the created box.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_bounding_box_page "Example"
          @ManageTransactions("MeasuOp")
          def MakeBoundingBox (self, theShape, precise=False, theName=None):
              """
          #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
          #  Ix,Iy,Iz:    Moments of inertia of the given shape.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_inertia_page "Example"
          @ManageTransactions("MeasuOp")
          def Inertia(self,theShape):
              """
          #  @param theShape1,theShape2 Shapes to find minimal distance between.
          #  @return Value of the minimal distance between the given shapes.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_min_distance_page "Example"
          @ManageTransactions("MeasuOp")
          def MinDistance(self, theShape1, theShape2):
              """
          #  @return Value of the minimal distance between the given shapes, in form of list
          #          [Distance, DX, DY, DZ].
          #
-         #  @ref swig_all_measure "Example"
+         #  @ref tui_min_distance_page "Example"
          @ManageTransactions("MeasuOp")
          def MinDistanceComponents(self, theShape1, theShape2):
              """
          #  @return The number of found solutions (-1 in case of infinite number of
          #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_min_distance_page "Example"
          @ManageTransactions("MeasuOp")
          def ClosestPoints (self, theShape1, theShape2):
              """
          #        with their orientations, otherwise the minimum angle is computed.
          #  @return Value of the angle between the given shapes in degrees.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_angle_page "Example"
          @ManageTransactions("MeasuOp")
          def GetAngle(self, theShape1, theShape2):
              """
          #        with their orientations, otherwise the minimum angle is computed.
          #  @return Value of the angle between the given shapes in radians.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_angle_page "Example"
          @ManageTransactions("MeasuOp")
          def GetAngleRadians(self, theShape1, theShape2):
              """
          #                 if False, the opposite vector to the normal vector is used.
          #  @return Value of the angle between the given vectors in degrees.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_angle_page "Example"
          @ManageTransactions("MeasuOp")
          def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
              """
          #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
          #  VertMin,VertMax: Min and max tolerances of the vertices.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_tolerance_page "Example"
          @ManageTransactions("MeasuOp")
          def Tolerance(self,theShape):
              """
          #  @param theShape Shape to be described.
          #  @return Description of the given shape.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_whatis_page "Example"
          @ManageTransactions("MeasuOp")
          def WhatIs(self,theShape):
              """
          #
          #  @return New GEOM.GEOM_Object, containing the created point.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_center_of_mass_page "Example"
          @ManageTransactions("MeasuOp")
          def MakeCDG(self, theShape, theName=None):
              """
          #  @return If theReturnStatus is equal to 1 the description is returned.
          #          Otherwise doesn't return anything.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_check_shape_page "Example"
          @ManageTransactions("MeasuOp")
          def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
              """
          #          If theReturnStatus is equal to 2 the list of error data is
          #          returned along with IsValid flag.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_check_shape_page "Example"
          @ManageTransactions("MeasuOp")
          def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
              """
  
          ## Detect self-intersections in the given shape.
          #  @param theShape Shape to check.
+         #  @param theCheckLevel is the level of self-intersection check.
+         #         Possible input values are:
+         #         - GEOM.SI_V_V(0) - only V/V interferences
+         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
+         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
+         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
+         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
+         #         - GEOM.SI_ALL(5) - all interferences.
          #  @return TRUE, if the shape contains no self-intersections.
          #
-         #  @ref tui_measurement_tools_page "Example"
+         #  @ref tui_check_self_intersections_page "Example"
          @ManageTransactions("MeasuOp")
-         def CheckSelfIntersections(self, theShape):
+         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
              """
              Detect self-intersections in the given shape.
  
              Parameters:
                  theShape Shape to check.
+                 theCheckLevel is the level of self-intersection check.
+                   Possible input values are:
+                    - GEOM.SI_V_V(0) - only V/V interferences
+                    - GEOM.SI_V_E(1) - V/V and V/E interferences
+                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
+                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
+                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
+                    - GEOM.SI_ALL(5) - all interferences.
+  
              Returns:
                  TRUE, if the shape contains no self-intersections.
              """
              # Example: see GEOM_TestMeasures.py
-             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
+             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
              RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
              return IsValid
  
+         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
+         #  @param theShape1 First source object
+         #  @param theShape2 Second source object
+         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
+         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
+         #         - if \a theTolerance > 0, algorithm detects gaps
+         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
+         #         - if \a theDeflection <= 0, default deflection 0.001 is used
+         #  @return TRUE, if there are intersections (gaps) between source shapes
+         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
+         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
+         #
+         #  @ref tui_fast_intersection_page "Example"
+         @ManageTransactions("MeasuOp")
+         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
+             """
+             Detect intersections of the given shapes with algorithm based on mesh intersections.
+             Parameters:
+                 theShape1 First source object
+                 theShape2 Second source object
+                 theTolerance Specifies a distance between shapes used for detecting gaps:
+                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
+                     - if theTolerance > 0, algorithm detects gaps
+                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
+                     - if theDeflection <= 0, default deflection 0.001 is used
+  
+             Returns:
+                 TRUE, if there are intersections (gaps) between source shapes
+                 List of sub-shapes IDs from 1st shape that localize intersection.
+                 List of sub-shapes IDs from 2nd shape that localize intersection.
+             """
+             # Example: see GEOM_TestMeasures.py
+             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
+             RaiseIfFailed("FastIntersect", self.MeasuOp)
+             return IsOk, Res1, Res2
          ## Get position (LCS) of theShape.
          #
          #  Origin of the LCS is situated at the shape's center of mass.
          ## Check, if the compound of blocks is given.
          #  To be considered as a compound of blocks, the
          #  given shape must satisfy the following conditions:
 -        #  - Each element of the compound should be a Block (6 faces and 12 edges).
 +        #  - Each element of the compound should be a Block (6 faces).
 +        #  - Each face should be a quadrangle, i.e. it should have only 1 wire
 +        #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
 +        #       there are more than 4 edges in the only wire of a face,
 +        #       this face is considered to be quadrangle if it has 4 bounds
 +        #       (1 or more edge) of C1 continuity.
          #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
          #  - The compound should be connexe.
          #  - The glue between two quadrangle faces should be applied.
          #  @param theCompound The compound to check.
 +        #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
 +        #         taking into account C1 continuity.
 +        #  @param theAngTolerance the angular tolerance to check if two neighbor
 +        #         edges are codirectional in the common vertex with this
 +        #         tolerance. This parameter is used only if
 +        #         <VAR>theIsUseC1</VAR> is set to True.
          #  @return TRUE, if the given shape is a compound of blocks.
          #  If theCompound is not valid, prints all discovered errors.
          #
-         #  @ref tui_measurement_tools_page "Example 1"
+         #  @ref tui_check_compound_of_blocks_page "Example 1"
          #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
          @ManageTransactions("BlocksOp")
 -        def CheckCompoundOfBlocks(self,theCompound):
 +        def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
 +                                  theAngTolerance = 1.e-12):
              """
              Check, if the compound of blocks is given.
              To be considered as a compound of blocks, the
              given shape must satisfy the following conditions:
 -            - Each element of the compound should be a Block (6 faces and 12 edges).
 +            - Each element of the compound should be a Block (6 faces).
 +            - Each face should be a quadrangle, i.e. it should have only 1 wire
 +                 with 4 edges. If theIsUseC1 is set to True and
 +                 there are more than 4 edges in the only wire of a face,
 +                 this face is considered to be quadrangle if it has 4 bounds
 +                 (1 or more edge) of C1 continuity.
              - A connection between two Blocks should be an entire quadrangle face or an entire edge.
              - The compound should be connexe.
              - The glue between two quadrangle faces should be applied.
  
              Parameters:
                  theCompound The compound to check.
 +                theIsUseC1 Flag to check if there are 4 bounds on a face
 +                           taking into account C1 continuity.
 +                theAngTolerance the angular tolerance to check if two neighbor
 +                           edges are codirectional in the common vertex with this
 +                           tolerance. This parameter is used only if
 +                           theIsUseC1 is set to True.
  
              Returns:
                  TRUE, if the given shape is a compound of blocks.
                  If theCompound is not valid, prints all discovered errors.
              """
              # Example: see GEOM_Spanner.py
 -            (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
 +            aTolerance = -1.0
 +            if theIsUseC1:
 +                aTolerance = theAngTolerance
 +            (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
              RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
              if IsValid == 0:
                  Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
  
          ## Retrieve all non blocks solids and faces from \a theShape.
          #  @param theShape The shape to explore.
 +        #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
 +        #         taking into account C1 continuity.
 +        #  @param theAngTolerance the angular tolerance to check if two neighbor
 +        #         edges are codirectional in the common vertex with this
 +        #         tolerance. This parameter is used only if
 +        #         <VAR>theIsUseC1</VAR> is set to True.
          #  @param theName Object name; when specified, this parameter is used
          #         for result publication in the study. Otherwise, if automatic
          #         publication is switched on, default value is used for result name.
          #  @return A tuple of two GEOM_Objects. The first object is a group of all
          #          non block solids (= not 6 faces, or with 6 faces, but with the
          #          presence of non-quadrangular faces). The second object is a
 -        #          group of all non quadrangular faces.
 +        #          group of all non quadrangular faces (= faces with more then
 +        #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
 +        #          with 1 wire with not 4 edges that do not form 4 bounds of
 +        #          C1 continuity).
          #
-         #  @ref tui_measurement_tools_page "Example 1"
+         #  @ref tui_get_non_blocks_page "Example 1"
          #  \n @ref swig_GetNonBlocks "Example 2"
          @ManageTransactions("BlocksOp")
 -        def GetNonBlocks (self, theShape, theName=None):
 +        def GetNonBlocks (self, theShape, theIsUseC1 = False,
 +                          theAngTolerance = 1.e-12, theName=None):
              """
              Retrieve all non blocks solids and faces from theShape.
  
              Parameters:
                  theShape The shape to explore.
 +                theIsUseC1 Flag to check if there are 4 bounds on a face
 +                           taking into account C1 continuity.
 +                theAngTolerance the angular tolerance to check if two neighbor
 +                           edges are codirectional in the common vertex with this
 +                           tolerance. This parameter is used only if
 +                           theIsUseC1 is set to True.
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
                  A tuple of two GEOM_Objects. The first object is a group of all
                  non block solids (= not 6 faces, or with 6 faces, but with the
                  presence of non-quadrangular faces). The second object is a
 -                group of all non quadrangular faces.
 +                group of all non quadrangular faces (= faces with more then
 +                1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
 +                with 1 wire with not 4 edges that do not form 4 bounds of
 +                C1 continuity).
  
              Usage:
                  (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
              """
              # Example: see GEOM_Spanner.py
 -            aTuple = self.BlocksOp.GetNonBlocks(theShape)
 +            aTolerance = -1.0
 +            if theIsUseC1:
 +                aTolerance = theAngTolerance
 +            aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
              RaiseIfFailed("GetNonBlocks", self.BlocksOp)
              self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
              return aTuple
              RaiseIfFailed("AddTexture", self.InsertOp)
              return ID
  
+         ## Transfer not topological data from one GEOM object to another.
+         #
+         #  @param theObjectFrom the source object of non-topological data
+         #  @param theObjectTo the destination object of non-topological data
+         #  @param theFindMethod method to search sub-shapes of theObjectFrom
+         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
+         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
+         #         Other values of GEOM.find_shape_method are not supported.
+         #
+         #  @return True in case of success; False otherwise.
+         #
+         #  @ingroup l1_geomBuilder_auxiliary
+         #
+         #  @ref swig_TransferData "Example"
+         @ManageTransactions("InsertOp")
+         def TransferData(self, theObjectFrom, theObjectTo,
+                          theFindMethod=GEOM.FSM_GetInPlace):
+             """
+             Transfer not topological data from one GEOM object to another.
+             Parameters:
+                 theObjectFrom the source object of non-topological data
+                 theObjectTo the destination object of non-topological data
+                 theFindMethod method to search sub-shapes of theObjectFrom
+                               in shape theObjectTo. Possible values are:
+                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
+                               and GEOM.FSM_GetInPlace_Old. Other values of
+                               GEOM.find_shape_method are not supported.
+             Returns:
+                 True in case of success; False otherwise.
+             # Example: see GEOM_TestOthers.py
+             """
+             # Example: see GEOM_TestAll.py
+             isOk = self.InsertOp.TransferData(theObjectFrom,
+                                                theObjectTo, theFindMethod)
+             RaiseIfFailed("TransferData", self.InsertOp)
+             return isOk
          ## Creates a new folder object. It is a container for any GEOM objects.
          #  @param Name name of the container
          #  @param Father parent object. If None,
index 21157fb15094427d41549073f2111f1debc1e9d5,63127af248c5b37cbf204c352ad25a947b8a2a03..d314f09d245840c7206d6b1fcca59b264af77c7f
@@@ -30,6 -30,7 +30,7 @@@
  #include <GEOMBase.h>
  #include <GeometryGUI.h>
  #include <GEOM_Displayer.h>
+ #include <GEOMUtils.hxx>
  
  #include <SalomeApp_Application.h>
  #include <SalomeApp_Study.h>
@@@ -42,7 -43,6 +43,7 @@@
  #include <SVTK_ViewModel.h>
  #include <SALOME_Prs.h>
  #include <SALOME_ListIO.hxx>
 +#include "utilities.h"
  
  #include <SUIT_Desktop.h>
  #include <SUIT_MessageBox.h>
  #define GROUP_IDLST_COLOR Qt::blue // Specific color for the IDs of subShapes in the dialog box
  #define GROUP_NEWIDLST_COLOR Qt::red // Specific color for the new IDs of subShapes in the dialog box
  
- enum { ALL_SUBSHAPES = 0, GET_IN_PLACE, SUBSHAPES_OF_SHAPE2, SUBSHAPES_OF_INVISIBLE_SHAPE2 };
+ namespace {
+   enum { ALL_SUBSHAPES = 0, GET_IN_PLACE, SUBSHAPES_OF_SHAPE2, SUBSHAPES_OF_INVISIBLE_SHAPE2 };
+   enum { Filter_LT, Filter_LE, Filter_GT, Filter_GE };
+ }
  
  GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QWidget* parent)
    : GEOMBase_Skeleton(theGeometryGUI, parent, false),
    aMedLayout->setRowStretch(5, 5);
    aMedLayout->setRowStretch(8, 5);
  
+   //filter group
+   myFilterGrp = new QGroupBox(tr("GEOM_FILTER"), centralWidget());
+   myLessFilterCheck = new QCheckBox(myFilterGrp);
+   myLessFilterCombo = new QComboBox(myFilterGrp);
+   myLessFilterCombo->addItem( tr("GEOM_LESS_THAN"), Filter_LT );
+   myLessFilterCombo->addItem( tr("GEOM_LESSOREQUAL_THAN"), Filter_LE );
+   myGreaterFilterCheck = new QCheckBox(myFilterGrp);
+   myGreaterFilterCombo = new QComboBox(myFilterGrp);
+   myGreaterFilterCombo->addItem( tr("GEOM_GREAT_THAN"), Filter_GT );
+   myGreaterFilterCombo->addItem( tr("GEOM_GREATOREQUAL_THAN"), Filter_GE );
+   myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
+   myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
+   myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
+   QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
+   filterLayout->addWidget(myLessFilterCheck,    0, 0);
+   filterLayout->addWidget(myLessFilterCombo,    0, 1);
+   filterLayout->addWidget(myLessFilterSpin,     0, 2);
+   filterLayout->addWidget(myGreaterFilterCheck, 1, 0);
+   filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
+   filterLayout->addWidget(myGreaterFilterSpin,  1, 2);
+   filterLayout->addWidget(myApplyFilterButton,  0, 3);
    QVBoxLayout* layout = new QVBoxLayout(centralWidget());
    layout->setMargin(0); layout->setSpacing(6);
    layout->addWidget(GroupMedium);
+   layout->addWidget(myFilterGrp);
  
    setHelpFileName("work_with_groups_page.html");
  
@@@ -211,6 -239,16 +240,16 @@@ GroupGUI_GroupDlg::~GroupGUI_GroupDlg(
  //=================================================================================
  void GroupGUI_GroupDlg::Init()
  {
+   // 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(myLessFilterSpin, 0., COORD_MAX, step, "length_precision" );
+   initSpinBox(myGreaterFilterSpin, 0., COORD_MAX, step, "length_precision" );
+   myLessFilterSpin->setValue( 0. );
+   myGreaterFilterSpin->setValue( 0. );
    myDmMode = -1;
    LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
  
    connect(myShowAllBtn,    SIGNAL(clicked()),              this, SLOT(showOnlySelected()));
    connect(myIdList,        SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()));
  
+   connect(myApplyFilterButton, SIGNAL(clicked()),         this, SLOT(ClickOnOkFilter()));
+   connect(myLessFilterCheck,   SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
+   connect(myGreaterFilterCheck,   SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
    setInPlaceObj(GEOM::GEOM_Object::_nil());
  
    myBusy = true; // just activate but do not select in the list
    activateSelection();
    myBusy = false;
+   MeasureToggled();
  }
  
  //=================================================================================
@@@ -1081,9 -1124,13 +1125,13 @@@ void GroupGUI_GroupDlg::updateState (bo
    myRemBtn->setEnabled(hasSel);
    myRestrictGroupBox->setEnabled(!CORBA::is_nil(myMainObj));
    mySelAllBtn->setEnabled(!CORBA::is_nil(myMainObj));
+   
    mySelBtn2->setEnabled(subSelectionWay() != ALL_SUBSHAPES);
    myShape2Name->setEnabled(subSelectionWay() != ALL_SUBSHAPES);
+   myFilterGrp->setEnabled(!CORBA::is_nil(myMainObj) &&
+                           subSelectionWay() == ALL_SUBSHAPES &&
+                           myIsShapeType &&
+                           getShapeType() != TopAbs_VERTEX);
    if (subSelectionWay() == ALL_SUBSHAPES)
      setInPlaceObj(GEOM::GEOM_Object::_nil());
  }
@@@ -1318,3 -1365,65 +1366,65 @@@ GEOM::GEOM_Object_ptr GroupGUI_GroupDlg
    }
    return aFatherObj._retn();
  }
+ void GroupGUI_GroupDlg::ClickOnOkFilter()
+ {
+   if (CORBA::is_nil(myMainObj) || subSelectionWay() != ALL_SUBSHAPES || !myIsShapeType || getShapeType() == TopAbs_VERTEX)
+     return;
+   
+   TopoDS_Shape aMainShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myMainObj);
+   TopTools_IndexedMapOfShape aSubShapesMap;
+   TopExp::MapShapes(aMainShape, aSubShapesMap);
+   SALOME_View* view = GEOM_Displayer::GetActiveView();
+   getDisplayer()->Erase(myMainObj, false, false);
+   CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+   QString anEntryBase = aMainEntry.in();
+   SALOME_ListIO toSelect;
+   TopExp_Explorer anExp (aMainShape, (TopAbs_ShapeEnum)getShapeType());
+   for (; anExp.More(); anExp.Next())
+   {
+     TopoDS_Shape aSubShape = anExp.Current();
+     int index = aSubShapesMap.FindIndex(aSubShape);
+     QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
+     if ( !getDisplayer()->IsDisplayed( anEntry ) )
+       continue;
+     double factor = GEOMUtils::ShapeToDouble(aSubShape).second;
+     double v1 = myLessFilterSpin->value();
+     double v2 = myGreaterFilterSpin->value();
+     bool isLess = myLessFilterCombo->itemData(myLessFilterCombo->currentIndex()).toInt() == Filter_LT ? factor < v1 : factor <= v1;
+     bool isGreater = myGreaterFilterCombo->itemData(myGreaterFilterCombo->currentIndex()).toInt() == Filter_GT ? factor > v2 : factor >= v2;
+     if ( ( myLessFilterCheck->isChecked() && myGreaterFilterCheck->isChecked() && isLess && isGreater ) ||
+          ( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) ||
+          ( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) {
+       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject();
+       io->setEntry( anEntry.toLatin1().constData() );
+       toSelect.Append(io);
+     }
+   }
+   if ( toSelect.Extent() > 0 ) {
+     myGeomGUI->getApp()->selectionMgr()->setSelectedObjects(toSelect);
+     SUIT_MessageBox::information( this,
+                                   tr( "INF_INFO" ),
+                                   tr( "GEOM_SOME_SHAPES_SELECTED").arg( toSelect.Extent() ),
+                                   tr( "BUT_OK" ) );
+   }
+   else {
+     SUIT_MessageBox::information( this,
+                                   tr( "INF_INFO" ),
+                                   tr( "GEOM_NO_SHAPES_SELECTED" ),
+                                   tr( "BUT_OK" ) );
+   }
+   updateState(true);
+ }
+ void GroupGUI_GroupDlg::MeasureToggled()
+ {
+   myLessFilterSpin->setEnabled(myLessFilterCheck->isChecked());
+   myLessFilterCombo->setEnabled(myLessFilterCheck->isChecked());
+   myGreaterFilterSpin->setEnabled(myGreaterFilterCheck->isChecked());
+   myGreaterFilterCombo->setEnabled(myGreaterFilterCheck->isChecked());
+   myApplyFilterButton->setEnabled(myLessFilterCheck->isChecked() || myGreaterFilterCheck->isChecked());
+ }
index 87d58b77c5caeefdbde245fb05b403f39ae0cf93,051ca495a1e6c7084a1d08f5755bb2e703d56355..83104ee5e76556f66c9754d88b820f02c76759a7
  //
  #include "RepairGUI_FreeFacesDlg.h"
  
+ #include <GEOMBase.h>
+ #include <GeometryGUI.h>
+ #include <GEOMImpl_Types.hxx>
+ #include <GEOM_Constants.h>
  #include <LightApp_Application.h>
  #include <LightApp_SelectionMgr.h>
  #include <SalomeApp_Application.h>
- #include <SalomeApp_Tools.h>
  #include <SalomeApp_Study.h>
- #include <SUIT_MessageBox.h>
- #include <SUIT_Session.h>
- #include <SUIT_OverrideCursor.h>
+ #include <SalomeApp_Tools.h>
  #include <SUIT_Desktop.h>
+ #include <SUIT_OverrideCursor.h>
  #include <SUIT_ResourceMgr.h>
- #include <SUIT_ViewWindow.h>
+ #include <SUIT_Session.h>
  #include <SUIT_ViewManager.h>
+ #include <SUIT_ViewWindow.h>
  
- #include <GEOMImpl_Types.hxx>
- #include <GEOM_Constants.h>
- #include <TopTools_IndexedMapOfShape.hxx>
  #include <TColStd_MapOfInteger.hxx>
  #include <TopExp.hxx>
+ #include <TopTools_IndexedMapOfShape.hxx>
  
- #include <GEOMBase.h>
- #include <GeometryGUI.h>
- #include <GEOM_Displayer.h>
- #include <QLineEdit>
- #include <QLabel>
  #include <QGroupBox>
- #include <QPushButton>
  #include <QHBoxLayout>
+ #include <QLabel>
+ #include <QLineEdit>
+ #include <QPushButton>
+ #include <QRadioButton>
  #include <QVBoxLayout>
- #include <QKeyEvent>
  
  #define SPACING 6
  #define MARGIN  9
  //            TRUE to construct a modal dialog.
  //=================================================================================
  RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg( GeometryGUI* GUI, QWidget* parent,
-                                                 bool modal )
-   : QDialog( parent, 0 ),
-     GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
-     myGeomGUI( GUI ), 
-     myDisplayer( 0 )
+                                                 bool modal)
+   : GEOMBase_Skeleton(GUI, parent, modal),
+     myDisplayer      (0),
+     myEdit           (0)
  {
-   setAttribute( Qt::WA_DeleteOnClose );
-   setSizeGripEnabled( true );
+   QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FREE_FACES")));
    QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
  
    setWindowTitle( tr( "GEOM_FREE_FACES_TITLE" ) );
  
    /***************************************************************/
  
+   mainFrame()->GroupConstructors->setTitle(tr("GEOM_FREE_FACES"));
+   mainFrame()->RadioButton1->setIcon(image0);
+   mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
+   mainFrame()->RadioButton2->close();
+   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+   mainFrame()->RadioButton3->close();
+   mainFrame()->GroupBoxName->hide();
    QGroupBox* aMainGrp = new QGroupBox( tr( "GEOM_SELECTED_SHAPE" ), this );
    
    QLabel* lab = new QLabel( tr( "GEOM_OBJECT" ), aMainGrp );
-   mySelBtn = new QPushButton( aMainGrp );
-   mySelBtn->setIcon( image1 );
+   QPushButton *aSelBtn = new QPushButton( aMainGrp );
+   aSelBtn->setIcon( image1 );
    myEdit = new QLineEdit( aMainGrp );
    myEdit->setReadOnly( true );
    myEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
    aMainLay->setSpacing( SPACING );
    aMainLay->setMargin( MARGIN );
    aMainLay->addWidget( lab );
-   aMainLay->addWidget( mySelBtn );
+   aMainLay->addWidget( aSelBtn );
    aMainLay->addWidget( myEdit );
  
-   QFrame* aFrame = new QFrame( this );
-   aFrame->setFrameStyle( QFrame::Box | QFrame::Sunken );
-   QPushButton* aCloseBtn = new QPushButton( tr( "GEOM_BUT_CLOSE" ), aFrame );
-   QPushButton* aHelpBtn = new QPushButton( tr( "GEOM_BUT_HELP" ), aFrame );
-   QHBoxLayout* aBtnLay = new QHBoxLayout( aFrame );
-   aBtnLay->setSpacing( SPACING );
-   aBtnLay->setMargin( MARGIN );
-   aBtnLay->addWidget( aCloseBtn );
-   aBtnLay->addSpacing( SPACING );
-   aBtnLay->addStretch();
-   aBtnLay->addWidget( aHelpBtn );
-   QVBoxLayout* aLay = new QVBoxLayout( this );
-   aLay->setSpacing( SPACING );
-   aLay->setMargin( MARGIN );
-   aLay->addWidget( aMainGrp );
-   aLay->addStretch();
-   aLay->addWidget( aFrame );
-   myHelpFileName = "free_faces_page.html";
+   QVBoxLayout* aLay = new QVBoxLayout (centralWidget());
+   aLay->setSpacing(SPACING);
+   aLay->setMargin(MARGIN);
+   aLay->addWidget(aMainGrp);
  
-   connect( aCloseBtn, SIGNAL( clicked() ), SLOT( onClose() ) );
-   connect( aHelpBtn,  SIGNAL( clicked() ), SLOT( onHelp() ) );
-   connect( mySelBtn,  SIGNAL( clicked() ),
-            this,      SLOT  ( onSetEditCurrentArgument() ) );
+   resize(minimumSizeHint());
    /***************************************************************/
  
+   myHelpFileName = "free_faces_page.html";
    Init();
  }
  
@@@ -146,92 -130,82 +130,82 @@@ RepairGUI_FreeFacesDlg::~RepairGUI_Free
  
  
  //=================================================================================
- // function : onClose
- // purpose  : SLOT. Called when "close" button pressed. Close dialog
+ // function : Init()
+ // purpose  :
  //=================================================================================
- void RepairGUI_FreeFacesDlg::onClose()
+ void RepairGUI_FreeFacesDlg::Init()
  {
-   globalSelection();
-   disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
-   myGeomGUI->SetActiveDialogBox( 0 );
-   reject();
-   erasePreview();
+   myObj = GEOM::GEOM_Object::_nil();
+   myEditCurrentArgument = myEdit;
+   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+   connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+           this, SLOT(SelectionIntoArgument()));
+   initName(tr("GEOM_FREE_FACES_NAME"));
+   buttonOk()->setEnabled(false);
+   buttonApply()->setEnabled(false);
+   activateSelection();
+   SelectionIntoArgument();
  }
  
  //=================================================================================
- // function : onHelp()
+ // function : ClickOnOk()
  // purpose  :
  //=================================================================================
- void RepairGUI_FreeFacesDlg::onHelp()
+ void RepairGUI_FreeFacesDlg::ClickOnOk()
  {
-   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( this, 
-                               tr( "WRN_WARNING" ),
-                               tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
-                               arg( app->resourceMgr()->stringValue( "ExternalBrowser", 
-                                                                     platform ) ).
-                               arg( myHelpFileName ) );
-   }
+   if (ClickOnApply())
+     ClickOnCancel();
  }
  
  //=================================================================================
- // function : onDeactivate
- // purpose  : Deactivate this dialog
+ // function : ClickOnApply()
+ // purpose  :
  //=================================================================================
void RepairGUI_FreeFacesDlg::onDeactivate()
bool RepairGUI_FreeFacesDlg::ClickOnApply()
  {
-   setEnabled( false );
-   globalSelection();
-   disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
-   myGeomGUI->SetActiveDialogBox( 0 );
+   if (!onAccept())
+     return false;
+   initName();
+   return true;
  }
  
  //=================================================================================
- // function : onActivate
- // purpose  : Activate this dialog
+ // function : ActivateThisDialog()
+ // purpose  :
  //=================================================================================
- void RepairGUI_FreeFacesDlg::onActivate()
+ void RepairGUI_FreeFacesDlg::ActivateThisDialog()
  {
-   myGeomGUI->EmitSignalDeactivateDialog();
-   setEnabled( true );
-   myGeomGUI->SetActiveDialogBox( this );
-   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 
-            SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) );
+   GEOMBase_Skeleton::ActivateThisDialog();
+   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+           this, SLOT(SelectionIntoArgument()));
    activateSelection();
+   displayPreview(true);
  }
  
  //=================================================================================
- // function : Init()
+ // function : enterEvent()
  // purpose  :
  //=================================================================================
- void RepairGUI_FreeFacesDlg::Init()
+ void RepairGUI_FreeFacesDlg::enterEvent(QEvent*)
  {
-   myObj = GEOM::GEOM_Object::_nil();
-   /* signals and slots connections */
-   connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT  ( onDeactivate() ) );
-   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 
-            SIGNAL( currentSelectionChanged() ), SLOT  ( onSelectionDone() ) );
-   activateSelection();
-   onSelectionDone();
+   if (!mainFrame()->GroupConstructors->isEnabled())
+     ActivateThisDialog();
  }
  
  //=================================================================================
- // function : onSelectionDone
+ // function : SelectionIntoArgument
  // purpose  : SLOT. Called when selection changed.
  //=================================================================================
- void RepairGUI_FreeFacesDlg::onSelectionDone()
+ void RepairGUI_FreeFacesDlg::SelectionIntoArgument()
  {
+   myEditCurrentArgument->setText("");
+   myObj = GEOM::GEOM_Object::_nil();
    erasePreview();
  
    LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
    aSelMgr->selectedObjects(aSelList);
  
    if ( aSelList.Extent() != 1 ) {
-     myEdit->setText( "" );
+     buttonOk()->setEnabled(false);
+     buttonApply()->setEnabled(false);
      return;
    }
  
      GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
  
    if ( !GEOMBase::IsShape( anObj ) ) {
-     myEdit->setText( "" );
+     buttonOk()->setEnabled(false);
+     buttonApply()->setEnabled(false);
      return;
-   }
-   else {
+   } else {
      myObj = anObj;
+     myEditCurrentArgument->setText(GEOMBase::GetName(myObj));
      displayPreview( true, false, true, true, 3 );
    }
  }
  
- //=================================================================================
- // function : enterEvent()
- // purpose  : Mouse enter onto the dialog to activate it
- //=================================================================================
- void RepairGUI_FreeFacesDlg::enterEvent( QEvent* )
- {
-   onActivate();
- }
  //=================================================================================
  // function : activateSelection
- // purpose  : activate selection of faces, shells, and solids
+ // purpose  : activate selection of solids
  //=================================================================================
  void RepairGUI_FreeFacesDlg::activateSelection()
  {
    globalSelection( aMap );
  }
  
- //=================================================================================
- // function : closeEvent()
- // purpose  :
- //=================================================================================
- void RepairGUI_FreeFacesDlg::closeEvent( QCloseEvent* )
- {
-   onClose();
- }
  //=================================================================================
  // function : createOperation
  // purpose  :
@@@ -316,11 -274,15 +274,15 @@@ bool RepairGUI_FreeFacesDlg::execute( O
    TopoDS_Shape aSelShape;
    TopoDS_Shape aFace; 
    TopTools_IndexedMapOfShape anIndices;
+   int aNbObj = 0;
    if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) {
      myEdit->setText( GEOMBase::GetName( myObj ) );
      QString aMess;
      if ( !isValid( aMess ) ) {
        erasePreview( true );
+       buttonOk()->setEnabled(false);
+       buttonApply()->setEnabled(false);
        return false;
      }
      
        }
        }
      }
-     
-     for ( int i = 0, n = aFaceLst->length(); i < n; i++ ) {
+     int i;
+     int n = aFaceLst->length();
+     for (i = 0; i < n; i++ ) {
        aFace = anIndices.FindKey( aFaceLst[i] );
        try {
          getDisplayer()->SetColor( Quantity_NOC_RED );
 -        getDisplayer()->SetToActivate( false );
        getDisplayer()->SetTransparency( transparency );
 +      getDisplayer()->SetWidth( 2 );
 +      getDisplayer()->SetNbIsos( 1 );
 +      getDisplayer()->SetIsosWidth( 1 );
 +      getDisplayer()->SetIsosColor( Quantity_NOC_RED );
 +      getDisplayer()->SetDisplayMode( 0 );
 +        getDisplayer()->SetToActivate( false );
          aPrs = !aFace.IsNull() ? getDisplayer()->BuildPrs( aFace ) : 0;
          if ( aPrs )
            displayPreview( aPrs, true );
        catch( const SALOME::SALOME_Exception& e )
        {
          SalomeApp_Tools::QtCatchCorbaException( e );
+         buttonOk()->setEnabled(false);
+         buttonApply()->setEnabled(false);
+         return false;
        }
      }
+     // Create sub-objects
+     GEOM::ListOfGO_var aList = anOper->MakeSubShapes(myObj, aFaceLst);
+     aNbObj = aList->length();
+     for (i = 0; i < aNbObj; i++) {
+       objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
+     }
+     aResult = true;
    }
+   buttonOk()->setEnabled(aNbObj > 0);
+   buttonApply()->setEnabled(aNbObj > 0);
    return aResult;
  }
  
@@@ -385,28 -363,12 +368,12 @@@ GEOM_Displayer* RepairGUI_FreeFacesDlg:
    return myDisplayer;
  }
  
- //=================================================================================
- // function : SetEditCurrentArgument
- // purpose  :
- //=================================================================================
- void RepairGUI_FreeFacesDlg::onSetEditCurrentArgument()
- {
-   myEdit->setFocus();
-   onSelectionDone();
- }
- //=================================================================================
- // function : keyPressEvent()
- // purpose  :
- //=================================================================================
- void RepairGUI_FreeFacesDlg::keyPressEvent( QKeyEvent* e )
+ //================================================================
+ // Function : getFather
+ // Purpose  : Get father object for object to be added in study
+ //            (called with addInStudy method)
+ //================================================================
+ GEOM::GEOM_Object_ptr RepairGUI_FreeFacesDlg::getFather (GEOM::GEOM_Object_ptr)
  {
-   QDialog::keyPressEvent( e );
-   if ( e->isAccepted() )
-     return;
-   if ( e->key() == Qt::Key_F1 ) {
-     e->accept();
-     onHelp();
-   }
+   return myObj;
  }
index 03a225eba77c3e57c30226d487af9771d29a23bc,debad4f6a84885a182c14377d6ad9c730cf7f5e8..3dcadf2a55ca9737876da37037ce0229658f44ee
@@@ -30,7 -30,6 +30,7 @@@
  #include <GeometryGUI.h>
  #include <GEOMBase.h>
  #include <SalomeApp_DoubleSpinBox.h>
 +#include "utilities.h"
  
  #include <SalomeApp_Application.h>
  #include <SalomeApp_Study.h>
@@@ -92,7 -91,7 +92,7 @@@ RepairGUI_GlueDlg::RepairGUI_GlueDlg(Ge
  
    GroupPoints = new DlgRef_1SelExt(centralWidget());
    GroupPoints->GroupBox1->setTitle(tr("GEOM_GLUE"));
-   GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE"));
+   GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPES"));
    GroupPoints->PushButton1->setIcon(image0);
    GroupPoints->LineEdit1->setReadOnly(true);
  
  
    GroupPoints2 = new DlgRef_1SelExt(centralWidget());
    GroupPoints2->GroupBox1->setTitle(tr("GEOM_GLUE"));
-   GroupPoints2->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE"));
+   GroupPoints2->TextLabel1->setText(tr("GEOM_SELECTED_SHAPES"));
    GroupPoints2->PushButton1->setIcon(image0);
    GroupPoints2->LineEdit1->setReadOnly(true);
  
@@@ -192,7 -191,7 +192,7 @@@ void RepairGUI_GlueDlg::Init(
    /* init variables */
    myEditCurrentArgument = GroupPoints->LineEdit1;
  
-   myObject = GEOM::GEOM_Object::_nil();
+   myObjects.clear();
  
    //myGeomGUI->SetState(0);
    //globalSelection(GEOM_COMPOUND);
@@@ -331,17 -330,13 +331,13 @@@ void RepairGUI_GlueDlg::SelectionIntoAr
  
    erasePreview();
    myEditCurrentArgument->setText("");
-   myObject = GEOM::GEOM_Object::_nil();
+   myObjects.clear();
  
-   LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
-   SALOME_ListIO aSelList;
-   aSelMgr->selectedObjects(aSelList);
+   myObjects = getSelected( TopAbs_SHAPE, -1 );
  
-   if (aSelList.Extent() == 1) {
-     Handle(SALOME_InteractiveObject) anIO = aSelList.First();
-     myObject = GEOMBase::ConvertIOinGEOMObject(anIO);
-     if (!CORBA::is_nil(myObject))
-       myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
+   if ( !myObjects.isEmpty() ) {
+     QString aName = myObjects.count() > 1 ? QString( "%1_objects").arg( myObjects.count() ) : GEOMBase::GetName( myObjects[0].get() );
+     myEditCurrentArgument->setText( aName );
    }
    updateButtonState();
  }
@@@ -433,7 -428,7 +429,7 @@@ bool RepairGUI_GlueDlg::isValid(QString
      ok = myTolEdt2->isValid(msg, !IsPreview());
      break;
    }
-   return !myObject->_is_nil() && (IsPreview() || v > 0.) && ok;
+   return !myObjects.isEmpty() && (IsPreview() || v > 0.) && ok;
  }
  
  //=================================================================================
@@@ -445,15 -440,20 +441,20 @@@ bool RepairGUI_GlueDlg::execute(ObjectL
    bool aResult = false;
    objects.clear();
  
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( myObjects.count() );
+   for ( int i = 0; i < myObjects.count(); ++i )
+     objList[i] = myObjects[i].copy();
    GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
    switch (getConstructorId()) {
    case 0:
      {
        GEOM::GEOM_Object_var anObj;
        if (myGlueMode == TopAbs_FACE)
-         anObj = anOper->MakeGlueFaces(myObject, myTolEdt->value(), true);
+         anObj = anOper->MakeGlueFaces( objList, myTolEdt->value(), true);
        else if (myGlueMode == TopAbs_EDGE)
-         anObj = anOper->MakeGlueEdges(myObject, myTolEdt->value());
+         anObj = anOper->MakeGlueEdges( objList, myTolEdt->value());
  
        aResult = !anObj->_is_nil();
        if (aResult && !IsPreview())
        GEOM::GEOM_Object_var anObj;
        if (myGlueMode == TopAbs_FACE) {
          bool doGlueAllEdges = myGlueAllEdgesChk->isChecked();
-         anObj = anOper->MakeGlueFacesByList(myObject, myTolEdt2->value(), aListForGlue.in(),
+         anObj = anOper->MakeGlueFacesByList( objList, myTolEdt2->value(), aListForGlue.in(),
                                              true, doGlueAllEdges);
        }
        else if (myGlueMode == TopAbs_EDGE)
-         anObj = anOper->MakeGlueEdgesByList(myObject, myTolEdt2->value(), aListForGlue.in());
+         anObj = anOper->MakeGlueEdgesByList( objList, myTolEdt2->value(), aListForGlue.in());
  
        aResult = !anObj->_is_nil();
  
@@@ -694,12 -694,17 +695,17 @@@ void RepairGUI_GlueDlg::onDetect(
    buttonApply()->setEnabled(false);
    globalSelection(GEOM_ALLSHAPES);
  
+   GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+   objList->length( myObjects.count() );
+   for ( int i = 0; i < myObjects.count(); ++i )
+     objList[i] = myObjects[i].copy();
    GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
    GEOM::ListOfGO_var aList;
    if (myGlueMode == TopAbs_FACE)
-     aList = anOper->GetGlueFaces(myObject.in(), myTolEdt2->value());
+     aList = anOper->GetGlueFaces( objList, myTolEdt2->value());
    else if (myGlueMode == TopAbs_EDGE)
-     aList = anOper->GetGlueEdges(myObject.in(), myTolEdt2->value());
+     aList = anOper->GetGlueEdges( objList, myTolEdt2->value());
  
    for (int i = 0, n = aList->length(); i < n; i++)
      myTmpObjs << GEOM::GeomObjPtr(aList[i].in());
  
    connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
            this, SLOT(SelectionIntoArgument())) ;
-   SUIT_MessageBox::information(this, tr("GEOM_FREE_BOUNDS_TLT"), msg, tr("Close"));
+   if ( myGlueMode == TopAbs_FACE )
+     SUIT_MessageBox::information(this, tr("GEOM_GLUE_FACES_DETECT_TITLE"), msg, tr("Close"));
+   else
+     SUIT_MessageBox::information(this, tr("GEOM_GLUE_EDGES_DETECT_TITLE"), msg, tr("Close"));
    updateButtonState();
    activateSelection();
  }
@@@ -740,7 -748,7 +749,7 @@@ void RepairGUI_GlueDlg::activateSelecti
                  this, SLOT(SelectionIntoArgument()));
  
      globalSelection(GEOM_ALLSHAPES);
-     if (myObject->_is_nil())
+     if ( myObjects.isEmpty() )
        SelectionIntoArgument();
  
      connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
  void RepairGUI_GlueDlg::updateButtonState()
  {
    int anId = getConstructorId();
-   bool hasMainObj = !myObject->_is_nil();
+   bool hasMainObj = !myObjects.isEmpty();
    if (anId == 0) {
      buttonOk()->setEnabled(hasMainObj);
      buttonApply()->setEnabled(hasMainObj);
index 0a59f03131800b0653fed7ccb51e543170f3f7dd,0b447d106757ac6566f67591dcd5ba74c366aafd..dc5e3fa097408ae1aee1bd79be3fc6e3270c6af6
  
  #include "RepairGUI_LimitToleranceDlg.h"
  
- #include <DlgRef.h>
- #include <GeometryGUI.h>
- #include <GEOMBase.h>
- #include <SalomeApp_DoubleSpinBox.h>
- #include "utilities.h"
+ #include "DlgRef.h"
+ #include "GeometryGUI.h"
+ #include "GEOMBase.h"
+ #include "RepairGUI.h"
  
+ #include <SalomeApp_DoubleSpinBox.h>
  #include <SalomeApp_Application.h>
  #include <LightApp_SelectionMgr.h>
  #include <SalomeApp_Study.h>
@@@ -304,6 -304,8 +304,8 @@@ bool RepairGUI_LimitToleranceDlg::execu
      QStringList aParameters;
      aParameters << myTolEdt->text();
      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+     if ( !IsPreview() )
+       RepairGUI::ShowStatistics( anOper, this );
      objects.push_back(anObj._retn());
    }
  
@@@ -325,7 -327,7 +327,6 @@@ bool RepairGUI_LimitToleranceDlg::onAcc
  
    bool aLocked = aStudy->GetProperties()->IsLocked();
    if (aLocked) {
--    MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked");
      SUIT_MessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_STUDY_LOCKED"), tr("BUT_OK"));
      return false;
    }
index 7a67d1b437599e95fc14c69019c8611bb0543201,dc32f058e203615d502b65b65fd98d5a447a1fad..6d9f4dcc0489ed722acbef7562e5a79370860f03
  
  #include "RepairGUI_ShapeProcessDlg.h"
  
- #include <DlgRef.h>
- #include <GeometryGUI.h>
- #include <GEOMBase.h>
- #include <GEOMImpl_Types.hxx>
+ #include "DlgRef.h"
+ #include "GeometryGUI.h"
+ #include "GEOMBase.h"
+ #include "GEOMImpl_Types.hxx"
+ #include "RepairGUI.h"
  
  #include <SalomeApp_Application.h>
  #include <SalomeApp_DoubleSpinBox.h>
@@@ -41,7 -42,6 +42,7 @@@
  #include <SALOME_ListIO.hxx>
  
  #include <Basics_Utils.hxx>
 +#include "utilities.h"
  
  #include <TCollection_AsciiString.hxx>
  #include <TColStd_MapOfInteger.hxx>
@@@ -83,33 -83,38 +84,38 @@@ void RepairGUI_ShapeProcessDlg::init(
    initParamsValues();
    initSelection();
          
-   setWindowTitle( tr( "GEOM_SHAPEPROCESS_TITLE" ) );
+   setWindowTitle( tr( "GEOM_SHAPEPROCESS_TITLE" ));
  
    mainFrame()->GroupConstructors->hide();
    
    // select widget on the top 
    mySelectWdgt = new DlgRef_1Sel( centralWidget() );
-   mySelectWdgt->GroupBox1->setTitle( tr( "GEOM_SHAPE" ) );
-   mySelectWdgt->TextLabel1->setText( tr( "GEOM_SELECTED_OBJECTS" ) );
-   mySelectWdgt->PushButton1->setIcon( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
+   mySelectWdgt->GroupBox1->setTitle( tr( "GEOM_SHAPE" ));
+   mySelectWdgt->TextLabel1->setText( tr( "GEOM_SELECTED_OBJECTS" ));
+   mySelectWdgt->PushButton1->setIcon( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" )));
    mySelectWdgt->LineEdit1->setReadOnly( true );
  
    // layout the two group boxes in the middle, add a list of operations
    QGroupBox* anOperGr = new QGroupBox( tr( "GEOM_OPERATIONS" ), centralWidget() );
  
+   // "select all" button
+   mySelectAll = new QCheckBox( tr( "SELECT_ALL" ), anOperGr );
+   mySelectAll->setTristate( true );
+   
    // operations list widget
    myOpList = new QListWidget( anOperGr );
    myOpList->setSortingEnabled( false );
-   myOpList->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+   myOpList->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ));
  
    QVBoxLayout* aOperLay = new QVBoxLayout( anOperGr );
    aOperLay->setMargin( 9 );
+   aOperLay->addWidget( mySelectAll );
    aOperLay->addWidget( myOpList );
  
    QGroupBox* aParamsGr = new QGroupBox( tr( "GEOM_PARAMETERS" ), centralWidget() );
  
    // add a widget stack to the parameters group box
-   QStackedLayout* aStack = new QStackedLayout( aParamsGr );
+   myStack = new QStackedLayout( aParamsGr );
  
    // continueties values..
    QStringList aContinueties = QString( "C0,G1,C1,G2,C2,C3,CN" ).split( "," );
        aLay->addWidget( myFixFaceSizeTol, 0, 1 );
        aLay->setRowStretch( aLay->rowCount(), 5 );
      }
+     else if ( myOpLst[i] == "DropSmallSolids" ) {
+       // DropSmallSolids
+       w = new QWidget( aParamsGr );
+       QGridLayout* aLay = new QGridLayout( w );
+       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
+       myDropSmallSolidsWidChk = new QCheckBox( tr("WIDTH_FACTOR_TOL"), w );
+       myDropSmallSolidsVolChk = new QCheckBox( tr("VOLUME_TOL"), w );
+       myDropSmallSolidsWidTol = new SalomeApp_DoubleSpinBox( w );
+       myDropSmallSolidsVolTol = new SalomeApp_DoubleSpinBox( w );
+       initSpinBox( myDropSmallSolidsWidTol, 0., 1e3, 1., "len_tol_precision" );
+       initSpinBox( myDropSmallSolidsVolTol, 0., 1e9, 1., "len_tol_precision" );
+       myDropSmallSolidsWidTol->setValue( 1 );
+       myDropSmallSolidsVolTol->setValue( 1e3 );
+       myDropSmallSolidsVolChk->setChecked( true );
+       myDropSmallSolidsWidTol->setEnabled( false );
+       myDropSmallSolidsMergeChk = new QCheckBox( tr("TO_MERGE_SOLIDS"), w );
+   
+       aLay->addWidget( myDropSmallSolidsWidChk, 0, 0 );
+       aLay->addWidget( myDropSmallSolidsWidTol, 0, 1 );
+       aLay->addWidget( myDropSmallSolidsVolChk, 1, 0 );
+       aLay->addWidget( myDropSmallSolidsVolTol, 1, 1 );
+       aLay->addWidget( myDropSmallSolidsMergeChk, 2, 0, 1, 2 );
+       aLay->setRowStretch( aLay->rowCount(), 5 );
+     }
      else if ( myOpLst[i] == "DropSmallEdges" ) {
        // DropSmallEdges
        w = new QWidget( aParamsGr );
  
        myBSplineDegree = new SalomeApp_IntSpinBox( w );
        myBSplineSegments = new SalomeApp_IntSpinBox( w );
+       initSpinBox( myBSplineSegments, 1, 1000, 1);      
        myBSpline2DCont = new QComboBox( w );
        myBSpline2DCont->addItems( aContinueties );
        myBSpline3DCont = new QComboBox( w );
      else {
        w = new QWidget( aParamsGr ); // dumb widget
      }
-     aStack->insertWidget( i, w );
+     myStack->insertWidget( i, w );
    }
  
    QGridLayout* layout = new QGridLayout( centralWidget() );
    layout->addWidget( aParamsGr,    1, 1 );
  
    // signals and slots connections
-   connect( buttonOk(),    SIGNAL( clicked() ), this, SLOT( onOk() ) );
-   connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) );
+   connect( buttonOk(),    SIGNAL( clicked() ), this, SLOT( onOk() ));
+   connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ));
  
-   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
-            SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) );
+   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ))->selectionMgr(),
+            SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ));
  
-   connect( mySelectWdgt->PushButton1, SIGNAL( clicked() ),       this, SLOT( selectClicked() ) );
-   connect( mySelectWdgt->LineEdit1,   SIGNAL( returnPressed() ), this, SLOT( lineEditReturnPressed() ) );
+   connect( mySelectWdgt->PushButton1, SIGNAL( clicked() ),       this, SLOT( selectClicked() ));
+   connect( mySelectWdgt->LineEdit1,   SIGNAL( returnPressed() ), this, SLOT( lineEditReturnPressed() ));
  
-   connect( myToBezierSurfModeChk,     SIGNAL( toggled( bool ) ), this, SLOT( advOptionToggled( bool ) ) );
+   connect( myToBezierSurfModeChk,     SIGNAL( toggled( bool )), this, SLOT( advOptionToggled( bool )));
+   connect( myDropSmallSolidsWidChk,   SIGNAL( toggled( bool )), this, SLOT( advOptionToggled( bool )));
+   connect( myDropSmallSolidsVolChk,   SIGNAL( toggled( bool )), this, SLOT( advOptionToggled( bool )));
  
-   connect( myOpList, SIGNAL( currentRowChanged( int ) ), aStack, SLOT( setCurrentIndex( int ) ) );
+   connect( myOpList, SIGNAL( currentRowChanged( int )),      myStack, SLOT( setCurrentIndex( int )));
+   connect( myOpList, SIGNAL( itemChanged( QListWidgetItem* )),  this, SLOT( operatorChecked( QListWidgetItem* )));
+   connect( mySelectAll, SIGNAL( stateChanged( int ) ), this, SLOT( onSelectAll( int )));
  
    adjustSize();
    loadDefaults(); // init dialog fields with values from resource file
    //myOpList->setCurrentRow( myOpList->findItem( 0 );
    reset();
  
-   initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ) );
+   myStack->setCurrentIndex( 0 );
+   initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ));
    selectionChanged();
+   updateSelectAll();
  }
  
  //=================================================================================
@@@ -373,14 -412,14 +413,14 @@@ void RepairGUI_ShapeProcessDlg::selecti
    myObjects->length(aSelList.Extent());
    for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) {
      GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value() );
-     if ( !CORBA::is_nil( aSelectedObject ) )
+     if ( !CORBA::is_nil( aSelectedObject ))
        myObjects[i++] = aSelectedObject;
    }
    myObjects->length( i );
    if ( i == 1 )
-     mySelectWdgt->LineEdit1->setText( GEOMBase::GetName( myObjects[0] ) );
+     mySelectWdgt->LineEdit1->setText( GEOMBase::GetName( myObjects[0] ));
    else if ( i > 0 )
-     mySelectWdgt->LineEdit1->setText( QString::number( i ) + "_" + tr( "GEOM_OBJECTS" ) );
+     mySelectWdgt->LineEdit1->setText( QString::number( i ) + "_" + tr( "GEOM_OBJECTS" ));
  }
  
  
@@@ -413,8 -452,8 +453,8 @@@ void RepairGUI_ShapeProcessDlg::lineEdi
  void RepairGUI_ShapeProcessDlg::activate()
  {
    GEOMBase_Skeleton::ActivateThisDialog();
-   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ))->selectionMgr(),
-            SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) );
+   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( )))->selectionMgr(),
+            SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ));
          
    reset();
    //myGeomGUI->SetState( 0 );
@@@ -451,7 -490,7 +491,7 @@@ void RepairGUI_ShapeProcessDlg::reset(
  //=================================================================================
  const char* get_convert( const char* theParam, const QString& theValue )
  {
-   if ( !strcmp( theParam, "SplitAngle.Angle" ) ) {
+   if ( !strcmp( theParam, "SplitAngle.Angle" )) {
      double doubleValue = theValue.toDouble() * M_PI / 180.;
      return CORBA::string_dup( QString::number( doubleValue ).toLatin1().constData() );
    }
  //=================================================================================
  QString set_convert( const char* theParam, const char* theValue )
  {
-   if ( !strcmp( theParam, "SplitAngle.Angle" ) ) {
+   if ( !strcmp( theParam, "SplitAngle.Angle" )) {
      Kernel_Utils::Localizer loc;
      double doubleValue = atof( theValue ) * 180. / M_PI;
      return QString::number( doubleValue );
@@@ -502,7 -541,7 +542,7 @@@ void RepairGUI_ShapeProcessDlg::loadDef
  
      for ( int j = 0; j < aParams->length(); j++ ) {
        QWidget* aCtrl = getControl( (const char*)aParams[j] );
-       setValue( aCtrl, set_convert( (const char*)aParams[j], aValues[j] ) );
+       setValue( aCtrl, set_convert( (const char*)aParams[j], aValues[j] ));
      }
    }
  }
  void RepairGUI_ShapeProcessDlg::setValue( QWidget* theControl, const QString& theValue )
  {
    if ( theControl && !theValue.isNull() ) {
-     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl ) )
+     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl ))
        qobject_cast<SalomeApp_DoubleSpinBox*>( theControl )->setValue( theValue.toDouble() );
-     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl ) )
+     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl ))
        qobject_cast<SalomeApp_IntSpinBox*>( theControl )->setValue( theValue.toInt() );
-     else if ( qobject_cast<QComboBox*>( theControl ) )
+     else if ( qobject_cast<QComboBox*>( theControl ))
        qobject_cast<QComboBox*>( theControl )->setEditText( theValue );
-     else if ( qobject_cast<QCheckBox*>( theControl ) )
+     else if ( qobject_cast<QCheckBox*>( theControl ))
        qobject_cast<QCheckBox*>( theControl )->setChecked( theValue.toInt() != 0 );
    }
  }
  QString RepairGUI_ShapeProcessDlg::getValue( QWidget* theControl ) const
  {
    if ( theControl ) {
-     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl ) )
+     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl )) {
+       if ( ( theControl == myDropSmallSolidsWidTol || theControl == myDropSmallSolidsVolTol ) && !theControl->isEnabled() ) {
+         // VSR: stupid workaround about ShapeProcessAPI:
+         // specific processing for optional parameters of DropSmallSolids operator
+         return QString::number( Precision::Infinite() );
+       }
        return QString::number( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl )->value() );
-     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl ) )
+     }
+     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl )) {
        return QString::number( qobject_cast<SalomeApp_IntSpinBox*>( theControl )->value() );
-     else if ( qobject_cast<QComboBox*>( theControl ) )
+     }
+     else if ( qobject_cast<QComboBox*>( theControl )) {
        return qobject_cast<QComboBox*>( theControl )->currentText();
-     else if ( qobject_cast<QCheckBox*>( theControl ) )
+     }
+     else if ( qobject_cast<QCheckBox*>( theControl )) {
        return qobject_cast<QCheckBox*>( theControl )->isChecked() ? "1" : "0";
+     }
    }   
    return 0;
  }
  QString RepairGUI_ShapeProcessDlg::getText( QWidget* theControl ) const
  {
    if ( theControl ) {
-     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl ) )
+     if ( qobject_cast<SalomeApp_DoubleSpinBox*>( theControl ))
        return qobject_cast<SalomeApp_DoubleSpinBox*>( theControl )->text();
-     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl ) )
+     else if ( qobject_cast<SalomeApp_IntSpinBox*>( theControl ))
        return qobject_cast<SalomeApp_IntSpinBox*>( theControl )->text();
    }   
    return QString::null;
@@@ -583,9 -631,10 +632,10 @@@ bool RepairGUI_ShapeProcessDlg::isValid
      while( aListIter.hasNext() ) {
        const QString& aParam = aListIter.next();
        QWidget* aControl = getControl( aParam );
-       if ( qobject_cast<SalomeApp_DoubleSpinBox*>( aControl ) )
+       if ( !aControl->isEnabled() ) continue;
+       if ( qobject_cast<SalomeApp_DoubleSpinBox*>( aControl ))
          ok = qobject_cast<SalomeApp_DoubleSpinBox*>( aControl )->isValid( msg, !IsPreview() ) && ok;
-       else if ( qobject_cast<SalomeApp_IntSpinBox*>( aControl ) )
+       else if ( qobject_cast<SalomeApp_IntSpinBox*>( aControl ))
          ok = qobject_cast<SalomeApp_IntSpinBox*>( aControl )->isValid( msg, !IsPreview() ) && ok;
      }
    }
@@@ -653,6 -702,8 +703,8 @@@ bool RepairGUI_ShapeProcessDlg::execute
  
          aParameters << getTexts( aParams );
          anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+         RepairGUI::ShowStatistics( anOper, this );
        }
        objects.push_back( anObj._retn() );
      }
  GEOM::string_array* RepairGUI_ShapeProcessDlg::getActiveOperators()
  {
    GEOM::string_array_var anOperators = new GEOM::string_array();
-   QStringList aCheckedList;
  
-   for ( int i = 0; i < myOpList->count(); i++ ) {
+   int j = 0, n = myOpList->count();
+   anOperators->length( n );
+   for ( int i = 0; i < n; i++ ) {
      if ( myOpList->item( i )->checkState() == Qt::Checked )
-       aCheckedList << myOpList->item( i )->text();
+       anOperators[j++] = myOpList->item( i )->text().toLatin1().constData();
    }
-   anOperators->length( aCheckedList.count() );
-   for ( int i = 0; i < aCheckedList.count(); i++ )
-     anOperators[i] = aCheckedList[i].toLatin1().constData();
+   anOperators->length( j );
  
    return anOperators._retn();
  }
@@@ -697,6 -745,9 +746,9 @@@ QWidget* RepairGUI_ShapeProcessDlg::get
    else if ( theParam == "SplitClosedFaces.NbSplitPoints" )        return mySplitClosedFacesNum;
    else if ( theParam == "FixFaceSize.Tolerance" )                 return myFixFaceSizeTol;
    else if ( theParam == "DropSmallEdges.Tolerance3d" )            return myDropSmallEdgesTol3D;
+   else if ( theParam == "DropSmallSolids.WidthFactorThreshold" )  return myDropSmallSolidsWidTol;
+   else if ( theParam == "DropSmallSolids.VolumeThreshold" )       return myDropSmallSolidsVolTol;
+   else if ( theParam == "DropSmallSolids.MergeSolids" )           return myDropSmallSolidsMergeChk;
    else if ( theParam == "BSplineRestriction.SurfaceMode" )        return myBSplineSurfModeChk;
    else if ( theParam == "BSplineRestriction.Curve3dMode" )        return myBSpline3DCurveChk;
    else if ( theParam == "BSplineRestriction.Curve2dMode" )        return myBSpline2DCurveChk;
@@@ -738,6 -789,11 +790,11 @@@ void RepairGUI_ShapeProcessDlg::initPar
    myOpLst << "DropSmallEdges";
    myValMap["DropSmallEdges"] << "DropSmallEdges.Tolerance3d";
  
+   myOpLst << "DropSmallSolids";
+   myValMap["DropSmallSolids"] << "DropSmallSolids.WidthFactorThreshold";
+   myValMap["DropSmallSolids"] << "DropSmallSolids.VolumeThreshold";
+   myValMap["DropSmallSolids"] << "DropSmallSolids.MergeSolids";
    myOpLst << "SplitAngle";
    myValMap["SplitAngle"] << "SplitAngle.Angle";
    myValMap["SplitAngle"] << "SplitAngle.MaxTolerance";
@@@ -782,18 -838,21 +839,21 @@@ GEOM::string_array* RepairGUI_ShapeProc
  
    // calculate the length of parameters
    for ( i = 0, j = 0; i < theOperators.length(); i++ )
-     j += myValMap[ QString( theOperators[i] ) ].size();
+     j += myValMap[ QString( theOperators[i].in() ) ].size();
    
    // set the new length of paremeters
    aParams->length( j );
  
    // fill the parameters
    for ( i = 0, j = 0; i < theOperators.length(); i++ ) {
-     QStringList aValLst = myValMap[ QString( theOperators[i] ) ];
-     for ( QStringList::Iterator it = aValLst.begin(); it != aValLst.end(); ++it )
-       aParams[j++] = CORBA::string_dup( (*it).toLatin1().constData() );
+     QStringList aParamLst = myValMap[ QString( theOperators[i].in() ) ];
+     foreach ( QString aParam, aParamLst ) {
+       aParams[j++] = CORBA::string_dup( aParam.toLatin1().constData() );
+     }
    }
  
+   aParams->length( j );
    return aParams._retn();
  }
  
@@@ -806,13 -865,13 +866,13 @@@ GEOM::string_array* RepairGUI_ShapeProc
  {
    GEOM::string_array_var aValues = new GEOM::string_array();
    aValues->length( theParams.length() );
-     
    for ( int i = 0; i < theParams.length(); i++ ) {
      QWidget* aCtrl = getControl( (const char*)theParams[i] );
      if ( aCtrl )
-       aValues[i] = get_convert( (const char*)theParams[i], getValue( aCtrl ) );
+       aValues[i] = get_convert( (const char*)theParams[i], getValue( aCtrl ));
    }
-     
    return aValues._retn();
  }
  
@@@ -861,9 -920,71 +921,71 @@@ void RepairGUI_ShapeProcessDlg::initSel
  void RepairGUI_ShapeProcessDlg::advOptionToggled( bool on )
  {
    QAbstractButton* btn = (QAbstractButton*)sender();
-   if ( on && btn->isCheckable() &&
-        SUIT_MessageBox::warning( this,
-                                  tr( "GEOM_WRN_WARNING" ), tr( "TIME_CONSUMING" ),
-                                  SUIT_MessageBox::Yes | SUIT_MessageBox::No ) == SUIT_MessageBox::No )
-     btn->toggle();
+   if ( btn == myToBezierSurfModeChk )
+   {
+     if ( on && btn->isCheckable() &&
+          SUIT_MessageBox::warning( this,
+                                    tr( "GEOM_WRN_WARNING" ), tr( "TIME_CONSUMING" ),
+                                    SUIT_MessageBox::Yes | SUIT_MessageBox::No ) == SUIT_MessageBox::No )
+       btn->toggle();
+   }
+   // either myDropSmallSolidsWidChk or myDropSmallSolidsVolChk must be checked
+   if ( btn == myDropSmallSolidsWidChk )
+   {
+     myDropSmallSolidsWidTol->setEnabled( on );
+     if ( !on ) {
+       myDropSmallSolidsVolChk->setChecked( true );
+       myDropSmallSolidsVolTol->setEnabled( true );
+     }
+   }
+   if ( btn == myDropSmallSolidsVolChk )
+   {
+     myDropSmallSolidsVolTol->setEnabled( on );
+     if ( !on ) {
+       myDropSmallSolidsWidChk->setChecked( true );
+       myDropSmallSolidsWidTol->setEnabled( true );
+     }
+   }
+ }
+ //=======================================================================
+ //function : operatorChecked
+ //purpose  : show parameters of a selected operator
+ //=======================================================================
+ void RepairGUI_ShapeProcessDlg::operatorChecked( QListWidgetItem * item )
+ {
+   if ( item && item->checkState() == Qt::Checked )
+   {
+     myStack->setCurrentIndex( myOpList->row( item ));
+   }
+   updateSelectAll();
+ }
+ void RepairGUI_ShapeProcessDlg::updateSelectAll()
+ {
+   Qt::CheckState state = myOpList->count() > 0 ? myOpList->item(0)->checkState() : Qt::Unchecked;
+   for ( int i = 1; i < myOpList->count(); i++ ) {
+     if ( myOpList->item(i)->checkState() != state ) {
+       state = Qt::PartiallyChecked;
+       break;
+     }
+   }
+   mySelectAll->blockSignals( true );
+   mySelectAll->setCheckState( state );
+   mySelectAll->blockSignals( false );
+ }
+ void RepairGUI_ShapeProcessDlg::onSelectAll( int state )
+ {
+   if ( state == Qt::PartiallyChecked ) { 
+     mySelectAll->setCheckState( Qt::Checked );
+     return;
+   }
+   myOpList->blockSignals( true );
+   for ( int i = 0; i < myOpList->count(); i++ ) {
+     myOpList->item(i)->setCheckState( (Qt::CheckState)state  );
+   }
+   myOpList->blockSignals( false );
  }