C#RoslynWebnetDxf STUDIO C# library · .NET WebAssembly · WebGPU ← C# Lab Integration guide ↗
Untitled drawing

Preparing your drawing workspace

The compiler and netDxf library are loading. Progress appears below.

Checking WebGPUDrag to pan · Scroll to zoom · F to fit
Loading application modules…
Compare compiled netDxf geometry

Compile selected netDxf geometry, entity constructors, and color operations to native WebAssembly and JavaScript, then compare real results with managed Wasm. This experiment covers the listed exported methods; the full DXF parser continues to run in .NET WebAssembly.

Runs on demand. The sample drawing is unchanged.
Runtime activity 0 events
Loading application modules…
Use this in your app

Import the reusable library and renderer. Parsing and saving run through the complete managed netDxf assembly; the scene contains the supported display primitives and per-entity issues.

import { createRoslyn } from '../src/browser.js';
import { createNetDxf, createDxfRenderer } from '../src/dxf/index.js';

const compiler = await createRoslyn();
const dxf = await createNetDxf({ compiler });
const document = await dxf.load(new Uint8Array(await file.arrayBuffer()));
const renderer = await createDxfRenderer(canvas);
renderer.setScene(document.scene);
renderer.fit();
const bytes = await document.export({ binary: false });

// When finished: renderer.dispose(); await dxf.dispose(); compiler.dispose();
API, rendering coverage, compiler experiments & limitations ↗