Commit Graph
116 Commits
Author SHA1 Message Date
Hakan Seven 5e91e23752 Update codec and kernel dependencies 2026-09-11 18:52:31 +03:00
Hakan Seven e86c045988 Update codec for DXF ATTRIB angle units 2026-09-11 16:42:57 +03:00
Hakan Seven ba77ee0ea8 Merge pull request #1211 from Ramox81/codex/align-dependent-revisions-20260911 2026-09-11 15:54:07 +03:00
ramox81 d6ca05985c Merge current main while retaining aligned dependency revisions 2026-09-11 15:15:43 +03:00
Hakan Seven 7edf0de603 Merge updated pull request #1188 from Ramox81/pedit-enhancements 2026-09-11 14:55:26 +03:00
ramox81 59fddf119d Update hatch origin and oriented region dependencies 2026-09-11 13:49:37 +03:00
ramox81 41cf6ebb70 Update bounded curve conversion and drawing origin revisions 2026-09-11 12:57:59 +03:00
ramox81 0415a58f37 Update spatial spline and material dependency revisions 2026-09-11 12:38:17 +03:00
Hakan Seven 493c7570ee Update curve editing dependencies 2026-09-11 12:04:55 +03:00
ramox81 d6e88307a0 Align spatial curve editing and nested symbol dependencies 2026-09-11 11:53:42 +03:00
Hakan Seven 376c0eaef1 Update drawing command dependencies 2026-09-11 11:51:07 +03:00
Hakan Seven 8751ece386 Merge pull request #1180 from ramox81/codex/draw-modify-dependency-revisions
Update geometry and codec revisions for drawing commands

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/ocs_doc_api/Cargo.toml
2026-09-11 11:33:02 +03:00
ramox81 3135ec8a35 Use complete curve editing and drawing transparency dependencies 2026-09-11 11:18:20 +03:00
ramox81 e21e83b053 Align drawing commands with geometry and codec revisions 2026-09-11 10:25:38 +03:00
Sebastian fe8397b3cb remove ocs_doc_api crate and DocApi v2 host integration
- Drop crates/ocs_doc_api from workspace and host dependency.
- Remove src/app/doc_api.rs and its module declaration.
- Strip DocApi v2 undo/dispatch plumbing from HostSession.
- Remove HostApi::doc_api_dispatch default method.
- Remove PluginRequest::DocApiRequest / PluginResponse::DocApiResponse.
- Revert plugin API version from 6 back to 5.
2026-09-11 08:07:30 +02:00
Hakan Seven f69f0b32be fix(sectionplane): persist and clip section modes correctly 2026-09-09 20:53:05 +03:00
Hakan Seven 672297e732 chore: update DWG class metadata repair 2026-09-09 10:42:25 +03:00
Hakan Seven 56e09cd3f5 fix(dwg): preserve hatch context loops 2026-09-09 08:23:41 +03:00
Hakan Seven 3fb49c4d3e chore: update DWG database repair stack 2026-09-09 07:23:33 +03:00
Hakan Seven 4ddd19f6e8 feat(mcp): describe complete CAD record schemas 2026-09-09 01:01:44 +03:00
Hakan Seven 8f574c8388 feat(mcp): expose complete drawing records 2026-09-08 23:59:13 +03:00
Hakan Seven 2d55b90b0e chore: update DWG save dependencies 2026-09-08 22:20:07 +03:00
Hakan Seven c5503e4758 Merge PR #1083: implement solid shell workflow 2026-09-08 21:02:01 +03:00
Hakan Seven f611ceb638 Update CAD dependency revisions 2026-09-08 19:34:39 +03:00
Hakan Seven fd3ddc1608 Finish Ramox edge and slice integration 2026-09-08 19:02:08 +03:00
Karim Jerbi 6e01d464e5 fix(workspace): resolve clippy warnings in ocs_plugin_api and ocs_doc_api 2026-09-07 14:52:58 +01:00
Hakan Seven 3385160493 Merge PR #1028: add document API with atomic edits
Add the typed document facade and plugin IPC adapter. Prepare bulk edits
before mutation, preserve undo and dirty state, keep profile elevations,
validate numeric inputs and session bindings, and generate Python constructors
with typed results.

Reuse existing entity transforms and profile conversion. Compute mass
properties and closed-surface bounds in cadkernel; pin its main revision
6a5e6fc2822f6af6b2611cd605b44437b35158f0. Keep plugin API metadata at version 6.

Validation: 646 native application tests, 597 kernel tests, 12 document API
tests, 91 plugin API tests, 3 Python tests, default/IPC feature builds and
wasm32 check passed.
2026-09-06 21:43:02 +03:00
Sebastian 919128e087 ocs_doc_api: fix branch-review findings (tab auth, bulge center, budget, caps, dead code)
CRITICAL:
- execute_doc_api: reject tab_id != bound tab (confused deputy); test
  doc_api_tab_mismatch_is_rejected.
- bulge_arc_segment: fix negative/CW bulge center (apothem magnitude + sign picks
  side; was double-sign-mirrored); test CW-vs-CCW center offset.
- cold-tess budget: move mass_cache/cold_tess_used to per-tab Scene so the budget
  persists across DocApi dispatches (was reset per request); budget-exhausted ->
  approximate meshes.metrics fallback instead of error.

WARNING:
- Loft: add BULK_ITEM_CAP (was uncapped -> unbounded kernel call from one request).
- CreateMany: pre-validate EntitySpec::Curve (ellipse ratio) in prepare phase ->
  all-or-nothing restored; regression test.
- Partial Ellipse: offset start/end_parameter by rot_z on rotation; regression test.
- resolve_body: add with_body borrow accessor (host overrides to borrow cache in
  place, O(1)); bounds() uses it instead of deep-cloning the B-rep per query.
- add_raster_image: validate file path (non-empty, image extension, reject
  UNC/traversal); regression test.

SUGGESTION:
- deploy: bump API_VERSION 5 -> 6 so DocApi plugins are gated at handshake on old
  hosts (append-only wire + defaulted method keep old V2-V5 plugins loading).
- dead code: wire query_name into apply_queries error labels; host uses crate's
  ObjectId::from_handle/to_handle (drop local duplicates); delete is_null/backend_mut.
- mock drift: test mock now stores curve specs + computes curve bounds (aligns with
  example mock); Spline/Dimension bounds delegate to points_aabb.

623 host lib + 8 crate + 3 consistency + 34 plugin_api green.
2026-09-06 16:03:34 +02:00
Sebastian e41086b058 Add ocs_doc_api: object-oriented CAD entity API (v2)
New crate crates/ocs_doc_api: object-centric facade (DocApi -> Document ->
collections -> typed handles), transport-agnostic wire layer (DocApiEnvelope =
single op | read-only query batch), per-op autocommit (no write transactions),
bulk ops with upfront-validation all-or-nothing, structured ApiError, and
build-time codegen (spec/entities.toml -> ops/query enums, api_reference.md,
binding_schema.json).

ocs_plugin_api: append-only PluginRequest::DocApiRequest / PluginResponse::
DocApiResponse (serde_bytes payload) + defaulted HostApi::doc_api_dispatch.

Host: DocApiBackend impl for HostSession (src/app/doc_api.rs) mapping to scene
primitives (solid_models lift-on-miss, register_prepared_solid_model, meshes
metrics), entity conversions (doc_api_convert.rs), HostSession accessors +
doc_api_dispatch override.

Tests: 592 host lib (incl. 7 DocApi integration tests: create/boolean/query,
unknown-id, transform-many all-or-nothing, query-batch cap, 2D/geometric/DWG
roundtrips), 8 crate unit tests. Examples + README/ARCHITECTURE/IMPLEMENTATION docs.
2026-09-06 00:15:27 +02:00
Hakan Seven 7ea4f338f6 fix(render): preserve transparency inheritance
Resolve ByBlock alpha independently from color and keep explicit opaque values from falling back to layer transparency.

Pin the matching cadcodec API across desktop, plugin, and web targets.

Refs HakanSeven12/cadcodec#2
2026-08-31 22:48:57 +03:00
Hakan Seven 72669f58f3 feat(model): complete cone workflow 2026-08-31 22:07:49 +03:00
ramox81 4ba0ea8808 Fix cone silhouettes and history properties 2026-08-31 16:33:10 +03:00
ramox81 00fafb034f Update cone geometry dependencies 2026-08-31 12:00:05 +03:00
Sebastian c60326ad4a Expose XRecord types and bump ocs_plugin_api to 0.2.1 2026-08-30 02:16:49 +02:00
Sebastian 8825ce5274 Expose XDataValue re-export from acadrust xdata module 2026-08-29 22:18:39 +02:00
Hakan Seven 0d766be3df fix(plugins): preserve document path encoding
Keep OS-native path data intact across IPC instead of replacing non-UTF-8 bytes.

Refs #901
2026-08-29 16:00:18 +03:00
Hakan Seven 1c52a2afcf Merge remote-tracking branch 'origin/main' into HEAD 2026-08-29 15:58:18 +03:00
Hakan Seven 2842f6dc58 fix(plugins): gate on_load behind API v5
BREAKING CHANGE: plugins using on_load must target API v5 and declare api_version = 5.

Refs #901
2026-08-29 15:57:26 +03:00
Hakan Seven c527466791 Merge remote-tracking branch 'origin/main' into HEAD 2026-08-29 15:55:50 +03:00
Hakan Seven 466ab99c63 fix(plugins): enforce rustc compatibility
BREAKING CHANGE: API v4+ plugin packages must declare the exact rustc version used to build the binary.

Refs #901
2026-08-29 15:54:41 +03:00
Sebastian 4668042df5 fix(plugins): compare rustc version tokens instead of concatenating
Tightens the rustc compatibility gate so that whitespace-normalised

version strings are compared token-by-token. This prevents a corner case

where 'rustc 1.98.0' and 'rustc1.98.0' would be considered equal.
2026-08-29 11:29:41 +02:00
Sebastian 996f6f7299 feat(plugins): add BuiltinPlugin::on_load lifecycle callback
OpenCADStudio/plugins#901 (comment)

- Add BuiltinPlugin::on_load(&mut self, host: &mut dyn HostApi) with a default
  no-op implementation so existing plugins remain source-compatible.
- Invoke on_load once for V4 plugins immediately after the runner connects
  and before entering the request loop, giving plugins a HostApi surface to
  cache plugin_request_sender() or set up worker threads before any dispatch.
- V2/V3 plugins are unchanged: HostApi is only available during dispatch.
2026-08-29 11:12:33 +02:00
Sebastian 09ba67bfd1 feat(plugins): expose document path to plugins via HostApi
OpenCADStudio/plugins#901 (comment)

- Add HostApi::document_path(tab_id) returning Option<PathBuf>.
- Add PluginRequest::DocumentPath and PluginResponse::DocumentPath for
  out-of-process plugins.
- Implement the request in the IPC server and in both V3/V4 plugin-side
  HostApi proxies.
- Implement HostSession::document_path by looking up the tab by id and
  returning its current_path.
2026-08-29 11:09:31 +02:00
Sebastian ed3e064a47 feat(plugins): include rustc version in plugin compatibility gate
OpenCADStudio/plugins#901

- Record the host's rustc --version output in the embedded version_info.json.
- Add rustc_version/rustc_declared/rustc_compatible to plugin manifests and
  release metadata, mirroring the existing acadrust gate.
- Reject API v4+ plugins whose declared rustc differs from the host, with a
  clear one-line error message.
- Propagate the rustc gate through the marketplace, install flow, and UI.
- Update plugin architecture docs to describe the new ABI metadata.
2026-08-29 10:34:47 +02:00
Hakan Seven 81e7add1dd fix(tolerance): complete workflow integration
Sync current main and companion codec changes before preserving unsupported frame rows, rendering in the entity plane, and sharing final layout metrics with placement preview.
2026-08-27 00:14:08 +03:00
Hakan Seven 1e1eeea527 feat(plugin): gate dependency mismatches 2026-08-25 08:12:13 +03:00
Sebastian 3d35919656 feat(plugin): gate marketplace and load on acadrust source
- Add host_acadrust_source and source-hash comparison helpers to ocs_plugin_api.

- Track acadrust_source and acadrust_declared in ExternalPlugin/ReleaseInfo.

- Apply repo-level policy: if any release in a repo declares acadrust_source, undeclared v4+ releases from that repo are incompatible.

- Preserve API v2/v3 backwards compatibility: legacy undeclared releases stay installable.

- Update Plugin Manager UI to only offer compatible releases and show 'acadrust mismatch' status.

- Drop acadrust_version from gate logic; only acadrust_source is required.
2026-08-24 19:01:06 +02:00
Hakan Seven 06cd0ec6a9 feat(model): add exact solid modelling tools 2026-08-23 22:53:31 +03:00
Hakan Seven 94f5971fdb docs(ipc): clarify polled response reads 2026-08-23 13:23:26 +03:00
Sebastian a67affcb93 fix(ipc): preserve stream shutdown on interrupt during polled reads 2026-08-23 10:46:27 +02:00