Appearance
Getting Started
Prerequisites
- Node.js (LTS recommended)
- npm
Install
bash
git clone https://github.com/CPME/trueform.git
cd trueform
npm installBuild
bash
npm run buildVerify The Package Surfaces
bash
npm run verify:workspace-packagesThis checks the public workspace package entrypoints and their parity with the root trueform compatibility facade.
Run the Example
bash
npm run exampleBasic Usage
ts
import { buildPart, dsl } from "trueform";
const plate = dsl.part("plate", [
dsl.sketch2d("sketch-base", [
{ name: "profile:base", profile: dsl.profileRect(100, 60) },
]),
dsl.extrude(
"base-extrude",
dsl.profileRef("profile:base"),
6,
"body:main",
["sketch-base"]
),
]);
// Provide a backend (OpenCascade.js in v1).
// const backend = ...;
// const result = buildPart(plate, backend);buildPart returns a deterministic build result with the final outputs and per-feature steps. For a concrete example, see src/examples/hello.ts.
Native Backend Verification
bash
npm run verify:native-liveThis rebuilds the repo, rebuilds the native OCCT server, and runs the live native HTTP, PMI export, and native-vs-direct parity checks for the currently supported native feature set.
Quick Mesh Export (Viewer)
bash
npm run viewer:exportFor viewer setup, details, and mesh schema, see tools/viewer/README.md.