]> SALOME platform Git repositories - modules/shaper.git/blob - src/CollectionPlugin/doc/fieldFeature.rst
Salome HOME
97c555ee4e6e12993a78f449d512dddc98d66a06
[modules/shaper.git] / src / CollectionPlugin / doc / fieldFeature.rst
1 .. |field.icon|    image:: images/field.png
2
3 Field
4 =====
5
6 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.
7
8 The field can hold several named values (components) per geometrical entity.
9
10 The field can include several sets of data called steps, each dedicated to a certain time moment.
11
12 To create a Field in the active part:
13
14 #. select in the Main Menu *Features - > Field* item  or
15 #. click |field.icon| **Field** button in the toolbar:
16
17 The following property panel appears. 
18
19 .. image:: images/field_property_panel.png
20   :align: center
21
22 .. centered::
23   Create a field
24
25 Input fields:
26
27 - **Type of shapes** selects geometrical entities to which field values will be assigned from drop-down list:
28   
29   - Vertices;
30   - Edges;
31   - Faces;
32   - Solids;
33   - Objects;
34   - Parts;
35
36 - **Type of field** selects type of field values from drop-down list:
37       
38   - Boolean;
39   - Integer;
40   - Double;
41   - String;
42   
43 - **Nb. Components** defines number of named values (components) assigned to each geometrical entity;
44 - **Stamp** sets time stamp for the current time step;
45 - **Current step** slider navigates through added steps; 
46 - table of values for each step contains:
47
48   - rows whose number depends on the number of entities selected in OCC 3D viewer;
49   - **Default value** row contains values assigned to non-selected entities of the parent shape with given type; 
50   - columns whose number depends on **Nb. Components**;
51   - to rename a component double-click a column header;  
52       
53 - **Add Step** button adds a new time step;
54 - **Remove Step** button deletes the current time step.
55
56  
57 **TUI Commands**:
58
59 .. py:function:: model.addField(Part_1_doc, 2, "DOUBLE", 2, ["DX", "DY"], [model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Top")])
60
61     :param part: The current part object
62     :param integer: Number of steps
63     :param text: Type of the field
64     :param integer: Number of components
65     :param list: List of components names
66     :param list: List of objects
67     :return: the created field object
68
69 .. py:function:: Field_1.addStep(step, stamp, [[0.1, 0.2], [2.1, 1.7], [3.7, 1.95]])
70
71     :param integer: step id
72     :param integer: time stamp id
73     :param list: list of lists of values with Type of field
74
75 **See Also** a sample TUI Script of :ref:`tui_create_field` operation.