Skip to content

Add licenses for third-party dependencies: DOMPurify, html2canvas, an… - #103

Merged
devaraj3 merged 1 commit into
mainfrom
feat/2d-drawing-generation
Aug 21, 2026
Merged

Add licenses for third-party dependencies: DOMPurify, html2canvas, an…#103
devaraj3 merged 1 commit into
mainfrom
feat/2d-drawing-generation

Conversation

@devaraj3

Copy link
Copy Markdown
Owner

Generate standards-compliant 2D engineering drawings from any loaded 3D model,
with full manual layout control and true-size PDF export.

What it does

Adds a "Generate 2D Drawing" flow producing an A4 landscape sheet with
third-angle Front/Top/Right projections, an isometric reference view,
automatic dimensioning, notes, and an editable title block — exported as a
print-accurate PDF.

Drawing generation

  • Third-angle projection with locked view alignment (Top above Front,
    Right beside Front on a shared centreline)
  • Automatic dimensioning via a sheet-wide DimensionPlan: each feature+axis
    is dimensioned exactly once, assigned to whichever view shows it most
    directly
  • Stepped/counterbored hole detection, size-grouped callouts (e.g. 6X ⌀3.0),
    shared dimension lines for exact-coincident values
  • Leader lines with landing shoulders and arrowheads, full-circumference
    angular routing for radial feature clusters
  • ISO 5457 sheet layout: 20mm filing margin / 10mm others, grid reference
    frame (top and right on A4), centring marks
  • Drafting-standard spacing from a single constants module — 10mm first
    dimension line offset, 10mm parallel spacing, 1.5mm extension gap,
    2.5mm overshoot

Scale

  • Anchored selection: 1:1 evaluated first, stepping down the standard
    reduction series only when the view-outline rule (250 × 145mm) or the
    usable-page overflow guard fails
  • Manual override with standard ratios, red-bordered warning with hover
    detail when a chosen scale overflows

Editing

  • Modal viewer with zoom (100–400%, manual entry, pannable)
  • Adjust Drawing: whole composition, or Top / Right / isometric individually
    with projection-correct constraints
  • Adjust Annotations: per-dimension repositioning constrained to each
    dimension's valid axis; captions; delete individual dimensions
  • Optional numbered notes block with in-place editing (max 8 × 100 chars),
    draggable with collision constraints
  • Spreadsheet-style editable title block: insert/delete/merge/split/resize,
    logo upload or generated name avatar, auto-populated non-editable
    SCALE and SIZE fields

Export

  • True-size A4 PDF (297 × 210mm) via jsPDF (MIT) — prints dimensionally
    accurate at 100%
  • Vector line work and selectable text throughout; isometric embedded at
    300+ DPI
  • Editor-only UI excluded; all manual adjustments captured

Notes

  • Automated sheet validation (sheet-checker.ts) is present but disabled
    behind a flag — manual adjustment covers layout correction
  • Known open: coaxial stepped-bore size callouts can overlap on parts with
    several bores sharing one centre (e.g. flange test part); adjustable
    manually

…d jsPDF

- Added DOMPurify_LICENSE.txt for the DOMPurify library, detailing its dual licensing under MPL-2.0 and Apache-2.0.
- Added HTML2CANVAS_LICENSE.txt for the html2canvas library, including its MIT License.
- Added JSPDF_LICENSE.txt for the jsPDF library, also under the MIT License.
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cad-viewer Ready Ready Preview Aug 21, 2026 4:44pm

@devaraj3
devaraj3 merged commit 0cfd6f7 into main Aug 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant