primera subida

This commit is contained in:
2025-01-28 00:04:13 +01:00
commit a91237c3e1
577 changed files with 457418 additions and 0 deletions

114
reload.py Normal file
View File

@@ -0,0 +1,114 @@
import FreeCAD
if FreeCAD.GuiUp:
import FreeCADGui, os
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
global __dir__
__dir__ = os.path.join(FreeCAD.getUserAppDataDir(), "Mod", "PVPlant")
class _CommandReload:
def GetResources(self):
return {'Pixmap': str(os.path.join(__dir__, "Resources", "Icons", "Reload.svg")),
'Accel': "R,E",
'MenuText': QT_TRANSLATE_NOOP("Reload","Reload"),
'ToolTip': QT_TRANSLATE_NOOP("Reload","Reload")}
def Activated(self):
import PVPlantPlacement, \
PVPlantGeoreferencing, PVPlantImportGrid, PVPlantTerrainAnalisys, \
PVPlantSite, PVPlantRackChecking, PVPlantFence, PVPlantFencePost, PVPlantFenceGate, \
PVPlantCreateTerrainMesh, \
PVPlantFoundation, PVPlantTreeGenerator, PVPlantBuilding, PVPlantTrench, PVPlantEarthWorks, PVPlantPad, \
PVPlantRoad, PVPlantTerrain, PVPlantStringing, PVPlantManhole, \
GraphProfile
from Mechanical.Frame import PVPlantFrame
from Project.Area import PVPlantArea, PVPlantAreaUtils
#from Importer import importDXF
from Export import PVPlantBOQCivil, PVPlantBOQElectrical, PVPlantBOQMechanical, exportPVSyst, exportDXF
from Utils import PVPlantUtils, PVPlantTrace, m_gui_edit, profile_editor, graphics
#from Lib import GoogleMapDownloader
from Electrical.Cable import PVPlantCable, PVPlantElectricalLine
from Electrical import Conduit
from Electrical.CombinerBox import PVPlantStringBox
from Electrical.Inverter import PVPlantInverter
from Export import layoutToExcel
import MeshTools.MeshGetBoundary as MeshGetBoundary
import MeshTools.Triangulation as Triangulation
from Project import ProjectSetup
import importlib
importlib.reload(ProjectSetup)
importlib.reload(PVPlantPlacement)
importlib.reload(PVPlantImportGrid)
importlib.reload(PVPlantGeoreferencing)
importlib.reload(PVPlantTerrainAnalisys)
importlib.reload(PVPlantSite)
importlib.reload(PVPlantFrame)
importlib.reload(PVPlantRackChecking)
importlib.reload(PVPlantFence)
importlib.reload(PVPlantFenceGate)
importlib.reload(PVPlantFencePost)
importlib.reload(PVPlantFoundation)
importlib.reload(PVPlantCreateTerrainMesh)
importlib.reload(PVPlantTreeGenerator)
importlib.reload(PVPlantBuilding)
importlib.reload(exportPVSyst)
importlib.reload(PVPlantTrench)
importlib.reload(PVPlantEarthWorks)
importlib.reload(PVPlantStringBox)
importlib.reload(PVPlantCable)
importlib.reload(PVPlantElectricalLine)
importlib.reload(PVPlantInverter)
importlib.reload(PVPlantPad)
importlib.reload(PVPlantRoad)
importlib.reload(PVPlantTerrain)
importlib.reload(PVPlantStringing)
importlib.reload(PVPlantBOQCivil)
importlib.reload(PVPlantBOQMechanical)
importlib.reload(PVPlantBOQElectrical)
importlib.reload(PVPlantArea)
importlib.reload(PVPlantAreaUtils)
importlib.reload(PVPlantUtils)
importlib.reload(PVPlantManhole)
importlib.reload(GraphProfile)
importlib.reload(PVPlantTrace)
importlib.reload(m_gui_edit)
importlib.reload(profile_editor)
importlib.reload(graphics)
importlib.reload(MeshGetBoundary)
importlib.reload(Triangulation)
#importlib.reload(importDXF)
importlib.reload(exportDXF)
importlib.reload(layoutToExcel)
importlib.reload(Conduit)
#importlib.reload(GoogleMapDownloader)
print("Reload modules...")
def IsActive(self):
if FreeCAD.ActiveDocument:
return True
else:
return False
if FreeCAD.GuiUp:
FreeCADGui.addCommand('Reload', _CommandReload())