mirror of
https://github.com/brunopostle/ifcurl.git
synced 2026-07-12 02:08:13 +00:00
Implements the ifcgit/Bonsai diff algorithm for the preview service: diff.py: step_ids_from_diff() parses git diff text (regex on +#NNN= / -#NNN= lines) to classify step IDs as added/modified/removed. expand_step_ids() walks IfcShapeRepresentation, IfcObjectPlacement, IfcPropertySet, and IfcTypeProduct relationships to promote changed sub-entities to the parent IfcProduct that is visually affected. render.py: render_diff() does two passes over the same camera. Pass 1 renders the head model with green=added, blue=modified, ghost=unchanged. Pass 2 renders only the removed elements from the base model in red, using the camera auto-fitted to pass 1. PIL composites the passes: wherever pass 2 is not white background it stamps onto pass 1. Moved elements (modified) appear once in blue with no doubling artefact. git.py: diff_text() runs git diff against the cached bare repo clone and returns the raw text for diff.py to parse. service.py: GET+POST /render_diff endpoint. Fetches both commits, gets diff text, runs the full pipeline sandboxed. Caches on disk when both refs are immutable. Pillow added to render/service extras. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| test_auth.py | ||
| test_bcf.py | ||
| test_diff.py | ||
| test_git.py | ||
| test_render.py | ||
| test_sandbox.py | ||
| test_service.py | ||
| test_url.py | ||
| test_viewer_url.mjs | ||