3 \page geom_field_page Working with Fields
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.
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.
18 Values can be of one of the following types:
24 \note Only integer and double values can be exported into the MED file.
26 The field can hold several named values (components) per a geometrical entity.
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
31 - a time stamp number,
34 To create a field, in the <b>Main Menu</b> select <b>New Entity ->
35 Field -> Create Field</b>.
37 \image html create_field_dlg.png "Create Field dialog"
39 In this dialog you can:
41 <li>Set <b>Field Name</b> with which a field will appear in the Object
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>
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.
65 <b>Python API</b> for field manipulations includes the following commands:
68 field = geompy.CreateField(shape, name, type, dimension, componentNames)
69 geompy.RemoveField(field)
70 shape = field.getShape()
71 name = field.getName()
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)
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)
90 Our <b>TUI Scripts</b> provide you with examples of
91 \ref tui_geom_field_page "GEOM fields creation".