Skip to content
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

Unable to move mesh elements #50062

Closed
2 tasks
DelazJ opened this issue Sep 1, 2022 · 8 comments
Closed
2 tasks

Unable to move mesh elements #50062

DelazJ opened this issue Sep 1, 2022 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality Mesh Related to general mesh layer handling (not specific data formats)

Comments

@DelazJ
Copy link
Contributor

DelazJ commented Sep 1, 2022

What is the bug or the crash?

I'm hardly trying to move mesh elements and I fail every time. The elements are supposed to become green so that I could release them at their new location, but they stay red.
Considering that #44037 (comment) shows mesh elements being moved, this is a regression.

Steps to reproduce the issue

Capture.video.du.01-09-2022.23.26.17.webm

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.27.0-Master QGIS code revision fb97c10
Qt version 5.15.3
Python version 3.10.4
GDAL/OGR version 3.4.1
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04.1 LTS
       
This copy of QGIS writes debugging output.
       
Active Python plugins
db_manager 0.1.20
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99
sagaprovider 2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@DelazJ DelazJ added Regression Something which used to work, but doesn't anymore Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality Mesh Related to general mesh layer handling (not specific data formats) labels Sep 1, 2022
@nicogodet
Copy link
Member

Can't reproduce on 81ac7eb29d with a SELAFIN

@DelazJ
Copy link
Contributor Author

DelazJ commented Sep 5, 2022

Hi @nicogodet I reported with fb97c10 but this is an issue I already had with a version earlier than yours (a couple of weeks). What could then be the reason of my failure? The file format? I'm on a 2dm file (created from https://github.com/lutraconsulting/MDAL/blob/master/tests/data/ugrid/D-Flow1.1/manzese_1d2d_small_map.nc - the 2d sublayer). But since I can create new faces I don't get why moving them would be intentionally disabled. I will try other data formats later.

@nicogodet
Copy link
Member

I can replicate with this file too.
@vcloarec gentle ping

@vcloarec
Copy link
Member

vcloarec commented Sep 5, 2022

@DelazJ @nicogodet, thanks to report this.

After debugging, it appears that the problem comes partially from the file (and from MDAL) and also from the QGIS behavior:
this is a 1D/2D mesh file, and when loading the 2D mesh, it seems that MDAL loads also the vertices associated with 1D mesh, but these vertices are not associated to any element (face or edge). When entering in editing mode, these vertices are considered as "free" vertices, that is, vertices not yet associated with faces (see all the red dots in the following picture).
image

And with editing rules, it is not allowed to move faces/vertices that leads to have some free vertices included in faces. When QGIS checks this rule when moving, it finds some free vertices included in faces and doesn't validate the move...

So, IMHO, issues are:

@vcloarec
Copy link
Member

vcloarec commented Sep 5, 2022

by the way, not a regression, as this issue was always existing.

@vcloarec vcloarec removed the Regression Something which used to work, but doesn't anymore label Sep 5, 2022
@DelazJ
Copy link
Contributor Author

DelazJ commented Sep 5, 2022

@vcloarec Thanks for the quick feedback

this is a 1D/2D mesh file, and when loading the 2D mesh, it seems that MDAL loads also the vertices associated with 1D mesh, but these vertices are not associated to any element (face or edge).

Yes I was surprised to have free vertices from the 1D geometry but I'm not enough versed in mesh science to have an opinion so did not report.

And with editing rules, it is not allowed to move faces/vertices that leads to have some free vertices included in faces. When QGIS checks this rule when moving, it finds some free vertices included in faces and doesn't validate the move...

@vcloarec Just to be sure I understand: when I'm moving face 1 in a mesh layer:

  • option 1: face 1 shouldn't land to a place where there may be a free vertex?
  • option 2: or no single face in the whole mesh should overlap a free vertex?

I'm asking because in my case, "moved" face 1 did not overlap any free vertex. And I could create faces without problem. I could save that mesh layer, despite the free vertices. Just moving a face or a vertex afterwards was problematic.

@vcloarec
Copy link
Member

vcloarec commented Sep 5, 2022

@DelazJ
It is option 2. Because when you move an element that could lead to deform other faces in the neighborhood, and these last ones could include a free vertex after the move.
When you create a new face, only the new face can contain a free vertex after the operation, so the check concerns only the face.

@alexbruy
Copy link
Contributor

Fixed by #50310.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality Mesh Related to general mesh layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

4 participants