18 Commits
Author SHA1 Message Date
Hakan SevenandClaude Opus 5 41ecc0c458 Merge pull request #1423 from felixriestra:pr/python-host-model
The bundled `opencad.python` plugin drives OCS through plugin API v7: all
43 canvas entity kinds, the drawing tables, and OCS's own commands run
step by step. RustPython stays in the plugin process — the plugin crate is
outside the workspace with its own lock file, so the application's own
dependencies are unchanged.

Reconciled with the plugin command work that landed as #1425, which the
branch was written before:

- Both added `impl Drop for PluginProcessInteractiveAdapter`, which git
  merges silently into two impls that do not compile. One body now
  cancels the command and then drops it from the runner, in that order: a
  plugin waiting on a step has to be released before the runner forgets
  the command.
- `execute_command` (#1425) and `run_command` (#1423) are both routes from
  a script to the command line, and only the second was guarded. The
  SCRIPTCOMMANDS switch and the denylist are shared now, so neither route
  is the unguarded one.
- `run_command` dispatched with plugin dispatch still enabled, so a script
  naming a plugin command re-entered the plugin that was blocked waiting
  for it. It sets the suppression flag for the length of the dispatch, as
  `execute_command` does.

The denylist read the command as typed, while the dispatcher resolves
aliases: a user-defined `Q` for `QUIT` (ALIASEDIT writes those) walked
past it. It resolves the alias first.

Also: the active-command comparison ran on every message, a mouse move
included, allocating two strings for names that are already `&'static
str`; SCRIPTCOMMANDS' own messages go through the translation macros; and
`docs/.DS_Store` (now ignored) and an unrelated RTF note about constraint
commands are out of the tree.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-22 23:26:30 +03:00
Hakan SevenandClaude Fable 5.1 ececb0ef8c ci: run the workspace tests on every change; drop the unused flake
- .github/workflows/ci.yml runs `cargo test --workspace --locked` on
  pushes to main and on pull requests, with the Linux libraries the
  release build installs. No formatter check: the tree is not
  rustfmt-clean and stays that way.
- flake.nix, flake.lock and the direnv hook are removed. Nothing used
  them, and their pinned dependency hashes were already stale after the
  codec and kernel bumps.
- Under cfg(test) the "system" language resolves to en-US. The unit
  tests compare English text through one process-wide loader, and every
  apply_config of a default config asked for the system language, so a
  Turkish locale failed 22 tests and parallel tests raced each other
  through a language switch (the thickness-row test found its section
  under one language and looked it up under another).
- The arc grip test follows #1352: the start, end and midpoint grips
  drive the whole arc.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-21 22:21:19 +03:00
Hakan SevenandClaude Fable 5.1 92ce142c03 fix: drop the stray lock fixture; align merged plot code across targets
- tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock was the app's own
  single-instance lock file, committed by accident in #1343; remove it and
  ignore *.ocs.lock.
- load_plotsettings_into_dialog: #1343's refresh_custom_scale_fields borrowed
  self while #1360 still wrote through the plot_dialog borrow; write the
  style error first.
- The wasm list_printers stub returns the Result #1358 gave the native one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-19 23:06:09 +03:00
Matus Mastena 7e816f992e Ignore the worktree directory
Isolated runs check out into .claude/worktrees/. Leaving it untracked
would put a whole second copy of the tree in reach of git add -A.
2026-09-17 16:54:11 +02:00
Matus Mastena ce0788389b Add a Nix flake for the dev shell and package build
The devShell carries the toolchain plus the X11, Wayland, Vulkan,
fontconfig and freetype libraries winit and wgpu dlopen at run time,
and the trunk/wasm-bindgen pair the web build needs. LD_LIBRARY_PATH
is set there too, since a dev binary runs straight out of ./target and
never gets the wrapper the package build applies.

The four git dependencies each need an entry in cargoLock.outputHashes.
They are lib.fakeHash for now; the first `nix build` prints the real
values, and they have to be refreshed whenever a rev in Cargo.toml
moves.
2026-09-17 16:50:46 +02:00
Hakan Seven 9b58ca8a93 Harden parametric sketch constraints 2026-09-11 09:45:57 +03:00
Felix RiestraandClaude Sonnet 5 63a74b19a9 Add persistent sketch-constraint system (ocs_gcs port) and named-parameters handoff docs
Ports FreeCAD's planegcs 2D geometric constraint solver to Rust as a new
crates/ocs_gcs workspace member, and wires it into the document/scene model
as a persistent SketchConstraintSet: Coincident, Horizontal/Vertical,
Parallel/Perpendicular, Equal, Tangent, Distance, Angle and Radius
constraints that re-solve live (including mid-drag, not just on release),
render glyphs and a DOF badge, flag conflicts with a one-click resolver
pill, and round-trip through save/load via an XRecord blob.

Also includes docs/command_reference.md (a statically generated reference
of every registered command and its prompt sequence) and
docs/named_parameters_design.md + docs/backlog.md, which hand off the next
queued feature (a named-parameter/expression table) and consolidate every
deliberate scope-down and open gap found along the way, so a fresh session
has a complete starting point.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-08 22:19:23 +02:00
Hakan Seven bca65600cd fix: stabilize web loading and paper rendering 2026-07-25 21:34:29 +03:00
Hakan Seven deec48ad99 perf: keep heavy work off UI thread 2026-07-25 18:49:18 +03:00
Hakan SevenandClaude Opus 4.8 da7905db61 chore: ignore .claude/launch.json (local preview config)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-18 13:36:35 +03:00
Hakan SevenandClaude Opus 4.8 5af1c9d841 chore: ignore Python __pycache__ (stray automation client cache)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-17 21:05:30 +03:00
Hakan SevenandClaude Opus 4.8 c49ad887b8 fix(wasm): make the web build actually run in the browser
With the wasm bundle building, get it rendering in a browser:

- Enable iced `webgl` so wgpu uses WebGL2 where WebGPU is absent
  (e.g. Firefox by default), and `fira-sans` so UI text has an
  embedded font (the web has no system fonts) — without it every
  label was blank.
- Replace `std::time::Instant` with `iced::time::Instant` (web-safe);
  `Instant::now()` panics ("time not implemented") on wasm and crashed
  at boot via the command line.
- Skip the batched-hatch pipeline on wasm: its bind group needs
  vertex-stage storage buffers, which WebGL2 lacks (validation error
  on "New drawing"). Fields become Option; upload/draw guard on them.
  Hatches don't draw on the web for now; everything else does.
- Fix the trunk feature flag (`data-cargo-no-default-features`) and
  ignore the `dist/` build output.

Native build + 75 tests unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-16 17:53:56 +03:00
Hakan SevenandClaude Opus 4.7 ef1f9a08d6 chore: rename H7CAD to Open CAD Studio
Joining the OpenAEC Foundation (open-aec.com). Crate/struct become
OpenCADStudio, user-facing strings use the spaced "Open CAD Studio"
form, repo URLs point to HakanSeven12/open-cad-studio. Logo (window
icon + assets/logo.svg) redrawn with OCS initials. Drop examples/
binaries — unused.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-23 17:16:15 +03:00
Hakan SevenandClaude Opus 4.7 bebe3374e2 docs: add file-open and render performance roadmap
Tracks planned work for cutting file open time and per-frame render
cost: single-pass entity walk, incremental wire cache, batched wire
pipeline, hardware-instanced block inserts, and profiling spans.
Unignore ROADMAP.md so it's tracked.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-17 21:34:12 +03:00
Hakan SevenandClaude Sonnet 4.6 f470f6ebe2 chore: exclude ROADMAP.md from version control
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-06 23:28:04 +03:00
Hakan SevenandClaude Sonnet 4.6 b013619c25 Chore: ignore ROADMAP.md from version control
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 23:43:51 +03:00
Hakan Seven ff84a5e197 flatpak 2026-03-22 15:48:10 +03:00
Hakan Seven d52c6440ff Initial commit 2026-03-22 14:53:51 +03:00