.skf format reference
This reference is generated from the engine's exported project types, version constants, and archive limits. It describes the serialized contract; see the project format guide for behavior and safety semantics.
For automated project export from a server-backed project, see POST /exports in the REST API guide.
Package identity
| Property | Value |
|---|---|
| Schema | com.sketchforge.project |
| Current writer format | 2 |
| Minimum reader format | 2 |
| Created-with version | 1.30.0 |
| Media type | application/vnd.sketchforge.project+zip |
A packaged file is a ZIP with a root project.json and binary or JSON payloads below assets/. The archive is validated before restoration. ZIP64 and encrypted entries are not supported.
Serialized document fields
SkfProjectDocumentV1
| Field | Serialized type |
|---|---|
schema | typeof SKF_SCHEMA_ID |
formatVersion | `1 |
minimumReaderVersion | number |
createdWithVersion | string |
metadata | { projectId?: string; projectName: string; units: string; createdAt: string; modifiedAt: string; } |
assets | SkfAssetRecordV1[] |
sceneStateId | string |
states | SkfStateV1[] |
history | { entries: Array<{ stateId: string; selectedObjectIds: string[] }>; index: number; } |
sketches | Array<{ id: string; nodeId: string; objectId: string; sourceNodeId?: string; sourceObjectId?: string; operation?: SketchOperation; extrusionDepth: number; revolve?: SketchRevolveSettings }> |
features | SkfFeatureV1[] |
groups | Array<{ id: string; nodeId: string; objectId: string; memberNodeIds: string[]; operation: string }> |
workplanes | `Array<{ id: string; kind: "base" |
exactCad | Array<{ nodeId: string; objectId: string; brepAssetId?: string; importedStepAssetId?: string }> |
editor | { workspace: WorkplaneWorkspaceSettings; snapGrid: GridSize; selectedWorkplaneId: string; placementElevation: number; placementWorkplane?: PlacementWorkplane; sketchPlacementWorkplane?: PlacementWorkplane; } |
SkfAssetRecordV1
| Field | Serialized type |
|---|---|
id | string |
kind | SkfAssetKind |
path | string |
mediaType | string |
byteLength | number |
sha256 | string |
fileName? | string |
sourceFormat? | ProjectAssetSourceFormat |
SkfShapeNodeV1
| Field | Serialized type |
|---|---|
nodeId | string |
objectId | string |
objectType | `"native" |
workplaneId | string |
definition | Record<string, unknown> |
importedMesh? | SkfImportedMeshReferenceV1 |
groupedShapeNodeIds? | string[] |
edgeTreatmentHistory? | Array<{ id: string; createdAt: number; feature: Record<string, unknown>; appliedFrame?: Record<string, unknown>; beforeNodeId: string; }> |
cadBrepAssetId? | string |
cadDisplayEdgesAssetId? | string |
SkfFeatureV1
| Field | Serialized type |
|---|---|
id | string |
type | string |
outputObjectId | string |
inputObjectIds | string[] |
dependsOnFeatureIds | string[] |
parameters? | Record<string, unknown> |
Reader compatibility
- V2 is the current writer format and requires a reader at least version 2.
- V1 packaged projects are accepted and migrate inline display edges into shared assets on import; the next save writes V2.
- V0 legacy JSON projects are accepted by the explicit migration path, which preserves valid object IDs and history.
- Unsupported future versions are rejected before restoration. The original input bytes are not modified.
Reader safety limits
| Limit | Value |
|---|---|
archiveBytes | 512 * 1024 * 1024 |
expandedBytes | 1024 * 1024 * 1024 |
projectJsonBytes | 64 * 1024 * 1024 |
assetBytes | 256 * 1024 * 1024 |
entries | 4096 |
states | 5001 |
objectsPerState | 100_000 |
features | 300_000 |
meshNumbers | 30_000_000 |
These are engine validation limits, not suggested project sizes. The expanded archive limit applies across entries; assetBytes limits one asset, and projectJsonBytes limits project.json.
Documentation version: 1.30.0 · Repository revision: 1cb9fee8dff4d394684c229dd67a21da539d167f · View source