Resources Numerical accuracy Calculation policy

Starter door and window sizes

The width, height and sill of the starter door and window types, written in inches and stored in millimeters.

How the precision is kept

Each size is a whole number of inches multiplied by 25.4, the exact number of millimeters in an inch, in one 64-bit multiplication. The results are the nearest 64-bit numbers to the decimal products and are not rounded further.

Calculations under this policy

2 calculations in 1 source file. The code is read from the released app when this page loads. It is the calculation people run, not a copy kept for this page.

opening-types.js BimCraft 0.8.1 64-bit 2 calculations Reviewed

Tests None found by the review

Starter door sizes

64-bit

Width and height of each starter door type in millimeters.

width = inches × 25.4

Width and height are an integer count of inches times IN = 25.4, one 64-bit product each. The garage door is 16 × 12 × 25.4 wide and 7 × 12 × 25.4 high, with the whole numbers multiplied first.

  • opening-types.js
  • lines 13 to 25
  • BimCraft 0.8.1
/** Starter doors: width × height (mm), op = the IFC4 IfcDoorTypeOperationEnum for hinges at end 'a' / 'b'. */
export const DOOR_TYPES = [
  { key: 'door-single', kind: 'door', width: 36 * IN, height: 80 * IN, leaves: 1, op: ['SINGLE_SWING_LEFT', 'SINGLE_SWING_RIGHT'] },
  { key: 'door-double', kind: 'door', width: 60 * IN, height: 80 * IN, leaves: 2, op: ['DOUBLE_DOOR_SINGLE_SWING', 'DOUBLE_DOOR_SINGLE_SWING'] },
  { key: 'door-sliding', kind: 'door', width: 72 * IN, height: 80 * IN, slide: 2, op: ['SLIDING_TO_LEFT', 'SLIDING_TO_RIGHT'] },
  { key: 'door-pocket', kind: 'door', width: 32 * IN, height: 80 * IN, pocket: true, op: ['SLIDING_TO_LEFT', 'SLIDING_TO_RIGHT'] },
  { key: 'door-garage', kind: 'door', width: 16 * 12 * IN, height: 7 * 12 * IN, garage: true, op: ['ROLLINGUP', 'ROLLINGUP'] },
  // the residential set (0.5 part 4 RC.4, bim-residential; names res.ot.*)
  { key: 'door-bifold', kind: 'door', width: 36 * IN, height: 80 * IN, bifold: true, res: true, op: ['FOLDING_TO_LEFT', 'FOLDING_TO_RIGHT'] },
  { key: 'door-french', kind: 'door', width: 60 * IN, height: 80 * IN, leaves: 2, glazed: true, res: true, op: ['DOUBLE_DOOR_SINGLE_SWING', 'DOUBLE_DOOR_SINGLE_SWING'] },
  { key: 'door-barn', kind: 'door', width: 36 * IN, height: 84 * IN, barn: true, res: true, op: ['SLIDING_TO_LEFT', 'SLIDING_TO_RIGHT'] },
  { key: 'door-entry-sidelites', kind: 'door', width: 60 * IN, height: 80 * IN, sidelites: 12 * IN, res: true, op: ['SINGLE_SWING_LEFT', 'SINGLE_SWING_RIGHT'] },
];

Starter window sizes

64-bit

Width, height and sill height of each starter window type in millimeters.

size = inches × 25.4

Each value is an integer count of inches times 25.4 in one 64-bit product; nothing is rounded.

  • opening-types.js
  • lines 26 to 37
  • BimCraft 0.8.1
/** Starter windows: width × height, sill (the head at 6'-8" like the doors), the IFC4 IfcWindowTypePartitioningEnum. */
export const WINDOW_TYPES = [
  { key: 'win-fixed', kind: 'window', width: 48 * IN, height: 48 * IN, sill: 32 * IN, part: 'SINGLE_PANEL' },
  { key: 'win-single-hung', kind: 'window', width: 36 * IN, height: 48 * IN, sill: 32 * IN, part: 'DOUBLE_PANEL_HORIZONTAL', rail: true },
  { key: 'win-double-hung', kind: 'window', width: 36 * IN, height: 60 * IN, sill: 20 * IN, part: 'DOUBLE_PANEL_HORIZONTAL', rail: true },
  { key: 'win-casement', kind: 'window', width: 30 * IN, height: 48 * IN, sill: 32 * IN, part: 'SINGLE_PANEL', casement: true },
  { key: 'win-slider', kind: 'window', width: 60 * IN, height: 48 * IN, sill: 32 * IN, part: 'DOUBLE_PANEL_VERTICAL', stile: true },
  { key: 'win-awning', kind: 'window', width: 36 * IN, height: 24 * IN, sill: 56 * IN, part: 'SINGLE_PANEL', awning: true, res: true },
  { key: 'win-picture', kind: 'window', width: 72 * IN, height: 60 * IN, sill: 20 * IN, part: 'SINGLE_PANEL', res: true },
  { key: 'win-basement-egress', kind: 'window', width: 36 * IN, height: 48 * IN, sill: 36 * IN, part: 'SINGLE_PANEL', casement: true, well: true, res: true },
  { key: 'win-transom', kind: 'window', width: 36 * IN, height: 12 * IN, sill: 82 * IN, part: 'SINGLE_PANEL', res: true },
];

In detail

Method
mm = inches × 25.4, or feet × 12 × 25.4 for the garage door.
Number types
64-bit numbers.
Limits
The table holds 9 starter doors and 9 starter windows; a size that is not a whole number of inches is not in it.

Approach: 64-bit, direct

Every value is a 64-bit number from input to result. Formulas are closed form or a direct solve, and every comparison uses a stated tolerance.

Every policy that takes this approach