mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
4a71ebdece
On the pythonOCC path (use_python_opencascade=True) the iterator emits
SERIALIZED elements, deserialized per element by create_shape_from_serialization.
For OCC >= 7.8 this used the single-argument breptools.ReadFromString(brep_data)
overload, which pythonOCC documents as allocating and returning a new
TopoDS_Shape on every call ("increases memory"); the by-reference overload
ReadFromString(brep_data, shape) exists specifically to prevent that growth.
Use the by-reference overload, with a TypeError fallback for older bindings
that only expose the single-argument form.
Generated with the assistance of an AI coding tool.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>