mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix bug where copying objects with profiles should only share profiles if the profile is named.
This commit is contained in:
@@ -38,8 +38,8 @@ class TestAddContext(test.bootstrap.IFC4):
|
||||
assert context.ContextType == "Plan"
|
||||
assert context.is_a() == "IfcGeometricRepresentationContext"
|
||||
assert context.WorldCoordinateSystem.is_a() == "IfcAxis2Placement2D"
|
||||
assert context.WorldCoordinateSystem.Location.Coordinates == (0, 0, 0)
|
||||
assert context.WorldCoordinateSystem.RefDirection.DirectionRatios == (1, 0, 0)
|
||||
assert context.WorldCoordinateSystem.Location.Coordinates == (0, 0)
|
||||
assert context.WorldCoordinateSystem.RefDirection.DirectionRatios == (1, 0)
|
||||
assert context.CoordinateSpaceDimension == 2
|
||||
|
||||
def test_defaulting_to_3d_with_an_unknown_context_type(self):
|
||||
|
||||
@@ -700,3 +700,10 @@ class TestCopyDeepIFC4(test.bootstrap.IFC4):
|
||||
rel.RelatedObjects = [element]
|
||||
rel2 = subject.copy_deep(self.file, rel, exclude=["IfcWall"])
|
||||
assert rel.RelatedObjects == rel2.RelatedObjects
|
||||
|
||||
def test_copying_an_element_recursively_with_aggregates_with_an_exclude_callback(self):
|
||||
element = self.file.createIfcWall(Name="name")
|
||||
rel = self.file.createIfcRelAggregates()
|
||||
rel.RelatedObjects = [element]
|
||||
rel2 = subject.copy_deep(self.file, rel, exclude_callback=lambda x: x.is_a("IfcWall"))
|
||||
assert rel.RelatedObjects == rel2.RelatedObjects
|
||||
|
||||
Reference in New Issue
Block a user