update
This commit is contained in:
@@ -578,22 +578,22 @@ class _PVPlantSite(ArchSite._Site):
|
||||
|
||||
obj.addProperty("App::PropertyLink",
|
||||
"Boundary",
|
||||
"Site",
|
||||
"PVPlant",
|
||||
"Boundary of land")
|
||||
|
||||
obj.addProperty("App::PropertyLinkList",
|
||||
"Frames",
|
||||
"Site",
|
||||
"PVPlant",
|
||||
"Frames templates")
|
||||
|
||||
obj.addProperty("App::PropertyEnumeration",
|
||||
"UtmZone",
|
||||
"Base",
|
||||
"PVPlant",
|
||||
"UTM zone").UtmZone = zone_list
|
||||
|
||||
obj.addProperty("App::PropertyVector",
|
||||
"Origin",
|
||||
"Base",
|
||||
"PVPlant",
|
||||
"Origin point.").Origin = (0, 0, 0)
|
||||
|
||||
def onDocumentRestored(self, obj):
|
||||
@@ -771,10 +771,12 @@ class _PVPlantSite(ArchSite._Site):
|
||||
import PVPlantImportGrid
|
||||
x, y, zone_number, zone_letter = utm.from_latlon(lat, lon)
|
||||
self.obj.UtmZone = zone_list[zone_number - 1]
|
||||
# self.obj.UtmZone = "Z"+str(zone_number)
|
||||
#z = PVPlantImportGrid.get_elevation(lat, lon)
|
||||
zz = PVPlantImportGrid.getSinglePointElevationFromBing(lat, lon)
|
||||
self.obj.Origin = FreeCAD.Vector(x * 1000, y * 1000, zz.z)
|
||||
zz = PVPlantImportGrid.getElevationFromOE([[lat, lon]])
|
||||
self.obj.Origin = FreeCAD.Vector(x * 1000, y * 1000, zz[0].z)
|
||||
#self.obj.OriginOffset = FreeCAD.Vector(x * 1000, y * 1000, 0) #??
|
||||
self.obj.Latitude = lat
|
||||
self.obj.Longitude = lon
|
||||
self.obj.Elevation = zz[0].z
|
||||
|
||||
|
||||
class _ViewProviderSite(ArchSite._ViewProviderSite):
|
||||
|
||||
Reference in New Issue
Block a user