Remove QgsAbstractGeometry deleteVertex implementations - #67307
ViperMiniQ wants to merge 1 commit into
Conversation
🍎 MacOS Qt6 buildsDownload MacOS Qt6 builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
c6e5f41 to
be0f8f6
Compare
| geom = QgsGeometry.fromWkt(wkt) | ||
| assert geom.deleteVertex(3) | ||
| expected_wkt = "CurvePolygon (CompoundCurve (CircularString (0 0, 1 1, 2 0),(2 0, 1 -1),(1 -1, 0 0)))" | ||
| expected_wkt = "CurvePolygon (CompoundCurve (CircularString (0 0, 1 1, 2 0),(2 0, 1 -1, 0 0)))" |
There was a problem hiding this comment.
because neighboring same type curves get merged:
QGIS/src/core/geometry/qgscompoundcurve.cpp
Line 1229 in e17dae1
|
I need help defining this. There are a couple test cases to adjust, which concern the behavior of
I can only take a guess why this was introduced in Deleting a shared vertex of 2 CSes would produces a LS consisting of endpoints of those two CCes. My guess is I see a few options here: Taking a better look at this, my vote is for 3 and that is not because 4 is extra work. Example: If the first action is to delete the shared vertex of the first two curves (at 2 0), they would collapse into a LS and be merged with the LS at the end. From there, there are no changes in behavior, LS vertex deletion is simple. Screencast_20260912_183354.webmScreencast_20260912_183421.webm |
I agree, completely skipping the |
|
Skipping the |
|
Thanks @Djedouas! I'll do a separate PR for this and then cleanup this branch, so that it is just removing deleteVertex implementations and not adjusting any tests. |
deleteVertexnow usesdeleteVertices( [vertex] )needs
#67306and#67294