Brings the IFC-to-Pascal converter into the monorepo as a pure-logic package plus a Next.js app, replacing the standalone repo that consumed published @pascal-app/* packages (and drifted from their schemas). packages/ifc-converter — pure conversion. Parses IFC via web-ifc and maps elements onto @pascal-app/core node schemas (workspace-linked, so no more version drift). Builds doors/windows, walls, slabs, columns, roofs, stairs, sites/buildings/levels. Validates each node via the real Zod schemas at build time (tryParse) and strips undefined metadata. apps/ifc-converter — the UI: drop zone, example picker, element search, JSON download, and a 3D preview rendered through the real @pascal-app/viewer (registry bootstrap + read-only scene) with a custom toolbar (camera/level/wall/grid/theme), level selector with camera-focus, auto-fit, and selection bridged to an inspector. Conversion specifics worth noting: - Door/window vertical centering (height/2; windows + sill). - Nearest-wall hosting fallback for files lacking IFCRELFILLSELEMENT, preferring walls long enough to contain the opening and clamping the along-wall position so cutouts can't overflow and break wall CSG. - Plain IFCWALL (Brep/mapped geometry) falls back to default height/thickness instead of collapsing to zero-height slivers. - Columns convert as plain structural shafts (no decorative base/capital) sized from the IFC profile. - Beams + items are skipped for now (no Pascal beam type; items need a catalog asset) — counted in the conversion summary. Large example IFCs are fetched from a public bucket at runtime; the four small ones are committed. web-ifc.wasm is copied into public/ on install/dev/build. README flags early-alpha + invites contributions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1001 B
TypeScript
34 lines
1001 B
TypeScript
import type { NextConfig } from 'next'
|
|
|
|
const nextConfig: NextConfig = {
|
|
logging: {
|
|
browserToTerminal: true,
|
|
},
|
|
transpilePackages: [
|
|
'three',
|
|
'@pascal-app/core',
|
|
'@pascal-app/ifc-converter',
|
|
'@pascal-app/nodes',
|
|
'@pascal-app/viewer',
|
|
],
|
|
turbopack: {
|
|
resolveAlias: {
|
|
react: './node_modules/react',
|
|
three: './node_modules/three',
|
|
'@react-three/fiber': './node_modules/@react-three/fiber',
|
|
'@react-three/drei': './node_modules/@react-three/drei',
|
|
},
|
|
},
|
|
// web-ifc ships a WASM module. Serving it from the same origin as the
|
|
// app keeps `WebAssembly.instantiateStreaming` happy with strict CSP /
|
|
// module-MIME-type checks. The standalone repo copied the file into
|
|
// public/; we do the same on first dev/build via a postinstall step
|
|
// (see scripts/copy-web-ifc-wasm.mjs).
|
|
webpack: (config) => {
|
|
config.experiments = { ...config.experiments, asyncWebAssembly: true }
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|