Fixed and variable parameters.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Fixed and variable parameters.

Post by jruiz »

I was wondering if
  1. 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
  2. If so, would this declaration speed up the process of recalculating the objects of the project?
Greetings
I have uploaded many FreeCAD video tutorials to my YouTube channel
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Fixed and variable parameters.

Post by adrianinsaval »

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.
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Fixed and variable parameters.

Post by jruiz »

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.
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.
(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.
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...
Thank you very much for this information.
I have uploaded many FreeCAD video tutorials to my YouTube channel
Post Reply