mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 14:22:33 +00:00
Use util.unit.mm_to_m in add_window_representation
Drops the module-local ``mm()`` helper in favour of the centralised ``ifcopenshell.util.unit.mm_to_m`` (added earlier in this PR). The ``as mm`` import alias preserves the existing call sites' readability. Generated with the assistance of an AI coding tool.
This commit is contained in:
committed by
Thomas Krijnen
parent
38fab26000
commit
4bbcb59259
@@ -27,6 +27,7 @@ import numpy as np
|
|||||||
import ifcopenshell.api.geometry
|
import ifcopenshell.api.geometry
|
||||||
import ifcopenshell.util.unit
|
import ifcopenshell.util.unit
|
||||||
from ifcopenshell.util.shape_builder import ShapeBuilder, V
|
from ifcopenshell.util.shape_builder import ShapeBuilder, V
|
||||||
|
from ifcopenshell.util.unit import mm_to_m as mm
|
||||||
|
|
||||||
# SCHEMAS describe panels setup
|
# SCHEMAS describe panels setup
|
||||||
# where:
|
# where:
|
||||||
@@ -59,11 +60,6 @@ DEFAULT_PANEL_SCHEMAS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def mm(x: float) -> float:
|
|
||||||
"""mm to meters shortcut for readability"""
|
|
||||||
return x / 1000
|
|
||||||
|
|
||||||
|
|
||||||
def create_ifc_window_frame_simple(
|
def create_ifc_window_frame_simple(
|
||||||
builder: ShapeBuilder, size: np.ndarray, thickness: Union[list[float], float], position: Optional[np.ndarray] = None
|
builder: ShapeBuilder, size: np.ndarray, thickness: Union[list[float], float], position: Optional[np.ndarray] = None
|
||||||
) -> list[ifcopenshell.entity_instance]:
|
) -> list[ifcopenshell.entity_instance]:
|
||||||
|
|||||||
Reference in New Issue
Block a user