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

Improve snapping like in CAD #107

Open
lbartoletti opened this issue Oct 16, 2017 · 10 comments
Open

Improve snapping like in CAD #107

lbartoletti opened this issue Oct 16, 2017 · 10 comments

Comments

@lbartoletti
Copy link
Member

lbartoletti commented Oct 16, 2017

QGIS Enhancement: Improve snapping like in CAD

Date 2017/10/04

Author Loïc Bartoletti (@lbartoletti)

Contact lbartoletti at tuxfamily dot org

maintainer @lbartoletti

Version QGIS 3.X

Summary

I open another QEP to improve the user ability to draw in QGis like in CAD software.
Since few versions we have some new interesting functionality (especially CAD Dock and trace digitize) but we still lack on some CAD tools for end user.
For some applications where we works originally on CAD, doesn't having advanced snapping can be annoying.
I suggest to integrate all the well known snapping functions into QGis.

Snapping should be available for all geometry type (straight, curve, etc.).

New snap options

All snap options are listed in AutoCAD, QCad and QAD manual.
QGis can add one other snap option for circle: Oriented Quadrant/North Quadrant.
By default, on CAD a circle is non oriented. As our class allows, it might be interesting to suggest these two snaps.

Personally, I think that QAD is what we must have but with a real integration in QGis.

Like in AutoCAD (and QAD), with a ctrl+right click you can override for the current draw the snap options.
I would add an option with ctrl+alt+right click to select/override it for a particular layer.
Also when you have choices between objects snapped, a menu must appear to select which object you want to select (like identify tool with a right click). This will be used to prefer one snap to another, a bit in the style where one prefers to snap on a node rather than a segment.

AutoCAD: List of options
QCad: Object Snap

Proposed Solution

Integrate some parts of QAD in QGis with some new options.

This requires a lot of thinking about the user interface and a good redesign of the snapping tool.

Example(s)

See links or CAD manual

Affected Files

At least:
QgsGeometryUtils
src/qgisapp.{cpp,h}
ui/qgisapp.ui

Performance Implications

(required if known at design time)

Further Considerations/Improvements

(optional)

Backwards Compatibility

N/A

Issue Tracking ID(s)

(optional)

Votes

(required)

@lbartoletti
Copy link
Member Author

Today, there are no options to differentiate the snap. I think we need to change that and learn from AutoCAD.
Don't think that I want to make QGis a clone of AutoCAD, but consider that there is a transition from CAD to GIS and that the drawing standards come from CAD (many from AutoCAD).
We must try to accompany the users coming from this world and as much as possible to take the good DAO recipes.
So, I propose to use the AutoCAD control panel as the QAD plugin does and to integrate it in the settings.
This requires a small change in the interface, but IMHO, I don't think it is affecting our current users very much, unlike potential new users who may have a faster adaptation of the tool.

In any case, a box can be proposed to select the desired symbol, like today.

For information, here is the AutoCAD panel,
image

QAD equivalent
image

Today, it is possible to plan a change to differentiate existing snapping tools: Vertex (End point for AutoCAD) and Segment (Nearest).
What it can look like with only existing tools.
image

I have only added an option (not essential) for the color.

How do you feel about that (@wonder-sk @dsavary @haubourg) ?

@3nids
Copy link
Member

3nids commented Oct 25, 2017

@lbartoletti also consider existing parallel and perpendicular snapping in the Advanced digitizing panel.

@lbartoletti
Copy link
Member Author

@3nids Yes, You're absolutely right.

@dsavary
Copy link

dsavary commented Oct 26, 2017

@lbartoletti Yes, it would be very nice to have such snapping options and tools in QGIS

@mhugo
Copy link

mhugo commented Oct 26, 2017

@lbartoletti hi. +1 to have these snapping options integrated.

But, as a non-CAD user, AutoCAD icons look sometimes meaningless to me. For middle point (a triangle ?), center (a circle ?) and "near" (a hourglass ?) for example. I find QCad icons more obvious.
So don't forget to put a clear description for each option (in a big tooltip or a help area on the side) for users that don't know AutoCAD and perhaps have different set of icons based on user preferences ?

@lbartoletti
Copy link
Member Author

@mhugo Yes, it's old fashion... But by experiment, habits are difficult to change :)
You speak about QCad or QAD icons?

Anyway, the users will have the choice of the icons using the comboboxes. I will add more docs about it.

Perhaps, another topic, but I know at least one user which have configure QGis shortcuts to match with AutoCAD shortcuts, maybe we can apply a "theme" to satisfy users?

@lbartoletti
Copy link
Member Author

image
screenshot from gvSIG

@sergegevaerts
Copy link

Another thing about snapping in QGIS which in my opinion must be improved is snapping which takes into account if objects in a layer are filtered and visible of not. When digitizing a layer where some of the objects are filtered out, QGIS snapping still snaps to those objects. Snapping to objects you can't see makes no sense or am I missing a feature already present in QGIS?

I further pledge to implement (Auto)CAD like digitizing features (as present in QAD) as a core functionality in QGIS. Willing to fund those efforts!

@haubourg
Copy link
Member

Hi @sergegevaerts The snapping issue with hidden classes has been raised here : https://issues.qgis.org/issues/16838 (originally detected in QWAT's projetct here qwat/QWAT#193

If you feel ready for fixing that we just miss funding, feel free to contact me privately !

@miguelzuza
Copy link

Totally agree. Plus another cad drawing tools..editing and drawing in QGIS like in cad would be incredible

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

No branches or pull requests

7 participants