mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
Use util.unit.mm_to_m in add_door_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
d1d6b46ce2
commit
38fab26000
@@ -28,6 +28,7 @@ import ifcopenshell.api.geometry
|
|||||||
import ifcopenshell.util.unit
|
import ifcopenshell.util.unit
|
||||||
from ifcopenshell.api.geometry.add_window_representation import create_ifc_window
|
from ifcopenshell.api.geometry.add_window_representation import create_ifc_window
|
||||||
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
|
||||||
|
|
||||||
DOOR_TYPE = Literal[
|
DOOR_TYPE = Literal[
|
||||||
"SINGLE_SWING_LEFT",
|
"SINGLE_SWING_LEFT",
|
||||||
@@ -43,11 +44,6 @@ DOOR_TYPE = Literal[
|
|||||||
SUPPORTED_DOOR_TYPES = get_args(DOOR_TYPE)
|
SUPPORTED_DOOR_TYPES = get_args(DOOR_TYPE)
|
||||||
|
|
||||||
|
|
||||||
def mm(x: float) -> float:
|
|
||||||
"""mm to meters shortcut for readability"""
|
|
||||||
return x / 1000
|
|
||||||
|
|
||||||
|
|
||||||
def create_ifc_door_lining(
|
def create_ifc_door_lining(
|
||||||
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
|
||||||
) -> ifcopenshell.entity_instance:
|
) -> ifcopenshell.entity_instance:
|
||||||
|
|||||||
Reference in New Issue
Block a user