FreeCAD/FreeCAD

Sketcher: Adding expressions to driven dimensions is inconsistent

Aberta

#11.145 aberto em 22 de out. de 2023

 (5 comentários) (0 reação) (0 responsável)C++ (5.550 forks)batch import
Help wantedMod: SketcherStatus: ConfirmedStatus: Solution proposedTopic: ExpressionsType: Bug

Métricas do repositório

Stars
 (30.913 estrelas)
Métricas de merge de PR
 (Mesclagem média 24d 7h) (217 fundiu PRs em 30d)

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When editing a driven dimension there is inconsistent behaviour, see this forum post.

Preface: When double clicking on a (blue) driven dimension, the dimension is automatically changed into a driving (red) one. This is good, because in most cases this action means that a value sould be entered, and that is, of course, only sensible and possible for the normal dimension.

The problem: when the value should be calculated by an expression, then the expression dialog shows the message Reference constraints cannot be set!, and it is not possible to confirm an expression, although in the dialog below, the change to a normal dimension is already performed.

The workaround: click "Clear" in the expression dialog and open it again.

Here is Abdullah's proposal how it should be solved.

I think that:

  • If the UI lets open the expression editor, then it should allow to enter an expression, and it should respect the reference checkbox. Meaning that if reference is clicked by the user, the expression is disregarded and everything stays the same.
  • If implementing that is too complicated, then the UI should not allow opening the expression's editor when a constraint is reference. This is possibly less convenient in that 1% of the cases, but at least the behaviour is not inconsistent, as it is now.

Full version info

[code]
OS: macOS 13.0
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.34594 (Git)
Build type: Release
Branch: master
Hash: e9187412d9b3b372ee4c1d7e2fc7a0bf08a2e647
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * freecad.gears 1.0.0
  * FeedsAndSpeeds 0.5.0
  * dxf-library
  * fcgear 1.0.0
  * fasteners 0.4.59
  * sheetmetal 0.2.62
  * ExplodedAssembly
  * Curves 0.6.8
[/code]

Subproject(s) affected?

Sketcher

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Guia do colaborador