mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
black .
This commit is contained in:
@@ -149,7 +149,7 @@ class AssignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator):
|
||||
**{
|
||||
"items": [self.file.by_id(item.BIMMeshProperties.ifc_definition_id)],
|
||||
"layer": self.file.by_id(self.layer),
|
||||
}
|
||||
},
|
||||
)
|
||||
return {"FINISHED"}
|
||||
|
||||
@@ -171,7 +171,7 @@ class UnassignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator):
|
||||
**{
|
||||
"items": [self.file.by_id(item.BIMMeshProperties.ifc_definition_id)],
|
||||
"layer": self.file.by_id(self.layer),
|
||||
}
|
||||
},
|
||||
)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -676,8 +676,12 @@ class Model(bonsai.core.tool.Model):
|
||||
(obj.matrix_world @ Vector((max_x, layers["offset"], 0.0))).to_2d(),
|
||||
],
|
||||
"side": [
|
||||
(obj.matrix_world @ Vector((min_x, layers["offset"] + (layers["thickness"] * direction), 0.0))).to_2d(),
|
||||
(obj.matrix_world @ Vector((max_x, layers["offset"] + (layers["thickness"] * direction), 0.0))).to_2d(),
|
||||
(
|
||||
obj.matrix_world @ Vector((min_x, layers["offset"] + (layers["thickness"] * direction), 0.0))
|
||||
).to_2d(),
|
||||
(
|
||||
obj.matrix_world @ Vector((max_x, layers["offset"] + (layers["thickness"] * direction), 0.0))
|
||||
).to_2d(),
|
||||
],
|
||||
}
|
||||
axes["reference"] = [
|
||||
|
||||
@@ -106,12 +106,18 @@ class TestGetPropertyUnit(test.bootstrap.IFC4):
|
||||
length2 = ifcopenshell.api.unit.add_si_unit(self.file, unit_type="LENGTHUNIT", prefix="CENTI")
|
||||
area = ifcopenshell.api.unit.add_si_unit(self.file, unit_type="AREAUNIT")
|
||||
ifcopenshell.api.unit.assign_unit(self.file, units=[length, area])
|
||||
prop = self.file.createIfcPropertyEnumeratedValue(Name="Foo", EnumerationValues=[self.file.createIfcLengthMeasure(42.0)])
|
||||
prop = self.file.createIfcPropertyEnumeratedValue(
|
||||
Name="Foo", EnumerationValues=[self.file.createIfcLengthMeasure(42.0)]
|
||||
)
|
||||
assert subject.get_property_unit(prop, self.file) == length
|
||||
prop.EnumerationValues = []
|
||||
prop.EnumerationReference = self.file.createIfcPropertyEnumeration("Foo", [self.file.createIfcAreaMeasure(42.0)])
|
||||
prop.EnumerationReference = self.file.createIfcPropertyEnumeration(
|
||||
"Foo", [self.file.createIfcAreaMeasure(42.0)]
|
||||
)
|
||||
assert subject.get_property_unit(prop, self.file) == area
|
||||
prop.EnumerationReference = self.file.createIfcPropertyEnumeration("Foo", [self.file.createIfcAreaMeasure(42.0)], Unit=length2)
|
||||
prop.EnumerationReference = self.file.createIfcPropertyEnumeration(
|
||||
"Foo", [self.file.createIfcAreaMeasure(42.0)], Unit=length2
|
||||
)
|
||||
assert subject.get_property_unit(prop, self.file) == length2
|
||||
prop.EnumerationValues = [self.file.createIfcAreaMeasure(42.0)]
|
||||
assert subject.get_property_unit(prop, self.file) == length2
|
||||
|
||||
Reference in New Issue
Block a user