FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.66k stars 4.04k forks source link

Sketcher: Sketch loses vertical/horizontal and coincident constraints when using Trim. #17605

Open kaiwas opened 1 hour ago

kaiwas commented 1 hour ago

Is there an existing issue for this?

Problem description

Reproduction method.

  1. Construct a rectangle.
  2. Construct a second rectangle touching the edge of the first.
  3. Use trim at the point of their contact (twice, because there are two lines at this point) The vertical constraint remains on one of the two lines formed. One of the coinciding vertices loses its connection. Video demonstration.

https://github.com/user-attachments/assets/c032a317-8fca-4508-97a2-a8366723d58a

The problem is also inherent in the 0.21.2 / RC2 versions

Full version info

OS: Manjaro Linux (KDE/plasma/xcb)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.39092 (Git) AppImage
Build type: Release
Branch: main
Hash: a65d05c6e495038168eefcba6a1e43218fbb3a20
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: Russian/Russia (ru_RU)
Stylesheet/Theme/QtStyle: OpenLight.qss/OpenLight/Qt default
Installed mods: 
  * FreeCAD_SketchArch
  * lattice2 1.0.0
  * PitchedRoof
  * addFC 0.7.4
  * freecad.gears 1.3.0
  * OpenTheme 2024.9.1

Subproject(s) affected?

Sketcher

Anything else?

No response

Code of Conduct

kaiwas commented 1 hour ago

Perhaps the problem is related to the fact that we have two lines from rectangles. The big one from the first and the small one from the second. The small line overlaps the big one. Maybe it would be more correct to automatically delete the small one if it is "overlaid" on the big one?

But even if we construct the second figure from three segments, we solve only half of the problem.

https://github.com/user-attachments/assets/15446e4e-2caf-4dc6-a7cb-96ef8e1812d3