Interactive demo for building a reinforcing stirrup with nCAD, exporting an IFC representation, and previewing it in the browser.
The app asks the nCAD server to build the analytic stirrup axis and swept solid. The client then creates an IFC IfcIndexedPolyCurve + IfcSweptDiskSolid preview and renders it with ThatOpen Components.
- Bun 1.2+
- A running nCAD server
- The sibling
ncadrepository checked out next to this repository
The local SDK dependency is intentionally resolved as file:../ncad/sdk, so the expected directory layout is:
cadki/
|-- ncad/
| `-- sdk/
`-- ncad-demo/
Start the nCAD server:
cd ../ncad
make server-devStart the demo:
bun install
bun run devOpen http://127.0.0.1:5177/.
The demo proxies /api and /health to NCAD_URL. The default is http://127.0.0.1:8080.
Use another nCAD server URL when needed:
NCAD_URL=http://127.0.0.1:8082 bun run devbun run buildServe the built dist/ output:
bun run startThe integration test requires a running nCAD server:
bun run testBuild from inside ncad-demo with the parent directory as Docker context, so the image build can read the sibling ncad/sdk package:
docker build --platform=linux/amd64 -f ./Dockerfile -t kuzmo/ncad-demo:0.0.1-alpha ..Push:
docker push kuzmo/ncad-demo:0.0.1-alphaRun locally against a host nCAD server:
docker run --rm -p 5177:5177 \
-e NCAD_URL=http://host.docker.internal:8080 \
kuzmo/ncad-demo:0.0.1-alpha| Variable | Default | Purpose |
|---|---|---|
NCAD_URL |
http://127.0.0.1:8080 |
Base URL for the nCAD server. |
NCAD_SERVER_URL |
unset | Backward-compatible fallback for tests and scripts. |
HOST |
127.0.0.1 in local runtime, 0.0.0.0 in Docker |
HTTP bind host. |
PORT |
5177 |
HTTP bind port. |
MIT