I'm working on a FCStd-file reader/writer for part-o-magic. And while reading them is fairly straightforward, writing them proves to be quite a challenge.
Particularly, FreeCAD is sensitive to the order the files are written to the zip, and that causes quite some headache for me.
Initially, I thought that only Document.xml is required to be the very first file. Now it turns out, the whole order appears to be important.
For example, I repacked the project with file order changed (see attachment). It does open, but no shapes are loaded. And strangely, I don't notice any errors in console.
Code: Select all
original | rewritten
|
Document.xml | Document.xml
PartShape.brp | GuiDocument.xml
PartShape1.brp | PartShape.brp
PartShape2.brp | PointColorArray
PartShape3.brp | LineColorArray
PartShape4.brp | DiffuseColor2
PartShape5.brp | PointColorArray5
GuiDocument.xml | PointColorArray4
DiffuseColor | PointColorArray1
LineColorArray | DiffuseColor5
PointColorArray | PartShape2.brp
DiffuseColor1 | DiffuseColor3
LineColorArray1 | LineColorArray5
PointColorArray1 | PartShape1.brp
DiffuseColor2 | DiffuseColor1
LineColorArray2 | DiffuseColor4
PointColorArray2 | PointColorArray2
DiffuseColor3 | PartShape4.brp
LineColorArray3 | LineColorArray1
PointColorArray3 | LineColorArray3
DiffuseColor4 | PointColorArray3
LineColorArray4 | PartShape3.brp
PointColorArray4 | PartShape5.brp
DiffuseColor5 | LineColorArray2
LineColorArray5 | LineColorArray4
PointColorArray5 | DiffuseColor
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15518 (Git)
Build type: Release
Branch: master
Hash: e83c44200ab428b753a1e08a2e4d95e03236e481
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)