To this purpose, the Arch Site object has gained a couple of properties. Longitude and Latitude were there already, I added a couple more to set the North direction, and to set the diagram size and color.
For this to work, pysolar must be installed on the system.
For now this is it, it's just informative, but later on we can extend this to do all kinds of fancy things, shadow calculations, etc.
The functionality is also available from python:
Code: Select all
import ArchSite node = ArchSite.makeSolarDiagram(-46.38,-23.33) # longitude, latitude, [scale] FreeCADGui.ActiveDocument.ActiveView.getSceneGraph().addChild(node)