realthunder / FreeCAD

Link branch FreeCAD
Other
763 stars 45 forks source link

[Problem] `Zero is not a valid datum for the constraint with index 1` when constraining a circle with circular external geometry #928

Closed kevenwyld closed 7 months ago

kevenwyld commented 8 months ago

Is there an existing issue for this?

Version

0.21 (Development)

Full version info

OS: Ubuntu Core 20 (sway/sway)
Word size of FreeCAD: 64-bit
Version: 2024.104.0.38929 (Git) Snap 124
Build type: Release
Branch: tag: 20240104stable
Hash: 975453f6aa33093edbcc835760d7a65123059b98
Python 3.8.10, Qt 5.15.7, Coin 4.0.1, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly3 0.12.0
  * Curves 0.6.15
  * fasteners 0.4.71

Subproject(s) affected?

Sketcher

Problem description

Screenshot of the problem is below. Steps to reproduce:

  1. Create sketch
  2. draw circle and constrain it's diameter
  3. close sketch
  4. create another new sketch
  5. use the sketcher external geometry tool to select the circle from the previous sketch
  6. draw another circle larger than the first one
  7. attempt to create a distance constraint between the two circles with This tool

This works in upstream freecad.

Screenshot_2024-01-07_15-55-00

Here is a video illustrating the issue:

https://github.com/realthunder/FreeCAD/assets/11936535/d2956cab-87b0-4e2a-8f19-bce8d6175e85

Error log is as follows

15:54:39  Sketcher constraint number 2 is malformed!
15:54:39  Sketcher::setUpSketch()-T:0
15:54:39  The Sketch has malformed constraints!
15:54:39  Sketcher constraint number 2 is malformed!
15:54:39  Sketcher::setUpSketch()-T:0
15:54:39  Sketcher constraint number 2 is malformed!
15:54:39  Sketcher::setUpSketch()-T:0.001
15:54:39  Sketcher constraint number 2 is malformed!
15:54:39  Sketcher::setUpSketch()-T:0
15:54:42  Sketcher constraint number 2 is malformed!
15:54:42  Sketcher::setUpSketch()-T:0
15:54:42  The Sketch has malformed constraints!
15:54:42  App.getDocument('Unnamed').getObject('Sketch001').setDatum(1,App.Units.Quantity('20.000000 mm'))

Anything else?

Thanks!

Code of Conduct