RECENTLY CHECKED
All projects →
Design a part that fits · STAGE 3 OF 4

Design a tray around what goes inside

Build around measured contents, derive the outside dimensions and compare clearance options before committing to a full print.

You needYour mounting-plate file, a ruler or calipers and OpenSCAD. Printing a fit sample is optional.

Reference checked 9 September 2026. Authored exercise; no physical build result is claimed.

Understand the change

  1. Measure the contents

    Measure width, depth and height at the widest points, including protrusions. Use the example values only until you have an actual object.

  2. Build from the inside out

    At 0.4 mm per side, the interior is 60.8 × 20.8 mm. Two 2 mm walls make the outside 64.8 × 24.8 mm. The 2 mm base makes the total height 12 mm.

  3. Compare fit samples

    Set coupons to true and inspect the three shallow samples, left to right: 0.2, 0.4 and 0.6 mm per side. If printing, keep material and settings the same, identify each sample and test the real object.

  4. Transfer the result

    Record which sample fits, including whether the object can be removed comfortably. Apply that measured allowance to the full tray and retain the file for the Gridfinity handoff.

THE BRIEF

A focused request to try

Use this with a suitable AI assistant. Its response will vary; compare it with the checks below.

Design an open tray for an example 60 × 20 × 10 mm object. Give clearance per side, wall and base thickness named parameters. Derive the outer dimensions from the inside. Add a coupon mode that makes three shallow fit samples at 0.2, 0.4 and 0.6 mm per side. Keep these as experimental allowances, not proven printer tolerances.
THE REFERENCE

Worked reference example

Read the example, predict one change, then check the result.

part_w = 60; part_d = 20; part_h = 10;
clearance = 0.4; wall = 2; base = 2;
coupons = false;
module tray(c, inside_h) {
  inside_w = part_w + 2*c;
  inside_d = part_d + 2*c;
  assert(part_w > 0 && part_d > 0 && inside_h > 0);
  assert(c >= 0 && wall > 0 && base > 0);
  difference() {
    cube([inside_w+2*wall, inside_d+2*wall, inside_h+base]);
    translate([wall, wall, base])
      cube([inside_w, inside_d, inside_h+1]);
  }
}
if (coupons) {
  for (i=[0:2])
    translate([i*(part_w+2*wall+2*0.6+5), 0, 0])
      tray([0.2,0.4,0.6][i], 3);
} else {
  tray(clearance, part_h);
}
TRY THE WORKING EXAMPLE

Check the inside and outside

Change the inputs, inspect the derived dimensions and download the matching OpenSCAD model.

Dimensions in millimetres
Top view of the tray, showing walls and its open interiorTop view · dimensions in mm
Inspect the updated OpenSCAD source

Check your result

  • Default outside dimensions are 64.8 × 24.8 × 12 mm.
  • Increasing wall thickness changes the outside, not the interior.
  • Record actual fit or mark it untested; a model preview cannot decide clearance.

Where this can go wrong

A rectangular tray does not become Gridfinity-compatible by changing its width. The next stage uses the original Gridfinity generator for its base and stacking geometry.

Go to the source

OpenSCAD modules and constructive geometry. Confirm current tool instructions before using them.

Tell us where this exercise was unclear