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

[Feature request] Sketcher: add a context menu for constraints #11413

Open
2 tasks done
pierreporte opened this issue Nov 15, 2023 · 10 comments
Open
2 tasks done

[Feature request] Sketcher: add a context menu for constraints #11413

pierreporte opened this issue Nov 15, 2023 · 10 comments
Labels
Feature FR for improvements or new features UI/UX WB Sketcher Related to the Sketcher Workbench

Comments

@pierreporte
Copy link

pierreporte commented Nov 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

This is about constraints like coincidence, tangency, parallelism, etc. and not about dimensions.

Currently, to add constraints to sketch geometry, it is necessary to select a command in the toolbar, then click on the geometry to constrain. There is also a few of them available with pressing the M key with the new Sketcher_Dimension tool. There could be a more complete and more visual way, using Sketcher_Dimension, but not the M key. Besides, if this feature request is implemented, the M key could be made for dimensions only and not constrains.

What I propose is a context menu activated by a right click when Sketcher_Dimension is active. It would show the constrains that could by applied to the selection. For example, selecting a point and a line would propose a coincidence constraint. Two circle would allow to make them tangent, concentric, or equal. You could make your lines perpendicular, parellel, tangent, etc. Only exception for two lines: to avoid a duplicate action, it could propose to set a distance between them being parallel and not just a parallel constraint. There is also the possibility to select two entities of the same type and it would propose to select a symmetry axis. Because the right-click is currently used to exit a sketch tool, the first item in the context menu should be a cancel entry (you could cancel with Esc as well, which isn’t possible right now).

This new feature exists in Catia and it is very practical. You can fully-constrain complex sketches with a single tool. Catia basically hides all constraint tools because of this. Catia uses this context menu to also make the dimension (primary use of Sketcher_Dimension) a reference dimension.

Full version info

OS: Ubuntu 23.04 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.34959 (Git) AppImage
Build type: Release
Branch: main
Hash: 640018bfa7878a79e1b3c220ddd488d66464dc70
Python 3.10.13, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * Render 2023.8.18

Subproject(s) affected?

Sketcher

Anything else?

Catia screenshot:

image

Fusion 360 screenshot:

image

Geomagic Design X screenshot:

image

Solidworks screenshot:

image

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Roy-043 Roy-043 added Feature FR for improvements or new features WB Sketcher Related to the Sketcher Workbench labels Nov 16, 2023
@luzpaz luzpaz added the UI/UX label Nov 16, 2023
@PaddleStroke
Copy link
Contributor

The right click is used to cancel the tool in sketcher. So right click may not be ideal. But perhaps the M key could open a pie-menu with the different modes available.

@pierreporte
Copy link
Author

@PaddleStroke yes, it’s not necessary to be a right click. The M key is not very discoverable as you can’t really know what will be proposed, so adding a menu would be great anyway. The pie menu is a good idea if it uses the icons in the toolbar.

@PaddleStroke
Copy link
Contributor

Note : the video you posted in #11414 (https://www.youtube.com/watch?v=I3HUKB1np3E) show the solidworks way of doing it. It seems rather clean way of doing it (without right mouse click)

@pierreporte
Copy link
Author

@PaddleStroke Speaking from experience, the Solidworks way is clean indeed but slower and less efficient than the Catia way. Actually one of the few thing I love in Catia. In any case it will be a great addition to FreeCAD.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 1, 2024

I like the idea to quickly change the constraints with a right click as in most other CAD software. Cycling with M would always mean to cycle through all possible constraints which, not knowing which one is presented when pressing M. Also this different constraints would mess up your sketch toggling from parallel to perpendicular to the wanted constraint.

What if the first entry in the right click menu is "exit tool" or "abort"? That is the way how it is handled in KiCAD for example. Regardless of the right click you could further exit the tool with esc.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 7, 2024

@pierreporte #11884 could help

@pierreporte
Copy link
Author

@maxwxyz You may be right. Constraints would be visible when the dimension tool is active and geometry is selected. The constraints have to be filtered to what is possible to do depending on the selection. Although the “select a symmetry axis” feature may be a little harder to implement.

@pierreporte
Copy link
Author

PR #12161 implements part of this feature request: provide a context menu for already selected geometry.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Feb 16, 2024

Now you can also directly right click on geometry to pull up the constraints

@pierreporte
Copy link
Author

@maxwxyz for the UI/UX project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature FR for improvements or new features UI/UX WB Sketcher Related to the Sketcher Workbench
Projects
Status: No status
Development

No branches or pull requests

5 participants