Skip to content

Conversation

selmaVH1
Copy link
Collaborator

ref #9612

Based on this discussion, this is the solution I came up with. Can we merge #9612 and continue discussion (if needed) in this PR?

@selmaVH1 selmaVH1 added the backport release_3.44 On merge create a backported pull request to 3.44 label Sep 18, 2025
Copy link
Collaborator

@DelazJ DelazJ left a comment

Choose a reason for hiding this comment

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

Can we merge #9612

@selmaVH1 I don't think #9612 is good to merge, and should be closed:

  • it contains the list of possible strategies that are already mentioned here (at their right place), thus irrelevant to mention again at the end. A reference to the tables here may be enough.
  • The "get z value" behavior is not the same as mentioned there. It is now a mutually exclusive option with the set Z field and they should be mentioned together. Moreover, it is not a button anymore, it is a checkbox.

I made a test with the different strategies and have some comments. I didn't test interaction with vector layers....

PS: editing a suggestion is quite messy with GitHub new review system 😠

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.

.. _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

Comment on lines +850 to +851
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+
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 |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+

Comment on lines +822 to +823
| **Always from project terrain** | Z value is always taken from the underlying terrain. |
+-------------------------------------+------------------------------------------------------------+
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 project terrain** | Z value is always taken from the underlying 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"

Comment on lines +829 to +830
| **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. |
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. |

| **Always from Z widget** | Z value is always taken from the :guilabel:`Z` widget |
+-------------------------------------+------------------------------------------------------------+
| **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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3.44 On merge create a backported pull request to 3.44
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants