Script
Chamfer circular edge

- Author
- matas
- Created
- Feb 23, 2024, 3:23:27 PM
- Last edit
- Feb 23, 2024, 3:28:35 PM
Project
Getting Started Demos TypeScript
This project contains demo scripts for TypeScript Monaco editor that are used as examples in the "Getting Started" section of the documentation.
View full projectScript code
const start = async () => {
const boxOpt = new Bit.Inputs.OCCT.BoxDto();
boxOpt.width = 5;
boxOpt.length = 8;
boxOpt.height = 10;
const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);
const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();
cylinderOpt.direction = [1, 0, 0];
cylinderOpt.center = [-5, 0, 0];
cylinderOpt.radius = 2;
cylinderOpt.height = 10;
const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt)
const difference = await bitbybit.occt.booleans.difference({
shape: box,
shapes: [cylinder],
keepEdges: false
});
const chamfered = await bitbybit.occt.fillets.chamferEdges({
shape: difference,
distance: 0.4
})
bitbybit.draw.drawAnyAsync({
entity: chamfered,
});
}
start();
