View Issue Details

IDProjectCategoryView StatusLast Update
0001174FreeCADFeaturepublic2014-02-23 17:10
Reportersliptonic Assigned To 
Status closedResolutionfixed 
Fixed in Version0.14 
Summary0001174: Allow user to input simple mathematical expressions when setting values to constraints.
DescriptionThis was a feature in Qcad/Librecad that I found very useful. Instead of requiring a specific value, the user could put in a simple mathematical expression. The expression would be evaluated and the result stored. In other words, it isn't necessary to store the expression, just the result.

Additional InformationI prefer to model in metric units but often have to translate from imperial units. It's nice to just input '25.4*8.3' instead of opening a calculator app, doing the same thing and then either cutting/pasting or retyping '210.82'

I'm not a programmer so forgive me if I'm being stupid but this seems helpful:
Tagsconstraints, formula, sketcher
FreeCAD Information


related to 0000800 closedlogari81 Sketcher Formula/Equation Based Constraints 



2013-07-12 15:09

administrator   ~0003392

The boost spirit library is one option. A much simpler option is to execute the input string as Python code. There you can even use trigonometric functions or the exponential function and so on without having to create a complicated grammar file.


2013-07-22 15:04

developer   ~0003423

Last edited: 2014-02-20 22:53

isn't this related to


2013-07-22 16:48

manager   ~0003424

Yes it is. This feature should be marked as duplicate of 0000800 which is already assigned.


2013-07-30 11:55

manager   ~0003434

In my view they're different things. I think 800 implies a deeper idea that constraints can be driven by equations. I would expect this means the equations are stored and evaluated whenever the underlying parameters change.

What I'm talking about here is purely UI. The equation is evaluated at input time and the result is stored. The scope might be larger than just the sketcher since it would be nice to input simple equations for dimensions of solids in Part workbench, for example.

If the feature described in 800 were globally implemented, it would be a superset of this feature and I'm o.k. with merging them for that reason. However, I think they're two distinct features and might have different scopes. In other words, it might make sense to store the equations in some places and only the results in others.


2014-02-21 12:58

developer   ~0004256

Last edited: 2014-02-21 12:59

it's not a duplicate but it is surly related


2014-02-22 02:21

manager   ~0004261

AFAIK jriegel's recent code changes in the Sketcher cover this report. Shouldn't it be closed?


2014-02-23 16:26

manager   ~0004276

Everything I implied with the original request has been met by recent changes. I'm good with closing it.

Issue History

Date Modified Username Field Change
2013-07-11 11:54 sliptonic New Issue
2013-07-12 15:09 wmayer Note Added: 0003392
2013-07-22 15:04 tanderson69 Note Added: 0003423
2013-07-22 16:48 normandc Note Added: 0003424
2013-07-30 11:55 sliptonic Note Added: 0003434
2014-02-20 22:53 tanderson69 Note Edited: 0003423
2014-02-21 12:58 shoogen Note Added: 0004256
2014-02-21 12:58 shoogen Relationship added related to 0000800
2014-02-21 12:59 shoogen Note Edited: 0004256
2014-02-21 12:59 shoogen Tag Attached: constraints
2014-02-21 12:59 shoogen Tag Attached: formula
2014-02-21 12:59 shoogen Tag Attached: sketcher
2014-02-22 02:21 normandc Note Added: 0004261
2014-02-23 16:26 sliptonic Note Added: 0004276
2014-02-23 17:10 shoogen Status new => closed
2014-02-23 17:10 shoogen Resolution open => fixed
2014-02-23 17:10 shoogen Fixed in Version => 0.14