Skip to content

Sunpath ​

The sun-path diagram overlay. Accessed via snaptrude.analysis.sunpath.

The sun-path diagram draws the sun's annual/daily trajectory arcs over the scene for the project's geographic location, so daylight behaviour can be read directly off the model. Toggling it is an undoable action — it goes through the command stack, so core.history.undo reverts it.

At a glance ​

MethodWhat it doesMutates?
enable()Turn the overlay ON (undoable)✓
disable()Turn the overlay OFF (undoable)✓
isActive()Whether the overlay is currently on—

Functions ​

enable() ​

Turn the sun-path diagram overlay ON. A no-op (returns true) when the overlay is already active.

  • Returns: boolean — true; the overlay is active after the call.
  • Throws: When the project has no geo-located site/terrain ("Site is needed"), or plugin writes are disabled.
ts
await snaptrude.analysis.sunpath.enable();
const active = await snaptrude.analysis.sunpath.isActive(); // true

disable() ​

Turn the sun-path diagram overlay OFF. A no-op (returns false) when the overlay is already off.

  • Returns: boolean — false; the overlay is inactive after the call.
  • Throws: When plugin writes are disabled.
ts
await snaptrude.analysis.sunpath.disable();

isActive() ​

Whether the sun-path diagram overlay is currently active. A pure read — never mutates, never throws.

  • Returns: boolean — true when the overlay is showing.
ts
if (!(await snaptrude.analysis.sunpath.isActive())) {
  await snaptrude.analysis.sunpath.enable();
}