From: gzy Date: Wed, 19 Sep 2018 04:48:47 +0000 (+0300) Subject: field and group description added X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7dde59faa4439956a3da0f0ccb520bb695656238;p=modules%2Fshaper.git field and group description added --- diff --git a/doc/gui/Introduction.rst b/doc/gui/Introduction.rst index 7521f3187..0ed5cc2ab 100644 --- a/doc/gui/Introduction.rst +++ b/doc/gui/Introduction.rst @@ -426,7 +426,7 @@ Parameter can be created in the active partset or part by: - :ref:`parameters`; - :ref:`parameter_expression`. -Created parameters can be used in features defining any argument as parameter or expression containing parameters. +Any argument in features can be defined as parameter or expression containing parameters. List of features using parameters is given in **Parameters** dialog box: diff --git a/src/CollectionPlugin/doc/TUI_fieldFeature.rst b/src/CollectionPlugin/doc/TUI_fieldFeature.rst new file mode 100644 index 000000000..6ed23216a --- /dev/null +++ b/src/CollectionPlugin/doc/TUI_fieldFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_field: + +Create Field +============ + +.. literalinclude:: examples/field.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/CollectionPlugin/doc/TUI_groupFeature.rst b/src/CollectionPlugin/doc/TUI_groupFeature.rst new file mode 100644 index 000000000..4b5dc61d9 --- /dev/null +++ b/src/CollectionPlugin/doc/TUI_groupFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_group: + +Create Group +============ + +.. literalinclude:: examples/group.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/CollectionPlugin/doc/examoles/field.py b/src/CollectionPlugin/doc/examoles/field.py new file mode 100644 index 000000000..f0d917ae7 --- /dev/null +++ b/src/CollectionPlugin/doc/examoles/field.py @@ -0,0 +1,14 @@ +# -*- 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() diff --git a/src/CollectionPlugin/doc/examoles/group.py b/src/CollectionPlugin/doc/examoles/group.py new file mode 100644 index 000000000..5c42ca401 --- /dev/null +++ b/src/CollectionPlugin/doc/examoles/group.py @@ -0,0 +1,14 @@ +# -*- 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() diff --git a/src/CollectionPlugin/doc/fieldFeature.rst b/src/CollectionPlugin/doc/fieldFeature.rst index 10b33d42d..efd84d478 100644 --- a/src/CollectionPlugin/doc/fieldFeature.rst +++ b/src/CollectionPlugin/doc/fieldFeature.rst @@ -2,9 +2,69 @@ 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. diff --git a/src/CollectionPlugin/doc/groupFeature.rst b/src/CollectionPlugin/doc/groupFeature.rst index 64b65c6e1..1fbc36dbc 100644 --- a/src/CollectionPlugin/doc/groupFeature.rst +++ b/src/CollectionPlugin/doc/groupFeature.rst @@ -2,9 +2,65 @@ 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. diff --git a/src/CollectionPlugin/doc/images/Field.png b/src/CollectionPlugin/doc/images/Field.png index 084876976..e9ed8243e 100644 Binary files a/src/CollectionPlugin/doc/images/Field.png and b/src/CollectionPlugin/doc/images/Field.png differ diff --git a/src/CollectionPlugin/doc/images/field_property_panel.png b/src/CollectionPlugin/doc/images/field_property_panel.png new file mode 100644 index 000000000..991410150 Binary files /dev/null and b/src/CollectionPlugin/doc/images/field_property_panel.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel.png b/src/CollectionPlugin/doc/images/group_property_panel.png new file mode 100644 index 000000000..4302628d3 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_edge.png b/src/CollectionPlugin/doc/images/group_property_panel_edge.png new file mode 100644 index 000000000..9f30b2373 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_edge.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_face.png b/src/CollectionPlugin/doc/images/group_property_panel_face.png new file mode 100644 index 000000000..46a2d476e Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_face.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_solid.png b/src/CollectionPlugin/doc/images/group_property_panel_solid.png new file mode 100644 index 000000000..e5e18bb80 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_solid.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_vertice.png b/src/CollectionPlugin/doc/images/group_property_panel_vertice.png new file mode 100644 index 000000000..a7e3cb17c Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_vertice.png differ diff --git a/src/CollectionPlugin/doc/images/group_res.png b/src/CollectionPlugin/doc/images/group_res.png new file mode 100644 index 000000000..6bf4a602c Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_res.png differ diff --git a/src/CollectionPlugin/doc/images/shape_group.png b/src/CollectionPlugin/doc/images/shape_group.png new file mode 100644 index 000000000..a00d1a263 Binary files /dev/null and b/src/CollectionPlugin/doc/images/shape_group.png differ diff --git a/src/ParametersPlugin/doc/ParametersPlugin.rst b/src/ParametersPlugin/doc/ParametersPlugin.rst index 0df2dafc8..45555bcbf 100644 --- a/src/ParametersPlugin/doc/ParametersPlugin.rst +++ b/src/ParametersPlugin/doc/ParametersPlugin.rst @@ -4,19 +4,7 @@ Parameters plug-in ================== -Model parametrization can be done using parameters. - -Parameter can be created in the active partset or part by: - -- :ref:`parameter`; -- :ref:`parameters`; -- :ref:`parameter_expression`. - -Created parameters can be used in features defining any argument as parameter or expression containing parameters. - -If parameter value is changed, then it is reevaluated in all fetaures where it is used. - - +The Parameters plug-in includes the following features: .. toctree:: :titlesonly: @@ -24,4 +12,8 @@ If parameter value is changed, then it is reevaluated in all fetaures where it i managerFeature.rst parameterFeature.rst - TUI_parameterFeature + + + + +