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

Sketcher: chains of geometry generate duplicate points #13391

Open
2 tasks done
pierreporte opened this issue Apr 10, 2024 · 10 comments
Open
2 tasks done

Sketcher: chains of geometry generate duplicate points #13391

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

Comments

@pierreporte
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Because vertex of geometric entities (lines, circles, arcs, etc.) are part of them, drawing a shape generate duplicate points at every contact between elements. For example, a rectangle would have eight points, two for each side. Mathematically, it doesn’t make sense. A rectangle has only four points and the sides connect the points. The points are not part of the sides.

In FreeCAD, the consequence is that at every intersection, there are two coincident points, thus a lot of constraints, which need to be shown to the user. It leads to sub-obtimal choices (in my opinion) like coloring coincident points (see #13098), which lead to new problems (see my comments in #13098).

An other likely consequence is that it is impossible to switch the construction status of the vertex, because they inherit the status of their parent. It may be the cause of issue #11920.

Making points independent to other geometric entities will allow to dramatically reduce the number of constraints, thus enabling to use a separate icon to display the remaining ones, like the point on object constraint.

It may also help to better indicate the constrain status of the whole sketch. Currently, a line (the segment and the two vertex) turn green only if everything is fully-constrained. It would maybe allow to color only one point or just the segment when applicable.

Full version info

OS: Ubuntu 23.10 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36807 (Git) AppImage
Build type: Release
Branch: main
Hash: cc96f2718e139d670e08c4226bdea9955a102ed6
Python 3.11.8, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: French/France (fr_FR)
Installed mods: 
  * BillOfMaterials-WB 0.0.7
  * CosmeticThread3D
  * Curves 0.6.29
  * CurvedShapes 1.0.8
  * sheetmetal 0.4.6
  * OpenDark 2023.12.17
  * OpenLight 2023.12.17

Subproject(s) affected?

Sketcher

Anything else?

Inspired by discussions in #13098 and #11919.

May be linked to #11920

Code of Conduct

  • I agree to follow this project's Code of Conduct
@pierreporte
Copy link
Author

@maxwxyz maxwxyz added UI/UX Feature FR for improvements or new features WB Sketcher Related to the Sketcher Workbench labels Apr 10, 2024
@maxwxyz
Copy link
Collaborator

maxwxyz commented Apr 10, 2024

We need to make a discussion about these sketcher based UI issues somewhere for a big picture @obelisk79

@PaddleStroke
Copy link
Contributor

This would be a very deep change that would probably break compatibility with older files.
I think this is a difficult project.

@pierreporte
Copy link
Author

This would be a very deep change that would probably break compatibility with older files. I think this is a difficult project.

It means that the best time to do it is right now. Breaking changes like these will be hard to accept after 1.0. Bigger changes would paradoxically be easier to explain.

@FlachyJoe
Copy link
Contributor

Hi, if we could hide coincidence = red points can totally disappear, then we could hide the auto-created ones.

@pierreporte
Copy link
Author

@FlachyJoe Yes but it would solve only one aspect of the problem.

@FlachyJoe
Copy link
Contributor

@pierreporte many constraints on segments act internally on their ends so we can't remove them.

@pierreporte
Copy link
Author

@FlachyJoe This explains why it is a deep change. Can you give some examples of such constraints?

@FlachyJoe
Copy link
Contributor

line length is the major

If you have to constraint something else than a rectangle parallel to axis you will need to add points.
image

The coincident count is not a subject: internally they have to be present and we can remove them from the list as they are now shown in the geometry (and the checkbox do nothing).

@kaiwas
Copy link

kaiwas commented Apr 11, 2024

I already raised this topic earlier, but did not receive support or desire to discuss.

For me, the current situation is more inconvenient because when assigning constraints you have to aim at specific vertices and select them with single clicks. There is no way to use box selection.
These constant clicks are very tiring.
(example on video).

video-2024-04-11_13.45.59.mp4

I assume that it will be difficult to redo the algorithm and eliminate double vertices. BUT! Maybe when assigning constraints you can do some kind of check for coincidence of vertices?
If there are two vertices at one point, then one of them should automatically be designated as “auxiliary” and not participate in the assignment of the constraint.
(the location of one vertex on top of another is shown conditionally. In fact, it is enough to select any of the matching vertices as active. When we select a vertex by clicking, we do not analyze which vertex is selected and which segment it belongs to. Many vertices can coincide (tens or even hundreds), but only one is active).
Scr_20240411_135338

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
None yet
Development

No branches or pull requests

5 participants