ifcpatch.recipes.RecycleNonRootedElements

Module Contents

class ifcpatch.recipes.RecycleNonRootedElements.Patcher(src, file, logger)

Optimise the filesize of an IFC model by reusing non-rooted elements

It is possible to non-losslessly optimise the filesize of an IFC model.

Note that this is usually not recommended. Optimising runs a risk of losing some indirect semantic data critical for native IFC authoring. Most parties who recommend optimisation are not aware of these risks. Optimising is only safe in the context of read-only IFCs.

If filesize is an issue, another approach would be to use IFCZIP instead to compress the model. Optimising the model only typically affects filesize and has minimal impact on load times. Large filesizes can usually be solved through other means. Consult Bonsai documentation on dealing with large models for more details.

This patch may be run multiple times with diminishing returns.

Example:

ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "RecycleNonRootedElements", "arguments": []})
patch()
file
logger
src