View Issue Details

IDProjectCategoryView StatusLast Update
0001437FreeCADFeaturepublic2016-01-31 19:18
ReporterPauvres_honteux Assigned To 
PrioritylowSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version0.16 
Summary0001437: Global parameters
DescriptionI'd like to propose the use of global parameters.

When it's implemented, just mark it as solved.

Regards, Pauvres_honteux
Additional InformationFor the possible use anywhere in the file. Perhaps as published too? So one can reach/get it from another file.
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0000800 closedlogari81 Sketcher Formula/Equation Based Constraints 

Activities

yorik

2014-03-27 21:02

administrator   ~0004503

There is already a system of global parameters (Tools -> Edit Parameters). Or do you mean something else?

Pauvres_honteux

2014-03-28 05:11

reporter   ~0004506

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)

yorik

2014-03-29 17:49

administrator   ~0004517

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 ( 0000926 ) 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?

Pauvres_honteux

2014-03-29 19:49

reporter   ~0004518

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.
http://m.youtube.com/watch?v=jSiMHpfbFqo

Here they create an external parameter.
http://whatcomesyourway.blogspot.se/2011/11/external-paramters-in-catia-v5.html?m=1

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.

atagunov

2014-11-02 00:28

reporter   ~0005264

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

kir

2015-02-23 10:53

reporter   ~0005821

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.

yorik

2015-02-23 13:37

administrator   ~0005823

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...

kir

2015-02-23 14:16

reporter   ~0005824

This bug should be closed then?

eivindkvedalen

2015-09-25 20:15

developer   ~0006453

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.

yorik

2016-01-31 19:18

administrator   ~0006790

I think this can be closed now as spreadsheet + expressions basically does the job. I'm closing this issue then, reopen if needed.

Issue History

Date Modified Username Field Change
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