summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kicadSchematicLibrary/eSim_Plot.dcm3
-rw-r--r--kicadSchematicLibrary/eSim_Plot.lib84
-rwxr-xr-xsrc/frontEnd/Application.py14
-rw-r--r--src/pspicetoKicad/ImportPspice.py173
-rw-r--r--src/pspicetoKicad/__init__.py0
-rw-r--r--src/pspicetoKicad/converter.exebin587797 -> 0 bytes
-rw-r--r--src/pspicetoKicad/libConverter.exebin533533 -> 0 bytes
-rwxr-xr-xsrc/pspicetoKicad/libConverter32bin203574 -> 0 bytes
-rw-r--r--src/pspicetoKicad/libConverter32.exebin482613 -> 0 bytes
-rwxr-xr-xsrc/pspicetoKicad/libConverter64bin231000 -> 0 bytes
-rwxr-xr-xsrc/pspicetoKicad/schConverter32bin230560 -> 0 bytes
-rw-r--r--src/pspicetoKicad/schConverter32.exebin528123 -> 0 bytes
-rwxr-xr-xsrc/pspicetoKicad/schConverter64bin259208 -> 0 bytes
13 files changed, 97 insertions, 177 deletions
diff --git a/kicadSchematicLibrary/eSim_Plot.dcm b/kicadSchematicLibrary/eSim_Plot.dcm
new file mode 100644
index 00000000..5f3ed79b
--- /dev/null
+++ b/kicadSchematicLibrary/eSim_Plot.dcm
@@ -0,0 +1,3 @@
+EESchema-DOCLIB Version 2.0
+#
+#End Doc Library
diff --git a/kicadSchematicLibrary/eSim_Plot.lib b/kicadSchematicLibrary/eSim_Plot.lib
new file mode 100644
index 00000000..b11a2dc9
--- /dev/null
+++ b/kicadSchematicLibrary/eSim_Plot.lib
@@ -0,0 +1,84 @@
+EESchema-LIBRARY Version 2.3
+#encoding utf-8
+#
+# plot_db
+#
+DEF plot_db U 0 40 Y Y 1 F N
+F0 "U" 0 500 60 H V C CNN
+F1 "plot_db" 200 350 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 500 100 0 1 0 N
+X ~ ~ 0 200 200 U 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# plot_i2
+#
+DEF plot_i2 U 0 40 Y Y 1 F N
+F0 "U" 0 400 60 H V C CNN
+F1 "plot_i2" 0 100 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 250 100 0 1 0 N
+X + ~ -300 250 200 R 50 50 1 1 I
+X - ~ 300 250 200 L 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# plot_log
+#
+DEF plot_log U 0 40 Y Y 1 F N
+F0 "U" 0 500 60 H V C CNN
+F1 "plot_log" 200 350 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 500 100 0 1 0 N
+X ~ ~ 0 200 200 U 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# plot_phase
+#
+DEF plot_phase U 0 40 Y Y 1 F N
+F0 "U" 0 500 60 H V C CNN
+F1 "plot_phase" 250 350 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 500 100 0 1 0 N
+X ~ ~ 0 200 200 U 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# plot_v1
+#
+DEF plot_v1 U 0 40 Y Y 1 F N
+F0 "U" 0 500 60 H V C CNN
+F1 "plot_v1" 200 350 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 500 100 0 1 0 N
+X ~ ~ 0 200 200 U 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# plot_v2
+#
+DEF plot_v2 U 0 40 Y Y 1 F N
+F0 "U" 0 400 60 H V C CNN
+F1 "plot_v2" 0 100 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 250 100 0 1 0 N
+X + ~ -300 250 200 R 50 50 1 1 I
+X - ~ 300 250 200 L 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index 55c36fb6..6e94cbd7 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -33,7 +33,7 @@ from projManagement import Worker
from frontEnd import ProjectExplorer
from frontEnd import Workspace
from frontEnd import DockArea
-from pspicetoKicad.ImportPspice import ImportPspiceLibrary,ConvertPspiceKicad
+#from pspicetoKicad.ImportPspice import ImportPspiceLibrary,ConvertPspiceKicad
import time
from PyQt4.Qt import QSize
@@ -83,7 +83,8 @@ class Application(QtGui.QMainWindow):
self.openproj = QtGui.QAction(QtGui.QIcon('../../images/openProject.png'),'<b>Open Project</b>',self)
self.openproj.setShortcut('Ctrl+O')
self.openproj.triggered.connect(self.open_project)
-
+ '''
+ #Removing as it no longer required
self.importPspiceLib = QtGui.QAction(QtGui.QIcon('../../images/import_icon.png'),'<b>Import PSPICE Library</b>',self)
self.importPspiceLib.setShortcut('Ctrl+X')
self.importPspiceLib.triggered.connect(self.import_pspice_lib)
@@ -91,7 +92,7 @@ class Application(QtGui.QMainWindow):
self.convertPspiceKicad = QtGui.QAction(QtGui.QIcon('../../images/Ps2Ki.png'),'<b>Convert PSPICE to KICAD</b>',self)
self.convertPspiceKicad.setShortcut('Ctrl+X')
self.convertPspiceKicad.triggered.connect(self.convert_pspice_kicad)
-
+ '''
self.exitproj = QtGui.QAction(QtGui.QIcon('../../images/closeProject.png'),'<b>Exit</b>',self)
self.exitproj.setShortcut('Ctrl+X')
self.exitproj.triggered.connect(self.exit_project)
@@ -103,8 +104,11 @@ class Application(QtGui.QMainWindow):
self.topToolbar = self.addToolBar('Top Tool Bar')
self.topToolbar.addAction(self.newproj)
self.topToolbar.addAction(self.openproj)
+ '''
+ #Removing as it is no longer require
self.topToolbar.addAction(self.importPspiceLib)
self.topToolbar.addAction(self.convertPspiceKicad)
+ '''
self.topToolbar.addAction(self.exitproj)
self.topToolbar.addAction(self.helpfile)
@@ -227,6 +231,8 @@ class Application(QtGui.QMainWindow):
pass
self.close()
+
+ '''
def import_pspice_lib(self):
print "Import Pspice Library is called"
@@ -243,7 +249,7 @@ class Application(QtGui.QMainWindow):
self.obj_run_converter = ConvertPspiceKicad()
self.obj_run_converter.runConverter()
-
+ '''
def help_project(self):
print "Help is called"
self.obj_appconfig.print_info('Help is called')
diff --git a/src/pspicetoKicad/ImportPspice.py b/src/pspicetoKicad/ImportPspice.py
deleted file mode 100644
index 6709b343..00000000
--- a/src/pspicetoKicad/ImportPspice.py
+++ /dev/null
@@ -1,173 +0,0 @@
-from PyQt4 import QtGui,QtCore
-from configuration.Appconfig import Appconfig
-import os
-import platform
-import shutil
-import glob
-
-class ImportPspiceLibrary(QtGui.QWidget):
- """
- This is used to import the Pspice Library and convert it inot Kicad library
- """
- def __init__(self):
- super(ImportPspiceLibrary, self).__init__()
- self.obj_Appconfig = Appconfig()
-
- def imortLib(self):
- self.home = os.path.expanduser("~")
- self.worspace_loc = self.obj_Appconfig.default_workspace['workspace']
- self.destinationLoc = os.path.join(self.worspace_loc,"ConvertedLib")
- self.libLocation = QtGui.QFileDialog.getOpenFileNames(self,"open",self.home,"*.slb")
- self.tempList = [] #Hold library file in the form of string
-
- if self.libLocation:
- for item in self.libLocation:
- self.tempList.append(str(item))
-
- self.obj_Appconfig.print_info('File selected : '+str(self.tempList))
- self.arg = ' '.join(self.tempList)
- #Create command to run
- if platform.system() == 'Linux':
- #Check for 32 or 64 bit
- if platform.architecture()[0] == '64bit':
- self.cmd = "../pspicetoKicad/libConverter64 "+self.arg
- else:
- self.cmd = "../pspicetoKicad/libConverter32 "+self.arg
- elif platform.system() == 'Windows':
- self.cmd = os.path.join(os.path.split(os.path.realpath(__file__))[0],'libConverter32.exe')
-
- self.status = os.system(str(self.cmd))
-
- if self.status == 0:
- self.libLocation = os.path.join(self.worspace_loc,"ConvertedLib")
-
- #Check if library is present
- if os.path.isdir(self.libLocation):
- pass
- else:
- os.mkdir(self.libLocation)
- try:
- #Moving files to necessary location
- for libfile in glob.glob('*.lib'):
- self.obj_Appconfig.print_info('Copying file '+libfile+' to ' +self.libLocation)
- shutil.copy(libfile, self.libLocation)
- self.obj_Appconfig.print_info('Removing file '+libfile)
- os.remove(libfile)
-
- self.msg = QtGui.QMessageBox()
- self.msgContent = "Successfully imported and converted PSPICE library to Kicad library.<br/>"
- self.msg.setTextFormat(QtCore.Qt.RichText)
- self.msg.setText(self.msgContent)
- self.msg.setWindowTitle("Message")
- self.obj_Appconfig.print_info(self.msgContent)
- self.msg.exec_()
- except Exception as e:
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage('Error while moving libaray to '+self.libLocation+ " "+str(e))
- self.obj_Appconfig.print_error('Error while moving libaray to '+self.libLocation+ " "+str(e))
- self.msg.setWindowTitle('Error Message')
- else:
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage('Error while converting PSPICE library to Kicad library')
- self.obj_Appconfig.print_error('Error while converting PSPICE library to Kicad library')
- self.msg.setWindowTitle("Error Message")
-
- else:
- self.obj_Appconfig.print_info('No files selected. Process Aborted')
-
-
-class ConvertPspiceKicad(QtGui.QWidget):
- """
- This is used to convert Pspice schematic into Kicad schematic
- """
- def __init__(self):
- super(ConvertPspiceKicad, self).__init__()
- self.obj_Appconfig = Appconfig()
-
- def runConverter(self):
- self.obj_Appconfig.print_info('Running PSPICE to Kicad converter')
- self.home = os.path.expanduser("~")
- self.worspace_loc = self.obj_Appconfig.default_workspace['workspace']
-
- self.pspiceSchFileLoc = QtGui.QFileDialog.getOpenFileName(self,"open",self.home)
-
- if self.pspiceSchFileLoc:
- self.pspiceSchFileName = os.path.basename(str(self.pspiceSchFileLoc))
- self.pspiceProjName = os.path.splitext(self.pspiceSchFileName)[0]
- self.outputDir = os.path.join(self.worspace_loc,self.pspiceProjName)
-
- #Check if project is already exists
- if os.path.isdir(self.outputDir):
- self.obj_Appconfig.print_info("Output Directory already present")
- self.obj_Appconfig.print_info("Output Project "+self.outputDir+" is already present")
- reply = QtGui.QMessageBox.question(self, 'Message',"eSim project with same name is already exist. Do you want to delete it ?", \
- QtGui.QMessageBox.Yes |QtGui.QMessageBox.No, QtGui.QMessageBox.No)
- if reply == QtGui.QMessageBox.Yes:
- print "Deleting Project and creating new"
- self.obj_Appconfig.print_info("Deleting Project and creating new")
- shutil.rmtree(self.outputDir, ignore_errors=False, onerror=self.errorRemove)
- os.mkdir(self.outputDir)
- #Calling Function
- self.createProjectFile(self.pspiceSchFileLoc,self.outputDir)
- else:
- self.msg = QtGui.QMessageBox()
- self.msgContent = "PSPICE to Kicad schematic conversion aborted.<br/>\
- You can change the Pspice schematic file name and upload it again.<br/>"
- self.msg.setTextFormat(QtCore.Qt.RichText)
- self.msg.setText(self.msgContent)
- self.msg.setWindowTitle("Message")
- self.obj_Appconfig.print_info(self.msgContent)
- self.msg.exec_()
- else:
- os.mkdir(self.outputDir)
- #Calling Function
- self.createProjectFile(self.pspiceSchFileLoc,self.outputDir)
- else:
- self.obj_Appconfig.print_info('No file selected. Process Aborted')
-
- def createProjectFile(self,pspiceSchFileLoc,outputDir):
- print "Create Project File is called"
- print "Schematic File Location---------->",pspiceSchFileLoc
- print "Output Directory-------------->",outputDir
-
- self.arg1 = pspiceSchFileLoc
- self.arg2 = os.path.join(outputDir,os.path.basename(str(pspiceSchFileLoc)))
-
- #print "Arg1----------->",self.arg1
- #print "Arg2----------->",self.arg2
- #Create command to be run
- if platform.system() == 'Linux':
- #Check for 32 or 64 bit
- if platform.architecture()[0] == '64bit':
- self.cmd = "../pspicetoKicad/schConverter64 "+self.arg1+" "+self.arg2
- else:
- self.cmd = "../pspicetoKicad/schConverter32 "+self.arg1+" "+self.arg2
- elif platform.system() == 'Windows':
- print "Needs to include for Windows"
- self.cmd = os.path.join(os.path.split(os.path.realpath(__file__))[0],'schConverter32.exe')+" "+self.arg1+" "+self.arg2
-
- #Running command
- self.status = os.system(str(self.cmd))
-
- if self.status == 0:
- self.msg = QtGui.QMessageBox()
- self.msgContent = "Successfully converted PSPICE schematic to Kicad Schematic.<br/>\
- Project is available in eSim workspace at <b>"+outputDir+"</b>.<br/>\
- You can open the project from eSim workspace"
- self.msg.setTextFormat(QtCore.Qt.RichText)
- self.msg.setText(self.msgContent)
- self.msg.setWindowTitle("Message")
- self.obj_Appconfig.print_info(self.msgContent)
- self.msg.exec_()
-
- else:
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage('Error while converting PSPICE schematic to Kicad Schematic')
- self.obj_Appconfig.print_error('Error while converting PSPICE schematic to Kicad Schematic')
- self.msg.setWindowTitle("Error Message")
-
- def errorRemove(self,func, path, exc):
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage('Error while removing existing project. <br/> Please check whether directory is Read only.')
- self.obj_Appconfig.print_error('Error while removing existing project')
- self.msg.setWindowTitle("Error Message")
diff --git a/src/pspicetoKicad/__init__.py b/src/pspicetoKicad/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/src/pspicetoKicad/__init__.py
+++ /dev/null
diff --git a/src/pspicetoKicad/converter.exe b/src/pspicetoKicad/converter.exe
deleted file mode 100644
index e7718811..00000000
--- a/src/pspicetoKicad/converter.exe
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/libConverter.exe b/src/pspicetoKicad/libConverter.exe
deleted file mode 100644
index 062cdc22..00000000
--- a/src/pspicetoKicad/libConverter.exe
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/libConverter32 b/src/pspicetoKicad/libConverter32
deleted file mode 100755
index 161c88c7..00000000
--- a/src/pspicetoKicad/libConverter32
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/libConverter32.exe b/src/pspicetoKicad/libConverter32.exe
deleted file mode 100644
index 06b2da79..00000000
--- a/src/pspicetoKicad/libConverter32.exe
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/libConverter64 b/src/pspicetoKicad/libConverter64
deleted file mode 100755
index 8e21f53a..00000000
--- a/src/pspicetoKicad/libConverter64
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/schConverter32 b/src/pspicetoKicad/schConverter32
deleted file mode 100755
index 731f33f7..00000000
--- a/src/pspicetoKicad/schConverter32
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/schConverter32.exe b/src/pspicetoKicad/schConverter32.exe
deleted file mode 100644
index dd531d77..00000000
--- a/src/pspicetoKicad/schConverter32.exe
+++ /dev/null
Binary files differ
diff --git a/src/pspicetoKicad/schConverter64 b/src/pspicetoKicad/schConverter64
deleted file mode 100755
index d8b8f928..00000000
--- a/src/pspicetoKicad/schConverter64
+++ /dev/null
Binary files differ