Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
authorArtem Zhidkov <Artem.Zhidkov@gmail.com>
Mon, 13 Jul 2020 08:45:27 +0000 (11:45 +0300)
committerArtem Zhidkov <Artem.Zhidkov@gmail.com>
Mon, 13 Jul 2020 10:55:43 +0000 (13:55 +0300)
# Conflicts:
# doc/gui/General/Introduction.rst
# src/FeaturesPlugin/CMakeLists.txt
# src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp
# src/Model/Model_AttributeSelection.cpp
# src/Model/Model_Document.cpp
# src/Model/Model_Objects.cpp
# src/Model/Model_ResultConstruction.cpp
# src/Model/Model_ResultPart.cpp
# src/ModelAPI/ModelAPI_Events.h
# src/ModelHighAPI/ModelHighAPI_Tools.cpp
# src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
# src/PartSet/PartSet_MenuMgr.cpp
# src/PartSet/PartSet_Module.cpp
# src/PartSet/PartSet_SketcherMgr.cpp
# src/Selector/Selector_Algo.h
# src/Selector/Selector_Intersect.cpp
# src/Selector/Selector_Modify.cpp
# src/Selector/Selector_Primitive.cpp
# src/Selector/Selector_WeakName.cpp
# src/SketchAPI/SketchAPI_Sketch.cpp
# src/SketchPlugin/SketchPlugin_Projection.cpp
# src/SketchPlugin/SketchPlugin_Tools.cpp
# src/SketchPlugin/SketchPlugin_Validators.cpp
# src/SketchPlugin/SketchPlugin_msg_en.ts
# src/XGUI/XGUI_OperationMgr.cpp
# src/XGUI/XGUI_Selection.cpp

161 files changed:
1  2 
CMakeLists.txt
doc/gui/General/Introduction.rst
src/CollectionPlugin/CollectionPlugin_Group.cpp
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
src/Events/CMakeLists.txt
src/Events/Events.i
src/Events/Events_InfoMessage.cpp
src/Events/Events_InfoMessage.h
src/ExchangePlugin/CMakeLists.txt
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ExportPart.cpp
src/ExchangePlugin/ExchangePlugin_Import.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportPart.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.h
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.h
src/FeaturesPlugin/FeaturesPlugin_Copy.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/InitializationPlugin/InitializationPlugin_Plugin.cpp
src/InitializationPlugin/InitializationPlugin_Plugin.h
src/Model/CMakeLists.txt
src/Model/Model_Application.cpp
src/Model/Model_Application.h
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_AttributeSelectionList.h
src/Model/Model_BodyBuilder.cpp
src/Model/Model_Data.cpp
src/Model/Model_Data.h
src/Model/Model_Document.cpp
src/Model/Model_Document.h
src/Model/Model_Objects.cpp
src/Model/Model_Objects.h
src/Model/Model_ResultConstruction.cpp
src/Model/Model_ResultField.cpp
src/Model/Model_ResultField.h
src/Model/Model_ResultPart.cpp
src/Model/Model_ResultPart.h
src/Model/Model_Session.cpp
src/Model/Model_Session.h
src/Model/Model_Update.cpp
src/ModelAPI/CMakeLists.txt
src/ModelAPI/ModelAPI.i
src/ModelAPI/ModelAPI_AttributeSelection.h
src/ModelAPI/ModelAPI_AttributeSelectionList.h
src/ModelAPI/ModelAPI_Data.h
src/ModelAPI/ModelAPI_Document.h
src/ModelAPI/ModelAPI_Events.cpp
src/ModelAPI/ModelAPI_Events.h
src/ModelAPI/ModelAPI_Feature.h
src/ModelAPI/ModelAPI_Folder.h
src/ModelAPI/ModelAPI_Object.h
src/ModelAPI/ModelAPI_ResultField.h
src/ModelAPI/ModelAPI_ResultPart.h
src/ModelAPI/ModelAPI_Session.h
src/ModelAPI/ModelAPI_Tools.cpp
src/ModelAPI/ModelAPI_Tools.h
src/ModelHighAPI/CMakeLists.txt
src/ModelHighAPI/ModelHighAPI.i
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.h
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/ModelHighAPI/ModelHighAPI_Folder.cpp
src/ModelHighAPI/ModelHighAPI_Folder.h
src/ModelHighAPI/ModelHighAPI_Interface.cpp
src/ModelHighAPI/ModelHighAPI_Interface.h
src/ModelHighAPI/ModelHighAPI_Selection.cpp
src/ModelHighAPI/ModelHighAPI_Selection.h
src/ModelHighAPI/ModelHighAPI_Services.cpp
src/ModelHighAPI/ModelHighAPI_Services.h
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_Tools.h
src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp
src/ModuleBase/ModuleBase_WidgetFeatureSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetNameEdit.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ParametersPlugin/CMakeLists.txt
src/ParametersPlugin/ParametersPlugin_EvalListener.cpp
src/ParametersPlugin/ParametersPlugin_Parameter.cpp
src/ParametersPlugin/ParametersPlugin_Validators.cpp
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_OverconstraintListener.cpp
src/PartSet/PartSet_OverconstraintListener.h
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherReentrantMgr.cpp
src/PartSet/PartSet_SketcherReentrantMgr.h
src/PartSet/PartSet_TreeNodes.cpp
src/PartSet/PartSet_Validators.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchCreator.h
src/PrimitivesAPI/PrimitivesAPI_Cone.cpp
src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp
src/PrimitivesAPI/PrimitivesAPI_Sphere.cpp
src/PrimitivesAPI/PrimitivesAPI_Torus.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Cone.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Sphere.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Torus.cpp
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI.h
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp
src/SHAPERGUI/SHAPERGUI_SalomeViewer.h
src/Selector/CMakeLists.txt
src/Selector/Selector_Algo.cpp
src/Selector/Selector_Algo.h
src/Selector/Selector_Container.cpp
src/Selector/Selector_Container.h
src/Selector/Selector_FilterByNeighbors.cpp
src/Selector/Selector_FilterByNeighbors.h
src/Selector/Selector_Intersect.cpp
src/Selector/Selector_Intersect.h
src/Selector/Selector_Modify.cpp
src/Selector/Selector_Modify.h
src/Selector/Selector_NameGenerator.h
src/Selector/Selector_Primitive.cpp
src/Selector/Selector_Primitive.h
src/Selector/Selector_Selector.cpp
src/Selector/Selector_Selector.h
src/Selector/Selector_WeakName.cpp
src/Selector/Selector_WeakName.h
src/SketchAPI/CMakeLists.txt
src/SketchAPI/SketchAPI.i
src/SketchAPI/SketchAPI_Arc.cpp
src/SketchAPI/SketchAPI_Arc.h
src/SketchAPI/SketchAPI_Circle.cpp
src/SketchAPI/SketchAPI_Circle.h
src/SketchAPI/SketchAPI_Ellipse.cpp
src/SketchAPI/SketchAPI_Ellipse.h
src/SketchAPI/SketchAPI_EllipticArc.cpp
src/SketchAPI/SketchAPI_EllipticArc.h
src/SketchAPI/SketchAPI_IntersectionPoint.cpp
src/SketchAPI/SketchAPI_IntersectionPoint.h
src/SketchAPI/SketchAPI_Line.cpp
src/SketchAPI/SketchAPI_Line.h
src/SketchAPI/SketchAPI_Point.cpp
src/SketchAPI/SketchAPI_Point.h
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_SketchCopy.cpp
src/SketchPlugin/SketchPlugin_Split.cpp
src/SketchPlugin/SketchPlugin_Tools.cpp
src/SketchPlugin/SketchPlugin_Tools.h
src/SketchPlugin/SketchPlugin_Validators.cpp
src/XGUI/XGUI_FacesPanel.cpp
src/XGUI/XGUI_ObjectsBrowser.cpp
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_Tools.cpp
src/XGUI/XGUI_ViewerProxy.cpp
src/XGUI/XGUI_Workshop.cpp

