You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi 👋 — taking a swing at this in a fork. Working branch + draft PR in our fork: AdrianPerez3/editor#1 (branch claude/feat/dxf-import-issue-158).
What's in it
A new workspace package @pascal-app/dxf-importer (MIT, built on dxf-parser) plus an "Import DXF / DWG" button in the Settings panel. Picking a .dxf:
Sniffs format — .dwg is rejected with a sonner toast pointing at the free ODA File Converter
Parses + classifies layers (multilingual: AIA, plain English, German Allplan, French AFNOR, Spanish, Italian, Japanese SXF, Chinese CJK, curtain wall) with a (?:[-_]|$) boundary policy that avoids WALLPAPER/DOORHANDLE false positives
Resolves units: $INSUNITS → $MEASUREMENT fallback → bbox heuristic, with a persistent toast on the result
Creates WallNodes, snaps INSERT blocks to the nearest wall (placeOpenings) → DoorNode/WindowNode with wallId for the wall CSG cutout pipeline
Renders non-wall entities as an SVG-backed GuideNode 2D underlay
Whole batch wrapped in useScene.temporal.pause()/resume() → Cmd/Ctrl+Z reverts the entire import as one step
Numbers
152 vitest tests passing across 11 files (parser correctness, layer regex, bulge tessellation, false-positive boundaries, end-to-end)
Wall defaults match Pascal's existing native 2.5 m × 0.1 m (wall-tool.tsx:11, wall-panel.tsx:122)
CI workflow added (.github/workflows/dxf-importer-tests.yml)
Real-shaped fixtures: Revit metric, SketchUp imperial-quirk, Civil 3D unitless, L-shaped house with door INSERTs
Comlink-backed Web Worker for files >5 MB ships in apps/editor/lib/ (wired but not yet consumed by the button — activation note in INTEGRATION.md)
DWG
Phase A (reject + ODA pointer) ships now. Phase C (server-side conversion via CloudConvert / Aspose.CAD Cloud) is documented in INTEGRATION.md as a follow-up. Skipped LibreDWG because it's GPL-3.0 and AutoCAD APS Model Derivative because it doesn't actually output DXF (verified — only SVF/OBJ/STL/STEP/IGES/FBX/IFC/glTF/PDF).
Honestly NOT verified
Door/window rotation sign — [0, -wallAngleY, 0] is best-guess; needs a browser eye to confirm openings aren't mirrored
GuideNode plane scaling against the existing renderer
Layer-mapping table UI is deferred (auto-classify covers ~75-80% per the research; long tail belongs in a follow-up)
Happy to rebase, address review feedback, or split into smaller PRs if the maintainers prefer. Five focused commits, each independently reviewable.
Maintainer update, with a concrete path for @AdrianPerez3's work and an answer for @KongNan.
The architecture we want for format importers already exists in the repo, and DXF should follow it. IFC landed as two pieces:
packages/ifc-converter — pure conversion logic. Parses the format, maps onto @pascal-app/core node schemas, emits scene-graph JSON. No DOM, no React.
apps/ifc-converter — a standalone web app: drop zone, extracted-element inspector, live @pascal-app/viewer preview, JSON download.
That split is deliberate and it's why IFC could ship while still being explicitly early alpha. The conversion is independently testable, the format's heavy dependency stays out of the editor bundle, and — the part that matters most for a sprawling format — users get to inspect what was extracted before importing, instead of a button that silently produces a wrong building.
DXF has exactly the same properties as IFC here: a loose standard, wildly varying real-world exports, and no way to be confident a given file converted correctly. So the ask for this issue is packages/dxf-converter + apps/dxf-converter, mirroring the IFC pair.
@AdrianPerez3 — that's mostly a re-targeting of what you already have, not a rewrite: @pascal-app/dxf-importer is already a separate workspace package built on dxf-parser, which is the right instinct and the bulk of the work. Two changes to land it here:
Move the UI out of the editor's Settings panel into a standalone apps/dxf-converter. This also resolves @KongNan's problem — the Settings gear on editor.pascal.app is the hosted app's, which isn't in this repo, so a button added to the OSS editor's settings won't appear where they were looking. A standalone app has no such ambiguity.
Split pure conversion from UI if it isn't already, so the mapping onto core node schemas can be unit-tested without a DOM. bun run test is CI-gating the suite as of ci: run the test suite in CI #548, so tests on real-world DXF fixtures are the thing that makes this maintainable.
5,296 lines across 52 files is a lot to review in one PR against this repo. If you open it as packages/dxf-converter first (conversion + tests, no UI), I'll review that on its own and we can add the app in a follow-up. Rejecting .dwg with a clear message rather than half-supporting it is the right call — worth stating in the README the way the IFC one does.
@ngiotta on native .dwg: it's a closed binary format with no viable open parser, so conversion to DXF or IFC first will stay the realistic path.
Labeling enhancement + help wanted. Related: #174 (Sweet Home 3D) is the same importer shape.
Housekeeping index for the format-import cluster, since these keep getting opened in parallel and each one rediscovers the same architecture. Linking them here rather than filing a new meta-issue:
The shape every one of these should follow is the one IFC already proved, and it's written down in apps/ifc-converter/README.md — read that before starting, it's shorter than this comment:
packages/<fmt>-converter — pure conversion. Bytes in, { nodes, rootNodeIds, stats } out, shaped against @pascal-app/core schemas. No DOM, no React, so it's unit-testable against fixture files and publishable on its own.
apps/<fmt>-converter — a standalone web app for the UI: drop zone, extracted-element inspector, preview in the real @pascal-app/viewer, JSON download.
Two things that shape decisions and aren't obvious until you're deep in it:
Don't add a converter button to the editor's Settings panel. That was the one structural change requested on the DXF fork. The standalone-app split is what lets a converter ship as early-alpha with an honest "expect rough edges" banner without that caveat leaking into the editor's own UI.
Bring a fixture file, not just a parser. IFC is a sprawling, loosely-followed standard and DXF is no better — the converters that hold up are the ones with real-world exports checked in as tests. feat(ifc): preserve unsupported IFC geometry #553 is a good example of the shape: conversion logic and its tests in the same PR.
Nothing here changes the status of any of these threads. Keeping #158 open as the DXF/DWG one.
Activity
kleenkanteen commentedon Mar 26, 2026
seems complex to get a 3D design from 2D plans. would be a long term feature
ngiotta commentedon Apr 27, 2026
It would disrupt the architect/draftsman profession in a very positive way if .dwg files could be imported natively.
feat(dxf-importer): tighten layer regex, add $MEASUREMENT fallback, D…
feat(editor): wire DXF import button into settings panel (issue pasca…
AdrianPerez3 commentedon Apr 30, 2026
Hi 👋 — taking a swing at this in a fork. Working branch + draft PR in our fork: AdrianPerez3/editor#1 (branch claude/feat/dxf-import-issue-158).
What's in it
A new workspace package @pascal-app/dxf-importer (MIT, built on dxf-parser) plus an "Import DXF / DWG" button in the Settings panel. Picking a .dxf:
Sniffs format — .dwg is rejected with a sonner toast pointing at the free ODA File Converter
Parses + classifies layers (multilingual: AIA, plain English, German Allplan, French AFNOR, Spanish, Italian, Japanese SXF, Chinese CJK, curtain wall) with a (?:[-_]|$) boundary policy that avoids WALLPAPER/DOORHANDLE false positives
Resolves units: $INSUNITS → $MEASUREMENT fallback → bbox heuristic, with a persistent toast on the result
Creates WallNodes, snaps INSERT blocks to the nearest wall (placeOpenings) → DoorNode/WindowNode with wallId for the wall CSG cutout pipeline
Renders non-wall entities as an SVG-backed GuideNode 2D underlay
Whole batch wrapped in useScene.temporal.pause()/resume() → Cmd/Ctrl+Z reverts the entire import as one step
Numbers
152 vitest tests passing across 11 files (parser correctness, layer regex, bulge tessellation, false-positive boundaries, end-to-end)
Wall defaults match Pascal's existing native 2.5 m × 0.1 m (wall-tool.tsx:11, wall-panel.tsx:122)
CI workflow added (.github/workflows/dxf-importer-tests.yml)
Real-shaped fixtures: Revit metric, SketchUp imperial-quirk, Civil 3D unitless, L-shaped house with door INSERTs
Comlink-backed Web Worker for files >5 MB ships in apps/editor/lib/ (wired but not yet consumed by the button — activation note in INTEGRATION.md)
DWG
Phase A (reject + ODA pointer) ships now. Phase C (server-side conversion via CloudConvert / Aspose.CAD Cloud) is documented in INTEGRATION.md as a follow-up. Skipped LibreDWG because it's GPL-3.0 and AutoCAD APS Model Derivative because it doesn't actually output DXF (verified — only SVF/OBJ/STL/STEP/IGES/FBX/IFC/glTF/PDF).
Honestly NOT verified
Door/window rotation sign — [0, -wallAngleY, 0] is best-guess; needs a browser eye to confirm openings aren't mirrored
GuideNode plane scaling against the existing renderer
Layer-mapping table UI is deferred (auto-classify covers ~75-80% per the research; long tail belongs in a follow-up)
Happy to rebase, address review feedback, or split into smaller PRs if the maintainers prefer. Five focused commits, each independently reviewable.
KongNan commentedon May 16, 2026
Help! AdrianPerez3#1 (comment)
Aymericr commentedon Aug 4, 2026
Maintainer update, with a concrete path for @AdrianPerez3's work and an answer for @KongNan.
The architecture we want for format importers already exists in the repo, and DXF should follow it. IFC landed as two pieces:
packages/ifc-converter— pure conversion logic. Parses the format, maps onto@pascal-app/corenode schemas, emits scene-graph JSON. No DOM, no React.apps/ifc-converter— a standalone web app: drop zone, extracted-element inspector, live@pascal-app/viewerpreview, JSON download.That split is deliberate and it's why IFC could ship while still being explicitly early alpha. The conversion is independently testable, the format's heavy dependency stays out of the editor bundle, and — the part that matters most for a sprawling format — users get to inspect what was extracted before importing, instead of a button that silently produces a wrong building.
DXF has exactly the same properties as IFC here: a loose standard, wildly varying real-world exports, and no way to be confident a given file converted correctly. So the ask for this issue is
packages/dxf-converter+apps/dxf-converter, mirroring the IFC pair.@AdrianPerez3 — that's mostly a re-targeting of what you already have, not a rewrite:
@pascal-app/dxf-importeris already a separate workspace package built ondxf-parser, which is the right instinct and the bulk of the work. Two changes to land it here:apps/dxf-converter. This also resolves @KongNan's problem — the Settings gear oneditor.pascal.appis the hosted app's, which isn't in this repo, so a button added to the OSS editor's settings won't appear where they were looking. A standalone app has no such ambiguity.bun run testis CI-gating the suite as of ci: run the test suite in CI #548, so tests on real-world DXF fixtures are the thing that makes this maintainable.5,296 lines across 52 files is a lot to review in one PR against this repo. If you open it as
packages/dxf-converterfirst (conversion + tests, no UI), I'll review that on its own and we can add the app in a follow-up. Rejecting.dwgwith a clear message rather than half-supporting it is the right call — worth stating in the README the way the IFC one does.@ngiotta on native
.dwg: it's a closed binary format with no viable open parser, so conversion to DXF or IFC first will stay the realistic path.Labeling
enhancement+help wanted. Related: #174 (Sweet Home 3D) is the same importer shape.Aymericr commentedon Aug 5, 2026
Housekeeping index for the format-import cluster, since these keep getting opened in parallel and each one rediscovers the same architecture. Linking them here rather than filing a new meta-issue:
help wanted— @AdrianPerez3 has a fork branch; the reshaping needed to land it is in my comment abovehelp wanted, no work startedpackages/ifc-converter+apps/ifc-converterThe shape every one of these should follow is the one IFC already proved, and it's written down in
apps/ifc-converter/README.md— read that before starting, it's shorter than this comment:packages/<fmt>-converter— pure conversion. Bytes in,{ nodes, rootNodeIds, stats }out, shaped against@pascal-app/coreschemas. No DOM, no React, so it's unit-testable against fixture files and publishable on its own.apps/<fmt>-converter— a standalone web app for the UI: drop zone, extracted-element inspector, preview in the real@pascal-app/viewer, JSON download.Two things that shape decisions and aren't obvious until you're deep in it:
Nothing here changes the status of any of these threads. Keeping #158 open as the DXF/DWG one.