-
-
Notifications
You must be signed in to change notification settings - Fork 804
Z value rules of assignment - mesh #10260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
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
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices | | ||
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+ |
There was a problem hiding this comment.
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.
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices | | |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+ | |
| | Yes | :guilabel:`Vertex Z value` | Average of the selected vertices | | |
| | | | or user-defined | | |
+---------------------------------------+-------------------------+-------------------------------+------------------------------------------+ |
| **Always from project terrain** | Z value is always taken from the underlying terrain. | | ||
+-------------------------------------+------------------------------------------------------------+ |
There was a problem hiding this comment.
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.
| **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 | | ||
+-------------------------------------+------------------------------------------------------------+ |
There was a problem hiding this comment.
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.
+-------------------------------------+------------------------------------------------------------+ | |
| **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 Z widget, then mesh** | Z value is first taken from the :guilabel:`Vertex Z value` | | ||
| | widget; if not set, it falls back to mesh. | |
There was a problem hiding this comment.
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
| **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. | |
There was a problem hiding this comment.
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
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?