Tips on improving techdraw performance

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
dimitar
Posts: 229
Joined: Thu Jun 13, 2019 6:10 am
Contact:

Tips on improving techdraw performance

Post by dimitar »

I am creating an architectural 3d section by boolean some floors, walls, and a facade. When placing the objects on a view in tech draw, creating or updating the section takes at least 20 minutes. The file isn't very complicated it's about 15mb, (sorry can't share it) and I have also tried creating a compound object with no hierarchy and it still takes a very long time.

Are there any tips and best practices on improving performance of views? I saw a thread about potentially creating a new documentation file and linking in the geometry.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Tips on improving techdraw performance

Post by chrisb »

You can switch off the recomputes with KeepUpdated=False.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Tips on improving techdraw performance

Post by freedman »

I use macros like (attached) to change the whole document resolution. Using:

Dev3_deflect28.FCMacro changes the deviation to 3.0 in all objects, this will make arcs look a little rough.

Dev-point1_deflection28.FCMacro changes the deviation to .10 in all objects, this I believe is the default for FreeCAD.

These can cause issues with FreeCAD, I have noticed that by making these changes FreeCAD does not use the default on a new document. But, to me I have no problem with that and I use these macros all the time. I have large files and load times of over a minute, I can reduce the resolution and load times change to a few seconds. I normally use the "Dev3" macro that changes the whole document to low resolution and then I modify the deviations of the objects I'm working on by hand.

Please make a copy of your file to try this, I don't want to mess you up.
Attachments
Dev3_deflect28.FCMacro
(285 Bytes) Downloaded 107 times
Dev-point1_deflection28.FCMacro
(281 Bytes) Downloaded 89 times
User avatar
dimitar
Posts: 229
Joined: Thu Jun 13, 2019 6:10 am
Contact:

Re: Tips on improving techdraw performance

Post by dimitar »

chrisb wrote: Tue Aug 13, 2019 4:48 pm You can switch off the recomputes with KeepUpdated=False.
I do that, indeed, but once it's enabled it still takes 20mins
freedman wrote: Wed Aug 14, 2019 1:01 am

I use macros like (attached) to change the whole document resolution. Using:

Dev3_deflect28.FCMacro changes the deviation to 3.0 in all objects, this will make arcs look a little rough.

Dev-point1_deflection28.FCMacro changes the deviation to .10 in all objects, this I believe is the default for FreeCAD.

These can cause issues with FreeCAD, I have noticed that by making these changes FreeCAD does not use the default on a new document. But, to me I have no problem with that and I use these macros all the time. I have large files and load times of over a minute, I can reduce the resolution and load times change to a few seconds. I normally use the "Dev3" macro that changes the whole document to low resolution and then I modify the deviations of the objects I'm working on by hand.

Please make a copy of your file to try this, I don't want to mess you up.
I was thinking that there must be a way to control the visual quality. Thought it may be a units thing, but nice to know it can be overidden. Thanks for these!
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Tips on improving techdraw performance

Post by wandererfan »

dimitar wrote: Tue Aug 13, 2019 3:53 pm I am creating an architectural 3d section by boolean some floors, walls, and a facade. When placing the objects on a view in tech draw, creating or updating the section takes at least 20 minutes.
TD struggles with some architectural drawings. Some of this is due to TD's original use case of producing mechanical drawings of individual parts with hidden lines. The Hidden Line Removal algorithms are single threaded and bog down in cases where there are lots of edges and faces to process.

We really need a feature that just draws the visible faces and their boundary edges.

As @chrisb said, if you turn KeepUpdated off in preferences TD will not slow down your 3D work.

You can also use the CoarseView option on Views. This uses a much faster HLR algorithm, but only returns short line segments, so it isn't much use for dimensioning. Good for initial rough work, though.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Tips on improving techdraw performance

Post by saso »

How long does it take to crate a 2D shape of the same section/view, the way yorik does it here https://youtu.be/Yb6BY1DLW5I?t=82 ? How long does it take to then produce a TD drawing from such 2D shape? For architecture the current TD workflow that was originally created for mechanical drawings seems to me the wrong way... Personally I would like to see two things, custom 3d views of the model and additional stand alone 2d documents that would be saved in the same FCStd file. This are two different strategies, first one is more the way revit views work, the second one is more like how archicad views work, in the long term it would IMO be best to have both. I can go in to more details if there is interest for this...
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Tips on improving techdraw performance

Post by wandererfan »

saso wrote: Wed Aug 14, 2019 2:22 pm How long does it take to crate a 2D shape of the same section/view, the way yorik does it here https://youtu.be/Yb6BY1DLW5I?t=82 ? How long does it take to then produce a TD drawing from such 2D shape?
I have played a bit in TD with making a view of a 2D object without going through the HLR and it is very fast.

I don't know much about the insides of Arch, but it looks like ArchSection might be using Something like BRepAlgo_Section to get the section line. This only returns the cut face outline and not the solid behind the cut so it is much faster.

We could make a "fast section" function that only draws the cut face if that is useful.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Tips on improving techdraw performance

Post by freedman »

There was a macro once that logged and time stamped events (someone will know the name), it might be interesting to log a 20 min. session.

I asked once for a beep on long recomputes and wmayer posted this, it worked and allowed me to do other things.
wmayer » Mon Mar 04, 2019 12:12 pm
Unfortunately, for 99% of all OCCT algorithms there is no feedback of how long an operation will take.
In order to give you some feedback after an operation is completed you can try this:

Code: Select all

from PySide import QtGui

class DocObserver(object):
def slotRecomputedDocument(self, doc):
QtGui.qApp.beep()

obs=DocObserver()
App.addDocumentObserver(obs)
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Tips on improving techdraw performance

Post by TheMarkster »

Recompute_Profiler might be the macro you are thinking of.
User avatar
dimitar
Posts: 229
Joined: Thu Jun 13, 2019 6:10 am
Contact:

Re: Tips on improving techdraw performance

Post by dimitar »

wandererfan wrote: Wed Aug 14, 2019 2:01 pm TD struggles with some architectural drawings. Some of this is due to TD's original use case of producing mechanical drawings of individual parts with hidden lines. The Hidden Line Removal algorithms are single threaded and bog down in cases where there are lots of edges and faces to process.

We really need a feature that just draws the visible faces and their boundary edges.

As @chrisb said, if you turn KeepUpdated off in preferences TD will not slow down your 3D work.

You can also use the CoarseView option on Views. This uses a much faster HLR algorithm, but only returns short line segments, so it isn't much use for dimensioning. Good for initial rough work, though.
Is there away to have multi threaded hidden lines removal or is that an OCC feature?

Yep, definitely sounds right, it would be a good feautre to have to draw only the visible boundary edges

I do use keepupdated off, but the trouble is, when i turn it on, it still takes a very long time to generate a 3d hidden line view. I should clarify that even thought it is a 3d axon section, i've drawn it as a chunk, so i am creating a 3d view of the whole model, not with the arch section tool. Not even sure if the arch section tool could be used to position a 3d model cut on a sheet?

Didn't know about the coarse view option, thanks, will have a look at it
wandererfan wrote: Wed Aug 14, 2019 3:30 pm We could make a "fast section" function that only draws the cut face if that is useful.
Usually, it's nice to see a section with elements behind, but for error checking modeling purposes, it would be a nice option to have, especially if it is much faster.

saso wrote: Wed Aug 14, 2019 2:22 pm Personally I would like to see two things, custom 3d views of the model and additional stand alone 2d documents that would be saved in the same FCStd file. This are two different strategies, first one is more the way revit views work, the second one is more like how archicad views work, in the long term it would IMO be best to have both. I can go in to more details if there is interest for this...
Definitely a lot of interest in this. There should indded be a way to save and recall views and have an easy multi-view environment. I know how the revit workflow works, but how does archicad work? What are the advantages of having stand alone 2d documents save in a seperate file? I presume the what they are showing is pronbably linked in some smarter way back to the model and the cut in which it is created?


How do you guys work on a project with, say 20, 30 + sheets? Is it feasible yet in Freecad with the current TD speeds?
Post Reply