Open an IFC file into memory. Returns confirmation string.
(self, path: str)
| 237 | return {"ok": True, "schema": self.model.schema, "entities": sum(1 for _ in self.model)} |
| 238 | |
| 239 | def ifc_load(self, path: str) -> str: |
| 240 | """Open an IFC file into memory. Returns confirmation string.""" |
| 241 | self.model = ifcopenshell.open(path) |
| 242 | self.model_path = path |
| 243 | count = sum(1 for _ in self.model) |
| 244 | return f"Loaded {path}: schema {self.model.schema}, {count} entities" |
| 245 | |
| 246 | def ifc_save(self, path: str = "") -> str: |
| 247 | """Write the in-memory model to disk. Empty path overwrites the original file.""" |