3D Text Cutout TypeScript

3D Text Cutout TypeScript script details
Author
matas
Type
Typescript logo image
typescript
App Version
0.13.0
Visibility
public
Date Created
Sep 18, 2023, 1:26:55 PM
Last Edit Date
Dec 5, 2023, 4:18:11 PM

Script Details

The Code
const start = async () => { const options = new Bit.Advanced.Text3D.Text3DDto(); options.text = "Hello World!"; options.fontType = Bit.Advanced.Text3D.fontsEnum.Silkscreen; options.origin = [6, -1.5, 0.5]; options.height = 3; 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();