Skip to content
Open
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
78 changes: 48 additions & 30 deletions docs/user_manual/working_with_mesh/mesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -811,36 +811,54 @@ default value.
Rules of assignment
...................

When **creating** a new vertex, its Z value definition may vary depending on
the active selection in the mesh layer and its location.
The following table displays the various combinations.

.. table:: Matrix of Z value assignment to new vertex
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This displays a title for the table so it should not be removed (nor the indentation below). And one should be added to the strategy table.


+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex creation | Are there selected | Source of assigned value | Assigned Z Value |
| | vertices in mesh layer? | | |
+=======================================+=========================+===============================+==========================================+
| "Free" vertex, not connected to any | No | :guilabel:`Vertex Z value` | Default or user defined |
| face or edge of a face | | | |
+ + +-------------------------------+------------------------------------------+
| | | :guilabel:`Advanced | :guilabel:`z` widget if in |
| | | Digitizing Panel` (if | |locked| :sup:`Locked` state |
| | | :guilabel:`z` widget is in | |
| | | |locked| :sup:`Locked` state) | |
+ +-------------------------+-------------------------------+------------------------------------------+
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex on an edge | --- | Mesh layer | Interpolated from the edge's vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex on a face | --- | Mesh layer | Interpolated from the face's vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 2D vector feature | --- | :guilabel:`Vertex Z value` | Default or user defined |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 3D vector vertex | --- | Vector layer | Vertex |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 3D vector segment | --- | Vector layer | Interpolated along the vector segment |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
.. _mesh_z_value_assignment:

When digitizing mesh vertices, you can control how the Z value is assigned.
This is configured in the mesh digitizing preferences, with four available strategies:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no mesh digitizing preferences entry, isn't it?

Suggested change
This is configured in the mesh digitizing preferences, with four available strategies:
This is configured in the drop-down menu of the :guilabel:`Digitize mesh elements` tool
as :guilabel:`New vertex Z value` option. Following strategies are available:

No number. This avoids the need to update the sentence (and its translations) if a strategy is added or removed


+-------------------------------------+------------------------------------------------------------+
| Strategy | Description |
+=====================================+============================================================+
| **Always from project terrain** | Z value is always taken from the underlying terrain. |
+-------------------------------------+------------------------------------------------------------+
Comment on lines +822 to +823
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual label is "Project terrain", no always from
I tested with no specific terrain layer added to the project and found that the value was taken from the Project properties elevation tab (using the flat terrain by default).
What happens if there is no terrain either in the project (it seems to crash if something other than flat terrain is selected but unavailable) or at the location you add the new vertex? The tooltip mentions a default value I couldn't test (I presume the one set in settings --> Digitizing) as I always get a crash trying to add a layer.

Suggested change
| **Always from project terrain** | Z value is always taken from the underlying terrain. |
+-------------------------------------+------------------------------------------------------------+
| **Project terrain** | Z value is always taken or calculated from the |
| | :ref:`project reference terrain <project_terrain>`. |
+-------------------------------------+------------------------------------------------------------+

| **Always from Z widget** | Z value is always taken from the :guilabel:`Z` widget |
+-------------------------------------+------------------------------------------------------------+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this:

  • adding a free vertex, I got the same results as in the first three rows of the old table
  • Adding a vertex on a mesh layer, it used the value from the Vertex Z value or the CAD z box.
Suggested change
+-------------------------------------+------------------------------------------------------------+
| **Z widget** | Z value is taken from the :guilabel:`Vertex Z value` widget|
| | or the :guilabel:`Advanced Digitizing Panel` :guilabel:`z` |
| | widget (if it is in |locked| :sup:`Locked` state) |
+-------------------------------------+------------------------------------------------------------+

Note that the actual label is "Z widget", no mention of "always from"

| **Prefer mesh, then Z widget** | Z value is first taken from mesh; if not available, |
| | it falls back to the :guilabel:`Vertex Z value` widget. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we refer specifically to the :guilabel:Vertex Z value, knowing that the value can be taken from the CAD widget also? And let's go with the "interpolation" wording

+-------------------------------------+------------------------------------------------------------+
| **Prefer Z widget, then mesh** | Z value is first taken from the :guilabel:`Vertex Z value` |
| | widget; if not set, it falls back to mesh. |
Comment on lines +829 to +830
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to use description as in the original PR description, and in existing table

Suggested change
| **Prefer Z widget, then mesh** | Z value is first taken from the :guilabel:`Vertex Z value` |
| | widget; if not set, it falls back to mesh. |
| **Prefer mesh, then terrain** | Interpolates the Z value from the mesh layer if the vertex |
| | is on the edge or face, otherwise uses the project |
| | reference terrain value. |

+-------------------------------------+------------------------------------------------------------+

.. note::

The following detailed logic describes the behavior of the
**“Prefer mesh, then Z widget”** strategy.

+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex creation | Are there selected | Source of assigned value | Assigned Z Value |
| | vertices in mesh layer? | | |
+=======================================+=========================+===============================+==========================================+
| "Free" vertex, not connected to any | No | :guilabel:`Vertex Z value` | Default or user defined |
| face or edge of a face | | | |
+ + +-------------------------------+------------------------------------------+
| | | :guilabel:`Advanced | :guilabel:`z` widget if in |
| | | Digitizing Panel` (if | |locked| :sup:`Locked` state |
| | | :guilabel:`z` widget is in | |
| | | |locked| :sup:`Locked` state) | |
+ +-------------------------+-------------------------------+------------------------------------------+
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
Comment on lines +850 to +851
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with selected vertices, users can modify the Z widget value and use it.

Suggested change
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices |
| | | | or user-defined |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+

| Vertex on an edge | --- | Mesh layer | Interpolated from the edge's vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex on a face | --- | Mesh layer | Interpolated from the face's vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 2D vector feature | --- | :guilabel:`Vertex Z value` | Default or user defined |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 3D vector vertex | --- | Vector layer | Vertex |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
| Vertex snapped to a 3D vector segment | --- | Vector layer | Interpolated along the vector segment |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+


.. note:: The :guilabel:`Vertex Z value` widget is deactivated if
Expand Down