ifcpatch.recipes.MergeStyles

Module Contents

class ifcpatch.recipes.MergeStyles.Patcher(file: ifcopenshell.file, logger: logging.Logger | None = None)

Bases: ifcpatch.BasePatcher

Merge identical styles together

Some software may create an obscene number of styles instead of reusing them properly. This patch merges all IfcPresentationStyle, IfcSurfaceStyleShading, and IfcColourRgb if they are identical.

Example:

ifcpatch.execute({"file": model, "recipe": "MergeStyles", "arguments": []})
patch()