I noticed that the redrawing takes too much time when I continuously do resizing(scaling) of the 3D object.
The desired 3D drawing is slow in FreeCAD or I don't know how to make it optimized.
Thinking about drawing the TopoShape object in the Coin3D is not possible. Think about all possible situations. I cannot recreate the 3D object in COIN3D.
The implementation of DirectScale is at
https://github.com/MariwanJ/Design456/b ... tScale.py
I would like to know how you would think about this matter. To understand the problem, please use the DirectScale I have in my Workbench.
For primitive simple object, you don't notice the problem.. But as soon as you use it on a complex object, it lags and take too much time.. FreeCAD might freezes for some seconds.
As the whole project is based on that, I need to find a solution. Please let me know how I do minimize CPU demand.
Why for example redrawing in Autodesk 123D Design is so smooth, you don't notice any redrawing problem? How do other CAD programs redraw the object so quickly?
Your help is appreciated.
Thanks.
https://github.com/MariwanJ/Design456
Design456: Best practice to minimize CPU demand while redrawing the 3D object?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Design456: Best practice to minimize CPU demand while redrawing the 3D object?
Last edited by mariwan on Sun Jul 11, 2021 4:19 pm, edited 1 time in total.
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_
Re: Design456: Best practice to minimize CPU demand while redrawing the 3D object?
I suggest to take a look at Draft WB.
Almost every command do not directly modify the shape, but preview the changes using coin, and then compute the changed shape only once at the end of the transformation. This is done for Draft.Move and Draft.Rotate.
Usually the preview object is called ghost in the code.
Also Draft Scale command do it
https://github.com/FreeCAD/FreeCAD/blob ... le.py#L364
https://github.com/FreeCAD/FreeCAD/blob ... rs.py#L721
Almost every command do not directly modify the shape, but preview the changes using coin, and then compute the changed shape only once at the end of the transformation. This is done for Draft.Move and Draft.Rotate.
Usually the preview object is called ghost in the code.
Also Draft Scale command do it
https://github.com/FreeCAD/FreeCAD/blob ... le.py#L364
https://github.com/FreeCAD/FreeCAD/blob ... rs.py#L721
Last edited by carlopav on Sun Jul 11, 2021 12:27 pm, edited 1 time in total.
follow my experiments on BIM modelling for architecture design