const start = async () => {
const options = new Bit.Advanced.Text3D.Text3DDto();
options.text = "Hello World!";
options.fontType = Bit.Advanced.Text3D.fontsEnum.Silkscreen;
options.direction = [0, 1, 0];
options.origin = [6, -1.5, 0.5];
options.height = 3;
options.originAlignment = Bit.Advanced.Text3D.recAlignmentEnum.rightTop;
const text = await bitbybit.advanced.text3d.create(options);
const box = await bitbybit.occt.shapes.solid.createBox({
width: 20,
height: 1,
length: 5,
center: [0, 0, 0],
});
const boxFilleted = await bitbybit.occt.fillets.filletEdges({
shape: box,
radius: 0.2,
});
const cutout = await bitbybit.occt.booleans.difference({
shape: boxFilleted,
shapes: [text.compound],
keepEdges: false
});
const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();
drawOptions.faceColour = "#0000ff";
bitbybit.draw.drawAnyAsync({
entity: cutout,
options: drawOptions
});
}
start();