Add Properties-panel Constraints/Parameters sections, a constraint-pill

value toggle, and redesigned constraint-ribbon icons

Properties panel:
- New "Parameters" section (shown with no selection) listing every named
  parameter with inline name/formula editing, add, and delete, backed by
  new PropValue::ParamRow/ParamAddRow and command_driver handlers
  (resolve_named_parameter_edit, on_prop_param_commit/_delete/_add_new).
  A fresh parameter's formula now defaults to "1", not "0" — a 0-length
  seed value is a genuine solver singularity for a Distance constraint
  driven by that parameter, with no defined direction to grow back out of.
- New "Constraints" section (shown for a single selected entity) listing
  every constraint touching it as a clickable PropValue::EntityLink that
  selects the linked entities in the viewport, danger-tinted when the
  constraint conflicts.

Constraint pills:
- New Options > General toggle, "Show values and parameter names on
  constraint markers" (on by default, persisted). Off, every pill shows
  just its bare glyph instead of glyph+driven-value/parameter-name — the
  glyph alone is enough to see a constraint is present, without the value
  text covering nearby geometry on a dense sketch.

Constraint-ribbon icons:
- Replaced all 18 unicode/letter glyph icons (including the plain "F",
  "L", "M", "S" letters) with proper SVGs under assets/icons/constrain/,
  matching the Modify section's two-color style (#B4B6B9 white / #6DB7ED
  blue, consistent stroke width). Tangent reuses the Draw section's
  white-arc-plus-blue-dots motif.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-10 23:16:11 +02:00
1 parent faf3473b2b
commit bd9a2d08f7
36 files changed
+707 -26

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ pub mod coincident_tool {
ToolDef {
id: "CCONSTRAINT",
label: "Coincident",
icon: IconKind::Glyph("≡"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/coincident.svg")),
event: ModuleEvent::Command("CCONSTRAINT".to_string()),
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ pub mod equal_distance_tool {
ToolDef {
id: "EDCONSTRAINT",
label: "Equal Distance",
icon: IconKind::Glyph("≐"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/equal_distance.svg")),
event: ModuleEvent::Command("EDCONSTRAINT".to_string()),
}
}
@@ -24,7 +24,7 @@ pub mod center_point_tool {
ToolDef {
id: "CPCONSTRAINT",
label: "Center Point",
icon: IconKind::Glyph("⊕"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/center_point.svg")),
event: ModuleEvent::Command("CPCONSTRAINT".to_string()),
}
}
@@ -36,7 +36,7 @@ pub mod midpoint_tool {
ToolDef {
id: "MPCONSTRAINT",
label: "Midpoint",
icon: IconKind::Glyph("M"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/midpoint.svg")),
event: ModuleEvent::Command("MPCONSTRAINT".to_string()),
}
}
@@ -48,7 +48,7 @@ pub mod point_on_curve_tool {
ToolDef {
id: "OCCONSTRAINT",
label: "Point on Curve",
icon: IconKind::Glyph("∈"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/point_on_curve.svg")),
event: ModuleEvent::Command("OCCONSTRAINT".to_string()),
}
}
+11 -11
View File
@@ -8,7 +8,7 @@ pub mod horizontal {
ToolDef {
id: "HCONSTRAINT",
label: "Horizontal",
icon: IconKind::Glyph("—"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/horizontal.svg")),
event: ModuleEvent::Command("HCONSTRAINT".to_string()),
}
}
@@ -20,7 +20,7 @@ pub mod vertical {
ToolDef {
id: "VCONSTRAINT",
label: "Vertical",
icon: IconKind::Glyph("│"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/vertical.svg")),
event: ModuleEvent::Command("VCONSTRAINT".to_string()),
}
}
@@ -32,7 +32,7 @@ pub mod parallel {
ToolDef {
id: "PCONSTRAINT",
label: "Parallel",
icon: IconKind::Glyph("∥"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/parallel.svg")),
event: ModuleEvent::Command("PCONSTRAINT".to_string()),
}
}
@@ -44,7 +44,7 @@ pub mod perpendicular {
ToolDef {
id: "QCONSTRAINT",
label: "Perpendicular",
icon: IconKind::Glyph("⊥"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/perpendicular.svg")),
event: ModuleEvent::Command("QCONSTRAINT".to_string()),
}
}
@@ -56,7 +56,7 @@ pub mod equal {
ToolDef {
id: "ECONSTRAINT",
label: "Equal",
icon: IconKind::Glyph("="),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/equal.svg")),
event: ModuleEvent::Command("ECONSTRAINT".to_string()),
}
}
@@ -68,7 +68,7 @@ pub mod tangent {
ToolDef {
id: "TCONSTRAINT",
label: "Tangent",
icon: IconKind::Glyph("⌒"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/tangent.svg")),
event: ModuleEvent::Command("TCONSTRAINT".to_string()),
}
}
@@ -80,7 +80,7 @@ pub mod concentric {
ToolDef {
id: "NCONSTRAINT",
label: "Concentric",
icon: IconKind::Glyph("◎"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/concentric.svg")),
event: ModuleEvent::Command("NCONSTRAINT".to_string()),
}
}
@@ -100,7 +100,7 @@ pub mod normal {
ToolDef {
id: "NRCONSTRAINT",
label: "Normal",
icon: IconKind::Glyph("⊾"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/normal.svg")),
event: ModuleEvent::Command("NRCONSTRAINT".to_string()),
}
}
@@ -112,7 +112,7 @@ pub mod colinear {
ToolDef {
id: "LCONSTRAINT",
label: "Colinear",
icon: IconKind::Glyph("L"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/colinear.svg")),
event: ModuleEvent::Command("LCONSTRAINT".to_string()),
}
}
@@ -124,7 +124,7 @@ pub mod fixed {
ToolDef {
id: "FXCONSTRAINT",
label: "Fixed",
icon: IconKind::Glyph("F"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/fixed.svg")),
event: ModuleEvent::Command("FXCONSTRAINT".to_string()),
}
}
@@ -136,7 +136,7 @@ pub mod symmetric {
ToolDef {
id: "SYCONSTRAINT",
label: "Symmetric",
icon: IconKind::Glyph("S"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/symmetric.svg")),
event: ModuleEvent::Command("SYCONSTRAINT".to_string()),
}
}
+2 -2
View File
@@ -57,7 +57,7 @@ pub mod distance_tool {
ToolDef {
id: "DCONSTRAINT",
label: "Distance",
icon: IconKind::Glyph("↔"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/distance.svg")),
event: ModuleEvent::Command("DCONSTRAINT".to_string()),
}
}
@@ -69,7 +69,7 @@ pub mod angle_tool {
ToolDef {
id: "ACONSTRAINT",
label: "Angle",
icon: IconKind::Glyph("∠"),
icon: IconKind::Svg(include_bytes!("../../../../assets/icons/constrain/angle.svg")),
event: ModuleEvent::Command("ACONSTRAINT".to_string()),
}
}