View Issue Details

IDProjectCategoryView StatusLast Update
0002250File formatsFeaturepublic2015-09-10 19:16
Reportersavio araujo Assigned Toyorik  
Status closedResolutionduplicate 
Summary0002250: global data variables for using in constraints
Descriptioni work for a couple of months with freecad macros to generate automatically new meshes with changed constraints. when i need a data constraint twice or more, i have to change all occurrences of that model. it's annoying but feasible.

but when i model a new part, it's additionally error-prone because forgetting some occurrences. next thing is, if have some basic construction measure, e.g. edge length of a solid.
construct a solid with edges a*b*c with b = 2*a , c = 1.5*a
- create a sketch with the rectangle a*b
- extrude with length c

at the moment it's not possible to construct a part directly with that constraints. i have to write a small macro which changes the constraints b and c depended on a.

in solid works i can use within an part (not really within a assembly) variables and equation to define constraints, but the implementation is halfhearted.

i propose a global variable database for freecad where i can define some variables with atomic values (or python code snippets). this variables are usable within sketches and part feature, and later also in assemblies. in my opinion this would simplify modeling increase ease of use.

TagsNo tags attached.
FreeCAD Information


duplicate of 0001711 closed File formats global data variables for using in constraints 
related to 0000800 closedlogari81 Sketcher Formula/Equation Based Constraints 



2014-08-26 23:36

manager   ~0006352

Isn't this a duplicate of 0001437 ?


2015-02-09 22:09

reporter   ~0006353

Any thoughts on how long this would take and how involved it would be?

I'd be willing to work on it, but I'm mostly comfortable in Python, not C++. Is this something that would likely have to be implemented in C++?


2015-02-10 01:29

developer   ~0006354

Well in a way it's already done. In current development release Python implementation is already available in Spreadsheet WB.

Simple example:

Additional example as infographic:

I would say you could work on and improve current Python implementation but as soon as FreeCAD 0.15 will be released it will be superseded by C++ implementation:

Therefore i guess you should wait for next version and see if you can help improve it in any way (using Python).


2015-02-11 21:10

reporter   ~0006355

Cool - I was going to test out the latest dev build on OSX, but it seems to be crashing with:

Spreadsheet workbench activated
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 8

Is there a good place to file a bug, or perhaps get more crash info?


2015-02-11 23:39

developer   ~0006356

Yes generally speaking you would open new bug report but in this case:

- If you are talking about current Python Spreadsheet WB it is quite unlikely it will get additional bug fixes. Ask on the forum and it might happen Yorik will fix it (for OSX) if there is something to fix.

- If you are talking about new C++ Spreadsheet WB you should mention this first on the forum:


2015-09-10 19:16

administrator   ~0006387

Please do not clone issues like that without a reason... It won't make them fixed magically, and only gives us more work. Thanks

Issue History

Date Modified Username Field Change
2015-09-09 22:02 savio araujo New Issue
2015-09-09 22:02 savio araujo Issue generated from: 0001711
2015-09-10 19:15 yorik Relationship added duplicate of 0001711
2015-09-10 19:16 yorik Note Added: 0006387
2015-09-10 19:16 yorik Status new => closed
2015-09-10 19:16 yorik Assigned To => yorik
2015-09-10 19:16 yorik Resolution open => duplicate