mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
black format
This commit is contained in:
@@ -402,7 +402,7 @@ class TestEditObjectPlacement(test.bootstrap.IFC4):
|
||||
"GlobalId": ifcopenshell.guid.new(),
|
||||
"RelatingElement": element,
|
||||
"RelatedFeatureElement": subelement,
|
||||
}
|
||||
},
|
||||
)
|
||||
ifcopenshell.api.run(
|
||||
"geometry.edit_object_placement", self.file, product=element, matrix=matrix.copy(), is_si=False
|
||||
@@ -572,7 +572,9 @@ class TestEditObjectPlacement(test.bootstrap.IFC4):
|
||||
should_transform_children=False,
|
||||
)
|
||||
assert numpy.array_equal(ifcopenshell.util.placement.get_local_placement(element.ObjectPlacement), submatrix)
|
||||
assert numpy.array_equal(ifcopenshell.util.placement.get_local_placement(subelement.ObjectPlacement), shifted_submatrix)
|
||||
assert numpy.array_equal(
|
||||
ifcopenshell.util.placement.get_local_placement(subelement.ObjectPlacement), shifted_submatrix
|
||||
)
|
||||
assert subelement.ObjectPlacement.PlacementRelTo == element.ObjectPlacement
|
||||
# old placement should be removed to avoid orphaned entities
|
||||
with pytest.raises(RuntimeError):
|
||||
@@ -609,7 +611,9 @@ class TestEditObjectPlacement(test.bootstrap.IFC4):
|
||||
should_transform_children=False,
|
||||
)
|
||||
assert numpy.array_equal(ifcopenshell.util.placement.get_local_placement(element.ObjectPlacement), submatrix)
|
||||
assert numpy.array_equal(ifcopenshell.util.placement.get_local_placement(subelement.ObjectPlacement), shifted_submatrix)
|
||||
assert numpy.array_equal(
|
||||
ifcopenshell.util.placement.get_local_placement(subelement.ObjectPlacement), shifted_submatrix
|
||||
)
|
||||
assert subelement.ObjectPlacement.PlacementRelTo == element.ObjectPlacement
|
||||
# old placement should be removed to avoid orphaned entities
|
||||
with pytest.raises(RuntimeError):
|
||||
|
||||
@@ -196,8 +196,14 @@ class TestCopyClass(test.bootstrap.IFC4):
|
||||
new = ifcopenshell.api.run("root.copy_class", self.file, product=element)
|
||||
assert new.HasAssociations[0].RelatingMaterial.is_a("IfcMaterialLayerSet")
|
||||
assert new.HasAssociations[0].RelatingMaterial != element.HasAssociations[0].RelatingMaterial
|
||||
assert new.HasAssociations[0].RelatingMaterial.MaterialLayers[0] != element.HasAssociations[0].RelatingMaterial.MaterialLayers[0]
|
||||
assert new.HasAssociations[0].RelatingMaterial.MaterialLayers[0].Material == element.HasAssociations[0].RelatingMaterial.MaterialLayers[0].Material
|
||||
assert (
|
||||
new.HasAssociations[0].RelatingMaterial.MaterialLayers[0]
|
||||
!= element.HasAssociations[0].RelatingMaterial.MaterialLayers[0]
|
||||
)
|
||||
assert (
|
||||
new.HasAssociations[0].RelatingMaterial.MaterialLayers[0].Material
|
||||
== element.HasAssociations[0].RelatingMaterial.MaterialLayers[0].Material
|
||||
)
|
||||
|
||||
def test_copying_a_type_and_purging_type_relationships(self):
|
||||
type = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWallType")
|
||||
|
||||
Reference in New Issue
Block a user