classcad 21.2.0·headless
ClassCAD is a headless CAD runtime built cross-platform in C++. It runs stand-alone, serves apps and applications through WebSockets and HTTP/S, or embeds directly through its WASM binary.
264 methods7 domains3 runtimes5 platforms →
01One API
The client-side API interfacing with ClassCAD is available in three languages: JavaScript/TypeScript, Python* and .NET*. And in one unified shape: api.<version>.<domain>.<method>({ … })
* Python and .NET are experimental for now.
api.v10 methods
- .part0
- .assembly0
- .sketch0
- .common0
- .curve0
- .solid0
- .drawing2d0
The runtime
Supported interfaces.
There are various ways to run and interface with ClassCAD. It is cross-platform and multilingual. It adapts to servers, native and mobile apps as well as to websites. You’ll find our JavaScript/TypeScript/React SDK at buerli.io.
- // buerli: our higher-level JavaScript SDK
- import { init, WASMClient, BuerliCadFacade } from '@buerli.io/classcad'
- init(id => new WASMClient(id, { token: 'ccpk_…' }))
- const facade = new BuerliCadFacade()
- await facade.connect()
- const part = await facade.api.v1.part.create({ name: 'Flange' })
- // the model as a three.js scene: groups, meshes and materials
- const { scene } = await facade.createScene(part)
02Features
ClassCAD is what translates the SMLib CAD kernel and the LGS constraint solver into a referenceable history graph and constrained sketches. Every generated face, edge and vertex remembers where it came from, so a change to one feature won’t upset the features built on top of it, or referenced geometry in features and sketches.
0 features
api.v1.part
History-based modelling. Every call adds a feature to the part’s history, and the part replays it when a value changes. Part API →
Part or Solid?
The Part API works with features and keeps track of the bodies they make. The Solid API works on the bodies themselves, inside one feature, with no history of its own. Part API versus Solid API →
- Sketch
part.sketch - Extrusion
part.extrusion - Revolve
part.revolve - Twist
part.twist - Box
part.box - Cylinder
part.cylinder - Cone
part.cone - Sphere
part.sphere - Union
part.boolean - Subtraction
part.boolean - Intersection
part.boolean - Fillet
part.fillet - Chamfer
part.chamfer - Slice
part.slice - Slice by sheet
part.slice By Sheet - Mirror
part.mirror - Linear pattern
part.linear Pattern - Circular pattern
part.circular Pattern - Translation
part.translation - Rotation
part.rotation - Work plane
part.work Plane - Work axis
part.work Axis - Work point
part.work Point - Work CSys
part.work C Sys - Loft*in testing
- Sweep*in testing
- Pipe*in testing
- Helix*in testing
- Shell*in testing
Key
- what the feature made
- hidden
- taken away, or moved
- an axis, a path
- *
- in testing, coming soon
03Parametric
Any value in a model can be an expression. Drag a value below: the bolt circle, the holes and the section all follow. Constraints keep the design intent.
Expressionsdrag a value
- od
- bore
- n
- t
- pcd
(od + bore) / 260- d
0.09 * od8.3- ≤
bore ≤ od − 48holds
part.updateExpression · the history replays
04Multi-client · new
A session can be shared. Invite others into it, to edit or only to view. Clients can be people or agents, working side by side: each change lands for all of them at once, and each sees where the others point and look.
* Coming soon: comments and annotations pinned to geometry (we are still testing).
idaa little higher
miaagentida05Exports
ClassCAD supports various file formats. It has its own parametric, history-based format, OFB, and SCG: the feature tree with its values and triangulated meshes, a partial history for display.
In · common.load
- OFBits own: the whole history
- STEPfrom any CAD system
- STLas a mesh, for display
Out · common.save · drawing2d
- OFBhistory, expressions, all of it
- STEPAP203 · AP214 · AP242
- DXFR2000 to 2013, and drawings
- SVGdrawings, hidden lines removed
- STLfor printing
- SCGfeature tree and meshes, for display
06Lineage
ClassCAD was drafted a long time ago. It grew through customer relations and joint ventures.
07Get it