Skip to content

Learn

Why one dimension decides whether it fits

When an object is scaled uniformly into a bounded space, one axis runs out of room first and that axis alone sets the largest usable factor. The answer is the smallest of the per-axis ratios — never the largest, and never their average.

Fitting is a minimum, not an average

Uniform scaling applies one factor k to every dimension at once. Each axis imposes its own ceiling on k, because the scaled extent must not exceed the extent available:

O₁·k ≤ A₁ and O₂·k ≤ A₂ and O₃·k ≤ A₃  ⇒  k ≤ min(A₁/O₁, A₂/O₂, A₃/O₃)

Three inequalities have to hold simultaneously, and a set of simultaneous upper bounds is satisfied only by the lowest one. That is the whole idea: the per-axis ratios are not options to choose between, they are constraints that all apply, and the largest factor that fits is whichever of them is smallest.

Why the smallest per-axis ratio decides the answerAn object 200 by 400 by 200 mm in a space 380 by 500 by 190 mm. The per-axis ratios are 380/200 = 1.900 on X, 500/400 = 1.250 on Y and 190/200 = 0.950 on Z, so the largest uniform factor is 0.950, the smallest of the three. At k = 0.950 the object measures 190 by 380 by 190 mm: X and Y have slack and Z exactly fills its 190 mm. At the largest candidate, k = 1.900, X exactly fills its 380 mm, but Y becomes 760 mm in a 500 mm space and protrudes by 260 mm while Z becomes 380 mm in a 190 mm space and protrudes by 190 mm, so that factor is unusable.k = 0.950 — THE SMALLEST RATIOXobject 190 mm in 380 mmfitsYobject 380 mm in 500 mmfitsZobject 190 mm in 190 mmexact fitk = 1.900 — THE LARGEST RATIOXobject 380 mm in 380 mmexact fitYobject 760 mm in 500 mmover by 260 mmZobject 380 mm in 190 mmover by 190 mmmin(1.900, 1.250, 0.950) = 0.950Dashed outline = available space.
The three ratios are candidates, not options: only the smallest satisfies all three axes at once. At k = 0.95 the Z axis is exactly binding; at k = 1.9 two of the three axes are over — Y by 260 mm and Z by 190 mm — which is why the largest candidate is never the answer.

A worked constraint set

An object measuring 200 × 400 × 200 mm is to go into a space measuring 380 × 500 × 190 mm, in the orientation supplied:

AxisObjectAvailableRatioSlack at k = 1
X200 mm380 mm380/200 = 1.900+180 mm
Y400 mm500 mm500/400 = 1.250+100 mm
Z200 mm190 mm190/200 = 0.950−10 mm

k_max = min(1.900, 1.250, 0.950) = 0.950  (19/20)

At that factor the object becomes 190 × 380 × 190 mm: X keeps 190 mm of slack, Y keeps 120 mm, and Z fills its 190 mm exactly. Because k_max is below 1, the object does not fit as supplied — the Z axis is 10 mm too long — and a 5% reduction is the price of admission.

The two answers that look reasonable and are not

Taking the largest ratio. 1.900 is the factor at which X exactly fills its 380 mm, and it is the biggest number in the table, which is exactly why it gets picked. At k = 1.9 only the X axis is satisfied: Y becomes 400 × 1.9 = 760 mm in a 500 mm space and Z becomes 200 × 1.9 = 380 mm in a 190 mm space, protruding by 260 mm and 190 mm respectively — the latter twice the depth available.

Averaging the ratios. Averaging feels like a compromise, but no axis is negotiating. The mean of the three is 1.366666…, and at that factor Z becomes 273.333333… mm in a 190 mm space — still over by more than 80 mm. An average is only meaningful across quantities that trade off against each other; simultaneous constraints do not.

Ratios decide, not leftover space

The limiting axis is not the one with the least room left over in millimetres. Compare two axes of one object:

  • 40 mm in 60 mm — 20 mm of slack, ratio 1.500
  • 400 mm in 500 mm — 100 mm of slack, ratio 1.250

