ifcpatch.recipes.ConvertLengthUnit#

Module Contents#

class ifcpatch.recipes.ConvertLengthUnit.Patcher(src, file, logger, unit='METERS')#

Converts the length unit of a model to the specified unit

Allowed metric units include METERS, MILLIMETERS, CENTIMETERS, etc. Allowed imperial units include INCHES, FEET, MILES.

Parameters

unit (str) – The name of the desired unit.

Example:

# Convert to millimeters
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ConvertLengthUnit", "arguments": ["MILLIMETERS"]})

# Convert to feet
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ConvertLengthUnit", "arguments": ["FEET"]})
patch(self)#