View Issue Details

IDProjectCategoryView StatusLast Update
0001711File formatsFeaturepublic2016-01-31 18:55
Reportermf Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Summary0001711: 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.
example:
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

Relationships

related to 0000800 closedlogari81 Sketcher Formula/Equation Based Constraints 
has duplicate 0002250 closedyorik File formats global data variables for using in constraints 

Activities

normandc

2014-08-26 23:36

manager   ~0005013

Isn't this a duplicate of 0001437 ?

recurse

2015-02-09 22:09

reporter   ~0005772

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++?

triplus

2015-02-10 01:29

developer   ~0005773

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

Simple example:

http://www.freecadweb.org/tracker/view.php?id=1709

Additional example as infographic:

http://www.freecadweb.org/tracker/view.php?id=1703

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:

http://forum.freecadweb.org/viewtopic.php?f=10&t=6360

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

recurse

2015-02-11 21:10

reporter   ~0005786

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?

triplus

2015-02-11 23:39

developer   ~0005787

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:

http://forum.freecadweb.org/viewtopic.php?f=10&t=6360

eivindkvedalen

2015-10-06 21:06

developer   ~0006485

This is now possible in master (to be 0.16), so I think this ticket can be closed now.

Issue History

Date Modified Username Field Change
2014-08-25 10:47 mf New Issue
2014-08-25 13:24 wmayer Relationship added related to 0000800
2014-08-26 23:36 normandc Note Added: 0005013
2015-02-09 22:09 recurse Note Added: 0005772
2015-02-10 01:29 triplus Note Added: 0005773
2015-02-11 21:10 recurse Note Added: 0005786
2015-02-11 23:39 triplus Note Added: 0005787
2015-09-09 22:02 savio araujo Issue cloned: 0002250
2015-09-10 19:15 yorik Relationship added has duplicate 0002250
2015-10-06 21:06 eivindkvedalen Note Added: 0006485
2016-01-31 18:55 yorik Status new => closed
2016-01-31 18:55 yorik Resolution open => fixed