13 Commits
Author SHA1 Message Date
Hakan SevenandClaude Opus 5.5 5139e04c2c test: UI snapshot tests render with tiny-skia
iced_test renders headless through wgpu by default. Several test threads
opening GPU devices at once crashed the driver: about every other
parallel `cargo test --lib` run died with SIGSEGV, always with the
color picker, ribbon, overlay and dock UI tests running together. With
ICED_TEST_BACKEND=tiny-skia the suite passes run after run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:29:48 +03:00
Hakan SevenandClaude Opus 5.5 03b01e818b fix(release): give rustc 1.99 enough stack; Windows build fails fast
rustc 1.99 overflows its default 8 MB stack compiling the crate in
release on Windows and macOS. Raise RUST_MIN_STACK to 64 MB in the cargo
config and the release workflow (the latter also covers rebuilding older
commits). The Windows Build step now runs in bash so a failed cargo build
stops the job instead of surfacing later as a missing exe at signing.
workflow_dispatch gains tag/commit inputs to rebuild a published release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:42:55 +03:00
Hakan SevenandClaude Opus 5.5 f537aff75c feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph
The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 07:34:23 +03:00
Karim Jerbi 66fccc217e fix(test): resolve test runner thread stack overflow and JSON path formatting
Fix two test failures affecting CI and local test runs:

1. Cross-platform test runner thread stack overflow:
   In debug builds (opt-level = 0), `app.view(wid)` constructs the entire Iced UI
   widget tree (ribbon, tool panels, palettes, command line, status bar).
   Because libtest spawns test worker threads without setting an explicit stack
   size, the default thread stack allocated by the OS (2MB on Linux glibc, 1-2MB
   on Windows) overflows during recursive un-inlined view construction in
   `app::automation::tests::test_pline_line_then_arc`.
   - Set `[env] RUST_MIN_STACK = "8388608"` in `.cargo/config.toml` so `cargo test`
     allocates 8MB per test thread across all platforms (Linux CI, macOS, Windows).
   - Wrapped `test_pline_line_then_arc` in an explicit 8MB thread via
     `std::thread::Builder` to guarantee immunity even when invoked without env vars.

2. Windows temporary path formatting in JSON payload:
   In `app::update::page_setup_import::tests::psetupin_imports_named_setups_from_a_saved_drawing`,
   interpolating `source.display()` directly into a raw JSON string resulted in
   unescaped backslashes from Windows paths, causing JSON deserialization to fail.
   Replaced backslashes with forward slashes to ensure cross-platform valid JSON strings.
2026-09-24 10:22:02 +01:00
Karim Jerbi 612124b84b feat(ui): implement themed 5-section ribbon object color dropdown 2026-09-15 13:54:56 +01:00
Karim Jerbi 84e95e4781 Configure 16 MB stack reserve on Windows for debug builds 2026-09-08 13:16:49 +01:00
Hakan Seven f9e7afdee2 fix(build): scope Windows debug stack
Apply /STACK only to the debug app binary instead of every Windows target artifact.
2026-08-17 22:46:50 +03:00
Sebastian fcffa13693 fix(build): increase Windows debug stack
Increase the Windows debug executable stack reserve to prevent startup overflow.
2026-08-17 22:40:45 +03:00
Hakan Seven 40b41f9814 fix(locale): stabilize web options
Embed debug locales and expand the WebAssembly stack so modal construction remains responsive. Keep the Options scrollbar in its own lane and refine Turkish CAD terminology.
2026-08-02 23:14:48 +03:00
Hakan SevenandClaude Opus 4.8 88450f0cd1 fix(web): keep wasm target_features section so wasm-opt accepts bulk-memory
The release profile's strip = true (added in #324) strips the wasm
target_features custom section. Without it, wasm-opt can't tell that
bulk-memory is enabled and rejects the module's memory.fill/copy ops
("operations require bulk memory"), failing the release web build — the
newer Rust toolchain now emits those ops by default. Override strip only
for the wasm target with -Cstrip=none, so native release binaries stay
stripped while the wasm keeps its feature section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 09:36:43 +03:00
Hakan SevenandClaude Opus 4.8 dee5a05652 fix(text): address PR #180 review
Follow-up cleanups on the merged TTF-fill work:

- Drop the unconditional resolve_text_style log line — it fired for every
  text style and spammed ~7k stderr lines opening a single real drawing.
- Drop the per-glyph tessellation-error eprintln; a malformed font would
  otherwise log once per character. The glyph still falls back silently.
- Tessellate glyph fills with the nonzero winding rule (lyon defaults to
  even-odd, which mis-fills TrueType outlines whose contours overlap).
- Make the sysfont prefix fallback deterministic (sorted) and require ≥3
  chars so a 1–2 letter request can't grab an arbitrary family.
- Remove the unrelated windows-gnu --exclude-all-symbols linker flag that
  slipped into .cargo/config.toml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 00:27:40 +03:00
Karim Jerbi 627761b629 fix(text): render TTF glyphs as solid fills, fix font fallback, correct Z-order
Text elements previously rendered as hollow wireframe outlines and sometimes
fell back to the wrong system font due to case-sensitive exact matching. Also,
the viewport background grid drew on top of solid entities.

Case-insensitive and partial-name fallback matching (e.g., mapping "arialn"
to "Arial Narrow") is now added to `sysfont::canonical_family_name`, ensuring
text resolves to the correct installed system font.

TrueType font contours are now triangulated into solid fills (`fill_tris`)
using `lyon_tessellation` in `ttf_glyph.rs`. To prevent the GPU from misclassifying
this 2D text as a 3D mesh (which broke flat shading), text tessellation splits
the output into separate outline and fill `WireModel`s.

The background grid is extracted from `SelectionCanvas` into `GridCanvas` and
moved beneath the 3D viewport to ensure proper layering. Finally, `DepthBiasState`
is enabled on all face/fill pipelines to apply a polygon offset, perfectly
resolving Z-fighting between coplanar wireframe lines and solid faces.
2026-06-25 18:17:01 +01:00
Hakan SevenandClaude Opus 4.8 44fa9df278 build(web): restore the wasm build — gate native-only deps off wasm
The web build had bit-rotted: native-only features added since it last
compiled pulled crates that don't build for wasm32-unknown-unknown.

- printpdf (PDF export / printing) → native-only target; the web build gets
  stub export_pdf / print_wires. It pulls a wasm-incompatible memchr 1.0.2
  via lopdf → nom_locate, and the web has no filesystem.
- getrandom 0.3 (via ahash via acadrust) → enable its wasm_js feature and add
  the matching --cfg getrandom_backend rustflag in .cargo/config.toml.
- ocs_plugin_api "host" feature (out-of-process plugin runtime: interprocess,
  libloading, memmap2, rkyv) → native-only target; the web gets the
  dependency-free manifest/ribbon contract. The host code was already
  wasm-gated; only the Cargo wiring pulled it in unconditionally.

`trunk build --release` succeeds again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 14:11:18 +03:00