Skip to main content

Crate indicatrix_formats

Crate indicatrix_formats 

Source
Expand description

Readers and writers for gemstone faceting design file formats.

indicatrix-formats is an independent, unaffiliated implementation of file formats originating with GemCAD (Robert Strickland’s faceting-design software) and Gem Cut Studio. It is not produced or endorsed by either. Each format lives in its own module so that reading (or writing) a design never requires pulling in a particular renderer, database, or GUI toolkit:

  • asc: GemCAD’s .asc cutting-instructions text format. Read and write support, verified against a real-world corpus of 5,759 files.
  • native: apps/indicatrix-cut’s own self-contained .isdd design file (native::design; files saved as .indicatrix before are read the same way) – the on-disk schema, TOML encode/decode and path rules for a text file that carries a whole design, including state .asc itself has no field for. Converting to and from the actual in-memory editor design is indicatrix-cut-core’s job, not this module’s – see its own module doc comment for the split.
  • gcs: Gem Cut Studio’s .gcs XML design format, per the format published in the Gem Cut Studio User’s Manual v1.1.0 (pp. 58-61). Read support (all 59 corpus files), conversion to .asc cutting instructions, and an experimental writer.
  • gem: GemCAD’s native .gem binary save format. A structural decoder (facet planes, tiers, labels, polygons, trailer, preform section) that frames all 254 corpus files byte-exactly, plus conversion to .asc cutting instructions that reproduces exact .asc exports to 6 decimals.

Each format module pulls in only what it needs: asc, gcs, and gem have zero runtime dependencies, while native depends on serde/toml (its on-disk encoding) and sha2 (its attachment hashes) – see that module’s own doc comment. Anything shared across more than one format’s module belongs at this crate root rather than inside a single format module: the Windows-1252 text decoding the .gem and .gcs readers share lives in a private encoding module.

Modules§

asc
GemCAD’s .asc cutting-instructions text format – read and write.
gcs
Gem Cut Studio’s .gcs XML design format – read, convert, experimental write.
gem
GemCAD’s native .gem binary save format – structural decoder.
native
apps/indicatrix-cut’s own .isdd design file format (the earlier .indicatrix extension is still read).