Scales#

papermodels.scales#

Drawing scales for converting PDF point coordinates into model units.

PDF annotation coordinates are measured in points (1 point == 1/72 inch). Each constant in this module is a Scale whose factor converts points on a plotted sheet into real-world units at that drawing scale: the SCALE_1_TO_* constants yield millimetres and the SCALE_1_TO_*_M constants yield metres.

class papermodels.scales.Scale(factor, name)[source]#

Bases: Decimal

A Decimal conversion factor with a human-readable name.

Behaves exactly like a Decimal in arithmetic, so it can be passed anywhere a ‘scale’ is accepted, e.g. GeometryGraph.from_pdf_file(path, scale=SCALE_1_TO_100).

Parameters:
  • factor – The multiplier from PDF points to model units.

  • name – A descriptive name, e.g. “1:100 Scale”.