Models the two retail buildings beside the hero from their own photograph rather than the generic kit: bronze cornice, mural row, lettering band, stepped Deco parapet and rounded corner tower on 6800 Lee Drug; burgundy fascia, pilasters, white-framed windows and banded parapet on 6806-6820. Reference analysis written before any geometry (Art/blender/retail/ref-analysis.md), every unmeasured proportion carried into the part report as an assumption. 6822 Budget is deferred, not guessed: no photograph of it exists and the 6.0 x 5.5 m sliver cannot be read out of the neighbour shot. Pipeline fixes found on the way: - render_screenshots.sh called ./Engine/... for the capture step while every commandlet used the absolute path; set -e killed the script at 127 *after* the maps were rebuilt, so screenshots silently stayed a day old. - the facade kit applies to every Frontage_*/North_* actor, so it pasted its own language over the new modelled facades; it now skips them, and the trim stages as RetailTrim_*. - pure bay arithmetic moved to Tools/_common.py so it is unit-testable without Blender (4 new tests, 82 total pass). Known gaps recorded in Screenshots/README.md, not hidden: the parapet reads as a blank band, murals and lettering do not resolve at review distance, the tower is a plain cylinder, and the review camera crops the east end.
28 lines
1010 B
Python
28 lines
1010 B
Python
"""Shared helpers that must stay importable outside Blender and Unreal.
|
|
|
|
Blender-side builders import `bpy` at module scope, so nothing in them can be unit
|
|
tested. Pure layout arithmetic lives here instead: the builders import it, and
|
|
`Tools/tests/` imports it without a 3D application.
|
|
|
|
Standard library only.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
def bay_centres(x0, x1, margin=0.9, bay=2.2):
|
|
"""Centres of equal bays across a frontage, inset by `margin` at each end.
|
|
|
|
Used by the façade kit and the retail frontage so both use one rhythm. The count
|
|
is the span divided by the bay module and rounded, so a 33 m frontage at a 2.2 m
|
|
module gets 14 bays rather than one bay per 2.2 m of wall with a stub at the end.
|
|
|
|
Returns [] when the margins consume the whole frontage.
|
|
"""
|
|
span = (x1 - x0) - 2.0 * margin
|
|
if span <= 0:
|
|
return []
|
|
count = max(1, int(round(span / bay)))
|
|
step = span / count
|
|
return [x0 + margin + step * (i + 0.5) for i in range(count)]
|