Python profiling - Chrom Tracing
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Python profiling - Chrom Tracing
Maybe recreateObject is called 100,000x ? , therefore a hope for scaling down elapsed time?
Re: Python profiling - Chrom Tracing
If the change is >1mm .. it will recreate the faces otherwise it just return. So even if it is called, not sure that it needs to do anything.
I cannot avoid running when the change of the length of any edge is more than 1 .. because that is the tool. Change size of the object by dragging the edge.
And 1mm is reasonable.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Python profiling - Chrom Tracing
Not saying this would solve the problem but it might not actually be reasonable, what if you're modelling something that's 10m? A value relative to the object bounding box would probably make more sense. There could also be a problem with how the change is calculated? Either way, OCCT is not a very fast geometric kernel so it might just not be possible. Another thing, are you recreating all the faces of the object? isn't it possible to keep the faces that are not changed and only recreate the ones affected by moving the edge? (in the case of a cube this would be just 2 faces so the speed up would probably not be more than 33%.mariwan wrote: ↑Thu Nov 25, 2021 8:31 pm If the change is >1mm .. it will recreate the faces otherwise it just return. So even if it is called, not sure that it needs to do anything.
I cannot avoid running when the change of the length of any edge is more than 1 .. because that is the tool. Change size of the object by dragging the edge.
And 1mm is reasonable.
Re: Python profiling - Chrom Tracing
I understand,
This might be an option in the code .. but the actual problem is the slowness of the operation regardless this tool.
There are many other tool in my plan which are also based on recreating the whole object or faces. Like removing hole, copy hole ..etc
You must recreate the object faces by faces otherwise there is no way to do it.
But isn't strange that OCCT fails in creating faces in a reasonable time? It is not Fuse, cut or anything like that .. it is just creating a face ..
I tried to use Part.Face .. but occt failing with no reason.
This might be an option in the code .. but the actual problem is the slowness of the operation regardless this tool.
There are many other tool in my plan which are also based on recreating the whole object or faces. Like removing hole, copy hole ..etc
You must recreate the object faces by faces otherwise there is no way to do it.
But isn't strange that OCCT fails in creating faces in a reasonable time? It is not Fuse, cut or anything like that .. it is just creating a face ..
I tried to use Part.Face .. but occt failing with no reason.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_