The second axis has five times the absolute slack and is nevertheless the limiting one, because scaling consumes slack in proportion to size. Growing by 25% adds 10 mm to the small axis and 100 mm to the large one. Millimetres of clearance are a measurement; ratios are what scaling actually acts on.

Rotation changes which dimension meets which limit

An orientation is a pairing of object dimensions to available extents. Rotating changes the pairing without changing either object or space, so it can change the answer dramatically.

Rotation changes which dimension meets which limitAn object 300 by 120 by 400 mm placed in a space 350 by 500 by 200 mm. Standing as supplied, its footprint is 300 by 120 mm and it is 400 mm tall, so the ratios are 350/300 = 1.167, 500/120 = 4.167 and 200/400 = 0.500; the height is over the 200 mm limit by 200 mm and the largest uniform factor is 0.500. Laid down, its footprint is 300 by 400 mm and it is 120 mm tall, so the ratios are 350/300 = 1.167, 500/400 = 1.250 and 200/120 = 1.667, and the largest uniform factor is 7/6, about 1.167. The object and the space are unchanged; only the pairing of dimensions to limits changed.AS SUPPLIEDfootprint in plan300 × 120 mmheight against 200 mm400 mm tall — 200 mm over350/300 = 1.167500/120 = 4.167200/400 = 0.500k = 0.500LAID DOWNfootprint in plan300 × 400 mmheight against 200 mm120 mm tall350/300 = 1.167500/400 = 1.250200/120 = 1.667k = 7/6 ≈ 1.167
Same object, same space. Standing, the 400 mm dimension is tested against 200 mm of headroom and the answer is 0.500; laid down, it is tested against 500 mm of depth and the answer rises to 7/6 ≈ 1.167 — a rotation, not a resize.

An object 300 × 120 × 400 mm in a space 350 × 500 × 200 mm illustrates the size of the effect. Standing as supplied, its 400 mm dimension is tested against 200 mm of headroom and k_max is 0.500. Laid down, that dimension is tested against 500 mm of depth instead and k_max rises to 7/6 ≈ 1.167 — from “must be halved” to “fits with room to grow”, by turning it.

With all three axes free there are six pairings, and each has its own limiting axis and its own minimum. Whether any of them is permissible is a question about the object, not the geometry: print orientation, grain direction, layer adhesion, a required upright face, or how the thing has to be carried in through the opening can all forbid the pairing with the best number.

Clearance can move the constraint to a different axis

Clearance is subtracted from the available extent before the ratios are formed, and because a fixed subtraction hits a small extent harder in proportional terms, it can change which axis governs. An object 100 × 200 mm in an opening 130 × 250 mm:

  • No clearance: 130/100 = 1.300 and 250/200 = 1.250 — Y limits.
  • 10 mm each side: 110/100 = 1.100 and 230/200 = 1.150 — X limits.

The object did not change and neither did the opening. Deciding the clearance decided the constraint, which is why a fit answer is only as meaningful as the clearance stated with it.

Exactly binding, and ties that are not ties

At k_max the limiting axis fits exactly, with zero clearance. That is a mathematical statement, not a practical one: at 0.950 the Z extent is 190.000 mm in 190 mm, and at 0.951 it is 190.2 mm and does not fit. Every real placement needs some margin, and the calculator will not invent one for you.

Near-ties are the reason the ratios are held as exact fractions rather than decimals. The ratios 900/950 = 18/19 = 0.947368… and 1801/1901 = 0.947396… both display as 0.947, yet they are genuinely ordered: 18 × 1901 = 34,218 against 19 × 1801 = 34,219, so the first is smaller by 1/36,119. Rounded to three digits the comparison is a coin toss and the wrong axis gets reported as limiting; kept exact, it is decided.

What this does not tell you

This is bounding-box geometry, and only that. It compares rectangular extents, so a result of “fits” means the scaled box fits inside the available box with the axes as paired — it says nothing about whether an irregular shape clears an obstruction inside that box, whether there is a path to get it into position, whether it can be tilted diagonally through a smaller opening, or whether it is stable, strong or manufacturable at the reduced size. Those are the questions to ask after the geometry says yes.

The strength and mass consequences of the factor you land on are covered in why area and volume change faster than length, and the constraint solver's exact-arithmetic rules are in the methodology.