Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

2.2 KB
Raw Blame

In-memory Firmament project snapshots

FirmamentProjectSnapshot accepts one explicit .firmasm or .firmament root and a finite map of project-relative Firmament source, STEP text assets and an optional firmament.lock.toml. AssemblyM1Pipeline.CompileProject(snapshot) resolves Include declarations and LoftFile/SectionChainFile sources from that map. Paths use /, normalize . and .., and reject paths outside the project root. The local CompileFile path remains available for CLI use.

This compiler entry point can materialize the canonical Cartesian lamp assembly and its shade from two in-memory source strings. The browser SDK now accepts projectDocuments beside sourceName for Assembly and Scene compilation, routing to the existing retained compilation owners. Helios's local showcase uses that path for the canonical ATLAS, guitar and house projects. Browser language analysis also accepts projectRoot and projectDocuments for Assembly project context. This source-snapshot API does not introduce multi-file cloud persistence.

The module graph resolves .firmament and .firmasm dependencies, including extensionless locators, typed short includes and Inventory Records. Inventory locators resolve relative to the declaring document. Existing snapshot project-root-relative include spellings remain a fallback when the document-relative target is absent. Supplied .step/.stp text assets work with STEP Part/Assembly imports, ExternalStep occurrences and InlineStep. Missing assets reject; compilation never falls back to the local filesystem. Optional firmament.lock.toml text is included in the same immutable map and enforced by the module loader. A snapshot represents STEP text as UTF-8 bytes, not an arbitrary original binary encoding.

An AST-owned dependency graph replaces regex include discovery. Legacy includes retain declaration composition through a source-mapped adapter; Inventory imports bind named exports in separate modules. Dependency hashes identify all resolved source documents, and Inventory/resource/syntax diagnostics retain their declaring file and span. Downstream engineering readers still contain source adapters, so complete generated-source navigation across every lowerer is not yet qualified.