-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[mesh] mesh frame editing part 3 - Edit mesh map tool #44037
Conversation
f665ea5
to
ab511db
Compare
I reviewed it already in the private PR. |
for moving vertices, for now it is possible with another mode than add/remove vertices/faces. I wonder if it will not be better to have the possibility to move in the same mode than add/remove. |
a06aeb0
to
cf48cc4
Compare
after trying, I have remove the specific button for accessing move vertices functionality. Indeed, I find that it quite frustrating to have to push the tool bar buttons to switch between adding/removing,flip/edge and move 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.
great work.
3bf8856
to
a718a36
Compare
test failing seems unrelated |
improve selection
a718a36
to
42389a7
Compare
|
|
I would change it to Vertex Value to be a more generic term. |
wondering if the native mesh + vertex style shouldn't be on by default when you create new mesh? |
|
|
@vcloarec maybe failing test is due to the @nyalldawson recent changes ? |
Yes, good idea, when a key modifier is pressed and in a face --> interpolate the z value, and if outside a face, take the last interpolated (if exist)
Here, I think it is another new feature, we need to fix what is the source of the Z value, other layer.
|
Last commits fix some digitizing issue, set the native mesh always enabled when editing and clarify the Z value for the new vertex. |
@vcloarec A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
@vcloarec |
[mesh] [feature] add mesh map tool to CRUD/digitize actions for mesh frame (vertices, faces)
UPDATED 2021/08/17
This is the beginning of the implementation of the mesh edit map tool. For now this map tool allow:
Add vertices
The Z value of the new vertex is taken from the Z value widget on the top right of the canvas.
If some vertices are selected, the value in the Z value widget is the average value of selected vertices.
Deselecting the vertices allows returning to the default value.
If the user adds a vertex with selected vertices (with the average value in the widget), the new vertex will have this average value for Z.
Keeping pressed the Control key allows maintaining this average value for following new vertices, and this value becomes the new default value.
If there is no selected vertex, the Z value for new vertices is the default one in the Z value widget, or if the new vertex is added to face, the Z value is the interpolated value in the face.
If the vertex is snap on a vector layer and the match point is valid, the Z value will be one of the vector layers.
Add faces
Snapping on vector layer is supported.
Select vertices/faces
- Default: select all the partially/touched contained faces
- Alt modifier: select all the completely contained faces
modifier shift: add new selection to the previous selection
modifier ctrl: remove new selection from the previous selection
Remove vertices/faces
With a selection of vertices (one or many):
"Ctrl"+"Delete" keys: remove vertices and linked faces and fill hole(s) by a triangulation
"Ctrl"+"Shift"+"Delete" keys: remove vertices and linked faces and do NOT fill hole(s)
"Shift"+"Delete" keys: remove faces without vertices
also available with context menu after right click
Change the Z values of vertices
Move vertices
Once some vertices/faces are selected:
The rubber band stays green while the faces are valid, and becomes red if some face are invalid or new position of faces leads to intersect other faces or vertices. If the rubber band is red, elements are not moved if the user release the left mouse button.
Interaction with edges
When the mouse hover an edge, the edge is highlight and, depending of the configuration of the edge, some markers appears:
Split faces
When faces are selected: