Repository navigation
Conversation
This was referenced Oct 16, 2026
Open
tests/CADability.WasmSmoke builds CADability.dll into a .NET WebAssembly program and runs it under Node.js, the runtime a browser front end uses. Without a frame and without GDI+ it registers a font from bytes, builds a solid with a boolean operation, measures a text and a picture, paints the model through an IPaintTo3D of its own (as a browser renderer would), saves and reads JSON, opens project files of 1.x with pictures and page settings, imports STEP, exports DXF and STL, and runs the finalizers. The renderer implements IPaintTo3D as it is, with Bitmap and FontStyle in its signatures: naming GDI+ types is fine in the browser, only creating GDI+ objects fails. This shows that the browser does not need the breaking step 8 of #412. On master, 7 of the 13 checks fail with PlatformNotSupportedException from System.Drawing.Common; with the open #412 pull requests all pass. The project needs no workload and is not part of CADability.sln. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5
dsn27
force-pushed
the
integration/issue-412
branch
from
October 16, 2026 08:14
a0e12b1 to
28591f9
Compare
dsn27
force-pushed
the
test/wasm-smoke
branch
from
October 16, 2026 08:14
51d079d to
efdfdb1
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #412 (step 9, verification).
Base: this PR targets
integration/issue-412, because it needs both the font service (#466 → #472) and the picture and page setup changes (#473, #474), which are only combined there. Its own diff is just the smoke test. Retarget it tomasteronce those PRs are merged.Why
The goal of #412 is that CADability runs in the browser. So far that was argued, not shown. This PR runs
CADability.dllin the browser runtime of .NET (WebAssembly, under Node.js) in every Linux CI run.What
tests/CADability.WasmSmokeis a .NET 10 WebAssembly program (Microsoft.NET.Sdk.WebAssembly). It referencesCADability.csprojand runs 13 checks, without a frame and without GDI+:RecordingPaintTo3D, anIPaintTo3Dof its own that replays display lists, and check the painted extentVolumes.cdb.jsonThe exit code is the number of failed checks. A new step in
linux-ci.ymlbuilds the program and runs it withnode, which is preinstalled on the runner.Result
master(checks adapted to the old API)PlatformNotSupportedExceptionfrom System.Drawing.Common for text, picture and finalizers, and failures that follow from themintegration/issue-412What this shows for the plan
IPaintTo3Dworks in the browser.RecordingPaintTo3Dimplements the interface unchanged, includingPrepareBitmap(Bitmap)andText(…, FontStyle, …). Naming GDI+ types in signatures is fine there; only creating GDI+ objects fails. So a browser front end can be written against the 1.x API, and the breaking step 8 (dropping System.Drawing.Common) is not needed for the browser.IPaintTo3Dhas onlyBitmapmembers for images (0 bitmap calls in the run). Showing the image itself needs the optional image interface discussed for Make CADability.dll platform independent: remove GDI+ from the core, porting the ShapeIt work #412; that is a separate PR.Notes
CADability.sln, so building the solution in Visual Studio does not require the WebAssembly SDK.CADability.dllor its public API.Testing
Locally on Linux:
dotnet build -c Releaseandnode bin/Release/net10.0/wwwroot/main.mjsgive "All checks passed." and exit code 0. The same program againstmastergives exit code 7.🤖 Generated with Claude Code
https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5
Generated by Claude Code