Initial commit: cad-building-showcase skill
Agent-led CAD-drawing → 3D web showcase pipeline. Inspects CAD reports, maps layers/floors, extracts a normalized building spec (with block-probed glazing and audit gates), builds Blender/trimesh GLB variants, and assembles a Three.js web viewer. Includes XREF-shell detection and a regression test. Large inputs/outputs (work/, outputs/, source_cad/, renders) are gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
118
references/a208_case_notes.md
Normal file
118
references/a208_case_notes.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# A208 Case Notes
|
||||
|
||||
These notes capture the proven workflow from the A208 CAD-to-3D exploration. Use them as calibration, not as hardcoded constants.
|
||||
|
||||
## Source Set
|
||||
|
||||
The test project used 11 DWG floor-plan drawings from an XREF folder:
|
||||
|
||||
- A202 basement
|
||||
- A205 basement mezzanine
|
||||
- A208 main building 1F/2F
|
||||
- A209 main building 3F/4F
|
||||
- A210 main building 5F/6F
|
||||
- A211 main building 7F/8F
|
||||
- A212 main building roof
|
||||
- A213 auxiliary building 1F
|
||||
- A214 auxiliary building mezzanine
|
||||
- A215 auxiliary building 2F
|
||||
- A216 auxiliary building roof
|
||||
|
||||
DWG versions were AutoCAD 2004/2007-era files.
|
||||
|
||||
## Conversion and Reading
|
||||
|
||||
- FreeCAD 1.0.2 CLI existed at `/Applications/FreeCAD.app/Contents/Resources/bin/freecadcmd`.
|
||||
- FreeCAD DXF import was brittle on LibreDWG-generated DXF because of `999` comment records and unsupported CAD entities such as `HATCH`, `VIEWPORT`, and `DIMENSION`.
|
||||
- `libredwg` `dwg2dxf` plus `ezdxf` was the robust read path.
|
||||
- Sanitizing DXF `999` comment pairs made files more compatible with other importers.
|
||||
|
||||
## Useful Layer Signals
|
||||
|
||||
For A208, useful layers included:
|
||||
|
||||
- `I-WALL`, `A-WALL`, `L-SITE-WALL`: walls
|
||||
- `S-COLS`: columns
|
||||
- `S-STRS`, `S-STRS-MBND`: beams/structure
|
||||
- `A-FLOR`, `A-FLOR-OVHD`: floor detail
|
||||
- `S-GRID`: structural grid
|
||||
|
||||
Avoid treating dimensions, hatches, text, and annotation layers as 3D geometry unless the goal is a drawing overlay.
|
||||
|
||||
## A208 Split and Alignment
|
||||
|
||||
A208 placed 1F and 2F side by side in one drawing. The working split used x=0 in source millimeter coordinates:
|
||||
|
||||
- Left side: 1F
|
||||
- Right side: 2F
|
||||
- 2F alignment shift: about `-158029.255 mm` in X
|
||||
|
||||
This shift was inferred from grid/plan alignment. It should not be reused for other drawings without checking grids.
|
||||
|
||||
## Extraction Details That Improved Quality
|
||||
|
||||
The A208-specific script handled:
|
||||
|
||||
- `LINE`
|
||||
- `ARC`
|
||||
- `CIRCLE`
|
||||
- `LWPOLYLINE`
|
||||
- `SPLINE`
|
||||
|
||||
It also used category-specific minimum segment lengths:
|
||||
|
||||
- walls: `0.25 m`
|
||||
- columns: `0.18 m`
|
||||
- beams: `0.35 m`
|
||||
- floor lines: `0.40 m`
|
||||
- grid: `1.0 m`
|
||||
|
||||
This filtered CAD noise better than one global line-length threshold.
|
||||
|
||||
## Showcase Model Result
|
||||
|
||||
The A208 massing/showcase model contained:
|
||||
|
||||
- floors: 2
|
||||
- Blender scene objects: 17
|
||||
- GLB and preview render generated successfully
|
||||
- Web viewer verified on desktop and mobile
|
||||
- Web controls verified: floor toggles, category toggles, explode slider, section slider, camera presets, screenshot, GLB download
|
||||
|
||||
This is best described as Web showcase / LOD100-150-like massing visualization, not BIM.
|
||||
|
||||
## Full-Building Presentation Calibration
|
||||
|
||||
The later full-building run expanded the workflow from a two-floor proof to a multi-floor Web presentation model. Treat these as calibration decisions, not constants:
|
||||
|
||||
- Use `generate_footprints: true`, `use_footprint_slabs: true`, and `use_footprint_roofs: true` when the user expects a complete interior/exterior presentation.
|
||||
- Include `columns` in `footprint_categories` when column rows define platform or podium extents that wall/glazing linework misses.
|
||||
- Keep `slab` enabled by default for presentation/digital-twin views. Use a display `slab_thickness` around `0.35-0.40 m`, double-sided Web materials, and opacity high enough that slab edges read through glazing.
|
||||
- Keep in-scene floor labels/text off by default; CAD text-like transparent planes clutter the model and are not needed when the Web UI already names floors.
|
||||
- For generated roof caps, use the roof floor's own `footprint_from` source. Broadly unioning lower floor footprints can create roof plates that protrude into empty areas.
|
||||
- For 1F/podium columns, require an upper plate plus nearby upper structure before keeping them full height. Shorten unsupported display columns unless there is CAD evidence that they are freestanding architectural elements.
|
||||
- Produce three Web variants for delivery: `overview` for fast browsing, `standard` as the default visible model, and `detail` for extraction review.
|
||||
|
||||
## IFC Proof Result
|
||||
|
||||
The IFC proof generated:
|
||||
|
||||
- `IfcBuildingStorey`: 2
|
||||
- `IfcSlab`: 2
|
||||
- `IfcWall`: 320
|
||||
- `IfcColumn`: 160
|
||||
- `IfcBeam`: 160
|
||||
- `IfcPropertySet`: 643
|
||||
- `IfcExtrudedAreaSolid`: 642
|
||||
|
||||
Geometry extraction succeeded with zero failures in the tested run. This validates a BIM-feasibility route, but still does not prove production BIM replacement.
|
||||
|
||||
## Blender IFC Viewing
|
||||
|
||||
The tested Blender 5.1.1 environment did not have a direct IFC import operator or Bonsai/BlenderBIM installed. The working visualization route was:
|
||||
|
||||
1. Generate IFC with IfcOpenShell.
|
||||
2. Extract IFC product geometry with IfcOpenShell.
|
||||
3. Render extracted meshes in Blender.
|
||||
|
||||
Use Bonsai/BlenderBIM only when installed and compatible with the current Blender Python version.
|
||||
Reference in New Issue
Block a user