diff --cc CMakeLists.txt
Simple merge
index d11c9b6a940caaf030986a360d97f84742e97218,0000000000000000000000000000000000000000..bc4934d30bddf4a3ab3a95eae5a668205ac7079b
mode 100644,000000..100644
--- /dev/null
@@@ -1,684 -1,0 +1,686 @@@
 +
 +.. _introduction:
 +
 +Introduction to SHAPER
 +======================
 +
 +SHAPER module of SALOME is destined for:
 +
 +- import and export of geometrical models in IGES, BREP, STEP and XAO formats;
 +- parametric construction of geometrical objects using a wide range of functions:
 +    
 +  - creation of complex 2D sections using :ref:`sketchPlugin` with consequent extrusion or revolution (see :ref:`featuresPlugin`);
 +  - construction of model using primitives defined in :ref:`primitivesPlugin`;
 +  - usage of Boolean operations (see :ref:`featuresPlugin`);
 +  
 +- viewing geometrical objects in the OCC viewer;
 +- transformation of geometrical objects using various algorithms.
 +
 +It is possible to easily set :ref:`parameter_usage` predefined to be used as arguments when objects are created.
 +
 +SHAPER module preferences are described in the :ref:`preferences` section of SALOME Help.
 +
 +Almost all SHAPER  module functionalities are accessible via Python Interface.
 +
 +SHAPER module works with one study containing several documents:
 +
 +- partset
 +- one or several parts.
 +
 +Only one document can be active. In complicated models partset consists of several parts. Parts in partset may be copied, positioned relatively to each other, or simply translated.
 +  
 +A new study contains only a partset with 7 default constructions, which cannot be deleted:
 +  
 +- one point **Origin** coinciding with the origin of the coordinate system;
 +- three axes **OX**, **OY**, **OZ**  coinciding with coordinate axes;
 +- three planes **YOZ**, **XOZ**, **XOY**  coinciding with coordinate planes.    
 +
 +Only  points, axis, planes (see  :ref:`constructionPlugin`) and sketches (see  :ref:`sketchPlugin`) can be added into Partset to be used in any part later.
 +:ref:`parameter_usage` can be used both in Partset and any Part.
 +    
 +A new Part can be created as described in :ref:`partPlugin`.
 +
 +Double click or pop-up menu can be used to activate existing document.
 +
 +Application desktop
 +-------------------
 +
 +The main window of the application consists of the following components:
 +
 +- :ref:`main_menu`;
 +- :ref:`doc_windows`;
 +- :ref:`viewer`;
 +- :ref:`toolbar`;    
 +- status bar.    
 +
 +.. figure:: /images/main_window.png
 +   :align: center
 +
 +   Main window of SHAPER module
 +  
 +.. _main_menu:
 +
 +Main menu 
 +---------
 +
 +Main menu provides access to all commands of the application.
 +
 +.. figure:: /images/main_menu.png
 +   :align: center
 +
 +   Main menu
 +
 +Main menu includes standard Salome items:
 +
 +- File;
 +- Edit;
 +- View;
 +- Tools;
 +- Window;
 +- Help;
 +    
 +and items specific for SHAPER module:
 +
 +- Part (see :ref:`partPlugin`);
 +- Sketch (see :ref:`sketchPlugin`);
 +- Construction (see :ref:`constructionPlugin`);
 +- Build (see :ref:`buildPlugin`);
 +- Primitives (see :ref:`primitivesPlugin`);
 +- Features (see :ref:`featuresPlugin`);  
 +- Macros. 
 +
 + .. _toolbar:
 +
 +SHAPER toolbar
 +--------------
 +
 +Application toolbar contains:
 +
 +- standard toolbar;
 +- modules toolbar;
 +- SHAPER toolbar.
 +
 +.. figure:: /images/toolbar.png
 +   :align: center
 +
 +   Toolbars
 +
 +SHAPER toolbar duplicates the main menu and  provides access to all commands of the application.
 +
 +SHAPER toolbar is separated into sections:
 +
 +- Part;
 +- Movement;
 +- Measurement;
 +- Sketch;
 +- Construction;
 +- Build;
 +- Primitives;
 +- GDML;
 +- Features;
 +- Boolean;
 +- Collections;
 +- Fillet;
 +- Macros.
 +
 +Visibility of SHAPER toolbar sections is managed using *View -> Toolbar* :ref:`main_menu` item or toolbar pop-up menu.
 +
 +.. _doc_windows:
 +
 +Dock windows
 +------------
 +
 +Standard dock windows are: 
 +
 +- :ref:`object_browser`
 +- :ref:`inspection_panel`
 +- :ref:`hidefaces_panel`
 +- :ref:`python console`
 +- :ref:`property_panel`
 +
 +Dock windows can be placed in three dock areas using drag-and-drop:
 +  
 +- left, 
 +- right, 
 +- bottom.
 +
 +By default Object browser window is placed at the left dock area, Inspection panel at the right dock area and Python console at the bottom dock area of the main window.
 +
 +Property Panel is hidden.
 +
 +Property Panel is shown on operation start in left dock area of the main window by default.
 +
 +If Object browser is shown at the same side then they will be tabbed.
 +
 +Each dock window can be closed using **Cross** window button and opened again using a corresponding command from *View - Windows* :ref:`main_menu` or alternatively using pop-up menu.
 +
 +.. figure:: /images/popup_menu.png
 +   :align: center
 +
 +   Pop-up menu for visibility of windows and toolbars
 +
 +.. _object_browser: 
 +
 +Object browser
 +^^^^^^^^^^^^^^
 +
 +Object browser contains all documents created in the current study. 
 +
 +Each document includes standard branches where created objects are placed.
 +
 +Documents with branches are shown in Tree View.
 +
 +.. figure:: /images/object_browser.png
 +   :align: center
 +
 +   **Object browser**: Partset active
 +
 +Partset includes three branches:
 +
 +- Parameters;
 +- Constructions;
 +- Features    
 +
 +Part includes the following branches:
 +
 +- Parameters;
 +- Constructions;
 +- Results;
 +- Fields;
 +- Groups;   
 +- Features.    
 +
 +New part contains only 3 empty branches:
 + 
 +- Parameters;
 +- Constructions;
 +- Results.
 +
 +Features are placed one after another in the active document with default names and their results are placed into the corresponding branch.
 +
 +Examples of default names assigned automatically for :ref:`box_feature` are:
 + 
 +* **Box_1**, **Box_2**, ... for Feature;
 +* **Box_1_1**, **Box_2_1**, ... for Result.
 +
 +Note, that a default branch is added into Tree View when the first feature of this type is created.
 +
 +Note, that the result used in feature as argument is removed.
 +
 +This child result can be restored using **Recover** feature.
 +
 +Each feature, result, construction, group, field, parameter can be renamed using *Rename* pop-up menu command (hotkey "F2").
 +
 +.. figure:: /images/popup_menu_object_browser_feature.png
 +   :align: center
 +
 +   **Feature** pop-up menu
 +
 +.. figure:: /images/popup_menu_object_browser_result.png
 +   :align: center
 +
 +   **Result** pop-up menu
 +
 +.. figure:: /images/popup_menu_object_browser_construction.png
 +   :align: center
 +
 +   **Construction** pop-up menu
 +
 +The order of features can be changed using *Move to the end* and *Move to the end and split* pop-up menu commands. They work only for Group features. The selected group or several groups will be moved to the end of features list. The *Move to the end and split* also splits the resulting group in several groups: one group per one selection.
 +
 +Folders can be used to arrange long Tree View for features.
 +
 +.. figure:: /images/object_browser_folder.png
 +   :align: center
 +
 +   **Object browser** with folder Dome: Part_1 active
 +
 +*Insert a folder before* pop-up menu command creates a new empty folder before the selected feature. The folder can be renamed.
 +
 +Features placed after/before the created folder can be moved into the folder using *Move into the previous folder* / *Move into the next folder* pop-up menu command.
 +
 +This allows to decrease the length of feature list.
 +
 +Features can be removed from the folder using *Move out before the folder* / *Move out after the folder* pop-up menu command.
 +
 +*Clean history* pop-up menu command looks for features that do not participate in other features.
 +
 +**Clean history** dialog box shows a list of unused features. After confirmation by click **Yes** button unused features are removed.
 +
 +.. figure:: /images/clean_history.png
 +   :align: center
 +
 +   **Clean history** dialog box
 +
 +*Select result* and *Select parent feature* pop-up menu commands help to navigate along Tree View.
 +
 +A feature and its result can be deleted using *Delete* pop-up menu command.
 +
 +Note that all features using the removed feature and their results will be removed simultaneously.
 +
 +**Delete feature** dialog box shows the list of features to be removed. After confirmation by click **Yes** button all these features are removed.
 +
 +.. figure:: /images/delete_feature.png
 +   :align: center
 +
 +   **Delete feature** dialog box
 +   
 +.. _property_panel:
 +
 +Property panel
 +^^^^^^^^^^^^^^
 +
 +.. |ok_btn| image:: /images/button_ok.png
 +.. |cancel_btn| image:: /images/button_cancel.png
 +.. |help_btn| image:: /images/button_help.png
 +
 +Property panel consists of two parts:
 +
 +- controls a container for input of parameters for the current operation;
 +- buttons panel containing standard buttons:
 + 
 +   | |ok_btn| **Ok/Apply** executes operation with defined parameters,
 +   | |cancel_btn| **Cancel/Close** calls **Abort operation** dialog box to confirm  operation abort, 
 +   | |help_btn| **Help** calls User's guide opened on page describing the current operation.
 +
 +   .. figure:: /images/abort_operation.png
 +      :align: center
 +     
 +      **Abort operation** dialog box
 +
 +|ok_btn| **OK/Apply**  button is disabled if not all input parameters are defined or some errors are found. Error is shown as tooltip and in status bar.
 +
 +.. _inspection_panel: 
 +
 +Inspection panel 
 +^^^^^^^^^^^^^^^^
 +
 +Inspection panel provides the list of types and quantities of all topological entities, composing the selected result, construction or feature.
 +
 +.. figure:: /images/inspection_panel.png
 +   :align: center
 +
 +   **Inspection panel** for default Box
 +
 +**Object** displays name of the selected result, construction  or feature.
 +
 +**Type** characterizes the whole shape.
 +   
 +The information about Point, Axis or Edge  additionally shows coordinates of point / end points.
 +
 +.. figure:: /images/inspection_panel_line.png
 +   :align: center
 +
 +   **Inspection panel** for Axis
 +   
 +The information about  Plane, Face additionally shows coordinates of center point and direction of normal.
 +
 +.. figure:: /images/inspection_panel_face.png
 +   :align: center
 +
 +   **Inspection panel** for Face 
 +
 +.. _hidefaces_panel:
 +
 +Hide Faces panel
 +^^^^^^^^^^^^^^^^
 +
 +**Hide Faces** panel makes possible to hide temporary faces of any displayed object. **Hide Faces** panel looks like following:
 +
 +.. figure:: /images/hide_faces_panel.png
 +   :align: center
 +
 +   **Hide Faces** panel
 +
 +- If this panel is activated it "listens" user selection.
 +- If a face is selected then its name will be shown in the panel's list and hidden in the viewer. 
 +- If user selects a group of faces (or at least a one face of this group) then whole group will be hidden and also all faces from all objects referenced by this group.
 +- If user will display the hidden group again (by a show operation) then the group will be removed from Hide Faces list and visibility of all referenced faces will be restored.
 +
 +Also it is possible do not to hide faces, but make them transparent. For this purpose **"Transparent"** check-box can be used. Value of the transparency can be changed in **Visualization** tab of **Preferences** dialog box.
 +Closing of **Hide Faces** panel restores visibility state of all objects. If it is necessary to deactivete the **Hide Faces** panel (preserving the current display state) then user has to press **"Esc"** button.
 +
 +.. _python console:
 +
 +Python console
 +^^^^^^^^^^^^^^
 +
 +Python console interpreters Python commands entered manually.
 +
 +In particular, it is possible to load the python script:
 +
 +*execfile(r"/dn48/newgeom/data/example.py")*
 +
 +Pop-up menu gives the possibility to:
 +
 +- Copy the selected text to clipboard;
 +- Paste the text from clipboard to Python console ;
 +- Clear Python console;
 +- Dump commands from console into the specified file;
 +- Start/Stop writing log into the specified file.    
 + 
 +.. figure:: /images/python_console_popup.png
 +   :align: center
 +
 +   Pop-up menu of Python console
 +
 +.. _viewer:
 +
 +Viewer
 +------
 +
 +The application supports one instance of OCC 3D viewer and is able to show only one 3D space.
 +
 +This 3D space can be represented in several view windows. New view window can be created using **Clone view** button in viewer toolbar.
 +
 +Each view windows shows its own point of view on the 3D scene.
 +
 +This point of view can be modified using viewer commands: **Panning**, **Zooming**, **Scaling**, etc.
 +
 +.. figure:: /images/2_viewers.png
 +   :align: center
 +
 +   Two view windows
 +
 +The description of OCC 3D Viewer architecture and functionality is provided in GUI module user's guide in chapter **OCC 3D Viewer**.
 +
 +.. _parameter_usage:
 +
 +Parameters 
 +----------
 +
 +Model parametrization can be done using parameters.
 +
 +A parameter can be created in the active partset or part by:
 +
 +- :ref:`parameter`;
 +- :ref:`parameters`;
 +- :ref:`parameter_expression`.
 +
 +Any argument in features can be defined as parameter or expression containing parameters.
 +
 +The list of features using parameters is given in **Parameters** dialog box:
 +
 + .. figure:: /images/parameters_feature.png
 +   :align: center
 +
 +   Parameters dialog box
 +  
 +If a parameter value is changed, then all features where it is used are rebuilt.
 +
 +A parameter name should be unique in the active document.
 +
 +However, partset and part can have parameters with the same name. If parameter names in Partset and Part are identical, then Part parameter has a higher priority and its value will be used in the features of this part.
 +
 +In contrast to features (see :ref:`object_browser`), there is an additional option when parameters are deleted.   
 +
 +.. figure:: /images/delete_parameter.png
 +   :align: center
 +
 +   Delete parameter
 +
 +After clicking **Replace** button, the selected parameter is removed but its parent parameters and features are not removed. The deleted parameter is replaced by its value.
 +
 +.. _parameter_expression:
 +
 +Create parameter on fly
 +^^^^^^^^^^^^^^^^^^^^^^^
 +
 +Parameter can be created during feature creation simply by writing *variable=expression* in any editbox.
 +
 +After feature validation a new parameter with the given name **variable** and value equal to the evaluated expression appears in object browser under **Parameters** in the active partset or part.
 +
 +.. _preferences:
 +
 +SHAPER preferences
 +------------------
 +
 +Description of General application preferences and **Preferences** dialog box is provided in GUI module user's guide in chapter **Setting Preferences**.
 +
 +SHAPER preferences define visualization of objects, visualization during selection, edition. New preferences can be used right after modification or later after activation of SHAPER module.
 +
 +To call **Preferences** dialog box:
 +
 +#. select in the Main Menu *File - > Preferences* item or
 +#. use  **Ctrl+P** shortcut.
 +
 +SHAPER preferences contains the following tabs:
 +
 +- :ref:`visualization_preferences`;
 +- :ref:`plugins_preferences`;
 +- :ref:`shortcuts_preferences`;
 +- :ref:`windows_preferences`.
 +- :ref:`sketch_preferences`.
 +- :ref:`viewer_preferences`.
 +
 +Visualization tab is activated by default when **Preferences** dialog box is opened in the active SHAPER module.
 +
 +Other tabs are activated by click on tab header.
 +  
 +.. _visualization_preferences:
 +
 +Visualization tab
 +^^^^^^^^^^^^^^^^^
 +
 +This tab defines presentation of objects displayed in OCC 3D viewer.
 +
 +.. figure:: /images/visualization_preferences.png
 +   :align: center
 +
 +   **Preferences**: Visualization tab
 +
 +**Input fields**:
 +
 +- **Selection color** defines a color for selected objects;
 +- **Result color** selects default shading color for objects from **Results** branch;
 +- **Group color** selects default color for objects from **Groups** branch;
 +- **Construction color** selects default color for objects from **Constructions** branch;
 +- **Part color** selects default color for parts shown in Partset;  
 +- **Field color** selects default color for objects from **Fields** branch;
 +- **Body deflection coefficient** defines default deflection coefficient for objects from **Results** branch. A smaller coefficient provides better quality of a shape in the viewer;
 +- **Construction deflection coefficient** defines default deflection coefficient for objects from **Constructions** branch. A smaller coefficient provides better quality of a shape in the viewer;
 +- **Reference shape wireframe color in operation** selects default color used for wireframe visualization of objects used in active operation;
 +- **Result shape wireframe color in operation** selects default color used for wireframe visualization of result in active operation. Click **See preview** button to show result;
 +- **Multi selector item color in operation** selects default color used for visualization of objects selected in property panel to distinguish them among all objects used in active operation;
 +- **Color of removed feature in operation** selects default color used for visualization of sketch entities to be removed during **Trim/Split** operations;
 +- **Color of sketch plane** selects default shading color for sketch plane;
 +- **Hidden faces transparency** defines default transparency value for hidden faces;
 +- **Dimension arrow size**  defines default size of arrows for extension line showing dimensional constraint;  
 +- **Dimension font** defines font used for value of dimensional constraint;
 +- **Dimension value size**  defines default size of value for dimensional constraint;
 +- **Sketch dimension color**  defines default color of dimensional constraint; 
 +- **Construction plane color** selects default color for Construction planes;  
 +- **Sketch entity color** selects default color for sketch objects;
 +- **Sketch external entity color** selects default color for external objects selected as reference during sketch creation/edition;
 +- **Sketch auxiliary entity color** selects default color for sketch auxiliary objects;
 +- **Sketch overconstraint color** selects default color for a sketch with redundant constraints;
 +- **Sketch fully constraint color** selects default color for a sketch with zero degrees of freedom.
