コード例 #1
0
ファイル: test_element.py プロジェクト: Krande/IfcOpenShell
 def test_getting_the_layer_of_a_type_product_representation(self):
     element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWallType")
     layer = ifcopenshell.api.run("layer.add_layer", self.file)
     representation = self.file.createIfcShapeRepresentation()
     element.RepresentationMaps = [self.file.createIfcRepresentationMap(MappedRepresentation=representation)]
     ifcopenshell.api.run("layer.assign_layer", self.file, item=representation, layer=layer)
     assert subject.get_layers(self.file, element) == [layer]
コード例 #2
0
ファイル: test_element.py プロジェクト: Krande/IfcOpenShell
 def test_getting_the_layer_of_a_product_representation(self):
     element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
     layer = ifcopenshell.api.run("layer.add_layer", self.file)
     representation = self.file.createIfcShapeRepresentation()
     element.Representation = self.file.createIfcProductDefinitionShape(Representations=[representation])
     ifcopenshell.api.run("layer.assign_layer", self.file, item=representation, layer=layer)
     assert subject.get_layers(self.file, element) == [layer]