
typescriptThis project contains some examples used in various tutorials for showing how BITBYBIT-RUNNER.JS works
type Inputs = {
size: number;
}
Bit.mockBitbybitRunnerInputs({ size: 1 });
const inputs: Inputs = Bit.getBitbybitRunnerInputs();
const { occt } = bitbybit;
const start = async () => {
const cube = await occt.shapes.solid.createCube({
size: inputs.size,
center: [0, 0, 0],
});
const filletCube = await occt.fillets.filletEdges({
shape: cube,
radius: 0.4
});
const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();
drawOptions.faceColour = "#0000ff";
drawOptions.edgeWidth = 1;
drawOptions.precision = 0.005;
const cubeMesh = await bitbybit.draw.drawAnyAsync({
entity: filletCube,
options: drawOptions,
});
return { cubeMesh };
}
const runnerOutput = start();
Bit.setBitbybitRunnerResult(runnerOutput);
Editor plans for 3D development, API keys for server-side CAD algorithms
Cloud storage, private projects & 3D algorithms for Bitbybit editors
Run CAD algorithms on managed cloud servers from your own backend applications
Custom software development, dedicated servers & CAD automation at scale.