++- **Zoom trihedron arrows** if this control is checked then arrows of a view trihedron will be scaled according to current view scale
++- **Axis arrow size** relative size of trihedron arrows. It has effect only in case if **Zoom trihedron arrows** is On.
 +  
 +To redefine any color click on the corresponding line to access **Select color** dialog box
 +
 +.. figure:: /images/select_color.png
 +   :align: center
 +
 +   **Preferences**: **Select color** dialog box
 +   
 +Preferences for sketch are applicable  during sketch creation/edition operation.
 +   
 +.. _plugins_preferences:
 +   
 +Plugins tab
 +^^^^^^^^^^^
 +Plugins tab defines folders where plugins and resources are located.
 +
 +.. figure:: /images/plugins_preferences.png
 +   :align: center
 +
 +   **Preferences**: Plugins tab
 +
 +**Input fields**:
 +
 +- **Default path** selects default folder where plugins are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder;
 +
 +- **Import initial directory** selects default folder where resources are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder.
 +
 +.. figure:: /images/open_button.png
 +   :align: center
 +
 +   **Open** button
 +
 +.. figure:: /images/find_directory.png
 +   :align: center
 +
 +   **Find directory** dialog box
 +    
 +   
 +.. _shortcuts_preferences:
 +   
 +Shortcuts tab
 +^^^^^^^^^^^^^
 +
 +Shortcuts tab defines shortcut keys for different operations.
 +
 +.. figure:: /images/shortcuts_preferences.png
 +   :align: center
 +
 +   **Preferences**: Shortcuts tab
 +   
 +- **Add parameter in parameters manager dialog** defines shortcut keys for adding parameter in parameters manager dialog box.
 +   
 +.. _windows_preferences:
 +
 +Windows tab
 +^^^^^^^^^^^
 +
 +Windows tab contains definitions for the module windows management.
 +
 +.. figure:: /images/windows_preferences.png
 +   :align: center
 +
 +   **Preferences**: Windows tab
 +
 +- **Use HideFaces panel in operation** if the checkbox is checked then HideFaces panel will be launched automatically on launching an operation where using of this panel is considered.
 +
 +.. _sketch_preferences:
 +
 +Sketch tab
 +^^^^^^^^^^
 +
 +Sketch tab defines properties of coordinate planes shown for selection of sketch plane when no convenient objects are shown in OCC 3D viewer.
 +
 +.. figure:: /images/sketch_preferences.png
 +   :align: center
 +
 +   **Preferences**: Sketch tab
 +
 +**Input fields**:
 +
 +- **Size** defines size of coordinate planes;
 +- **Thickness**  defines thickness of coordinate plane borders; 
 +- **Rotate to plane when selected** check-box turns on/off automatic switch the viewer to the top view for the selected sketch plane.  
 +- **Angular tolerance** defines defines an angular tolerance for automatic creation of horizontal and vertical constraints;
 +- **Default spline weight** defines default weight for B-spline nodes during creation. The default value can be changed by editing of the spline;
 +- **Cursor for sketch operation** defines a cursor which indicates a launched sketcher sub-operation.
 +- **Create sketch entities by dragging** defines a style of sketch etities creation. It concerns creation of lines, rectangles, circles, arcs, ellipses, elliptic arcs. If it is switched ON then points of objects have to be defined by mouse press - mouse move - mouse release. Otherwise every point of an object has to be defined by mouse click;
 +   
 +.. _viewer_preferences:
 +   
 +Viewer tab
 +^^^^^^^^^^
 +
 +Viewer tab defines selection in OCC 3D viewer properties. 
 +
 +.. figure:: /images/viewer_preferences.png
 +   :align: center
 +
 +   **Preferences**: Viewer tab   
 +
 +**Input fields**:
 +
 +- **Default Selection** defines objects to be selected by mouse click in OCC 3D viewer:
 +
 +  - **Faces** check-box turns on/off selection of faces;
 +  - **Edges** check-box turns on/off selection of edges;
 +  - **Vertices** check-box turns on/off selection of vertices;
 +
 +- **Selection sensitivity** defines size of area around object in pixels, in which  mouse click selects object inside this area:
 +
 +  - **Vertex** defines selection  sensitivity for vertices; 
 +  - **Edge**  defines selection  sensitivity for edges.  
 +
 +.. _toolbars_management:
 +
 +Toolbars management
 +-------------------
 +
 +.. _toolbars_dialog:
 +
 +**Toolbars** dialog box
 +^^^^^^^^^^^^^^^^^^^^^^^
 +To edit the current tool bars structure select in the Main Menu *Edit - > Edit toolbars* item. 
 +The following dialog box with existing toolbars appears:
 +
 +.. figure:: /images/Toolbars.png
 +   :align: center
 +
 +   **Toolbars** dialog box
 +
 +**Input fields**:
 +
 +- **Toolbars** window contains list of toolbars names. Number of commands in each tool bar is shown in brackets.
 +- **Add** button creates a new toolbar. Click on **Add** button opens :ref:`create_toolbar`;
 +- **Edit**  button  calls :ref:`edit_toolbar` for currently selected tool bar;
 +- **Delete** button removes currently selected tool bar. Click on **Delete** button opens warning dialog box. After confirmation by click **Yes** button the selected toolbar is deleted. Click **No** button cancels removing of the selected toolbar;
 +- **Reset** button restores modified tool bars structure to default state;
 +- **OK** button closes the dialog box, stores result of tool bars edition and updates Shaper tool bars;
 +- **Cancel** button closes the dialog box without modification of tool bars.
 +
 +.. figure:: /images/delete_toolbar.png
 +   :align: center
 +
 +   Warning dialog box
 +   
 +.. _create_toolbar:
 +
 +**Create toolbar** dialog box
 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 +
 +**Input fields** of **Create toolbar** dialog box:
 +
 +.. figure:: /images/create_toolbar.png
 +   :align: center
 +
 +   **Create toolbar** dialog box
 +
 +- **Name of a new toolbar** defines name of the new tool bar. The name of tool bar has to be unique. If user defines a not unique name then a warning appears and a new tooolbar with not unique name is not created;
 +- **Ok** button closes the dialog box and add a new tool bar of the module into  **Toolbars** window;
 +- **Cancel** button closes the dialog box without addition of a new tool bar.
 +
 +.. figure:: /images/name_toolbar.png
 +   :align: center
 +
 +   **Warning** dialog box
 +
 +.. _edit_toolbar:
 +
 +**Edit toolbar** dialog box
 +^^^^^^^^^^^^^^^^^^^^^^^^^^^
 +
 +**Input fields** of **Edit toolbar** dialog box:
 +
 +.. figure:: /images/EditToolbar.png
 +   :align: center
 +
 +   **Edit toolbar** dialog box
 +
 +- **Toolbar name** non-editable field displays  name of modified tool bar;
 +- **Out of toolbars** window contains list of commands which are not included into any tool bar and separator definition "------";
 +- **In the toolbar** window contains list of commands which are defined in the current tool bar. Items in this window are listed according to order of commands in the toolbar; 
 +- **Right arrow** button transfers currently selected item from  **Out of toolbars** window to **In the toolbar** window and puts new item before the selected item in **In the toolbar** window.
 +    If there is no selected item in **In the toolbar**  window then new item will be added at the end of items list. In order to clear current selection it is necessary to click in empty space of the window.
 +- **Left arrow** button transfers currently selected item from **In the toolbar** window into **Out of toolbars** window;
 +- **Up** and **Down** buttons  change position of selected command in **In the toolbar** window;
 +- **Ok** button closes the dialog box, stores result of edition;
 +- **Cancel**  button closes the dialog box without modification of tool bar content.
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index e63d5ee9c0109b8265e43e291f243e405b21da8e,c0930ef872075a8d9eb9d319f0a25947d3c2a75b..ae74d6b3007eac78e3e70d52ab9ddc07642c632f
@@@ -102,10 -105,10 +105,10 @@@ void ExchangePlugin_ImportPart::attribu
        for (std::list<FeaturePtr>::iterator aFIt = aSubFeatures.begin();
             aFIt != aSubFeatures.end(); ++aFIt) {
          if ((*aFIt)->getKind() == PartSetPlugin_Part::ID())
-           anAcceptedValues.push_back((*aFIt)->name());
+           anAcceptedValues.push_back(Locale::Convert::toString((*aFIt)->name()));
        }
  
 -      if (aPartsAttr->size() != anAcceptedValues.size())
 +      if ((size_t)aPartsAttr->size() != anAcceptedValues.size())
          aTargetAttr->setValue(0);
  
        aPartsAttr->setSize((int)anAcceptedValues.size());
