mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Remove mathutils dependency from add_slab_representation.py
This commit is contained in:
@@ -84,7 +84,7 @@ class DumbSlabGenerator:
|
|||||||
polyline_data = bpy.context.scene.BIMPolylineProperties.insertion_polyline
|
polyline_data = bpy.context.scene.BIMPolylineProperties.insertion_polyline
|
||||||
polyline_points = polyline_data[0].polyline_points if polyline_data else []
|
polyline_points = polyline_data[0].polyline_points if polyline_data else []
|
||||||
self.location = Vector((polyline_points[0].x, polyline_points[0].y, self.container_obj.location.z))
|
self.location = Vector((polyline_points[0].x, polyline_points[0].y, self.container_obj.location.z))
|
||||||
self.polyline = [Vector((p.x, p.y, 0.0)) - self.location for p in polyline_points]
|
self.polyline = [tuple(Vector((p.x, p.y, 0.0)) - self.location) for p in polyline_points]
|
||||||
|
|
||||||
if len(self.polyline) <= 2:
|
if len(self.polyline) <= 2:
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
import ifcopenshell.util.unit
|
import ifcopenshell.util.unit
|
||||||
from ifcopenshell.util.data import Clipping
|
from ifcopenshell.util.data import Clipping
|
||||||
from math import sin, cos
|
from math import sin, cos
|
||||||
from mathutils import Vector
|
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ def add_slab_representation(
|
|||||||
# Planes are defined either by Clipping objects
|
# Planes are defined either by Clipping objects
|
||||||
# or by dictionaries of arguments for `Clipping.parse`
|
# or by dictionaries of arguments for `Clipping.parse`
|
||||||
clippings: Optional[list[Union[Clipping, dict[str, Any]]]] = None,
|
clippings: Optional[list[Union[Clipping, dict[str, Any]]]] = None,
|
||||||
polyline: Optional[list[Vector]] = None,
|
polyline: Optional[list[tuple]] = None,
|
||||||
) -> ifcopenshell.entity_instance:
|
) -> ifcopenshell.entity_instance:
|
||||||
usecase = Usecase()
|
usecase = Usecase()
|
||||||
usecase.file = file
|
usecase.file = file
|
||||||
|
|||||||
Reference in New Issue
Block a user