Union solids

Union solids script details
Author
matas
Type
Typescript logo image
typescript
App Version
0.14.4
Visibility
public
Date Created
Feb 23, 2024, 5:11:17 PM
Last Edit Date
Feb 23, 2024, 5:15:57 PM

Script Details

The Code
const start = async () => { const boxOpt = new Bit.Inputs.OCCT.BoxDto(); boxOpt.width = 5; boxOpt.length = 8; boxOpt.height = 5; const box = await bitbybit.occt.shapes.solid.createBox(boxOpt); const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto(); cylinderOpt.radius = 3; cylinderOpt.height = 7; cylinderOpt.center = [3, 0, 3]; const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt); const sphereOpt = new Bit.Inputs.OCCT.SphereDto(); sphereOpt.radius = 3; sphereOpt.center = [-1.5, 1.5, -5]; const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt); const union = await bitbybit.occt.booleans.union({ shapes: [box, cylinder, sphere], keepEdges: false }) bitbybit.draw.drawAnyAsync({ entity: union }); } start();