(WORKAROUND) Speed by techdraw
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: (WORKAROUND) Speed by techdraw
I don't understand what is supposed to be discussed here, IMO it is expected that techdraw would be slower than a simple screenshot as it is doing projections this is a fair price to pay for usable technical drawings, for simple visualization purposes techdraw is not the right tool.
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: (WORKAROUND) Speed by techdraw
yorik agrees with me that techdraw is too slow for larger drawings. I am of the opinion that in the 3D window (non-parametric) dimensioned drawings can bring quick results. here is an example (small file)
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: (WORKAROUND) Speed by techdraw
for quick and dirty results definitively, I don't see how that can be contested. For good professional work usually one has to think about the future and make a project reasonably editable though.
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: (WORKAROUND) Speed by techdraw
I am convinced that techdraw will achieve the desired speed in the future. it is a workaround to bridge the gap
Re: Speed by techdraw
Sorry, but what is so complicated to report a problem? Give a simple FreeCAD file and describe what you do.thomas-neemann wrote: ↑Sat Jul 02, 2022 5:46 pm here is a file that i recently created myself in freecad.
Let me do this for you:
- take this FreeCAD file (zipped): https://github.com/donovaly/FreeCADInst ... medium.zip
- go to the TechDraw workbench
- highlight all elements in the tree and the use the menu TechDraw -> Insert View
result: this takes ages (on my machine about 33 minutes)
expected result: I get a view within a minute because when you make a section cut on similar large files, it works even within seconds. Load for example the STEP file of https://grabcad.com/library/single-storey-house-3d-1 at the website into their online 3D viewer and make a section cut. This is really fast.
@wandererfan , this is a big issue. Personally, I also encountered during my real-life work with FC 0.19 this problem and it is not clear to me why this happens. I mean even one million of vertices should not be a problem on a PC with 8 GB RAM.
For me as Windows user another problem is hereby that FreeCAD becomes unresponsive. So there is something in the code missing to tell the OS that FreeCAD is still alive, but only working. As it is, sooner or later Windows steps in and attempt to close the unresponsive program.
For the unresponsiveness maybe @wmayer knows what must be done in such cases?
Re: Speed by techdraw
Yes, TechDraw cannot handle mesh objects. I am not sure if this is a problem since I never had the case that I needed too dimension meshes.
(Why do I need in modern times still technical drawings and cannot send people directly e.g. a STEP file? Because of legal issues. The tolerances and a proper technical drawing will decide who needs to pay or re-manufacture the part in case the dimensions are out of specs. Maybe I am wrong here, but since I create the meshes with a certain tolerance of angular deflection from the "real" part, mesh objects are not useful for tolerancing in a technical drawing.)
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Speed by techdraw
thanks for the cooperation. it's not a problem. But I have often used to "normalize" the speed in freecad, e.g. larger ifc imports mashed. if that is to appear on the plan, it would currently only be possible in pdf format
Re: (WORKAROUND) Speed by techdraw
It's probably the HLR algorithm of OCC that is slow. If the API supports a way to indicate the progress then this could be used to show and regularly update a progress bar (or dialog). If there is no such facility then a way is to run the algorithm in a worker thread.For the unresponsiveness maybe @wmayer knows what must be done in such cases?
If as in this case there are many (independent) objects to be processed then this could be split into several threads.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Speed by techdraw
We already know why this is slow. The OCC HLR algo does thousands of edge and face intersection calculations sequentially. This seems like an obvious candidate for parallel processing but that would be up to OCC. If there are geometry errors (as seems common with imported files like step or stl) then HLR slows down even more.uwestoehr wrote: ↑Sun Jul 03, 2022 12:12 am @wandererfan , this is a big issue. Personally, I also encountered during my real-life work with FC 0.19 this problem and it is not clear to me why this happens. I mean even one million of vertices should not be a problem on a PC with 8 GB RAM.
For me as Windows user another problem is hereby that FreeCAD becomes unresponsive. So there is something in the code missing to tell the OS that FreeCAD is still alive, but only working. As it is, sooner or later Windows steps in and attempt to close the unresponsive program.
The Message_ProgressIndicator API is not exposed for the HLR algo, so there is no feedback from OCC while it is doing the calculations.
I've never tried to move the HLR processing to a different thread since I've always heard that OCC is not thread safe. Maybe I am mistaken and this is possible.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact: