ifcpatch.recipes.ConvertLengthUnit
¶
Module Contents¶
- class ifcpatch.recipes.ConvertLengthUnit.Patcher(src: str, file: ifcopenshell.file, logger: logging.Logger, unit: str = 'METER')¶
Converts the length unit of a model to the specified unit
Allowed metric units include METER, MILLIMETER, CENTIMETER, etc. Allowed imperial units include INCH, FOOT, MILE.
- Parameters:
unit (str) – The name of the desired unit, defaults to “METER”
Example:
# Convert to millimeters ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ConvertLengthUnit", "arguments": ["MILLIMETER"]}) # Convert to feet ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ConvertLengthUnit", "arguments": ["FOOT"]})
- patch()¶