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: Unhandled exception in case of setting coincidence on both endpoints of a line/arc #14128

Open
2 tasks done
0penBrain opened this issue May 18, 2024 · 1 comment
Open
2 tasks done
Labels
Bug This issue or PR is related to a bug WB Sketcher Related to the Sketcher Workbench

Comments

@0penBrain
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Steps to reproduce:

  • Empty sketch, draw a single line
  • Select both endpoints and set a coincident constraint => ⚠️ The constraint is created and errors are triggered in the Report View

Same exists with Arc instead of Line, but it may be more weird as constraint may or not trigger the error immediately. If not, it will create them when trying to move the center/endpoints.

Full version info

OS: Ubuntu 22.04.4 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37361 +1 (Git)
Build type: Debug
Branch: myBranch
Hash: 761d8fc69d0d9a67d0a6cd4da8fdb35401c0a7e6
Python 3.10.12, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)

Subproject(s) affected?

Sketcher

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz maxwxyz added Bug This issue or PR is related to a bug WB Sketcher Related to the Sketcher Workbench labels May 18, 2024
@wwmayer
Copy link
Contributor

wwmayer commented May 18, 2024

To solve the line issue the function SketchObjectPy::addConstraint could check the return value of solve(). If the value is -1 it simply removes the added constraint.

Another possibility could be to implement a function that checks invalid coincidences beforehand and aborts the operation. E.g. coincidences are invalid if the two points are from the same geometry -- except for splines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug WB Sketcher Related to the Sketcher Workbench
Projects
None yet
Development

No branches or pull requests

3 participants