@@@ -164,16 -168,16 +168,16 @@@ DocumentPtr findDocument(DocumentPtr th
    return aDoc;
  }
  
- typedef std::map<std::string, std::map<std::string, std::set<int> > > ObjectNameMap;
+ typedef std::map<std::string, std::map<std::wstring, std::set<int> > > ObjectNameMap;
  
- bool splitName(std::string& theName, int& theIndex)
+ bool splitName(std::wstring& theName, int& theIndex)
  {
    size_t aLastUndercore = theName.find_last_of('_');
--  bool isOk = aLastUndercore != std::string::npos;
++  bool isOk = aLastUndercore != std::wstring::npos;
    if (isOk) {
-     char* isNumber;
-     std::string anIndexStr = theName.substr(aLastUndercore + 1);
-     theIndex = std::strtol(anIndexStr.c_str(), &isNumber, 10);
+     size_t isNumber;
+     std::wstring anIndexStr = theName.substr(aLastUndercore + 1);
+     theIndex = std::stol(anIndexStr, &isNumber);
      isOk = isNumber != 0;
      if (isOk)
        theName.erase(aLastUndercore);
Simple merge
Simple merge
Simple merge
Simple merge
index 27ef884adca2e21cc522a4fd07ef4f9cabf8e303,180fb85e58ac865b25f12a9dffd93be85e77cfe7..9219aca4b622c160400eeff90f99a628f7d03eda
@@@ -362,13 -364,13 +364,13 @@@ std::shared_ptr<GeomAPI_Shape> Model_At
          } else { // face with name is already in the data model, so try to take it by name
            Handle(TDataStd_Name) aName;
            if (aSelLab.FindAttribute(TDataStd_Name::GetID(), aName)) {
--            std::string aSubShapeName(TCollection_AsciiString(aName->Get()).ToCString());
--            std::size_t aPartEnd = aSubShapeName.find('/');
--            if (aPartEnd != std::string::npos && aPartEnd != aSubShapeName.rfind('/')) {
--              std::string aNameInPart = aSubShapeName.substr(aPartEnd + 1);
 -              int anIndex;
++            std::wstring aSubShapeName = Locale::Convert::toWString(aName->Get().ToExtString());
++            std::size_t aPartEnd = aSubShapeName.find(L'/');
++            if (aPartEnd != std::wstring::npos && aPartEnd != aSubShapeName.rfind(L'/')) {
++              std::wstring aNameInPart = aSubShapeName.substr(aPartEnd + 1);
 +              int anInd;
                std::string aType; // to reuse already existing selection the type is not needed
 -              return aPart->shapeInPart(Locale::Convert::toWString(aNameInPart), aType, anIndex);
 +              return aPart->shapeInPart(aNameInPart, aType, anInd);
              }
            }
          }
@@@ -833,7 -838,7 +838,7 @@@ static ModelAPI_AttributeSelection::Cen
      centersMap().begin();
    for(; aPrefixIter != centersMap().end(); aPrefixIter++) {
      std::size_t aFound = theShapeName.find(aPrefixIter->second);
--    if (aFound != std::string::npos &&
++    if (aFound != std::wstring::npos &&
          aFound == theShapeName.size() - aPrefixIter->second.size()) {
        theShapeName = theShapeName.substr(0, aFound);
        return aPrefixIter->first;
@@@ -867,11 -872,11 +872,11 @@@ void Model_AttributeSelection::selectSu
      std::shared_ptr<Model_Document> aDoc =
        std::dynamic_pointer_cast<Model_Document>(owner()->document());
      // check this is Part-name: 2 delimiters in the name
--    std::size_t aPartEnd = aSubShapeName.find('/');
--    if (aPartEnd != std::string::npos) {
-       std::string aPartName = aSubShapeName.substr(0, aPartEnd);
++    std::size_t aPartEnd = aSubShapeName.find(L'/');
++    if (aPartEnd != std::wstring::npos) {
+       std::wstring aPartName = aSubShapeName.substr(0, aPartEnd);
        DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
-       if (aPartName == aRootDoc->kind()) {
+       if (aPartName == Locale::Convert::toWString(aRootDoc->kind())) {
          aDoc = std::dynamic_pointer_cast<Model_Document>(aRootDoc);
          aSubShapeName = aSubShapeName.substr(aPartEnd + 1);
        }
      }
  
      // the whole result selection check
--    if (aSubShapeName.find('/') == std::string::npos) {
++    if (aSubShapeName.find(L'/') == std::wstring::npos) {
        ObjectPtr aRes = aDoc->objectByName(ModelAPI_ResultConstruction::group(), aSubShapeName);
        if (!aRes.get()) {
          aRes = aDoc->objectByName(ModelAPI_ResultBody::group(), aSubShapeName);
@@@ -1900,9 -1903,9 +1905,9 @@@ bool Model_AttributeSelection::restoreC
      std::dynamic_pointer_cast<Model_Document>(owner()->document());
  
    // remove the sub-value part if exists
-   std::string aSubShapeName = aName;
-   std::string::size_type n = aName.find('/');
-   if (n != std::string::npos) {
+   std::wstring aSubShapeName = aName;
 -  std::string::size_type n = aName.find('/');
 -  if (n != std::string::npos) {
++  std::wstring::size_type n = aName.find(L'/');
++  if (n != std::wstring::npos) {
      aName = aName.substr(0, n);
    }
  
      // name in PartSet?
      aDoc = std::dynamic_pointer_cast<Model_Document>(
        ModelAPI_Session::get()->moduleDocument());
-     if (theName.find(aDoc->kind()) == 0) { // remove the document identifier from name if exists
+     if (theName.find(Locale::Convert::toWString(aDoc->kind())) == 0) {
+       // remove the document identifier from name if exists
        aSubShapeName = theName.substr(aDoc->kind().size() + 1);
        aName = aSubShapeName;
-       n = aName.find('/');
 -      std::string::size_type n = aName.find('/');
--      if (n != std::string::npos) {
++      n = aName.find(L'/');
++      if (n != std::wstring::npos) {
          aName = aName.substr(0, n);
        }
      }
  
    // sketch sub-component shape and name is located in separated feature label, try the sub-name
    if (theValue.IsNull() && aCont->groupName() == ModelAPI_ResultConstruction::group()) {
--    std::string::size_type aSlash = aSubShapeName.rfind('/');
--    if (aSlash != std::string::npos) {
-       std::string aCompName = aSubShapeName.substr(aSlash + 1);
++    std::wstring::size_type aSlash = aSubShapeName.rfind(L'/');
++    if (aSlash != std::wstring::npos) {
+       std::wstring aCompName = aSubShapeName.substr(aSlash + 1);
        CompositeFeaturePtr aComposite =
          std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aDoc->feature(aCont));
        if (aComposite.get() && aComposite->numberOfSubs()) {
Simple merge
Simple merge
Simple merge
Simple merge
index 6893930feef6bfad68286a496580eba73aae3c27,4ce8f1184b8742be27e8c5e9bbb655b918bf0959..7d9dabeae63c6b15f8e3437ba338621230684685
@@@ -1783,9 -1782,9 +1786,9 @@@ TDF_Label Model_Document::findNamingNam
        return *(aFind->second.rbegin()); // no more variants, so, return the last
    }
    // not found exact name, try to find by sub-components
--  std::string::size_type aSlash = theName.rfind('/');
--  if (aSlash != std::string::npos) {
-     std::string anObjName = theName.substr(0, aSlash);
++  std::wstring::size_type aSlash = theName.rfind(L'/');
++  if (aSlash != std::wstring::npos) {
+     std::wstring anObjName = theName.substr(0, aSlash);
      aFind = myNamingNames.find(anObjName);
      if (aFind != myNamingNames.end()) {
        TCollection_ExtendedString aSubName(theName.substr(aSlash + 1).c_str());
@@@ -1931,8 -1930,8 +1934,8 @@@ ResultPtr Model_Document::findByName
      aRes = myObjs->findByName(aName);
    }
    if (aNumInHistory) {
-     std::map<std::string, std::list<TDF_Label> >::iterator aFind = myNamingNames.find(aName);
+     std::map<std::wstring, std::list<TDF_Label> >::iterator aFind = myNamingNames.find(aName);
 -    if (aFind != myNamingNames.end() && aFind->second.size() > aNumInHistory) {
 +    if (aFind != myNamingNames.end() && (int)aFind->second.size() > aNumInHistory) {
        std::list<TDF_Label>::reverse_iterator aLibIt = aFind->second.rbegin();
        for(; aNumInHistory != 0; aNumInHistory--)
          aLibIt++;
Simple merge
index ce23976c3b7feae52fde59411bc1d9e5a8c4e5d8,3a9cfe58347dd2f5e68287f0037fc36ac2197bff..2c32988e2188e13577ee28df27f657110fbb5c6c
@@@ -1187,8 -1190,8 +1189,8 @@@ TDF_Label Model_Objects::resultLabel
  
  bool Model_Objects::hasCustomName(DataPtr theFeatureData,
                                    ResultPtr theResult,
 -                                  int theResultIndex,
 +                                  int /*theResultIndex*/,
-                                   std::string& theParentName) const
+                                   std::wstring& theParentName) const
  {
    ResultBodyPtr aBodyRes = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theFeatureData->owner());
    if (aBodyRes) {
Simple merge
index 19776ba2ab640fd37c0a4f376eb5a49664875ebc,18acf89ee278d0a96979348288c65492d8d5d965..e6a88069b47ed45de44474826caa59e36953ab07
@@@ -131,9 -131,9 +131,9 @@@ static std::wstring shortName
    aName.erase(std::remove(aName.begin(), aName.end(), '&'), aName.end());
    // remove the last 's', 'e', 'f' and 'r' symbols:
    // they are used as markers of start/end/forward/reversed indicators
-   static const std::string aSyms("sefr");
-   std::string::iterator aSuffix = aName.end() - 1;
-   while(aSyms.find(*aSuffix) != std::string::npos) {
+   static const std::wstring aSyms(L"sefr");
+   std::wstring::iterator aSuffix = aName.end() - 1;
 -  while(aSyms.find(*aSuffix) != std::string::npos) {
++  while(aSyms.find(*aSuffix) != std::wstring::npos) {
      --aSuffix;
    }
    aName.erase(aSuffix + 1, aName.end());
@@@ -294,9 -294,10 +294,10 @@@ void Model_ResultConstruction::storeSha
        TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
        for(int anIndex = 1; anExp.More(); anExp.Next(), anIndex++) {
          TDF_Label aSubLab = aShapeLab.FindChild(anIndex);
 -        TNaming_Builder aBuilder(aSubLab);
 -        aBuilder.Generated(anExp.Current());
 +        TNaming_Builder aSubBuilder(aSubLab);
 +        aSubBuilder.Generated(anExp.Current());
-         std::string aVertexName = aMyName + "_" + (anIndex == 1 ? "StartVertex" : "EndVertex");
+         std::wstring aVertexName = aMyName + L"_" +
+           (anIndex == 1 ? L"StartVertex" : L"EndVertex");
          TDataStd_Name::Set(aSubLab, aVertexName.c_str());
          aMyDoc->addNamingName(aSubLab, aVertexName);
        }
Simple merge
Simple merge
index 3c52f0986756e0152b4e7d4a6f0cc0802bb0d4f6,1ecd9ce3923121462831d5bae57593c329b0c8d0..01d7ef900e78482cef0e320e097372a5f39ce653
@@@ -289,11 -292,11 +292,11 @@@ std::wstring Model_ResultPart::nameInPa
    // getting an access to the document of part
    std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(partDoc());
    if (!aDoc.get()) // the part document is not presented for the moment
-     return "";
+     return L"";
 -  TDF_Label anAccessLabel = aDoc->generalLabel();
 +  MAYBE_UNUSED TDF_Label anAccessLabel = aDoc->generalLabel();
    // make the selection attribute anyway:
    // otherwise just by name it is not stable to search the result
-   std::string aName;
+   std::wstring aName;
    // for this the context result is needed
    ResultPtr aContext;
    const std::string& aBodyGroup = ModelAPI_ResultBody::group();
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 68af75b1b4acf3bff1ec651e78b4f172531ac338,c0aa61ef8d408cf09fd76fcc9fdc1b415ade570d..0bfb4d53ed64fd0741bb1f029681405fe4c0208b
@@@ -63,65 -57,62 +63,65 @@@ MAYBE_UNUSED static const char * EVENT_
  
  /// Event ID that order of objects in group is changed,
  /// so, tree must be fully recreated (movement of feature)
 -static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
 +MAYBE_UNUSED static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
  /// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
 -static const char * EVENT_UPDATE_SELECTION = "UpdateSelection";
 +MAYBE_UNUSED static const char * EVENT_UPDATE_SELECTION = "UpdateSelection";
  
  /// Request for the enabled/disabled actions behavior for some specific features
 -static const char * EVENT_FEATURE_STATE_REQUEST = "FeatureStateRequest";
 +MAYBE_UNUSED static const char * EVENT_FEATURE_STATE_REQUEST = "FeatureStateRequest";
  /// Reply for the enabled/disabled actions behavior for some specific features
 -static const char * EVENT_FEATURE_STATE_RESPONSE = "FeatureStateResponse";
 +MAYBE_UNUSED static const char * EVENT_FEATURE_STATE_RESPONSE = "FeatureStateResponse";
  
  /// To block the viewer updates
 -static const char * EVENT_UPDATE_VIEWER_BLOCKED = "UpdateViewerBlocked";
 +MAYBE_UNUSED static const char * EVENT_UPDATE_VIEWER_BLOCKED = "UpdateViewerBlocked";
  /// To unblock the viewer updates
 -static const char * EVENT_UPDATE_VIEWER_UNBLOCKED = "UpdateViewerUnblocked";
 +MAYBE_UNUSED static const char * EVENT_UPDATE_VIEWER_UNBLOCKED = "UpdateViewerUnblocked";
  
  /// To inform that there is an empty presentation in the viewer
 -static const char * EVENT_EMPTY_AIS_PRESENTATION = "EmptyAISPresentation";
 +MAYBE_UNUSED static const char * EVENT_EMPTY_AIS_PRESENTATION = "EmptyAISPresentation";
  /// To inform that there is an empty operation for presentation in the viewer
 -static const char * EVENT_EMPTY_OPERATION_PRESENTATION = "EmptyOperationPresentation";
 +MAYBE_UNUSED static const char * EVENT_EMPTY_OPERATION_PRESENTATION = "EmptyOperationPresentation";
  /// To block preview
 -static const char * EVENT_PREVIEW_BLOCKED = "PreviewBlocked";
 +MAYBE_UNUSED static const char * EVENT_PREVIEW_BLOCKED = "PreviewBlocked";
  /// To preview the current feature in the viewer (to compute the result)
 -static const char * EVENT_PREVIEW_REQUESTED = "PreviewRequested";
 +MAYBE_UNUSED static const char * EVENT_PREVIEW_REQUESTED = "PreviewRequested";
  /// To block automatic recomputation of any feature (by the GUI button press)
 -static const char * EVENT_AUTOMATIC_RECOMPUTATION_DISABLE = "DisableAutomaticRecomputation";
 +MAYBE_UNUSED static const char * EVENT_AUTOMATIC_RECOMPUTATION_DISABLE
 +                                                         = "DisableAutomaticRecomputation";
  /// To unblock block automatic recomputation (default state: the GUI button unpressed)
 -static const char * EVENT_AUTOMATIC_RECOMPUTATION_ENABLE = "EnableAutomaticRecomputation";
 +MAYBE_UNUSED static const char * EVENT_AUTOMATIC_RECOMPUTATION_ENABLE
 +                                                         = "EnableAutomaticRecomputation";
  
  /// Event ID that solver has conflicting constraints (comes with ModelAPI_SolverFailedMessage)
 -static const char * EVENT_SOLVER_FAILED = "SolverFailed";
 +MAYBE_UNUSED static const char * EVENT_SOLVER_FAILED = "SolverFailed";
  /// Event ID that the problem in solver disappeared
 -static const char * EVENT_SOLVER_REPAIRED = "SolverRepaired";
 +MAYBE_UNUSED static const char * EVENT_SOLVER_REPAIRED = "SolverRepaired";
  
  /// Event Id that sketch has DoF = 0
 -static const char * EVENT_SKETCH_FULLY_CONSTRAINED = "SketchFullyConstrainted";
 +MAYBE_UNUSED static const char * EVENT_SKETCH_FULLY_CONSTRAINED = "SketchFullyConstrainted";
  /// Event Id that sketch has DoF > 0
 -static const char * EVENT_SKETCH_UNDER_CONSTRAINED = "SketchUnderConstrainted";
 +MAYBE_UNUSED static const char * EVENT_SKETCH_UNDER_CONSTRAINED = "SketchUnderConstrainted";
  /// Event Id that sketch has DoF < 0
 -static const char * EVENT_SKETCH_OVER_CONSTRAINED  = "SketchOverConstrainted";
 +MAYBE_UNUSED static const char * EVENT_SKETCH_OVER_CONSTRAINED  = "SketchOverConstrainted";
  
  /// Event ID that informs that some object has changed the stability
 -static const char * EVENT_STABILITY_CHANGED = "StabilityChanged";
 +MAYBE_UNUSED static const char * EVENT_STABILITY_CHANGED = "StabilityChanged";
  
  /// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
 -static const char * EVENT_SKETCH_PREPARED = "SketchPrepared";
 +MAYBE_UNUSED static const char * EVENT_SKETCH_PREPARED = "SketchPrepared";
  
  /// Event ID that provides a request for list of non-fixed objects necessary for DoF = 0
 -static const char * EVENT_GET_DOF_OBJECTS = "GetDoFObjects";
 +MAYBE_UNUSED static const char * EVENT_GET_DOF_OBJECTS = "GetDoFObjects";
  
  /// Event ID that provides a request for list of non-fixed objects necessary for DoF = 0
 -static const char * EVENT_DOF_OBJECTS = "DoFObjects";
 +MAYBE_UNUSED static const char * EVENT_DOF_OBJECTS = "DoFObjects";
  
  /// Event ID that requests updates visual attributes for presentations
 -static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttributes";
 +MAYBE_UNUSED static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttributes";
 +
  
  /// Event ID that 1D-fillet failed (comes with ModelAPI_ShapesFailedMessage)
--static const char * EVENT_OPERATION_SHAPES_FAILED = "OperationShapesFailed";
++MAYBE_UNUSED static const char * EVENT_OPERATION_SHAPES_FAILED = "OperationShapesFailed";
  
  /// Message that feature was changed (used for Object Browser update): moved, updated and deleted
  class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index cec0fb1cec3a359bc2d59d28c5199dda95875d49,5fd4de052d0479f8367fb4ee996630c4c7f71adb..8a2f1c6442898be866d9d63384e6013b3d7ac24c
@@@ -86,16 -86,13 +86,16 @@@ void ModelHighAPI_Interface::execute(bo
    //aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
  }
  
- void ModelHighAPI_Interface::setName(const std::string& theName)
+ void ModelHighAPI_Interface::setName(const std::wstring& theName)
  {
 -  if (feature().get())
 +  if (feature().get() && feature()->data()->isValid())
      feature()->data()->setName(theName);
 +  else {
 +    std::cout<<"Error: set name "<<theName.c_str()<<" for an invalid feature"<<std::endl;
 +  }
  }
  
- std::string ModelHighAPI_Interface::name() const
+ std::wstring ModelHighAPI_Interface::name() const
  {
    return feature()->data()->name();
  }
index 0b91369bf71167a38dfbe109721542d3f2aade6f,f3a28048810519d2b992eae3202396a92350fba1..0b72c418f795263e3808897a343f6f11068bf968
@@@ -422,8 -421,8 +424,8 @@@ std::string storeFeatures(const std::ws
       }
    }
    // store the model features information: iterate all features
 -  int anObjectsCount = 0; // stores the number of compared features for this document to compare
 +  size_t anObjectsCount = 0; // stores the number of compared features for this document to compare
-   std::set<std::string> aProcessed; // processed features names (that are in the current document)
+   std::set<std::wstring> aProcessed; // processed features names (that are in the current document)
  
    // process all objects (features and folders)
    std::list<ObjectPtr> allObjects = theDoc->allObjects();
Simple merge
index e190a8fab4ae9181e82fdb7583690ec2ad086b27,ed9717c1009b1a373e61bfdffaf9944c1545b464..3037eceac9245fca4ac21a6bb21d8ca398656968
@@@ -1282,11 -1282,13 +1282,11 @@@ FeaturePtr findParameter(const QString
  
  
  //********************************************************************
- std::string generateName(const AttributePtr& theAttribute,
+ std::wstring generateName(const AttributePtr& theAttribute,
    ModuleBase_IWorkshop* theWorkshop)
  {
-   std::string aName;
+   std::wstring aName;
    if (theAttribute.get() != NULL) {
 -    ModuleBase_Operation* anOperation = theWorkshop->currentOperation();
 -
      FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
      if (aFeature.get()) {
        std::string aXmlCfg, aDescription;
Simple merge
index 5d12d728af230f19d6a35ddb51520e3071c7a53a,a6acbc519b1ac581030d6d86aed1f3d39a49630d..21df54023958ca84d37343e5786b1b51688c5c2e
@@@ -792,11 -816,11 +814,11 @@@ void ModuleBase_WidgetMultiSelector::up
    else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
      AttributeRefAttrListPtr aRefAttrListAttr = aData->refattrlist(attributeID());
      for (int i = 0; i < aRefAttrListAttr->size(); i++) {
 -      AttributePtr anAttribute = aRefAttrListAttr->attribute(i);
 +      AttributePtr anAttr = aRefAttrListAttr->attribute(i);
        QString aName;
 -      if (anAttribute.get()) {
 -        std::wstring anAttrName = ModuleBase_Tools::generateName(anAttribute, myWorkshop);
 +      if (anAttr.get()) {
-         std::string anAttrName = ModuleBase_Tools::generateName(anAttr, myWorkshop);
-         aName = QString::fromStdString(anAttrName);
++        std::wstring anAttrName = ModuleBase_Tools::generateName(anAttr, myWorkshop);
+         aName = QString::fromStdWString(anAttrName);
        }
        else {
          ObjectPtr anObject = aRefAttrListAttr->object(i);
Simple merge
Simple merge
index 640f9f82738efcd97db7f348030987b46515927d,911273a6c5e13d4f3de6760d124f8981c1d0ec0a..06252baa5ff1d3c94a356482a51125673d2802a2
@@@ -192,8 -192,8 +192,8 @@@ bool PartSet_MenuMgr::addViewerMenu(con
              theMenuActions[anIndex++] = aSubMenu->menuAction();
              QAction* aAction;
              int i = 0;
 -            foreach (FeaturePtr aCoins, myCoinsideLines) {
 -              QString anItemText = QString::fromStdWString(aCoins->data()->name());
 +            foreach (FeaturePtr aCoinsL, myCoinsideLines) {
-               QString anItemText = aCoinsL->data()->name().c_str();
++              QString anItemText = QString::fromStdWString(aCoinsL->data()->name());
  #ifdef _DEBUG
                if (anIsAttributes[i])
                  anItemText += " [attribute]";
@@@ -316,9 -317,11 +316,9 @@@ void PartSet_MenuMgr::onLineDetach(QAct
    if (aToDelFeatures.size() > 0) {
      XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myModule->workshop());
      XGUI_Workshop* aWorkshop = aConnector->workshop();
 -    ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation();
  
-     ModuleBase_Operation* anOpAction =
-       new ModuleBase_Operation(tr("Detach %1").arg(aLine->data()->name().c_str()), myModule);
+     ModuleBase_Operation* anOpAction = new ModuleBase_Operation(tr("Detach %1").arg(
+         QString::fromStdWString(aLine->data()->name())), myModule);
 -    bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation);
      XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr();
      // the active nested sketch operation should be aborted unconditionally
      // the Delete action should be additionally granted for the Sketch operation
index 446b253b31c064f3380bb860c37458d7bbafe409,eeb18584f342dc5f8d26077e92f3bf73e85267d8..108db7563a6e55d89ff1affa57834a6112d3deb3
@@@ -1152,7 -1170,8 +1160,6 @@@ void PartSet_Module::onViewTransformed(
       sketchMgr()->isNestedSketchOperation(aCurrentOperation) ||
       (aCurrentOperation->id() == "Measurement")))
    {
-     double aLen = aView->Convert(SketcherPrs_Tools::getConfigArrowSize());
 -
 -    double aPrevLen = SketcherPrs_Tools::getArrowSize();
      SketcherPrs_Tools::setArrowSize(aLen);
      const double aCurScale = aViewer->activeView()->Camera()->Scale();
      aViewer->SetScale(aViewer->activeView(), aCurScale);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d3ab25d0a1e0fe613d001e67c80663fe9c029357,aa649d287f67330d11819822a19b4157c3a639ae..f073926ac5dde7191d360dcfcf81afb75b818f5a
@@@ -49,14 -49,12 +49,16 @@@ SET(PROJECT_SOURCE
  )
  
  SET(PROJECT_LIBRARIES
+     Locale
      ${OpenCASCADE_ApplicationFramework_LIBRARIES}
 +    GeomAPI
 +    GeomAlgoAPI
  )
  SET(PROJECT_INCLUDES
+   ../Locale
    ${OpenCASCADE_INCLUDE_DIR}
 +  ../GeomAPI
 +  ../GeomAlgoAPI
  )
  
  
index ef53c7dcb4de8355c836a768636b30eee869c3d3,94ce161246bdc3343846270db03f8687ddc028d4..2f484f8688d6aaa9e1382ed94f2dc5a91eab89ab
@@@ -414,7 -414,7 +414,7 @@@ Selector_Algo* Selector_Algo::restoreBy
    Selector_NameGenerator* theNameGenerator, TDF_Label& theContextLab)
  {
    Selector_Algo* aResult = NULL;
--  if (theName[0] == '[') { // intersection or container
++  if (theName[0] == L'[') { // intersection or container
      switch(theShapeType) {
      case TopAbs_COMPOUND:
      case TopAbs_COMPSOLID:
        break;
      default:;
      }
--  } else if (theName[0] == '(') { // filter by neighbors
++  } else if (theName[0] == L'(') { // filter by neighbors
      aResult = new Selector_FilterByNeighbors;
 -  } else if (theName.find(pureWeakNameID()) == 0) { // weak naming identifier
 +  } else if (theName.find(pureWeakNameID()) == 0 ||
 +             theName.find(oldPureWeakNameID()) == 0) { // weak naming identifier
      aResult = new Selector_WeakName;
--  } else if (theName.find('&') != std::string::npos) { // modification
++  } else if (theName.find(L'&') != std::wstring::npos) { // modification
      aResult = new Selector_Modify;
    } else { // primitive
      aResult = new Selector_Primitive;
index 6f171afb140df204b094145120de32c480b91534,162f0cc24fc144fad9490f4435c236448c2c1f84..b9fa6b0cd241544994323f3baa25b6d45effa1ec
@@@ -150,28 -148,16 +150,29 @@@ protected
      static const Standard_GUID kSHAPE_TYPE("864b3267-cb9d-4107-bf58-c3ce1775b171");
      return kSHAPE_TYPE;
    }
-   static const std::string& oldWeakNameID()
 +  /// old string identifier of the weak name in modification or intersection types of algorithm
-     static const std::string kWEAK_NAME_IDENTIFIER = "weak_name_";
++  static const std::wstring& oldWeakNameID()
 +  {
-   static const std::string& oldPureWeakNameID()
++    static const std::wstring kWEAK_NAME_IDENTIFIER = L"weak_name_";
 +    return kWEAK_NAME_IDENTIFIER;
 +  }
 +  /// old string identifier of the pure weak name
-     static const std::string kPURE_WEAK_NAME_IDENTIFIER = "_weak_name_";
++  static const std::wstring& oldPureWeakNameID()
 +  {
++    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER = L"_weak_name_";
 +    return kPURE_WEAK_NAME_IDENTIFIER;
 +  }
    /// string identifier of the weak name in modification or intersection types of algorithm
-   static const std::string& weakNameID()
+   static const std::wstring& weakNameID()
    {
-     static const std::string kWEAK_NAME_IDENTIFIER = std::string("new_") + oldWeakNameID();
 -    static const std::wstring kWEAK_NAME_IDENTIFIER = L"weak_name_";
++    static const std::wstring kWEAK_NAME_IDENTIFIER = std::wstring(L"new_") + oldWeakNameID();
      return kWEAK_NAME_IDENTIFIER;
    }
    /// string identifier of the pure weak name
-   static const std::string& pureWeakNameID()
+   static const std::wstring& pureWeakNameID()
    {
-     static const std::string kPURE_WEAK_NAME_IDENTIFIER = std::string("_new") + oldPureWeakNameID();
 -    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER = L"_weak_name_";
++    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER =
++        std::wstring(L"_new") + oldPureWeakNameID();
      return kPURE_WEAK_NAME_IDENTIFIER;
    }
    /// Stores the type of an algorithm in the data tree (in myLab)
index 8b5c537ed33924c9416dddb19f8a750211bb5b0e,05f8fa2ea3a69543c4565d7cf183c41d9ad10c6f..df69d787530bddc65e6b38d243cda0004ac0224f
@@@ -84,21 -85,21 +84,21 @@@ TDF_Label Selector_Container::restoreBy
  {
    myShapeType = theShapeType;
    TDF_Label aContext;
--  for(size_t aStart = 0; aStart != std::string::npos; aStart = theName.find('[', aStart + 1)) {
--    size_t anEndPos = theName.find(']', aStart + 1);
--    if (anEndPos != std::string::npos) {
++  for(size_t aStart = 0; aStart != std::wstring::npos; aStart = theName.find('[', aStart + 1)) {
++    size_t anEndPos = theName.find(L']', aStart + 1);
++    if (anEndPos != std::wstring::npos) {
        // there could be sub-intersections, so, [[...]] case; searching for other open-bracket
--      size_t aNextStart = theName.find('[', aStart + 1);
--      while(aNextStart != std::string::npos && aNextStart < anEndPos) {
--        anEndPos = theName.find(']', anEndPos + 1);
--        if (anEndPos == std::string::npos) {
++      size_t aNextStart = theName.find(L'[', aStart + 1);
++      while(aNextStart != std::wstring::npos && aNextStart < anEndPos) {
++        anEndPos = theName.find(L']', anEndPos + 1);
++        if (anEndPos == std::wstring::npos) {
            return TDF_Label(); // invalid parentheses
          }
--        aNextStart = theName.find('[', aNextStart + 1);
++        aNextStart = theName.find(L'[', aNextStart + 1);
        }
--      if (anEndPos == std::string::npos)
++      if (anEndPos == std::wstring::npos)
          return TDF_Label(); // invalid parentheses
-       std::string aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
+       std::wstring aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
        TopAbs_ShapeEnum aSubShapeType = TopAbs_FACE;
        switch (myShapeType) {
        case TopAbs_COMPSOLID: aSubShapeType = TopAbs_SOLID; break;
Simple merge
index 0035d48f086b75f46dec9a85c9bd0445e83dc7e3,07503640024af02fd252c57a9bcfc22a4c5562c8..49992956baf17b69272e20cdb32a5b6e949e68c5
@@@ -300,12 -299,12 +300,12 @@@ TDF_Label Selector_FilterByNeighbors::r
  {
    myShapeType = theShapeType;
    TDF_Label aContext;
-   std::string aLastLevel; // last level string (after '(' )  to check the context name in the end
-   for (size_t aStart = 0; aStart != std::string::npos;
-     aStart = theName.find('(', aStart + 1)) {
-     size_t anEndPos = theName.find(')', aStart + 1);
-     if (anEndPos != std::string::npos) {
-       std::string aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
+   std::wstring aLastLevel; // last level string (after '(' )  to check the context name in the end
 -  for (size_t aStart = 0; aStart != std::string::npos;
 -    aStart = theName.find('(', aStart + 1)) {
 -    size_t anEndPos = theName.find(')', aStart + 1);
 -    if (anEndPos != std::string::npos) {
++  for (size_t aStart = 0; aStart != std::wstring::npos;
++       aStart = theName.find(L'(', aStart + 1)) {
++    size_t anEndPos = theName.find(L')', aStart + 1);
++    if (anEndPos != std::wstring::npos) {
+       std::wstring aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
        TDF_Label aSubContext;
        Selector_Algo* aSubSel =
          Selector_Algo::restoreByName(newSubLabel(), baseDocument(), aSubStr, myShapeType,
        //  aContext = theNameGenerator->newestContext(aContext);
  
        // searching for the level index
-       std::string aLevel;
-       for (anEndPos++; anEndPos != std::string::npos &&
-         theName[anEndPos] != '(' && theName[anEndPos] != 0;
+       std::wstring aLevel;
 -      for (anEndPos++; anEndPos != std::string::npos &&
 -        theName[anEndPos] != '(' && theName[anEndPos] != 0;
++      for (anEndPos++; anEndPos != std::wstring::npos &&
++        theName[anEndPos] != L'(' && theName[anEndPos] != 0;
          anEndPos++) {
          aLevel += theName[anEndPos];
        }
        aLastLevel = aLevel;
--      if (aLevel.empty() || aLevel[0] == '_')
++      if (aLevel.empty() || aLevel[0] == L'_')
          myNBLevel.push_back(1); // by default it is 1
        else {
-         int aNum = atoi(aLevel.c_str());
+         int aNum = std::stoi(aLevel.c_str());
          if (aNum > 0)
            myNBLevel.push_back(aNum);
          else
        return TDF_Label(); // invalid parentheses
    }
    if (!aLastLevel.empty()) { // get the context
-     size_t aLinePos = aLastLevel.find("_");
-     if (aLinePos != std::string::npos) {
-       std::string aContextName = aLastLevel.substr(aLinePos + 1);
+     size_t aLinePos = aLastLevel.find(L"_");
 -    if (aLinePos != std::string::npos) {
++    if (aLinePos != std::wstring::npos) {
+       std::wstring aContextName = aLastLevel.substr(aLinePos + 1);
        if (!aContextName.empty()) {
          TDF_Label aThisContext, aValue;
          if (theNameGenerator->restoreContext(aContextName, aThisContext, aValue)) {
index 49b0764d7b593cc758185f1d7c69c72054b986ec,07671e2f61305b4ea9e9a640ab0e4ed932b242e7..1aee58ea1e35dda1d201a865b62c59df51efab55
@@@ -22,6 -22,6 +22,8 @@@
  #include <Selector_NameGenerator.h>
  #include <Selector_NExplode.h>
  
++#include <Locale_Convert.h>
++
  #include <TNaming_NamedShape.hxx>
  #include <TDataStd_Name.hxx>
  #include <TDataStd_Integer.hxx>
@@@ -186,24 -186,19 +188,24 @@@ TDF_Label Selector_Intersect::restoreBy
  {
    myShapeType = theShapeType;
    TDF_Label aContext;
--  for(size_t aStart = 0; aStart != std::string::npos; aStart = theName.find('[', aStart + 1)) {
--    size_t anEndPos = theName.find(']', aStart + 1);
--    if (anEndPos != std::string::npos) {
-       std::string aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
++  for(size_t aStart = 0; aStart != std::wstring::npos; aStart = theName.find(L'[', aStart + 1)) {
++    size_t anEndPos = theName.find(L']', aStart + 1);
++    if (anEndPos != std::wstring::npos) {
+       std::wstring aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
 -      if (aSubStr.find(weakNameID()) == 0) { // weak name identifier
 -        std::wstring aWeakIndex = aSubStr.substr(weakNameID().size());
 -        myWeakIndex = stoi(aWeakIndex);
 +      size_t aFoundOldWeak = aSubStr.find(oldWeakNameID());
-       size_t aFoundNewWeak = aFoundOldWeak != std::string::npos ?
++      size_t aFoundNewWeak = aFoundOldWeak != std::wstring::npos ?
 +                             aSubStr.find(weakNameID()) :
 +                             aFoundOldWeak;
 +      if (aFoundOldWeak == 0 || aFoundNewWeak == 0) { // weak name identifier
-         std::string aWeakIndex = aSubStr.substr(aFoundOldWeak + oldWeakNameID().size());
-         myWeakIndex = atoi(aWeakIndex.c_str());
++        std::wstring aWeakIndex = aSubStr.substr(aFoundOldWeak + oldWeakNameID().size());
++        myWeakIndex = atoi(Locale::Convert::toString(aWeakIndex).c_str());
 +        myRecomputeWeakIndex = aFoundOldWeak == 0;
          continue;
        }
        TopAbs_ShapeEnum aSubShapeType = TopAbs_FACE;
--      if (anEndPos != std::string::npos && anEndPos + 1 < theName.size()) {
-         char aShapeChar = theName[anEndPos + 1];
-         if (theName[anEndPos + 1] != '[') {
++      if (anEndPos != std::wstring::npos && anEndPos + 1 < theName.size()) {
+         wchar_t aShapeChar = theName[anEndPos + 1];
 -        if (theName[anEndPos + 1] != '[') {
++        if (theName[anEndPos + 1] != L'[') {
            switch(aShapeChar) {
            case 'e': aSubShapeType = TopAbs_EDGE; break;
            case 'v': aSubShapeType = TopAbs_VERTEX; break;
Simple merge
index 987915eebe6543acbe1a3acf8879001c5ebaad98,08ad66b0e6485fa0b887a3a2e8f545b24b017912..98d1337191e88ce4dde95ff2dac5c91493f067fc
@@@ -241,27 -242,19 +243,27 @@@ bool Selector_Modify::restore(
    return false;
  }
  
- TDF_Label Selector_Modify::restoreByName(std::string theName,
+ TDF_Label Selector_Modify::restoreByName(std::wstring theName,
    const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator* theNameGenerator)
  {
 +  typedef NCollection_DataMap<TopoDS_Shape, bool, TopTools_ShapeMapHasher> MapOfCompsolids;
 +  MapOfCompsolids aWrongSubsCompsolids;
 +
    TDF_Label aContext;
--  for(size_t anEnd, aStart = 0; aStart != std::string::npos; aStart = anEnd) {
++  for(size_t anEnd, aStart = 0; aStart != std::wstring::npos; aStart = anEnd) {
      if (aStart != 0)
        aStart++;
--    anEnd = theName.find('&', aStart);
-     std::string aSubStr =
-       theName.substr(aStart, anEnd == std::string::npos ? anEnd : anEnd - aStart);
++    anEnd = theName.find(L'&', aStart);
+     std::wstring aSubStr =
 -      theName.substr(aStart, anEnd == std::string::npos ? anEnd : anEnd - aStart);
 -    if (aSubStr.find(weakNameID()) == 0) { // weak name identifier
 -      std::wstring aWeakIndex = aSubStr.substr(weakNameID().size());
 -      myWeakIndex = std::stoi(aWeakIndex.c_str());
++      theName.substr(aStart, anEnd == std::wstring::npos ? anEnd : anEnd - aStart);
 +    size_t aFoundOldWeak = aSubStr.find(oldWeakNameID());
-     size_t aFoundNewWeak = aFoundOldWeak != std::string::npos ?
++    size_t aFoundNewWeak = aFoundOldWeak != std::wstring::npos ?
 +                           aSubStr.find(weakNameID()) :
 +                           aFoundOldWeak;
 +    if (aFoundOldWeak == 0 || aFoundNewWeak == 0) { // weak name identifier
-       std::string aWeakIndex = aSubStr.substr(aFoundOldWeak + oldWeakNameID().size());
-       myWeakIndex = atoi(aWeakIndex.c_str());
++      std::wstring aWeakIndex = aSubStr.substr(aFoundOldWeak + oldWeakNameID().size());
++      myWeakIndex = atoi(Locale::Convert::toString(aWeakIndex).c_str());
 +      myRecomputeWeakIndex = aFoundOldWeak == 0;
        continue;
      }
      TDF_Label aSubContext, aValue;
Simple merge
Simple merge
index d93241f73a1e8fa2041ba26e6a89f3b4749a489d,6825fdf9214055727da65b9d07352ab7d46bda5c..02dec6f15df41d8d29ad11857ed34462fb80e6c0
@@@ -47,8 -49,8 +49,8 @@@ bool Selector_Primitive::restore(
    return restoreBaseArray(anEmptyRefList, myFinal);
  }
  
- TDF_Label Selector_Primitive::restoreByName(std::string theName,
+ TDF_Label Selector_Primitive::restoreByName(std::wstring theName,
 -  const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator* theNameGenerator)
 +  const TopAbs_ShapeEnum /*theShapeType*/, Selector_NameGenerator* theNameGenerator)
  {
    TDF_Label aContext;
    if (theNameGenerator->restoreContext(theName, aContext, myFinal)) {
Simple merge
Simple merge
Simple merge
index 813fa0b4e48ba80c9ea4acbfdb32d80b683361d6,6d3ad04552ff95f096623d8b901d39c2630e030a..559071b9c461e8f088a681c1a5de86c3bdcbfdba
@@@ -22,6 -22,6 +22,8 @@@
  #include <Selector_NameGenerator.h>
  #include <Selector_NExplode.h>
  
++#include <Locale_Convert.h>
++
  #include <TNaming_Tool.hxx>
  #include <TNaming_SameShapeIterator.hxx>
  #include <TNaming_Iterator.hxx>
@@@ -85,18 -85,16 +87,18 @@@ bool Selector_WeakName::restore(
    return restoreBaseArray(anEmptyRefList, myContext);
  }
  
- TDF_Label Selector_WeakName::restoreByName(std::string theName,
+ TDF_Label Selector_WeakName::restoreByName(std::wstring theName,
    const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator* theNameGenerator)
  {
 -  std::wstring aWeakIndex = theName.substr(pureWeakNameID().size());
 +  size_t aFoundWeak = theName.find(oldPureWeakNameID());
-   std::string aWeakIndex = theName.substr(aFoundWeak + oldPureWeakNameID().size());
-   std::size_t aContextPosition = aWeakIndex.find("_");
-   myWeakIndex = atoi(aWeakIndex.c_str());
++  std::wstring aWeakIndex = theName.substr(aFoundWeak + oldPureWeakNameID().size());
+   std::size_t aContextPosition = aWeakIndex.find(L"_");
 -  myWeakIndex = std::stoi(aWeakIndex.c_str());
++  myWeakIndex = atoi(Locale::Convert::toString(aWeakIndex).c_str());
 +  myRecomputeWeakIndex = aFoundWeak == 0;
    myShapeType = theShapeType;
    TDF_Label aContext;
-   if (aContextPosition != std::string::npos) { // context is also defined
-     std::string aContextName = aWeakIndex.substr(aContextPosition + 1);
+   if (aContextPosition != std::wstring::npos) { // context is also defined
+     std::wstring aContextName = aWeakIndex.substr(aContextPosition + 1);
      if (theNameGenerator->restoreContext(aContextName, aContext, myContext)) {
        if (myContext.IsNull())
          aContext.Nullify();
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index ed4084afe60dfdeab7e3325746e7afbee31275da,15222805bc54fd20e79d246c6d66ec8dffce85f8..836071aae1bde7627e2242d87364cc3d990ba690
@@@ -645,13 -650,13 +650,13 @@@ void setDimensionColor(const AISObjectP
      theDimPrs->setColor(aColor[0], aColor[1], aColor[2]);
  }
  
- void replaceInName(ObjectPtr theObject, const std::string& theSource, const std::string& theDest)
+ void replaceInName(ObjectPtr theObject, const std::wstring& theSource, const std::wstring& theDest)
  {
-   std::string aName = theObject->data()->name();
+   std::wstring aName = theObject->data()->name();
    size_t aPos = aName.find(theSource);
--  if (aPos != std::string::npos) {
-     std::string aNewName = aName.substr(0, aPos) + theDest
-                          + aName.substr(aPos + theSource.size());
++  if (aPos != std::wstring::npos) {
+     std::wstring aNewName = aName.substr(0, aPos) + theDest
 -                            + aName.substr(aPos + theSource.size());
++                          + aName.substr(aPos + theSource.size());
      theObject->data()->setName(aNewName);
    }
  }
Simple merge
index e226f229e8a22af9f84b98dc27a5c414fa6adf7f,1727756d67a597409dd515e435bc99296c35b50f..0ccd6ae4ff5bd36148b038447de7beaca06eba6f
@@@ -560,9 -558,9 +563,9 @@@ bool SketchPlugin_CopyValidator::isVali
        bool isFound = aSelObject == *anObjIter;
        if (!isFound) {
          // check in the results of the feature
--        FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
--        if (aFeature) {
--          const std::list<ResultPtr>& aResults = aFeature->results();
++        FeaturePtr aCurFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
++        if (aCurFeature) {
++          const std::list<ResultPtr>& aResults = aCurFeature->results();
            for (std::list<ResultPtr>::const_iterator aResIt = aResults.begin();
              aResIt != aResults.end() && !isFound; ++aResIt) {
              isFound = aSelObject == *aResIt;
          }
        }
        if (isFound) {
-         std::string aName = aSelObject.get() ? aSelObject->data()->name() : "";
 -        std::wstring aName = aSelObject.get() ? aSelObject->data()->name() : L"";
++        std::string aName =
++            aSelObject.get() ? Locale::Convert::toString(aSelObject->data()->name()) : "";
          theError = "The object %1 is a result of copy";
          theError.arg(aName);
          return false;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge