Diagram Generation
Convex-λ automatically generates cutting instructions (diagrams) for every script execution. This diagram includes the Pavilion and Crown tiers, index settings, and angles.
Metadata (Info Struct)
You can customize the diagram's header information (Author, Title, Footnote, etc.) by defining a special info variable in your script.
You can use either = or := assignment.
info = {
title: "My Brilliant Cut",
author: "Jane Doe",
date: "2024-03-20",
footnote: "Best cut in RI 1.76"
}
Supported Fields
| Field | Description |
|---|---|
title | The main title displayed at the top of the diagram. Defaults to the script filename if omitted. |
author | Displayed below the title. |
date | A date string displayed in the header. |
footnote | Small italic text displayed at the bottom of the diagram (useful for copyright, specific instructions, or material notes). |
Tier Sorting & Splitting
The diagram generator automatically organizes facets into "Pavilion" and "Crown" sections based on their geometric position.
- Crown: Facets facing generally "Up" (Z > 0).
- Pavilion: Facets facing generally "Down" (Z <= 0).
Tiers are listed in the order they appear in your code (or the order they are constructed), preserving your specific cutting sequence.
Gear & Indexes
The diagram automatically detects the gear setting from your code using the Gear(N) directive (e.g., Gear(96)).
- Index conversions are automatic.
- The diagram displays the specific gear number used (e.g., "Gear: 96").
Refractive Index (RI)
The diagram also displays the Refractive Index (RI) used for the stone, helping you verify that the design matches the intended material. This is taken from your RI(n) setting.
Printing
Click the Print button in the diagram panel to open a clean, printer-friendly version of the cutting instructions, including:
- Metadata headers
- Formatted tables for Pavilion and Crown
- Wireframe views (Top, Bottom, Side, Perspective)