Releases: gemmology-dev/cdl-parser
Releases · gemmology-dev/cdl-parser
v2.0.0 - CDL v2.0
CDL v2.0 - Major Release
New Features
- Amorphous materials:
amorphous[subtype]:{shapes}syntax for non-crystalline materials (opal, obsidian, pearl, etc.) - Nested growth:
>operator for overgrowth/phantom relationships (right-associative) - Aggregates:
~operator for crystal clusters, druse linings, parallel growth (6 arrangement types) - Group-level twins:
| twin(law)on individual form groups within expressions - Feature definitions: Edge case handling for
@feat = [feature:value]definitions
New Models
AmorphousDescription- for non-crystalline materialsNestedGrowth- overgrowth relationshipsAggregateSpec- crystal aggregate arrangements
New Constants
AMORPHOUS_SUBTYPES: opalescent, glassy, waxy, resinous, cryptocrystallineAMORPHOUS_SHAPES: massive, botryoidal, reniform, stalactitic, mammillary, nodular, conchoidalAGGREGATE_ARRANGEMENTS: parallel, random, radial, epitaxial, druse, clusterAGGREGATE_ORIENTATIONS: aligned, random, planar, spherical
Breaking Changes
parse_cdl()now returnsCrystalDescription | AmorphousDescription(union type)FormNodetype expanded:CrystalForm | FormGroup | NestedGrowth | AggregateSpecFormGroupgains optionaltwin: TwinSpec | Nonefield
Tests
- 239 tests (was 163, +76 new)
v1.3.0
CDL Parser v1.3.0 - Composition & Structure
New Features
- Form grouping with parenthesized expressions:
({111} + {100})[phantom:3] - Form labels for documenting form purpose:
prism:{10-10}@1.0 - Named definitions with
@name = expressionand$namereferences flat_forms()method for backwards-compatible flat form list extraction- FormGroup and FormNode types for tree-structured AST
Breaking Changes
CrystalDescription.formstype changed fromlist[CrystalForm]tolist[FormNode]- Use
desc.flat_forms()for backwards-compatible access
Bug Fixes
- Fixed ruff lint errors (UP007, F401)
- Fixed mypy type errors in parser and CLI
- Applied ruff formatting
v1.0.1
v1.0.0
Initial release of gemmology-cdl-parser.
Features
- Crystal Description Language (CDL) parser with zero dependencies
- Support for all 7 crystal systems and 32 point groups
- Miller index notation (3-index {hkl} and 4-index {hkil})
- Form combinations with scaling factors
- Modifications (truncation, beveling, etc.)