faijs — an open-source CAD modeling language
faijs is an open-source CAD modeling language (a JavaScript library): models are code, parameters are variables. The same model runs in the browser, Node, and WeChat Mini Programs — it is the modeling kernel of the entire FaiCAD product line.
Models are code
Modeling is described in a JavaScript subset — no control flow, deterministic execution — a natural fit for version control and AI generation.
BREP / mesh dual path
Every op has both a BREP (OCCT) and a mesh (manifold) implementation, dispatched by static rules.
Runs everywhere
Browser, Node, WeChat Mini Program — one language, one result.
A real .fai.js
// plate.fai.js — a mounting plate with a hole
let plate = cad.box(80 * MM, 60 * MM, 8 * MM, { centered: true })
let hole = cad.cylinder(4 * MM, 20 * MM, { centered: true })
plate = cad.subtract(plate, hole) fai.zip — exchange a living model
The industry exchanges models via STEP, and STEP is not parametric: the geometry survives while the modeling intent is lost. fai.zip is a parametric model format built on faijs — what gets exchanged is a 3D model whose parameters remain editable.
Intent, not just geometry
Parameters, features and modeling history travel with the model: the recipient sees how it was built, not merely what it is.
Still alive after exchange
Open a fai.zip and keep editing: change one parameter and the whole feature tree recomputes.
A format for collaboration
Design hand-offs, supply-chain collaboration, version iteration — models no longer "degrade" into dead geometry as they move.