fi
# If there are whitespace errors, print the offending file names and fail.
-exec git diff-index --check --cached $against --
+exec git diff-index --check --cached $against -- . ':(exclude)*.rst'
SET(output ${CMAKE_CURRENT_BINARY_DIR}/conf.py)
+SET(DOC_FILES
+ Introduction.rst
+ )
+
CONFIGURE_FILE(${input} ${output})
#sphinx-build -b html -c doc -D latex_paper_size=a4 -d doc/doctree /dn23/PPGP/vsv/SALOME730/SOURCES/PPGP_SRC/doc doc/html
+INSTALL(FILES ${DOC_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
INSTALL(CODE "
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build_index.py ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
--- /dev/null
+\r
+.. _introduction:\r
+\r
+\r
+Introduction to SHAPER\r
+======================\r
+\r
+SHAPER module of SALOME is destined for:\r
+\r
+- import and export of geometrical models in IGES, BREP, STEP and XAO formats;\r
+- parametric construction of geometrical objects using a wide range of functions;\r
+ \r
+ - creation of complex 2D sections using :ref:`sketchPlugin` with consequent extrusion or revolution (see :ref:`featuresPlugin`);\r
+ - construction of model using primitives defined in :ref:`primitivesPlugin`;\r
+ - usage of Boolean operations (see :ref:`featuresPlugin`);\r
+ \r
+- viewing geometrical objects in the OCC viewer;\r
+- transformation of geometrical objects using various algorithms.\r
+\r
+It is possible to easily set :ref:`parameter_usage` predefined to be used as arguments when objects are created.\r
+\r
+SHAPER module preferences are described in the :ref:`preferences` section of SALOME Help.\r
+\r
+Almost all SHAPER module functionalities are accessible via Python Interface.\r
+\r
+SHAPER module works with one study containing several documents:\r
+\r
+- partset\r
+- one or several parts.\r
+\r
+Only one document can be active.\r
+ \r
+New study contains only partset with 7 default constructions which cannot be deleted:\r
+ \r
+- one point **Origin** coinciding with origin of coordinate system;\r
+- three axes **OX**, **OY**, **OZ** coinciding with coordinate axes;\r
+- three planes **YOZ**, **XOZ**, **XOY** coinciding with coordinate planes. \r
+\r
+Only points, axis and planes (see :ref:`constructionPlugin`) and sketches (see :ref:`sketchPlugin`) can be added into Partset to be used in any part later.\r
+:ref:`parameter_usage` can be used both in Partset and any Part.\r
+\r
+ \r
+New Part can be created as described in :ref:`partPlugin`.\r
+\r
+Double click or pop-up menu can be used to activate existing document.\r
+\r
+\r
+Application desktop\r
+-------------------\r
+\r
+The main window of the application consists of the following components:\r
+\r
+- :ref:`main_menu`;\r
+- :ref:`doc_windows`;\r
+- :ref:`viewer`;\r
+- :ref:`toolbar`; \r
+- status bar. \r
+\r
+.. image:: images/main_window.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Main window of SHAPER module\r
+\r
+ \r
+.. _main_menu:\r
+\r
+Main menu \r
+---------\r
+\r
+Main menu provides access to all commands of the application.\r
+\r
+.. image:: images/main_menu.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Main menu\r
+\r
+Main menu includes standard Salome items:\r
+\r
+- File;\r
+- Edit;\r
+- View;\r
+- Tools; \r
+- Window;\r
+- Help;\r
+ \r
+and items specific for SHAPER module:\r
+\r
+- Part (see :ref:`partPlugin`);\r
+- Sketch (see :ref:`sketchPlugin`);\r
+- Construction (see :ref:`constructionPlugin`);\r
+- Build (see :ref:`buildPlugin`);\r
+- Primitives (see :ref:`primitivesPlugin`);\r
+- GDML (see :ref:`gdmlPlugin`);\r
+- Features (see :ref:`featuresPlugin`); \r
+- Macros. \r
+\r
+ .. _toolbar: \r
+\r
+SHAPER toolbar\r
+--------------\r
+\r
+Application toolbar contains:\r
+\r
+- standard toolbar;\r
+- modules toolbar;\r
+- SHAPER toolbar.\r
+\r
+.. image:: images/toolbar.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Toolbars\r
+ \r
+SHAPER toolbar duplicates main menu and provides access to all commands of the application.\r
+\r
+SHAPER toolbar is separated into sections:\r
+\r
+- Part;\r
+- Movement;\r
+- Measurement;\r
+- Sketch;\r
+- Construction;\r
+- Build;\r
+- Primitives;\r
+- GDML;\r
+- Features;\r
+- Boolean;\r
+- Collections; \r
+- Fillet; \r
+- Macros. \r
+\r
+Visibility of SHAPER toolbar sections is managed using *View -> Toolbar* :ref:`main_menu` item or toolbar pop-up menu.\r
+ \r
+ \r
+.. _doc_windows:\r
+\r
+Dock windows\r
+------------\r
+\r
+Standard dock windows are: \r
+\r
+- :ref:`object_browser`\r
+- :ref:`inspection_panel`\r
+- :ref:`python console`\r
+- :ref:`property_panel`\r
+\r
+Dock windows can be placed in three dock areas using drag-and -drop:\r
+ \r
+- left, \r
+- right, \r
+- bottom.\r
+\r
+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.\r
+\r
+Property Panel is hidden.\r
+\r
+The Property Panel is shown on operation start at left dock area of the main window by default.\r
+\r
+If Object Browser is shown at the same side then they will be tabbed.\r
+\r
+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.\r
+\r
+.. image:: images/popup_menu.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Pop-up menu for visibility of windows and toolbars\r
+\r
+\r
+.. _object_browser: \r
+\r
+Object browser\r
+^^^^^^^^^^^^^^\r
+\r
+Object browser contains all documents created in the current study. \r
+\r
+Each document includes standard branches where created objects are placed.\r
+\r
+Documents with branches are shown in Tree View.\r
+\r
+.. image:: images/object_browser.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Object browser. Partset active\r
+\r
+\r
+Partset includes three branches:\r
+\r
+- Parameters;\r
+- Constructions;\r
+- Features \r
+\r
+Part includes the following branches:\r
+\r
+- Parameters;\r
+- Constructions;\r
+- Results;\r
+- Fields;\r
+- Groups; \r
+- Features. \r
+\r
+New part contains only 3 empty branches:\r
+ \r
+- Parameters;\r
+- Constructions;\r
+- Results.\r
+\r
+Features are placed one after another in the active document with default names and their results are placed into the corresponding branch.\r
+\r
+Example of default names assigned automatically for :ref:`box_feature` are:\r
+ \r
+* **Box_1**, **Box_2**, ... to Feature;\r
+* **Box_1_1**, **Box_2_1**, ... to Result.\r
+\r
+Not default branch is added into Tree View when the first feature of this type is created.\r
+\r
+Note, that result used in feature as argument is removed.\r
+\r
+This child result can be restored using **Recover** feature.\r
+\r
+Each feature, result, construction, group, field, parameter can be renamed using *Rename* pop-up menu command.\r
+\r
+.. image:: images/popup_menu_object_browser_feature.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Feature pop-up menu\r
+\r
+.. image:: images/popup_menu_object_browser_result.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Result pop-up menu\r
+\r
+.. image:: images/popup_menu_object_browser_construction.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Construction pop-up menu\r
+\r
+Order of features can be changed using *Move to the end* pop-up menu command. Selected feature will be moved to the end of feature list.\r
+\r
+Folders can be used to arrange long Tree View for features.\r
+\r
+.. image:: images/object_browser_folder.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Object browser with folder Dome. Part_1 active\r
+\r
+*Insert a folder before* pop-up menu command creates a new empty folder before the selected feature. Folder can be renamed.\r
+\r
+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.\r
+\r
+This allows to decrease length of feature list.\r
+\r
+Features can be removed from folder back using *Move out before the folder* / *Move out after the folder* pop-up menu command.\r
+\r
+*Clean history* pop-up menu command looks for features that do not participate in other features.\r
+\r
+**Clean history** dialog box shows list of unused features. After confirmation by click **Yes** button unused features are removed.\r
+\r
+.. image:: images/clean_history.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Clean history** dialog box\r
+\r
+\r
+*Select result* and *Select parent feature* pop-up menu commands help to navigate along Tree View.\r
+\r
+\r
+Feature together with its result can be deleted using *Delete* pop-up menu command.\r
+\r
+Note that all features using removed feature and their results will be removed simultaneously.\r
+\r
+**Delete feature** dialog box shows list of features to be removed. After confirmation by click **Yes** button all these features are removed.\r
+\r
+\r
+.. image:: images/delete_feature.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Delete feature** dialog box\r
+ \r
+.. _property_panel:\r
+\r
+Property panel\r
+^^^^^^^^^^^^^^\r
+\r
+Property panel consists of two parts:\r
+\r
+- controls container for input of parameters for the current operation;\r
+- buttons panel containing standard buttons:\r
+ \r
+ .. image:: images/button_ok.png\r
+ :align: left\r
+ **Ok/Apply** executes operation with defined parameters,\r
+\r
+\r
+ .. image:: images/button_cancel.png\r
+ :align: left\r
+ **Cancel/Close** calls **Abort operation** dialog box to confirm operation abort, \r
+\r
+ .. image:: images/button_help.png\r
+ :align: left\r
+ **Help** calls User's guide opened on page describing the current operation.\r
+\r
+.. image:: images/abort_operation.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Abort operation** dialog box\r
+\r
+\r
+.. image:: images/button_ok.png\r
+ :align: left\r
+**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.\r
+\r
+.. _inspection_panel: \r
+\r
+Inspection panel \r
+^^^^^^^^^^^^^^^^\r
+\r
+Inspection panel provides the list of types and quantities of all topological entities, composing the selected result, construction or feature.\r
+\r
+.. image:: images/inspection_panel.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Inspection panel for default Box\r
+\r
+**Object** displays name of the selected result, construction or feature.\r
+\r
+**Type** characterizes the whole shape.\r
+ \r
+The information about Point, Axis or Edge additionally shows coordinates of point / end points.\r
+\r
+.. image:: images/inspection_panel_line.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Inspection panel for Axis\r
+ \r
+\r
+The information about Plane, Face additionally shows coordinates of center point and direction of normal.\r
+\r
+.. image:: images/inspection_panel_face.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Inspection panel for Face \r
+\r
+.. _python console:\r
+\r
+Python console\r
+^^^^^^^^^^^^^^\r
+\r
+Python console interpreters Python commands entered manually.\r
+\r
+In particular, it is possible to load python script:\r
+\r
+*execfile(r"/dn48/newgeom/data/example.py")*\r
+\r
+Pop-up menu allows:\r
+\r
+- Copy selected text to clipboard;\r
+- Paste text from clipboard to Python console ;\r
+- Clear Python console;\r
+- Dump commands from console into the specified file;\r
+- Start/Stop writing log into the specified file. \r
+ \r
+\r
+.. image:: images/python_console_popup.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Pop-up menu of Python console\r
+\r
+.. _viewer:\r
+\r
+Viewer\r
+------\r
+\r
+The application supports one OCC 3D viewer and is able to show only one 3D space.\r
+\r
+This 3D space can be represented in several view windows. New view window can be created using **Clone view** button in viewer toolbar.\r
+\r
+Each of view windows represents its own point of view on the 3D scene.\r
+\r
+This point of view can be modified by user with help of viewer commands like **Panning**, **Zooming**, **Scaling** and so on.\r
+\r
+\r
+.. image:: images/2_viewers.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Two view windows\r
+\r
+Description of OCC 3D Viewer architecture and functionality is provided in GUI module user's guide in chapter **OCC 3D Viewer**.\r
+\r
+\r
+.. _parameter_usage:\r
+\r
+Parameters \r
+----------\r
+\r
+Model parametrization can be done using parameters.\r
+\r
+Parameter can be created in the active partset or part by:\r
+\r
+- :ref:`parameter`;\r
+- :ref:`parameters`;\r
+- :ref:`parameter_expression`.\r
+\r
+Any argument in features can be defined as parameter or expression containing parameters.\r
+\r
+List of features using parameters is given in **Parameters** dialog box:\r
+\r
+ .. image:: images/parameters_feature.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Parameters dialog box\r
+ \r
+If parameter value is changed, then all features where it is used are rebuilt.\r
+\r
+Parameter name should be unique in the active document.\r
+\r
+However, partset and part can have parameters with the same name. If parameter name in Partset and Part are identical, then Part parameter has higher priority and its value will be used in the features of this part.\r
+\r
+In contrast to features (see :ref:`object_browser`), there is an additional option when Delete parameters. \r
+\r
+.. image:: images/delete_parameter.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Delete parameter\r
+\r
+After click **Replace** button. selected parameter is removed but parent parameters and features are not removed. Deleted parameter is replaced by its value.\r
+\r
+.. _parameter_expression:\r
+\r
+Create parameter on fly\r
+^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+Parameter can be created during feature creation simply writing *variable=expression* in any editbox.\r
+\r
+After validation of feature a new parameter with given name **variable** and value equal to evaluated expression appears in object browser under **Parameters** in the active partset or part.\r
+\r
+.. _preferences:\r
+\r
+SHAPER preferences\r
+------------------\r
+\r
+Description of General application preferences and **Preferences** dialog box is provided in GUI module user's guide in chapter **Setting Preferences**.\r
+\r
+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.\r
+\r
+To call **Preferences** dialog box:\r
+\r
+#. select in the Main Menu *File - > Preferences* item or\r
+#. use **Ctrl+P** shortcut.\r
+\r
+SHAPER preferences include 4 tabs:\r
+\r
+- :ref:`visualization_preferences`;\r
+- :ref:`plugins_preferences`;\r
+- :ref:`sketch_preferences`;\r
+- :ref:`viewer_preferences`.\r
+\r
+Visualization tab is activated by default when **Preferences** dialog box is opened in active SHAPER module.\r
+\r
+Other tabs are activated by click on tab header.\r
+ \r
+.. _visualization_preferences:\r
+\r
+Visualization tab\r
+^^^^^^^^^^^^^^^^^\r
+\r
+This tab defines presentation of objects displayed in OCC 3D viewer.\r
+\r
+.. image:: images/visualization_preferences.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Preferences - Visualization tab\r
+\r
+**Input fields**:\r
+\r
+- **Result color** selects default shading color for objects from **Results** branch;\r
+- **Group color** selects default color for objects from **Groups** branch;\r
+- **Construction color** selects default color for objects from **Constructions** branch;\r
+- **Part color** selects default color for parts shown in Partset; \r
+- **Field color** selects default color for objects from **Fields** branch;\r
+- **Body deflection coefficient** defines default deflection coefficient for objects from **Results** branch. A smaller coefficient provides better quality of a shape in the viewer;\r
+- **Construction deflection coefficient** defines default deflection coefficient for objects from **Constructions** branch. A smaller coefficient provides better quality of a shape in the viewer;\r
+- **Reference shape wireframe color in operation** selects default color used for wireframe visualization of objects used in active operation;\r
+- **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;\r
+- **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;\r
+- **Color of removed feature in operation** selects default color used for visualization of sketch entities to be removed during **Trim/Split** operations;\r
+- **Color of sketch plane** selects default shading color for sketch plane;\r
+- **Hidden faces transparency** defines default transparency value for hidden faces;\r
+- **Dimension arrow size** defines default size of arrows for extension line showing dimensional constraint; \r
+- **Dimension font** defines font used for value of dimensional constraint;\r
+- **Dimension value size** defines default size of value for dimensional constraint;\r
+- **Sketch dimension color** defines default color of dimensional constraint; \r
+- **Construction plane color** selects default color for Construction planes; \r
+- **Sketch entity color** selects default color for sketch objects;\r
+- **Sketch external entity color** selects default color for external objects selected as reference during sketch creation/edition;\r
+- **Sketch auxiliary entity color** selects default color for sketch auxiliary objects;\r
+- **Sketch overconsrtaint color** selects default color for sketch with redundant constraints;\r
+- **Sketch fully constraint color** selects default color for sketch with zero degrees of freedom.\r
+ \r
+To redefine any color click on the corresponding line to access **Select color** dialog box\r
+\r
+.. image:: images/select_color.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Select color** dialog box\r
+ \r
+Preferences for sketch are applicable during sketch creation/edition operation.\r
+ \r
+.. _plugins_preferences:\r
+ \r
+Plugins tab\r
+^^^^^^^^^^^\r
+Plugins tab defines folders where plugins and resources are located.\r
+\r
+.. image:: images/plugins_preferences.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Preferences - Plugins tab\r
+\r
+**Input fields**:\r
+\r
+- **Default path** selects default folder where plugins are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder;\r
+\r
+- **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.\r
+\r
+.. image:: images/open_button.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Open** button\r
+\r
+.. image:: images/find_directory.png\r
+ :align: center\r
+\r
+.. centered::\r
+ **Find directory** dialog box\r
+ \r
+ \r
+.. _sketch_preferences:\r
+ \r
+Sketch tab\r
+^^^^^^^^^^\r
+\r
+Sketch tab defines properties of coordinate planes shown for selection of sketch plane when no convenient objects are shown in OCC 3D viewer.\r
+\r
+.. image:: images/sketch_preferences.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Preferences - Sketch tab\r
+\r
+**Input fields**:\r
+\r
+- **Size** defines size of coordinate planes;\r
+- **Thickness** defines thickness of coordinate plane borders; \r
+- **Rotate to plane when selected** check-box turns on/off automatic switch the viewer to the top view for the selected sketch plane. \r
+\r
+ \r
+.. _viewer_preferences:\r
+ \r
+Viewer tab\r
+^^^^^^^^^^\r
+\r
+Viewer tab defines selection in OCC 3D viewer properties. \r
+\r
+.. image:: images/viewer_preferences.png\r
+ :align: center\r
+\r
+.. centered::\r
+ Preferences - Viewer tab \r
+\r
+**Input fields**:\r
+\r
+- **Default Selection** defines objects to be selected by mouse click in OCC 3D viewer:\r
+\r
+ - **Faces** check-box turns on/off selection of faces;\r
+ - **Edges** check-box turns on/off selection of edges;\r
+ - **Vertices** check-box turns on/off selection of vertices;\r
+\r
+- **Selection sensitivity** defines size of area around object in pixels, in which mouse click selects object inside this area:\r
+\r
+ - **Vertex** defines selection sensitivity for vertices; \r
+ - **Edge** defines selection sensitivity for edges. \r
aConfigPath = aSrcPath + os.sep + "Config/plugins.xml.in"
+def findDir(theConfFile):
+ """Find a name of a directory where the given config file exists"""
+ aSrcList = os.listdir(aSrcPath)
+ for aDir in aSrcList:
+ aPath = aSrcPath + os.sep + aDir
+ aConfPath = aPath + os.sep + theConfFile
+ if os.path.isdir(aPath) and (os.path.exists(aConfPath) or os.path.exists(aConfPath + ".in")):
+ return aDir
+ return None
+
## Find accessible plugins from plugins.xml configuration file
aPluginList = []
aDomObj = parse(aConfigPath)
aLibName = plugin.getAttribute("library")
if not aLibName:
aLibName = plugin.getAttribute("script")
+ aConfigFile = plugin.getAttribute("configuration")
- if aLibName:
- aPluginDocDir = aSrcPath + os.sep + aLibName + os.sep + "doc"
- aDocDist = aBuildDir + os.sep + aLibName
- if os.path.exists(aPluginDocDir):
- ## Copy all files to a building directory
- if os.path.exists(aDocDist):
- shutil.rmtree(aDocDist)
- shutil.copytree(aPluginDocDir, aDocDist)
- aPluginList.append(aLibName)
+ if aLibName and aConfigFile:
+ aLibDir = findDir(aConfigFile)
+ if not aLibDir is None:
+ aPluginDocDir = aSrcPath + os.sep + aLibDir + os.sep + "doc"
+ if os.path.exists(aPluginDocDir):
+ ## Copy all files to a building directory
+ aDocDist = aBuildDir + os.sep + aLibName
+ if os.path.exists(aDocDist):
+ shutil.rmtree(aDocDist)
+ shutil.copytree(aPluginDocDir, aDocDist)
+ aPluginList.append(aLibName)
## Modify index.rst file accordingly
aIndexFile = open(aSourcesDir + os.sep + "index.rst.in", 'r')
aNewIndex = open(aBuildDir + os.sep + "index.rst", 'w')
aNewIndex.writelines(aIndexLines)
-aNewIndex.close()
\ No newline at end of file
+aNewIndex.close()
Welcome to SHAPER's documentation!
==================================
+- :ref:`introduction`
+
.. toctree::
:titlesonly:
:maxdepth: 1
--- /dev/null
+
+ .. _tui_create_compound:
+
+Create Compound
+===============
+
+.. literalinclude:: examples/compound.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/compound.py>`
+
--- /dev/null
+
+ .. _tui_create_compsolid:
+
+Create CompSolid
+================
+
+.. literalinclude:: examples/compsolid.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/compsolid.py>`
+
--- /dev/null
+
+ .. _tui_create_edge:
+
+Create Edge
+===========
+
+.. literalinclude:: examples/edge.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/edge.py>`
+
--- /dev/null
+
+ .. _tui_create_face:
+
+Create Face
+===========
+
+.. literalinclude:: examples/face.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/face.py>`
+
--- /dev/null
+
+ .. _tui_create_filling:
+
+Create Filling
+==============
+
+.. literalinclude:: examples/filling.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/filling.py>`
+
--- /dev/null
+
+ .. _tui_create_interpolation:
+
+Create Interpolation
+====================
+
+.. literalinclude:: examples/interpolation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/interpolation.py>`
+
--- /dev/null
+
+ .. _tui_create_polyline:
+
+Create Polyline
+===============
+
+.. literalinclude:: examples/polyline.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/polyline.py >`
+
--- /dev/null
+
+ .. _tui_create_shell:
+
+Create Shell
+============
+
+.. literalinclude:: examples/shell.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/shell.py>`
+
--- /dev/null
+
+ .. _tui_create_solid:
+
+Create Solid
+============
+
+.. literalinclude:: examples/solid.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/solid.py>`
+
--- /dev/null
+
+ .. _tui_create_subshape:
+
+Create Sub-shapes
+=================
+
+.. literalinclude:: examples/subshapes.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/subshapes.py >`
+
--- /dev/null
+
+ .. _tui_create_vertex:
+
+Create Vertex
+=============
+
+.. literalinclude:: examples/vertex.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/vertex.py>`
+
--- /dev/null
+
+ .. _tui_create_wire:
+
+Create Wire
+===========
+
+.. literalinclude:: examples/wire.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/wire.py>`
+
Compound
========
+The Compound feature creates a compound using already existing shapes in other objects.
+
+To create compound in the active part:
+
+#. select in the Main Menu *Build - > Compound* item or
+#. click **Compound** button in the toolbar
+
+.. image:: images/feature_compound.png
+ :align: center
+
+.. centered::
+ **Compound** button
+
+The following property panel will be opened:
.. image:: images/Compound.png
:align: center
.. centered::
Create a compound
+
+Select one or several shapes in a viewer. Selected shapes can be of any type (vertex, edge, face and so on).
+
+**Apply** button creates compound.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addCompound(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be a compound created from selected shapes:
+
+.. image:: images/CreateCompound.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_compound` operation.
CompSolid
=========
+The Compsolid feature creates a compsolid using already existing shapes in other objects.
+
+To create compsolid in the active part:
+
+#. select in the Main Menu *Build - > CompSolid* item or
+#. click **CompSolid** button in the toolbar
+
+.. image:: images/feature_compsolid.png
+ :align: center
+
+.. centered::
+ **CompSolid** button
+
+The following property panel will be opened:
.. image:: images/Compsolid.png
:align: center
.. centered::
Create a compsolid
+
+Select one or several shapes in a viewer.
+
+**Apply** button creates compsolid.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addCompSolid(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be a compsolid created from the selected shapes:
+
+.. image:: images/CreateCompsolid.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_compsolid` operation.
Edge
====
+The Edge feature creates one or several edges using already existing edges in other objects.
+
+To create edges in the active part:
+
+#. select in the Main Menu *Build - > Edge* item or
+#. click **Edge** button in the toolbar
+
+.. image:: images/feature_edge.png
+ :align: center
+
+.. centered::
+ **Edge** button
+
+The following property panel will be opened:
.. image:: images/Edge.png
:align: center
.. centered::
- Create an edge
+ Create edges
+
+Select one or several edges in viewer.
+
+**Apply** button creates edges.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addEdge(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be set of edges created from selected shapes:
+
+.. image:: images/CreateEdge.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_edge` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Compound_1_objects = [model.selection("FACE", "Box_1_1/Front"),
+ model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Back&Box_1_1/Top")]
+Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+CompSolid_1 = model.addCompSolid(Part_1_doc, [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Edge_1_objects = [model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Front&Box_1_1/Left")]
+Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"),
+ model.selection("FACE", "Box_1_1/Front")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Edges = [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top")]
+Filling_1 = model.addFilling(Part_1_doc, Edges)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Interpolation_1_objects = [model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top")]
+Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, True, False)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Point_2 = model.addPoint(Part_1_doc, -10, -5, -7)
+Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Point_1")])
+Polyline_1_objects = [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Bottom")]
+Polyline_1 = model.addPolyline3D(Part_1_doc, Polyline_1_objects, False)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"),
+ model.selection("FACE", "Box_1_1/Front")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Solid_1_objects = [model.selection("FACE", "Box_1_1/Top"),
+ model.selection("FACE", "Box_1_1/Front"),
+ model.selection("FACE", "Box_1_1/Left"),
+ model.selection("FACE", "Box_1_1/Back"),
+ model.selection("FACE", "Box_1_1/Right"),
+ model.selection("FACE", "Box_1_1/Bottom")]
+Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(-56.65008576329333, 13.33962264150944, 9.528301886792452, 66.69811320754719)
+SketchLine_1.result().setColor(225, 0, 0)
+SketchLine_2 = Sketch_1.addLine(9.528301886792452, 66.69811320754719, 78.47855917667239, -27.54545454545455)
+SketchLine_2.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(78.47855917667239, -27.54545454545455, 7.795883361921087, -89.2195540308748)
+SketchLine_3.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(7.795883361921087, -89.2195540308748, 12.64665523156088, -20.9622641509434)
+SketchLine_4.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(12.64665523156088, -20.9622641509434, -56.65008576329333, 13.33962264150944)
+SketchLine_5.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_1.startPoint())
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r")])
+SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Vertex_1_objects = [model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom")]
+Vertex_1 = model.addVertex(Part_1_doc, Vertex_1_objects)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Wire_1_objects = [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"),
+ model.selection("EDGE", "Box_1_1/Back&Box_1_1/Top")]
+Wire_1 = model.addWire(Part_1_doc, Wire_1_objects)
+model.do()
+model.end()
Face
====
+The Face feature creates one or several faces using already existing faces in other objects.
+To create face in the active part:
+
+#. select in the Main Menu *Build - > Face* item or
+#. click **Face** button in the toolbar
+
+.. image:: images/feature_face.png
+ :align: center
+
+.. centered::
+ **Face** button
+
+The following property panel will be opened:
+
.. image:: images/Face.png
:align: center
.. centered::
Create a face
+
+Select one or several faces in viewer.
+
+**Apply** button creates faces.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addFace(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be set of faces created from selected shapes:
+
+.. image:: images/CreateFace.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_face` operation.
- Filling
- =======
+Filling
+=======
+The Filling feature creates one or several faces using already existing edges or wires in other objects.
+
+To create filling in the active part:
+
+#. select in the Main Menu *Build - > Filling* item or
+#. click **Filling** button in the toolbar
+
+.. image:: images/feature_filling.png
+ :align: center
+
+.. centered::
+ **Filling** button
+
+The following property panel will be opened:
.. image:: images/Filling.png
:align: center
.. centered::
Create a filling
+
+Select two or more edges in a viewer.
+
+**Advanced options** lets to manage filling process.
+
+**Apply** button creates a filling.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addFilling(Part_doc, Edges)*
+
+**Arguments**: Part document + list of edges.
+
+Result
+""""""
+
+The result of the operation will be set of faces created from selected shapes:
+
+.. image:: images/CreateFilling.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_filling` operation.
Interpolation
=============
+The Interpolation feature creates curve (wire) using already existing vertices in other objects.
+
+To create interpolation in the active part:
+
+#. select in the Main Menu *Build - > Interpolation* item or
+#. click **Interpolation** button in the toolbar
+
+.. image:: images/feature_interpolation.png
+ :align: center
+
+.. centered::
+ **Interpolation** button
+
+The following property panel will be opened:
.. image:: images/Interpolation.png
:align: center
.. centered::
Create an interpolation
+
+Select one or several vertices or points in a viewer.
+
+- **Closed** makes the interpolation curve closed.
+
+- **Reorder** reorders selected points to minimize length of the curve.
+
+- **Tangents** makes start and end of the curve tangent to selected edges. User has to select edges for start and end in corresponded fields.
+
+**Apply** button creates an interpolation.
+
+**Cancel** button cancels operation.
+
+**TUI Command**:
+
+- *model.addInterpolation(Part_doc, Points, IsClosed, IsReordered)*.
+
+**Arguments**: Part document + list of points + is closed + is reordered.
+
+- *model.addInterpolation(Part_doc, Points, StartEdge, EndEdge, IsClosed, IsReordered)*.
+
+**Arguments**: Part document + list of points + start edge + end edge + is closed + is reordered.
+
+Result
+""""""
+
+The result of the operation will be a curve created from selected shapes:
+
+.. image:: images/CreateInterpolation.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_interpolation` operation.
Polyline
========
+The feature **Polyline** creates a wire.
+
+To create a Polyline in the active part:
+
+#. select in the Main Menu *Build - > Polyline* item or
+#. click **Polyline** button in the toolbar
+
+.. image:: images/feature_polyline.png
+ :align: center
+
+.. centered::
+ **Polyline** button
+
+The following property panel appears.
.. image:: images/Polyline.png
:align: center
.. centered::
- Create a polyline
+ Polyline property panel
+
+Input fields:
+
+- **Points and vertices** panel contains list of points and vertices selected in 3D OCC viewer. Polyline consequently connects points;
+- **Closed** check-box turns on/off connection of the start and end points to make polyline closed/opened.
+
+**TUI Commands**: *model.addPolyline3D(Part_1_doc, Polyline_objects, Key)*
+
+**Arguments**: 1 part+ list of vertices selected in format *model.selection("VERTEX", "Point")* + boolean key defining presence of connection between the start and end points.
+
+Result
+""""""
+Result of operation is closed or open Polyline.
+
+.. image:: images/CreatePolyline.png
+ :align: center
+
+.. centered::
+ Polyline
+
+**See Also** a sample TUI Script of a :ref:`tui_create_polyline` operation.
\ No newline at end of file
Shell
=====
+The Shell feature creates a shell using already existing faces in other objects.
+
+To create shell in the active part:
+
+#. select in the Main Menu *Build - > Shell* item or
+#. click **Shell** button in the toolbar
+
+.. image:: images/feature_shell.png
+ :align: center
+
+.. centered::
+ **Shell** button
+
+The following property panel will be opened:
.. image:: images/Shell.png
:align: center
.. centered::
Create a shell
+
+Select one or several faces in viewer.
+
+**Apply** button creates a shell.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addShell(Part_doc, Objects)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be shell created from selected shapes:
+
+.. image:: images/CreateShell.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_shell` operation.
Solid
=====
+The Solid feature creates a solid using already existing faces in other objects.
+
+To create solid in the active part:
+
+#. select in the Main Menu *Build - > Solid* item or
+#. click **Solid** button in the toolbar
+
+.. image:: images/feature_solid.png
+ :align: center
+
+.. centered::
+ **Solid** button
+
+The following property panel will be opened:
.. image:: images/Solid.png
:align: center
.. centered::
Create a solid
+
+Select one or several faces in viewer. Selected faces have to define a closed volume
+
+**Apply** button creates solid.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addSolid(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be a solid created from selected shapes:
+
+.. image:: images/CreateSolid.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_solid` operation.
Sub-shapes
==========
+The feature **Sub-shapes** lets to modify selected entity creating a non-manifold topology. It provides:
+
+* add/remove vertices laying on edges of a wire;
+* add/remove edges and vertices laying on a face.
+
+To create Sub-shapes in the active part:
+
+#. select in the Main Menu *Build - > Sub-shapes* item or
+#. click **Sub-shapes** button in the toolbar
+
+.. image:: images/feature_subshapes.png
+ :align: center
+
+.. centered::
+ **Sub-shapes** button
+
+The following property panel appears.
.. image:: images/SubShapes.png
:align: center
.. centered::
- Create sub-shapes
+ Sub-shapes property panel
+
+Input fields:
+
+- **Shape** panel contains a shape to be modified. Shape is selected in 3D OCC viewer or object browser. For today it has to be wire or face;
+- **Sub-shapes** panel contains list of sub-shapes which are already included into result. A sub-shape can be deleted from the list or the list can be extended with new shapes selected in the view.
+
+**TUI Command**: *model.addSubShapes(Part_doc, shape, sub-shapes)*
+
+**Arguments**: 1 part + shape in format *model.selection(TYPE, shape)* + list of sub-shapes in format *model.selection(TYPE, subshape)*.
+
+Result
+""""""
+Result replaces original shape with the same one with added/removed sub-shapes.
+
+.. image:: images/CreateSubShapes.png
+ :align: center
+
+.. centered::
+ Sub-shapes
+
+**See Also** a sample TUI Script of a :ref:`tui_create_subshape` operation.
+
+
+
+
Vertex
======
+The Vertex feature creates one or several vertices using already existing vertices in other objects.
+
+To create vertices in the active part:
+
+#. select in the Main Menu *Build - > Vertex* item or
+#. click **Vertex** button in the toolbar
+
+.. image:: images/feature_vertex.png
+ :align: center
+
+.. centered::
+ **Vertex** button
+
+The following property panel will be opened:
.. image:: images/Vertex.png
:align: center
.. centered::
- Create a vertex
+ Create vertices
+
+Select one or several vertices in viewer.
+
+**Apply** button creates vertices.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addVertex(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be set of vertices created from selected shapes:
+
+.. image:: images/CreateVertex.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_vertex` operation.
Wire
====
+The Wire feature creates a wire using already existing edges in other objects.
+
+To create wire in the active part:
+
+#. select in the Main Menu *Build - > Wire* item or
+#. click **Wire** button in the toolbar
+
+.. image:: images/feature_wire.png
+ :align: center
+
+.. centered::
+ **Wire** button
+
+The following property panel will be opened:
.. image:: images/Wire.png
:align: center
.. centered::
Create a wire
+
+Select one or several edges in viewer. For automatic selection of closed contour starting from a selected edge it is necessary to press **Add contour** button.
+
+**Apply** button creates wire.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addWire(Part_doc, Shapes)*
+
+**Arguments**: Part document + list of shapes.
+
+Result
+""""""
+
+The result of the operation will be a wire created from selected shapes:
+
+.. image:: images/CreateWire.png
+ :align: center
+
+.. centered::
+ Result of the operation.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_wire` operation.
<workbench id="Build" document="Part">
<group id="Generate">
<feature id="Vertex" title="Vertex" tooltip ="Create a vertex from sketch vertex and vertex objects" icon="icons/Build/feature_vertex.png"
- helpfile="BuildPlugin/vertexFeature.html">
+ helpfile="vertexFeature.html">
<source path="vertex_widget.xml"/>
</feature>
<feature id="Edge" title="Edge" tooltip ="Create an edge from sketch edges and edge objects" icon="icons/Build/feature_edge.png"
- helpfile="BuildPlugin/edgeFeature.html">
+ helpfile="edgeFeature.html">
<source path="edge_widget.xml"/>
</feature>
<feature id="Interpolation" title="Interpolation" tooltip ="Create an interpolation curve from points" icon="icons/Build/feature_interpolation.png"
- helpfile="BuildPlugin/interpolationFeature.html">
+ helpfile="interpolationFeature.html">
<source path="interpolation_widget.xml"/>
</feature>
<feature id="Wire" title="Wire" tooltip ="Create a wire from sketch edges, edges and wires objects" icon="icons/Build/feature_wire.png"
- helpfile="BuildPlugin/wireFeature.html">
+ helpfile="wireFeature.html">
<source path="wire_widget.xml"/>
</feature>
<feature id="Polyline" title="Polyline" tooltip ="Create a polyline from points" icon="icons/Build/feature_polyline.png"
- helpfile="BuildPlugin/polylineFeature.html">
+ helpfile="polylineFeature.html">
<source path="polyline_widget.xml"/>
</feature>
<feature id="Face" title="Face" tooltip ="Create a face from sketch edges, edges and wires objects" icon="icons/Build/feature_face.png"
- helpfile="BuildPlugin/faceFeature.html">
+ helpfile="faceFeature.html">
<source path="face_widget.xml"/>
</feature>
<feature id="Shell" title="Shell" tooltip ="Create a shell from faces or shells objects" icon="icons/Build/feature_shell.png"
- helpfile="BuildPlugin/shellFeature.html">
+ helpfile="shellFeature.html">
<source path="shell_widget.xml"/>
</feature>
<feature id="Solid" title="Solid" tooltip ="Create a solid from faces or shells" icon="icons/Build/feature_solid.png"
- helpfile="BuildPlugin/solidFeature.html">
+ helpfile="solidFeature.html">
<source path="solid_widget.xml"/>
</feature>
<feature id="CompSolid" title="CompSolid" tooltip ="Create a compsolid from solids or another compsolids" icon="icons/Build/feature_compsolid.png"
- helpfile="BuildPlugin/compsolidFeature.html">
+ helpfile="compsolidFeature.html">
<source path="compsolid_widget.xml"/>
</feature>
<feature id="Compound" title="Compound" tooltip ="Create a compound of objects" icon="icons/Build/feature_compound.png"
- helpfile="BuildPlugin/compoundFeature.html">
+ helpfile="compoundFeature.html">
<source path="compound_widget.xml"/>
</feature>
</group>
<group id="Modify">
<feature id="SubShapes" title="Sub-Shapes" tooltip ="Allows to add or to remove sub-shapes of the selected shape" icon="icons/Build/feature_subshapes.png"
- helpfile="BuildPlugin/subShapesFeature.html">
+ helpfile="subShapesFeature.html">
<source path="subshapes_widget.xml"/>
</feature>
</group>
<group id="Advanced">
<feature id="Filling" title="Filling" tooltip="Create face from list of edges" icon="icons/Build/feature_filling.png"
- helpfile="BuildPlugin/fillingFeature.html">
+ helpfile="fillingFeature.html">
<source path="filling_widget.xml"/>
</feature>
</group>
--- /dev/null
+
+ .. _tui_create_field:
+
+Create Field
+============
+
+.. literalinclude:: examples/field.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/field.py>`
--- /dev/null
+
+ .. _tui_create_group:
+
+Create Group
+============
+
+.. literalinclude:: examples/group.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/group.py>`
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Field_1 = model.addField(Part_1_doc, 2, "DOUBLE", 2, ["DX", "DY"], [model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Top")])
+Field_1.addStep(0, 0, [[0.1, 0.2], [2.1, 1.7], [3.7, 1.95]])
+Field_1.addStep(1, 31, [[0.1, 0.2], [1.1, 2.1], [0.75, 3.1]])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")])
+Group_1.setName("edges_cone")
+Group_1.result().setName("edges_cone")
+model.do()
+model.end()
Field
=====
+A field object assigns some values to geometrical entities. These values can be later transferred to mesh entities generated on the geometrical entities during export to MED file in Mesh module. Geometrical fields can be stored in/restored from XAO format files. Note that only integer and double values can be exported into the MED file.
-.. image:: images/Field.png
+The field can hold several named values (components) per a geometrical entity.
+
+The field can include several sets of data called steps, each dedicated to a certain time moment.
+
+To create Field in the active part:
+
+#. select in the Main Menu *Features - > Field* item or
+#. click **Field** button in Shaper toolbar:
+
+.. image:: images/field.png
+ :align: center
+
+.. centered::
+ Field button
+
+The following property panel appears.
+
+.. image:: images/field_property_panel.png
:align: center
.. centered::
Create a field
+
+Input fields:
+
+- **Type of shapes** selects geometrical entities on which field values will be assigned from drop-down list:
+
+ - Vertices;
+ - Edges;
+ - Faces;
+ - Solids;
+ - Objects;
+ - Parts;
+
+- **Type of field** selects type of field values from drop-down list:
+
+ - Boolean;
+ - Integer;
+ - Double;
+ - String;
+
+- **Nb. Components** defines number of named values (components) assigned to each geometrical entity;
+- **Stamp** sets time stamp for the current time step;
+- **Current step** slider navigates through added steps;
+- table of values for each step:
+
+ - number of rows depends on number of entities selected in OCC 3D viewer;
+ - **Default value** row contains values assigned to not selected entities of parent shape with given type;
+ - number of columns depends on **Nb. Components**;
+ - to rename component double-click a column header;
+
+- **Add Step** button adds a new time step;
+- **Remove Step** button deletes the current time step.
+
+
+**TUI Command**: *model.addField(Part_1_doc, 2, "DOUBLE", 2, ["DX", "DY"], [model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Top")])*
+
+**Arguments**: 1 part + integer (number of steps) + text (Type of field) + integer (number of components) + list of text (names of components) + list of objects
+
+**TUI Command**: *Field_1.addStep(step, stamp, [[0.1, 0.2], [2.1, 1.7], [3.7, 1.95]])*
+
+**Arguments**: 2 integers + list of lists of values with Type of field
+
+**See Also** a sample TUI Script of a :ref:`tui_create_field` operation.
Group
=====
+To create Group in the active part:
-.. image:: images/Group.png
+#. select in the Main Menu *Features - > Group* item or
+#. click **Group** button in Shaper toolbar:
+
+.. image:: images/shape_group.png
+ :align: center
+
+.. centered::
+ Group button
+
+The following property panel appears.
+
+.. image:: images/group_property_panel.png
:align: center
.. centered::
Create a group
+
+Input fields:
+
+- **Name** defines the name of the group, by default, it is **Group_n**.
+- **Type** buttons select geometrical entities to be included in group:
+
+ .. image:: images/group_property_panel_vertice.png
+ :align: left
+ Vertices;
+
+ .. image:: images/group_property_panel_edge.png
+ :align: left
+ Edges;
+
+ .. image:: images/group_property_panel_face.png
+ :align: left
+ Faces;
+
+ .. image:: images/group_property_panel_solid.png
+ :align: left
+ Solids;
+
+- List of selected entities of given type. Multiply selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection.
+
+To delete entities from the list, select them and call pop-up menu *Delete* item.
+
+
+**TUI Command**: *model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")])*
+
+**Arguments**: 1 part + list of selected entities with type
+
+
+Result
+""""""
+
+Created Group appears in the view.
+
+.. image:: images/group_res.png
+ :align: center
+
+.. centered::
+ Group created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_group` operation.
tooltip="Create named collection of geometry entities"
icon="icons/Collection/shape_group.png"
apply_continue="true"
- helpfile="CollectionPlugin/groupFeature.html">
+ helpfile="groupFeature.html">
<source path="group_widget.xml"/>
</feature>
title="Field"
tooltip="Create fields for selected shapes"
icon="icons/Collection/field.png"
- helpfile="CollectionPlugin/fieldFeature.html">
+ helpfile="fieldFeature.html">
<field-panel id="selected"
filter_points="false" >
<validator id="GeomValidators_BodyShapes"/>
getProperty(theFeatureNode, FEATURE_TOOLTIP));
outFeatureMessage->setIcon(getProperty(theFeatureNode, FEATURE_ICON));
outFeatureMessage->setKeysequence(getProperty(theFeatureNode, FEATURE_KEYSEQUENCE));
- outFeatureMessage->setHelpFileName(getProperty(theFeatureNode, HELP_FILE));
+ std::string aHelpFile = getProperty(theFeatureNode, HELP_FILE);
+ if (!aHelpFile.empty())
+ outFeatureMessage->setHelpFileName(myLibraryName + "/" + aHelpFile);
std::string aGroupName = restoreAttribute(NODE_GROUP, _ID);
std::string aWBNName = restoreAttribute(NODE_WORKBENCH, _ID);
Connector plug-in
=================
+
+To export Results, Groups, Fields created in active part into GEOM module:
+
+#. select in the Main Menu *Feature - > Export to GEOM* item or
+#. click **Export to GEOM** button in Shaper toolbar:
+
+.. image:: images/geom_export.png
+ :align: center
+
+.. centered::
+ Export to GEOM button
+
+**TUI Command**: *model.exportGEOM(part)*
+
+**Arguments**: 1 part
+
+Result can be checked in GEOM module.
\ No newline at end of file
Construction plug-in
====================
+Construction plug-in includes features for creation of different constructive objects. It provides following features:
+
.. toctree::
:titlesonly:
:maxdepth: 1
--- /dev/null
+
+ .. _tui_create_axis:
+
+Create Axis
+===========
+
+.. literalinclude:: examples/axis.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/axis.py>`
+
--- /dev/null
+
+ .. _tui_create_plane:
+
+Create Plane
+============
+
+.. literalinclude:: examples/plane.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/plane.py>`
+
--- /dev/null
+
+ .. _tui_create_point:
+
+Create Point
+============
+
+.. literalinclude:: examples/point.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/point.py>`
+
Axis
====
+
+The feature Axis creates a new constructive axis line.
+
+Axis is a construction object and it can be created as in a part as in part set. To create an axis:
+
+#. select in the Main Menu *Construction - > Axis* item or
+#. click **Axis** button in the toolbar
+
+.. image:: images/axis_button.png
+ :align: center
+
+.. centered::
+ **Axis** button
+
+There are 6 algorithms for creation of an Axis:
+
+.. image:: images/axis_dxyz_32x32.png
+ :align: left
+**By three dimensions** creates an axis by dimensions along X, Y, Z axes starting form existing origin.
+
+.. image:: images/by_two_points_32x32.png
+ :align: left
+**By two points** creates an axis using existing points.
+
+.. image:: images/axis_by_line_32x32.png
+ :align: left
+**By line** creates an axis using a line.
+
+.. image:: images/axis_by_line_32x32.png
+ :align: left
+**As an axis of cilindrical face** creates an axis using a cilindrical face.
+
+.. image:: images/axis_by_line_32x32.png
+ :align: left
+**By plane and point** creates an axis using a plane and point.
+
+.. image:: images/axis_by_line_32x32.png
+ :align: left
+**By two planes** creates an axis as intersection of two planes.
+
+By three dimensions
+"""""""""""""""""""
+
+.. image:: images/Axis1.png
+ :align: center
+
+.. centered::
+ **By dX, dY, dZ values**
+
+In this case user has to define dX, dY, dZ values of a vector.
+
+**TUI Commands**: *model.addAxis(Part_doc, 10, 10, 10)*
+
+**Arguments**: Part + 3 values (dX, dY, dZ values).
+
+By two points
+"""""""""""""
+
+.. image:: images/Axis2.png
+ :align: center
+
+.. centered::
+ **By two points**
+
+In this case user has to select two points or vertices.
+
+**TUI Commands**: *model.addAxis(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))*
+
+**Arguments**: Part + 2 vertices.
+
+By line
+"""""""
+
+.. image:: images/Axis3.png
+ :align: center
+
+.. centered::
+ **By a line**
+
+In this case user has to select a linear edge.
+
+**TUI Commands**: *model.addAxis(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))*
+
+**Arguments**: Part + edge.
+
+As an axis of cilindrical face
+""""""""""""""""""""""""""""""
+
+.. image:: images/Axis4.png
+ :align: center
+
+.. centered::
+ **By a cylinder**
+
+In this case user has to select a cylindrical face. Axis of the cylinder will define an axis object.
+
+**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))*
+
+**Arguments**: Part + cylindrical face.
+
+By plane and point
+""""""""""""""""""
+
+.. image:: images/Axis5.png
+ :align: center
+
+.. centered::
+ **By a plane and point**
+
+In this case user has to select a point or vertex and plane (or planar face). Axis will be defined as a normal from the point to the plane.
+
+**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))*
+
+**Arguments**: Part + plane + point.
+
+By two planes
+"""""""""""""
+
+.. image:: images/Axis6.png
+ :align: center
+
+.. centered::
+ **By two planes**
+
+In this case user has to select two planes. Intersection of that planes defines an axis. User can define offset for axis definition from both planes.
+
+**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)*
+
+**Arguments**: Part + plane + offcet value + is reversed flag + plane + offcet value + is reversed flag.
+
+Result
+""""""
+
+The Result of the operation will be an axis:
+
+.. image:: images/CreatedAxis.png
+ :align: center
+
+.. centered::
+ Axis created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_axis` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Axis_4 = model.addAxis(Part_1_doc, 10, 10, 10)
+Axis_5 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))
+Axis_6 = model.addAxis(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Axis_7 = model.addAxis(Part_1_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))
+Axis_8 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))
+Axis_9 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc,
+ model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+ model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)
+Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)
+Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"),
+ model.selection("FACE", "Box_1_1/Right"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Point_2 = model.addPoint(Part_1_doc, 50, 50, 50)
+Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)
+Point_4 = model.addPoint(Part_1_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))
+Point_5 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)
+Point_6 = model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))
+model.do()
+model.end()
Plane
=====
+
+The feature Plane creates a new constructive plane.
+
+Plane is a construction object and it can be created as in a part as in part set. To create a plane:
+
+#. select in the Main Menu *Construction - > Plane* item or
+#. click **Point** button in the toolbar
+
+.. image:: images/plane_button.png
+ :align: center
+
+.. centered::
+ **Plane** button
+
+There are 4 algorithms for creation of a Plane:
+
+.. image:: images/plane_by_three_points_32x32.png
+ :align: left
+**By three points** creates a plane by three points.
+
+.. image:: images/plane_by_line_and_point_32x32.png
+ :align: left
+**By line and point** creates a plane by a line and a point.
+
+.. image:: images/plane_by_other_plane_32x32.png
+ :align: left
+**By other plane** creates a plane parallel to another plane.
+
+.. image:: images/plane_by_two_parallel_planes_32x32.png
+ :align: left
+**By two parallel planes** creates a plane between two parallel planes.
+
+By three points
+"""""""""""""""
+
+.. image:: images/Plane1.png
+ :align: center
+
+.. centered::
+ **By three points**
+
+In this case user has to select three points in a viewer to define a new plane.
+
+**TUI Commands**: *model.addPlane(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))*
+
+**Arguments**: Part + 3 vertices.
+
+By line and point
+"""""""""""""""""
+
+.. image:: images/Plane2.png
+ :align: center
+
+.. centered::
+ **Line and point**
+
+In this case user has to select a linear edge and point to define a plane. It is possible to make the new plane perpendicular to the selected edge.
+
+**TUI Commands**: *model.addPlane(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)*
+
+**Arguments**: Part + line + point + is perpendicular to line flag.
+
+By other plane
+""""""""""""""
+
+.. image:: images/Plane3.png
+ :align: center
+
+.. centered::
+ **By other plane**
+
+In this case user has to select an already existing plane (planar face). There are following possibilities to define a new plane:
+
+.. image:: images/plane_by_distance_from_other_24x24.png
+ :align: left
+
+By distance from the selected plane.
+
+.. image:: images/plane_by_coincident_to_point_24x24.png
+ :align: left
+
+By coincidence to a point.
+
+.. image:: images/plane_by_rotation_24x24.png
+ :align: left
+
+By rotation around an edge on a specified angle.
+
+**TUI Commands**: *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)*
+
+**Arguments**: Part + a plane + offset + is reverse flag.
+
+
+By two parallel planes
+""""""""""""""""""""""
+
+.. image:: images/Plane4.png
+ :align: center
+
+.. centered::
+ **By two parallel planes**
+
+In this case user has to select two parallel planes. A new plane will be defined between them.
+
+**TUI Commands**: *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))*
+
+**Arguments**: Part + 2 planes.
+
+Result
+""""""
+
+The Result of the operation will be a plane:
+
+.. image:: images/CreatedPlane.png
+ :align: center
+
+.. centered::
+ Plane created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_plane` operation.
Point
=====
+
+The feature Point creates a new constructive point.
+
+Point is a construction object and it can be created as in a part as in part set. To create a point:
+
+#. select in the Main Menu *Construction - > Point* item or
+#. click **Point** button in the toolbar
+
+.. image:: images/point_button.png
+ :align: center
+
+.. centered::
+ **Point** button
+
+There are 5 algorithms for creation of a Point:
+
+.. image:: images/point_by_xyz_32x32.png
+ :align: left
+**By X,Y,Z** creates a point by three coordinates.
+
+.. image:: images/point_by_distance_on_edge_32x32.png
+ :align: left
+**By distance on edge** creates a point on an edge.
+
+.. image:: images/point_by_projection_32x32.png
+ :align: left
+**By projection on edge or plane** creates a point projecting of existing point on an edge or plane.
+
+.. image:: images/point_by_intersection_32x32.png
+ :align: left
+**By intersection of objects** creates a point by intersection of planes or/ and edges.
+
+.. image:: images/point_by_geometrical_property_32x32.png
+ :align: left
+**By geometrical property of object** creates a point in COG or center of arc or circle.
+
+By X,Y,Z
+""""""""
+
+.. image:: images/Point1.png
+ :align: center
+
+.. centered::
+ **By X,Y,Z coordinates**
+
+In this case user has to input X, Y, and Z coordinates.
+
+**TUI Commands**: *model.addPoint(Part_doc, 50, 50, 50)*
+
+**Arguments**: Part + 3 values (X, Y, Z coordinates).
+
+By distance on edge
+"""""""""""""""""""
+
+.. image:: images/Point2.png
+ :align: center
+
+.. centered::
+ **Along an edge**
+
+In this case user has to select an edge in a viewer and to define a distance along the edge where point will be defined. This distance can be defined as by an absolute value as by relative as a ratio to the edge length. The direction of the edge can be reverced by the corresponded check box.
+
+**TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)*
+
+**Arguments**: Part + edge + value + is by ratio flag + to reverce flag.
+
+By projection on edge or plane
+""""""""""""""""""""""""""""""
+
+.. image:: images/Point3.png
+ :align: center
+
+.. centered::
+ **By projection**
+
+In this case user has to select an existing point or vertex and an edge or face. The new point will be created by projection of the selected point on the edge or face.
+
+**TUI Commands**: *model.addPoint(Part_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))*
+
+**Arguments**: Part + vertex + edge (or plane).
+
+By intersection of objects
+""""""""""""""""""""""""""
+
+.. image:: images/Point4.png
+ :align: center
+
+.. centered::
+ **Intersection of objects**
+
+In this case user has to select:
+
+#. two edges,
+#. edge and plane,
+#. three planes
+
+The new point will be defined by intersection of selected objects.
+
+**TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)*
+
+**Arguments**: Part + edge + plane (planar face) + offset value + is offcet reversed.
+
+By geometrical property of object
+"""""""""""""""""""""""""""""""""
+
+.. image:: images/Point5.png
+ :align: center
+
+.. centered::
+ **By geometrical property**
+
+In this case the new point can be defined as a center of gravity of selected object or as a center of a circle. User has to select desirable object.
+
+**TUI Commands**: *model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))*
+
+**Arguments**: Part + solid
+
+Result
+""""""
+
+The Result of the operation will be a construction point:
+
+.. image:: images/CreatePoint.png
+ :align: center
+
+.. centered::
+ Point created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_point` operation.
title="Point"
tooltip="Create point"
icon="icons/Construction/point.png"
- helpfile="ConstructionPlugin/pointFeature.html">
+ helpfile="pointFeature.html">
<source path="point_widget.xml" />
</feature>
<feature
title="Axis"
tooltip="Create axis"
icon="icons/Construction/axis.png"
- helpfile="ConstructionPlugin/axisFeature.html">
+ helpfile="axisFeature.html">
<source path="axis_widget.xml" />
</feature>
<feature
title="Plane"
tooltip="Create plane"
icon="icons/Construction/plane.png"
- helpfile="ConstructionPlugin/planeFeature.html">
+ helpfile="planeFeature.html">
<source path="plane_widget.xml" />
</feature>
</group>
Exchange plug-in
================
+Exchange plug-in implements features for data exchange. It provides following:
+
.. toctree::
:titlesonly:
:maxdepth: 1
--- /dev/null
+
+ .. _tui_export_file:
+
+Export File
+===========
+
+.. literalinclude:: examples/export.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/export.py>`
+
--- /dev/null
+
+ .. _tui_import_file:
+
+Import File
+===========
+
+.. literalinclude:: examples/import.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/import.py>`
+
Dump
====
+
+The feature Dump allows to export a current study to a Python script wich dumps process of creation of the study as a sequence of Python commands.
+
+It is possible to dump current study state into a Python script. To dump a study:
+
+#. select in the Main Menu *Part - > Dump* item or
+#. click **Dump** button in the toolbar.
+
+.. image:: images/dump.png
+ :align: center
+
+.. centered::
+ **Dump** button
+
+The following property panel will be opened:
+
+.. image:: images/Dump_panel.png
+ :align: center
+
+.. centered::
+ **Dump property panel**
+
+In this panel it is necessary to enter a file name directly into input field or press **'...'** button and browse it with help of dump file dialog box:
+
+.. image:: images/DumpFileDlg.png
+ :align: center
+
+.. centered::
+ **Dump file dialog box**
+
+**Apply** button writes the dump file.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: Is not supported.
+
+Result
+""""""
+
+The Result of the operation is a Python file.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Export_1 = model.exportToFile(Part_1_doc, "/dn48/newgeom/vsv/test.step",
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Import_1 = model.addImport(Part_1_doc, "/dn48/newgeom/for_gzy/gzy_data/Compound_2.brep")
+model.do()
+Import_1.setName("Compound_2")
+Import_1.result().setName("Compound_2_1")
+Import_1.result().subResult(0).setName("Compound_2_1_1")
+Import_1.result().subResult(1).setName("Compound_2_1_2")
+Import_1.result().subResult(2).setName("Compound_2_1_3")
+Import_1.result().subResult(3).setName("Compound_2_1_4")
+Import_1.result().subResult(4).setName("Compound_2_1_5")
+model.do()
+model.end()
Export
======
+
+The feature export allows to export objects from the current study to an external file.
+
+It is possible to export objects into files in following formats: BREP, STEP, IGES, XAO. To export objects to a file:
+
+#. select in the Main Menu *Part - > Export* item or
+#. click **Export** button in the toolbar.
+
+.. image:: images/export.png
+ :align: center
+
+.. centered::
+ **Export** button
+
+The following property panel will be opened:
+
+.. image:: images/Export_panel.png
+ :align: center
+
+.. centered::
+ **Export property panel**
+
+In this panel it is necessary to select desirable format of export file. It can be **'BREP, STEP, IGES'** or **'XAO'**. In case of first choice the format of exported file will be defined according to file extension. File name and path can be defined in **Export file** field. It can be typed or browsed with help of **'...'** button which opens **Export file** dialog box:
+
+.. image:: images/ExportFileDlg.png
+ :align: center
+
+.. centered::
+ **Export file dialog box**
+
+Selection list in property panel should contain a list of exporting objects which can be selected in a viewer or objects browser.
+
+**Apply** button exports the file.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.exportToFile(Part_doc, FileNameString, ObjectsList)*
+
+**Arguments**: Part + file name string + list of objects.
+
+Result
+""""""
+
+The Result of operation is exported file. There are no any changes in object browser or viewer.
+
+**See Also** a sample TUI Script of a :ref:`tui_export_file` operation.
Import
======
+
+The feature Import allows to import an external file into a current study.
+
+It is possible to import files in following formats: BREP, STEP, IGES, XAO. To import a file into active part:
+
+#. select in the Main Menu *Part - > Import* item or
+#. click **Import** button in the toolbar.
+
+.. image:: images/import.png
+ :align: center
+
+.. centered::
+ **Import** button
+
+The following property panel will be opened:
+
+.. image:: images/Import_panel.png
+ :align: center
+
+.. centered::
+ **Import property panel**
+
+In this panel it is possible to enter a file name directly into input field or press **'...'** button and browse it with help of import file dialog box:
+
+.. image:: images/OpenFileDlg.png
+ :align: center
+
+.. centered::
+ **Import file dialog box**
+
+**Apply** button imports the file.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addImport(Part_doc, FileNameString)*
+
+**Arguments**: Part + file name string.
+
+Result
+""""""
+
+The Result of the operation depends on content of imported file.
+
+.. image:: images/FileImported.png
+ :align: center
+
+.. centered::
+ Import of BREP file.
+
+**See Also** a sample TUI Script of a :ref:`tui_import_file` operation.
<workbench id="Part">
<group id="Exchange">
<feature id="Import" title="Import" tooltip="Import a file" icon="icons/Exchange/import.png" document="Part"
- helpfile="ExchangePlugin/importFeature.html">
+ helpfile="importFeature.html">
<file_selector id="file_path" title="Import file" path="">
<validator id="ExchangePlugin_ImportFormat" parameters="BREP|BRP:BREP,STEP|STP:STEP,IGES|IGS:IGES,XAO:XAO" />
</file_selector>
</feature>
<feature id="Export" title="Export" tooltip="Export to file" icon="icons/Exchange/export.png"
- helpfile="ExchangePlugin/exportFeature.html">
+ helpfile="exportFeature.html">
<source path="export_widget.xml" />
</feature>
<feature id="Dump" title="Dump" tooltip="Dump python script" icon="icons/Exchange/dump.png"
- helpfile="ExchangePlugin/dumpFeature.html">
+ helpfile="dumpFeature.html">
<export_file_selector id="file_path"
type="save"
title="Dump to file"
.. _featuresPlugin:
-
Features plug-in
================
+Features plug-in implements a set of common topological operations. It implements following features:
.. toctree::
:titlesonly:
--- /dev/null
+
+ .. _tui_create_angularcopy:
+
+Create Angular copy
+===================
+
+.. literalinclude:: examples/angularcopy.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/angularcopy.py >`
+
--- /dev/null
+
+ .. _tui_create_common:
+
+Create Common
+=============
+
+.. literalinclude:: examples/common.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/common.py>`
+
--- /dev/null
+
+ .. _tui_create_cut:
+
+Create Cut
+==========
+
+.. literalinclude:: examples/cut.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/cut.py>`
+
--- /dev/null
+
+ .. _tui_create_fill:
+
+Create Fill
+===========
+
+.. literalinclude:: examples/fill.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fill.py>`
+
--- /dev/null
+
+ .. _tui_create_fillet1:
+
+Create Fillet by fixed radius
+=============================
+
+.. literalinclude:: examples/fillet1.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fillet1.py >`
+
--- /dev/null
+
+ .. _tui_create_fillet2:
+
+Create Fillet by variable radius
+================================
+
+.. literalinclude:: examples/fillet2.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fillet2.py >`
+
--- /dev/null
+
+ .. _tui_create_fuse:
+
+Create Fuse
+===========
+
+.. literalinclude:: examples/fuse.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fuse.py>`
+
--- /dev/null
+
+ .. _tui_create_intersection:
+
+Create Intersection
+===================
+
+.. literalinclude:: examples/intersection.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/intersection.py>`
+
--- /dev/null
+
+ .. _tui_create_linearcopy:
+
+Create Linear copy
+==================
+
+.. literalinclude:: examples/linearcopy.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/linearcopy.py >`
--- /dev/null
+
+ .. _tui_create_partition:
+
+Create Partition
+================
+
+.. literalinclude:: examples/partition.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/partition.py>`
+
--- /dev/null
+
+ .. _tui_binormal_pipe:
+
+Pipe by object, path and Bi-normal
+==================================
+
+.. literalinclude:: examples/pipe_binormal.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/pipe_binormal.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_locations_pipe:
+
+Pipe by object, path and locations
+==================================
+
+.. literalinclude:: examples/pipe_locations.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/pipe_locations.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_simple_pipe:
+
+Pipe by object and path
+=======================
+
+.. literalinclude:: examples/pipe_simple.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/pipe_simple.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_create_placement:
+
+Create Placement
+================
+
+.. literalinclude:: examples/placement.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/placement.py>`
+
--- /dev/null
+
+ .. _tui_rotation_3points:
+
+Rotation by center and points
+=============================
+
+.. literalinclude:: examples/rotation2.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/rotation2.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_rotation_axis:
+
+Rotation by axis and angle
+==========================
+
+.. literalinclude:: examples/rotation1.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/rotation1.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_Scale_XYZ:
+
+Scale by different factors along axes
+=====================================
+
+.. literalinclude:: examples/scaleXYZ.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/scaleXYZ.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_Scale_common_factor:
+
+Scale by one common factor
+==========================
+
+.. literalinclude:: examples/scalefactor.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/scalefactor.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_create_smash:
+
+Create Smash
+============
+
+.. literalinclude:: examples/smash.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/smash.py>`
+
--- /dev/null
+
+ .. _tui_symmetry_axis:
+
+Symmetry through an Axis of symmetry
+====================================
+
+.. literalinclude:: examples/symmetryaxis.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/symmetryaxis.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_symmetry_plane:
+
+Symmetry through a Plane of symmetry
+====================================
+
+.. literalinclude:: examples/symmetryplane.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/symmetryplane.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_symmetry_point:
+
+Symmetry through a Point of symmetry
+====================================
+
+.. literalinclude:: examples/symmetrypoint.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/symmetrypoint.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_translation_2points:
+
+Translation by 2 points
+=======================
+
+.. literalinclude:: examples/translation2points.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/translation2points.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_translation_DXDYDZ:
+
+Translation by vector
+=====================
+
+.. literalinclude:: examples/translationDXDYDZ.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/translationDXDYDZ.py >`
\ No newline at end of file
--- /dev/null
+
+ .. _tui_translation_vector:
+
+Translation by axis and distance
+================================
+
+.. literalinclude:: examples/translationvector.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/translationvector.py >`
+
--- /dev/null
+
+ .. _tui_create_union:
+
+Create Union
+============
+
+.. literalinclude:: examples/union.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/union.py>`
+
Angular copy
============
+The feature **Angular copy** makes a compound of several rotated shapes basing on the initial shape.
+
+To create Angular copy in the active part:
+
+#. select in the Main Menu *Part - > Angular copy* item or
+#. click **Angular copy** button in the toolbar
+
+.. image:: images/multirotation.png
+ :align: center
+
+.. centered::
+ **Angular copy** button
+
+The following property panel appears.
.. image:: images/AngularCopy.png
:align: center
.. centered::
- Angular copy definition
+ Angular copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
+- **Vector of rotation** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser;
+- **Angular Step** check-box turns on/off definition of the angle by which the object is rotated. By default (if the checkbox is not checked), **Angular Step** = 2 * PI / NbTimes;
+- **Nb. Copies** defines the number of rotated shape copies in the resulting compound. If **Nb. Copies** = 1, the result contains only the initial shape.
+
+**TUI Command**: *model.addMultiRotation(Part_doc, [shape], axis, step, Nb)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (step value) + integer (Nb. Copies).
+
+Result
+""""""
+Result of cylinder rotation is compound.
+
+.. image:: images/angularcopy.png
+ :align: center
+
+.. centered::
+ Angular copy
+
+**See Also** a sample TUI Script of a :ref:`tui_create_angularcopy` operation.
Common
======
+The feature Common implements a boolean operation for extraction of a common part from a set of selected shapes.
+To perform a boolean opration Common in the active part:
+
+#. select in the Main Menu *Features - > Common* item or
+#. click **Common** button in the toolbar
+
+.. image:: images/common_btn.png
+ :align: center
+
+.. centered::
+ **Common** button
+
+The following property panel will be opened:
+
.. image:: images/Common.png
:align: center
.. centered::
- Common definition
+ **Common operation**
+
+- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be common with tool objects.
+- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be common with main objects.
+- **See preview** button shows a result of the operation.
+
+**TUI Command**: *model.addCommon(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**: Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a common for all selected shapes:
+
+.. image:: images/CreatedCommon.png
+ :align: center
+
+.. centered::
+ **Common created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_common` operation.
Cut
===
+The feature Cut implements a boolean operation to cut tool objects from a main objects.
+
+To perform a boolean opration Cut in the active part:
+
+#. select in the Main Menu *Features - > Cut* item or
+#. click **Cut** button in the toolbar
+
+.. image:: images/bool_cut.png
+ :align: center
+
+.. centered::
+ **Cut** button
+
+The following property panel will be opened:
.. image:: images/Cut.png
:align: center
.. centered::
- Cut definition
+ **Cut operation**
+
+- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut by tool objects.
+- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut main objects.
+- **See preview** button shows a result of the operation.
+
+**TUI Command**: *model.addCut(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**: Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a cut of tool objects from main objects:
+
+.. image:: images/CreatedCut.png
+ :align: center
+
+.. centered::
+ **Cut created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_cut` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+AngularCopy_1 = model.addMultiRotation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OY"), 90, 3)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Common_1 = model.addCommon(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1")],
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Cut_1 = model.addCut(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1")],
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Fill_1 = model.addFill(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1")],
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"), model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 2)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 1, 3)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Fuse_1 = model.addFuse(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1")],
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Intersection_1 = model.addIntersection(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1"),
+ model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")], model.selection("EDGE", "PartSet/OX"), 30, 3, model.selection("EDGE", "PartSet/OY"), 30, 2)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Partition_1 = model.addPartition(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1"), model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_1 = Sketch_1.addLine(72.2418524871355, 29.96679215537161, -69.82505995666611, 29.96679215537161)
+SketchLine_1.result().setColor(225, 0, 0)
+SketchLine_2 = Sketch_1.addLine(-69.82505995666611, 29.96679215537161, -69.82505995666611, -40.02291624943114)
+SketchLine_2.result().setColor(225, 0, 0)
+SketchLine_3 = Sketch_1.addLine(-69.82505995666611, -40.02291624943114, 72.2418524871355, -40.02291624943114)
+SketchLine_3.result().setColor(225, 0, 0)
+SketchLine_4 = Sketch_1.addLine(72.2418524871355, -40.02291624943114, 72.2418524871355, 29.96679215537161)
+SketchLine_4.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+model.do()
+Point_2 = model.addPoint(Part_1_doc, 0, 100, 40)
+Point_3 = model.addPoint(Part_1_doc, 0, 260, 60)
+Interpolation_1_objects = [model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")]
+Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False)
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")])
+Pipe_1 = model.addPipe(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Interpolation_1_1"), model.selection("EDGE", "PartSet/OX"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 100, False)
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), 120, False)
+Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("YOZ"))
+SketchCircle_1 = Sketch_1.addCircle(-17.96171526586622, -340.274716981132, 71.31826129521251)
+SketchCircle_1.result().setColor(225, 0, 0)
+SketchCircle_1.results()[1].setColor(225, 0, 0)
+model.do()
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
+SketchCircle_2 = Sketch_2.addCircle(46.42844892447576, -229.9982953588847, 114.4484521366094)
+SketchCircle_2.result().setColor(225, 0, 0)
+SketchCircle_2.results()[1].setColor(225, 0, 0)
+model.do()
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
+SketchCircle_3 = Sketch_3.addCircle(121.2811188302094, -19.85285601110755, 120.5601403551194)
+SketchCircle_3.result().setColor(225, 0, 0)
+SketchCircle_3.results()[1].setColor(225, 0, 0)
+model.do()
+Interpolation_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchCircle_1"), model.selection("VERTEX", "Sketch_2/Vertex-SketchCircle_2"), model.selection("VERTEX", "Sketch_3/Vertex-SketchCircle_3")]
+Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False)
+Edge_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_3/Edge-SketchCircle_3_2")]
+Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects)
+Pipe_1_objects_1 = [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_3")]
+Pipe_1 = model.addPipe(Part_1_doc, Pipe_1_objects_1, model.selection("EDGE", "Interpolation_1_1"), [])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from SketchAPI import *
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ"))
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchPoint_1.result().setColor(170, 0, 225)
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 40)
+SketchCircle_1.result().setColor(225, 0, 0)
+SketchCircle_1.results()[1].setColor(225, 0, 0)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 40)
+model.do()
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")])
+Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False)
+SketchLine_1 = SketchProjection_2.createdFeature()
+SketchLine_1.result().setColor(170, 0, 225)
+SketchArc_1 = Sketch_2.addArc(30, 0, 0, 0, 40.50885209855912, 28.09918197333542, True)
+SketchArc_1.result().setColor(225, 0, 0)
+SketchArc_1.results()[1].setColor(225, 0, 0)
+SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.result(), SketchArc_1.center())
+SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchArc_1.startPoint())
+SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_1.results()[1], 30)
+model.do()
+Pipe_1 = model.addPipe(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "Sketch_2/Edge-SketchArc_1_2"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front"))
+SketchCircle_1 = Sketch_1.addCircle(20, 6, 3)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc,
+ [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")],
+ model.selection(), -10, 0)
+Placement_1 = model.addPlacement(Part_1_doc,
+ [model.selection("SOLID", "Extrusion_1_1")],
+ model.selection("FACE", "Extrusion_1_1/From_Face_1"),
+ model.selection("FACE", "Box_1_1/Front"), False, True)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Rotation_1 = model.addRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-Cone_1")], model.selection("EDGE", "PartSet/OX"), 120)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_3"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+Scale_1 = model.addScale(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")] , model.selection("VERTEX", "PartSet/Origin"), 2 , 3, 4)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Scale_1 = model.addScale(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")] , model.selection("VERTEX", "PartSet/Origin"), 2)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+ model.selection("VERTEX", "PartSet/Origin"),
+ model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Smash_1 = model.addSmash(Part_1_doc,
+ [model.selection("SOLID", "Cylinder_1_1")],
+ [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "Cylinder_1_1/Face_1"), False)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("FACE", "Cylinder_1_1/Face_2"), True)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("VERTEX", "PartSet/Origin"), True)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], 10, 20, 50)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("EDGE", "Cone_1_1/Face_1"), 40)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(71, -15, -32, -15)
+SketchLine_2 = Sketch_1.addLine(-32, -15, -32, -56)
+SketchLine_3 = Sketch_1.addLine(-32, -56, 71, -56)
+SketchLine_4 = Sketch_1.addLine(71, -56, 71, -15)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchLine_5 = Sketch_1.addLine(3, -15, 36, -56)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result())
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc,
+ [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_5r"),
+ model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f")],
+ model.selection(), 10, 0)
+Union_1 = model.addUnion(Part_1_doc,
+ [model.selection("SOLID", "Extrusion_1_1_1"),
+ model.selection("SOLID", "Extrusion_1_1_2")])
+model.do()
+model.end()
Fill
====
+The feature Fill implements a boolean operation for filling of main objects by parts of tool objects.
+
+To perform a boolean opration Fill in the active part:
+
+#. select in the Main Menu *Features - > Fill* item or
+#. click **Fill** button in the toolbar
+
+.. image:: images/bool_fill.png
+ :align: center
+
+.. centered::
+ **Fill** button
+
+The following property panel will be opened:
.. image:: images/Fill.png
:align: center
.. centered::
- Fill definition
+ **Fill operation**
+
+- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut and filled by tool objects.
+- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will cut and filled the main objects.
+- **See preview** button shows a result of the operation.
+
+**TUI Command**: *model.addFill(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**: Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a fill of tool objects with main objects:
+
+.. image:: images/CreatedFill.png
+ :align: center
+
+.. centered::
+ **Fill created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fill` operation.
Fillet
======
+The feature **Fillet** creates fillets on the edges of a shape.
-.. image:: images/Fillet.png
+To create Fillet in the active part:
+
+#. select in the Main Menu *Feature - > Fillet* item or
+#. click **Fillet** button in the toolbar
+
+.. image:: images/fillet.png
+ :align: center
+
+.. centered::
+ **Fillet** button
+
+There are 2 types of fillet:
+
+ .. image:: images/fillet_fixed_radius.png
+ :align: left
+ fillet by fixed radius
+
+ .. image:: images/fillet_var_radius.png
+ :align: left
+ fillet by variable radius
+
+Fillet by fixed radius
+----------------------
+
+The property panel is shown below.
+
+.. image:: images/FilletFixed.png
:align: center
.. centered::
- Fillet by fixed radius
+ Fillet by fixed radius property panel
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Radius** defines fillet radius.
+
+**TUI Command**: *model.addFillet(Part_doc, [face,edge], radius)*
+
+**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + real (radius value).
+
+Result
+""""""
+
+Result of **Fillet by fixed radius** is shown below.
+.. image:: images/fillet_fix_rad.png
+ :align: center
-.. image:: images/Fillet2.png
+.. centered::
+ Fillet by fixed radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet1` operation.
+
+Fillet by variable radius
+-------------------------
+
+Alternatively, there is a possibility to create a fillet with a variable radius.
+
+.. image:: images/FilletVarious.png
:align: center
.. centered::
- Fillet by varyable radius
+ Fillet by variable radius
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Start radius** defines the fillet radius at the start of the selected edge(s);
+- **End radius** defines the fillet radius at the end of the selected edge(s).
+
+**TUI Command**: *model.addFillet(Part_doc, [face,edge], R1, R2)*
+
+**Arguments**: part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + 2 reals (start and end radius values).
+
+Result
+""""""
+
+Result of **Fillet by variable radius** is shown below.
+
+.. image:: images/fillet_var_rad.png
+ :align: center
+
+.. centered::
+ Fillet by variable radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet2` operation.
Fuse
====
+The feature Fuse implements a boolean operation for fision of a set of main objects with a set of tool objects.
+
+To perform a boolean opration Fuse in the active part:
+
+#. select in the Main Menu *Features - > Fuse* item or
+#. click **Fuse** button in the toolbar
+
+.. image:: images/bool_fuse.png
+ :align: center
+
+.. centered::
+ **Fuse** button
+
+The following property panel will be opened:
.. image:: images/Fuse.png
:align: center
.. centered::
- Fuse definition
+ **Fuse operation**
+
+- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be fused with tool objects.
+- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will fused with main objects.
+- **See preview** button shows a result of the operation.
+
+**TUI Command**: *model.addFuse(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**: Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a fuse of tool objects with main objects:
+
+.. image:: images/CreatedFuse.png
+ :align: center
+
+.. centered::
+ **Fuse created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fuse` operation.
Intersection
============
+The feature Intersection implements a boolean operation for intersection of a set of main objects with a set of tool objects.
+
+To perform a boolean opration Intersection in the active part:
+
+#. select in the Main Menu *Features - > Intersection* item or
+#. click **Intersection** button in the toolbar
+
+.. image:: images/intersection_btn.png
+ :align: center
+
+.. centered::
+ **Intersection** button
+
+The following property panel will be opened:
.. image:: images/Intersection.png
:align: center
.. centered::
- Intersection definition
+ **Intersection operation**
+
+**Base Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be intersected.
+
+**TUI Command**: *model.addIntersection(Part_doc, Objects)*
+
+**Arguments**: Part + list of objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is an intersection of selected objects:
+
+.. image:: images/CreatedIntersection.png
+ :align: center
+
+.. centered::
+ **Intersection created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_intersection` operation.
Linear copy
===========
+The feature **Linear copy** makes several translations of a selected shape in one or two directions.
+
+To create Linear copy in the active part:
+
+#. select in the Main Menu *Part - > Linear copy* item or
+#. click **Linear copy** button in the toolbar
+
+.. image:: images/multitranslation.png
+ :align: center
+
+.. centered::
+ **Linear copy** button
+
+The following property panel appears.
.. image:: images/LinearCopy.png
:align: center
.. centered::
- Linear copy
+ Linear copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **First direction** defines translation in the first direction:
+
+ - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+ - **Step** defines the distance between the shape copies;
+ - **Nb. Copies** is the number of shape copies;
+
+- **Second direction** check-box turns on/off translation in the second direction:
+
+ - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+ - **Step** defines the distance between the shape copies;
+ - **Nb. Copies** defines the number of shape copies.
+
+**TUI Command**: *model.addMultiTranslation(Part_doc, [shape], axis1, step1, Nb1, axis2, step2, Nb2)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 axis in format *model.selection(TYPE, shape)*+ 2 real (step values) + 2 integers (Nb. Copies).
+
+Result
+""""""
+Result of operation is compound.
+
+.. image:: images/linearcopy.png
+ :align: center
+
+.. centered::
+ Linear copy
+
+**See Also** a sample TUI Script of a :ref:`tui_create_linearcopy` operation.
\ No newline at end of file
Measurement
===========
+The feature **Measurement** calculates dimensions of sub-elements of a geometrical object (shape).
+
+The measured dimension is displayed in the property panel and shown in 3D OCC viewer.
+
+The properties of dimension text and line, such as font, color, arrow size, etc. can be defined in the Preferences :ref:`visualization_preferences`.
+
+**Apply** button does not generate any result and has the same effect as **Cancel** for this feature.
+
+To start Measurement in the active part:
+
+#. select in the Main Menu *Part - > Measurement* item or
+#. click **Measurement** button in the toolbar
+
+.. image:: images/measurement.png
+ :align: center
+
+.. centered::
+ **Measurement** button
+
+The following dimensions can be calculated:
+
+ .. image:: images/meas_length_32x32.png
+ :align: left
+ edge length
+
+ .. image:: images/meas_distance_32x32.png
+ :align: left
+ distance between objects
+
+ .. image:: images/meas_radius_32x32.png
+ :align: left
+ radius
+
+ .. image:: images/meas_angle_32x32.png
+ :align: left
+ angle between edges
+
+ .. image:: images/meas_angle3p_32x32.png
+ :align: left
+ angle by 3 points
+
+Edge length
+-----------
+
+The length can be measured for straight or curved edge built on two points.
.. image:: images/Measurement1.png
:align: center
.. centered::
Edge length
+Input fields:
+
+- **Edge** contains edge to be measured selected in 3D OCC viewer or object browser.
+Note, that for curved edges length is displayed only in the property panel.
-.. image:: images/Measurement2.png
+**TUI Command**: *length =model.measureLength(Part_doc, edge)*
+
+**Arguments**: part + edge in format *model.selection("EDGE", edge)*.
+
+
+Distance between objects
+------------------------
+
+**Distance between objects** calculates minimal distance for any pair of shapes: vertex, edge, face, solid.
+
+ .. image:: images/Measurement2.png
:align: center
.. centered::
Distance between objects
+Input fields:
+
+- **From**, **To** contain shapes between which distance is measured. Shapes are selected in 3D OCC viewer or object browser.
+**TUI Command**: *length =model.measureDistance(Part_doc, shape1, shape2)*
+
+**Arguments**: part + 2 shapes in format *model.selection("TYPE", shape)*.
+
+Radius
+------
+
+**Radius** calculates radius for circular edge or cylindrical face.
.. image:: images/Measurement3.png
:align: center
.. centered::
Radius
+Input fields:
+
+- **Object** contains shape to be measured selected in 3D OCC viewer or object browser.
+
+**TUI Command**: *radius = model.measureRadius(Part_doc, shape)*
+
+**Arguments**: part + shape in format *model.selection("TYPE", shape)*.
+
+Angle between edges
+-------------------
+
+**Angle between edges** calculates angle between the selected pair of edges in the point of intersection. If there are several points of intersection, then angles are calculated in all points.
.. image:: images/Measurement4.png
:align: center
.. centered::
Angle between edges
+Input fields:
+
+- **First Edge**, **Second edge** contain edges between which angle is measured. Edges are selected in 3D OCC viewer or object browser.
+
+**TUI Command**: *angle = model.measureAngle(Part_doc, edge1, edge2)*
+
+**Arguments**: part + 2 edges in format *model.selection("EDGE", edge)*.
+Angle by 3 points
+-----------------
+
+**Angle by 3 points** calculates angle between the selected three points. The second point is in the corner of the angle.
.. image:: images/Measurement5.png
:align: center
.. centered::
Angle by 3 points
+
+Input fields:
+
+- **First point**, **Second point**, **Third point** contain point between which angle is measured. Points are selected in 3D OCC viewer or object browser.
+
+**TUI Command**: *angle = model.measureAngle(Part_doc, vertex1, vertex2, vertex3)*
+
+**Arguments**: part + 3 vertices in format *model.selection("VERTEX", vertex)*.
+
\ No newline at end of file
Partition
=========
+The feature Partition implements a boolean operation for partitioning of a set of selected objects.
+
+To perform a boolean opration Partition in the active part:
+
+#. select in the Main Menu *Features - > Partition* item or
+#. click **Partition** button in the toolbar
+
+.. image:: images/partition_btn.png
+ :align: center
+
+.. centered::
+ **Partition** button
+
+The following property panel will be opened:
.. image:: images/Partition.png
:align: center
.. centered::
- Partition definition
+ **Partition operation**
+
+**Base Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be partitioned.
+
+**TUI Command**: *model.addPartition(Part_doc, objects)*
+
+**Arguments**: Part + list of objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a partition of selected objects:
+
+.. image:: images/CreatedPartition.png
+ :align: center
+
+.. centered::
+ **Partition created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_partition` operation.
Pipe
====
+The feature **Pipe** makes an extruded Pipe shape.
+
+To create Pipe in the active part:
+
+#. select in the Main Menu *Features - > Pipe* item or
+#. click **Pipe** button in the toolbar
+
+.. image:: images/pipe.png
+ :align: center
+
+.. centered::
+ **Pipe** button
+
+Pipe can be created in three different ways:
+
+ .. image:: images/pipe_simple_32x32.png
+ :align: left
+ by object and path
+
+ .. image:: images/pipe_binormal_32x32.png
+ :align: left
+ by object, path and Bi-normal
+
+ .. image:: images/pipe_locations_32x32.png
+ :align: left
+ by object, path and locations
+
+Pipe by object and path
+-----------------------
+
+Base Objects are extruded along the Path Object so that the angle between the normal vector to the base shape and the tangent to the path remain constant at any point of the given path.
.. image:: images/Pipe1.png
:align: center
.. centered::
- Pipe by object and path
+ Pipe by object and path property panel
+
+Input fields:
+
+- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser;
+- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser;
+
+**TUI Command**: *model.addPipe(Part_doc, [shape], path)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+Result of extrusion of arc along another arc.
+
+.. image:: images/simplePipe.png
+ :align: center
+
+.. centered::
+ Pipe by object and path
+
+**See Also** a sample TUI Script of a :ref:`tui_simple_pipe` operation.
+Pipe by object, path and Bi-normal
+----------------------------------
+
+The pipe is generated to preserve the constant angle between the normal vector to the base shape and the BiNormal vector at any point of the given path.
.. image:: images/Pipe2.png
:align: center
.. centered::
- Pipe by object, path and Bi-normal
+ Pipe by object, path and Bi-normal property panel
+
+Input fields:
+
+- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser;
+- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser;
+- **Bi-Normal** defines the BiNormal Vector. **Bi-Normal** (edge or wire) is selected in 3D OCC viewer or object browser.
+
+**TUI Command**: *model.addPipe(Part_doc, [shape], path, binormal)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + binormal in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+Result of extrusion of rectangular face along arc.
+
+.. image:: images/binormalPipe.png
+ :align: center
+
+.. centered::
+ Pipe by object and path
+
+**See Also** a sample TUI Script of a :ref:`tui_binormal_pipe` operation.
+Pipe by object, path and locations
+----------------------------------
+
+The pipe is generated to preserve selected profiles at the specified locations along path.
.. image:: images/Pipe3.png
:align: center
.. centered::
- Pipe by object, path and locations
+ Pipe by object, path and locations property panel
+
+Input fields:
+
+- **Base objects** panel contains shapes to be extruded. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser;
+- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser;
+- **Locations** define list of vertices that specify the locations of extruded Base Objects on the resulting Path Object. The number of Base Objects should be equal to the number of Locations.
+
+**TUI Command**: *model.addPipe(Part_doc, [shape], path, locations)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + list of locations in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+Result of extrusion of 3 circles along arc with specified locations.
+
+.. image:: images/locationPipe.png
+ :align: center
+
+.. centered::
+ Pipe by object, path and locations
+
+**See Also** a sample TUI Script of a :ref:`tui_locations_pipe` operation.
\ No newline at end of file
Placement
=========
+Placement lets to place a one object relatively to another object. To make a placement:
+
+#. select in the Main Menu *Part - > Placement* item or
+#. click **Placement** button in the toolbar
+
+.. image:: images/placement_btn.png
+ :align: center
+
+.. centered::
+ **Placement** button
+
+The following property panel will be opened:
.. image:: images/Placement.png
:align: center
.. centered::
- Placement definition
+ **Placement operation**
+
+In this property panel it is necessary:
+
+- Select objects which will be moved.
+
+- Select a face, edge or vertex as a start for moving
+
+- Select a face, edge or vertex as an end of moving
+
+- Define state of **Reverse** and **Centering** check boxes.
+
+
+
+**Apply** button creates the placement.
+
+**Cancel** button cancels the operation.
+
+**TUI Command**: *model.addPlacement(Part_doc, placeObjects, startShape, endShape, isReverse, isCentering)*
+
+**Arguments**: Part + list of objects to move + start shape + end shape + is reverse flag + is centering flag.
+
+Result
+""""""
+
+The Result of the operation will be a new placement of selected objects:
+
+.. image:: images/CreatedPlacement.png
+ :align: center
+
+.. centered::
+ **Placement created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_placement` operation.
Rotation
========
+The feature **Rotation** makes rotation of a selected shape.
+
+To create Rotation in the active part:
+
+#. select in the Main Menu *Part - > Rotation* item or
+#. click **Rotation** button in the toolbar
+
+.. image:: images/rotation.png
+ :align: center
+
+.. centered::
+ **Rotation** button
+
+Two rotation algorithms are:
+
+ .. image:: images/rotation_axis_32x32.png
+ :align: left
+ by axis and angle
+
+ .. image:: images/rotation_3pt_32x32.png
+ :align: left
+ by center and 2 points
+
+Rotation by axis and angle
+--------------------------
.. image:: images/Rotation1.png
:align: center
.. centered::
- Rotation by axis and angle
+ Rotation by axis and angle property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
+- **Axis** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser;
+- **Angle** defines the angle by which the object is rotated.
+
+**TUI Command**: *model.addRotation(Part_doc, [shape], axis, angle)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (angle value).
+
+Result
+""""""
+
+Result of operation is rotated initial shape.
+.. image:: images/rotation_axis.png
+ :align: center
+
+.. centered::
+ Rotation by axis and angle
+
+**See Also** a sample TUI Script of a :ref:`tui_rotation_axis` operation.
+
+Rotation by center and points
+-----------------------------
.. image:: images/Rotation2.png
:align: center
.. centered::
- Rotation by center and points
+ Rotation by center and 2 points property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
+- **Center point**, **Start point**, **End point** define 3 points or vertices selected in 3D OCC viewer or object browser. Rotation axis will pass through the **Center point** and will be will be orthogonal to a plane defined by three points. Rotation Angle is the angle between two vectors directed from the **Center point** to **Start point** and **End point**.
+
+**TUI Command**: *model.addRotation(Part_doc, [shape], point1, point2, point3)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 points in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+Result of operation is rotated initial shape.
+
+.. image:: images/rotation_3points.png
+ :align: center
+
+.. centered::
+ Rotation by center and 2 points
+
+**See Also** a sample TUI Script of a :ref:`tui_rotation_3points` operation.
\ No newline at end of file
Smash
=====
+The feature Smash implements a boolean operation for smashing a set of main objects by a set of tool objects.
+
+To a create boolean opration Smash in the active part:
+
+#. select in the Main Menu *Features - > Smash* item or
+#. click **Smash** button in the toolbar
+
+.. image:: images/bool_smash.png
+ :align: center
+
+.. centered::
+ **Smash** button
+
+The following property panel will be opened:
.. image:: images/Smash.png
:align: center
.. centered::
- Smash definition
+ **Smash operation**
+
+Here it is necessary to select main objects and tool objects.
+
+**Apply** button creates the smash shape.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addSmash(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**: Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a smash of tool objects from main objects:
+
+.. image:: images/CreatedSmash.png
+ :align: center
+
+.. centered::
+ **Smash created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_smash` operation.
Symmetry
========
+The feature **Symmetry** makes symmetrical copy of a selected shape.
-.. image:: images/Symmetry.png
+To create Symmetry in the active part:
+
+#. select in the Main Menu *Part - > Symmetry* item or
+#. click **Symmetry** button in the toolbar
+
+.. image:: images/symmetry.png
+ :align: center
+
+.. centered::
+ **Symmetry** button
+
+Symmetrical copy of an Object can be mirrored in three different ways:
+
+ .. image:: images/symmetry_point_32x32.png
+ :align: left
+ through a Point of symmetry
+
+ .. image:: images/symmetry_axis_32x32.png
+ :align: left
+ through an Axis of symmetry
+
+ .. image:: images/symmetry_plane_32x32.png
+ :align: left
+ through a Plane of symmetry
+
+Symmetry through a Point of symmetry
+------------------------------------
+
+.. image:: images/symmetryPoint.png
+ :align: center
+
+.. centered::
+ Symmetry through a Point of symmetry property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **Point** defines point of symmetry selected in 3D OCC viewer or object browser;
+- **Create a copy** checkbox turns on/off preservation of the initial object.
+
+**TUI Command**: *model.addSymmetry(Part_doc, [shape], point, copy)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + point in format *model.selection(TYPE, shape)*+ boolean (Create a copy key).
+
+Result
+""""""
+
+Result of operation is mirrored initial shape with **Create a copy** = *True*.
+
+.. image:: images/symmetryPointres.png
+ :align: center
+
+.. centered::
+ Symmetry through a Point of symmetry
+
+**See Also** a sample TUI Script of a :ref:`tui_symmetry_point` operation.
+
+Symmetry through an Axis of symmetry
+------------------------------------
+
+.. image:: images/symmetryAxis.png
:align: center
.. centered::
- Symmetry definition
+ Symmetry through an Axis of symmetry property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **Axis** defines axis of symmetry selected in 3D OCC viewer or object browser;
+- **Create a copy** checkbox turns on/off preservation of the initial object.
+
+**TUI Command**: *model.addSymmetry(Part_doc, [shape], axis, copy)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ boolean (Create a copy key).
+
+Result
+""""""
+
+Result of operation is mirrored initial shape with **Create a copy** = *False*.
+
+.. image:: images/symmetryAxisres.png
+ :align: center
+
+.. centered::
+ Symmetry through an Axis of symmetry
+
+**See Also** a sample TUI Script of a :ref:`tui_symmetry_axis` operation.
+
+Symmetry through a Plane of symmetry
+------------------------------------
+
+.. image:: images/symmetryPlane.png
+ :align: center
+
+.. centered::
+ Symmetry through a Plane of symmetry property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **Plane** defines plane of symmetry selected in 3D OCC viewer or object browser;
+- **Create a copy** checkbox turns on/off preservation of the initial object.
+
+**TUI Command**: *model.addSymmetry(Part_doc, [shape], plane, copy)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + plane in format *model.selection(TYPE, shape)*+ boolean (Create a copy key).
+
+Result
+""""""
+
+Result of operation is mirrored initial shape with **Create a copy** = *False*.
+
+.. image:: images/symmetryPlaneres.png
+ :align: center
+
+.. centered::
+ Symmetry through a Plane of symmetry
+
+**See Also** a sample TUI Script of a :ref:`tui_symmetry_plane` operation.
\ No newline at end of file
Scale
=====
+The feature **Scale** makes a scaled shape basing on the initial shape.
+
+To create Scale in the active part:
+
+#. select in the Main Menu *Features - > Scale* item or
+#. click **Scale** button in the toolbar
+
+.. image:: images/scale.png
+ :align: center
+
+.. centered::
+ **Scale** button
+
+Two Scale algorithms are:
+
+ .. image:: images/scale_factor_32x32.png
+ :align: left
+ by one common factor
+
+ .. image:: images/scale_dimensions_32x32.png
+ :align: left
+ by different factors along axes
+
+Scale by one common factor
+--------------------------
+
+Scale by one common factor scales the entire object without modification the geometry of the shape: dimensions change evenly in all three orthogonal directions.
.. image:: images/Scale1.png
:align: center
.. centered::
- Scale: define by a one common factor
+ Scale by one common factor property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
+- **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
+- **Scale factor** defines the multiplier of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point.
+
+**TUI Command**: *model.addScale(Part_doc, [shape], center, factor)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ real (scale factor value).
+
+Result
+""""""
+
+Result of operation is transformed initial shape.
+.. image:: images/Scale_common_factor.png
+ :align: center
+
+.. centered::
+ Scale by one common factor
+
+**See Also** a sample TUI Script of a :ref:`tui_Scale_common_factor` operation.
+
+Scale by different factors along axes
+-------------------------------------
+
+Scale by different factors along axes is a general transformation, which can modify the geometry, for example, a sphere can be transformed into an ellipsoid.
.. image:: images/Scale2.png
:align: center
.. centered::
- Scale: define by different factors
+ Scale: define by different factors property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
+- **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
+- **Scale factor in X**, **Scale factor in Y**, **Scale factor in Z** define the the multipliers of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point.
+
+**TUI Command**: *model.addScale(Part_doc, [shape], center, factors)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ 3 reals (scale factor values along X. Y, Z axes).
+
+Result
+""""""
+
+Result of operation is transformed initial shape.
+
+.. image:: images/Scale_common_factor.png
+ :align: center
+
+.. centered::
+ Scale by different factors
+
+**See Also** a sample TUI Script of a :ref:`tui_Scale_XYZ` operation.
\ No newline at end of file
Translation
===========
+The feature **Translation** makes translation of a selected shape.
+
+To create Translation in the active part:
+
+#. select in the Main Menu *Part - > Translation* item or
+#. click **Translation** button in the toolbar
+
+.. image:: images/translation_vector_32x32.png
+ :align: center
+
+.. centered::
+ **Translation** button
+
+The Vector of translation can be defined in three different ways:
+
+ .. image:: images/translation_vector_32x32.png
+ :align: left
+ by by axis and distance
+
+ .. image:: images/translation_dxyz_32x32.png
+ :align: left
+ by vector
+
+ .. image:: images/translation_2pt_32x32.png
+ :align: left
+ by two points
+
+Translation by axis and distance
+--------------------------------
.. image:: images/Translation1.png
:align: center
.. centered::
- Translation by axis and distance
+ Translation by axis and distance property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **Axis** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+- **Distance** defines the distance along the **Vector of translation**.
+
+**TUI Command**: *model.addTranslation(Part_doc, [shape], axis, dist)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (distance value).
+
+Result
+""""""
+
+Result of operation is shifted initial shape.
+
+.. image:: images/translation_vector.png
+ :align: center
+
+.. centered::
+ Translation by axis and distance
+
+**See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation.
+Translation by vector
+---------------------
.. image:: images/Translation2.png
:align: center
.. centered::
- By vector
+ Translation by vector property panel
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **DX**, **DY**, **DZ** define vector using coordinates along the axis.
+
+**TUI Command**: *model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 real (coordinate values).
+
+Result
+""""""
+
+Result of operation is shifted initial shape.
+
+.. image:: images/translation_vector.png
+ :align: center
+
+.. centered::
+ Translation by vector
+
+**See Also** a sample TUI Script of a :ref:`tui_translation_DXDYDZ` operation.
+
+
+Translation by two points
+-------------------------
.. image:: images/Translation3.png
:align: center
.. centered::
- By two points
+ Translation by two points property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser;
+- **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser;
+
+**TUI Command**: *model.addTranslation(Part_doc, [shape], point1, point2)*
+
+**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 points in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+Result of operation is shifted initial shape.
+
+.. image:: images/translation_vector.png
+ :align: center
+
+.. centered::
+ Translation by two points
+
+**See Also** a sample TUI Script of a :ref:`tui_translation_2points` operation.
+
Union
=====
+The feature Union implements a boolean operation for creation of a uniono of selected objects.
+
+To a create boolean opration Union in the active part:
+
+#. select in the Main Menu *Features - > Union* item or
+#. click **Union** button in the toolbar
+
+.. image:: images/union_btn.png
+ :align: center
+
+.. centered::
+ **Union** button
+
+The following property panel will be opened:
.. image:: images/Union.png
:align: center
.. centered::
- Union definition
+ **Union operation**
+
+Here it is necessary to select some objects.
+
+**Apply** button creates the union shape.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addUnion(Part_doc, objects)*
+
+**Arguments**: Part + list of objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape which is a union of selected objects:
+
+.. image:: images/CreatedUnion.png
+ :align: center
+
+.. centered::
+ **Union created**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_union` operation.
<workbench id="Features" document="Part">
<group id="Transformation">
<feature id="Scale" title="Scale" tooltip="Perform scale objects"
- icon="icons/Features/scale.png" helpfile="FeaturesPlugin/transformationFeature.html">
+ icon="icons/Features/scale.png" helpfile="transformationFeature.html">
<source path="scale_widget.xml"/>
</feature>
</group>
<group id="Extrusion">
<feature id="Extrusion" title="Extrusion" tooltip="Create a solid by extrusion of a face"
- icon="icons/Features/extrusion.png" helpfile="FeaturesPlugin/extrusionFeature.html">
+ icon="icons/Features/extrusion.png" helpfile="extrusionFeature.html">
<source path="extrusion_widget.xml"/>
</feature>
<feature id="ExtrusionCut" title="ExtrusionCut" tooltip=""
- icon="icons/Features/extrusion_cut.png" helpfile="FeaturesPlugin/extrusionCutFeature.html">
+ icon="icons/Features/extrusion_cut.png" helpfile="extrusionCutFeature.html">
<source path="extrusioncut_widget.xml"/>
</feature>
<feature id="ExtrusionFuse" title="ExtrusionFuse" tooltip=""
- icon="icons/Features/extrusion_fuse.png" helpfile="FeaturesPlugin/extrusionFuseFeature.html">
+ icon="icons/Features/extrusion_fuse.png" helpfile="extrusionFuseFeature.html">
<source path="extrusionfuse_widget.xml"/>
</feature>
</group>
<group id="Revolution">
<feature id="Revolution" title="Revolution" tooltip="Create a solid by revolution of a face"
- icon="icons/Features/revol.png" helpfile="FeaturesPlugin/revolutionFeature.html">
+ icon="icons/Features/revol.png" helpfile="revolutionFeature.html">
<source path="revolution_widget.xml"/>
</feature>
<feature id="RevolutionCut" title="RevolutionCut" tooltip=""
- icon="icons/Features/revol_cut.png" helpfile="FeaturesPlugin/revolutionCutFeature.html">
+ icon="icons/Features/revol_cut.png" helpfile="revolutionCutFeature.html">
<source path="revolutioncut_widget.xml"/>
</feature>
<feature id="RevolutionFuse" title="RevolutionFuse" tooltip=""
- icon="icons/Features/revol_fuse.png" helpfile="FeaturesPlugin/revolutionFuseFeature.html">
+ icon="icons/Features/revol_fuse.png" helpfile="revolutionFuseFeature.html">
<source path="revolutionfuse_widget.xml"/>
</feature>
</group>
<group id="Pipe">
<feature id="Pipe" title="Pipe" tooltip="Generates extrusion along a path"
- icon="icons/Features/pipe.png" helpfile="FeaturesPlugin/pipeFeature.html">
+ icon="icons/Features/pipe.png" helpfile="pipeFeature.html">
<source path="pipe_widget.xml"/>
</feature>
</group>
<group id="Boolean" toolbar="yes">
<feature id="Cut" title="Cut" tooltip="Perform boolean cut operation with objects"
- icon="icons/Features/bool_cut.png" helpfile="FeaturesPlugin/cutFeature.html"
+ icon="icons/Features/bool_cut.png" helpfile="cutFeature.html"
auto_preview="false">
<source path="boolean_widget.xml"/>
</feature>
<feature id="Fuse" title="Fuse" tooltip="Perform boolean fuse operation with objects"
- icon="icons/Features/bool_fuse.png" helpfile="FeaturesPlugin/fuseFeature.html"
+ icon="icons/Features/bool_fuse.png" helpfile="fuseFeature.html"
auto_preview="false">
<source path="boolean_fuse_widget.xml"/>
</feature>
<feature id="Common" title="Common" tooltip="Perform boolean common operation with objects"
- icon="icons/Features/bool_common.png" helpfile="FeaturesPlugin/commonFeature.html"
+ icon="icons/Features/bool_common.png" helpfile="commonFeature.html"
auto_preview="false">
<source path="boolean_common_widget.xml"/>
</feature>
<feature id="Smash" title="Smash" tooltip="Perform boolean smash operation with objects"
- icon="icons/Features/bool_smash.png" helpfile="FeaturesPlugin/smashFeature.html"
+ icon="icons/Features/bool_smash.png" helpfile="smashFeature.html"
auto_preview="false">
<source path="boolean_smash_widget.xml"/>
</feature>
<feature id="Intersection" title="Intersection" tooltip="Intersect objects with tools"
- icon="icons/Features/intersection.png" helpfile="FeaturesPlugin/intersectionFeature.html">
+ icon="icons/Features/intersection.png" helpfile="intersectionFeature.html">
<source path="intersection_widget.xml"/>
</feature>
<feature id="Partition" title="Partition" tooltip="Perform partition operations with solids"
- icon="icons/Features/partition.png" helpfile="FeaturesPlugin/partitionFeature.html"
+ icon="icons/Features/partition.png" helpfile="partitionFeature.html"
auto_preview="false">
<source path="partition_widget.xml"/>
</feature>
<feature id="Fill" title="Fill" tooltip="Perform boolean fill operation with objects"
- icon="icons/Features/bool_fill.png" helpfile="FeaturesPlugin/fillFeature.html"
+ icon="icons/Features/bool_fill.png" helpfile="fillFeature.html"
auto_preview="false">
<source path="boolean_fill_widget.xml"/>
</feature>
<feature id="Union" title="Union" tooltip="Perform union operations with shapes"
- icon="icons/Features/union.png" helpfile="FeaturesPlugin/unionFeature.html">
+ icon="icons/Features/union.png" helpfile="unionFeature.html">
<source path="union_widget.xml"/>
</feature>
<feature id="Remove_SubShapes" title="Remove Sub-Shapes" tooltip="Allows to remove sub-shapes from wires, shells, compsolids and compounds"
- icon="icons/Features/remove_subshapes.png" helpfile="FeaturesPlugin/removeSubShapesFeature.html">
+ icon="icons/Features/remove_subshapes.png" helpfile="removeSubShapesFeature.html">
<source path="remove_subshapes_widget.xml"/>
</feature>
</group>
title="Recover"
tooltip="Visualize concealed objects"
icon="icons/Features/recover.png"
- helpfile="FeaturesPlugin/recoverFeature.html">
+ helpfile="recoverFeature.html">
<source path="recover_widget.xml"/>
</feature>
</group>
<group id="Fillet">
<feature id="Fillet" title="Fillet" tooltip="Perform fillet on face or edge"
- icon="icons/Features/fillet.png" auto_preview="true" helpfile="FeaturesPlugin/filletFeature.html">
+ icon="icons/Features/fillet.png" auto_preview="true" helpfile="filletFeature.html">
<source path="fillet_widget.xml"/>
</feature>
<feature id="FusionFaces" title="Fuse Faces" tooltip="Performs fusion of connected faces"
<workbench id="Part">
<group id="Movement">
<feature id="Placement" title="Placement" tooltip="Place an objects relatively to another one"
- icon="icons/Features/placement.png" helpfile="FeaturesPlugin/placementFeature.html">
+ icon="icons/Features/placement.png" helpfile="placementFeature.html">
<source path="placement_widget.xml"/>
</feature>
<feature id="Translation" title="Translation" tooltip="Perform translation of an objects along the axis to specified distance"
- icon="icons/Features/movement.png" helpfile="FeaturesPlugin/translationFeature.html">
+ icon="icons/Features/movement.png" helpfile="translationFeature.html">
<source path="translation_widget.xml"/>
</feature>
<feature id="Rotation" title="Rotation" tooltip="Perform rotation of an objects around the axis to specified angle"
- icon="icons/Features/rotation.png" helpfile="FeaturesPlugin/rotationFeature.html">
+ icon="icons/Features/rotation.png" helpfile="rotationFeature.html">
<source path="rotation_widget.xml"/>
</feature>
<feature id="Symmetry" title="Symmetry" tooltip="Perform symmetry with respect to a point, an axis or a plane"
- icon="icons/Features/symmetry.png" helpfile="FeaturesPlugin/symmetryFeature.html">
+ icon="icons/Features/symmetry.png" helpfile="symmetryFeature.html">
<source path="symmetry_widget.xml"/>
</feature>
<feature id="LinearCopy" title="Linear copy" tooltip="Perform copy and translate"
- icon="icons/Features/multitranslation.png" helpfile="FeaturesPlugin/linearCopyFeature.html">
+ icon="icons/Features/multitranslation.png" helpfile="linearCopyFeature.html">
<source path="multitranslation_widget.xml"/>
</feature>
<feature id="AngularCopy" title="Angular Copy" tooltip="Perform copy and rotate"
- icon="icons/Features/multirotation.png" helpfile="FeaturesPlugin/angularCopyFeature.html">
+ icon="icons/Features/multirotation.png" helpfile="angularCopyFeature.html">
<source path="multirotation_widget.xml"/>
</feature>
</group>
<group id="Measurement">
<feature id="Measurement" title="Measurement" tooltip="Calculate properties of objects"
- icon="icons/Features/measurement.png" helpfile="FeaturesPlugin/measurementFeature.html">
+ icon="icons/Features/measurement.png" helpfile="measurementFeature.html">
<source path="measurement_widget.xml"/>
</feature>
</group>
GDML plug-in
=============
+GDML plug-in provides a set of features for creation of geometry primitives using GDML language. It implements following features:
+
.. toctree::
:titlesonly:
:maxdepth: 1
--- /dev/null
+
+ .. _tui_create_conesegment:
+
+Create Cone
+===========
+
+.. literalinclude:: examples/cone.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/cone.py>`
+
--- /dev/null
+
+ .. _tui_create_ellipsoid:
+
+Create Cone
+===========
+
+.. literalinclude:: examples/ellipsoid.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/ellipsoid.py>`
+
-Cone
-====
+Cone segment
+============
+
+The feature Cone segment creates a cone or its segment using GDML language.
+
+To create a Cone segment in the active part:
+
+#. select in the Main Menu *GDML - > Cone segment* item or
+#. click **Cone segment** button in the toolbar.
+
+.. image:: images/cone_btn.png
+ :align: center
+
+.. centered::
+ **Cone segment** button
+
+The following property panel will be opened:
+
+.. image:: images/Cone_panel.png
+ :align: center
+
+.. centered::
+ **Cone property panel**
+
+The property panel contains image which explains meaning of input values:
+
+- **rmin1, rmax1** - minimal and maximal radiuses of a base of the cone.
+- **rmin2, rmax2** - minimal and maximal rediuses of a top of the cone.
+- **z** is a heighth of the cone.
+- **startphi** is a starting angle of the cone segment.
+- **deltaphi** is an angle to end of the cone segment.
+
+**TUI Command**: *model.addConeSegment(Part_doc, rmin1, rmax1, rmin2, rmax2, z, startphi, deltaphi)*
+
+**Arguments**: Part + Rmin of base + Rmax of base + Rmin of top + Rmax of top + height + start angle + end angle.
+
+Result
+""""""
+
+The Result of the operation will be a SOLID.
+
+.. image:: images/CreatedCone.png
+ :align: center
+
+.. centered::
+ Cone created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_conesegment` operation.
Ellipsoid
=========
+
+The feature Ellipsoid creates a 3d ellipsoid or its part using GDML language.
+
+To create a Ellipsoid in the active part:
+
+#. select in the Main Menu *GDML - > Ellipsoid* item or
+#. click **Ellipsoid** button in the toolbar.
+
+.. image:: images/ellips_btn.png
+ :align: center
+
+.. centered::
+ **Ellipsoid** button
+
+The following property panel will be opened:
+
+.. image:: images/Ellipsoid.png
+ :align: center
+
+.. centered::
+ **Ellipsoid property panel**
+
+The property panel contains image which explains meaning of input values:
+
+- **ax** is a size of the ellipsoind along X axis.
+- **by** is a size of the ellipsoind along Y axis.
+- **cz** is a size of the ellipsoind along Z axis.
+- **zcut1** is a z coordinate of a lower cut plane.
+- **zcut2** is a z coordinate of a upper cut plane.
+
+**TUI Command**: *model.addEllipsoid(Part_doc, ax, by, cz)*
+
+**Arguments**: Part + ax + by + cz.
+
+Result
+""""""
+
+The Result of the operation will be a SOLID.
+
+.. image:: images/CreatedEllipsoid.png
+ :align: center
+
+.. centered::
+ Ellipsoid created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_ellipsoid` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+ConeSegment_1 = model.addConeSegment(Part_1_doc, 7, 11, 5, 8, 12, 0 , 270)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Ellipsoid_1 = model.addEllipsoid(Part_1_doc, 10, 20, 40)
+model.do()
+model.end()
<workbench id="GDML" document="Part">
<group id="GDML">
<feature id="ConeSegment" title="Cone segment" tooltip="Create a GDML Cone Segment" icon="icons/GDML/cone_segment.png"
- helpfile="GDMLPlugin/coneFeature.html">
+ helpfile="coneFeature.html">
<source path="conesegment_widget.xml"/>
</feature>
<feature id="Ellipsoid" title="Ellipsoid" tooltip="Create a GDML Ellipsoid" icon="icons/GDML/ellipsoid.png"
- helpfile="GDMLPlugin/ellipsoidFeature.html">
+ helpfile="ellipsoidFeature.html">
<source path="ellipsoid_widget.xml"/>
</feature>
</group>
Parameters plug-in
==================
+The Parameters plug-in includes the following features:
+
.. toctree::
:titlesonly:
:maxdepth: 1
managerFeature.rst
parameterFeature.rst
+
+
+
+
+
--- /dev/null
+
+ .. _tui_parameterFeature:
+
+Create Parameter
+================
+
+.. literalinclude:: examples/parameter.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/parameter.py>`
+
--- /dev/null
+
+ .. _tui_parametersFeature:
+
+Create Parameters
+=================
+
+.. literalinclude:: examples/parameters.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/parameters.py>`
+
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+model.addParameter(partSet, "angle", "60*3.141/180", "main angle")
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+model.addParameter(partSet, "angle", "60*3.141/180", "main angle")
+model.addParameter(partSet, "height", "200*sin(angle)")
+model.end()
+.. _parameters:
+
Parameters manager
==================
+To create/edit a set of parameters in the active partset or part instead of multiply call:
+
+#. select in the Main Menu *Part - > Parameters* item or
+#. click **Parameters** button in the toolbar:
+
+.. image:: images/paper_roll.png
+ :align: center
+
+.. centered::
+ **Parameters** button
+
+The following dialog box with parameter table appears:
+
+.. image:: images/parameters.png
+ :align: center
+
+.. centered::
+ Parameters dialog box
+
+**Input fields**:
+
+- **Name** defines parameter name. Name follows the naming rules of the python language for variables;
+- **Expression** inputs manually python expression;
+- **Result** evaluates expression as real number by python *eval()* function;
+- **Comment** contains any text. This field is optional;
+- **Add** button adds a new empty string in the end of table. Default **Name** is *<NoName>*, **Expression** is *<NoValue>*
+- **Insert** button adds a new empty string before the selected parameter;
+- **Delete** button removes the selected parameter from the table;
+- **Modify parameter position** button moves the selected parameter
+ .. image:: images/parameters_up.png
+ :align: left
+ up on 1 string in the table,
+
+ .. image:: images/parameters_down.png
+ :align: left
+ down on 1 string in the table.
+
+
+**TUI Command**: *model.addParameter(Part_doc, Name, Value, Comment)*
+
+**Arguments**: 1 Part + 1 string + 1 value + 1 string
+
+**See Also** a sample TUI Script of a :ref:`tui_parametersFeature` operation.
+
+Result
+------
+
+Created parameters and their current values are displayed in the Object Browser, in a special section **Parameters**.
-.. image:: images/Manager.png
- :align: center
+.. image:: images/object_browser_parameters.png
+ :align: center
.. centered::
- Edit parameters with help of parameres manager
+ **Parameters** in object browser
+.. _parameter:
Create parameter
================
+The parameter definition has form *variable=expression*.
-.. image:: images/Parameter.png
- :align: center
+To create parameter in the active partset or part:
+
+#. select in the Main Menu *Part - > Parameter* item or
+#. click **Parameter** button in the toolbar:
+
+.. image:: images/expression.png
+ :align: center
+
+.. centered::
+ **Parameter** button
+
+The following property panel appears.
+
+.. image:: images/parameter.png
+ :align: center
+
+.. centered::
+ Parameter property panel
+
+**Input fields**:
+
+- .. image:: images/expression.png
+ :align: left
+ defines parameter name. Name follows the naming rules of the python language for variables;
+
+- panel **Expression** evaluates inputted manually expression as real number by python *eval()* function. In the simplest case an expression is a real number. Some standard python modules (like math) are imported by default before evaluation.
+
+- **Comment** contains any text. This field is optional.
+
+
+The property panel checks validity of the expression. For invalid expression **Apply** button is disabled and error message generated by python interpreter during the evaluation is shown in status bar and in popup of **Apply** button.
+
+**TUI Command**: *model.addParameter(Part_doc, Name, Value, Comment)*
+
+**Arguments**: 1 Part + 1 string + 1 value + 1 string
+
+**See Also** a sample TUI Script of a :ref:`tui_parameterFeature` operation.
+
+Result
+------
+
+Created parameter and its current value are displayed in the Object Browser, in a special section **Parameters**.
+
+.. image:: images/object_browser_parameter.png
+ :align: center
.. centered::
- Create a parameter
+ **Parameter** in object browser
<workbench id="Part">
<group id="Parameters">
<feature id="Parameter" title="Parameter" tooltip="Create a parameter" icon=":icons/expression.png"
- helpfile="ParametersPlugin/parameterFeature.html">
+ helpfile="parameterFeature.html">
<stringvalue id="variable" label="Name" icon=":icons/expression.png" placeholder="Please input the parameter name">
<validator id="Parameters_VariableValidator"/>
</stringvalue>
</feature>
<feature id="ParametersMgr" title="Parameters" tooltip="Manage parameters" icon=":icons/paper_roll.png" modal="true"
- helpfile="ParametersPlugin/managerFeature.html">
+ helpfile="managerFeature.html">
<parameters-manager/>
</feature>
</group>
.. _partPlugin:
Part plug-in
-=============
+============
+
+New Part
+--------
+
+To create a New Part:
+
+#. select in the Main Menu *Part - > New part* item or
+#. click **New part** button in Shaper toolbar:
+
+.. image:: images/new_part.png
+ :align: center
+
+.. centered::
+ New part button
+
+**TUI Command**: *model.addPart(partSet)*
+
+**Arguments**: 1 partset
+
+Result
+""""""
+
+Created empty part is activated and appears in the object browser.
+
+**See Also** a sample TUI Script of a :ref:`tui_create_part` operation.
+
+Duplicate Part
+--------------
+
+To duplicate active Part:
+
+#. select in the Main Menu *Part - > Duplicate part* item or
+#. click **Duplicate part** button in Shaper toolbar:
+
+.. image:: images/duplicate.png
+ :align: center
+
+.. centered::
+ Duplicate part button
+
+Result
+""""""
+
+Created copied part is activated and appears in the object browser.
+
+Copied part contains all objects existing in the source part.
+
+Remove Part
+-----------
+
+To remove active Part:
+
+#. select in the Main Menu *Part - > Remove part* item or
+#. click **Remove part** button in Shaper toolbar:
+
+.. image:: images/remove.png
+ :align: center
+
+.. centered::
+ Remove part button
+
+Result
+""""""
+
+Selected part is removed together with all its objects.
+
--- /dev/null
+
+ .. _tui_create_part:
+
+Create Part
+===========
+
+.. literalinclude:: examples/new_part.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/new_part.py>`
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+model.do()
+model.end()
Primitives plug-in
==================
+The Primitives plug-in contains features dedicated to creation of geometrical primitives. Result of each feature is a solid. The plug-in includes the following features:
+
.. toctree::
:titlesonly:
:maxdepth: 1
--- /dev/null
+
+ .. _tui_create_box:
+
+Create Box
+==========
+
+.. literalinclude:: examples/box.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/box.py>`
+
--- /dev/null
+
+ .. _tui_create_cone:
+
+Create / Cone
+=============
+
+.. literalinclude:: examples/cone.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/cone.py>`
+
--- /dev/null
+
+ .. _tui_create_cylinder:
+
+Create /Cylinder
+================
+
+.. literalinclude:: examples/cylinder.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/cylinder.py>`
+
--- /dev/null
+
+ .. _tui_create_sphere:
+
+Create / Sphere
+===============
+
+.. literalinclude:: examples/sphere.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/sphere.py>`
+
--- /dev/null
+
+ .. _tui_create_torus:
+
+Create / Torus
+=============
+
+.. literalinclude:: examples/torus.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/torus.py>`
+
+.. _box_feature:
Box
===
+The feature Box creates a box solid.
-.. image:: images/Box1.png
- :align: center
+To create a Box in the active part:
+
+#. select in the Main Menu *Primitives - > Box* item or
+#. click **Box** button in the toolbar:
+
+.. image:: images/box.png
+ :align: center
.. centered::
- Create a box by dimensions
+ **Box** button
+
+There are 2 algorithms for creation of a Box:
+
+.. image:: images/box_2pt_32x32.png
+ :align: left
+**By dimensions**
+
+.. image:: images/box_dxyz_32x32.png
+ :align: left
+**By two points**
+
+
+By dimensions
+"""""""""""""
+
+Box is created by dimensions along X, Y, Z axis starting from the origin.
+
+.. image:: images/Box_dimensions.png
+ :align: center
+
+Input fields:
+- **DX**, **DY**, **DZ** define sizes of the box along corresponding coordinate axes.
-.. image:: images/Box2.png
- :align: center
+**TUI Command**: *model.addBox(Part_doc, DX, DY, DZ)*
+
+**Arguments**: Part + 3 real values (dimensions at origin).
+
+By two points
+"""""""""""""
+
+Box is created by two points of the box diagonal.
+
+.. image:: images/Box_2points.png
+ :align: center
+
+Input fields:
+
+- **Point 1** and **Point 2** define diagonal points of the box selected in 3D OCC viewer or object browser.
+
+**TUI Command**: *model.addBox(Part_doc, point1, point2)*
+
+**Arguments**: Part + 2 selected points (opposite vertices of the box)
+
+Result
+""""""
+
+The edges of the created boxes are parallel to the coordinate axes.
+
+.. image:: images/Boxes.png
+ :align: center
+
.. centered::
- Create a box by two points
+ Boxes created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_box` operation.
\ No newline at end of file
Cone
====
+The feature Cone creates a cone solid.
+
+To create a Cone in the active part:
+
+#. select in the Main Menu *Primitives - > Cone* item or
+#. click **Cone** button in the toolbar
+
+.. image:: images/Cone_button.png
+ :align: center
+
+.. centered::
+ **Cone** button
+
+The following property panel appears.
.. image:: images/Cone.png
:align: center
.. centered::
- Create a cone
+ Cone property panel
+
+Input fields:
+
+- **Point** defines center of the cone base selected in 3D OCC viewer or object browser;
+- **Vector** defines the axis of the cone selected in 3D OCC viewer or object browser;
+- Dimensions:
+ - **Base Radius**;
+ - **Top radius**;
+ - **Height**.
+
+**TUI Command**: *model.addCone(Part_doc, Point, Axis, Radius1, Radius2, Height)*
+
+**Arguments**: Part + 1 vertex + 1 vector + 3 real values (base and top radii, heght).
+
+Result
+""""""
+
+If both radii are non-zero, then the cone will be truncated.
+
+If the radii are equal, the Cylinder will be created instead of cone.
+
+.. image:: images/Cone_res.png
+ :align: center
+
+.. centered::
+ Cone created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_cone` operation.
Cylinder
========
+The feature Cylinder creates a cylinder solid.
-.. image:: images/Cylinder1.png
- :align: center
+To create a Cylinder in the active part:
+
+#. select in the Main Menu *Primitives - > Cylinder* item or
+#. click **Cylinder** button in the toolbar
+
+.. image:: images/Cylinder_button.png
+ :align: center
.. centered::
- Create a cylinder
+ **Cylinder** button
+
+There are 2 algorithms for creation of a Cylinder:
+.. image:: images/cylinder_32x32.png
+ :align: left
+**Cylinder** creates a cylinder.
-.. image:: images/Cylinder2.png
- :align: center
+.. image:: images/cylinder_portion_32x32.png
+ :align: left
+**Portion of cylinder** creates one segment of cylinder.
+Cylinder
+""""""""
+
+.. image:: images/Cylinder.png
+ :align: center
+
.. centered::
- Create a sector of cylinder
+ **Cylinder** property panel
+
+Input fields:
+
+- **Point** defines center of the cylinder base selected in 3D OCC viewer or object browser;
+- **Vector** defines the axis of the cylinder selected in 3D OCC viewer or object browser;
+- Dimensions:
+ - **Radius**;
+ - **Height**.
+
+**TUI Commands**:
+
+* *model.addCylinder(Part_doc, Point, Axis, Radius, Height)*
+
+**Arguments**: Part + 1 vertex +1 vector + 2 real values (radius, height).
+
+Portion of cylinder
+"""""""""""""""""""
+
+.. image:: images/Portion_cylinder.png
+ :align: center
+
+.. centered::
+ **Portion of cylinder** property panel
+
+Input fields for ***Portion of cylinder** tab includes in addition **Angle** to create a portion of cylinder.
+
+**TUI Commands**:
+
+* *model.addCylinder(Part_doc, Point, Axis, Radius, Height,Angle)*
+
+**Arguments**: 1 Part + 1 vertex +1 vector + 3 real values (radius, height and angle).
+
+Result
+""""""
+
+Example is shown below.
+
+.. image:: images/Cylinders.png
+ :align: center
+
+.. centered::
+ Cylinders created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_cylinder` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Point_2 = model.addPoint(Part_1_doc, 20, 30, 40)
+Point_3 = model.addPoint(Part_1_doc, 40, 40, 50)
+Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2"))
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Cylinder_1_1/Face_1&Cylinder_1_1/Face_2"), model.selection("EDGE", "PartSet/OX"), 5, 10, 45)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Torus_1 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 15, 3)
+model.do()
+model.end()
Sphere
======
+The feature Sphere creates a sphere solid.
+
+To create a Sphere in the active part:
+
+#. select in the Main Menu *Primitives - > Sphere* item or
+#. click **Sphere** button in the toolbar
+
+.. image:: images/Sphere_button.png
+ :align: center
+
+.. centered::
+ **Sphere** button
+
+The following property panel appears.
.. image:: images/Sphere.png
:align: center
.. centered::
- Create a sphere
+ Sphere property panel
+
+Input fields:
+
+- **Point** defines center of the sphere selected in 3D OCC viewer or object browser;
+- **Radius** defines the radius.
+
+**TUI Command**: *model.addSphere(Part_doc, Point, Radius)*.
+
+**Arguments**: Part + 1 vertex + 1 real value (radius).
+
+Result
+""""""
+
+Example is shown below.
+
+.. image:: images/Sphere_res.png
+ :align: center
+
+.. centered::
+ Sphere created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_sphere` operation.
Torus
=====
+The feature Torus creates a torus solid.
+
+To create a Torus in the active part:
+
+#. select in the Main Menu *Primitives - > Torus* item or
+#. click **Torus** button in the toolbar
+
+.. image:: images/Torus_button.png
+ :align: center
+
+.. centered::
+ **Torus** button
+
+The following property panel appears.
.. image:: images/Torus.png
:align: center
.. centered::
- Create a torus
+ Torus
+
+Input fields:
+
+- **Point** defines center of the torus base selected in 3D OCC viewer or object browser;
+- **Vector** defines the axis of the torus selected in 3D OCC viewer or object browser;
+- Dimensions:
+ - **Radius**;
+ - **Ring radius**.
+
+**TUI Command**: *model.addTorus(Part_doc, Point, Axis, Radius1, Radius2)*
+
+**Arguments**: Part + 1 vertex + 1 vector + 2 real values (first and second radii).
+
+Result
+""""""
+
+Example is shown below.
+
+.. image:: images/Torus_res.png
+ :align: center
+
+.. centered::
+ Torus created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_torus` operation.
+
<workbench id="Primitives" document="Part">
<group id="Primitives">
<feature id="Box" title="Box" tooltip="Create a box" icon="icons/Primitives/box.png"
- helpfile="PrimitivesPlugin/boxFeature.html">
+ helpfile="boxFeature.html">
<source path="box_widget.xml"/>
</feature>
</group>
<group id="Primitives">
<feature id="Cylinder" title="Cylinder" tooltip="Create a cylinder" icon="icons/Primitives/cylinder.png"
- helpfile="PrimitivesPlugin/cylinderFeature.html">
+ helpfile="cylinderFeature.html">
<source path="cylinder_widget.xml"/>
</feature>
</group>
<group id="Primitives">
<feature id="Sphere" title="Sphere" tooltip="Create a sphere" icon="icons/Primitives/sphere.png"
- helpfile="PrimitivesPlugin/sphereFeature.html">
+ helpfile="sphereFeature.html">
<source path="sphere_widget.xml"/>
</feature>
</group>
<group id="Primitives">
<feature id="Torus" title="Torus" tooltip="Create a Torus" icon="icons/Primitives/torus.png"
- helpfile="PrimitivesPlugin/torusFeature.html">
+ helpfile="torusFeature.html">
<source path="torus_widget.xml"/>
</feature>
</group>
<group id="Primitives">
<feature id="Cone" title="Cone" tooltip="Create a Cone" icon="icons/Primitives/cone.png"
- helpfile="PrimitivesPlugin/coneFeature.html">
+ helpfile="coneFeature.html">
<source path="cone_widget.xml"/>
</feature>
</group>
--- /dev/null
+
+Python addons
+=============
+
+User can create his own custom features.
+
+Corresponding folder should be created for each feature at *../sources/src/PythonAddons/macros*.
+
+Feature description includes 4 files:
+
+- widget.xml with description of property panel,
+- __init__.py,
+- feature.py with python commands,
+- icon.png with image of button in toolbar (file is located at sub-folder /icons).
+
+Two examples of custom features already created are:
+
+.. toctree::
+ :titlesonly:
+ :maxdepth: 1
+
+ boxFeature.rst
+ rectangleFeature.rst
--- /dev/null
+
+Box
+===
+
+Custom files for feature **Box** are:
+
+- empty __init__.py,
+- :ref:`create_custom_box_py`,
+- :ref:`create_custom_box_xml`,
+- icon.png located at sub-folder */icons*.
+
+.. image:: images/box_ico.png
+ :align: center
+
+.. centered::
+ File icon.png
+
+The custom feature **Box** creates a box solid by extrusion of rectangle.
+
+To create a Box in the active part:
+
+#. select in the Main Menu *Macros - > Box* item or
+#. click **Box** button in the Macros toolbar corresponding to file icon.png:
+
+The following property panel appears.
+
+.. image:: images/box_property_panel.png
+ :align: center
+
+.. centered::
+ Create a box
+
+Input fields:
+
+- **Width**, **Length**, **Height** are sizes of the box along corresponding coordinate axes. The box will be created starting from the origin.
+
+Result
+""""""
+
+The Result of operation will be Extrusion and Sketch.
+
+The edges of the box will be parallel to the coordinate axes.
+
+.. image:: images/Boxes.png
+ :align: center
+
+.. centered::
+ Box created
\ No newline at end of file
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""Box macro-feature
+Authors: Renaud Nedelec - Daniel Brunier-Coulin
+Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+"""
+
+from salome.shaper import model
+from salome.shaper import geom
+
+
+class BoxFeature(model.Feature):
+ """An example of Box feature implementation.
+
+ BoxFeature() -> Box
+ """
+
+# Initializations
+
+ def __init__(self):
+ """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
+ model.Feature.__init__(self)
+
+ @staticmethod
+ def ID():
+ """Return Id of the feature."""
+ return "Box_script"
+
+ @staticmethod
+ def WIDTH_ID():
+ """Returns ID of Width parameter."""
+ return "width"
+
+ @staticmethod
+ def LENGTH_ID():
+ """Returns ID of Length parameter."""
+ return "length"
+
+ @staticmethod
+ def HEIGHT_ID():
+ """Returns ID of Height parameter."""
+ return "height"
+
+ def getKind(self):
+ """Override Feature.getKind()"""
+ return BoxFeature.ID()
+
+
+# Creation of the box at default size
+
+ def initAttributes(self):
+ """Override Feature.initAttributes()"""
+ # Creating the input arguments of the feature
+ self.addRealInput(self.WIDTH_ID())
+ self.addRealInput(self.LENGTH_ID())
+ self.addRealInput(self.HEIGHT_ID())
+
+ # Creating the base of the box with unit values
+ mypart = model.activeDocument()
+ xoy = model.defaultPlane("XOY")
+
+ # A base of the geometry
+ self.base = model.addSketch(mypart, xoy)
+
+ p1 = geom.Pnt2d(0, 0)
+ p2 = geom.Pnt2d(0, 1)
+ p3 = geom.Pnt2d(1, 1)
+ p4 = geom.Pnt2d(1, 0)
+
+ line = model.addPolygon(self.base, p1, p2, p3, p4)
+
+ self.base.setFixed(line[0].startPoint())
+ self.base.setVertical(line[0])
+
+ # Setting the size of the base with default values
+ # Width
+ self.width = self.base.setLength(line[3], 50) # Keeps the constraint for edition
+ # Length
+ self.length = self.base.setLength(line[0], 50) # Keeps the constraint for edition
+
+ # Keeping the rectangle
+ self.base.setParallel(line[0], line[2])
+ self.base.setParallel(line[1], line[3])
+ self.base.setPerpendicular(line[0], line[3])
+
+ # execute sketch
+ mypart.setCurrentFeature(self.base.feature(), False)
+ model.updateFeatures()
+
+ # Creating the extrusion (the box) at default size
+ # A box result
+ self.box = model.addExtrusion(mypart, self.base.selectFace(), 50)
+
+# Edition of the box at user size
+
+ def execute(self):
+ """F.execute() -- execute the feature"""
+ # Retrieving the user inputs
+ width = self.real(self.WIDTH_ID())
+ length = self.real(self.LENGTH_ID())
+ height = self.real(self.HEIGHT_ID())
+
+ # Editing the box
+ if width.text() == "":
+ self.base.setValue(self.width, width.value())
+ else:
+ self.base.setValue(self.width, width.text())
+
+ if length.text() == "":
+ self.base.setValue(self.length, length.value())
+ else:
+ self.base.setValue(self.length, length.text())
+
+ if (height.text() == ""):
+ self.box.setSize(height.value())
+ else:
+ self.box.setSize(height.text())
+
+ # Publishing the result: not needed for Macro feature
+ # self.addResult( self.box.result() )
+
+ def isMacro(self):
+ """Override Feature.initAttributes().
+ F.isMacro() -> True
+
+ Box feature is macro: removes itself on the creation transaction
+ finish.
+ """
+ return True
--- /dev/null
+<!--
+Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+See http:##www.salome-platform.org/ or
+email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+-->
+
+<source>
+ <workbench id="Macros" document="Part">
+ <group id="Samples">
+
+ <feature id="Box_script" title="Box" tooltip="Create a box parallel to xyz by extruding a rectangular" icon="icons/Addons/box_ico.png"
+ helpfile="boxFeature.html">
+ <doublevalue id="width" label="Width: " min="0" step="1.0" default="50" tooltip="Box width">
+ <validator id="GeomValidators_Positive"/>
+ </doublevalue>
+ <doublevalue id="length" label="Length: " min="0" step="1.0" default="50" tooltip="Box length">
+ <validator id="GeomValidators_Positive"/>
+ </doublevalue>
+ <doublevalue id="height" label="Height: " min="0" step="1.0" default="50" tooltip="Box height">
+ <validator id="GeomValidators_Positive"/>
+ </doublevalue>
+ </feature>
+
+ </group>
+ </workbench>
+</source>
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+Macro-feature to produce rectangle in the sketcher
+Author: Artem ZHIDKOV
+Copyright (C) 2016-20xx CEA/DEN, EDF R&D
+"""
+
+from salome.shaper import model
+import ModelAPI
+import GeomDataAPI
+
+class SketchPlugin_Rectangle(model.Feature):
+ """
+ Implementation of rectangle creation.
+
+ It produced 2 horizontal lines and 2 vertical lines connected by coincidence constraints
+ """
+
+# Initializations
+
+ def __init__(self):
+ """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
+ model.Feature.__init__(self)
+
+ @staticmethod
+ def ID():
+ """Rectangle feature kind."""
+ return "SketchRectangle"
+
+ @staticmethod
+ def START_ID():
+ """Returns ID of first corner."""
+ return "RectStartPoint"
+
+ @staticmethod
+ def END_ID():
+ """Returns ID of second corner."""
+ return "RectEndPoint"
+
+ @staticmethod
+ def AUXILIARY_ID():
+ """Returns whether the rectangle is accessory."""
+ return "Auxiliary"
+
+ @staticmethod
+ def LINES_LIST_ID():
+ """Returns ID of list containing lines created."""
+ return "RectangleList"
+
+ def getKind(self):
+ """Override Feature.getKind()"""
+ return SketchPlugin_Rectangle.ID()
+
+
+# Initialization of the rectangle
+
+ def initAttributes(self):
+ """Override Feature.initAttributes()"""
+ # Flag whether the rectangle is accessory
+ self.data().addAttribute(self.AUXILIARY_ID(), ModelAPI.ModelAPI_AttributeBoolean_typeId())
+ # Creating corners of the rectangle
+ self.data().addAttribute(self.START_ID(), GeomDataAPI.GeomDataAPI_Point2D_typeId())
+ self.data().addAttribute(self.END_ID(), GeomDataAPI.GeomDataAPI_Point2D_typeId())
+ # Creating list to store lines
+ self.data().addAttribute(self.LINES_LIST_ID(), ModelAPI.ModelAPI_AttributeRefList_typeId())
+ ModelAPI.ModelAPI_Session.get().validators().registerNotObligatory(self.getKind(), self.LINES_LIST_ID())
+
+ def isMacro(self):
+ """
+ Override Feature.isMacro().
+ Rectangle feature is macro: removes itself on the creation transaction finish.
+ """
+ return True
+
+# Edition of the rectangle
+
+ def execute(self):
+ # Retrieving list of already created lines
+ aLinesList = self.reflist(self.LINES_LIST_ID())
+ aNbLines = aLinesList.size()
+ if aNbLines == 1:
+ # Create 1-4 lines to compose the rectangle
+ for i in range (0, 3):
+ aLine = self.__sketch.addFeature("SketchLine")
+ aLinesList.append(aLine)
+ self.updateLines()
+ aNbLines = aLinesList.size()
+ # Create constraints to keep the rectangle
+ for i in range (0, aNbLines):
+ aLine = ModelAPI.objectToFeature(aLinesList.object(i))
+ # connect neighbor lines by coincidence
+ iPrev = i - 1
+ if iPrev < 0:
+ iPrev = aNbLines - 1
+ aPrevLine = ModelAPI.objectToFeature(aLinesList.object(iPrev))
+ aCoincidence = self.__sketch.addFeature("SketchConstraintCoincidence")
+ aRefAttrA = aCoincidence.refattr("ConstraintEntityA")
+ aRefAttrB = aCoincidence.refattr("ConstraintEntityB")
+ aRefAttrA.setAttr(aPrevLine.attribute("EndPoint"))
+ aRefAttrB.setAttr(aLine.attribute("StartPoint"))
+ # Flags which show horizontal or vertical constraint is build for correponding line
+ self.__isHV = [False, False, False, False]
+ # Update coordinates of created lines
+ self.updateLines()
+ # Add horizontal and vertical constraint for the lines which already have result
+ for i in range (0, aNbLines):
+ if self.__isHV[i]:
+ continue
+ aLine = ModelAPI.objectToFeature(aLinesList.object(i))
+ aLineResult = aLine.lastResult()
+ if aLineResult is None:
+ continue
+ aHVName = "SketchConstraintHorizontal"
+ if i % 2 == 1:
+ aHVName = "SketchConstraintVertical"
+ aHVConstraint = self.__sketch.addFeature(aHVName)
+ aRefAttrA = aHVConstraint.refattr("ConstraintEntityA")
+ aRefAttrA.setObject(aLine.lastResult())
+ self.__isHV[i] = True
+
+ def attributeChanged(self, theID):
+ if theID == self.START_ID() or theID == self.END_ID():
+ # Search the sketch containing this rectangle
+ self.__sketch = None
+ aRefs = self.data().refsToMe();
+ for iter in aRefs:
+ aFeature = ModelAPI.objectToFeature(iter.owner())
+ if aFeature.getKind() == "Sketch":
+ self.__sketch = ModelAPI.featureToCompositeFeature(aFeature)
+ break
+
+ aLinesList = self.reflist(self.LINES_LIST_ID())
+ aNbLines = aLinesList.size()
+ if aNbLines == 0:
+ # Create first line to be able to create a coincidence with selected point/feature
+ for i in range (0, 1):
+ aLine = self.__sketch.addFeature("SketchLine")
+ aLinesList.append(aLine)
+
+ aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID()))
+ aEndPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.END_ID()))
+ if aStartPoint.isInitialized() and aEndPoint.isInitialized():
+ self.updateLines()
+ else:
+ self.updateStartPoint()
+ if theID == self.AUXILIARY_ID():
+ anAuxiliary = self.data().boolean(self.AUXILIARY_ID()).value()
+ aLinesList = self.reflist(self.LINES_LIST_ID())
+ aNbLines = aLinesList.size()
+ # Update coordinates of rectangle lines
+ for i in range (0, aNbLines):
+ aLine = ModelAPI.objectToFeature(aLinesList.object(i))
+ aLine.data().boolean("Auxiliary").setValue(anAuxiliary)
+
+
+ def updateLines(self):
+ # Retrieving list of already created lines
+ aLinesList = self.reflist(self.LINES_LIST_ID())
+ aNbLines = aLinesList.size()
+ aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID()))
+ aEndPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.END_ID()))
+ aX = [aStartPoint.x(), aStartPoint.x(), aEndPoint.x(), aEndPoint.x()]
+ aY = [aStartPoint.y(), aEndPoint.y(), aEndPoint.y(), aStartPoint.y()]
+ anAuxiliary = self.data().boolean(self.AUXILIARY_ID()).value()
+
+ # Update coordinates of rectangle lines
+ for i in range (0, aNbLines):
+ aLine = ModelAPI.objectToFeature(aLinesList.object(i))
+ aLineStart = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("StartPoint"))
+ aLineEnd = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("EndPoint"))
+ aLineStart.setValue(aX[i-1], aY[i-1])
+ aLineEnd.setValue(aX[i], aY[i])
+ aLine.data().boolean("Auxiliary").setValue(anAuxiliary)
+
+ def updateStartPoint(self):
+ # Retrieving list of already created lines
+ aLinesList = self.reflist(self.LINES_LIST_ID())
+ aNbLines = aLinesList.size()
+
+ aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID()))
+ aX = aStartPoint.x()
+ aY = aStartPoint.y()
+
+ # Update coordinates of rectangle lines
+ for i in range (0, aNbLines):
+ aLine = ModelAPI.objectToFeature(aLinesList.object(i))
+ aLineStart = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("EndPoint"))
+ aLineStart.setValue(aX, aY)
--- /dev/null
+<!--
+Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+See http:##www.salome-platform.org/ or
+email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+-->
+
+<source>
+ <workbench id="Sketch">
+ <group id="Linear geometry">
+
+ <!-- SketchRectangle (python feature) -->
+ <feature
+ id="SketchRectangle"
+ title="Rectangle"
+ tooltip="Create rectangle"
+ icon="icons/Addons/rectangle.png"
+ helpfile="rectangleFeature.html">
+ <sketch-2dpoint_selector id="RectStartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates"
+ enable_value="enable_by_preferences"/>
+ <sketch-2dpoint_selector id="RectEndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"
+ enable_value="enable_by_preferences"/>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ <validator id="GeomValidators_Different" parameters="RectStartPoint,RectEndPoint"/>
+ </feature>
+
+ </group>
+ </workbench>
+</source>
--- /dev/null
+
+ .. _create_custom_box_py:
+
+File feature.py
+===============
+
+.. literalinclude:: examples/box/feature.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/box/feature.py>`
\ No newline at end of file
--- /dev/null
+
+ .. _create_custom_rectangle_py:
+
+File feature.py
+===============
+
+.. literalinclude:: examples/rectangle/feature.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/rectangle/feature.py>`
\ No newline at end of file
--- /dev/null
+
+Rectangle
+=========
+
+Custom files for feature **Rectangle** are:
+
+- empty __init__.py,
+- :ref:`create_custom_rectangle_py`,
+- :ref:`create_custom_rectangle_xml`,
+- icon.png located at sub-folder */icons*.
+
+.. image:: images/rectangle.png
+ :align: center
+
+.. centered::
+ File icon.png
+
+Description of custom feature :ref:`create_sketch_rectangle` is given in Sketch plug-in.
\ No newline at end of file
--- /dev/null
+
+ .. _create_custom_box_xml:
+
+File widget.xml
+===============
+
+.. literalinclude:: examples/box/widget.xml
+ :linenos:
+ :language: html
+
+:download:`Download this script <examples/box/widget.xml>`
\ No newline at end of file
--- /dev/null
+
+ .. _create_custom_rectangle_xml:
+
+File widget.xml
+===============
+
+.. literalinclude:: examples/rectangle/widget.xml
+ :linenos:
+ :language: html
+
+:download:`Download this script <examples/rectangle/widget.xml>`
\ No newline at end of file
<workbench id="Macros" document="Part">
<group id="Samples">
- <feature id="Box_script" title="Box" tooltip="Create a box parallel to xyz by extruding a rectangular" icon="icons/Addons/box_ico.png">
+ <feature id="Box_script" title="Box" tooltip="Create a box parallel to xyz by extruding a rectangular" icon="icons/Addons/box_ico.png"
+ helpfile="boxFeature.html">
<doublevalue id="width" label="Width: " min="0" step="1.0" default="50" tooltip="Box width">
<validator id="GeomValidators_Positive"/>
</doublevalue>
title="Rectangle"
tooltip="Create rectangle"
icon="icons/Addons/rectangle.png"
- helpfile="SketchPlugin/rectangleFeature.html">
+ helpfile="rectangleFeature.html">
<sketch-2dpoint_selector id="RectStartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates"
enable_value="enable_by_preferences"/>
<sketch-2dpoint_selector id="RectEndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"
Sketch plug-in
================
+Sketch plug-in includes features for creation of 2D shapes.
-.. image:: images/StartSketch.png
- :align: center
+The process of sketch creation is comprised of:
+
+- definition of sketch plane
+- creation of sketch objects from scratch
+- generation of sketch objects via operations on the existing operations
+- definition of constraints
+
+Sketch could be created both in active part and a part set (if there is no active part).
+
+To create a Sketch:
+
+#. select in the Main Menu *Sketch - > Sketch* item or
+#. click **Sketch** button in Sketch toolbar:
+
+.. image:: images/SketchButton.png
+ :align: center
.. centered::
- Start sketcher
+ **Sketch** button
+
+First define a plane on which to create a sketch:
+
+.. image:: images/PlaneDefinition.png
+ :align: center
+
+- specify plane size (equal to 25 in the example above)
+- then select the appropriate plane in the viewer
+Note that in case if there are no convenient objects for plane selection are
+displayed in the viewer - coordinate planes will be suggested for selection:
+.. image:: images/CoordinatePlanes.png
+ :align: center
-.. image:: images/SketchProperties.png
- :align: center
+After the plane for sketch is selected the following property panel will be opened:
+
+.. image:: images/SketchPanel.png
+ :align: center
.. centered::
- Sketcher properies panel
+ Sketch general panel
+
+- **Reversed** check box - allows reversing the sketch plane normal
+- **Set plane view** button - switches the viewer to the top view for the sketch plane
+- **Show geometrical constraints** check box - turns on/off geometrical constraints displaying
+- **Show dimensional constraints** check box - turns on/off dimensional constraints displaying
+- **Show existing expressions** check box - turns on/off expressions displaying
+
+Now it is possible:
+
+- create :ref:`sketch objects <sketch_objects>`
+- create :ref:`constraints <sketch_constraints>`
+- perform :ref:`sketch operations <sketch_operations>`
+
+To apply or cancel sketch creation use apply and cancel buttons from the
+Sketch panel as well as equivalent buttons from Sketch toolbar.
+
+The Result of operation will be a COMPOUND. Result node in the object tree is located in
+**Constructions** folder.
+
+Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
+
+**TUI Command**: *Sketch_1 = model.addSketch(PartOrPartSet, plane)*
+**Arguments**: Part or PartSet + plane.
+
+.. _sketch_objects:
Sketch objects
--------------
+The plug-in includes the following features for creation of 2D objects:
+
.. toctree::
:maxdepth: 1
- arcFeature.rst
- circleFeature.rst
- ellipseFeature.rst
- lineFeature.rst
pointFeature.rst
+ lineFeature.rst
+ rectangleFeature.rst
+ circleFeature.rst
+ arcFeature.rst
+
+.. _sketch_constraints:
Constraints
-----------
+Constraints are available and viewable during sketch creation or editing.
+
+The goal of constrains creation is to fix a sketch geometry, i.e. set degrees of freedom to zero.
+
+If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
+
+.. image:: images/Sketch_fixed.png
+ :align: center
+
+.. centered::
+ Fixed Sketch
+
+If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
+
+.. image:: images/Sketch_underconstrained.png
+ :align: center
+
+.. centered::
+ Underconstrained Sketch
+
+The plug-in includes the following constraints:
+
.. toctree::
:maxdepth: 1
- angleFeature.rst
- coincedenceFeature.rst
- collinearFeature.rst
distanceFeature.rst
- equalFeature.rst
horizontalDistFeature.rst
- horizontalFeature.rst
+ verticalDistFeature.rst
lengthFeature.rst
- middleFeature.rst
+ angleFeature.rst
+ radiusFeature.rst
+ horizontalFeature.rst
+ verticalFeature.rst
+ fixedFeature.rst
parallelFeature.rst
perpendicularFeature.rst
- radiusFeature.rst
- rigidFeature.rst
tangentFeature.rst
- verticalDistFeature.rst
- verticalFeature.rst
+ coincedentFeature.rst
+ middleFeature.rst
+ equalFeature.rst
+ collinearFeature.rst
+
+.. _sketch_operations:
Operations
----------
+The plug-in includes the following operations:
+
.. toctree::
:maxdepth: 1
filletFeature.rst
+ splitFeature.rst
+ trimFeature.rst
+ projectionFeature.rst
intersectionFeature.rst
mirrorFeature.rst
- projectionFeature.rst
- rotationFeature.rst
- splitFeature.rst
translationFeature.rst
- trimFeature.rst
+ rotationFeature.rst
--- /dev/null
+
+ .. _tui_create_angle:
+
+Create Angle constraint
+=======================
+
+.. literalinclude:: examples/angle.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/angle.py>`
--- /dev/null
+
+ .. _tui_create_arc:
+
+Create Skecth Arc
+=================
+
+.. literalinclude:: examples/arc.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/arc.py>`
--- /dev/null
+
+ .. _tui_create_circle:
+
+Create Skecth Circle
+====================
+
+.. literalinclude:: examples/circle.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/circle.py>`
--- /dev/null
+
+ .. _tui_create_coincident:
+
+Create Coincident constraint
+============================
+
+.. literalinclude:: examples/coincident.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/coincident.py>`
--- /dev/null
+
+ .. _tui_create_collinear:
+
+Create Collinear constraint
+===========================
+
+.. literalinclude:: examples/collinear.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/collinear.py>`
--- /dev/null
+
+ .. _tui_create_distance:
+
+Create Distance constraint
+==========================
+
+.. literalinclude:: examples/distance.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/distance.py>`
--- /dev/null
+
+ .. _tui_create_equal:
+
+Create Equal constraint
+=======================
+
+.. literalinclude:: examples/equal.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/equal.py>`
--- /dev/null
+
+ .. _tui_create_fillet:
+
+Create Fillet
+=============
+
+.. literalinclude:: examples/fillet.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fillet.py>`
--- /dev/null
+
+ .. _tui_create_fixed:
+
+Create Fixed constraint
+=======================
+
+.. literalinclude:: examples/fixed.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fixed.py>`
--- /dev/null
+
+ .. _tui_create_hdistance:
+
+Create Horizontal Distance constraint
+=====================================
+
+.. literalinclude:: examples/hdistance.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/hdistance.py>`
--- /dev/null
+
+ .. _tui_create_horizontal:
+
+Create Horizontal constraint
+============================
+
+.. literalinclude:: examples/horizontal.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/horizontal.py>`
--- /dev/null
+
+ .. _tui_create_intersection:
+
+Create Intersection
+===================
+
+.. literalinclude:: examples/intersection.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/intersection.py>`
--- /dev/null
+
+ .. _tui_create_length:
+
+Create Length constraint
+========================
+
+.. literalinclude:: examples/length.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/length.py>`
--- /dev/null
+
+ .. _tui_create_line:
+
+Create Skecth Line
+==================
+
+.. literalinclude:: examples/line.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/line.py>`
--- /dev/null
+
+ .. _tui_create_middle:
+
+Create Middle point constraint
+==============================
+
+.. literalinclude:: examples/middle.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/middle.py>`
--- /dev/null
+
+ .. _tui_create_mirror:
+
+Create Mirror copy
+==================
+
+.. literalinclude:: examples/mirror.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/mirror.py>`
--- /dev/null
+
+ .. _tui_create_parallel:
+
+Create Parallel constraint
+==========================
+
+.. literalinclude:: examples/parallel.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/parallel.py>`
--- /dev/null
+
+ .. _tui_create_perpendicular:
+
+Create Perpendicular constraint
+==========================
+
+.. literalinclude:: examples/perpendicular.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/perpendicular.py>`
--- /dev/null
+
+ .. _tui_create_point:
+
+Create Skecth Point
+===================
+
+.. literalinclude:: examples/point.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/point.py>`
--- /dev/null
+
+ .. _tui_create_projection:
+
+Create Projection
+=================
+
+.. literalinclude:: examples/projection.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/projection.py>`
--- /dev/null
+
+ .. _tui_create_radius:
+
+Create Radius constraint
+========================
+
+.. literalinclude:: examples/radius.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/radius.py>`
--- /dev/null
+
+ .. _tui_create_rectangle:
+
+Create Skecth Rectangle
+=======================
+
+.. literalinclude:: examples/rectangle.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/rectangle.py>`
--- /dev/null
+
+ .. _tui_create_rotation:
+
+Create Angular copy
+===================
+
+.. literalinclude:: examples/rotation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/rotation.py>`
--- /dev/null
+
+ .. _tui_create_split:
+
+Create Split
+============
+
+.. literalinclude:: examples/split.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/split.py>`
--- /dev/null
+
+ .. _tui_create_tangent:
+
+Create Tangent constraint
+=========================
+
+.. literalinclude:: examples/tangent.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/tangent.py>`
--- /dev/null
+
+ .. _tui_create_translation:
+
+Create Linear copy
+==================
+
+.. literalinclude:: examples/translation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/translation.py>`
--- /dev/null
+
+ .. _tui_create_trim:
+
+Create Trim
+===========
+
+.. literalinclude:: examples/trim.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/trim.py>`
--- /dev/null
+
+ .. _tui_create_vdistance:
+
+Create Vertical Distance constraint
+=====================================
+
+.. literalinclude:: examples/vdistance.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/vdistance.py>`
--- /dev/null
+
+ .. _tui_create_vertical:
+
+Create Vertical constraint
+==========================
+
+.. literalinclude:: examples/vertical.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/vertical.py>`
Angle constraint
================
+Angle constraint fixes angle between two lines.
-.. image:: images/Angle.png
- :align: center
+| Angle between two lines is thought of as an angle between two vectors.
+| So each line is treated as a vector with starting point equal to the line start point
+and terminal point equal to the line end point.
+
+To create Angle constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Angle* item or
+#. click **Angle** button in Sketch toolbar:
+
+.. image:: images/angle_constr.png
+ :align: center
+
+.. centered::
+ **Angle** button
+
+Property panel:
+
+.. image:: images/Angle_panel.png
+ :align: center
+
+Input fields:
+
+- **Line 1** is the first line selected in the view
+- **Line 2** is the second line selected in the view
+- **Value** is an angle between the lines, could be modified to set the desirable value
+- **Angle type** is a type of angle measurement
+ .. image:: images/angle_direct.png
+ :align: left
+ **Direct** is an angle type measured directly between two lines.
+
+ .. image:: images/angle_complementary.png
+ :align: left
+ **Complementary** zzzzzzzz.
+
+ .. image:: images/angle_backward.png
+ :align: left
+ **Backward** zzzzzzzz.
+- **Text location** is a position of the angle value label relating to angle line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the angle line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the angle line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the angle line.
+
+When both lines are selected angle value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of two lines at the first time:
+
+- drag the angle presentation in the view to the desired position (by move mouse and click once)
+- set desirable angle value in the input field in the view and press **Enter** or just press **Enter** to keep the current angle
+
+.. image:: images/Angle_field_view.png
+ :align: center
.. centered::
- Create an angle constraint
+ Angle input in the view
+
+**TUI Command**:
+
+- *Sketch_1.setAngle(Line1, Line2, Value)*
+- *Sketch_1.setAngleComplementary(Line1, Line2, Value)*
+- *Sketch_1.setAngleBackward(Line1, Line2, Value)*
+
+**Arguments**: 2 lines + angle value
+
+Result
+""""""
+
+Created Angle appears in the view.
+
+.. image:: images/Angle_res.png
+ :align: center
+
+.. centered::
+ Angle created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_angle` operation.
\ No newline at end of file
Arc
===
+The feature Arc creates an arc segment in the current Sketch.
-.. image:: images/Arc1.png
- :align: center
+To add new Arc to the Sketch:
+
+#. select in the Main Menu *Sketch - > Arc* item or
+#. click **Arc** button in Sketch toolbar:
+
+.. image:: images/arc.png
+ :align: center
.. centered::
- Create arc by center and two points
+ **Arc** button
+There are 3 algorithms for creation of an Arc:
-.. image:: images/Arc2.png
- :align: center
+.. image:: images/arc_base_32x32.png
+ :align: left
+**By center and two points** creates an arc segment with the given center passing from the start point to the end point on the circumference.
-.. centered::
- Create arc by three points
+.. image:: images/arc_3pt_32x32.png
+ :align: left
+**By three points** creates an arc segment passing from the start point to end point through another point on the circumference.
+
+.. image:: images/arc_tang_32x32.png
+ :align: left
+**By tangent point and end point** creates an arc segment with the tangent point and the end point.
+
+By center and two points
+""""""""""""""""""""""""
+
+.. image:: images/Arc_panel_base.png
+ :align: center
+
+Click in the view once to set the center point, then move the mouse and click a second time to set the start point
+and finally move the mouse and click a third time to set the last passed point.
+
+- When entering a center or start point by selecting either a point or a segment, a Coincident constraint is created.
+- When entering an end point by selecting a segment, a Coincident constraint is created.
+- When entering an end point, only segments are selectable.
+
+**TUI Command**: *Sketch_1.addArc(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)*
+
+**Arguments**: 7 values (coordinates of the center, the start, the end, inversed flag (if true - build arc from end to start)).
+
+By three points
+"""""""""""""""
+
+.. image:: images/Arc_panel_3pt.png
+ :align: center
+Click in the view once to set the start point, then move the mouse and click a second time to set the end point
+and finally move the mouse and click a third time to set the passed point.
-.. image:: images/Arc3.png
- :align: center
+- When entering a start or end point by selecting either a point or a segment, a Coincident constraint is created.
+- When entering a passing point by selecting a point, a Coincident constraint is created.
+- When entering a passing point by selecting a segment, a Tangent constraint is created.
+
+**TUI Command**: *Sketch_1.addArc(StartX, StartY, EndX, EndY, PassedX, PassedY)*
+
+**Arguments**: 6 values (coordinates of the start, end and passed points).
+
+By tangent point and point
+""""""""""""""""""""""""""
+
+.. image:: images/Arc_panel_tang.png
+ :align: center
+
+Select point on segement in the view to set the tangent point, then move the mouse and click to set the end point.
+Tangent point by itself is a start point. The edge on which it lies will be tangent to the arc.
+
+- When entering a tangent point by selecting a point on segment, a Tangent constraint is created.
+- When entering an end point by selecting a segment, a Coincident constraint is created.
+- When entering an end point, only segments are selectable.
+
+**TUI Command**: *Sketch_1.addArc(TangetPoint, EndX, EndY, Inversed)*
+
+**Arguments**: 4 values (reference to tangent point, coordinates of end point, inversed flag (if true - build arc from end to start)).
+
+Result
+""""""
+
+Created arc appears in the view.
+
+.. image:: images/Arc_res.png
+ :align: center
.. centered::
- Create arc as tangent to an edge
+ Circle created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_arc` operation.
\ No newline at end of file
Circle
======
+The feature Circle creates a circle in the current Sketch.
-.. image:: images/Circle1.png
- :align: center
+To add new Circle to the Sketch:
+
+#. select in the Main Menu *Sketch - > Circle* item or
+#. click **Circle** button in Sketch toolbar:
+
+.. image:: images/circle.png
+ :align: center
.. centered::
- Create circle by center and point
+ **Circle** button
+
+There are 2 algorithms for creation of a Circle:
+
+.. image:: images/circle_pt_rad_32x32.png
+ :align: left
+**By center and passed point** creates a circle with the given center passing through the given point.
+
+.. image:: images/circle_3pt_32x32.png
+ :align: left
+**By three points** creates a circle passing through the given three points.
+
+By center and passed point
+""""""""""""""""""""""""""
+
+.. image:: images/Circle_panel_pt_rad.png
+ :align: center
+
+Click in the view once to set the center point, then move the mouse and click a second time to set the passed point.
+
+- When entering a center point by selecting either a point or a segment, a Coincident constraint is created.
+- When entering a passing point by selecting a point, a Coincident constraint is also created.
+- When entering a passing point by selecting a segment, a Tangent constraint is created.
+
+**TUI Command**: *Sketch_1.addCircle(CenterX, CenterY, PassedX, PassedY)*
+
+**Arguments**: 4 values (coordinates of the center and the passed point).
+
+By three points
+"""""""""""""""
+
+.. image:: images/Circle_panel_3pt.png
+ :align: center
+Click in the view once to set the first passed point, then move the mouse and click a second time to set the second passed point
+and finally move the mouse and click a third time to set the last passed point.
-.. image:: images/Circle2.png
- :align: center
+- When entering a passing point by selecting a point, a Coincident constraint is created.
+- When entering a passing point by selecting a segment, a Tangent constraint is created.
+
+**TUI Command**: *Sketch_1.addCircle(X1, Y1, X2, Y2, X3, Y3)*
+
+**Arguments**: 6 values (coordinates of three points).
+
+Property panel in edition context
+"""""""""""""""""""""""""""""""""
+
+The following property panel appears when the user selects an existing circle.
+
+.. image:: images/Circle_panel_edit.png
+ :align: center
+
+Note that the edition property panel doesn't show the creation algorithm used.
+
+The panel shows:
+
+- center coordinates and radius (read-only).
+- auxiliary flag (could be modified).
+
+Result
+""""""
+
+Created circle appears in the view.
+
+.. image:: images/Circle_res.png
+ :align: center
.. centered::
- Create circle by tree points
+ Circle created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_circle` operation.
+++ /dev/null
-
-Coincidence constraint
-======================
-
-
-.. image:: images/Coincident.png
- :align: center
-
-.. centered::
- Create a coincedence constraint
--- /dev/null
+
+Coincident constraint
+=====================
+
+Coincident constraint makes two points to be coincident, or one point to lie on a line or circumference of a circle (or an arc).
+
+To create Coincident in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Coincident* item or
+#. click **Coincident** button in Sketch toolbar:
+
+.. image:: images/coincedence.png
+ :align: center
+
+.. centered::
+ **Coincident** button
+
+Property panel:
+
+.. image:: images/Coincident_panel.png
+ :align: center
+
+Input fields:
+
+- **First object** is a point, a line, a circle or an arc selected in the view.
+- **Second object** is a point, a line, a circle or an arc selected in the view.
+
+Note that one of two objects should be a point (i.e. a point, a line or an arc end point, a center of a circle or an arc).
+
+After the objects are selected the point becomes yellow colored in the view.
+
+**TUI Command**: *Sketch_1.setCoincident(Object1, Object2)*
+
+**Arguments**: 2 objects (one of them is a point, the second one is a point, a circle, an arc or a line)
+
+Result
+""""""
+
+Created Coincident constraint appears in the view.
+
+.. image:: images/Coincident_res.png
+ :align: center
+
+.. centered::
+ Coincident constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_coincident` operation.
\ No newline at end of file
Collinear constraint
====================
+Collinear constraint makes to lines collinear.
-.. image:: images/Colinear.png
- :align: center
+To create Collinear in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Collinear* item or
+#. click **Collinear** button in Sketch toolbar:
+
+.. image:: images/collinear.png
+ :align: center
.. centered::
- Create a collinear constraint
+ **Collinear** button
+
+Property panel:
+
+.. image:: images/Collinear_panel.png
+ :align: center
+
+Input fields:
+
+- **First line** is the first line selected in the view.
+- **Second line** is the second line selected in the view.
+
+| After the lines are selected they becomes translated as to be collinear.
+| The lines are marked with the special sign.
+
+**TUI Command**: *Sketch_1.setCollinear(Line1, Line2)*
+
+**Arguments**: 2 line objects
+
+Result
+""""""
+
+Created Collinear constraint appears in the view.
+
+.. image:: images/Collinear_res.png
+ :align: center
+
+.. centered::
+ Collinear constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_collinear` operation.
Distance constraint
===================
+Distance constraint fixes distance between two objects.
-.. image:: images/Distance.png
- :align: center
+The constraint can be defined between such objects as point, line, line or arc end point, center of circle or arc.
+
+To create Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Distance* item or
+#. click **Distance** button in Sketch toolbar:
+
+.. image:: images/distance.png
+ :align: center
.. centered::
- Create a distance constraint
+ **Distance** button
+
+Property panel:
+
+.. image:: images/Distance_panel.png
+ :align: center
+
+Input fields:
+
+- **First object** is the first object selected in the view
+- **Second object** is the second object selected in the view
+- **Value** is a distance between the objects, could be modified to set the desirable value
+- **Text location** is a position of the distance value label relating to extension line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the distance extension line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the distance extension line.
+- **Keep orientation** fixes the relative position between selected objects
+
+When both objects are selected distance value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of two objects at the first time:
+
+- drag the distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/Distance_field_view.png
+ :align: center
+
+.. centered::
+ Distance input in the view
+
+**TUI Command**: *Sketch_1.setDistance(FirstObject, SecondObject, Value, KeepOrientation)*
+
+**Arguments**: 2 objects + distance value + keep orientation flag
+
+Result
+""""""
+
+Created Distance appears in the view.
+
+.. image:: images/Distance_res.png
+ :align: center
+
+.. centered::
+ Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_distance` operation.
Equal constraint
================
+| Equal constraint makes lines, circles or arcs of equal size.
+| Lines becomes of equal length, circles and arcs - of equal radius.
-.. image:: images/Equal.png
- :align: center
+To create Equal in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Equal* item or
+#. click **Equal** button in Sketch toolbar:
+
+.. image:: images/equal.png
+ :align: center
+
+.. centered::
+ **Equal** button
+
+Property panel:
+
+.. image:: images/Equal_panel.png
+ :align: center
+
+Input fields:
+
+- **First object** is a line, a circle or an arc selected in the view.
+- **Second object** is a line, a circle or an arc selected in the view.
+
+Note that a line could be equal to a line only, a circle - to a circle or an arc.
+
+| After the objects are selected the object sizes become equal.
+| The equal objects are marked with **=** sign.
+
+**TUI Command**: *Sketch_1.setEqual(Object1, Object2)*
+
+**Arguments**: 2 objects (2 lines, 2 arcs, 2 circles or circle and arc)
+
+Result
+""""""
+
+Created Equal constraint appears in the view.
+
+.. image:: images/Equal_res.png
+ :align: center
.. centered::
- Create an equal constraint
+ Equal constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_equal` operation.
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(55.1, 13.0, 6.42, 35.5)
+SketchLine_2 = Sketch_1.addLine(50.2, 22.4, 36.8, 58.8)
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_2.result(), SketchLine_1.result(), 45)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
+SketchArc_1 = Sketch_1.addArc(6.0, 6.2, 5.2, 34.3, 34.0, 7.7, True)
+SketchArc_2 = Sketch_1.addArc(8.1, 56.7, 58.2, 6.6, 44.8, 69.2)
+SketchLine_3 = Sketch_1.addLine(25.0, 109.4, 68.1, 153.6)
+SketchLine_3.setAuxiliary(True)
+SketchArc_3 = Sketch_1.addArc(SketchLine_3.startPoint(), 92.1, 34.0, True)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(38.6, 47.5, 31.5)
+SketchCircle_2 = Sketch_1.addCircle(0.0, 14.1, 15.0, 0.1, 17.2, 19.9)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(34, 28, 12)
+SketchLine_1 = Sketch_1.addLine(41, 45, 61, 72)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchCircle_1.results()[1], SketchLine_1.startPoint())
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(6, 25, 20, 40)
+SketchLine_2 = Sketch_1.addLine(44, 26, 80, 61)
+SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_1.result(), SketchLine_2.result())
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4)
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchCircle_1.center(), SketchLine_1.result(), 70.0, True)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(27, 25, 5)
+SketchArc_1 = Sketch_1.addArc(55.58, 56.8, 70.53, 54.47, 65.76, 67.99, True)
+SketchConstraintEqual_1 = Sketch_1.setEqual(SketchCircle_1.results()[1], SketchArc_1.results()[1])
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(7, 46, 63, 20)
+SketchLine_2 = Sketch_1.addLine(63, 20, 55, 85)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+Fillet_1 = Sketch_1.setFillet(SketchLine_1.endPoint())
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(38.7, 43.3, 29.29)
+SketchConstraintRigid_1 = Sketch_1.setFixed(SketchCircle_1.results()[1])
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4)
+SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 30)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(14.5, 16.0, 71.0, 62.0)
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+Point_2 = model.addPoint(Part_1_doc, 10, 10, -10)
+Point_3 = model.addPoint(Part_1_doc, 70, 70, 50)
+Polyline_1 = model.addPolyline3D(Part_1_doc, [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], False)
+
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchIntersectionPoint_1 = Sketch_1.addIntersectionPoint(model.selection("EDGE", "Polyline_1_1/Edge_1"), True)
+
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(14.6, 14.2, 59.4, 61.9)
+SketchLine_1.result().setColor(225, 0, 0)
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 65.5)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(64.5, 87.9, -33.4, -42.6)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(16, 54, 10)
+SketchLine_1 = Sketch_1.addLine(10, 10, 80, 80)
+SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchCircle_1.center(), SketchLine_1.result())
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(25, 25, 11)
+SketchLine_1 = Sketch_1.addLine(9, 78, 78, 9)
+
+SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_1.result(), [SketchCircle_1.results()[1]])
+
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(13, 58, 69, 75)
+SketchLine_2 = Sketch_1.addLine(12, 38, 73, 23)
+SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchLine_2.result())
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(13, 58, 69, 75)
+SketchLine_2 = Sketch_1.addLine(12, 38, 73, 23)
+SketchConstraintParallel_1 = Sketch_1.setPerpendicular(SketchLine_1.result(), SketchLine_2.result())
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchPoint_1 = Sketch_1.addPoint(42.6, 19.0)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+Point_2 = model.addPoint(Part_1_doc, 10, 10, -10)
+Point_3 = model.addPoint(Part_1_doc, 70, 70, 50)
+Polyline_1 = model.addPolyline3D(Part_1_doc, [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], False)
+
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchIntersectionPoint_1 = Sketch_1.addProjection(model.selection("EDGE", "Polyline_1_1/Edge_1"), True)
+
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(35, 50, 25)
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 25)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+Rectangle_1 = Sketch_1.addRectangle(5.5, 8.5, 31.3, 78.9)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchPoint_1 = Sketch_1.addPoint(45, 45)
+SketchCircle_1 = Sketch_1.addCircle(35, 25, 8)
+
+SketchMultiRotation_1 = Sketch_1.addRotation([SketchCircle_1.results()[1]], SketchPoint_1.coordinates(), 270, 4, True)
+[SketchCircle_2, SketchCircle_3, SketchCircle_4] = SketchMultiRotation_1.rotated()
+
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+from salome.shaper import geom
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+SketchCircle_1 = Sketch_1.addCircle(44, 44, 29)
+
+SketchPoint_1 = Sketch_1.addPoint(15, 44)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1])
+SketchPoint_2 = Sketch_1.addPoint(44, 73)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.results()[1])
+SketchPoint_3 = Sketch_1.addPoint(64, 23)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchCircle_1.results()[1])
+
+GeomPoint = geom.Pnt2d(22, 65)
+Sketch_1.addSplit(SketchCircle_1, GeomPoint)
+
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(30, 30, 15)
+SketchLine_1 = Sketch_1.addLine(10, 80, 80, 27)
+SketchConstraintTangent_1 = Sketch_1.setTangent(SketchCircle_1.results()[1], SketchLine_1.result())
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(12, 12, 6.5)
+SketchPoint_1 = Sketch_1.addPoint(13, 50)
+SketchPoint_2 = Sketch_1.addPoint(30, 70)
+
+SketchMultiTranslation_1 = Sketch_1.addTranslation([SketchCircle_1.results()[1]], SketchPoint_1.coordinates(), SketchPoint_2.coordinates(), 4)
+[SketchCircle_2, SketchCircle_3, SketchCircle_4] = SketchMultiTranslation_1.translated()
+
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+from salome.shaper import geom
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+SketchCircle_1 = Sketch_1.addCircle(40, 45, 30)
+
+SketchPoint_1 = Sketch_1.addPoint(20, 70)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1])
+
+SketchLine_1 = Sketch_1.addLine(17, 7, 80, 70)
+
+GeomPoint = geom.Pnt2d(47, 75)
+Sketch_1.addTrim(SketchCircle_1, GeomPoint)
+
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(62.3, 85.1, 91.2, 56.4)
+SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 75.5)
+model.do()
+model.end()
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(15.5, 14.5, 71.0, 62.8)
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
+model.do()
+model.end()
\ No newline at end of file
Fillet
======
+| The Fillet operation rounds the corner formed by intersection of two sketch elements in a coincident point.
+| The operation trims the elements at the intersection and creates a tangent arc between them.
-.. image:: images/Fillet.png
+To create Fillet in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Fillet* item or
+#. click **Fillet** button in Sketch toolbar:
+
+.. image:: images/fillet.png
+ :align: center
+
+.. centered::
+ **Fillet** button
+
+Property panel:
+
+.. image:: images/Fillet_panel.png
:align: center
.. centered::
- Create a fillet
+ Fillet
+
+Input fields:
+
+- **Point** is the coincident point of two intersecting lines (or a line and an arc) selected in the view.
+
+After the point is selected Fillet preview appears in the view.
+
+**TUI Command**:
+
+- *Sketch_1.setFillet(Point)*
+
+ **Arguments**: coincident point
+
+- *Sketch_1.setFilletWithRadius(Point, Radius)*
+
+ **Arguments**: coincident point and fillet radius
+
+Result
+""""""
+
+Created Fillet appears in the view.
+
+.. image:: images/Fillet_res.png
+ :align: center
+
+.. centered::
+ Fillet created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet` operation.
\ No newline at end of file
--- /dev/null
+
+Fixed constraint
+================
+
+Fixed constraint fixes objects position and size.
+
+The constraint can be defined for such objects as point, line, line or arc end point, center of circle or arc, whole circle or arc.
+
+To create Fixed constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Fixed* item or
+#. click **Fixed** button in Sketch toolbar:
+
+.. image:: images/fixed.png
+ :align: center
+
+.. centered::
+ **Fixed** button
+
+Property panel:
+
+.. image:: images/Fixed_panel.png
+ :align: center
+
+Input fields:
+
+- **Object** is the object selected in the view.
+
+After the object is selected anchor sign will be added close to it in the view.
+
+Selection rules:
+
+- Selection of end point on the line, center of circle or arc - fixes only the selected point.
+- To fix the whole line the segment between endpoints should be selected.
+- To fix the whole circle or arc the circumference should be selected.
+
+**TUI Command**: *Sketch_1.setFixed(Object)*
+
+**Arguments**: 1 object
+
+Result
+""""""
+
+Created Fixed constraint appears in the view.
+
+.. image:: images/Fixed_res.png
+ :align: center
+
+.. centered::
+ Fixed constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fixed` operation.
Horizontal distance constraint
==============================
+Horizontal Distance constraint fixes distance between two points along the horizontal axis.
-.. image:: images/HorizontalDist.png
- :align: center
+The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc.
+
+To create Horizontal Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Horizontal Distance* item or
+#. click **Horizontal Distance** button in Sketch toolbar:
+
+.. image:: images/distance_h.png
+ :align: center
.. centered::
- Create horizontal distance constraint
+ **Horizontal Distance** button
+
+Property panel:
+
+.. image:: images/HorizontalDistance_panel.png
+ :align: center
+
+Input fields:
+
+- **First point** is the first point selected in the view
+- **Second point** is the second point selected in the view
+- **Value** is a distance between the objects, could be modified to set the desirable value
+- **Text location** is a position of the distance value label relating to extension line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the distance extension line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the distance extension line.
+
+When both objects are selected horizontal distance value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of two objects at the first time:
+
+- drag the horizontal distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable horizontal distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/HorizontalDistance_field_view.png
+ :align: center
+
+.. centered::
+ Horizontal Distance input in the view
+
+**TUI Command**: *Sketch_1.setHorizontalDistance(FirstObject, SecondObject, Value)*
+
+**Arguments**: 2 objects + horizontal distance value
+
+Result
+""""""
+
+Created Horizontal Distance appears in the view.
+
+.. image:: images/HorizontalDistance_res.png
+ :align: center
+
+.. centered::
+ Horizontal Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_hdistance` operation.
\ No newline at end of file
Horizontal constraint
=====================
+Horizontal constraint fixes lines to lie parallel to the horizontal axis.
-.. image:: images/Horizontal.png
- :align: center
+To create Horizontal constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Horizontal* item or
+#. click **Horizontal** button in Sketch toolbar:
+
+.. image:: images/horisontal.png
+ :align: center
.. centered::
- Create a horizontal constaint
+ **Horizontal** button
+
+Property panel:
+
+.. image:: images/Horizontal_panel.png
+ :align: center
+
+Input fields:
+
+- **Line** is the line selected in the view.
+
+| After the line is selected it becomes parallel to the horizontal axis in the view.
+| **H** sign added above the line.
+
+**TUI Command**: *Sketch_1.setHorizontal(LineObject)*
+
+**Arguments**: 1 line object
+
+Result
+""""""
+
+Created Horizontal constraint appears in the view.
+
+.. image:: images/Horizontal_res.png
+ :align: center
+
+.. centered::
+ Horizontal constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_horizontal` operation.
\ No newline at end of file
Intersection
============
+| The Intersection operation creates intersection of a 3D edge and the sketch plane.
+| The result of intersection is a point.
-.. image:: images/Intersection.png
+To create Intersection in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Intersection* item or
+#. click **Intersection** button in Sketch toolbar:
+
+.. image:: images/intersection.png
+ :align: center
+
+.. centered::
+ **Intersection** button
+
+Property panel:
+
+.. image:: images/Intersection_panel.png
:align: center
.. centered::
- Create an intersection
+ Intersection
+
+Input fields:
+
+- **Object** is the 3D edge to intersect with the sketch plane.
+- **Include into the sketch result** option defines whether to include the intersection point into the sketch result.
+
+**TUI Command**:
+
+- *Sketch_1.addIntersectionPoint(Edge, IncludeIntoResult)*
+
+ **Arguments**: Edge and include into the result flag
+
+- *Sketch_1.addIntersectionPoint(EdgeName, IncludeIntoResult)*
+
+ **Arguments**: Edge name and include into the result flag
+
+Result
+""""""
+
+Created Intersection appears in the view.
+
+.. image:: images/Intersection_res.png
+ :align: center
+
+.. centered::
+ Intersection created (purple point)
+
+**See Also** a sample TUI Script of a :ref:`tui_create_intersection` operation.
Length constraint
=================
+Length constraint fixes length of lines such as standalone line or rectangle side.
-.. image:: images/Length.png
- :align: center
+To create Length constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Length* item or
+#. click **Length** button in Sketch toolbar:
+
+.. image:: images/length.png
+ :align: center
+
+.. centered::
+ **Length** button
+
+Property panel:
+
+.. image:: images/Length_panel.png
+ :align: center
+
+Input fields:
+
+- **Line** is the the line object selected in the view
+- **Value** is a line length, could be modified to set the desirable value
+- **Text location** is a position of the length value label relating to extension line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the length extension line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the length extension line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the length extension line.
+
+When the line is selected length value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of a line at the first time:
+
+- drag the length presentation in the view to the desired position (by move mouse and click once)
+- set desirable length value in the input field in the view and press **Enter** or just press **Enter** to keep the current length
+
+.. image:: images/Length_field_view.png
+ :align: center
.. centered::
- Create a length constraint
+ Length input in the view
+
+**TUI Command**: *Sketch_1.setLength(LineObject, Value)*
+
+**Arguments**: line + length value
+
+Result
+""""""
+
+Created Length appears in the view.
+
+.. image:: images/Length_res.png
+ :align: center
+
+.. centered::
+ Length created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_length` operation.
Line
====
+The feature Line creates a line segment by two points in the current Sketch.
-.. image:: images/Line.png
+To add new Line to the Sketch:
+
+#. select in the Main Menu *Sketch - > Line* item or
+#. click **Line** button in Sketch toolbar:
+
+.. image:: images/line.png
+ :align: center
+
+.. centered::
+ **Line** button
+
+The following property panel appears.
+
+.. image:: images/Line_panel.png
:align: center
.. centered::
- Create a line
+ Line
+
+Pick 2 points (start and end) in the view to create a Line. In the case of click on an existing object constraint for
+the point will be created automatically.
+
+Start and end points coordinates are displayed in the property panel.
+
+**TUI Command**: *Sketch_1.addLine(X1, Y1, X2, Y2)*
+
+**Arguments**: 4 values (coordinates of the start and end points).
+
+Result
+""""""
+
+Created line appears in the view.
+
+.. image:: images/Line_res.png
+ :align: center
+
+.. centered::
+ Line created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_line` operation.
-Middle constraint
-=================
+Middle point constraint
+=======================
+Middle point constraint makes one point to lie in the middle of a line.
-.. image:: images/MiddlePoint.png
- :align: center
+To create Middle point in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Middle point* item or
+#. click **Middle point** button in Sketch toolbar:
+
+.. image:: images/middlepoint.png
+ :align: center
+
+.. centered::
+ **Middle point** button
+
+Property panel:
+
+.. image:: images/Middlepoint_panel.png
+ :align: center
+
+Input fields:
+
+- **First object** is a point or a line selected in the view.
+- **Second object** is a point or a line selected in the view.
+
+Note that one of two objects should be a line and another one a point (i.e. a point, a line or an arc end point, a center of a circle or an arc).
+
+| After the objects are selected the point becomes located in the middle of the line.
+| The middle point are marked with the special sign.
+
+**TUI Command**: *Sketch_1.setMiddlePoint(Point, Line)*
+
+**Arguments**: 2 objects (the first is a point, the second one is a line)
+
+Result
+""""""
+
+Created Middle point constraint appears in the view.
+
+.. image:: images/Middlepoint_res.png
+ :align: center
.. centered::
- Create a middle constraint
+ Middle point constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_middle` operation.
-Mirror
-======
+Mirror copy
+===========
+Mirror copy operation mirrors sketch entities across a line.
-.. image:: images/Mirror.png
+To create Mirror copy in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Mirror copy* item or
+#. click **Mirror copy** button in Sketch toolbar:
+
+.. image:: images/mirror.png
+ :align: center
+
+.. centered::
+ **Mirror copy** button
+
+Property panel:
+
+.. image:: images/Mirror_panel.png
:align: center
.. centered::
- Create a mirror
+ Mirror copy
+
+Input fields:
+
+- **Mirror line** is the mirror line selected in the view.
+- **Segments** is the list of segments (lines, circles, arcs) selected in the view.
+
+**TUI Command**: *Sketch_1.addMirror(MirrorLine, Objects)*
+
+**Arguments**: Mirror line and a list of objects
+
+Result
+""""""
+
+Created Mirror copy appears in the view.
+
+| The original and a mirror copy objects are marked with the special sign.
+| Copy object is drawn with a thinner line.
+
+.. image:: images/Mirror_res.png
+ :align: center
+
+.. centered::
+ Mirror copy created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_mirror` operation.
\ No newline at end of file
Parallel constraint
===================
+Parallel constraint fixes two lines to lie parallel to one another.
-.. image:: images/Parallel.png
- :align: center
+To create Parallel in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Parallel* item or
+#. click **Parallel** button in Sketch toolbar:
+
+.. image:: images/parallel.png
+ :align: center
.. centered::
- Create a parallel constraint
+ **Parallel** button
+
+Property panel:
+
+.. image:: images/Parallel_panel.png
+ :align: center
+
+Input fields:
+
+- **First line** is the first line selected in the view.
+- **Second line** is the second line selected in the view.
+
+After the lines are selected **||** sign will be added to each of them in the view.
+
+**TUI Command**: *Sketch_1.setParallel(Line1, Line2)*
+
+**Arguments**: 2 line objects
+
+Result
+""""""
+
+Created Parallel constraint appears in the view.
+
+.. image:: images/Parallel_res.png
+ :align: center
+
+.. centered::
+ Parallel constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_parallel` operation.
\ No newline at end of file
Perpendicular constraint
========================
+Perpendicular constraint fixes two lines to lie at 90 degrees to one another.
-.. image:: images/Perpendicular.png
- :align: center
+To create Perpendicular in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Perpendicular* item or
+#. click **Perpendicular** button in Sketch toolbar:
+
+.. image:: images/perpendicular.png
+ :align: center
.. centered::
- Create a perpendicular constraint
+ **Perpendicular** button
+
+Property panel:
+
+.. image:: images/Perpendicular_panel.png
+ :align: center
+
+Input fields:
+
+- **First line** is the first line selected in the view.
+- **Second line** is the second line selected in the view.
+
+After the lines are selected the special sign will be added to each of them in the view.
+
+**TUI Command**: *Sketch_1.setPerpendicular(Line1, Line2)*
+
+**Arguments**: 2 line objects
+
+Result
+""""""
+
+Created Perpendicular constraint appears in the view.
+
+.. image:: images/Perpendicular_res.png
+ :align: center
+
+.. centered::
+ Perpendicular constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_perpendicular` operation.
Point
=====
+The feature Point creates a point in the current Sketch.
-.. image:: images/Point.png
+To add new Point to the Sketch:
+
+#. select in the Main Menu *Sketch - > Point* item or
+#. click **Point** button in Sketch toolbar:
+
+.. image:: images/point.png
+ :align: center
+
+.. centered::
+ **Point** button
+
+The following property panel appears.
+
+.. image:: images/Point_panel.png
:align: center
.. centered::
- Create a point
+ Point
+
+Clicking in the view creates a point preview. In the case of click on an existing object constraint for
+the point will be created automatically.
+
+The point coordinates are displayed in the property panel.
+
+**TUI Command**: *Sketch_1.addPoint(X, Y)*
+
+**Arguments**: 2 values (coordinates on the Sketch plane).
+
+Result
+""""""
+
+Created point appears in the view.
+
+.. image:: images/Point_res.png
+ :align: center
+
+.. centered::
+ Point created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_point` operation.
\ No newline at end of file
Projection
==========
+| The Projection operation creates projection of 3D edge or vertex onto the sketch plane.
+| The result of projection is a line.
-.. image:: images/Projection.png
+To create Projection in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Projection* item or
+#. click **Projection** button in Sketch toolbar:
+
+.. image:: images/projection.png
+ :align: center
+
+.. centered::
+ **Projection** button
+
+Property panel:
+
+.. image:: images/Projection_panel.png
:align: center
.. centered::
- Create a projection
+ Projection
+
+Input fields:
+
+- **Object** is the 3D object (edge or vertex) to project onto the sketch plane.
+- **Include into the sketch result** option defines whether to include the projection line into the sketch result.
+
+**TUI Command**:
+
+- *Sketch_1.addProjection(EdgeOrVertex, IncludeIntoResult)*
+
+ **Arguments**: edge or vertex and include into the result flag
+
+- *Sketch_1.addProjection(EdgeOrVertexName, IncludeIntoResult)*
+
+ **Arguments**: edge or vertex name and include into the result flag
+
+Result
+""""""
+
+Created Projection appears in the view.
+
+.. image:: images/Projection_res.png
+ :align: center
+
+.. centered::
+ Projection created (purple line)
+
+**See Also** a sample TUI Script of a :ref:`tui_create_projection` operation.
\ No newline at end of file
Radius constraint
=================
+Radius constraint fixes radius of circle or arc.
-.. image:: images/Radius.png
- :align: center
+To create Radius constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Radius* item or
+#. click **Radius** button in Sketch toolbar:
+
+.. image:: images/radius_constr.png
+ :align: center
+
+.. centered::
+ **Radius** button
+
+Property panel:
+
+.. image:: images/Radius_panel.png
+ :align: center
+
+Input fields:
+
+- **Circle or Arc** is the circe or arc circumference selected in the view
+- **Value** is a radius of the selected object, could be modified to set the desirable value
+- **Text location** is a position of the radius value label relating to extension line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the radius extension line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the radius extension line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the radius extension line.
+
+When circle or arc is selected radius value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of the circle or arc at the first time :
+
+- drag the radius presentation in the view to the desired position (by move mouse and click once)
+- set desirable radius value in the input field in the view and press **Enter** or just press **Enter** to keep the current radius
+
+.. image:: images/Radius_field_view.png
+ :align: center
.. centered::
- Create a radius constraint
+ Radius input in the view
+
+**TUI Command**: *Sketch_1.setRadius(CircleOrArc, Value)*
+
+**Arguments**: circle or arc circumference object + radius value
+
+Result
+""""""
+
+Created Radius appears in the view.
+
+.. image:: images/Radius_res.png
+ :align: center
+
+.. centered::
+ Radius created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_radius` operation.
+ .. _create_sketch_rectangle:
Rectangle
=========
+The feature Rectangle creates a rectangle by two opposite points in the current Sketch.
-.. image:: images/Rectangle.png
+The result is represented in the form of four Lines which compose a rectangle.
+Two of the lines have Vertical constraint and two others have Horizontal constraint.
+
+To add new Rectangle to the Sketch:
+
+#. select in the Main Menu *Sketch - > Rectangle* item or
+#. click **Rectangle** button in Sketch toolbar:
+
+.. image:: images/rectangle.png
+ :align: center
+
+.. centered::
+ **Rectangle** button
+
+The following property panel appears.
+
+.. image:: images/Rectangle_panel.png
:align: center
.. centered::
- Create a rectangle
+ Rectangle
+
+Click in the view once to set the first corner, then move the mouse and click a second time to set the opposite corner.
+In the case of click on an existing object constraint for the point will be created automatically.
+
+Start and end points coordinates are displayed in the property panel.
+
+**TUI Command**: *Sketch_1.addRectangle(X1, Y1, X2, Y2)*
+
+**Arguments**: 4 values (coordinates of the start and end points).
+
+Result
+""""""
+
+Created rectangle appears in the view.
+
+.. image:: images/Rectangle_res.png
+ :align: center
+
+.. centered::
+ Rectangle created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_rectangle` operation.
\ No newline at end of file
+++ /dev/null
-
-Fixed constraint
-================
-
-
-.. image:: images/Fixed.png
- :align: center
-
-.. centered::
- Create a fixed constraint
Angular copy
============
+Angular copy operation creates one or multiple copies of the skecth entities by rotation relative to a specified center point.
-.. image:: images/AngularCopy.png
+To create Angular copy in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Angular copy* item or
+#. click **Angular copy** button in Sketch toolbar:
+
+.. image:: images/rotate.png
+ :align: center
+
+.. centered::
+ **Angular copy** button
+
+Property panel:
+
+.. image:: images/Rotation_panel.png
:align: center
.. centered::
- Create an angular copy
+ Angular copy
+
+Input fields:
+
+- **Segments** is the list of segments (lines, circles, arcs) selected in the view.
+- **Center of rotation** is the center point selected in the view.
+- **Full angle/Single angle** option:
+
+ .. image:: images/angle_up_full_32x32.png
+ :align: left
+ **Full angle**: angle step of rotation is equal to the defined angle divided by the number of copies (total number minus one).
+
+ .. image:: images/angle_up_full_32x32.png
+ :align: left
+ **Single angle**: angle step of rotation is equal to the defined angle.
+
+- **Angle** is the angle of rotation.
+- **Reversed** defines rotation direction. If checked - in clockwise direction, otherwise - in a counterclockwise direction.
+- **Total number of objects** is the total number of objects including the original one.
+
+
+**TUI Command**: *Sketch_1.addRotation(Objects, CenterPoint, Angle, NumberOfObjects, FullValue, Reversed)*
+
+**Arguments**: list of objects + center point + angle + number of objects + full value flag + reversed flag
+
+Result
+""""""
+
+Created Angular copy appears in the view.
+
+| The original and an angular copy objects are marked with the special sign.
+| Copy objects are drawn with a thinner line.
+
+.. image:: images/Rotation_res.png
+ :align: center
+
+.. centered::
+ Angular copy created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_rotation` operation.
Split
=====
+| The Split operation splits sketch curve into multiple segments.
+| The curve should have points lying on it.
+| Open curves (line or arc) require one or more points to split with; closed curves (circle) require two or more points.
-.. image:: images/Split.png
+To create Split in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Split* item or
+#. click **Split** button in Sketch toolbar:
+
+.. image:: images/split.png
+ :align: center
+
+.. centered::
+ **Split** button
+
+Property panel:
+
+.. image:: images/Split_panel.png
:align: center
.. centered::
- Split a line
+ Split
+
+Input fields:
+
+- **Segment** is used to select a segment to be split off in the view.
+
+The selected segment is highlighted in the view:
+
+.. image:: images/Split_segment_sel.png
+ :align: center
+
+.. centered::
+ The segment to split off
+
+**TUI Command**: *Sketch_1.addSplit(Feature, PositionPoint)*
+
+**Arguments**: feature (line, arc or circle) and position point (a point on or closest to the segment to split off)
+
+Result
+""""""
+
+Created Split appears in the view.
+
+.. image:: images/Split_res.png
+ :align: center
+
+.. centered::
+ Split created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_split` operation.
\ No newline at end of file
Tangent constraint
==================
+Tangent constraint fixes a circle (or an arc) and a line so that a line is tangent to a circle (or an arc).
-.. image:: images/Tangent.png
- :align: center
+To create Tangent in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Tangent* item or
+#. click **Tangent** button in Sketch toolbar:
+
+.. image:: images/tangent.png
+ :align: center
+
+.. centered::
+ **Tangent** button
+
+Property panel:
+
+.. image:: images/Tangent_panel.png
+ :align: center
+
+Input fields:
+
+- **First object** is a line, a circle or an arc selected in the view.
+- **Second object** is a line, a circle or an arc selected in the view.
+
+Note that one of two objects should be a line.
+
+After the objects are selected the special sign will be added close to the tangency point in the view.
+
+**TUI Command**: *Sketch_1.setTangent(Line, CircleOrArc)*
+
+**Arguments**: 2 objects (the first is a line, the second one is a circle or an arc)
+
+Result
+""""""
+
+Created Tangent constraint appears in the view.
+
+.. image:: images/Tangent_res.png
+ :align: center
.. centered::
- Create a tangent constraint
+ Tangent constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_tangent` operation.
Linear copy
===========
+Linear copy operation creates one or multiple copies of the skecth entities along a vector defined by two points.
-.. image:: images/LinearCopy.png
+To create Linear copy in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Linear copy* item or
+#. click **Linear copy** button in Sketch toolbar:
+
+.. image:: images/translate.png
+ :align: center
+
+.. centered::
+ **Linear copy** button
+
+Property panel:
+
+.. image:: images/Linear_panel.png
:align: center
.. centered::
- Create a linear copy
+ Linear copy
+
+Input fields:
+
+- **Segments** is the list of segments (lines, circles, arcs) selected in the view.
+- **Single value/Full value** option:
+
+ .. image:: images/translate_32x32.png
+ :align: left
+ **Single value**: step of translation is equal to the distance between the start and the end point.
+
+ .. image:: images/translate_full_32x32.png
+ :align: left
+ **Full value**: distance from the originals to the farthest copies is equal to the distance between the start and the end point.
+- **Start point** is the initial point of translation vector.
+- **End point** is the terminal point of translation vector.
+- **Total number of objects** is the total number of objects including the original one.
+
+
+**TUI Command**: *Sketch_1.addTranslation(Objects, Point1, Point2, NumberOfObjects, FullValue)*
+
+**Arguments**: list of objects + start and end points + number of objects + full value flag
+
+Result
+""""""
+
+Created Linear copy appears in the view.
+
+| The original and a linear copy objects are marked with the special sign.
+| Copy objects are drawn with a thinner line.
+
+.. image:: images/Linear_res.png
+ :align: center
+
+.. centered::
+ Linear copy created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_translation` operation.
Trim
====
+| The Trim operation trims away the specified segment of the curve.
+| The curve should have points lying on it or intersections with other curves.
+| Open curves (line or arc) require one or more points; closed curves (circle) require two or more points.
-.. image:: images/Trim.png
+To create Trim in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Trim* item or
+#. click **Trim** button in Sketch toolbar:
+
+.. image:: images/trim.png
+ :align: center
+
+.. centered::
+ **Trim** button
+
+Property panel:
+
+.. image:: images/Trim_panel.png
:align: center
.. centered::
- Trim a line
+ Trim
+
+Input fields:
+
+- **Segment** is used to select a segment to remove in the view.
+
+The selected segment is highlighted in the view:
+
+.. image:: images/Trim_segment_sel.png
+ :align: center
+
+.. centered::
+ The segment to remove
+
+**TUI Command**: *Sketch_1.addTrim(Feature, PositionPoint)*
+
+**Arguments**: feature (line, arc or circle) and position point (a point on or closest to the segment to remove)
+
+Result
+""""""
+
+Created Trim appears in the view.
+
+.. image:: images/Trim_res.png
+ :align: center
+
+.. centered::
+ Trim created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_trim` operation.
Vertical distance constraint
============================
+Vertical Distance constraint fixes distance between two points along the vertical axis.
-.. image:: images/VerticalDist.png
- :align: center
+The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc.
+
+To create Vertical Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Vertical Distance* item or
+#. click **Vertical Distance** button in Sketch toolbar:
+
+.. image:: images/distance_v.png
+ :align: center
.. centered::
- Create a vertical distance constraint
+ **Vertical Distance** button
+
+Property panel:
+
+.. image:: images/VerticalDistance_panel.png
+ :align: center
+
+Input fields:
+
+- **First point** is the first point selected in the view
+- **Second point** is the second point selected in the view
+- **Value** is a distance between the objects, could be modified to set the desirable value
+- **Text location** is a position of the distance value label relating to extension line (in the view)
+ .. image:: images/location_left.png
+ :align: left
+ **Left** inserts text at the left of the distance extension line.
+
+ .. image:: images/location_automatic.png
+ :align: left
+ **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+ .. image:: images/location_right.png
+ :align: left
+ **Right** inserts text to the right of the distance extension line.
+
+When both objects are selected vertical distance value is displayed in the property panel and in the view.
+
+When creating the constraint, after selection of two objects at the first time:
+
+- drag the Vertical distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable vertical distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/VerticalDistance_field_view.png
+ :align: center
+
+.. centered::
+ Vertical Distance input in the view
+
+**TUI Command**: *Sketch_1.setVerticalDistance(FirstObject, SecondObject, Value)*
+
+**Arguments**: 2 objects + vertical distance value
+
+Result
+""""""
+
+Created Vertical Distance appears in the view.
+
+.. image:: images/VerticalDistance_res.png
+ :align: center
+
+.. centered::
+ Vertical Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_vdistance` operation.
Vertical constraint
===================
+Vertical constraint fixes lines to lie parallel to the vertical axis.
-.. image:: images/Vertical.png
- :align: center
+To create Vertical constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Vertical* item or
+#. click **Vertical** button in Sketch toolbar:
+
+.. image:: images/vertical.png
+ :align: center
.. centered::
- Create a vertical constraint
+ **Vertical** button
+
+Property panel:
+
+.. image:: images/Vertical_panel.png
+ :align: center
+
+Input fields:
+
+- **Line** is the line selected in the view.
+
+| After the line is selected it becomes parallel to the vertical axis in the view.
+| **V** sign added above the line.
+
+**TUI Command**: *Sketch_1.setVertical(LineObject)*
+
+**Arguments**: 1 line object
+
+Result
+""""""
+
+Created Vertical constraint appears in the view.
+
+.. image:: images/Vertical_res.png
+ :align: center
+
+.. centered::
+ Vertical constraint created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_vertical` operation.
\ No newline at end of file
title="Sketch"
tooltip="Create sketch"
icon="icons/Sketch/sketch.png"
- helpfile="SketchPlugin/sketchPlugin.html">
+ helpfile="SketchPlugin.html">
<sketch-start-label id="External" title="Select a plane on which to create a sketch" tooltip="Select a plane on which to create a sketch">
<validator id="GeomValidators_Face" parameters="plane"/>
</sketch-start-label>
<!-- SketchPoint -->
<feature id="SketchPoint" title="Point" tooltip="Create point" icon="icons/Sketch/point.png"
- helpfile="SketchPlugin/pointFeature.html">
+ helpfile="pointFeature.html">
<sketch-2dpoint_selector id="PointCoordinates" accept_expressions="0" title="Point" tooltip="Point coordinates"
enable_value="enable_by_preferences"/>
<boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
<!-- SketchLine -->
<feature id="SketchLine" title="Line" tooltip="Create line" icon="icons/Sketch/line.png"
- helpfile="SketchPlugin/lineFeature.html">
+ helpfile="lineFeature.html">
<sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates"
enable_value="enable_by_preferences"/>
<sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"
icon="icons/Sketch/circle.png"
title="Circle"
tooltip="Create circle"
- helpfile="SketchPlugin/circleFeature.html">
+ helpfile="circleFeature.html">
<toolbox id="circle_type" modified_in_edit="edit_circle_type">
<box id="circle_type_by_center_and_passed_points"
icon="icons/Sketch/circle_pt_rad_32x32.png"
title="Arc"
tooltip="Create arc"
icon="icons/Sketch/arc.png"
- helpfile="SketchPlugin/arcFeature.html">
+ helpfile="arcFeature.html">
<toolbox id="arc_type" modified_in_edit="edit_arc_type">
<box id="by_center_and_points"
icon="icons/Sketch/arc_base_32x32.png"
title="Fillet"
tooltip="Create constraint defining fillet between two objects"
icon="icons/Sketch/fillet.png"
- helpfile="SketchPlugin/filletFeature.html">
+ helpfile="filletFeature.html">
<sketch_shape_selector id="fillet_point"
label="Point"
tooltip="Select point for fillet (should be shared by two entities only)"
<feature id="SketchSplit" title="Split"
tooltip="Cut selected segment arc or circle on existing coincident points"
icon="icons/Sketch/split.png"
- helpfile="SketchPlugin/splitFeature.html">
+ helpfile="splitFeature.html">
<sketch_feature_point_selector
id="SelectedObject"
selection_attributes="SelectedObject SelectedPoint PreviewObject PreviewPoint"
<feature id="SketchTrim" title="Trim"
tooltip="Trim selected segment arc or circle on intersection points nearest to the graphic selection"
icon="icons/Sketch/trim.png"
- helpfile="SketchPlugin/trimFeature.html">
+ helpfile="trimFeature.html">
<sketch_feature_point_selector
id="SelectedObject"
selection_attributes="SelectedObject SelectedPoint PreviewObject PreviewPoint"
icon="icons/Sketch/ellipse.png"
title="Ellipse"
tooltip="Create ellipse"
- helpfile="SketchPlugin/ellipseFeature.html">
+ helpfile="ellipseFeature.html">
<sketch-2dpoint_selector id="center_point"
reference_attribute="center_point_ref"
title="Center point"
title="Projection"
tooltip="Project feature onto sketch plane"
icon="icons/Sketch/projection.png"
- helpfile="SketchPlugin/projectionFeature.html">
+ helpfile="projectionFeature.html">
<sketch_shape_selector
id="ExternalFeature"
label="Object"
title="Intersection"
tooltip="Intersect edge with sketch plane"
icon="icons/Sketch/intersection.png"
- helpfile="SketchPlugin/intersectionFeature.html">
+ helpfile="intersectionFeature.html">
<sketch_shape_selector
id="ExternalFeature"
label="Object"
id="SketchConstraintMirror"
title="Mirror copy" icon="icons/Sketch/mirror.png"
tooltip="Create constraint, mirroring group of objects"
- helpfile="SketchPlugin/mirrorFeature.html">
+ helpfile="mirrorFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="Mirror line" tooltip="Select mirror line" shape_types="edge">
<validator id="GeomValidators_ShapeType" parameters="line"/>
id="SketchMultiTranslation"
title="Linear copy" icon="icons/Sketch/translate.png"
tooltip="Copy objects and move"
- helpfile="SketchPlugin/translationFeature.html">
+ helpfile="translationFeature.html">
<sketch_multi_selector id="MultiTranslationList"
label="Segments:"
tooltip="Select list of objects to be translated"
id="SketchMultiRotation"
title="Angular copy" icon="icons/Sketch/rotate.png"
tooltip="Copy objects and rotate"
- helpfile="SketchPlugin/rotationFeature.html">
+ helpfile="rotationFeature.html">
<sketch_multi_selector id="MultiRotationList"
label="Segments:"
tooltip="Select list of objects to be rotated"
title="Distance"
tooltip="Set fixed distance from a point to an object"
icon="icons/Sketch/distance.png"
- helpfile="SketchPlugin/distanceFeature.html">
+ helpfile="distanceFeature.html">
<label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
<sketch_shape_selector
id="ConstraintEntityA"
title="Horizontal Distance"
tooltip="Set horizontal distance between two points"
icon="icons/Sketch/distance_h.png"
- helpfile="SketchPlugin/horizontalDistFeature.html">
+ helpfile="horizontalDistFeature.html">
<label title="Select points for distance definition."/>
<sketch_shape_selector
id="ConstraintEntityA"
title="Vertical Distance"
tooltip="Set vertical distance between two points"
icon="icons/Sketch/distance_v.png"
- helpfile="SketchPlugin/verticalDistFeature.html">
+ helpfile="verticalDistFeature.html">
<label title="Select points for distance definition."/>
<sketch_shape_selector
id="ConstraintEntityA"
<!-- SketchConstraintLength -->
<feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon="icons/Sketch/length.png"
- helpfile="SketchPlugin/lengthFeature.html">
+ helpfile="lengthFeature.html">
<label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
<shape_selector id="ConstraintEntityA" label="Line" tooltip="Select a line" shape_types="edge" >
<validator id="GeomValidators_ShapeType" parameters="line"/>
<!-- SketchConstraintAngle -->
<feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon="icons/Sketch/angle_constr.png"
- helpfile="SketchPlugin/angleFeature.html">
+ helpfile="angleFeature.html">
<sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select a line" shape_types="edge" >
<validator id="GeomValidators_ShapeType" parameters="line"/>
<validator id="PartSet_DifferentObjects"/>
<!-- SketchConstraintRadius -->
<feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon="icons/Sketch/radius_constr.png"
- helpfile="SketchPlugin/radiusFeature.html">
+ helpfile="radiusFeature.html">
<label title="Select a circle or an arc on which to calculate radius" tooltip="Select a circle or an arc on which to calculate radius"/>
<shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
shape_types="edge">
<!-- SketchConstraintHorizontal -->
<feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon="icons/Sketch/horisontal.png"
- helpfile="SketchPlugin/horizontalFeature.html">
+ helpfile="horizontalFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
<validator id="GeomValidators_ShapeType" parameters="line"/>
<!-- SketchConstraintVertical -->
<feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon="icons/Sketch/vertical.png"
- helpfile="SketchPlugin/verticalFeature.html">
+ helpfile="verticalFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
<validator id="GeomValidators_ShapeType" parameters="line"/>
<!-- SketchConstraintRigid -->
<feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon="icons/Sketch/fixed.png"
- helpfile="SketchPlugin/rigidFeature.html">
+ helpfile="rigidFeature.html">
<sketch_shape_selector id="ConstraintEntityA" label="Object"
tooltip="Select point, line end point, line, center of circle or arc."
shape_types="edge vertex">
<!-- SketchConstraintParallel -->
<feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines"
- icon="icons/Sketch/parallel.png" helpfile="SketchPlugin/parallelFeature.html">
+ icon="icons/Sketch/parallel.png" helpfile="parallelFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="First line" tooltip="Select a line" shape_types="edge">
<validator id="GeomValidators_ShapeType" parameters="line"/>
<feature id="SketchConstraintPerpendicular" title="Perpendicular"
tooltip="Create constraint defining two perpendicular lines"
icon="icons/Sketch/perpendicular.png"
- helpfile="SketchPlugin/perpendicularFeature.html">
+ helpfile="perpendicularFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="First line" tooltip="Select a line"
shape_types="edge">
<!-- SketchConstraintTangent -->
<feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon="icons/Sketch/tangent.png"
- helpfile="SketchPlugin/tangentFeature.html">
+ helpfile="tangentFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="First object" tooltip="Select line or arc" shape_types="edge">
<validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
<!-- SketchConstraintCoincidence -->
<feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon="icons/Sketch/coincedence.png"
- helpfile="SketchPlugin/coincedenceFeature.html">
+ helpfile="coincedenceFeature.html">
<sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
<validator id="PartSet_DifferentObjects"/>
<validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
<!-- SketchConstraintMiddle -->
<feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line"
icon="icons/Sketch/middlepoint.png"
- helpfile="SketchPlugin/middleFeature.html">
+ helpfile="middleFeature.html">
<sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
<validator id="PartSet_DifferentObjects"/>
<validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
<feature id="SketchConstraintEqual" title="Equal"
tooltip="Create constraint defining equal lengths of two lines or line and arc or equal radii of two arcs or two circles or arc and circle"
icon="icons/Sketch/equal.png"
- helpfile="SketchPlugin/equalFeature.html">
+ helpfile="equalFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="First object" tooltip="Select line, circle or arc" shape_types="edge">
<validator id="PartSet_DifferentObjects"/>
<!-- SketchConstraintCollinear -->
<feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines"
icon="icons/Sketch/collinear.png"
- helpfile="SketchPlugin/collinearFeature.html">
+ helpfile="collinearFeature.html">
<sketch_shape_selector id="ConstraintEntityA"
label="First line" tooltip="Select a line" shape_types="edge">
<validator id="GeomValidators_ShapeType" parameters="line"/>
QString aDir(getenv("OPENPARTS_ROOT_DIR"));
aDocDir = aDir + aSep + "doc" + aSep + "gui";
#endif
- QStringList aParams;
- aParams << aDocDir + aSep + aHelpPage;
- QProcess::startDetached(aBrowserName, aParams);
+ QString aFileName = aDocDir + aSep + aHelpPage;
+ if (QFile::exists(aFileName)) {
+ QStringList aParams;
+ aParams << aFileName;
+ QProcess::startDetached(aBrowserName, aParams);
+ }
}
}
}