This commit is contained in:
2025-03-28 19:40:11 +06:00
parent af559092bf
commit 1d062a087f
26 changed files with 360 additions and 514 deletions

View File

@@ -28,33 +28,10 @@ from pathlib import Path
import sys
import os
import FreeCADGui
import FreeCAD
FreeCADGui.updateLocale()
try:
import PVPlantGeoreferencing, PVPlantPlacement, \
PVPlantTerrainAnalisys, PVPlantSite, PVPlantImportGrid, PVPlantFence, \
PVPlantFoundation, PVPlantCreateTerrainMesh, \
PVPlantTreeGenerator, PVPlantBuilding, PVPlantTrench, PVPlantEarthWorks, \
PVPlantStringing, \
PVPlantPad, PVPlantRoad, PVPlantTerrain, PVPlantManhole, \
GraphProfile, Utils.PVPlantTrace, \
reload
import PVPlantRackChecking
from Project.Area import PVPlantArea, PVPlantAreaUtils
from Project import ProjectSetup
from Importer import importDXF
from Mechanical.Frame import PVPlantFrame
from Electrical.Cable import PVPlantCable, PVPlantElectricalLine
from Electrical.CombinerBox import PVPlantStringBox
from Electrical.Inverter import PVPlantInverter
except ImportError as e:
print(f"Error importing modules: {e}")
class PVPlantWorkbench(Workbench):
from PVPlantResources import DirIcons as DirIcons
@@ -66,49 +43,22 @@ class PVPlantWorkbench(Workbench):
#sys.path.append(r"C:\Users\javie\AppData\Roaming\FreeCAD\Mod")
sys.path.append(os.path.join(FreeCAD.getUserAppDataDir(), 'Mod'))
import PVPlantTools
import PVPlantTools, reload
self.projectlist = PVPlantTools.projectlist
self.projectlist.insert(0, 'Reload')
self.projectlist.insert(1, 'Separator')
self.framelist = PVPlantTools.pv_list
from Export import ExporterCommands
self.inportExportlist = ExporterCommands.Exportlist
# A list of command names created in the line above
'''self.projectlist = ["Reload",
"PVPlantSite",
"PVPlantGeoreferencing",
"ProjectSetup",
# "ImportGrid",
"Terrain",
"PointsGroup",
"PVPlantCreateTerrainMesh",
"PVPlantAreas",
"SplitArea",
"TerrainAnalisys",
"Trenches",
"PVPlantEarthworks",
"PVPlantPad",
"PVPlantRoad",
"PVPlantManhole",
# "PVPlantFoundation"
"GraphTerrainProfile",
"Trace",
]'''
self.framelist = [
"RackType",
"PVPlantRackCheck",
"Separator",
"PVPlantPlacement",
"PVPlantAdjustToTerrain",
"PVPlantConvertTo",
"PVArea"
]
self.objectlist = [
"PVPlantTree",
"PVPlantBuilding",
"PVPlantFenceGroup",
]
from Export import ExporterCommands
self.inportExportlist = ExporterCommands.Exportlist
self.electricalList = ["PVPlantStringBox",
"PVPlantCable",
"PVPlanElectricalLine",
@@ -119,7 +69,6 @@ class PVPlantWorkbench(Workbench):
]
self.roads = ["PVPlantRoad",
]
self.pads = ["PVPlantPad",