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

Use curve to digitize Polylines/Polygons #5842

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

qsavoye
Copy link
Contributor

@qsavoye qsavoye commented Nov 21, 2024

Use curve to digitize Polylines/Polygons

test

  1. Active Curve mode during Digitization of a Polygon
  2. Add a first vertex to define the center point of the arc
  3. Add a second vertex to stop the arc

Precision of the final arc can be set in QField Parameters page (slider)

height: visible ? 40 : 0
padding: 2
round: true
visible: dashBoard.activeLayer && (dashBoard.activeLayer.geometryType() === Qgis.GeometryType.Polygon || dashBoard.activeLayer.geometryType() === Qgis.GeometryType.Line)
Copy link
Member

Choose a reason for hiding this comment

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

I think we want this to be dependent on QgsWkbTypes.isCurvedType()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my example , my layer is not a curve type at all and i use QgsCompoundCurve::curveToLine function to set geometry drawn into my none curved layer. This helps me to drawn faster instead of set vertex by vertex.

But you are right i am not taking into account the possibility to set directly the qgscompoundcurve geometry into the new feature.

How do you think ?

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, I was mostly seeing this in the context of surveying / cadastre, where curves are often a requirement. My main motivation here would be to keep the interface as light as possible and ask users to have a curve layer if they want this feature. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am using it to draw underground maps, such as caves or old quarries. My polygon layer corresponds to some galleries and i no need to have a specific curved layer but some times digitizing arcs like in qgis help me.

Maybe we can allow it only for curved layer (QgsWkbTypes.isCurvedType()) or for advanced digitizing user ( which could be set in settings).

Tell me what you think ?

Sorry for the delay, i had some stuff to do last week.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting job you have!

I'd be interested to hear @nirvn's point of view

Copy link
Member

Choose a reason for hiding this comment

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

@m-kuhn , @qsavoye , hey there, sorry for the delay in chipping in.

I do think the feature is useful; I would indeed prefer if this option was only visible for curved type layers, I feel that'd be a good way to enable this while not cluttering UI by limiting to an explicit intent by the user / project manager.

@@ -242,7 +242,19 @@ QfVisibilityFadingRow {
if (Number(rubberbandModel.geometryType) === Qgis.GeometryType.Point || Number(rubberbandModel.geometryType) === Qgis.GeometryType.Null) {
confirm();
} else {
addVertex();
if (settings.valueBool("/QField/Digitizing/CurveEdition", false) == true) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we need an additional check here to avoid curved edition when people are freehand drawing, otherwise worlds will collide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants