Sebastian
2dba0158ca
ocs_doc_api: Phase 2b-c (linear Dimension) — Phase 2 complete
...
- CreateDimensionLinear(DimensionSpec) op + GetDimensionMeasurement query (append-only).
- backend add_dimension_linear (Dimension::Linear via DimensionLinear::new) +
dimension_measurement (linear/radius/diameter distance).
- Dimension bounds from measured + definition points; Dimension handle + measurement().
- spec Dimension family; api_reference + binding_schema regenerated; mocks + baseline.
- Test phase2c_dimension_linear_create_measurement_bounds -> 607 host lib + 8 crate
+ 3 consistency green. Phase 2 (full 2D + annotations) is now complete.
2026-09-06 09:43:37 +02:00
Sebastian
ba8e5ed0cd
ocs_doc_api: Phase 2b-b (Hatch)
...
- CreateHatch(HatchSpec) op + GetHatchBoundary query (append-only).
- HatchSpec{boundary: Vec<[f64;2]>, solid}; executor validates >= 3 boundary points.
- backend add_hatch (Line-edge BoundaryPath, solid/pattern) + hatch_boundary
(reconstruct loops from Line edges; non-line edges -> Unsupported).
- Hatch bounds from boundary edges; facade create_hatch + Entity handle.
- spec Hatch family; api_reference + binding_schema regenerated; mocks + baseline.
- Test phase2b_hatch_create_boundary_bounds_delete -> 606 host lib + 8 crate + 3 consistency green.
2026-09-06 09:24:11 +02:00
Sebastian
fc0e2c2c9d
ocs_doc_api: Phase 2b-a (Text/MText annotations)
...
- CreateText/CreateMText/SetTextContent ops + GetTextContent query (append-only).
- backend add_text/add_mtext/set_text_content/text_content (Text.value/MText.value).
- facade create_text/create_mtext + Text/MText handles with content()/set_content().
- Text/MText coarse bounds + transform (insertion point); ensure_transformable.
- spec Text/MText families; api_reference + binding_schema regenerated; mocks.
- can_modify backend hook (exists + not-locked) for SetTextContent validation.
- consistency baseline extended with the appended variants.
- Test phase2b_text_mtext_create_content_transform -> 605 host lib + 3 consistency green.
2026-09-06 09:07:41 +02:00
Sebastian
1925a83a25
ocs_doc_api: spec<->wire consistency + append-only baseline tests
...
Add tests/spec_wire_consistency.rs: (a) every op/query name in spec/entities.toml
maps to an existing Operation/Query variant; (b) both enums are append-only
relative to a recorded variant-order baseline (bincode discriminant stability).
Adds toml to dev-dependencies. 3 tests green.
2026-09-06 08:44:53 +02:00
Sebastian
c74504f30c
ocs_doc_api: fix review findings (scale/rotation/all-or-nothing/DoS/bounds/codegen)
...
CRITICAL:
- transform_entity_geometry: fix s^2 double-scale (axes already carry scale; drop
the *s pre-multiply so 2D entities scale by s like solids), and handle rotation
for direction/angle fields (apply_dir for Ray/XLine direction + Ellipse
major_axis; offset Arc angles; compose Insert rotation).
- ensure_transformable: check layer-lock + resolve solid bodies (not just type),
restoring TransformMany all-or-nothing; regression test with a locked layer.
WARNING:
- volume/centroid: memoize per (handle, geometry_epoch) + cap cold-cache
tessellation budget (query-batch DoS).
- entity_to_profile_curves: fail Unsupported on polyline bulge (no silent
chord-substituted sweep profile).
- Ellipse: validate minor_axis_ratio in (0,1] so bounds never under-bound.
- RasterImage bounds: bracket all four corners (rotated/flipped images).
SUGGESTION:
- binding_schema.json handles derived from spec families (includes ArcCurve/
Ellipse/Spline/Ray/XLine).
- build.rs header: enums are hand-maintained (not 'GENERATED'); ops_gen/query_gen
headers corrected to match.
- Dedupe divergence mesh_volume_centroid into the crate's geom module; host +
both mocks delegate.
Tests: +3 regression tests (scale-once, rotation, locked-layer all-or-nothing)
-> 604 host lib green; 8 crate unit tests green.
2026-09-06 08:36:06 +02:00
Sebastian
fabdeae8bf
ocs_doc_api: make mock backends exhaustive over new Curve2Spec variants
...
Add Arc/Ellipse/Spline/Ray/XLine arms to the test + example mock add_curve
kind matching and the example curve_bounds, so the crate's unit tests and
examples compile against the Phase 2 curve families.
2026-09-06 01:29:51 +02:00
Sebastian
0e18867915
IMPLEMENTATION.md: roadmap status — all 5 phases done (with noted remaining sub-items)
2026-09-06 01:23:25 +02:00
Sebastian
f24c0b2d75
ocs_doc_api: Phase 5 (media & misc, read-mostly)
...
- entity_kind_name names the media/misc families (RasterImage, Table, Leader,
MultiLeader, MLine, Mesh, Helix, Region, Body, Surface, Face3D, Dimension,
Hatch) so GetEntity reports a real kind instead of 'Other'.
- RasterImage coarse bounds (insertion + u*width + v*height).
- Generic delete already works on these families; no typed create in v1
(read-only EntityView per plan).
- spec RasterImage/Table read-mostly families; IMPLEMENTATION.md updated.
- Test phase5_media_entities_read_kind_and_bounds -> 601 host lib green.
2026-09-06 01:22:28 +02:00
Sebastian
7a481c6ce2
ocs_doc_api: Phase 4 (paper-space viewports)
...
- Operation::CreateViewport(ViewportSpec) appended to the wire enum (append-only).
- backend add_viewport (center/width/height/view_target/view_height).
- Viewport bounds (center +- w/2,h/2), transform (moves center), ensure_transformable.
- facade EntityCollection::create_viewport; spec Viewport family; api_reference +
binding_schema regenerated; mocks updated.
- Test phase4_create_viewport_bounds_transform -> 600 host lib green.
- IMPLEMENTATION.md: Phase 4 done (set_view/view-query remaining).
2026-09-06 01:16:31 +02:00
Sebastian
b03f68737e
ocs_doc_api: Phase 3 (block references)
...
- Operation::CreateInsert(InsertSpec) appended to the wire enum (append-only).
- backend add_insert validates the BlockRecord exists (unknown block -> Validation,
no mutation); host inserts acadrust::entities::Insert with scale+rotation.
- Insert transform moves insert_point (transform_entity_geometry) +
ensure_transformable includes Insert.
- facade EntityCollection::create_insert; spec Insert family; api_reference +
binding_schema regenerated; mocks updated.
- Test phase3_create_insert_and_transform -> 599 host lib green.
- IMPLEMENTATION.md: Phase 3 done (attributes/traversal remaining).
2026-09-06 01:05:51 +02:00
Sebastian
d46351cdb3
ocs_doc_api: Phase 0 + Phase 2a (sweep profiles, non-solid transform, full 2D curves)
...
Phase 0 (outstanding supported-family methods):
- add_vertex on LwPolyline (insert vertex, out-of-range validation).
- extrude / revolve from profiles (entity_to_profile_curves: Line/Circle/Arc/
LwPolyline straight-segment conversion -> geom2d::Curve -> brep::extrude/revolve).
- non-solid transform + transform_many via acadrust geometry
(transform_entity_geometry for Line/Circle/Arc/Point/LwPolyline).
- ensure_transformable broadened accordingly (all-or-nothing pre-validation).
Phase 2a (full 2D curve families): ArcCurve/Ellipse/Spline/Ray/XLine.
- Curve2Spec extended (Arc/Ellipse/Spline/Ray/XLine) + create_arc/create_ellipse/
create_spline/create_ray/create_xline facade constructors + handle types.
- entity_kind_name, entity_bounds (Arc coarse, Ellipse major-axis, Spline bbox;
Ray/XLine unbounded), transform_entity_geometry, ensure_transformable extended.
- spec/entities.toml families; api_reference.md + binding_schema.json regenerated.
Tests: +6 doc_api integration tests (phase0_*, phase2_*) -> 598 host lib green.
IMPLEMENTATION.md updated (Phase 0 done, Phase 2a done / 2b remaining).
2026-09-06 00:51:39 +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
Sebastian
4fd94d324a
fix(ipc): read response byte-by-byte in request_with_poll to avoid TCP desync
2026-08-23 10:41:03 +02:00
Hakan Seven
52432af928
build(deps): align codec and kernel revisions
2026-08-23 01:45:29 +03:00
Hakan Seven
ab71c2956b
fix(dwg): integrate AC1015 save fix
...
Refs #828
2026-08-22 00:15:48 +03:00
Hakan Seven
d9aead3fbc
Merge pull request #856 from ramox81/codex/align-circle-behavior
2026-08-21 23:29:57 +03:00
Hakan Seven
a87ca09fa4
Merge pull request #854 from ramox81/codex/align-arc-behavior
2026-08-21 21:41:24 +03:00
ramox81
cfabd2072d
Consume exact circle geometry revision
2026-08-21 16:56:13 +03:00
ramox81
5f9d8a9e0e
Align arc creation and editing behavior
2026-08-21 14:03:58 +03:00
ramox81
ff09fc7800
Implement associative center mark workflow
2026-08-21 12:05:18 +03:00
ramox81
0ae6355c2c
Correct shared center settings behavior
2026-08-21 11:46:12 +03:00
ramox81
eba4fb87a8
Complete associative centerline workflow
2026-08-21 11:01:18 +03:00
Hakan Seven and ramox81
464971969c
feat: complete freehand sketch workflow
...
Co-authored-by: ramox81 <[email protected] >
2026-08-21 00:17:44 +03:00
Hakan Seven
44efb8fd53
feat(frame): complete frame controls
...
Preserve frame geometry for selection while separating viewport and plot visibility across supported reference entities.
Refs #642
2026-08-20 23:37:02 +03:00
Hakan Seven
2a852f4479
feat(gradient): align editing and rendering
2026-08-20 21:17:10 +03:00
ramox81
b7819481f0
Complete wipeout workflow and editing
2026-08-20 17:56:11 +03:00
ramox81
e3bfbf1590
Complete freehand sketch workflow
2026-08-20 16:31:22 +03:00
Hakan Seven
dcedf945ea
feat(spline): correct property semantics
...
Merge PR #824 while keeping periodic and coplanarity geometry in cadkernel.
2026-08-20 12:13:35 +03:00
Hakan Seven
9202297d1b
fix(plugin): trace MText registry enums
2026-08-20 00:26:32 +03:00