classcad 21.2.0·headless
ClassCAD is CAD without the screen. Your program asks, and it answers with exact, parametric geometry, on a server, in a worker, or as WebAssembly in a browser tab.
264 methods7 domains3 runtimes5 platforms →
01One API
api.v1.<domain>.<method>({ … }): 264 methods in seven domains. The same names from JavaScript, Python and .NET, the same on every runtime.
api.v10 methods
- .part0
- .assembly0
- .sketch0
- .common0
- .curve0
- .solid0
- .drawing2d0
Any runtime
Same calls. Three homes.
Run it as a server your apps connect to, as a worker beside your code, or as WebAssembly inside a browser tab. Where it runs is one line; the program doesn’t change.
- const { SocketIOClient } = require('@classcad/api-js-connector')
- const client = new SocketIOClient({ url: 'ws://127.0.0.1:9091' })
- await client.connect()
- const api = client.getApiU()
- const part = await api.v1.part.create({ name: 'My First Part' })
02Features
Sketch, extrude, cut, round, repeat. A ClassCAD part is the list of features that made it, kept in order, and every other domain of the API has its own. Here they are, each drawn from what the engine returned for it: red is what the call made.
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 number in a model can be an expression, and every feature remembers how it was made. Drag a value below: the bolt circle, the holes and the section all follow, as they would in ClassCAD.
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.
* Next: comments, pinned to the geometry they are about. In testing, coming soon.
idaa little higher
miaagentida05Exact, and out
Models are boundary representations on NURBS, not meshes. Read the files your customers already have; write the ones their machines and drawings want.
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
- SCG
06Lineage
ClassCAD was never a startup’s first draft. It grew up inside other people’s CAD, kernel by kernel, and stayed.