See #3682. You can now add symbols and multisymbols (i.e. one vertex per symbol) annotations. New default symbols for setout points in demo library.

This commit is contained in:
Dion Moult
2023-09-02 16:29:22 +10:00
parent f2097b9036
commit 294935ceed
8 changed files with 242 additions and 178 deletions
@@ -146,6 +146,9 @@ class LibraryGenerator:
self.create_type("IfcDoorType", "DT01", {"model_body": "Door", "plan_body": "Door-Plan"})
self.create_type("IfcFurnitureType", "BUN01", {"model_body": "Bunny", "plan_body": "Bunny-Plan"})
self.create_symbol_type("SETOUT-POINT", "setout-point")
self.create_symbol_type("CONTROL-POINT", "control-point")
self.create_symbol_type("TRAVERSE-POINT", "traverse-point")
self.create_line_type("DASHED", "dashed")
self.create_line_type("FINE", "fine")
self.create_line_type("THIN", "thin")
@@ -161,6 +164,12 @@ class LibraryGenerator:
self.file.write("IFC4 Demo Library.ifc")
def create_symbol_type(self, name, symbol):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcTypeProduct", name=name)
element.ApplicableOccurrence = "IfcAnnotation/SYMBOL"
pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="EPset_Annotation")
ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"Symbol": symbol})
def create_line_type(self, name, classes):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcTypeProduct", name=name)
element.ApplicableOccurrence = "IfcAnnotation/LINEWORK"