Skip to main content

Choosing a kernel

A kernel is the library that computes geometry. Bitbybit gives you three for modelling, side by side under one API, and each is best at something different.

OpenCascade (occt)Manifold (manifold)JSCAD (jscad)
Geometryexact: true curves and surfacesa mesh of trianglesa mesh of polygons
Good atparts: fillets, chamfers, lofts, sweeps, measurements, assembliesmany booleans, lattices, imported and scanned meshesquick solids, text, simple extrusions
Not forthousands of booleans: each takes milliseconds to secondsfillets or anything exactly roundprecise CAD
FilesSTEP, IGES, BREP, STL, DXF, SVGmeshes, STL through drawingmeshes
Builds alongY, like the sceneZZ

Choose OpenCascade for anything you would model in a CAD program, and for anything you will hand to another one as STEP. Choose Manifold when the count of cuts runs into hundreds, or when the input is already a mesh. Choose JSCAD for quick shapes and 3D text where exactness does not matter.

The same cylinder in two kernels​

An OpenCascade cylinder has one round face: drawn, it is divided into triangles, but the shape itself stays exactly round. A Manifold cylinder is a prism, with as many sides as circularSegments says. Note also how each stands: OpenCascade builds along Y, which is up in the scene, while Manifold builds along Z, so its cylinder lies on its side.

Bitbybit Platform

One cylinder, two kernels in Rete

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"occt": {
"id": "occt",
"name": "bitbybit.occt.shapes.solid.createCylinder",
"customName": "cylinder",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 2,
"height": 4,
"center": [
-5,
0,
0
],
"direction": [
0,
1,
0
],
"angle": 360,
"originOnCenter": false
},
"inputs": {},
"position": [
40,
40
]
},
"manifold": {
"id": "manifold",
"name": "bitbybit.manifold.manifold.shapes.cylinder",
"customName": "cylinder",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"height": 4,
"radiusLow": 2,
"radiusHigh": 2,
"circularSegments": 12,
"center": true
},
"inputs": {},
"position": [
40,
420
]
}
},
"modules": {}
}

To stand a Manifold or JSCAD shape up beside an OpenCascade one, turn it a quarter turn about X.

Moving between kernels​

A shape can travel one way without loss:

  • bitbybit.occt.shapeToManifoldMesh meshes an OpenCascade shape into the form Manifold takes, and bitbybit.manifold.manifold.shapes.manifoldFromMesh makes a Manifold solid of it. Model a part exactly, then cut it a thousand times in Manifold.
  • The other way, a mesh reaches OpenCascade only as flat triangles, never as true curves again. Keep the exact shape if you need it later.

Shapes from different kernels never mix in one call: an OpenCascade boolean takes OpenCascade shapes. Drawing takes them all.

Beyond the three​

The IFC library reads and writes building models; IFC explains it. The Designer and design documents build their parts with OpenCascade.