Feature Request: Freezing objects in a project.

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

Feature Request: Freezing objects in a project.

Postby jruiz » Tue Mar 10, 2020 2:23 am

Suppose a project consisting on several objects. Suppose the user consider that some of them will not be modified in the near future and he/she works on the rest of the objects. How hard would be to implement a freezing on the former objects for the system(/solver/FreeCAD) to use CPU time just on the objects under develop?
I have uploaded some FreeCAD video tutorials to www.youtube.com/yosoyvenezolano
vocx
Posts: 3956
Joined: Thu Oct 18, 2018 9:18 pm

Re: Feature Request: Freezing objects in a project.

Postby vocx » Tue Mar 10, 2020 3:43 am

jruiz wrote:
Tue Mar 10, 2020 2:23 am
Suppose a project consisting on several objects. Suppose the user consider that some of them will not be modified in the near future ...
The natural way to handle this would be to place the "frozen" object in a separate file, and import it into another file with an App_Link. This new object in 0.19 was precisely developed to do this, to avoid consuming a lot of resources from already made objects.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
jruiz
Posts: 220
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Freezing objects in a project.

Postby jruiz » Tue Mar 10, 2020 11:18 am

vocx wrote:
Tue Mar 10, 2020 3:43 am
jruiz wrote:
Tue Mar 10, 2020 2:23 am
Suppose a project consisting on several objects. Suppose the user consider that some of them will not be modified in the near future ...
The natural way to handle this would be to place the "frozen" object in a separate file, and import it into another file with an App_Link. This new object in 0.19 was precisely developed to do this, to avoid consuming a lot of resources from already made objects.
Cool!
Gonna make make some tests...
Particularly I was thinking on a solution consisting in producing a binary object by using Python to compile it.
Regards
I have uploaded some FreeCAD video tutorials to www.youtube.com/yosoyvenezolano
chrisb
Posts: 24211
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request: Freezing objects in a project.

Postby chrisb » Tue Mar 10, 2020 1:21 pm

jruiz wrote:
Tue Mar 10, 2020 2:23 am
How hard would be to implement a freezing on the former objects for the system(/solver/FreeCAD) to use CPU time just on the objects under develop?
Isn't this what a simple copy does?
vocx
Posts: 3956
Joined: Thu Oct 18, 2018 9:18 pm

Re: Feature Request: Freezing objects in a project.

Postby vocx » Tue Mar 10, 2020 10:12 pm

jruiz wrote:
Tue Mar 10, 2020 11:18 am
...
Particularly I was thinking on a solution consisting in producing a binary object by using Python to compile it.
...
This sentence doesn't make much sense. Python is not a compiler.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
jruiz
Posts: 220
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Freezing objects in a project.

Postby jruiz » Tue Mar 10, 2020 11:20 pm

vocx wrote:
Tue Mar 10, 2020 10:12 pm
jruiz wrote:
Tue Mar 10, 2020 11:18 am
...
Particularly I was thinking on a solution consisting in producing a binary object by using Python to compile it.
...
This sentence doesn't make much sense. Python is not a compiler.
What about using pyinstaller (in the free world) or py2exe (in window$) ?
Would't it help in this approach?
I have uploaded some FreeCAD video tutorials to www.youtube.com/yosoyvenezolano
vocx
Posts: 3956
Joined: Thu Oct 18, 2018 9:18 pm

Re: Feature Request: Freezing objects in a project.

Postby vocx » Tue Mar 10, 2020 11:56 pm

jruiz wrote:
Tue Mar 10, 2020 11:20 pm
...
Would't it help in this approach?
I'm sorry but this makes even less sense. I don't understand what you want now. Remake the question.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
jruiz
Posts: 220
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Freezing objects in a project.

Postby jruiz » Wed Mar 11, 2020 12:22 am

vocx wrote:
Tue Mar 10, 2020 11:56 pm
jruiz wrote:
Tue Mar 10, 2020 11:20 pm
...
Would't it help in this approach?
I'm sorry but this makes even less sense. I don't understand what you want now. Remake the question.
The sequence is this:
I would want that FreeCAD do calculation on "finished" objects just once (then "freeze them"). And as project grows, that CPU time be used on new unfinished objects.
The strategy I mentioned consisted on (by some means) create binaries of "frozen objects" . Then I found that Pyinstaller was able to create binaries from python scrips. (I have not used Pyinstaller). Then was wondering if Pyinstaller could help in making that job.
I have uploaded some FreeCAD video tutorials to www.youtube.com/yosoyvenezolano
adrianinsaval
Posts: 317
Joined: Thu Apr 05, 2018 5:15 pm

Re: Feature Request: Freezing objects in a project.

Postby adrianinsaval » Wed Mar 11, 2020 8:40 pm

That seems counterproductive, if you only save a script that would generate the shape you want then it woukd have to be generated every time, I don't even think it's possible to mix freecad with pyinstaller if I understand things correctly.

What you probably want is to save the finished parts as separate FreeCAD files and import them as links or subshapebinders into your main project. FreeCAD files are not just python scripts, they contain the generated shapes of the objects and they usually aren't re calculated unless you modify or recompute the object in question.