This commit is contained in:
Andrej730
2025-03-24 11:36:36 +05:00
parent 58c7976a5e
commit b63d9090a1
3 changed files with 8 additions and 8 deletions
@@ -202,7 +202,7 @@ def format_distance(
base = int(precision)
decInches = value * toInches
decFeet = decInches/12
decFeet = decInches / 12
# Separate ft and inches
# Unless Inches are the specified Length Unit or unit_fraction is False
@@ -104,7 +104,7 @@ def block_scale(scene: bpy.types.Scene) -> None:
if obj := (getattr(bpy.context, "active_object", None) or bpy.context.view_layer.objects.active):
if isinstance(obj, bpy.types.Object) and tool.Blender.get_ifc_definition_id(obj):
if obj.type == 'CAMERA':
if obj.type == "CAMERA":
camera = tool.Ifc.get_entity(obj)
if ifcopenshell.util.element.get_pset(camera, "EPset_Drawing", "TargetView") == "REFLECTED_PLAN_VIEW":
obj.scale = (-1, -1, -1)
+6 -6
View File
@@ -555,7 +555,7 @@ class TestCreatePointCloudMesh(NewFile):
def test_cartesian_point_list_3d(self):
bpy.ops.bim.create_project()
ifc_file = tool.Ifc.get()
coords = ((1., 2., 3.), (4., 5., 6.))
coords = ((1.0, 2.0, 3.0), (4.0, 5.0, 6.0))
item = ifc_file.createIfcCartesianPointList3D(coords)
rep = ifc_file.createIfcShapeRepresentation(Items=[item])
mesh = subject.create_point_cloud_mesh(rep)
@@ -566,8 +566,8 @@ class TestCreatePointCloudMesh(NewFile):
def test_cartesian_point_list_2d(self):
bpy.ops.bim.create_project()
ifc_file = tool.Ifc.get()
coords = ((1., 2.), (4., 5.))
coords3d = ((1., 2., 0.), (4., 5., 0.))
coords = ((1.0, 2.0), (4.0, 5.0))
coords3d = ((1.0, 2.0, 0.0), (4.0, 5.0, 0.0))
item = ifc_file.createIfcCartesianPointList2D(coords)
rep = ifc_file.createIfcShapeRepresentation(Items=[item])
mesh = subject.create_point_cloud_mesh(rep)
@@ -578,7 +578,7 @@ class TestCreatePointCloudMesh(NewFile):
def test_point_3d(self):
bpy.ops.bim.create_project()
ifc_file = tool.Ifc.get()
coords = ((1., 2., 0.),)
coords = ((1.0, 2.0, 0.0),)
item = ifc_file.createIfcCartesianPoint(Coordinates=coords[0])
rep = ifc_file.createIfcShapeRepresentation(Items=[item])
mesh = subject.create_point_cloud_mesh(rep)
@@ -589,8 +589,8 @@ class TestCreatePointCloudMesh(NewFile):
def test_point_2d(self):
bpy.ops.bim.create_project()
ifc_file = tool.Ifc.get()
coords = ((1., 2.),)
coords3d = ((1., 2., 0.),)
coords = ((1.0, 2.0),)
coords3d = ((1.0, 2.0, 0.0),)
item = ifc_file.createIfcCartesianPoint(Coordinates=coords[0])
rep = ifc_file.createIfcShapeRepresentation(Items=[item])
mesh = subject.create_point_cloud_mesh(rep)