mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fixed bug with double conversion of height/extrusion length #3073
Also fixed some tests
This commit is contained in:
@@ -54,7 +54,7 @@ class DumbProfileGenerator:
|
|||||||
props = bpy.context.scene.BIMModelProperties
|
props = bpy.context.scene.BIMModelProperties
|
||||||
self.collection = bpy.context.view_layer.active_layer_collection.collection
|
self.collection = bpy.context.view_layer.active_layer_collection.collection
|
||||||
self.collection_obj = bpy.data.objects.get(self.collection.name)
|
self.collection_obj = bpy.data.objects.get(self.collection.name)
|
||||||
self.depth = props.extrusion_depth * self.unit_scale
|
self.depth = props.extrusion_depth
|
||||||
self.rotation = 0
|
self.rotation = 0
|
||||||
self.location = Vector((0, 0, 0))
|
self.location = Vector((0, 0, 0))
|
||||||
self.cardinal_point = int(bpy.context.scene.BIMModelProperties.cardinal_point)
|
self.cardinal_point = int(bpy.context.scene.BIMModelProperties.cardinal_point)
|
||||||
|
|||||||
@@ -436,8 +436,8 @@ class DumbWallGenerator:
|
|||||||
self.collection = bpy.context.view_layer.active_layer_collection.collection
|
self.collection = bpy.context.view_layer.active_layer_collection.collection
|
||||||
self.collection_obj = bpy.data.objects.get(self.collection.name)
|
self.collection_obj = bpy.data.objects.get(self.collection.name)
|
||||||
self.width = self.layers["thickness"]
|
self.width = self.layers["thickness"]
|
||||||
self.height = props.extrusion_depth * self.unit_scale
|
self.height = props.extrusion_depth
|
||||||
self.length = props.length * self.unit_scale
|
self.length = props.length
|
||||||
self.rotation = 0.0
|
self.rotation = 0.0
|
||||||
self.location = Vector((0, 0, 0))
|
self.location = Vector((0, 0, 0))
|
||||||
self.x_angle = 0 if tool.Cad.is_x(props.x_angle, 0, tolerance=0.001) else radians(props.x_angle)
|
self.x_angle = 0 if tool.Cad.is_x(props.x_angle, 0, tolerance=0.001) else radians(props.x_angle)
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ class TestSetDefaultModelingDimensions(NewFile):
|
|||||||
ifcopenshell.api.run("unit.assign_unit", ifc)
|
ifcopenshell.api.run("unit.assign_unit", ifc)
|
||||||
subject.set_default_modeling_dimensions()
|
subject.set_default_modeling_dimensions()
|
||||||
props = bpy.context.scene.BIMModelProperties
|
props = bpy.context.scene.BIMModelProperties
|
||||||
assert props.extrusion_depth == 3000
|
assert props.extrusion_depth == 3
|
||||||
assert props.length == 1000
|
assert props.length == 1
|
||||||
assert props.rl1 == 0
|
assert props.rl1 == 0
|
||||||
assert props.rl2 == 1000
|
assert props.rl2 == 1000
|
||||||
assert props.x == 500
|
assert props.x == 500
|
||||||
|
|||||||
Reference in New Issue
Block a user