Feat: implement CTB/STB plot style table with PDF export integration
- src/io/plot_style.rs: PlotStyleTable and PlotStyleEntry data structures; CTB reader (deflate/zlib decompressed text format) with ACI→RGB and ACI→lineweight lookup; CTB writer (zlib compressed); LW_TABLE constant - src/io/pdf_export.rs: accept optional PlotStyleTable; apply ACI color and lineweight overrides during PDF rendering - src/scene/wire_model.rs: add `aci: u8` field to carry ACI index - src/scene/render.rs: render_style() now returns ACI alongside RGBA - src/scene/mod.rs + tessellate.rs: propagate aci through wire building - app: PlotStyleLoad/Loaded/Clear messages and handlers; PLOTSTYLE LOAD | CLEAR | STATUS command; active_plot_style state on H7CAD - flate2 added as dependency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
911e36ba04
commit
1db3ad6a33
11 changed files with 429 additions and 28 deletions
|
|
@ -44,6 +44,8 @@ pub struct WireModel {
|
|||
pub pattern: [f32; 8],
|
||||
/// Rendered line width in screen pixels (half-width = line_weight_px / 2).
|
||||
pub line_weight_px: f32,
|
||||
/// ACI color index (1-255). 0 means true-color or unknown (no CTB lookup).
|
||||
pub aci: u8,
|
||||
/// Pre-baked snap candidates (Center, Node, Quadrant, Insertion).
|
||||
pub snap_pts: Vec<(glam::Vec3, SnapHint)>,
|
||||
/// Per-segment tangent geometry for Tangent snap.
|
||||
|
|
@ -67,6 +69,7 @@ impl WireModel {
|
|||
points,
|
||||
color,
|
||||
selected,
|
||||
aci: 0,
|
||||
pattern_length: 0.0,
|
||||
pattern: [0.0; 8],
|
||||
line_weight_px: 1.0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue