Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/development/usability-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,30 +711,30 @@ Rules:

Tasks:

- [ ] Read the three files and write a short list of what each class does and
- [x] Read the three files and write a short list of what each class does and
which methods are duplicated or not used. Remove dead code first.
- [ ] Add an object registry class (no Qt) for the meshes and their source
- [x] Add an object registry class (no Qt) for the meshes and their source
information. Move the reads and writes of `viewer.meshes` to it.
- [ ] Split `feature_list_widget.py`: move the mesh builders to a module without
- [x] Split `feature_list_widget.py`: move the mesh builders to a module without
Qt code (`mesh_builders.py`), and move the cross-section, block model and
topography actions out of the tree widget.
- [ ] Simplify `object_properties_widget.py`: one handler for the selected
- [x] Simplify `object_properties_widget.py`: one handler for the selected
object, and the controls shown for each source type, not a check for the
object name in each method.
- [ ] Simplify the object/model view (`object_list_widget.py`): group the
- [x] Simplify the object/model view (`object_list_widget.py`): group the
objects by source feature, and show the type and the isovalue of each
object.
- [ ] Add "Add isosurface..." to the menu of a model feature. The user enters
- [x] Add "Add isosurface..." to the menu of a model feature. The user enters
one or more values (a list, or a start, an end and a count). The default
values come from the range of the scalar field. A pure function gives the
values from the input.
- [ ] Build the isosurfaces with the scalar field of the feature
- [x] Build the isosurfaces with the scalar field of the feature
(`feature.surfaces(value)`). Give each object a name with its value, for
example `Fault_1_iso_0.50`. A value outside the range of the field gives
a message in the message bar, not an error dialog.
- [ ] Let the user change the value of an existing isosurface in the object
- [x] Let the user change the value of an existing isosurface in the object
properties. The object is built again.
- [ ] Update the docs for the viewer.
- [x] Update the docs for the viewer.

Acceptance: the user adds five isosurfaces from one feature in one action. They
show in the object list under that feature, each with its value. The user
Expand Down
14 changes: 14 additions & 0 deletions docs/usage/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ The **Export** panel in step 5 is open when the model is solved. It has three ta

The exports run in the background and show a message when they finish.

### The 3D view
The 3D view has three parts: the object list, the feature list with the action buttons, and the properties of the selected object.

- **Object list**: the objects in the view are in groups, one group for each source feature. Each row has a check box (show or hide), the name of the object, its type and, for a surface from a scalar value, its value. Select an object to see its properties. The right-click menu can zoom to an object, export it, show or hide it, or remove it.
- **Feature list**: right-click a feature to add its scalar field, its surfaces, its vector field or its data. The action buttons under the list add the model bounding box, the fault and stratigraphic surfaces, the topography, cross sections and a block model.
- **Out-of-date objects**: when the model changes, the objects that come from the model show in grey italic. The **Update** button under the feature list builds them again from the current model, with the same settings.

#### Isosurfaces
Right-click a feature and choose **Add Isosurface...** to add the surface of the scalar field at values that you choose. Enter a list of values (for example `0.1, 0.5, 0.9`), or a start, an end and a count. The default values are inside the range of the scalar field. The plugin adds one object for each value. The name has the value, for example `Fault_1_iso_0.50`. These objects do not replace the surfaces that the model gives.

If the scalar field has no surface at a value (for example, the value is outside the range of the field), a message shows the value and the other surfaces are still added.

To change the value of an isosurface, select it in the object list, enter a new value in the **Isosurface** panel of the properties and choose **Apply**. Only this object is built again. The name of the object does not change. After the model changes, **Update** builds each isosurface again at its value.

The header of the dock has **Save**, **Open**, **Reset** and **Settings**. They apply to all of the plugin.

The toolbar has three actions: LoopStructural (the dock), 3D View and Help. The **Tools** submenu of the Plugins menu has the map2loop dialogs for advanced users.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def _on_evaluate_target_changed(index):
self.meshObjectCombo.clear()
if self.plugin.loop_widget.visualisation_widget.plotter is not None:
viewer = self.plugin.loop_widget.visualisation_widget.plotter
mesh_names = list(viewer.meshes.keys())
mesh_names = viewer.registry.names()
self.meshObjectCombo.addItems(mesh_names)

self.evaluate_target_combo.currentIndexChanged.connect(_on_evaluate_target_changed)
Expand Down Expand Up @@ -757,7 +757,7 @@ def _export_scalar_points(self):
mesh = self.meshObjectCombo.currentText()
if not mesh:
return
vtk_mesh = viewer.meshes[mesh]['mesh']
vtk_mesh = viewer.registry.get(mesh).mesh
self.model_manager.export_feature_values_to_vtk_mesh(
self.feature.name, vtk_mesh, scalar_type=scalar_type
)
Expand Down
Loading
Loading