mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
074fc26e8f
is_camera_moved() runs eval()/numpy over the camera matrix and, as a side effect, refreshes the stored checksum the first time it returns True. It was called up to twice per object inside decorate(), so on a frame where the camera actually moved the first call updated the checksum and every later call - the fill check on the same object, and both checks on all remaining objects - then saw an already-current checksum and returned False. Only the first object's cut got recalculated; its fill and every other element stayed stale until something else invalidated the cache. Evaluate it once at the top of __call__ and reuse the flag. This halves the per-object eval overhead on the common path (viewport navigation with the camera object stationary) and, when the camera does move, correctly recalculates the cut and fill for every intersecting element instead of just the first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>