Skip to content

Drilled bracket (5 lines) ​

Drilled bracket (5 lines), rendered in the brepjs playground
Basics · 8 lines▶ Run it in the playground

Box, drilled and filleted — the canonical loop.

Code ​

This is the full program. The playground runs it in your browser without a change.

ts
import { box, cut, cylinder, fillet, edgeFinder, unwrap } from 'brepjs/quick';

// The canonical 5-line code-CAD loop:
// drill a hole, fillet the vertical edges, hand back a Solid.
const drilled = unwrap(cut(box(30, 20, 10), cylinder(5, 15, { at: [15, 10, -2] })));
const part = unwrap(fillet(drilled, edgeFinder().inDirection('Z').findAll(drilled), 1.5));

export default part;

Functions used ​

box cut cylinder fillet edgeFinder unwrap

▶ Run Drilled bracket (5 lines) in the playground

Released under the Apache 2.0 License.