This commit is contained in:
Andrej730
2025-07-15 11:19:32 +05:00
parent a461281b1e
commit f18c93c9ee
15 changed files with 65 additions and 44 deletions
@@ -17,17 +17,21 @@
# along with IfcPatch. If not, see <http://www.gnu.org/licenses/>.
import os
import logging
import math
import os
from typing import Union
import ifcpatch
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.unit
import ifcopenshell.util.schema
import ifcopenshell.util.element
import ifcopenshell.util.schema
import ifcopenshell.util.unit
class Patcher:
def __init__(self, file, logger):
class Patcher(ifcpatch.BasePatcher):
def __init__(self, file: ifcopenshell.file, logger: Union[logging.Logger, None] = None):
"""Fix missing door swings in Revit when viewing ArchiCAD IFCs
ArchiCAD has the ability to store 2D data with objects like doors for
@@ -56,10 +60,9 @@ class Patcher:
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "FixArchiCADToRevitDoorSwings", "arguments": []})
"""
self.file = file
self.logger = logger
super().__init__(file, logger)
def patch(self):
def patch(self) -> None:
# Revit has the ability to switch between 3D representations and 2D
# representations (e.g. in plan view). It does this by detecting IFC
# representations that belong to either the Model Body representation