- Is it possible for the parameters used in a FreeCAD project to be explicitly declared as constant or variable (as user decide, and maybe as constants for default) ? and
- If so, would this declaration speed up the process of recalculating the objects of the project?
Fixed and variable parameters.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Fixed and variable parameters.
I was wondering if
I have uploaded many FreeCAD video tutorials to my YouTube channel
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Fixed and variable parameters.
Can you give a example usecase? What do you mean by variable or constant? If with constant you mean a value that you set and then can't change anymore I don't think constant is a good default.
I'm not an expert but I don't think that would give any significant speedup, if I'm not mistaken the most computationally intensive are the occ functions. If you set the length of a pad as "constant" but you change the sketch it would have to be recomputed from scratch anyway so no speedup there.
I'm not an expert but I don't think that would give any significant speedup, if I'm not mistaken the most computationally intensive are the occ functions. If you set the length of a pad as "constant" but you change the sketch it would have to be recomputed from scratch anyway so no speedup there.
Re: Fixed and variable parameters.
Well, I am talking about a parameter that the user set "manually", do not depends on any other parameter(s) and are supposed not to be modified.adrianinsaval wrote: ↑Sat Jul 17, 2021 5:38 pm Can you give a example usecase?
What do you mean by variable or constant? If with constant you mean a value that you set and then can't change anymore I don't think constant is a good default.
(I don't know how FreeCAD works "internally" but) I was thinking that if constant parameters have not to be recomputed, just variable ones, then some computation time could be saved.
Thank you very much for this information.adrianinsaval wrote: ↑Sat Jul 17, 2021 5:38 pm I'm not an expert but I don't think that would give any significant speedup, if I'm not mistaken the most computationally intensive are the occ functions...
I have uploaded many FreeCAD video tutorials to my YouTube channel