mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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_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.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:
|
||||
return
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import ifcopenshell.util.unit
|
||||
from ifcopenshell.util.data import Clipping
|
||||
from math import sin, cos
|
||||
from mathutils import Vector
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
|
||||
@@ -35,7 +34,7 @@ def add_slab_representation(
|
||||
# Planes are defined either by Clipping objects
|
||||
# or by dictionaries of arguments for `Clipping.parse`
|
||||
clippings: Optional[list[Union[Clipping, dict[str, Any]]]] = None,
|
||||
polyline: Optional[list[Vector]] = None,
|
||||
polyline: Optional[list[tuple]] = None,
|
||||
) -> ifcopenshell.entity_instance:
|
||||
usecase = Usecase()
|
||||
usecase.file = file
|
||||
|
||||
Reference in New Issue
Block a user