Introduction
FCStd is the document format of FreeCAD, the free and open source parametric CAD program. A document holds every object in the model with its properties: sketches and their constraints, the features built from them, spreadsheets that drive dimensions, and the resulting solid shapes, together with how each object is shown on screen.
Because FreeCAD is open source and the file is a ZIP package of readable parts, the format is fully open, although it is defined by FreeCAD’s code rather than a separate specification.
Structure
An FCStd file is a ZIP archive whose first entry is Document.xml, which
lists the objects, their types, properties and links to each other. The data files
that the XML refers to follow in the order it names them. Shapes are stored as
separate entries in Open CASCADE’s BREP format, as text (.brp) by
default or binary (.bin) when that preference is set, named after the
object and property, such as Box.Shape.brp.
GuiDocument.xml holds the display settings, such as colours,
visibility and the camera, and a thumbnail is usually included as
thumbnails/Thumbnail.png; both are written only when FreeCAD runs with
its GUI.
zipDocument.xml objects, properties and links, always firstXMLzip*.brp, *.bin and other data shapes, meshes, lists and embedded filesvarieszipGuiDocument.xml colours, visibility, cameraXMLzipthumbnails/Thumbnail.png a preview imageoptional
In this reference
- Archive and files – the ZIP container, the order and names of its entries, text and binary BREP shapes, the thumbnail and the binary list files
- Document.xml and GuiDocument.xml – the root and its schema versions, properties and status bits, the document’s own properties, objects, dependencies, extensions, view providers and the camera, with the wiki’s example
- Property types – the XML of every property type: numbers, text, enumerations, lists, placements, colours, links, expressions, Python objects, embedded files, shapes, meshes, sketch geometry and constraints
The pages follow the FreeCAD wiki’s File Format FCStd page and FreeCAD’s source code, which is the only full definition of the format.
Not described
Known, not yet covered
- Reference: the layouts of
MeshKernel.bms, the element map and string table files, and the byte order a big-endian machine would write in the binary list files; FreeCAD’s source defines them, and it was not read for them (archive page). - Reference: the exact backup file names and the ZIP writer’s features, the values of
UnitSystem, the order ofBoolListcharacters, the units unit types store, and the properties that only other workbenches (TechDraw, FEM, CAM, BIM and so on) define, together with the sketch geometry extensions (properties page). - Viewer: none yet; the site shows the hex viewer only.
Unknown
- Reference: what changed between document schema versions 3 and 4: readers treat every version from 3 up alike, and the sources read do not record the change (document page).
Links
Software
- FreeCAD – the free open source parametric CAD program that saves FCStd documents (Windows, macOS, Linux)
Reference
- File Format FCStd – the FreeCAD wiki’s description of the package, with an example Document.xml
- FreeCAD source code – the code that defines the document format