Commit Graph
2889 Commits
Author SHA1 Message Date
ramox81 43f97a3bcb Use analytic chamfer kernel support 2026-09-08 16:06:52 +03:00
ramox81 8822371e18 Complete CHAMFEREDGE workflow and history 2026-09-08 15:45:10 +03:00
ramox81 ed8cddc556 Pin analytic pcurve serialization and spherical corner fixes 2026-09-08 14:16:30 +03:00
ramox81 53bd85d8a0 Use kernel corner and analytic profile fillets 2026-09-08 14:00:22 +03:00
ramox81 d426012660 Execute command scripts through full input runner 2026-09-08 13:52:18 +03:00
ramox81 8bb6703c70 Complete FILLETEDGE workflow and history 2026-09-08 12:36:49 +03:00
gianlucafiore febedad916 Merge pull request #1061 from gianlucafiore/fix/fillet-lines
fix(fillet): improve line and polyline fillets
2026-09-07 19:51:29 -03:00
gianlucafiore 4e46deee49 feat(fillet): add polyline fillet option 2026-09-07 19:46:43 -03:00
gianlucafiore cbfdcd9ecd fix(fillet): support parallel line fillets 2026-09-07 18:48:18 -03:00
gianlucafiore 0cd0662bf7 Merge pull request #1060 from gianlucafiore/fix/issue-1050-hatch-stretch
fix(hatch): refresh associative hatch during geometry edits
2026-09-07 18:19:25 -03:00
gianlucafiore b7c2ce2e13 fix(hatch): refresh associative hatch during geometry edits 2026-09-07 18:18:36 -03:00
Hakan Seven 67163de15d Update kernel for reliable wall opening cuts 2026-09-07 20:27:42 +03:00
Hakan Seven ce68999cf9 Set the default Cargo binary 2026-09-07 19:47:38 +03:00
Hakan Seven 6b527cb0e5 Merge remote-tracking branch 'origin/main' 2026-09-07 19:34:47 +03:00
Hakan Seven d35a93c6e8 Avoid reserved MCP session argument 2026-09-07 19:34:31 +03:00
Karim Jerbi d988a09987 feat(render): split mixed polyline bulge arcs into GPU analytical curves and tag benchmark 2026-09-07 17:22:01 +01:00
Hakan Seven 8922a5a25b Merge updated PR #1055 2026-09-07 19:10:55 +03:00
Hakan Seven e51c4d0932 Merge updated origin/main 2026-09-07 19:01:54 +03:00
Hakan Seven 8f2b2586ac Update paper size coverage 2026-09-07 18:58:27 +03:00
Hakan Seven ceaf9ebe5b Merge PR #1055: handle macOS Finder document opens 2026-09-07 18:53:29 +03:00
Felix RiestraandClaude Sonnet 5 a39c7b8f71 macOS launcher: re-assert Accessory policy after handling an event
Handling a document-open Apple Event (a warm "Open With" while the app
is already running) silently promotes this process from
NSApplicationActivationPolicyAccessory to a normal foreground app —
confirmed with lsappinfo, not assumed: its own entry flips from
type="UIElement" to type="Foreground" the instant it handles a second
Apple Event (a cold launch's own first event doesn't trigger this).
That gave the launcher its own, contentless Dock icon sitting next to
the real editor's, both apparently "the same app" to the user but
actually two separate Dock entries.

Re-set Accessory explicitly right after relaying, in the one place
every open (cold fallback, document open, and reopen-while-running)
already funnels through.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-07 17:51:23 +02:00
Hakan Seven d5047b49d9 Merge PR #1053: complete INTERSECT behavior 2026-09-07 18:43:49 +03:00
Hakan Seven 7c2a4d63ff Merge PR #1051: complete SUBTRACT behavior 2026-09-07 18:36:04 +03:00
Hakan Seven 050fbb0a6b Merge PR #1045: complete UNION behavior 2026-09-07 18:36:04 +03:00
Hakan Seven 0a7dfe6066 Merge PR #1044: match visible LOFT options 2026-09-07 18:35:53 +03:00
Hakan Seven 96eeb9c29d Merge PR #1040: inset glyph atlas UVs 2026-09-07 18:35:53 +03:00
Hakan Seven e889864855 Merge PR #1036: add paper sizes 2026-09-07 18:35:44 +03:00
Felix RiestraandClaude Sonnet 5 24e9a7663d macOS launcher: handle reopen while already running with no window
Quitting the real GUI binary (Cmd+Q) leaves the launcher itself still
running — that's by design, so it can keep relaying opens for the
session. But reopening the app afterward (Dock icon, double-clicking
it in Finder again) reactivates that same long-lived launcher process
rather than triggering a fresh cold launch, since Launch Services
still considers the bundle running. Neither of the delegate methods
already handled covered that: applicationDidFinishLaunching: only
fires once, at the launcher's own original cold start, and
application:openURLs: only fires when a document was named. The net
effect: the Dock icon would appear, but no window ever showed.

applicationShouldHandleReopen:hasVisibleWindows: is exactly the
callback AppKit fires for this reactivation case. Reproduced and
verified the fix against the real sequence (cold launch, kill only the
GUI process to simulate Cmd+Q, reopen) rather than assuming it from
the delegate method's docs alone.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-07 17:34:57 +02:00
Karim Jerbi e603ef6104 test(bench): add end-to-end analytical rendering benchmark 2026-09-07 16:14:17 +01:00
Felix RiestraandClaude Sonnet 5 e767507850 macOS: add a launcher shim so a cold Finder open also works (#1039)
The previous commit's Apple Event handler only ever catches an open
sent to an already-running process. A cold double-click (app not
running yet) still failed: every registration point tried inside the
real binary — before app::run(), on the Subscription's first poll,
even the literal first statement of main() — reliably caught a warm
open but never the original cold-launch event. A raw
AEInstallEventHandler in a separate, minimal, non-AppKit process (no
winit/iced, just a manual CFRunLoopRunInMode pump) still missed it
too, ruling out "the real binary's heavy dependency graph loading
before main() wins the race" as the explanation.

What does reliably catch a cold launch, verified against real
Finder-equivalent opens: a from-scratch NSApplication with its own
delegate implementing application:openURLs: — in a process where we
own setDelegate: from the start, with no contention over the single
delegate slot winit already claims. That has to be a separate process
from the real GUI binary (only one -[NSApplication run] call can own a
process), so src/bin/ocs_launcher.rs is now the .app's actual
CFBundleExecutable: a small, dependency-light binary (no iced, wgpu,
or cadkernel) whose only job is to catch the open and relay it.

Relaying by replacing this process's image (exec, same PID) or by
spawning a child and exiting turned out to both be dead ends: Launch
Services tracks "the running instance of this bundle" by the
Application Serial Number it handed out to whichever process it
actually launched — this launcher, not whatever it execs into or
spawns. Once the launcher's own ASN stopped pointing at a live,
listening process, every later open Finder tried to deliver silently
went nowhere (measured with lsappinfo against a real second "Open
With", not assumed). So the launcher now stays running for the app's
session — invisible, via NSApplicationActivationPolicyAccessory, since
it owns no window — and relays every open (cold or warm) over the same
channel a second CLI invocation already uses: io::single_instance.

That relay only worked once single_instance's rendezvous key stopped
being computed from the running executable's own path. That was fine
when one binary always did the job, but the launcher and the real
binary are different executables and independently computed different
ports, so they could never find each other. Anchor the key on the
enclosing .app bundle instead, shared by both.

packaging/build_macos_signed.sh and .github/workflows/release.yml now
build ocs_launcher and place it at Contents/MacOS/OpenCADStudio (the
CFBundleExecutable Info.plist already names), with the real GUI binary
renamed to Contents/MacOS/OpenCADStudio-App alongside it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-07 16:45:02 +02:00
Felix RiestraandClaude Sonnet 5 b617734d5c macOS: catch a Finder open aimed at the already-running app (#1039)
Double-click / "Open With" never puts the file on argv — Finder always
delivers it as a kAEOpenDocuments Apple Event instead, which nothing in
this app listened for, so it just showed "cannot open files in this
format" even though the file association itself was registered
correctly.

The standard fix, implementing application:openURLs: on this app's own
NSApplicationDelegate, isn't available here: winit already installs
its own delegate to own window/lifecycle events, NSApplication has
exactly one delegate slot, and winit's class doesn't implement the
open-document method.

This bypasses the delegate protocol and registers directly with the
lower-level Apple Event Manager (AEInstallEventHandler) instead — the
same mechanism AppKit's delegate forwarding is itself built on, and
independent of who owns the delegate. Registration happens on the
iced Subscription's first poll rather than in main() before app::run()
— registering earlier gets silently overwritten by winit's own
NSApplication startup, confirmed by testing against a real `open -a`
rather than assumed from Apple's docs.

This handles a file opened while the app is already running. A cold
launch (app not running yet) needs a different mechanism, in the
following commit.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-07 16:44:44 +02:00
Karim Jerbi 75ec08dc55 feat(render): GPU analytical curve extraction for multi-arc polylines and blocks 2026-09-07 14:59:50 +01: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
Karim Jerbi 822b0afce5 Convert polyline bulge segments to analytical TangentGeom::Arc
- Add bulge_arc_to_tangent helper to convert 2D BulgeArc into a 3D
  TangentGeom::Arc preserving center, plane axes, radius, and CCW sweep angles.
- Replace full TangentGeom::Circle emission with TangentGeom::Arc across
  LwPolyline and Polyline2D paths.
- Enables single-arc polylines to be extracted and rendered as analytical
  GPU arcs with circle.wgsl.
- Add unit test verifying single bulge polyline extracts as analytical GPU
  arc.
2026-09-07 14:48:56 +01:00
Karim Jerbi 73cd759ca4 Extend GPU analytical circle and arc rendering to block inserts
- Emit transformed analytical curves (circles, arcs, ellipses) in block
  expansion as standalone wires rather than merging them into batched line
  strips.
- Keep render_instance unset on analytical curves in block prototypes so
  they route directly to CircleGpu / EllipseGpu instead of BlockWireGpu.
- Support TangentGeom::Circle in extract_circle_instance and wire partitioning.
- Drop analytical tangents on wires clipped by xclip so clipped geometry
  falls back correctly to line segments.
- Add unit test verifying block circles and arcs extract as analytical GPU
  instances.
2026-09-07 14:43:38 +01:00
Karim Jerbi 690971c44e Make tessellation memo and resident wire set zoom-independent
With GPU analytical rendering handling circles, arcs, and ellipses,
tessellation geometry is now camera- and zoom-independent.

- Remove wpp from the tessellation memo guard hash to prevent clearing
  all cached entities when zooming across quantization bands.
- Remove quantized_wpp from resident_wire_key and resident_wires_for
  so all zoom levels reuse the cached resident set directly with zero
  CPU re-tessellation.
- Fix clippy slice_from_raw_parts lint in dwg-thumbnailer without suppression.
- Update zoom test to assert Arc pointer equality across camera zooms.
2026-09-07 14:32:55 +01:00
ramox81 1e118b2e90 Complete exact INTERSECT behavior 2026-09-07 16:32:01 +03:00
Karim Jerbi dd061a55ed perf(render): single-pass viewport wire classification and partitioning
- Add fast classify_wire to bypass circle/ellipse extraction for the 95%+ of wires that are straight/polylines.
- Implement single-pass partition_wires extracting regular wires, mesh edges, block wires, circles, and ellipses in one traversal.
- Upload circle and ellipse instances directly from pre-extracted buffers in PersistentWireArena and build_wire_buffers without redundant iteration.
2026-09-07 13:55:16 +01:00
Karim Jerbi 0425f979f9 feat(render): GPU analytical rendering for circles, arcs, and ellipses
- Render planar circles, circular arcs, ellipses, and elliptical arcs analytically via GPU-instanced screen-space quads and WGSL shaders.
- Implement exact arc sweep clamping with round end caps matching the CAD wire shader.
- Implement robust Newton-Raphson closest-point solver for ellipses with isotropic screen-space derivative anti-aliasing.
- Integrate into wire pipeline and PersistentWireArena upload paths.
- Remove unused mesh_volume_centroid function in doc_api.
2026-09-07 13:50:12 +01:00
ramox81 eb83e551b8 Make Solid History choices editable 2026-09-07 15:05:45 +03:00
ramox81 04a9a1b0a0 Complete SUBTRACT behavior 2026-09-07 13:58:31 +03:00
ramox81 5857ffa2bd Align UNION solid properties palette 2026-09-07 12:02:59 +03:00
ramox81 a59ea47990 Complete UNION command behavior 2026-09-07 11:27:03 +03:00
ramox81 822a7138c5 Match visible LOFT command options 2026-09-07 09:41:25 +03:00
codallos 91e94dc693 Simplify glyph atlas UV calculation 2026-09-06 20:38:56 -06:00
codallos bd6447d930 Inset glyph atlas UVs to prevent texture bleeding 2026-09-06 19:50:55 -06:00
Juan Diego 2954e385a9 Merge branch 'HakanSeven12:main' into add-paper-sizes 2026-09-06 21:25:02 -03:00
juan 4eb656e946 add-paper-sizes 2026-09-06 19:57:24 -03:00
Hakan Seven 143703d809 Improve website translations and favicons; disable push workflows 2026-09-07 01:19:39 +03:00
Hakan Seven d66e89ca19 Complete application localization across all supported languages 2026-09-07 01:05:02 +03:00