Fix render camera orientation so world up is up in frame

setViewDirection leaves camera roll unconstrained, so the aerials came
out with a tilted horizon. The camera orientation is now built explicitly
with world +Z projected as the frame up-vector.

Two FreeCAD quirks had to be worked around. setCameraOrientation() goes
through an animated setter (UseAnimation defaults on), so saveImage fired
mid-transition and the roll drifted; setting the Coin camera node
directly avoids the animation entirely. The first call after a standard
view also needs a second application to take, so each render now verifies
up.z equals cos(elevation) before saving and retries if not.

Also tightened framing 20%, since fitAll was zooming out to include the
road strip that runs well past the parcel.
This commit is contained in:
grabowski committed 2026-07-30 01:12:28 +07:00
1 parent 9aff3a5c24
commit ed987b4375
6 files changed

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

After

Width:  |  Height:  |  Size: 404 KiB