Skip to content

Your first part

In this lesson you’ll build a simple mounting bracket: a rectangular block with a single cylindrical hole drilled through it. You’ll do it two ways — by asking a connected agent in plain language, and by writing the equivalent OCL — then export it as an STL file you can print or machine.

By the end you’ll understand the core modeling loop: make solids, combine them, and export.

A bracket that is 40 mm wide, 20 mm deep, and 8 mm tall, with a 3 mm-radius hole running through it. Think of the bracket as three operations: create the block, create the hole, then subtract the hole from the block.

Ask your agent:

Create a box 40 mm wide, 20 mm deep, and 8 mm tall.

This runs create_box. You now have a solid block in the project.

Ask your agent:

Create a cylinder with a 3 mm radius and 12 mm height for the mounting hole.

This runs create_cylinder. The cylinder is taller than the block (12 mm vs 8 mm) on purpose — making the cutting tool longer than the material guarantees a clean through-hole.

Step 3 — Subtract the hole from the block

Section titled “Step 3 — Subtract the hole from the block”

Ask your agent:

Subtract the cylinder from the box to make the hole.

This runs boolean_subtract, removing the cylinder volume from the block. You’re left with a single bracket body.

Ask your agent:

Tessellate the bracket and export it as an STL file.

This runs tessellate (which turns the precise B-Rep solid into a triangle mesh) and then export_stl (which writes that mesh to an STL file ready for slicing or sharing).

The same model expressed directly in OCL. You can run this with the eval_ocl tool:

let block = box(40mm, 20mm, 8mm)
let hole = cylinder(3mm, 12mm) |> translate(20mm, 10mm, 0mm)

Here block is the bracket body and hole is the cylinder, moved with the pipe operator |> so its center sits at the middle of the block’s footprint (20 mm across, 10 mm deep). Ask your agent to subtract hole from block, then tessellate and export — the same final tools (boolean_subtract, tessellate, export_stl) run either way.

  • The hole doesn’t go all the way through. Your cylinder is shorter than the block is tall. Make the cylinder height larger than the block height (we used 12 mm for an 8 mm block).
  • Nothing seems to happen after subtract. Confirm both bodies exist first — the box from create_box and the cylinder from create_cylinder — before asking for boolean_subtract.
  • The hole is off to one side. The cylinder needs to be positioned over the block. In OCL, adjust the translate(...) values; via the agent, tell it where you want the hole centered.
  • The STL looks faceted or coarse. That’s the tessellation tolerance. A finer tolerance produces smoother curves at the cost of a larger file.

You modeled a part and exported it. Now learn the language underneath the agent: Next → OCL basics.