Performance improvements for PartDesign patterns (PR)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Performance improvements for PartDesign patterns (PR)
Parallel execution may bring some relief, but I guess that there is a structural issue. The Python solution of Draft can't be 15-20 times faster than a C++ solution without an overall different approach.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 529
- Joined: Fri Sep 18, 2020 5:40 pm
Re: Performance improvements for PartDesign patterns (PR)
You are right. And I found the solution by studying how Part Cut does things. PD can now do the filter model as fast as your solution. The problem is that PartDesign also support overlapping patterns. This means that we will need a hybrid of this method and the old method. I am working on that.
Re: Performance improvements for PartDesign patterns (PR)
That sounds very promising. If it cannot be detected automatically, the advantage is still so enormous, that I would even welcome a user decision where he can choose which option he wants to use, including the danger that the fast variant can break the model.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Performance improvements for PartDesign patterns (PR)
Other CAD software have the same issue with the overlap. but still it they are much faster...
-
- Posts: 529
- Joined: Fri Sep 18, 2020 5:40 pm
Re: Performance improvements for PartDesign patterns (PR)
I have pushed a new version. Now with huge boost in performance for simple non-overlapping patterns, like Chrisb's filter example.
Now the filter example executes in under 30 s (previously 1h +). Note that the model has to be modified slightly to avoid triggering the overlapping mode.**
** The sketch attachment offset needs to be modifed so that there is no overlap between the tool shapes (unfortunately the tool shapes are not visible, which makes it hard for the user to notice the problem).
Now the filter example executes in under 30 s (previously 1h +). Note that the model has to be modified slightly to avoid triggering the overlapping mode.**
** The sketch attachment offset needs to be modifed so that there is no overlap between the tool shapes (unfortunately the tool shapes are not visible, which makes it hard for the user to notice the problem).
Re: Performance improvements for PartDesign patterns (PR)
Thanks! I think it is very well acceptable that the user has to consider certain preconditions when using this feature.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 529
- Joined: Fri Sep 18, 2020 5:40 pm
Re: Performance improvements for PartDesign patterns (PR)
I have added a property were the user can specify the overlap mode explicitly, in addition to the automatic detection.
Motivation:
1) On some models, such as the original Filter model. The overlap mode is triggered, because the tool bodies are overlapping. But in fact the features them selves are not overlapping so the non-overlap mode is suitable. Leading to a huge time saving.
2) If it is known that the patterned features are close, but non-overlapping, such as in the knurled knob example, explicitly selecting non-overlap mode can speed up the recompute time with 20%. Because the overlap detection itself is costly.
Motivation:
1) On some models, such as the original Filter model. The overlap mode is triggered, because the tool bodies are overlapping. But in fact the features them selves are not overlapping so the non-overlap mode is suitable. Leading to a huge time saving.
2) If it is known that the patterned features are close, but non-overlapping, such as in the knurled knob example, explicitly selecting non-overlap mode can speed up the recompute time with 20%. Because the overlap detection itself is costly.
Re: Performance improvements for PartDesign patterns (PR)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Performance improvements for PartDesign patterns (PR)
Do you know already the revision number for this feature? I would like to test and document it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 529
- Joined: Fri Sep 18, 2020 5:40 pm
Re: Performance improvements for PartDesign patterns (PR)
It will only be merged (hopefully) after 0.19 has been released. The changes are local to one class and pretty straight forward so I don’t expect a long code review process. Perhaps it will be be in the development build in a few weeks. Until then the only option is to self compile. This is where it would be nice with the Greenhouse idea that was discussed a few months ago.