Salome HOME
23264: [CEA 1815] Help Create field
[modules/geom.git] / doc / salome / gui / GEOM / input / geom_field.doc
1 /*!
2
3 \page geom_field_page Working with Fields
4
5 A field object allows assigning some values to geometrical
6 entities. These values can be later transferred to mesh entities
7 generated on the geometrical entities during export to MED file in
8 Mesh module. Geometrical fields can be stored in/restored from
9 \ref io_xao "XAO format" files.
10
11 A field object assigns values to either
12 - all vertices of a GEOM_Object or
13 - all edges of a GEOM_Object or
14 - all faces of a GEOM_Object or
15 - all solids of a GEOM_Object or
16 - the whole GEOM_Object.
17
18 Values can be of one of the following types:
19 - boolean,
20 - integer,
21 - double,
22 - string.
23
24 \note Only integer and double values can be exported into the MED file.
25
26 The field can hold several named values (components) per a geometrical entity.
27
28 The field can include several sets of data called \a steps, each
29  dedicated to a certain time moment. A step is described by
30  - an integer ID,
31  - a time stamp number,
32  - values.
33
34 To create a field, in the <b>Main Menu</b> select <b>New Entity ->
35   Field -> Create Field</b>.
36
37 \image html create_field_dlg.png "Create Field dialog"
38
39 In this dialog you can:
40 <ul>
41   <li>Set <b>Field Name</b> with which a field will appear in the Object
42     Browser.</li>
43   <li>Select a \b Shape to which the field values will be assigned.</li>
44   <li>Select a \b Type of field values.</li>
45   <li>Select a type of \b Sub-shapes to assign values to.</li>
46   <li>Specify <b>Nb. Components</b> per a shape/sub-shape.
47   <li>Specify names of components and the values in a table of \b
48     Values. (To change a component name, double-click a column header).</li>
49   <li>Push <b>Add Step</b> button to add a new time step. (Specify a
50     step ID in \b Step field before pushing this button).</li>
51   <li>Adjust a time stamp number in \b Stamp field.<li>
52   <li>Push <b>Previous Step</b> and <b>Next Step</b> buttons to
53     navigate through added steps or use a drop-down list to the right
54     of the \b Step field to select a step by its ID.</li>
55   <li>Push <b>Remove Step</b> to delete a current step.</li>
56   <li>Push \b Apply or <b>Apply and Close</b> button to commit
57     creation of the field.<li>
58 </ul>
59
60 Later you can modify the values and the time stamp number of a created
61 field and to add/remove steps to it. To do it, choose <b>Edit
62   Field</b> in a contextual menu of a field or step in the Object Browser.
63
64
65 <b>Python API</b> for field manipulations includes the following commands:
66
67 <pre>
68 field          = geompy.CreateField(shape, name, type, dimension, componentNames)
69 geompy.RemoveField(field)
70 shape          = field.getShape()
71 name           = field.getName()
72 field.setName(name)
73 type           = field.getType()
74 dim            = field.getDimension()
75 componentNames = field.getComponents()
76 nbFileds       = geompy.CountFields(shape)
77 fields         = geompy.GetFields(shape)
78 field          = geompy.GetField(shape, name)
79
80 field.addStep(stepID, stamp, values)
81 field.removeStep(stepID)
82 nbSteps        = field.countSteps()
83 stepIDs        = field.getSteps()
84 stamp          = field.getStamp(stepID)
85 field.setStamp(stepID, stamp)
86 values         = field.getValues(stepID)
87 field.setValues(step, values)
88 </pre>
89
90
91 */