# View Interfaces

# UnitMeasureFormatter

parses and formats measurements.

possible Units:

  • InchFeet
  • MM
  • CM

possible Formats:

  • NoUnit: plain number
  • LongUnit: mm, cm or ft/inch
  • ShortUnit: mm, cm or ' / "

With the init() function custom labels for the different units and formats may be provided.

# Parsing

First ',' are converted to '.' . Then everything not number or '.' is replaced by whitespace.

For inchfeet when two (or more) blocks of numbers (seperated by whitespace) are found, the first is interpreted as feet, the second as inch.

For metric only the first block of numbers (until the first whitespace) is parse into a float.

# PlanModelViewHelper

Helper class for different aggregations and calculations which are not part of the core but convenient for the view.

# getPlanOverview

Assembles an overview of whats currently in the Plan containing:

  • area : total area of the plan
  • bounds: bounding box of the plan
  • objects: list of all objects in the plan
  • outsideWalls: Areas of outside walls combined by used material
  • rooms: list of all rooms in the plan

Each room containing

  • area
  • bounds
  • floorMaterial
  • walls : areas of inside walls combined by used material
  • objects: the objects in the room including doors and windows on the walls of the rooms

Each object provides the following data:

  • dimensions
  • center
  • customColor (if set)
  • customLabel (if set)
  • rotation in radiant
  • catalogItemId (if a static item)
  • configuration (if a configurable item)
  • configurationHash (if configurable)
  • parts : the partlist for this configuration (if configurable)