mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Run black on IOS-Python
This commit is contained in:
@@ -26,6 +26,7 @@ geometry extrusions).
|
||||
from .. import wrap_usecases
|
||||
from .add_axis_representation import add_axis_representation
|
||||
from .add_boolean import add_boolean
|
||||
|
||||
try:
|
||||
from .add_door_representation import add_door_representation
|
||||
except ModuleNotFoundError as e:
|
||||
@@ -33,6 +34,7 @@ except ModuleNotFoundError as e:
|
||||
from .add_footprint_representation import add_footprint_representation
|
||||
from .add_mesh_representation import add_mesh_representation
|
||||
from .add_profile_representation import add_profile_representation
|
||||
|
||||
try:
|
||||
from .add_railing_representation import add_railing_representation
|
||||
except ModuleNotFoundError as e:
|
||||
@@ -44,6 +46,7 @@ except ModuleNotFoundError as e:
|
||||
print(f"Note: API not available due to missing dependencies: geometry.add_representation - {e}")
|
||||
from .add_slab_representation import add_slab_representation
|
||||
from .add_wall_representation import add_wall_representation
|
||||
|
||||
try:
|
||||
from .add_window_representation import add_window_representation
|
||||
except ModuleNotFoundError as e:
|
||||
|
||||
@@ -857,13 +857,19 @@ class Usecase:
|
||||
z = self.convert_si_to_unit(z)
|
||||
return self.file.createIfcCartesianPoint((x, y, z))
|
||||
|
||||
def create_cartesian_point_list_from_vertices(self, vertices: list[bpy.types.MeshVertex], is_2d=False, is_model_coords=True):
|
||||
def create_cartesian_point_list_from_vertices(
|
||||
self, vertices: list[bpy.types.MeshVertex], is_2d=False, is_model_coords=True
|
||||
):
|
||||
if is_model_coords and self.settings["coordinate_offset"]:
|
||||
if is_2d:
|
||||
xy_offset = Vector((self.settings["coordinate_offset"][0:2]))
|
||||
return self.file.createIfcCartesianPointList2D([self.convert_si_to_unit(v.co.xy + xy_offset) for v in vertices])
|
||||
return self.file.createIfcCartesianPointList2D(
|
||||
[self.convert_si_to_unit(v.co.xy + xy_offset) for v in vertices]
|
||||
)
|
||||
xyz_offset = Vector((self.settings["coordinate_offset"][0:3]))
|
||||
return self.file.createIfcCartesianPointList3D([self.convert_si_to_unit(v.co.xyz + xyz_offset) for v in vertices])
|
||||
return self.file.createIfcCartesianPointList3D(
|
||||
[self.convert_si_to_unit(v.co.xyz + xyz_offset) for v in vertices]
|
||||
)
|
||||
if is_2d:
|
||||
return self.file.createIfcCartesianPointList2D([self.convert_si_to_unit(v.co.xy) for v in vertices])
|
||||
return self.file.createIfcCartesianPointList3D([self.convert_si_to_unit(v.co) for v in vertices])
|
||||
|
||||
Reference in New Issue
Block a user