File Simplification

From Open Source Ecology
Jump to: navigation, search


With FreeCAD, OSE practices 2 levels of file simplification. In both cases, the goals are is to reduce file size, and to simplify the part tree. OSE workflow assumes that we work with the part tree (especially the very useful feature of hiding and un-hiding parts for build instructionals purposes), and that we reduce file size as much as possible to make complex files quick to open and easy to manipulate without bogging down the computer. This is especially important when large teams are collaborating.

The file simplification below refers to simplifying the actual features of a part - the Level of Detail section below. Another type of simplification can be done on the part tree to simplify the part tree during the design phase. This is the Part Tree Simplification section.

Part Tree Simplification

When doing design work with multiple modules of similar parts, such as the Seed Eco-Home wall modules - it is useful to collapse the part tree into a single item.

OSE usually creates detailed CAD where every single part (such as the tens of parts of wall modules - each appear as an individual item in the Part Tree. This is useful for making instructionals, where parts can be hidden and unhidden to allow for step-by-step build sequences. Also, exploded part animations can be done using the Exploded Assembly Workbench.

However, in the design phase, it is challenging to keep track of dozens of parts, so it is useful to collapse the part tree into a more manageable form. This can be done by either removing information from the CAD file, or retaining it. To retain all information, right click on a part tree heading and Create Group - which creates a folder. Then you can drag and drop parts into that folder. This makes it easy to keep track of parts - or selecting a bunch of parts at once by selecting that folder. This does not reduce file size.

To reduce file size, we can remove sketches by Create Simple Copy in the Part Workbench, or by clicking on a sketch and deleting. We can also Make Compound - collapsing a bunch of parts into one. However, Make Compound does not reduce file size further - in fact, a Compound of a bunch of simple parts takes more memory than the simple copies themselves. To reduce file size of a compound, Ctrl-C and Ctrl-V into a new document. Ctrl-V into the same document doesn't seem to reduce the file size. You will notice typically when you select a compound or part with sketch:


Select no, and your paste will be lower in size.

To summarize - remove sketches to reduce memory, make a compound to collapse all parts into one, and then copy-paste without detail into a new file - and you will have the minimum-size file possible under one item in the part tree. Such format makes the overall assembly file in a team workflow the smallest possible, allowing for large scale design. The limit here is a few thousand part files that can be manipulated readily. Once a file reaches an unmanageable size - we can go to file simplification in terms of Level of Detail - in the next section. This is like making thumbnails of pictures available: you can work with it, but it doesn't contain all the detail. The simple version is an abstract version of the original file. Thus, in large-scale team workflows - the part tree simplification and level of detail simplification can be pursued ad infinitum - abstracting the design further and furth - so that complex assemblies can be created. In principle, the complexity of design that this process can handle has no limit. Therefore, even the largest design problems can be solved in a day - with thousands or even millions of people collaborating in realtime.

Level of Detail

We work with CAD files at different levels of detail. For example, we can download a file for a valve from McMaster-Carr and the thing is a few MB because it has details like threads. But - the problem comes in when we have an assembly of many parts. This leads easily to 100MB or GB size files if one doesn't pay attention to file size. This is rather unworkable - as the computer bogs down to very slow operations.

The solution is creating very small part files that represent the original - but instead of say 2 MB - it would be like 10k or so. Just a placeholder - which shows relatively accurate dimensions (important for analyzing part interference and fit) - but shows them in the crudest way possible. Such that - say we have a file with 200 parts of 10k each - so the entire assembly remains at only 2MB. As a general practice - files above 50MB are unusable - the practical limit is 10-20MB. But if kept down to around 1MB, navigation is lightning fast and no time is wasted.

We save these small files as individual files, and assemblies of individual files, in the OSE Part Library. Thus, if we want to create an excessively large file - we can handle complex files of hundreds of parts without any visible slowdown of the computer. Read more about our workflow of merging files together - see Merge Workflow.

Working Doc



  • Note that FreeCAD file size is 2.8k minimum for a cubic shape in the above presentation.
  • Thus, the simplest useful files start at about 10k. Files with about
  • A cube should be only a few bytes - l, w, h. 8 bits are a byte. About 65,000 divisions is 2 bytes (16 bit depth). So each dimension should be stores in 2 bytes. Thus, a cube should be 6 bytes large. If we add angle and position, we have 18 bytes. Thus, memory size of FreeCAD files can be reduced by at least 100x if files were stores in their most efficient form, because minimum file size is on the order of kilobytes, not bytes. Just sayin'.