View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001437||FreeCAD||Feature||public||2014-02-23 18:04||2016-01-31 19:18|
|Priority||low||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version||0.16|
|Summary||0001437: Global parameters|
|Description||I'd like to propose the use of global parameters.|
When it's implemented, just mark it as solved.
|Additional Information||For the possible use anywhere in the file. Perhaps as published too? So one can reach/get it from another file.|
|Tags||No tags attached.|
||There is already a system of global parameters (Tools -> Edit Parameters). Or do you mean something else?|
I was thinking of user defined parameters to be used in one file.
E.G. a castings / sheet metal draft angle. The draft angle is usually a fixed general values (which you must apply to each and every feature) for the whole part but can be changed after deep consultation with the manufacturer (weight/cost saving). And redoing all draft angles one-by-one is usually not anyone's idea of having fun.
Or the depth of a threaded hole determines the opposite side of the parts shape.
Or the flat area needed under screw heads.
Or the number of steps on/in a stair/ladder, or their spacing and so on and so forth...
I was hoping it should also be possible to make the parameters available outside the file. So one can pass a parameter to another file. For example when one make several parts to be bolted together one need to have the hole pattern synchronised, and their size. An example: an engine block and a gearbox must always fit together and due to lack of space/access reasons the holes will move around quite a bit during an automotive project. This also applies to the circle diameter of engine/gearbox interface.
In my dawn-to-dusk-work I once made a fully parameterized piston witch was governed by a script to change one parameter in ten steps and keep the others untouched. Then an automated FEM program calculated the flow in the ten different diesel pistons and picked the one with best result. The script then changed another parameter in ten steps and the process kept on going like that till it got a significantly better flow compared to its predecessor. The whole process took a bit over a week compared to making one piston, send it to calculation department, get it back a week later with all possible complaints, interpret the wining, redo the model according to best interpretation/guess, send it to calc... and so on and so forth... it took bloody ages! (over a year).
All-in-all it's a time saver, big time!
Hope I didn't wine too much? =O)
I think what you describe is too generic to become a specific "tool", and it is also already present, in a way. All that you describe is totally doable from python scripting. You can keep a certain list of parameter values in an external file, then from a script, read that file, and change certain properties of certain objects with the values from the file.
This would be quite some work to implement, and it would only serve your purpose I'm afraid, another user with a different case would require something different.
But one of the things that is on my todo list ( #926 ) is to implement a way to "control" certain properties of certain objects from a cell of the spreadsheet module. I think that would more or less solve your issue?
Wouldn't be surprised if that way is a smarter route to go than what I originally thought of:
One minute into the video they create two parameters.
Here they create an external parameter.
Since I'm not a codie I can't tell for sure if we talking about the same thing. But if you say your interpretation and mine are the same then go ahead and close this one.
Hi, a few days into using FreeCAD I'm thinking global parameters would be massively useful.
I'm a programmer however when using FreeCAD I'd much rather not learn how to script it as long as I can.
I want just to be able to use the GUI to do what I need done.
Here's what I'm doing:
- I've created several sketches
- I've extruded them into solids
- I move stuff around and change sizes
A number of parameters are interconnected. I'd much rather change one size in one place rather than go over all my sketches.
I think it would also be nice to add and subtract global parameters. Don't think other arithmetic operations as that much necessary. Maybe multiplication by constant? It would be nice to define paramters A and B and then have A and B serve as size constraints in sketches and also say that Y position of one of my sketches is A + B + 20
But even without arithmetic just having the parameters would already be a massive step forward
I second this, the same idea of global parameters occured to me earlier this month.
I also find it very appealing for assembly of multiple files, where you essentially bind different parametrized objects by fixing their parameters or expressing them in terms of each other.
As to "the scripting way of parameterizing" I tried it (despite being reluctant to do it just as atagunov). I did generate my design by a single script and I like the result. But it took a lot of time and has other issues (first of all being impractical for non-programmers).
I actually think it's a must-have for something with the word "parametric" in its name.
||Actually, this feature is already implemented. FreeCAD documents have a "Meta" property that can hold custom values. The only thing needed is a GUI to edit it...|
||This bug should be closed then?|
||I think that most of what is requested in this issue is now possible using Spreadsheet WB + Expressions in master branch now. See http://www.freecadweb.org/wiki/index.php?title=Expressions for documentation.|
||I think this can be closed now as spreadsheet + expressions basically does the job. I'm closing this issue then, reopen if needed.|
|2014-02-23 18:04||Pauvres_honteux||New Issue|
|2014-02-23 18:51||shoogen||Relationship added||related to 0000800|
|2014-03-27 21:02||yorik||Note Added: 0004503|
|2014-03-28 05:11||Pauvres_honteux||Note Added: 0004506|
|2014-03-29 17:49||yorik||Note Added: 0004517|
|2014-03-29 19:49||Pauvres_honteux||Note Added: 0004518|
|2014-11-02 00:28||atagunov||Note Added: 0005264|
|2015-02-23 10:53||kir||Note Added: 0005821|
|2015-02-23 13:37||yorik||Note Added: 0005823|
|2015-02-23 14:16||kir||Note Added: 0005824|
|2015-09-25 20:15||eivindkvedalen||Note Added: 0006453|
|2016-01-31 19:18||yorik||Note Added: 0006790|
|2016-01-31 19:18||yorik||Status||new => closed|
|2016-01-31 19:18||yorik||Resolution||open => fixed|
|2016-01-31 19:18||yorik||Fixed in Version||=> 0.16|