@@ -0,0 +1,41 | |||||
|
1 | #------------------------------------------------- | |||
|
2 | # | |||
|
3 | # Project created by QtCreator 2015-06-11T21:37:25 | |||
|
4 | # | |||
|
5 | #------------------------------------------------- | |||
|
6 | ||||
|
7 | QT += core gui opengl | |||
|
8 | CONFIG += qilib | |||
|
9 | ||||
|
10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |||
|
11 | ||||
|
12 | TARGET = PCBView | |||
|
13 | TEMPLATE = app | |||
|
14 | ||||
|
15 | MOC_DIR = moc | |||
|
16 | RCC_DIR = resources | |||
|
17 | OBJECTS_DIR = obj | |||
|
18 | DESTDIR = ../../bin | |||
|
19 | ||||
|
20 | INCLUDEPATH += ../../qilib $${DESTDIR}/../qilib/ | |||
|
21 | ||||
|
22 | LIBS += -L../../bin -lQIlib | |||
|
23 | ||||
|
24 | SOURCES += main.cpp\ | |||
|
25 | mainwindow.cpp \ | |||
|
26 | pcbgraphicview.cpp \ | |||
|
27 | pcbrectpad.cpp \ | |||
|
28 | pcbmodule.cpp \ | |||
|
29 | pcbline.cpp \ | |||
|
30 | pcbcontext.cpp \ | |||
|
31 | pcbvia.cpp | |||
|
32 | ||||
|
33 | HEADERS += mainwindow.h \ | |||
|
34 | pcbgraphicview.h \ | |||
|
35 | pcbrectpad.h \ | |||
|
36 | pcbmodule.h \ | |||
|
37 | pcbline.h \ | |||
|
38 | pcbcontext.h \ | |||
|
39 | pcbvia.h | |||
|
40 | ||||
|
41 | FORMS += mainwindow.ui |
@@ -0,0 +1,32 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "mainwindow.h" | |||
|
23 | #include <QApplication> | |||
|
24 | ||||
|
25 | int main(int argc, char *argv[]) | |||
|
26 | { | |||
|
27 | QApplication a(argc, argv); | |||
|
28 | MainWindow w; | |||
|
29 | w.show(); | |||
|
30 | ||||
|
31 | return a.exec(); | |||
|
32 | } |
@@ -0,0 +1,87 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "mainwindow.h" | |||
|
23 | #include "ui_mainwindow.h" | |||
|
24 | #include "pcbmodule.h" | |||
|
25 | #include "pcbline.h" | |||
|
26 | #include "pcbvia.h" | |||
|
27 | ||||
|
28 | ||||
|
29 | MainWindow::MainWindow(QWidget *parent) : | |||
|
30 | QMainWindow(parent), | |||
|
31 | ui(new Ui::MainWindow) | |||
|
32 | { | |||
|
33 | ui->setupUi(this); | |||
|
34 | this->p_scene = new QGraphicsScene(); | |||
|
35 | this->p_scene->setSceneRect(0, 0, 500, 200); | |||
|
36 | ||||
|
37 | this->context = new PCBContext(); | |||
|
38 | this->ui->graphicsView->setScene(this->p_scene); | |||
|
39 | QIlib::QIcadPcb pcbDriver; | |||
|
40 | // pcbDriver.parsePcb("/opt/kicadTools/test/testFiles/pcb2.kicad_pcb"); | |||
|
41 | // pcbDriver.parsePcb("/home/jeandet/Documents/PCB/ADC_STAMP/ADC_STAMP.kicad_pcb"); | |||
|
42 | pcbDriver.parsePcb("/usr/share/kicad/demos/video/video.kicad_pcb"); | |||
|
43 | // pcbDriver.parsePcb("/usr/share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb"); | |||
|
44 | for(int i=0;i<pcbDriver.pcbRoot->layers.layers.count();i++) | |||
|
45 | { | |||
|
46 | this->context->addlayer(pcbDriver.pcbRoot->layers.layers.at(i)->name(),pcbDriver.pcbRoot->layers.layers.at(i)->index()); | |||
|
47 | } | |||
|
48 | for(int i=0;i<pcbDriver.pcbRoot->modules.count();i++) | |||
|
49 | { | |||
|
50 | this->p_scene->addItem(new PCBModule(pcbDriver.pcbRoot->modules.at(i),this->context)); | |||
|
51 | } | |||
|
52 | for(int i=0;i<pcbDriver.pcbRoot->lines.count();i++) | |||
|
53 | { | |||
|
54 | this->p_scene->addItem(new PCBLine((QIlib::QIcadAbstractPcbLine*)pcbDriver.pcbRoot->lines.at(i),this->context)); | |||
|
55 | } | |||
|
56 | for(int i=0;i<pcbDriver.pcbRoot->segments.count();i++) | |||
|
57 | { | |||
|
58 | this->p_scene->addItem(new PCBLine((QIlib::QIcadAbstractPcbLine*)pcbDriver.pcbRoot->segments.at(i),this->context)); | |||
|
59 | } | |||
|
60 | for(int i=0;i<pcbDriver.pcbRoot->vias.count();i++) | |||
|
61 | { | |||
|
62 | this->p_scene->addItem(new PCBVia(pcbDriver.pcbRoot->vias.at(i),this->context)); | |||
|
63 | } | |||
|
64 | connect(this->ui->actionRedraw,SIGNAL(triggered(bool)),this,SLOT(redraw())); | |||
|
65 | } | |||
|
66 | ||||
|
67 | MainWindow::~MainWindow() | |||
|
68 | { | |||
|
69 | delete ui; | |||
|
70 | } | |||
|
71 | ||||
|
72 | void MainWindow::redraw() | |||
|
73 | { | |||
|
74 | this->p_scene->update(); | |||
|
75 | } | |||
|
76 | ||||
|
77 | void MainWindow::changeEvent(QEvent *e) | |||
|
78 | { | |||
|
79 | QMainWindow::changeEvent(e); | |||
|
80 | switch (e->type()) { | |||
|
81 | case QEvent::LanguageChange: | |||
|
82 | ui->retranslateUi(this); | |||
|
83 | break; | |||
|
84 | default: | |||
|
85 | break; | |||
|
86 | } | |||
|
87 | } |
@@ -0,0 +1,57 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef MAINWINDOW_H | |||
|
23 | #define MAINWINDOW_H | |||
|
24 | ||||
|
25 | #include <QMainWindow> | |||
|
26 | #include <QGraphicsScene> | |||
|
27 | #include <qicadnetlist.h> | |||
|
28 | #include <qicadpcb.h> | |||
|
29 | #include <QMap> | |||
|
30 | #include <pcbcontext.h> | |||
|
31 | ||||
|
32 | ||||
|
33 | ||||
|
34 | namespace Ui { | |||
|
35 | class MainWindow; | |||
|
36 | } | |||
|
37 | ||||
|
38 | class MainWindow : public QMainWindow | |||
|
39 | { | |||
|
40 | Q_OBJECT | |||
|
41 | ||||
|
42 | public: | |||
|
43 | explicit MainWindow(QWidget *parent = 0); | |||
|
44 | ~MainWindow(); | |||
|
45 | ||||
|
46 | public slots: | |||
|
47 | void redraw(); | |||
|
48 | protected: | |||
|
49 | void changeEvent(QEvent *e); | |||
|
50 | ||||
|
51 | private: | |||
|
52 | Ui::MainWindow *ui; | |||
|
53 | QGraphicsScene* p_scene; | |||
|
54 | PCBContext* context; | |||
|
55 | }; | |||
|
56 | ||||
|
57 | #endif // MAINWINDOW_H |
@@ -0,0 +1,77 | |||||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |||
|
2 | <ui version="4.0"> | |||
|
3 | <class>MainWindow</class> | |||
|
4 | <widget class="QMainWindow" name="MainWindow"> | |||
|
5 | <property name="geometry"> | |||
|
6 | <rect> | |||
|
7 | <x>0</x> | |||
|
8 | <y>0</y> | |||
|
9 | <width>547</width> | |||
|
10 | <height>393</height> | |||
|
11 | </rect> | |||
|
12 | </property> | |||
|
13 | <property name="windowTitle"> | |||
|
14 | <string>MainWindow</string> | |||
|
15 | </property> | |||
|
16 | <widget class="QWidget" name="centralWidget"> | |||
|
17 | <layout class="QGridLayout" name="gridLayout"> | |||
|
18 | <item row="0" column="0"> | |||
|
19 | <widget class="PCBGraphicView" name="graphicsView"/> | |||
|
20 | </item> | |||
|
21 | </layout> | |||
|
22 | </widget> | |||
|
23 | <widget class="QMenuBar" name="menuBar"> | |||
|
24 | <property name="geometry"> | |||
|
25 | <rect> | |||
|
26 | <x>0</x> | |||
|
27 | <y>0</y> | |||
|
28 | <width>547</width> | |||
|
29 | <height>27</height> | |||
|
30 | </rect> | |||
|
31 | </property> | |||
|
32 | <widget class="QMenu" name="menuFile"> | |||
|
33 | <property name="title"> | |||
|
34 | <string>Fi&le</string> | |||
|
35 | </property> | |||
|
36 | <addaction name="actionOpen"/> | |||
|
37 | </widget> | |||
|
38 | <widget class="QMenu" name="menuEdit"> | |||
|
39 | <property name="title"> | |||
|
40 | <string>edit</string> | |||
|
41 | </property> | |||
|
42 | <addaction name="actionRedraw"/> | |||
|
43 | </widget> | |||
|
44 | <addaction name="menuFile"/> | |||
|
45 | <addaction name="menuEdit"/> | |||
|
46 | </widget> | |||
|
47 | <widget class="QToolBar" name="mainToolBar"> | |||
|
48 | <attribute name="toolBarArea"> | |||
|
49 | <enum>TopToolBarArea</enum> | |||
|
50 | </attribute> | |||
|
51 | <attribute name="toolBarBreak"> | |||
|
52 | <bool>false</bool> | |||
|
53 | </attribute> | |||
|
54 | </widget> | |||
|
55 | <widget class="QStatusBar" name="statusBar"/> | |||
|
56 | <action name="actionOpen"> | |||
|
57 | <property name="text"> | |||
|
58 | <string>&open</string> | |||
|
59 | </property> | |||
|
60 | </action> | |||
|
61 | <action name="actionRedraw"> | |||
|
62 | <property name="text"> | |||
|
63 | <string>&redraw</string> | |||
|
64 | </property> | |||
|
65 | </action> | |||
|
66 | </widget> | |||
|
67 | <layoutdefault spacing="6" margin="11"/> | |||
|
68 | <customwidgets> | |||
|
69 | <customwidget> | |||
|
70 | <class>PCBGraphicView</class> | |||
|
71 | <extends>QGraphicsView</extends> | |||
|
72 | <header>pcbgraphicview.h</header> | |||
|
73 | </customwidget> | |||
|
74 | </customwidgets> | |||
|
75 | <resources/> | |||
|
76 | <connections/> | |||
|
77 | </ui> |
@@ -0,0 +1,73 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbcontext.h" | |||
|
23 | ||||
|
24 | Qt::GlobalColor Colours[]= { | |||
|
25 | Qt::red, | |||
|
26 | Qt::blue, | |||
|
27 | Qt::black, | |||
|
28 | Qt::green, | |||
|
29 | Qt::darkGreen, | |||
|
30 | Qt::cyan, | |||
|
31 | Qt::darkRed, | |||
|
32 | Qt::gray, | |||
|
33 | Qt::yellow, | |||
|
34 | Qt::darkBlue, | |||
|
35 | Qt::darkCyan, | |||
|
36 | Qt::magenta, | |||
|
37 | Qt::darkMagenta, | |||
|
38 | Qt::darkYellow, | |||
|
39 | Qt::darkGray, | |||
|
40 | Qt::lightGray | |||
|
41 | }; | |||
|
42 | ||||
|
43 | PCBContext::PCBContext(QObject *parent) : QObject(parent) | |||
|
44 | { | |||
|
45 | ||||
|
46 | } | |||
|
47 | ||||
|
48 | void PCBContext::addlayer(const QString &name, int number) | |||
|
49 | { | |||
|
50 | this->layers_map[name]=number; | |||
|
51 | layers_colors[number] = Colours[number%15]; | |||
|
52 | } | |||
|
53 | ||||
|
54 | int PCBContext::layer(const QString &name) | |||
|
55 | { | |||
|
56 | return layers_map[name]; | |||
|
57 | } | |||
|
58 | ||||
|
59 | const QColor &PCBContext::layerColor(const QString &name) | |||
|
60 | { | |||
|
61 | return layers_colors[layers_map[name]]; | |||
|
62 | } | |||
|
63 | ||||
|
64 | const QColor &PCBContext::layerColor(int number) | |||
|
65 | { | |||
|
66 | return layers_colors[number]; | |||
|
67 | } | |||
|
68 | ||||
|
69 | const QString PCBContext::layer(int number) | |||
|
70 | { | |||
|
71 | return layers_map.key(number); | |||
|
72 | } | |||
|
73 |
@@ -0,0 +1,48 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBCONTEXT_H | |||
|
23 | #define PCBCONTEXT_H | |||
|
24 | ||||
|
25 | #include <QObject> | |||
|
26 | #include <QWidget> | |||
|
27 | #include <QMap> | |||
|
28 | ||||
|
29 | class PCBContext : public QObject | |||
|
30 | { | |||
|
31 | Q_OBJECT | |||
|
32 | public: | |||
|
33 | explicit PCBContext(QObject *parent = 0); | |||
|
34 | void addlayer(const QString& name,int number); | |||
|
35 | int layer(const QString& name); | |||
|
36 | const QColor& layerColor(const QString& name); | |||
|
37 | const QColor& layerColor(int number); | |||
|
38 | const QString layer(int number); | |||
|
39 | signals: | |||
|
40 | ||||
|
41 | public slots: | |||
|
42 | ||||
|
43 | private: | |||
|
44 | QMap<int,QColor> layers_colors; | |||
|
45 | QMap<QString,int> layers_map; | |||
|
46 | }; | |||
|
47 | ||||
|
48 | #endif // PCBCONTEXT_H |
@@ -0,0 +1,145 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbgraphicview.h" | |||
|
23 | ||||
|
24 | #include <math.h> | |||
|
25 | #include <QGLWidget> | |||
|
26 | ||||
|
27 | PCBGraphicView::PCBGraphicView(QWidget *parent) | |||
|
28 | :QGraphicsView(parent) | |||
|
29 | { | |||
|
30 | ||||
|
31 | this->setRenderHint(QPainter::Antialiasing, true); | |||
|
32 | this->setDragMode(QGraphicsView::RubberBandDrag); | |||
|
33 | this->setOptimizationFlags(QGraphicsView::DontSavePainterState); | |||
|
34 | this->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate); | |||
|
35 | ||||
|
36 | this->setContextMenuPolicy(Qt::ActionsContextMenu); | |||
|
37 | this->setTransformationAnchor(AnchorUnderMouse); | |||
|
38 | this->scale(qreal(0.8), qreal(0.8)); | |||
|
39 | this->setRubberBandSelectionMode(Qt::ContainsItemBoundingRect); | |||
|
40 | this->setDragMode(RubberBandDrag); | |||
|
41 | this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | |||
|
42 | this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | |||
|
43 | ||||
|
44 | this->ctrl_pressed = false; | |||
|
45 | this->shift_pressed = false; | |||
|
46 | } | |||
|
47 | ||||
|
48 | ||||
|
49 | void PCBGraphicView::keyPressEvent(QKeyEvent *event) | |||
|
50 | { | |||
|
51 | switch (event->key()) { | |||
|
52 | case Qt::Key_Plus: | |||
|
53 | zoomIn(); | |||
|
54 | break; | |||
|
55 | case Qt::Key_Minus: | |||
|
56 | zoomOut(); | |||
|
57 | break; | |||
|
58 | case Qt::Key_Shift: | |||
|
59 | this->shift_pressed = true; | |||
|
60 | break; | |||
|
61 | case Qt::Key_Control: | |||
|
62 | this->ctrl_pressed = true; | |||
|
63 | break; | |||
|
64 | default: | |||
|
65 | QGraphicsView::keyPressEvent(event); | |||
|
66 | } | |||
|
67 | } | |||
|
68 | ||||
|
69 | void PCBGraphicView::keyReleaseEvent(QKeyEvent *event) | |||
|
70 | { | |||
|
71 | switch (event->key()) { | |||
|
72 | case Qt::Key_Shift: | |||
|
73 | this->shift_pressed = false; | |||
|
74 | break; | |||
|
75 | case Qt::Key_Control: | |||
|
76 | this->ctrl_pressed = false; | |||
|
77 | break; | |||
|
78 | default: | |||
|
79 | QGraphicsView::keyReleaseEvent(event); | |||
|
80 | } | |||
|
81 | } | |||
|
82 | ||||
|
83 | void PCBGraphicView::wheelEvent(QWheelEvent *event) | |||
|
84 | { | |||
|
85 | ||||
|
86 | if (event->modifiers() & Qt::ControlModifier) | |||
|
87 | { | |||
|
88 | if (event->orientation()== Qt::Vertical) | |||
|
89 | scaleView(pow((double)2, event->delta() / 240.0)); | |||
|
90 | } | |||
|
91 | else | |||
|
92 | { | |||
|
93 | if (event->modifiers() & Qt::ShiftModifier) | |||
|
94 | { | |||
|
95 | QWheelEvent* tempevent = new QWheelEvent(event->pos(),(event->delta()/10),event->buttons(),event->modifiers(),Qt::Horizontal); | |||
|
96 | QGraphicsView::wheelEvent(tempevent); | |||
|
97 | } | |||
|
98 | else | |||
|
99 | QGraphicsView::wheelEvent(event); | |||
|
100 | } | |||
|
101 | } | |||
|
102 | ||||
|
103 | ||||
|
104 | ||||
|
105 | void PCBGraphicView::drawBackground(QPainter *painter, const QRectF &rect) | |||
|
106 | { | |||
|
107 | Q_UNUSED(rect); | |||
|
108 | ||||
|
109 | // Shadow | |||
|
110 | QRectF sceneRect = this->sceneRect(); | |||
|
111 | QRectF rightShadow(sceneRect.right(), sceneRect.top() + 20, 20, sceneRect.height()); | |||
|
112 | QRectF bottomShadow(sceneRect.left() + 20, sceneRect.bottom(), sceneRect.width(), 20); | |||
|
113 | if (rightShadow.intersects(rect) || rightShadow.contains(rect)) | |||
|
114 | painter->fillRect(rightShadow, Qt::darkGray); | |||
|
115 | if (bottomShadow.intersects(rect) || bottomShadow.contains(rect)) | |||
|
116 | painter->fillRect(bottomShadow, Qt::darkGray); | |||
|
117 | ||||
|
118 | // Fill | |||
|
119 | QLinearGradient gradient(sceneRect.topLeft(), sceneRect.bottomRight()); | |||
|
120 | gradient.setColorAt(0, Qt::white); | |||
|
121 | gradient.setColorAt(1, Qt::lightGray); | |||
|
122 | painter->fillRect(rect.intersected(sceneRect), gradient); | |||
|
123 | painter->setBrush(Qt::NoBrush); | |||
|
124 | painter->drawRect(sceneRect); | |||
|
125 | } | |||
|
126 | ||||
|
127 | ||||
|
128 | void PCBGraphicView::scaleView(qreal scaleFactor) | |||
|
129 | { | |||
|
130 | qreal factor = transform().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width(); | |||
|
131 | if (factor < 0.02 || factor > 1000) | |||
|
132 | return; | |||
|
133 | scale(scaleFactor, scaleFactor); | |||
|
134 | } | |||
|
135 | ||||
|
136 | ||||
|
137 | void PCBGraphicView::zoomIn() | |||
|
138 | { | |||
|
139 | scaleView(qreal(1.2)); | |||
|
140 | } | |||
|
141 | ||||
|
142 | void PCBGraphicView::zoomOut() | |||
|
143 | { | |||
|
144 | scaleView(1 / qreal(1.2)); | |||
|
145 | } |
@@ -0,0 +1,54 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBGRAPHICVIEW_H | |||
|
23 | #define PCBGRAPHICVIEW_H | |||
|
24 | ||||
|
25 | #include <QGraphicsView> | |||
|
26 | #include <QObject> | |||
|
27 | #include <QWidget> | |||
|
28 | #include <QKeyEvent> | |||
|
29 | #include <QPainter> | |||
|
30 | #include <QMap> | |||
|
31 | ||||
|
32 | class PCBGraphicView : public QGraphicsView | |||
|
33 | { | |||
|
34 | public: | |||
|
35 | PCBGraphicView(QWidget *parent = 0); | |||
|
36 | void itemMoved(); | |||
|
37 | ||||
|
38 | public slots: | |||
|
39 | void zoomIn(); | |||
|
40 | void zoomOut(); | |||
|
41 | ||||
|
42 | protected: | |||
|
43 | void keyPressEvent(QKeyEvent *event); | |||
|
44 | void keyReleaseEvent(QKeyEvent *event); | |||
|
45 | void wheelEvent(QWheelEvent *event); | |||
|
46 | void drawBackground(QPainter *painter, const QRectF &rect); | |||
|
47 | ||||
|
48 | void scaleView(qreal scaleFactor); | |||
|
49 | private: | |||
|
50 | bool ctrl_pressed; | |||
|
51 | bool shift_pressed; | |||
|
52 | }; | |||
|
53 | ||||
|
54 | #endif // PCBGRAPHICVIEW_H |
@@ -0,0 +1,52 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbline.h" | |||
|
23 | #include <QPen> | |||
|
24 | ||||
|
25 | PCBLine::PCBLine(QIlib::QIcadAbstractPcbLine *lineNode, QPointF offset,PCBContext* context) | |||
|
26 | :lineNode(lineNode),context(context) | |||
|
27 | { | |||
|
28 | init(offset); | |||
|
29 | } | |||
|
30 | ||||
|
31 | PCBLine::PCBLine(QIlib::QIcadAbstractPcbLine *lineNode, PCBContext *context) | |||
|
32 | :lineNode(lineNode),context(context) | |||
|
33 | { | |||
|
34 | init(QPointF(0,0)); | |||
|
35 | } | |||
|
36 | ||||
|
37 | void PCBLine::init(QPointF offset) | |||
|
38 | { | |||
|
39 | this->setCacheMode(QGraphicsItem::DeviceCoordinateCache); | |||
|
40 | this->setFlags(ItemIsMovable|ItemIsSelectable|ItemIsFocusable); | |||
|
41 | QPointF startPos=(offset+lineNode->startPos()); | |||
|
42 | QPointF stopPos=(offset+lineNode->stopPos()); | |||
|
43 | this->setLine(startPos.x(),startPos.y(),stopPos.x(),stopPos.y()); | |||
|
44 | QPen pen = this->pen(); | |||
|
45 | pen.setWidthF(lineNode->width()); | |||
|
46 | pen.setJoinStyle(Qt::RoundJoin); | |||
|
47 | pen.setCapStyle(Qt::RoundCap); | |||
|
48 | pen.setColor(context->layerColor(lineNode->layers().first())); | |||
|
49 | this->setZValue(-context->layer(lineNode->layers().first())); | |||
|
50 | this->setPen(pen); | |||
|
51 | setOpacity(0.6); | |||
|
52 | } |
@@ -0,0 +1,42 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBLINE_H | |||
|
23 | #define PCBLINE_H | |||
|
24 | ||||
|
25 | #include <QObject> | |||
|
26 | #include <QGraphicsItem> | |||
|
27 | #include <QGraphicsLineItem> | |||
|
28 | #include <qicadpcb.h> | |||
|
29 | #include <pcbcontext.h> | |||
|
30 | ||||
|
31 | class PCBLine: public QGraphicsLineItem | |||
|
32 | { | |||
|
33 | public: | |||
|
34 | PCBLine(QIlib::QIcadAbstractPcbLine* lineNode,QPointF offset,PCBContext* context); | |||
|
35 | PCBLine(QIlib::QIcadAbstractPcbLine* lineNode,PCBContext* context); | |||
|
36 | private: | |||
|
37 | void init(QPointF offset); | |||
|
38 | QIlib::QIcadAbstractPcbLine* lineNode; | |||
|
39 | PCBContext* context; | |||
|
40 | }; | |||
|
41 | ||||
|
42 | #endif // PCBLINE_H |
@@ -0,0 +1,44 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbmodule.h" | |||
|
23 | #include "pcbline.h" | |||
|
24 | #include "pcbrectpad.h" | |||
|
25 | ||||
|
26 | PCBModule::PCBModule(QIlib::QIcadPcbModule *moduleNode, PCBContext *context) | |||
|
27 | :QGraphicsItemGroup(),context(context) | |||
|
28 | { | |||
|
29 | this->setCacheMode(QGraphicsItem::DeviceCoordinateCache); | |||
|
30 | this->setFlags(ItemIsMovable|ItemIsSelectable|ItemIsFocusable); | |||
|
31 | // this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); | |||
|
32 | // this->addToGroup(new QGraphicsRectItem(0,0,2,2)); | |||
|
33 | this->setPos(moduleNode->pos()); | |||
|
34 | for(int i=0;i<moduleNode->fp_lines.count();i++) | |||
|
35 | { | |||
|
36 | this->addToGroup(new PCBLine((QIlib::QIcadAbstractPcbLine*)moduleNode->fp_lines.at(i),moduleNode->pos(),context)); | |||
|
37 | } | |||
|
38 | for(int i=0;i<moduleNode->pads.count();i++) | |||
|
39 | { | |||
|
40 | this->addToGroup(new PCBRectPad((QIlib::QIcadPcbPad*)moduleNode->pads.at(i),moduleNode->pos(),context)); | |||
|
41 | } | |||
|
42 | this->setRotation(moduleNode->angle()); | |||
|
43 | } | |||
|
44 |
@@ -0,0 +1,40 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBMODULE_H | |||
|
23 | #define PCBMODULE_H | |||
|
24 | ||||
|
25 | #include <QObject> | |||
|
26 | #include <QWidget> | |||
|
27 | #include <QGraphicsItemGroup> | |||
|
28 | #include <qicadpcb.h> | |||
|
29 | #include <pcbcontext.h> | |||
|
30 | ||||
|
31 | class PCBModule : public QGraphicsItemGroup | |||
|
32 | { | |||
|
33 | public: | |||
|
34 | PCBModule(QIlib::QIcadPcbModule* moduleNode,PCBContext* context); | |||
|
35 | private: | |||
|
36 | QIlib::QIcadPcbModule* moduleNode; | |||
|
37 | PCBContext* context; | |||
|
38 | }; | |||
|
39 | ||||
|
40 | #endif // PCBMODULE_H |
@@ -0,0 +1,80 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbrectpad.h" | |||
|
23 | #include <QPen> | |||
|
24 | ||||
|
25 | PCBRectPad::PCBRectPad(QIlib::QIcadPcbPad *padNode, PCBContext *context) | |||
|
26 | :QGraphicsItemGroup(),padNode(padNode),context(context) | |||
|
27 | { | |||
|
28 | this->init(QPointF(0.0,0.0)); | |||
|
29 | } | |||
|
30 | ||||
|
31 | ||||
|
32 | ||||
|
33 | PCBRectPad::PCBRectPad(QIlib::QIcadPcbPad *padNode, QPointF offset, PCBContext *context) | |||
|
34 | :QGraphicsItemGroup(),padNode(padNode),context(context) | |||
|
35 | { | |||
|
36 | this->init(offset); | |||
|
37 | } | |||
|
38 | ||||
|
39 | void PCBRectPad::init( QPointF offset) | |||
|
40 | { | |||
|
41 | this->setCacheMode(QGraphicsItem::DeviceCoordinateCache); | |||
|
42 | offset-=QPointF(this->padNode->size().width()/2,this->padNode->size().height()/2); | |||
|
43 | if(this->padNode->shape()==QIlib::QIcadPcbPad::rectangle) | |||
|
44 | { | |||
|
45 | for(int i=0;i<this->padNode->layers().count();i++) | |||
|
46 | { | |||
|
47 | QGraphicsRectItem* rect = new QGraphicsRectItem(); | |||
|
48 | QPen pen = rect->pen(); | |||
|
49 | pen.setWidthF(0.01); | |||
|
50 | rect->setPen(pen); | |||
|
51 | QBrush brush = rect->brush(); | |||
|
52 | brush.setStyle(Qt::SolidPattern); | |||
|
53 | brush.setColor(context->layerColor(this->padNode->layers().at(i))); | |||
|
54 | rect->setBrush(brush); | |||
|
55 | QRectF rec(this->padNode->pos()+offset,this->padNode->size()); | |||
|
56 | rect->setRect(rec); | |||
|
57 | rect->setZValue(-context->layer(padNode->layers().at(i))); | |||
|
58 | this->addToGroup(rect); | |||
|
59 | } | |||
|
60 | } | |||
|
61 | if(this->padNode->shape()==QIlib::QIcadPcbPad::circle) | |||
|
62 | { | |||
|
63 | for(int i=0;i<this->padNode->layers().count();i++) | |||
|
64 | { | |||
|
65 | QGraphicsEllipseItem* ellipse = new QGraphicsEllipseItem(); | |||
|
66 | QPen pen = ellipse->pen(); | |||
|
67 | pen.setWidthF(0.01); | |||
|
68 | ellipse->setPen(pen); | |||
|
69 | QBrush brush = ellipse->brush(); | |||
|
70 | brush.setStyle(Qt::SolidPattern); | |||
|
71 | brush.setColor(context->layerColor(this->padNode->layers().at(i))); | |||
|
72 | ellipse->setBrush(brush); | |||
|
73 | QRectF rec(this->padNode->pos()+offset,this->padNode->size()); | |||
|
74 | ellipse->setRect(rec); | |||
|
75 | ellipse->setZValue(-context->layer(padNode->layers().at(i))); | |||
|
76 | this->addToGroup(ellipse); | |||
|
77 | } | |||
|
78 | } | |||
|
79 | setOpacity(0.6); | |||
|
80 | } |
@@ -0,0 +1,48 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBRECTPAD_H | |||
|
23 | #define PCBRECTPAD_H | |||
|
24 | ||||
|
25 | #include <QObject> | |||
|
26 | #include <QWidget> | |||
|
27 | #include <QGraphicsRectItem> | |||
|
28 | #include <QGraphicsItemGroup> | |||
|
29 | #include <pcbcontext.h> | |||
|
30 | #include <qicadpcb.h> | |||
|
31 | ||||
|
32 | class PCBRectPad : public QGraphicsItemGroup | |||
|
33 | { | |||
|
34 | public: | |||
|
35 | PCBRectPad(QIlib::QIcadPcbPad* padNode,PCBContext* context); | |||
|
36 | PCBRectPad(QIlib::QIcadPcbPad* padNode,QPointF offset,PCBContext* context); | |||
|
37 | ||||
|
38 | private: | |||
|
39 | void init(QPointF offset); | |||
|
40 | QIlib::QIcadPcbPad* padNode; | |||
|
41 | QString name; | |||
|
42 | QPointF pos; | |||
|
43 | QRectF size; | |||
|
44 | QList<int> layers; | |||
|
45 | PCBContext* context; | |||
|
46 | }; | |||
|
47 | ||||
|
48 | #endif // PCBRECTPAD_H |
@@ -0,0 +1,60 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #include "pcbvia.h" | |||
|
23 | #include <QPen> | |||
|
24 | ||||
|
25 | ||||
|
26 | PCBVia::PCBVia(QIlib::QIcadPcbVia *viaNode, PCBContext *context) | |||
|
27 | :QGraphicsItemGroup(),viaNode(viaNode),context(context) | |||
|
28 | { | |||
|
29 | this->init(QPointF(0.0,0.0)); | |||
|
30 | } | |||
|
31 | ||||
|
32 | PCBVia::PCBVia(QIlib::QIcadPcbVia *viaNode, QPointF offset, PCBContext *context) | |||
|
33 | :QGraphicsItemGroup(),viaNode(viaNode),context(context) | |||
|
34 | { | |||
|
35 | this->init(offset); | |||
|
36 | } | |||
|
37 | ||||
|
38 | void PCBVia::init(QPointF offset) | |||
|
39 | { | |||
|
40 | this->setCacheMode(QGraphicsItem::DeviceCoordinateCache); | |||
|
41 | offset-=QPointF(this->viaNode->size().width()/2,this->viaNode->size().height()/2); | |||
|
42 | ||||
|
43 | for(int i=0;i<this->viaNode->layers().count();i++) | |||
|
44 | { | |||
|
45 | QGraphicsEllipseItem* ellipse = new QGraphicsEllipseItem(); | |||
|
46 | QPen pen = ellipse->pen(); | |||
|
47 | pen.setWidthF(0.01); | |||
|
48 | ellipse->setPen(pen); | |||
|
49 | QBrush brush = ellipse->brush(); | |||
|
50 | brush.setStyle(Qt::SolidPattern); | |||
|
51 | brush.setColor(context->layerColor(this->viaNode->layers().at(i))); | |||
|
52 | ellipse->setBrush(brush); | |||
|
53 | QRectF rec(this->viaNode->pos()+offset,this->viaNode->size()); | |||
|
54 | ellipse->setRect(rec); | |||
|
55 | ellipse->setZValue(-context->layer(viaNode->layers().at(i))); | |||
|
56 | this->addToGroup(ellipse); | |||
|
57 | } | |||
|
58 | ||||
|
59 | setOpacity(0.6); | |||
|
60 | } |
@@ -0,0 +1,46 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the Kicad Tools Software | |||
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef PCBVIA_H | |||
|
23 | #define PCBVIA_H | |||
|
24 | #include <QObject> | |||
|
25 | #include <QWidget> | |||
|
26 | #include <QGraphicsRectItem> | |||
|
27 | #include <QGraphicsItemGroup> | |||
|
28 | #include <pcbcontext.h> | |||
|
29 | #include <qicadpcb.h> | |||
|
30 | ||||
|
31 | class PCBVia: public QGraphicsItemGroup | |||
|
32 | { | |||
|
33 | public: | |||
|
34 | PCBVia(QIlib::QIcadPcbVia* viaNode,PCBContext* context); | |||
|
35 | PCBVia(QIlib::QIcadPcbVia* viaNode,QPointF offset,PCBContext* context); | |||
|
36 | private: | |||
|
37 | void init(QPointF offset); | |||
|
38 | QIlib::QIcadPcbVia* viaNode; | |||
|
39 | QString name; | |||
|
40 | QPointF pos; | |||
|
41 | QRectF size; | |||
|
42 | QList<int> layers; | |||
|
43 | PCBContext* context; | |||
|
44 | }; | |||
|
45 | ||||
|
46 | #endif // PCBVIA_H |
This diff has been collapsed as it changes many lines, (776 lines changed) Show them Hide them | |||||
@@ -0,0 +1,776 | |||||
|
1 | (kicad_pcb (version 4) (host pcbnew "(after 2015-mar-04 BZR unknown)-product") | |||
|
2 | ||||
|
3 | (general | |||
|
4 | (links 5) | |||
|
5 | (no_connects 0) | |||
|
6 | (area 125.75 89.15 189.850001 130.750001) | |||
|
7 | (thickness 1.6) | |||
|
8 | (drawings 6) | |||
|
9 | (tracks 11) | |||
|
10 | (zones 0) | |||
|
11 | (modules 6) | |||
|
12 | (nets 30) | |||
|
13 | ) | |||
|
14 | ||||
|
15 | (page A4) | |||
|
16 | (layers | |||
|
17 | (0 F.Cu signal) | |||
|
18 | (31 B.Cu signal) | |||
|
19 | (32 B.Adhes user) | |||
|
20 | (33 F.Adhes user) | |||
|
21 | (34 B.Paste user) | |||
|
22 | (35 F.Paste user) | |||
|
23 | (36 B.SilkS user) | |||
|
24 | (37 F.SilkS user) | |||
|
25 | (38 B.Mask user) | |||
|
26 | (39 F.Mask user) | |||
|
27 | (40 Dwgs.User user) | |||
|
28 | (41 Cmts.User user) | |||
|
29 | (42 Eco1.User user) | |||
|
30 | (43 Eco2.User user) | |||
|
31 | (44 Edge.Cuts user) | |||
|
32 | (45 Margin user) | |||
|
33 | (46 B.CrtYd user) | |||
|
34 | (47 F.CrtYd user) | |||
|
35 | (48 B.Fab user) | |||
|
36 | (49 F.Fab user) | |||
|
37 | ) | |||
|
38 | ||||
|
39 | (setup | |||
|
40 | (last_trace_width 0.25) | |||
|
41 | (trace_clearance 0.2) | |||
|
42 | (zone_clearance 0.508) | |||
|
43 | (zone_45_only yes) | |||
|
44 | (trace_min 0.2) | |||
|
45 | (segment_width 0.2) | |||
|
46 | (edge_width 0.1) | |||
|
47 | (via_size 0.6) | |||
|
48 | (via_drill 0.4) | |||
|
49 | (via_min_size 0.4) | |||
|
50 | (via_min_drill 0.3) | |||
|
51 | (uvia_size 0.3) | |||
|
52 | (uvia_drill 0.1) | |||
|
53 | (uvias_allowed no) | |||
|
54 | (uvia_min_size 0.2) | |||
|
55 | (uvia_min_drill 0.1) | |||
|
56 | (pcb_text_width 0.3) | |||
|
57 | (pcb_text_size 1.5 1.5) | |||
|
58 | (mod_edge_width 0.15) | |||
|
59 | (mod_text_size 1 1) | |||
|
60 | (mod_text_width 0.15) | |||
|
61 | (pad_size 1.5 1.5) | |||
|
62 | (pad_drill 0.6) | |||
|
63 | (pad_to_mask_clearance 0) | |||
|
64 | (aux_axis_origin 0 0) | |||
|
65 | (visible_elements FFFFFF7F) | |||
|
66 | (pcbplotparams | |||
|
67 | (layerselection 0x00030_80000001) | |||
|
68 | (usegerberextensions false) | |||
|
69 | (excludeedgelayer true) | |||
|
70 | (linewidth 0.100000) | |||
|
71 | (plotframeref false) | |||
|
72 | (viasonmask false) | |||
|
73 | (mode 1) | |||
|
74 | (useauxorigin false) | |||
|
75 | (hpglpennumber 1) | |||
|
76 | (hpglpenspeed 20) | |||
|
77 | (hpglpendiameter 15) | |||
|
78 | (hpglpenoverlay 2) | |||
|
79 | (psnegative false) | |||
|
80 | (psa4output false) | |||
|
81 | (plotreference true) | |||
|
82 | (plotvalue true) | |||
|
83 | (plotinvisibletext false) | |||
|
84 | (padsonsilk false) | |||
|
85 | (subtractmaskfromsilk false) | |||
|
86 | (outputformat 1) | |||
|
87 | (mirror false) | |||
|
88 | (drillshape 1) | |||
|
89 | (scaleselection 1) | |||
|
90 | (outputdirectory "")) | |||
|
91 | ) | |||
|
92 | ||||
|
93 | (net 0 "") | |||
|
94 | (net 1 "Net-(R101-Pad1)") | |||
|
95 | (net 2 "Net-(R101-Pad2)") | |||
|
96 | (net 3 "Net-(R102-Pad1)") | |||
|
97 | (net 4 "Net-(R103-Pad1)") | |||
|
98 | (net 5 "Net-(U101-Pad2)") | |||
|
99 | (net 6 "Net-(U101-Pad3)") | |||
|
100 | (net 7 "Net-(U101-Pad4)") | |||
|
101 | (net 8 "Net-(U101-Pad5)") | |||
|
102 | (net 9 "Net-(U101-Pad6)") | |||
|
103 | (net 10 "Net-(U101-Pad7)") | |||
|
104 | (net 11 "Net-(U101-Pad9)") | |||
|
105 | (net 12 "Net-(U101-Pad11)") | |||
|
106 | (net 13 "Net-(U101-Pad12)") | |||
|
107 | (net 14 "Net-(U101-Pad13)") | |||
|
108 | (net 15 "Net-(U101-Pad14)") | |||
|
109 | (net 16 "Net-(U101-Pad15)") | |||
|
110 | (net 17 "Net-(U101-Pad16)") | |||
|
111 | (net 18 "Net-(U101-Pad17)") | |||
|
112 | (net 19 "Net-(U101-Pad18)") | |||
|
113 | (net 20 "Net-(U101-Pad19)") | |||
|
114 | (net 21 "Net-(U101-Pad20)") | |||
|
115 | (net 22 "Net-(U101-Pad21)") | |||
|
116 | (net 23 "Net-(U101-Pad22)") | |||
|
117 | (net 24 "Net-(U101-Pad23)") | |||
|
118 | (net 25 "Net-(U101-Pad24)") | |||
|
119 | (net 26 "Net-(U101-Pad25)") | |||
|
120 | (net 27 "Net-(U101-Pad26)") | |||
|
121 | (net 28 "Net-(U101-Pad27)") | |||
|
122 | (net 29 "Net-(U101-Pad28)") | |||
|
123 | ||||
|
124 | (net_class Default "Ceci est la Netclass par défaut" | |||
|
125 | (clearance 0.2) | |||
|
126 | (trace_width 0.25) | |||
|
127 | (via_dia 0.6) | |||
|
128 | (via_drill 0.4) | |||
|
129 | (uvia_dia 0.3) | |||
|
130 | (uvia_drill 0.1) | |||
|
131 | (add_net "Net-(R101-Pad1)") | |||
|
132 | (add_net "Net-(R101-Pad2)") | |||
|
133 | (add_net "Net-(R102-Pad1)") | |||
|
134 | (add_net "Net-(R103-Pad1)") | |||
|
135 | (add_net "Net-(U101-Pad11)") | |||
|
136 | (add_net "Net-(U101-Pad12)") | |||
|
137 | (add_net "Net-(U101-Pad13)") | |||
|
138 | (add_net "Net-(U101-Pad14)") | |||
|
139 | (add_net "Net-(U101-Pad15)") | |||
|
140 | (add_net "Net-(U101-Pad16)") | |||
|
141 | (add_net "Net-(U101-Pad17)") | |||
|
142 | (add_net "Net-(U101-Pad18)") | |||
|
143 | (add_net "Net-(U101-Pad19)") | |||
|
144 | (add_net "Net-(U101-Pad2)") | |||
|
145 | (add_net "Net-(U101-Pad20)") | |||
|
146 | (add_net "Net-(U101-Pad21)") | |||
|
147 | (add_net "Net-(U101-Pad22)") | |||
|
148 | (add_net "Net-(U101-Pad23)") | |||
|
149 | (add_net "Net-(U101-Pad24)") | |||
|
150 | (add_net "Net-(U101-Pad25)") | |||
|
151 | (add_net "Net-(U101-Pad26)") | |||
|
152 | (add_net "Net-(U101-Pad27)") | |||
|
153 | (add_net "Net-(U101-Pad28)") | |||
|
154 | (add_net "Net-(U101-Pad3)") | |||
|
155 | (add_net "Net-(U101-Pad4)") | |||
|
156 | (add_net "Net-(U101-Pad5)") | |||
|
157 | (add_net "Net-(U101-Pad6)") | |||
|
158 | (add_net "Net-(U101-Pad7)") | |||
|
159 | (add_net "Net-(U101-Pad9)") | |||
|
160 | ) | |||
|
161 | ||||
|
162 | (module Resistors_SMD:R_0603 (layer F.Cu) (tedit 5415CC62) (tstamp 5577DFA1) | |||
|
163 | (at 157 104.5 180) | |||
|
164 | (descr "Resistor SMD 0603, reflow soldering, Vishay (see dcrcw.pdf)") | |||
|
165 | (tags "resistor 0603") | |||
|
166 | (path /5577DF53) | |||
|
167 | (attr smd) | |||
|
168 | (fp_text reference R101 (at 0 -1.9 180) (layer F.SilkS) | |||
|
169 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
170 | ) | |||
|
171 | (fp_text value R (at 0 1.9 180) (layer F.Fab) | |||
|
172 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
173 | ) | |||
|
174 | (fp_line (start -1.3 -0.8) (end 1.3 -0.8) (layer F.CrtYd) (width 0.05)) | |||
|
175 | (fp_line (start -1.3 0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
176 | (fp_line (start -1.3 -0.8) (end -1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
177 | (fp_line (start 1.3 -0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
178 | (fp_line (start 0.5 0.675) (end -0.5 0.675) (layer F.SilkS) (width 0.15)) | |||
|
179 | (fp_line (start -0.5 -0.675) (end 0.5 -0.675) (layer F.SilkS) (width 0.15)) | |||
|
180 | (pad 1 smd rect (at -0.75 0 180) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
181 | (net 1 "Net-(R101-Pad1)")) | |||
|
182 | (pad 2 smd rect (at 0.75 0 180) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
183 | (net 2 "Net-(R101-Pad2)")) | |||
|
184 | (model Resistors_SMD.3dshapes/R_0603.wrl | |||
|
185 | (at (xyz 0 0 0)) | |||
|
186 | (scale (xyz 1 1 1)) | |||
|
187 | (rotate (xyz 0 0 0)) | |||
|
188 | ) | |||
|
189 | ) | |||
|
190 | ||||
|
191 | (module Resistors_SMD:R_0603 (layer F.Cu) (tedit 5415CC62) (tstamp 5577DFA7) | |||
|
192 | (at 168 116 270) | |||
|
193 | (descr "Resistor SMD 0603, reflow soldering, Vishay (see dcrcw.pdf)") | |||
|
194 | (tags "resistor 0603") | |||
|
195 | (path /5577E050) | |||
|
196 | (attr smd) | |||
|
197 | (fp_text reference R102 (at 0 -1.9 270) (layer F.SilkS) | |||
|
198 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
199 | ) | |||
|
200 | (fp_text value R (at 0 1.9 270) (layer F.Fab) | |||
|
201 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
202 | ) | |||
|
203 | (fp_line (start -1.3 -0.8) (end 1.3 -0.8) (layer F.CrtYd) (width 0.05)) | |||
|
204 | (fp_line (start -1.3 0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
205 | (fp_line (start -1.3 -0.8) (end -1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
206 | (fp_line (start 1.3 -0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
207 | (fp_line (start 0.5 0.675) (end -0.5 0.675) (layer F.SilkS) (width 0.15)) | |||
|
208 | (fp_line (start -0.5 -0.675) (end 0.5 -0.675) (layer F.SilkS) (width 0.15)) | |||
|
209 | (pad 1 smd rect (at -0.75 0 270) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
210 | (net 3 "Net-(R102-Pad1)")) | |||
|
211 | (pad 2 smd rect (at 0.75 0 270) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
212 | (net 2 "Net-(R101-Pad2)")) | |||
|
213 | (model Resistors_SMD.3dshapes/R_0603.wrl | |||
|
214 | (at (xyz 0 0 0)) | |||
|
215 | (scale (xyz 1 1 1)) | |||
|
216 | (rotate (xyz 0 0 0)) | |||
|
217 | ) | |||
|
218 | ) | |||
|
219 | ||||
|
220 | (module Resistors_SMD:R_0603 (layer F.Cu) (tedit 5415CC62) (tstamp 5577DFAD) | |||
|
221 | (at 170.5 116 270) | |||
|
222 | (descr "Resistor SMD 0603, reflow soldering, Vishay (see dcrcw.pdf)") | |||
|
223 | (tags "resistor 0603") | |||
|
224 | (path /5577E07A) | |||
|
225 | (attr smd) | |||
|
226 | (fp_text reference R103 (at 0 -1.9 270) (layer F.SilkS) | |||
|
227 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
228 | ) | |||
|
229 | (fp_text value R (at 0 1.9 270) (layer F.Fab) | |||
|
230 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
231 | ) | |||
|
232 | (fp_line (start -1.3 -0.8) (end 1.3 -0.8) (layer F.CrtYd) (width 0.05)) | |||
|
233 | (fp_line (start -1.3 0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
234 | (fp_line (start -1.3 -0.8) (end -1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
235 | (fp_line (start 1.3 -0.8) (end 1.3 0.8) (layer F.CrtYd) (width 0.05)) | |||
|
236 | (fp_line (start 0.5 0.675) (end -0.5 0.675) (layer F.SilkS) (width 0.15)) | |||
|
237 | (fp_line (start -0.5 -0.675) (end 0.5 -0.675) (layer F.SilkS) (width 0.15)) | |||
|
238 | (pad 1 smd rect (at -0.75 0 270) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
239 | (net 4 "Net-(R103-Pad1)")) | |||
|
240 | (pad 2 smd rect (at 0.75 0 270) (size 0.5 0.9) (layers F.Cu F.Paste F.Mask) | |||
|
241 | (net 2 "Net-(R101-Pad2)")) | |||
|
242 | (model Resistors_SMD.3dshapes/R_0603.wrl | |||
|
243 | (at (xyz 0 0 0)) | |||
|
244 | (scale (xyz 1 1 1)) | |||
|
245 | (rotate (xyz 0 0 0)) | |||
|
246 | ) | |||
|
247 | ) | |||
|
248 | ||||
|
249 | (module SMD_Packages:PLCC-28 (layer F.Cu) (tedit 0) (tstamp 5577DFCD) | |||
|
250 | (at 168 104.5) | |||
|
251 | (descr "Support CMS Plcc 28 pins") | |||
|
252 | (tags "CMS PLCC") | |||
|
253 | (path /5577DF13) | |||
|
254 | (attr smd) | |||
|
255 | (fp_text reference U101 (at -0.254 -7.874) (layer F.SilkS) | |||
|
256 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
257 | ) | |||
|
258 | (fp_text value AD390JD (at 0 7.62) (layer F.Fab) | |||
|
259 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
260 | ) | |||
|
261 | (fp_line (start -8.89 7.62) (end -7.62 8.89) (layer F.SilkS) (width 0.15)) | |||
|
262 | (fp_line (start -7.62 8.89) (end 8.89 8.89) (layer F.SilkS) (width 0.15)) | |||
|
263 | (fp_line (start 8.89 8.89) (end 8.89 -8.89) (layer F.SilkS) (width 0.15)) | |||
|
264 | (fp_line (start 8.89 -8.89) (end -8.89 -8.89) (layer F.SilkS) (width 0.15)) | |||
|
265 | (fp_line (start -8.89 7.62) (end -8.89 -8.89) (layer F.SilkS) (width 0.15)) | |||
|
266 | (fp_line (start -3.81 -4.064) (end 3.81 -4.064) (layer F.SilkS) (width 0.15)) | |||
|
267 | (fp_line (start 3.81 -4.064) (end 3.81 3.81) (layer F.SilkS) (width 0.15)) | |||
|
268 | (fp_line (start 3.81 3.81) (end -2.54 3.81) (layer F.SilkS) (width 0.15)) | |||
|
269 | (fp_line (start -3.81 -4.064) (end -3.81 2.54) (layer F.SilkS) (width 0.15)) | |||
|
270 | (fp_line (start -3.81 2.54) (end -2.54 3.81) (layer F.SilkS) (width 0.15)) | |||
|
271 | (pad 1 smd rect (at -5.715 0) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
272 | (net 1 "Net-(R101-Pad1)")) | |||
|
273 | (pad 2 smd rect (at -5.715 1.27) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
274 | (net 5 "Net-(U101-Pad2)")) | |||
|
275 | (pad 3 smd rect (at -5.715 2.54) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
276 | (net 6 "Net-(U101-Pad3)")) | |||
|
277 | (pad 4 smd rect (at -5.715 3.81) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
278 | (net 7 "Net-(U101-Pad4)")) | |||
|
279 | (pad 5 smd rect (at -3.81 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
280 | (net 8 "Net-(U101-Pad5)")) | |||
|
281 | (pad 6 smd rect (at -2.54 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
282 | (net 9 "Net-(U101-Pad6)")) | |||
|
283 | (pad 7 smd rect (at -1.27 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
284 | (net 10 "Net-(U101-Pad7)")) | |||
|
285 | (pad 8 smd rect (at 0 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
286 | (net 3 "Net-(R102-Pad1)")) | |||
|
287 | (pad 9 smd rect (at 1.27 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
288 | (net 11 "Net-(U101-Pad9)")) | |||
|
289 | (pad 10 smd rect (at 2.54 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
290 | (net 4 "Net-(R103-Pad1)")) | |||
|
291 | (pad 11 smd rect (at 3.81 5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
292 | (net 12 "Net-(U101-Pad11)")) | |||
|
293 | (pad 12 smd rect (at 5.715 3.81) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
294 | (net 13 "Net-(U101-Pad12)")) | |||
|
295 | (pad 13 smd rect (at 5.715 2.54) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
296 | (net 14 "Net-(U101-Pad13)")) | |||
|
297 | (pad 14 smd rect (at 5.715 1.27) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
298 | (net 15 "Net-(U101-Pad14)")) | |||
|
299 | (pad 15 smd rect (at 5.715 0) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
300 | (net 16 "Net-(U101-Pad15)")) | |||
|
301 | (pad 16 smd rect (at 5.715 -1.27) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
302 | (net 17 "Net-(U101-Pad16)")) | |||
|
303 | (pad 17 smd rect (at 5.715 -2.54) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
304 | (net 18 "Net-(U101-Pad17)")) | |||
|
305 | (pad 18 smd rect (at 5.715 -3.81) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
306 | (net 19 "Net-(U101-Pad18)")) | |||
|
307 | (pad 19 smd rect (at 3.81 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
308 | (net 20 "Net-(U101-Pad19)")) | |||
|
309 | (pad 20 smd rect (at 2.54 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
310 | (net 21 "Net-(U101-Pad20)")) | |||
|
311 | (pad 21 smd rect (at 1.27 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
312 | (net 22 "Net-(U101-Pad21)")) | |||
|
313 | (pad 22 smd rect (at 0 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
314 | (net 23 "Net-(U101-Pad22)")) | |||
|
315 | (pad 23 smd rect (at -1.27 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
316 | (net 24 "Net-(U101-Pad23)")) | |||
|
317 | (pad 24 smd rect (at -2.54 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
318 | (net 25 "Net-(U101-Pad24)")) | |||
|
319 | (pad 25 smd rect (at -3.81 -5.715) (size 0.762 2.032) (layers F.Cu F.Paste F.Mask) | |||
|
320 | (net 26 "Net-(U101-Pad25)")) | |||
|
321 | (pad 26 smd rect (at -5.715 -3.81) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
322 | (net 27 "Net-(U101-Pad26)")) | |||
|
323 | (pad 27 smd rect (at -5.715 -2.54) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
324 | (net 28 "Net-(U101-Pad27)")) | |||
|
325 | (pad 28 smd rect (at -5.715 -1.27) (size 2.032 0.762) (layers F.Cu F.Paste F.Mask) | |||
|
326 | (net 29 "Net-(U101-Pad28)")) | |||
|
327 | ) | |||
|
328 | ||||
|
329 | (module NF-Transformers_ETAL:NF-Transformer_P2781_ETAL (layer F.Cu) (tedit 0) (tstamp 557A29C0) | |||
|
330 | (at 188.5 83.25) | |||
|
331 | (descr "NF-Transformer, ETAL, P2781, SMD,") | |||
|
332 | (tags "NF-Transformer, ETAL, P2781, SMD,") | |||
|
333 | (attr smd) | |||
|
334 | (fp_text reference REF** (at 0 -7.00024) (layer F.SilkS) | |||
|
335 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
336 | ) | |||
|
337 | (fp_text value NF-Transformer_P2781_ETAL (at 0 7.50062) (layer F.Fab) | |||
|
338 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
339 | ) | |||
|
340 | (fp_line (start 6.49986 4.50088) (end 6.49986 4.0005) (layer F.SilkS) (width 0.15)) | |||
|
341 | (fp_line (start 6.49986 -4.50088) (end 6.49986 -4.0005) (layer F.SilkS) (width 0.15)) | |||
|
342 | (fp_line (start 2.9591 3.83032) (end 3.83032 3.83032) (layer F.SilkS) (width 0.15)) | |||
|
343 | (fp_line (start 2.98958 2.8194) (end 3.43916 2.3495) (layer F.SilkS) (width 0.15)) | |||
|
344 | (fp_line (start 3.43916 2.3495) (end 3.43916 3.83032) (layer F.SilkS) (width 0.15)) | |||
|
345 | (fp_line (start 2.0193 2.30886) (end 2.25044 2.35966) (layer F.SilkS) (width 0.15)) | |||
|
346 | (fp_line (start 2.25044 2.35966) (end 2.37998 2.55016) (layer F.SilkS) (width 0.15)) | |||
|
347 | (fp_line (start 2.37998 2.55016) (end 2.4003 2.75844) (layer F.SilkS) (width 0.15)) | |||
|
348 | (fp_line (start 2.4003 2.75844) (end 2.32918 2.89052) (layer F.SilkS) (width 0.15)) | |||
|
349 | (fp_line (start 2.32918 2.89052) (end 2.159 2.97942) (layer F.SilkS) (width 0.15)) | |||
|
350 | (fp_line (start 2.159 2.97942) (end 1.89992 2.98958) (layer F.SilkS) (width 0.15)) | |||
|
351 | (fp_line (start 1.89992 2.98958) (end 1.66878 3.08864) (layer F.SilkS) (width 0.15)) | |||
|
352 | (fp_line (start 1.66878 3.08864) (end 1.51892 3.3401) (layer F.SilkS) (width 0.15)) | |||
|
353 | (fp_line (start 1.51892 3.3401) (end 1.52908 3.64998) (layer F.SilkS) (width 0.15)) | |||
|
354 | (fp_line (start 1.52908 3.64998) (end 1.67894 3.7592) (layer F.SilkS) (width 0.15)) | |||
|
355 | (fp_line (start 1.67894 3.7592) (end 1.8288 3.81) (layer F.SilkS) (width 0.15)) | |||
|
356 | (fp_line (start 1.8288 3.81) (end 2.05994 3.83032) (layer F.SilkS) (width 0.15)) | |||
|
357 | (fp_line (start 2.05994 3.83032) (end 2.28092 3.7592) (layer F.SilkS) (width 0.15)) | |||
|
358 | (fp_line (start 2.28092 3.7592) (end 2.37998 3.57886) (layer F.SilkS) (width 0.15)) | |||
|
359 | (fp_line (start 2.37998 3.57886) (end 2.39014 3.3782) (layer F.SilkS) (width 0.15)) | |||
|
360 | (fp_line (start 2.39014 3.3782) (end 2.3495 3.21056) (layer F.SilkS) (width 0.15)) | |||
|
361 | (fp_line (start 2.3495 3.21056) (end 2.23012 3.08864) (layer F.SilkS) (width 0.15)) | |||
|
362 | (fp_line (start 2.23012 3.08864) (end 2.0193 3.0099) (layer F.SilkS) (width 0.15)) | |||
|
363 | (fp_line (start 2.0193 3.0099) (end 1.7907 2.97942) (layer F.SilkS) (width 0.15)) | |||
|
364 | (fp_line (start 1.7907 2.97942) (end 1.651 2.89052) (layer F.SilkS) (width 0.15)) | |||
|
365 | (fp_line (start 1.651 2.89052) (end 1.56972 2.6797) (layer F.SilkS) (width 0.15)) | |||
|
366 | (fp_line (start 1.56972 2.6797) (end 1.6002 2.51968) (layer F.SilkS) (width 0.15)) | |||
|
367 | (fp_line (start 1.6002 2.51968) (end 1.6891 2.41046) (layer F.SilkS) (width 0.15)) | |||
|
368 | (fp_line (start 1.6891 2.41046) (end 1.9304 2.32918) (layer F.SilkS) (width 0.15)) | |||
|
369 | (fp_line (start 0.04064 2.31902) (end 1.02108 2.30886) (layer F.SilkS) (width 0.15)) | |||
|
370 | (fp_line (start 1.02108 2.30886) (end 0.40894 3.83032) (layer F.SilkS) (width 0.15)) | |||
|
371 | (fp_line (start -1.38938 2.51968) (end -1.24968 2.39014) (layer F.SilkS) (width 0.15)) | |||
|
372 | (fp_line (start -1.24968 2.39014) (end -1.08966 2.32918) (layer F.SilkS) (width 0.15)) | |||
|
373 | (fp_line (start -1.08966 2.32918) (end -0.83058 2.32918) (layer F.SilkS) (width 0.15)) | |||
|
374 | (fp_line (start -0.83058 2.32918) (end -0.67056 2.39014) (layer F.SilkS) (width 0.15)) | |||
|
375 | (fp_line (start -0.67056 2.39014) (end -0.51054 2.57048) (layer F.SilkS) (width 0.15)) | |||
|
376 | (fp_line (start -0.51054 2.57048) (end -0.4699 2.75844) (layer F.SilkS) (width 0.15)) | |||
|
377 | (fp_line (start -0.4699 2.75844) (end -0.51054 2.92862) (layer F.SilkS) (width 0.15)) | |||
|
378 | (fp_line (start -0.51054 2.92862) (end -0.65024 3.0988) (layer F.SilkS) (width 0.15)) | |||
|
379 | (fp_line (start -0.65024 3.0988) (end -1.45034 3.82016) (layer F.SilkS) (width 0.15)) | |||
|
380 | (fp_line (start -1.45034 3.82016) (end -0.49022 3.83032) (layer F.SilkS) (width 0.15)) | |||
|
381 | (fp_line (start -2.80924 3.85826) (end -2.8194 2.33934) (layer F.SilkS) (width 0.15)) | |||
|
382 | (fp_line (start -2.8194 2.33934) (end -2.17932 2.35966) (layer F.SilkS) (width 0.15)) | |||
|
383 | (fp_line (start -2.17932 2.35966) (end -1.99898 2.51968) (layer F.SilkS) (width 0.15)) | |||
|
384 | (fp_line (start -1.99898 2.51968) (end -1.94056 2.80924) (layer F.SilkS) (width 0.15)) | |||
|
385 | (fp_line (start -1.94056 2.80924) (end -1.99898 3.02006) (layer F.SilkS) (width 0.15)) | |||
|
386 | (fp_line (start -1.99898 3.02006) (end -2.2098 3.12928) (layer F.SilkS) (width 0.15)) | |||
|
387 | (fp_line (start -2.2098 3.12928) (end -2.44094 3.1496) (layer F.SilkS) (width 0.15)) | |||
|
388 | (fp_line (start -2.44094 3.1496) (end -2.77114 3.12928) (layer F.SilkS) (width 0.15)) | |||
|
389 | (fp_line (start 2.65938 -3.91668) (end 2.64922 -2.41808) (layer F.SilkS) (width 0.15)) | |||
|
390 | (fp_line (start 2.64922 -2.41808) (end 3.36042 -2.41808) (layer F.SilkS) (width 0.15)) | |||
|
391 | (fp_line (start 1.27 -2.82702) (end 1.92024 -2.82702) (layer F.SilkS) (width 0.15)) | |||
|
392 | (fp_line (start 1.10998 -2.37744) (end 1.63068 -3.91668) (layer F.SilkS) (width 0.15)) | |||
|
393 | (fp_line (start 1.63068 -3.91668) (end 2.13106 -2.40792) (layer F.SilkS) (width 0.15)) | |||
|
394 | (fp_line (start 2.13106 -2.40792) (end 2.14884 -2.40792) (layer F.SilkS) (width 0.15)) | |||
|
395 | (fp_line (start 0.40132 -3.8862) (end 0.40132 -2.41808) (layer F.SilkS) (width 0.15)) | |||
|
396 | (fp_line (start -0.02032 -3.90652) (end 0.81026 -3.91668) (layer F.SilkS) (width 0.15)) | |||
|
397 | (fp_line (start -1.17094 -3.16738) (end -0.71882 -3.16738) (layer F.SilkS) (width 0.15)) | |||
|
398 | (fp_line (start -0.4699 -3.90652) (end -1.19888 -3.90652) (layer F.SilkS) (width 0.15)) | |||
|
399 | (fp_line (start -1.19888 -3.90652) (end -1.19888 -2.39776) (layer F.SilkS) (width 0.15)) | |||
|
400 | (fp_line (start -1.19888 -2.39776) (end -0.51054 -2.3876) (layer F.SilkS) (width 0.15)) | |||
|
401 | (fp_line (start -2.9591 -2.41046) (end -2.09042 -2.42062) (layer F.SilkS) (width 0.15)) | |||
|
402 | (fp_line (start -2.93878 -3.3909) (end -2.50952 -3.90906) (layer F.SilkS) (width 0.15)) | |||
|
403 | (fp_line (start -2.50952 -3.90906) (end -2.49936 -2.43078) (layer F.SilkS) (width 0.15)) | |||
|
404 | (fp_line (start -6.49986 -4.0005) (end -3.50012 -4.0005) (layer F.SilkS) (width 0.15)) | |||
|
405 | (fp_line (start -6.49986 4.50088) (end -6.49986 4.0005) (layer F.SilkS) (width 0.15)) | |||
|
406 | (fp_line (start -3.50012 -4.50088) (end -3.50012 4.50088) (layer F.SilkS) (width 0.15)) | |||
|
407 | (fp_line (start -6.49986 -4.50088) (end -6.49986 -4.0005) (layer F.SilkS) (width 0.15)) | |||
|
408 | (fp_line (start 6.49986 4.50088) (end -6.49986 4.50088) (layer F.SilkS) (width 0.15)) | |||
|
409 | (fp_line (start -6.49986 -4.50088) (end 6.49986 -4.50088) (layer F.SilkS) (width 0.15)) | |||
|
410 | (pad 1 smd rect (at -5.53974 -2.54) (size 2.49936 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
411 | (pad 2 smd rect (at -5.53974 0) (size 2.49936 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
412 | (pad 3 smd rect (at -5.53974 2.54) (size 2.49936 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
413 | (pad 4 smd rect (at 5.53974 2.54) (size 2.49936 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
414 | (pad 5 smd rect (at 5.53974 0) (size 2.5019 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
415 | (pad 6 smd rect (at 5.53974 -2.54) (size 2.49936 1.39954) (layers F.Cu F.Paste F.Mask)) | |||
|
416 | (pad 7 smd oval (at -1.99898 0 90) (size 3.50012 1.39954) (layers F.Adhes)) | |||
|
417 | (pad 7 smd oval (at 1.99898 0 90) (size 3.50012 1.39954) (layers F.Adhes)) | |||
|
418 | (model NF-Transformers_ETAL.3dshapes/NF-Transformer_P2781_ETAL.wrl | |||
|
419 | (at (xyz 0 0 0)) | |||
|
420 | (scale (xyz 0.3937 0.3937 0.3937)) | |||
|
421 | (rotate (xyz 0 0 0)) | |||
|
422 | ) | |||
|
423 | ) | |||
|
424 | ||||
|
425 | (module NF-Transformers_ETAL:NF-Transformer_1-1_P1200_ETAL (layer F.Cu) (tedit 0) (tstamp 557A34AF) | |||
|
426 | (at 151.75 82) | |||
|
427 | (descr "NF-Transformer, 1:1, ETAL P1200,") | |||
|
428 | (tags "NF-Transformer, 1:1, ETAL P1200,") | |||
|
429 | (fp_text reference REF** (at -0.01016 -11.6205) (layer F.SilkS) | |||
|
430 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
431 | ) | |||
|
432 | (fp_text value NF-Transformer_1-1_P1200_ETAL (at -0.07112 12.05992) (layer F.Fab) | |||
|
433 | (effects (font (size 1 1) (thickness 0.15))) | |||
|
434 | ) | |||
|
435 | (fp_line (start 5.80136 0.44958) (end 6.79196 0.44958) (layer F.SilkS) (width 0.15)) | |||
|
436 | (fp_line (start 6.79196 0.44958) (end 6.30174 1.05918) (layer F.SilkS) (width 0.15)) | |||
|
437 | (fp_line (start 6.30174 1.05918) (end 6.61162 1.0795) (layer F.SilkS) (width 0.15)) | |||
|
438 | (fp_line (start 6.61162 1.0795) (end 6.7818 1.27) (layer F.SilkS) (width 0.15)) | |||
|
439 | (fp_line (start 6.7818 1.27) (end 6.82244 1.5494) (layer F.SilkS) (width 0.15)) | |||
|
440 | (fp_line (start 6.82244 1.5494) (end 6.75132 1.8288) (layer F.SilkS) (width 0.15)) | |||
|
441 | (fp_line (start 6.75132 1.8288) (end 6.5913 1.97866) (layer F.SilkS) (width 0.15)) | |||
|
442 | (fp_line (start 6.5913 1.97866) (end 6.37032 2.00914) (layer F.SilkS) (width 0.15)) | |||
|
443 | (fp_line (start 6.37032 2.00914) (end 6.18998 1.98882) (layer F.SilkS) (width 0.15)) | |||
|
444 | (fp_line (start 6.18998 1.98882) (end 6.02996 1.9685) (layer F.SilkS) (width 0.15)) | |||
|
445 | (fp_line (start 6.02996 1.9685) (end 5.8801 1.85928) (layer F.SilkS) (width 0.15)) | |||
|
446 | (fp_line (start -6.23062 1.01854) (end -6.25094 2.03962) (layer F.SilkS) (width 0.15)) | |||
|
447 | (fp_line (start -6.61924 0.32004) (end -7.04088 1.52908) (layer F.SilkS) (width 0.15)) | |||
|
448 | (fp_line (start -7.04088 1.52908) (end -5.969 1.50876) (layer F.SilkS) (width 0.15)) | |||
|
449 | (fp_line (start -5.59308 -5.58038) (end -5.58292 -5.62102) (layer F.SilkS) (width 0.15)) | |||
|
450 | (fp_line (start -5.58292 -5.62102) (end -5.58292 -5.61086) (layer F.SilkS) (width 0.15)) | |||
|
451 | (fp_line (start -6.10108 -7.21106) (end -6.40334 -7.2009) (layer F.SilkS) (width 0.15)) | |||
|
452 | (fp_line (start -6.40334 -7.2009) (end -6.61162 -7.17042) (layer F.SilkS) (width 0.15)) | |||
|
453 | (fp_line (start -6.61162 -7.17042) (end -6.74116 -7.05104) (layer F.SilkS) (width 0.15)) | |||
|
454 | (fp_line (start -6.74116 -7.05104) (end -6.95198 -6.8199) (layer F.SilkS) (width 0.15)) | |||
|
455 | (fp_line (start -6.95198 -6.8199) (end -6.98246 -6.53034) (layer F.SilkS) (width 0.15)) | |||
|
456 | (fp_line (start -6.98246 -6.53034) (end -7.01294 -6.1214) (layer F.SilkS) (width 0.15)) | |||
|
457 | (fp_line (start -7.01294 -6.1214) (end -6.9215 -5.80136) (layer F.SilkS) (width 0.15)) | |||
|
458 | (fp_line (start -6.9215 -5.80136) (end -6.76148 -5.67182) (layer F.SilkS) (width 0.15)) | |||
|
459 | (fp_line (start -6.76148 -5.67182) (end -6.47192 -5.61086) (layer F.SilkS) (width 0.15)) | |||
|
460 | (fp_line (start -6.47192 -5.61086) (end -6.28142 -5.6515) (layer F.SilkS) (width 0.15)) | |||
|
461 | (fp_line (start -6.28142 -5.6515) (end -6.14172 -5.85216) (layer F.SilkS) (width 0.15)) | |||
|
462 | (fp_line (start -6.14172 -5.85216) (end -6.1214 -6.1214) (layer F.SilkS) (width 0.15)) | |||
|
463 | (fp_line (start -6.1214 -6.1214) (end -6.19252 -6.35) (layer F.SilkS) (width 0.15)) | |||
|
464 | (fp_line (start -6.19252 -6.35) (end -6.39318 -6.53034) (layer F.SilkS) (width 0.15)) | |||
|
465 | (fp_line (start -6.39318 -6.53034) (end -6.70306 -6.5405) (layer F.SilkS) (width 0.15)) | |||
|
466 | (fp_line (start -6.70306 -6.5405) (end -6.8834 -6.47192) (layer F.SilkS) (width 0.15)) | |||
|
467 | (fp_line (start 5.98932 -5.6007) (end 6.97992 -5.6007) (layer F.SilkS) (width 0.15)) | |||
|
468 | (fp_line (start 5.95122 -6.56082) (end 6.47954 -7.05104) (layer F.SilkS) (width 0.15)) | |||
|
469 | (fp_line (start 6.47954 -7.05104) (end 6.47954 -5.58038) (layer F.SilkS) (width 0.15)) | |||
|
470 | (fp_line (start 5.90042 6.69036) (end 6.12902 6.78942) (layer F.SilkS) (width 0.15)) | |||
|
471 | (fp_line (start 6.12902 6.78942) (end 6.25094 6.93928) (layer F.SilkS) (width 0.15)) | |||
|
472 | (fp_line (start 6.25094 6.93928) (end 6.28904 7.13994) (layer F.SilkS) (width 0.15)) | |||
|
473 | (fp_line (start 6.28904 7.13994) (end 6.28904 7.60984) (layer F.SilkS) (width 0.15)) | |||
|
474 | (fp_line (start 6.28904 7.60984) (end 6.2611 7.8994) (layer F.SilkS) (width 0.15)) | |||
|
475 | (fp_line (start 6.2611 7.8994) (end 6.18998 8.05942) (layer F.SilkS) (width 0.15)) | |||
|
476 | (fp_line (start 6.18998 8.05942) (end 6.08076 8.17118) (layer F.SilkS) (width 0.15)) | |||
|
477 | (fp_line (start 6.08076 8.17118) (end 5.98932 8.21944) (layer F.SilkS) (width 0.15)) | |||
|
478 | (fp_line (start 5.98932 8.21944) (end 5.8801 8.2296) (layer F.SilkS) (width 0.15)) | |||
|
479 | (fp_line (start 5.8801 8.2296) (end 5.75056 8.17118) (layer F.SilkS) (width 0.15)) | |||
|
480 | (fp_line (start 5.75056 8.17118) (end 5.61086 8.06958) (layer F.SilkS) (width 0.15)) | |||
|
481 | (fp_line (start 5.61086 8.06958) (end 5.52958 7.87908) (layer F.SilkS) (width 0.15)) | |||
|
482 | (fp_line (start 5.52958 7.87908) (end 5.4991 7.52094) (layer F.SilkS) (width 0.15)) | |||
|
483 | (fp_line (start 5.4991 7.52094) (end 5.4991 7.26948) (layer F.SilkS) (width 0.15)) | |||
|
484 | (fp_line (start 5.4991 7.26948) (end 5.53974 7.03072) (layer F.SilkS) (width 0.15)) | |||
|
485 | (fp_line (start 5.53974 7.03072) (end 5.6388 6.88086) (layer F.SilkS) (width 0.15)) | |||
|
486 | (fp_line (start 5.6388 6.88086) (end 5.75056 6.74878) (layer F.SilkS) (width 0.15)) | |||
|
487 | (fp_line (start 5.75056 6.74878) (end 5.85978 6.70052) (layer F.SilkS) (width 0.15)) | |||
|
488 | (fp_line (start 4.42976 6.72084) (end 4.62026 6.7691) (layer F.SilkS) (width 0.15)) | |||
|
489 | (fp_line (start 4.62026 6.7691) (end 4.81076 6.99008) (layer F.SilkS) (width 0.15)) | |||
|
490 | (fp_line (start 4.81076 6.99008) (end 4.87934 7.29996) (layer F.SilkS) (width 0.15)) | |||
|
491 | (fp_line (start 4.87934 7.29996) (end 4.86918 7.59968) (layer F.SilkS) (width 0.15)) | |||
|
492 | (fp_line (start 4.86918 7.59968) (end 4.79044 7.9502) (layer F.SilkS) (width 0.15)) | |||
|
493 | (fp_line (start 4.79044 7.9502) (end 4.6609 8.15086) (layer F.SilkS) (width 0.15)) | |||
|
494 | (fp_line (start 4.6609 8.15086) (end 4.4704 8.2296) (layer F.SilkS) (width 0.15)) | |||
|
495 | (fp_line (start 4.4704 8.2296) (end 4.24942 8.17118) (layer F.SilkS) (width 0.15)) | |||
|
496 | (fp_line (start 4.24942 8.17118) (end 4.09956 7.98068) (layer F.SilkS) (width 0.15)) | |||
|
497 | (fp_line (start 4.09956 7.98068) (end 4.03098 7.69112) (layer F.SilkS) (width 0.15)) | |||
|
498 | (fp_line (start 4.03098 7.69112) (end 4.02082 7.31012) (layer F.SilkS) (width 0.15)) | |||
|
499 | (fp_line (start 4.02082 7.31012) (end 4.09956 7.00024) (layer F.SilkS) (width 0.15)) | |||
|
500 | (fp_line (start 4.09956 7.00024) (end 4.21894 6.77926) (layer F.SilkS) (width 0.15)) | |||
|
501 | (fp_line (start 4.21894 6.77926) (end 4.37896 6.72084) (layer F.SilkS) (width 0.15)) | |||
|
502 | (fp_line (start 2.51968 6.90118) (end 2.57048 6.84022) (layer F.SilkS) (width 0.15)) | |||
|
503 | (fp_line (start 2.57048 6.84022) (end 2.77114 6.72084) (layer F.SilkS) (width 0.15)) | |||
|
504 | (fp_line (start 2.77114 6.72084) (end 2.96926 6.70052) (layer F.SilkS) (width 0.15)) | |||
|
505 | (fp_line (start 2.96926 6.70052) (end 3.18008 6.731) (layer F.SilkS) (width 0.15)) | |||
|
506 | (fp_line (start 3.18008 6.731) (end 3.3401 6.85038) (layer F.SilkS) (width 0.15)) | |||
|
507 | (fp_line (start 3.3401 6.85038) (end 3.429 7.04088) (layer F.SilkS) (width 0.15)) | |||
|
508 | (fp_line (start 3.429 7.04088) (end 3.38074 7.29996) (layer F.SilkS) (width 0.15)) | |||
|
509 | (fp_line (start 3.38074 7.29996) (end 2.55016 8.23976) (layer F.SilkS) (width 0.15)) | |||
|
510 | (fp_line (start 2.55016 8.23976) (end 3.43916 8.23976) (layer F.SilkS) (width 0.15)) | |||
|
511 | (fp_line (start 1.06934 8.20928) (end 1.96088 8.21944) (layer F.SilkS) (width 0.15)) | |||
|
512 | (fp_line (start 1.06934 7.18058) (end 1.5494 6.74116) (layer F.SilkS) (width 0.15)) | |||
|
513 | (fp_line (start 1.5494 6.74116) (end 1.55956 8.21944) (layer F.SilkS) (width 0.15)) | |||
|
514 | (fp_line (start -0.34036 8.20928) (end -0.35052 6.731) (layer F.SilkS) (width 0.15)) | |||
|
515 | (fp_line (start -0.35052 6.731) (end 0.1397 6.74116) (layer F.SilkS) (width 0.15)) | |||
|
516 | (fp_line (start 0.1397 6.74116) (end 0.3302 6.78942) (layer F.SilkS) (width 0.15)) | |||
|
517 | (fp_line (start 0.3302 6.78942) (end 0.51054 6.97992) (layer F.SilkS) (width 0.15)) | |||
|
518 | (fp_line (start 0.51054 6.97992) (end 0.53086 7.22122) (layer F.SilkS) (width 0.15)) | |||
|
519 | (fp_line (start 0.53086 7.22122) (end 0.4699 7.3406) (layer F.SilkS) (width 0.15)) | |||
|
520 | (fp_line (start 0.4699 7.3406) (end 0.37084 7.43966) (layer F.SilkS) (width 0.15)) | |||
|
521 | (fp_line (start 0.37084 7.43966) (end 0.24892 7.50062) (layer F.SilkS) (width 0.15)) | |||
|
522 | (fp_line (start 0.24892 7.50062) (end -0.26924 7.50062) (layer F.SilkS) (width 0.15)) | |||
|
523 | (fp_line (start -2.72034 6.65988) (end -2.72034 8.20928) (layer F.SilkS) (width 0.15)) | |||
|
524 | (fp_line (start -2.72034 8.20928) (end -1.99898 8.2296) (layer F.SilkS) (width 0.15)) | |||
|
525 | (fp_line (start -4.04114 7.79018) (end -3.51028 7.79018) (layer F.SilkS) (width 0.15)) | |||
|
526 | (fp_line (start -4.26974 8.2296) (end -3.7592 6.70052) (layer F.SilkS) (width 0.15)) | |||
|
527 | (fp_line (start -3.7592 6.70052) (end -3.24104 8.20928) (layer F.SilkS) (width 0.15)) | |||
|
528 | (fp_line (start -5.44068 6.70052) (end -4.63042 6.70052) (layer F.SilkS) (width 0.15)) | |||
|
529 | (fp_line (start -4.98094 8.20928) (end -4.98094 6.74116) (layer F.SilkS) (width 0.15)) | |||
|
530 | (fp_line (start -6.55066 7.4295) (end -6.10108 7.4295) (layer F.SilkS) (width 0.15)) | |||
|
531 | (fp_line (start -5.86994 6.70052) (end -6.61924 6.72084) (layer F.SilkS) (width 0.15)) | |||
|
532 | (fp_line (start -6.61924 6.72084) (end -6.61924 8.24992) (layer F.SilkS) (width 0.15)) | |||
|
533 | (fp_line (start -6.61924 8.24992) (end -5.92074 8.24992) (layer F.SilkS) (width 0.15)) | |||
|
534 | (fp_line (start -1.40716 -6.77926) (end -0.7874 -6.79958) (layer F.SilkS) (width 0.15)) | |||
|
535 | (fp_line (start 0.82042 -6.85038) (end 1.4605 -6.85038) (layer F.SilkS) (width 0.15)) | |||
|
536 | (fp_line (start 0.09906 -6.91896) (end 0.02032 -6.91896) (layer F.SilkS) (width 0.15)) | |||
|
537 | (fp_line (start 0.03048 -7.71906) (end -0.02032 -7.69874) (layer F.SilkS) (width 0.15)) | |||
|
538 | (fp_line (start 0.67056 -7.87908) (end 1.17094 -8.30072) (layer F.SilkS) (width 0.15)) | |||
|
539 | (fp_line (start 1.17094 -8.30072) (end 1.17094 -6.85038) (layer F.SilkS) (width 0.15)) | |||
|
540 | (fp_line (start -1.56972 -7.82066) (end -1.03124 -8.30072) (layer F.SilkS) (width 0.15)) | |||
|
541 | (fp_line (start -1.03124 -8.30072) (end -1.03124 -6.78942) (layer F.SilkS) (width 0.15)) | |||
|
542 | (fp_line (start 4.82092 -4.0005) (end 3.0607 -4.04114) (layer F.SilkS) (width 0.15)) | |||
|
543 | (fp_line (start 3.0607 -4.04114) (end 2.75082 -3.98018) (layer F.SilkS) (width 0.15)) | |||
|
544 | (fp_line (start 2.75082 -3.98018) (end 2.42062 -3.78968) (layer F.SilkS) (width 0.15)) | |||
|
545 | (fp_line (start 2.42062 -3.78968) (end 2.11074 -3.50012) (layer F.SilkS) (width 0.15)) | |||
|
546 | (fp_line (start 2.11074 -3.50012) (end 1.98882 -3.10896) (layer F.SilkS) (width 0.15)) | |||
|
547 | (fp_line (start 1.98882 -3.10896) (end 2.0193 -2.74066) (layer F.SilkS) (width 0.15)) | |||
|
548 | (fp_line (start 2.0193 -2.74066) (end 2.16916 -2.35966) (layer F.SilkS) (width 0.15)) | |||
|
549 | (fp_line (start 2.16916 -2.35966) (end 2.42062 -2.16916) (layer F.SilkS) (width 0.15)) | |||
|
550 | (fp_line (start 2.42062 -2.16916) (end 2.88036 -1.96088) (layer F.SilkS) (width 0.15)) | |||
|
551 | (fp_line (start 2.88036 -1.96088) (end 3.12928 -1.96088) (layer F.SilkS) (width 0.15)) | |||
|
552 | (fp_line (start 3.12928 -1.96088) (end 2.64922 -1.86944) (layer F.SilkS) (width 0.15)) | |||
|
553 | (fp_line (start 2.64922 -1.86944) (end 2.14884 -1.5494) (layer F.SilkS) (width 0.15)) | |||
|
554 | (fp_line (start 2.14884 -1.5494) (end 2.00914 -1.23952) (layer F.SilkS) (width 0.15)) | |||
|
555 | (fp_line (start 2.00914 -1.23952) (end 1.98882 -0.889) (layer F.SilkS) (width 0.15)) | |||
|
556 | (fp_line (start 1.98882 -0.889) (end 2.11074 -0.5207) (layer F.SilkS) (width 0.15)) | |||
|
557 | (fp_line (start 2.11074 -0.5207) (end 2.4003 -0.21082) (layer F.SilkS) (width 0.15)) | |||
|
558 | (fp_line (start 2.4003 -0.21082) (end 2.72034 -0.02032) (layer F.SilkS) (width 0.15)) | |||
|
559 | (fp_line (start 2.72034 -0.02032) (end 3.15976 0) (layer F.SilkS) (width 0.15)) | |||
|
560 | (fp_line (start 3.15976 0) (end 2.6797 0.07112) (layer F.SilkS) (width 0.15)) | |||
|
561 | (fp_line (start 2.6797 0.07112) (end 2.32918 0.26924) (layer F.SilkS) (width 0.15)) | |||
|
562 | (fp_line (start 2.32918 0.26924) (end 2.11074 0.55118) (layer F.SilkS) (width 0.15)) | |||
|
563 | (fp_line (start 2.11074 0.55118) (end 2.00914 0.87122) (layer F.SilkS) (width 0.15)) | |||
|
564 | (fp_line (start 2.00914 0.87122) (end 2.0193 1.22936) (layer F.SilkS) (width 0.15)) | |||
|
565 | (fp_line (start 2.0193 1.22936) (end 2.16916 1.57988) (layer F.SilkS) (width 0.15)) | |||
|
566 | (fp_line (start 2.16916 1.57988) (end 2.43078 1.81102) (layer F.SilkS) (width 0.15)) | |||
|
567 | (fp_line (start 2.43078 1.81102) (end 2.74066 1.97104) (layer F.SilkS) (width 0.15)) | |||
|
568 | (fp_line (start 2.74066 1.97104) (end 2.97942 2.02946) (layer F.SilkS) (width 0.15)) | |||
|
569 | (fp_line (start 2.97942 2.02946) (end 3.2004 2.02946) (layer F.SilkS) (width 0.15)) | |||
|
570 | (fp_line (start 3.2004 2.02946) (end 2.46888 2.14884) (layer F.SilkS) (width 0.15)) | |||
|
571 | (fp_line (start 2.46888 2.14884) (end 2.17932 2.4003) (layer F.SilkS) (width 0.15)) | |||
|
572 | (fp_line (start 2.17932 2.4003) (end 2.03962 2.76098) (layer F.SilkS) (width 0.15)) | |||
|
573 | (fp_line (start 2.03962 2.76098) (end 2.00914 3.08102) (layer F.SilkS) (width 0.15)) | |||
|
574 | (fp_line (start 2.00914 3.08102) (end 2.11074 3.44932) (layer F.SilkS) (width 0.15)) | |||
|
575 | (fp_line (start 2.11074 3.44932) (end 2.30886 3.68046) (layer F.SilkS) (width 0.15)) | |||
|
576 | (fp_line (start 2.30886 3.68046) (end 2.5908 3.92938) (layer F.SilkS) (width 0.15)) | |||
|
577 | (fp_line (start 2.5908 3.92938) (end 2.96926 4.0005) (layer F.SilkS) (width 0.15)) | |||
|
578 | (fp_line (start 2.96926 4.0005) (end 4.89966 4.0005) (layer F.SilkS) (width 0.15)) | |||
|
579 | (fp_line (start -5.00126 -4.0005) (end -2.99974 -4.0005) (layer F.SilkS) (width 0.15)) | |||
|
580 | (fp_line (start -2.99974 -4.0005) (end -2.61874 -3.9497) (layer F.SilkS) (width 0.15)) | |||
|
581 | (fp_line (start -2.61874 -3.9497) (end -2.32918 -3.73126) (layer F.SilkS) (width 0.15)) | |||
|
582 | (fp_line (start -2.32918 -3.73126) (end -2.10058 -3.50012) (layer F.SilkS) (width 0.15)) | |||
|
583 | (fp_line (start -2.10058 -3.50012) (end -2.04978 -3.2893) (layer F.SilkS) (width 0.15)) | |||
|
584 | (fp_line (start -2.04978 -3.2893) (end -1.98882 -2.94894) (layer F.SilkS) (width 0.15)) | |||
|
585 | (fp_line (start -1.98882 -2.94894) (end -2.04978 -2.51968) (layer F.SilkS) (width 0.15)) | |||
|
586 | (fp_line (start -2.04978 -2.51968) (end -2.23012 -2.32918) (layer F.SilkS) (width 0.15)) | |||
|
587 | (fp_line (start -2.23012 -2.32918) (end -2.44094 -2.18948) (layer F.SilkS) (width 0.15)) | |||
|
588 | (fp_line (start -2.44094 -2.18948) (end -2.84988 -2.00914) (layer F.SilkS) (width 0.15)) | |||
|
589 | (fp_line (start -2.84988 -2.00914) (end -3.0099 -2.00914) (layer F.SilkS) (width 0.15)) | |||
|
590 | (fp_line (start -3.0099 -2.00914) (end -2.72034 -1.92024) (layer F.SilkS) (width 0.15)) | |||
|
591 | (fp_line (start -2.72034 -1.92024) (end -2.4003 -1.81102) (layer F.SilkS) (width 0.15)) | |||
|
592 | (fp_line (start -2.4003 -1.81102) (end -2.14122 -1.62052) (layer F.SilkS) (width 0.15)) | |||
|
593 | (fp_line (start -2.14122 -1.62052) (end -2.0701 -1.3208) (layer F.SilkS) (width 0.15)) | |||
|
594 | (fp_line (start -2.0701 -1.3208) (end -2.02946 -0.98044) (layer F.SilkS) (width 0.15)) | |||
|
595 | (fp_line (start -2.02946 -0.98044) (end -2.0701 -0.6604) (layer F.SilkS) (width 0.15)) | |||
|
596 | (fp_line (start -2.0701 -0.6604) (end -2.2098 -0.42926) (layer F.SilkS) (width 0.15)) | |||
|
597 | (fp_line (start -2.2098 -0.42926) (end -2.30886 -0.2794) (layer F.SilkS) (width 0.15)) | |||
|
598 | (fp_line (start -2.30886 -0.2794) (end -2.55016 -0.11938) (layer F.SilkS) (width 0.15)) | |||
|
599 | (fp_line (start -2.55016 -0.11938) (end -2.78892 -0.02032) (layer F.SilkS) (width 0.15)) | |||
|
600 | (fp_line (start -2.78892 -0.02032) (end -2.93878 -0.02032) (layer F.SilkS) (width 0.15)) | |||
|
601 | (fp_line (start -2.93878 -0.02032) (end -2.66954 0.07112) (layer F.SilkS) (width 0.15)) | |||
|
602 | (fp_line (start -2.66954 0.07112) (end -2.42062 0.20066) (layer F.SilkS) (width 0.15)) | |||
|
603 | (fp_line (start -2.42062 0.20066) (end -2.16916 0.43942) (layer F.SilkS) (width 0.15)) | |||
|
604 | (fp_line (start -2.16916 0.43942) (end -2.0701 0.6604) (layer F.SilkS) (width 0.15)) | |||
|
605 | (fp_line (start -2.0701 0.6604) (end -2.00914 0.9398) (layer F.SilkS) (width 0.15)) | |||
|
606 | (fp_line (start -2.00914 0.9398) (end -2.02946 1.20904) (layer F.SilkS) (width 0.15)) | |||
|
607 | (fp_line (start -2.02946 1.20904) (end -2.10058 1.48082) (layer F.SilkS) (width 0.15)) | |||
|
608 | (fp_line (start -2.10058 1.48082) (end -2.28092 1.6891) (layer F.SilkS) (width 0.15)) | |||
|
609 | (fp_line (start -2.28092 1.6891) (end -2.44094 1.8288) (layer F.SilkS) (width 0.15)) | |||
|
610 | (fp_line (start -2.44094 1.8288) (end -2.61874 1.92024) (layer F.SilkS) (width 0.15)) | |||
|
611 | (fp_line (start -2.61874 1.92024) (end -2.94894 1.96088) (layer F.SilkS) (width 0.15)) | |||
|
612 | (fp_line (start -2.94894 1.96088) (end -2.68986 2.03962) (layer F.SilkS) (width 0.15)) | |||
|
613 | (fp_line (start -2.68986 2.03962) (end -2.42062 2.19964) (layer F.SilkS) (width 0.15)) | |||
|
614 | (fp_line (start -2.42062 2.19964) (end -2.23012 2.44094) (layer F.SilkS) (width 0.15)) | |||
|
615 | (fp_line (start -2.23012 2.44094) (end -2.10058 2.64922) (layer F.SilkS) (width 0.15)) | |||
|
616 | (fp_line (start -2.10058 2.64922) (end -2.04978 2.88036) (layer F.SilkS) (width 0.15)) | |||
|
617 | (fp_line (start -2.04978 2.88036) (end -2.04978 3.1496) (layer F.SilkS) (width 0.15)) | |||
|
618 | (fp_line (start -2.04978 3.1496) (end -2.14122 3.46964) (layer F.SilkS) (width 0.15)) | |||
|
619 | (fp_line (start -2.14122 3.46964) (end -2.2606 3.68046) (layer F.SilkS) (width 0.15)) | |||
|
620 | (fp_line (start -2.2606 3.68046) (end -2.46888 3.88112) (layer F.SilkS) (width 0.15)) | |||
|
621 | (fp_line (start -2.46888 3.88112) (end -2.74066 3.92938) (layer F.SilkS) (width 0.15)) | |||
|
622 | (fp_line (start -2.74066 3.92938) (end -2.94894 3.98018) (layer F.SilkS) (width 0.15)) | |||
|
623 | (fp_line (start -2.94894 3.98018) (end -3.0099 3.95986) (layer F.SilkS) (width 0.15)) | |||
|
624 | (fp_line (start -3.0099 3.95986) (end -4.93014 3.9497) (layer F.SilkS) (width 0.15)) | |||
|
625 | (fp_line (start 0 -5.99948) (end 0 5.99948) (layer F.SilkS) (width 0.15)) | |||
|
626 | (fp_line (start 8.99922 -8.99922) (end -8.99922 -8.99922) (layer F.SilkS) (width 0.15)) | |||
|
627 | (fp_line (start -8.99922 -8.99922) (end -8.99922 8.99922) (layer F.SilkS) (width 0.15)) | |||
|
628 | (fp_line (start -8.99922 8.99922) (end 8.99922 8.99922) (layer F.SilkS) (width 0.15)) | |||
|
629 | (fp_line (start 8.99922 8.99922) (end 8.99922 -8.99922) (layer F.SilkS) (width 0.15)) | |||
|
630 | (pad 6 thru_hole circle (at -6.35 -3.81) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) | |||
|
631 | (pad 4 thru_hole circle (at -6.35 3.81) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) | |||
|
632 | (pad 1 thru_hole circle (at 6.35 -3.81) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) | |||
|
633 | (pad 3 thru_hole circle (at 6.35 3.81) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) | |||
|
634 | (model NF-Transformers_ETAL.3dshapes/NF-Transformer_1-1_P1200_ETAL.wrl | |||
|
635 | (at (xyz 0 0 0)) | |||
|
636 | (scale (xyz 0.3937 0.3937 0.3937)) | |||
|
637 | (rotate (xyz 0 0 0)) | |||
|
638 | ) | |||
|
639 | ) | |||
|
640 | ||||
|
641 | (target plus (at 126 82.75) (size 5) (width 0.1) (layer Edge.Cuts)) | |||
|
642 | (target plus (at 198.25 93.75) (size 5) (width 0.1) (layer Edge.Cuts)) | |||
|
643 | (dimension 7.5 (width 0.3) (layer F.SilkS) | |||
|
644 | (gr_text "7,500 mm" (at 168 90.65) (layer F.SilkS) | |||
|
645 | (effects (font (size 1.5 1.5) (thickness 0.3))) | |||
|
646 | ) | |||
|
647 | (feature1 (pts (xy 171.75 98.75) (xy 171.75 89.3))) | |||
|
648 | (feature2 (pts (xy 164.25 98.75) (xy 164.25 89.3))) | |||
|
649 | (crossbar (pts (xy 164.25 92) (xy 171.75 92))) | |||
|
650 | (arrow1a (pts (xy 171.75 92) (xy 170.623496 92.586421))) | |||
|
651 | (arrow1b (pts (xy 171.75 92) (xy 170.623496 91.413579))) | |||
|
652 | (arrow2a (pts (xy 164.25 92) (xy 165.376504 92.586421))) | |||
|
653 | (arrow2b (pts (xy 164.25 92) (xy 165.376504 91.413579))) | |||
|
654 | ) | |||
|
655 | (gr_text hello (at 181.75 101.25) (layer F.SilkS) | |||
|
656 | (effects (font (size 1.5 1.5) (thickness 0.3))) | |||
|
657 | ) | |||
|
658 | (gr_arc (start 185.5 106) (end 189.75 107.5) (angle 174.5962086) (layer F.SilkS) (width 0.2)) | |||
|
659 | (gr_circle (center 183 113) (end 186 115.75) (layer F.SilkS) (width 0.2)) | |||
|
660 | ||||
|
661 | (via (at 159.75 103.5) (size 0.6) (drill 0.4) (layers F.Cu B.Cu) (net 1)) | |||
|
662 | (segment (start 160.036365 103.786365) (end 159.75 103.5) (width 0.25) (layer F.Cu) (net 1)) | |||
|
663 | (segment (start 160.036365 104.5) (end 160.036365 103.786365) (width 0.25) (layer F.Cu) (net 1)) | |||
|
664 | (segment (start 157.75 104.5) (end 160.036365 104.5) (width 0.25) (layer F.Cu) (net 1)) | |||
|
665 | (segment (start 160.036365 104.5) (end 162.285 104.5) (width 0.25) (layer F.Cu) (net 1)) | |||
|
666 | (segment (start 161.25 116.75) (end 170.5 116.75) (width 0.25) (layer F.Cu) (net 2)) | |||
|
667 | (segment (start 156.25 111.75) (end 161.25 116.75) (width 0.25) (layer F.Cu) (net 2)) | |||
|
668 | (segment (start 156.25 104.5) (end 156.25 111.75) (width 0.25) (layer F.Cu) (net 2)) | |||
|
669 | (segment (start 168 115.25) (end 168 110.215) (width 0.25) (layer F.Cu) (net 3)) | |||
|
670 | (segment (start 170.5 110.255) (end 170.54 110.215) (width 0.25) (layer F.Cu) (net 4)) | |||
|
671 | (segment (start 170.5 115.25) (end 170.5 110.255) (width 0.25) (layer F.Cu) (net 4)) | |||
|
672 | ||||
|
673 | (zone (net 2) (net_name "Net-(R101-Pad2)") (layer F.Cu) (tstamp 0) (hatch edge 0.508) | |||
|
674 | (priority 1) | |||
|
675 | (connect_pads (clearance 0.508)) | |||
|
676 | (min_thickness 0.254) | |||
|
677 | (fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508) (smoothing fillet) (radius 0.2)) | |||
|
678 | (polygon | |||
|
679 | (pts | |||
|
680 | (xy 195 119.75) (xy 179.75 114.75) (xy 192.5 127.25) (xy 133.75 130) (xy 137.630288 117.262531) | |||
|
681 | (xy 124.5 106.5) (xy 142.197095 102.27149) (xy 145.25 92.25) (xy 169.536242 105.674556) (xy 182.5 110.25) | |||
|
682 | (xy 181.034023 112.030113) | |||
|
683 | ) | |||
|
684 | ) | |||
|
685 | (filled_polygon | |||
|
686 | (pts | |||
|
687 | (xy 193.120387 118.902543) (xy 193.118602 118.91578) (xy 193.114419 118.928464) (xy 193.107978 118.940164) (xy 193.099499 118.950484) | |||
|
688 | (xy 193.089272 118.959071) (xy 193.07764 118.965636) (xy 193.065001 118.969955) (xy 193.051785 118.97188) (xy 193.038439 118.971347) | |||
|
689 | (xy 193.019677 118.967062) (xy 180.597879 114.894341) (xy 180.542689 114.881941) (xy 180.480035 114.880102) (xy 180.418177 114.890227) | |||
|
690 | (xy 180.35938 114.911951) (xy 180.305798 114.944475) (xy 180.25939 114.98661) (xy 180.221859 115.036812) (xy 180.194574 115.093243) | |||
|
691 | (xy 180.178539 115.15384) (xy 180.174337 115.216379) (xy 180.182126 115.278576) (xy 180.201617 115.33815) (xy 180.232099 115.39292) | |||
|
692 | (xy 180.268515 115.436202) (xy 192.079136 127.015241) (xy 192.092092 127.030665) (xy 192.098855 127.042889) (xy 192.103146 127.056188) | |||
|
693 | (xy 192.104803 127.070062) (xy 192.103764 127.083994) (xy 192.100067 127.09747) (xy 192.093852 127.109985) (xy 192.085349 127.121071) | |||
|
694 | (xy 192.074874 127.130318) (xy 192.062819 127.13738) (xy 192.049632 127.141996) (xy 192.029695 127.144875) (xy 171.585 128.10186) | |||
|
695 | (xy 171.585 117.062542) (xy 171.585 117.03375) (xy 171.42625 116.875) (xy 170.627 116.875) (xy 170.627 117.47625) | |||
|
696 | (xy 170.78575 117.635) (xy 170.887458 117.635) (xy 171.012542 117.635) (xy 171.135223 117.610597) (xy 171.250785 117.56273) | |||
|
697 | (xy 171.354789 117.493237) (xy 171.443237 117.404789) (xy 171.51273 117.300785) (xy 171.560597 117.185223) (xy 171.585 117.062542) | |||
|
698 | (xy 171.585 128.10186) (xy 170.373 128.158592) (xy 170.373 117.47625) (xy 170.373 116.875) (xy 169.57375 116.875) | |||
|
699 | (xy 169.415 117.03375) (xy 169.415 117.062542) (xy 169.439403 117.185223) (xy 169.48727 117.300785) (xy 169.556763 117.404789) | |||
|
700 | (xy 169.645211 117.493237) (xy 169.749215 117.56273) (xy 169.864777 117.610597) (xy 169.987458 117.635) (xy 170.112542 117.635) | |||
|
701 | (xy 170.21425 117.635) (xy 170.373 117.47625) (xy 170.373 128.158592) (xy 169.085 128.218882) (xy 169.085 117.062542) | |||
|
702 | (xy 169.085 117.03375) (xy 168.92625 116.875) (xy 168.127 116.875) (xy 168.127 117.47625) (xy 168.28575 117.635) | |||
|
703 | (xy 168.387458 117.635) (xy 168.512542 117.635) (xy 168.635223 117.610597) (xy 168.750785 117.56273) (xy 168.854789 117.493237) | |||
|
704 | (xy 168.943237 117.404789) (xy 169.01273 117.300785) (xy 169.060597 117.185223) (xy 169.085 117.062542) (xy 169.085 128.218882) | |||
|
705 | (xy 167.873 128.275614) (xy 167.873 117.47625) (xy 167.873 116.875) (xy 167.07375 116.875) (xy 166.915 117.03375) | |||
|
706 | (xy 166.915 117.062542) (xy 166.939403 117.185223) (xy 166.98727 117.300785) (xy 167.056763 117.404789) (xy 167.145211 117.493237) | |||
|
707 | (xy 167.249215 117.56273) (xy 167.364777 117.610597) (xy 167.487458 117.635) (xy 167.612542 117.635) (xy 167.71425 117.635) | |||
|
708 | (xy 167.873 117.47625) (xy 167.873 128.275614) (xy 156.125 128.82552) (xy 156.125 105.42625) (xy 156.125 104.627) | |||
|
709 | (xy 156.125 104.373) (xy 156.125 103.57375) (xy 155.96625 103.415) (xy 155.937458 103.415) (xy 155.814777 103.439403) | |||
|
710 | (xy 155.699215 103.48727) (xy 155.595211 103.556763) (xy 155.506763 103.645211) (xy 155.43727 103.749215) (xy 155.389403 103.864777) | |||
|
711 | (xy 155.365 103.987458) (xy 155.365 104.112542) (xy 155.365 104.21425) (xy 155.52375 104.373) (xy 156.125 104.373) | |||
|
712 | (xy 156.125 104.627) (xy 155.52375 104.627) (xy 155.365 104.78575) (xy 155.365 104.887458) (xy 155.365 105.012542) | |||
|
713 | (xy 155.389403 105.135223) (xy 155.43727 105.250785) (xy 155.506763 105.354789) (xy 155.595211 105.443237) (xy 155.699215 105.51273) | |||
|
714 | (xy 155.814777 105.560597) (xy 155.937458 105.585) (xy 155.96625 105.585) (xy 156.125 105.42625) (xy 156.125 128.82552) | |||
|
715 | (xy 134.033461 129.859593) (xy 134.013543 129.858618) (xy 134.000107 129.855327) (xy 133.98754 129.84954) (xy 133.976304 129.84147) | |||
|
716 | (xy 133.966808 129.83141) (xy 133.959398 129.819728) (xy 133.954344 129.80685) (xy 133.951832 129.793246) (xy 133.951953 129.779412) | |||
|
717 | (xy 133.955915 129.759868) (xy 137.714318 117.4225) (xy 137.72476 117.373854) (xy 137.727122 117.318776) (xy 137.720211 117.264083) | |||
|
718 | (xy 137.704224 117.211325) (xy 137.679612 117.161996) (xy 137.647074 117.117494) (xy 137.611387 117.082826) (xy 124.896799 106.661033) | |||
|
719 | (xy 124.883072 106.647477) (xy 124.87544 106.636479) (xy 124.869962 106.624264) (xy 124.866825 106.611248) (xy 124.866135 106.597877) | |||
|
720 | (xy 124.867917 106.584609) (xy 124.87211 106.571897) (xy 124.87857 106.560172) (xy 124.887079 106.549833) (xy 124.897344 106.541238) | |||
|
721 | (xy 124.909013 106.534678) (xy 124.927282 106.528481) (xy 142.12052 102.420362) (xy 142.169092 102.404198) (xy 142.219015 102.377269) | |||
|
722 | (xy 142.26354 102.342131) (xy 142.301336 102.299835) (xy 142.331266 102.251651) (xy 142.350369 102.204158) (xy 145.29788 92.528636) | |||
|
723 | (xy 145.304847 92.511428) (xy 145.311723 92.500526) (xy 145.320419 92.491016) (xy 145.330662 92.483196) (xy 145.34213 92.477312) | |||
|
724 | (xy 145.354456 92.473552) (xy 145.367255 92.472034) (xy 145.380118 92.472806) (xy 145.392642 92.475844) (xy 145.409626 92.483346) | |||
|
725 | (xy 160.630928 100.897131) (xy 160.630928 101.071) (xy 160.639303 101.174043) (xy 160.688156 101.330278) (xy 160.656081 101.401611) | |||
|
726 | (xy 160.630928 101.579) (xy 160.630928 102.341) (xy 160.639303 102.444043) (xy 160.688156 102.600278) (xy 160.656081 102.671611) | |||
|
727 | (xy 160.630928 102.849) (xy 160.630928 103.183571) (xy 160.57955 103.05892) (xy 160.478079 102.906193) (xy 160.348875 102.776084) | |||
|
728 | (xy 160.19686 102.673549) (xy 160.027825 102.602493) (xy 159.848207 102.565623) (xy 159.664849 102.564343) (xy 159.484733 102.598701) | |||
|
729 | (xy 159.314722 102.66739) (xy 159.161291 102.767793) (xy 159.030283 102.896086) (xy 158.926689 103.047381) (xy 158.854454 103.215916) | |||
|
730 | (xy 158.816331 103.395272) (xy 158.813771 103.578617) (xy 158.84339 103.74) (xy 158.552421 103.74) (xy 158.477326 103.626566) | |||
|
731 | (xy 158.340792 103.510558) (xy 158.177389 103.437081) (xy 158 103.411928) (xy 157.5 103.411928) (xy 157.396957 103.420303) | |||
|
732 | (xy 157.225959 103.473773) (xy 157.076566 103.572674) (xy 157.002788 103.659505) (xy 156.993237 103.645211) (xy 156.904789 103.556763) | |||
|
733 | (xy 156.800785 103.48727) (xy 156.685223 103.439403) (xy 156.562542 103.415) (xy 156.53375 103.415) (xy 156.375 103.57375) | |||
|
734 | (xy 156.375 104.373) (xy 156.397 104.373) (xy 156.397 104.627) (xy 156.375 104.627) (xy 156.375 105.42625) | |||
|
735 | (xy 156.53375 105.585) (xy 156.562542 105.585) (xy 156.685223 105.560597) (xy 156.800785 105.51273) (xy 156.904789 105.443237) | |||
|
736 | (xy 156.993237 105.354789) (xy 157.001823 105.341938) (xy 157.022674 105.373434) (xy 157.159208 105.489442) (xy 157.322611 105.562919) | |||
|
737 | (xy 157.5 105.588072) (xy 158 105.588072) (xy 158.103043 105.579697) (xy 158.274041 105.526227) (xy 158.423434 105.427326) | |||
|
738 | (xy 158.539442 105.290792) (xy 158.553288 105.26) (xy 160.036365 105.26) (xy 160.649219 105.26) (xy 160.630928 105.389) | |||
|
739 | (xy 160.630928 106.151) (xy 160.639303 106.254043) (xy 160.688156 106.410278) (xy 160.656081 106.481611) (xy 160.630928 106.659) | |||
|
740 | (xy 160.630928 107.421) (xy 160.639303 107.524043) (xy 160.688156 107.680278) (xy 160.656081 107.751611) (xy 160.630928 107.929) | |||
|
741 | (xy 160.630928 108.691) (xy 160.639303 108.794043) (xy 160.692773 108.965041) (xy 160.791674 109.114434) (xy 160.928208 109.230442) | |||
|
742 | (xy 161.091611 109.303919) (xy 161.269 109.329072) (xy 163.170928 109.329072) (xy 163.170928 111.231) (xy 163.179303 111.334043) | |||
|
743 | (xy 163.232773 111.505041) (xy 163.331674 111.654434) (xy 163.468208 111.770442) (xy 163.631611 111.843919) (xy 163.809 111.869072) | |||
|
744 | (xy 164.571 111.869072) (xy 164.674043 111.860697) (xy 164.830278 111.811843) (xy 164.901611 111.843919) (xy 165.079 111.869072) | |||
|
745 | (xy 165.841 111.869072) (xy 165.944043 111.860697) (xy 166.100278 111.811843) (xy 166.171611 111.843919) (xy 166.349 111.869072) | |||
|
746 | (xy 167.111 111.869072) (xy 167.214043 111.860697) (xy 167.24 111.85258) (xy 167.24 114.447578) (xy 167.126566 114.522674) | |||
|
747 | (xy 167.010558 114.659208) (xy 166.937081 114.822611) (xy 166.911928 115) (xy 166.911928 115.5) (xy 166.920303 115.603043) | |||
|
748 | (xy 166.973773 115.774041) (xy 167.072674 115.923434) (xy 167.159505 115.997211) (xy 167.145211 116.006763) (xy 167.056763 116.095211) | |||
|
749 | (xy 166.98727 116.199215) (xy 166.939403 116.314777) (xy 166.915 116.437458) (xy 166.915 116.46625) (xy 167.07375 116.625) | |||
|
750 | (xy 167.873 116.625) (xy 167.873 116.603) (xy 168.127 116.603) (xy 168.127 116.625) (xy 168.92625 116.625) | |||
|
751 | (xy 169.085 116.46625) (xy 169.085 116.437458) (xy 169.060597 116.314777) (xy 169.01273 116.199215) (xy 168.943237 116.095211) | |||
|
752 | (xy 168.854789 116.006763) (xy 168.841938 115.998176) (xy 168.873434 115.977326) (xy 168.989442 115.840792) (xy 169.062919 115.677389) | |||
|
753 | (xy 169.088072 115.5) (xy 169.088072 115) (xy 169.079697 114.896957) (xy 169.026227 114.725959) (xy 168.927326 114.576566) | |||
|
754 | (xy 168.790792 114.460558) (xy 168.76 114.446711) (xy 168.76 111.85078) (xy 168.889 111.869072) (xy 169.651 111.869072) | |||
|
755 | (xy 169.74 111.861838) (xy 169.74 114.447578) (xy 169.626566 114.522674) (xy 169.510558 114.659208) (xy 169.437081 114.822611) | |||
|
756 | (xy 169.411928 115) (xy 169.411928 115.5) (xy 169.420303 115.603043) (xy 169.473773 115.774041) (xy 169.572674 115.923434) | |||
|
757 | (xy 169.659505 115.997211) (xy 169.645211 116.006763) (xy 169.556763 116.095211) (xy 169.48727 116.199215) (xy 169.439403 116.314777) | |||
|
758 | (xy 169.415 116.437458) (xy 169.415 116.46625) (xy 169.57375 116.625) (xy 170.373 116.625) (xy 170.373 116.603) | |||
|
759 | (xy 170.627 116.603) (xy 170.627 116.625) (xy 171.42625 116.625) (xy 171.585 116.46625) (xy 171.585 116.437458) | |||
|
760 | (xy 171.560597 116.314777) (xy 171.51273 116.199215) (xy 171.443237 116.095211) (xy 171.354789 116.006763) (xy 171.341938 115.998176) | |||
|
761 | (xy 171.373434 115.977326) (xy 171.489442 115.840792) (xy 171.562919 115.677389) (xy 171.588072 115.5) (xy 171.588072 115) | |||
|
762 | (xy 171.579697 114.896957) (xy 171.526227 114.725959) (xy 171.427326 114.576566) (xy 171.290792 114.460558) (xy 171.26 114.446711) | |||
|
763 | (xy 171.26 111.845108) (xy 171.429 111.869072) (xy 172.191 111.869072) (xy 172.294043 111.860697) (xy 172.465041 111.807227) | |||
|
764 | (xy 172.614434 111.708326) (xy 172.730442 111.571792) (xy 172.803919 111.408389) (xy 172.829072 111.231) (xy 172.829072 109.329072) | |||
|
765 | (xy 174.731 109.329072) (xy 174.834043 109.320697) (xy 175.005041 109.267227) (xy 175.154434 109.168326) (xy 175.270442 109.031792) | |||
|
766 | (xy 175.343919 108.868389) (xy 175.369072 108.691) (xy 175.369072 107.929) (xy 175.363957 107.866074) (xy 182.182469 110.272608) | |||
|
767 | (xy 182.200617 110.281048) (xy 182.211858 110.289199) (xy 182.221337 110.299345) (xy 182.228705 110.311115) (xy 182.233692 110.324073) | |||
|
768 | (xy 182.236113 110.337746) (xy 182.23588 110.351628) (xy 182.233002 110.36521) (xy 182.227583 110.377996) (xy 182.216399 110.394595) | |||
|
769 | (xy 181.085029 111.768399) (xy 181.052943 111.816173) (xy 181.028317 111.874998) (xy 181.015554 111.93748) (xy 181.015138 112.001253) | |||
|
770 | (xy 181.027085 112.063898) (xy 181.050943 112.12304) (xy 181.085807 112.17644) (xy 181.130357 112.222074) (xy 181.177773 112.254683) | |||
|
771 | (xy 193.078176 118.832796) (xy 193.094089 118.843619) (xy 193.103567 118.85303) (xy 193.111157 118.864021) (xy 193.1166 118.876216) | |||
|
772 | (xy 193.119712 118.889205) (xy 193.120387 118.902543) | |||
|
773 | ) | |||
|
774 | ) | |||
|
775 | ) | |||
|
776 | ) |
@@ -1,77 +1,77 | |||||
1 | %skeleton "lalr1.cc" |
|
1 | %skeleton "lalr1.cc" | |
2 | //%require "3.0" |
|
2 | //%require "3.0" | |
3 | //%debug |
|
3 | //%debug | |
4 | %defines |
|
4 | %defines | |
5 |
%define namespace |
|
5 | %define api.namespace {QIlib} | |
6 |
%define parser_class_name |
|
6 | %define parser_class_name {lispLike_Parser} | |
7 |
|
7 | |||
8 | %code requires{ |
|
8 | %code requires{ | |
9 | #include <QString> |
|
9 | #include <QString> | |
10 | namespace QIlib { |
|
10 | namespace QIlib { | |
11 | class lispLike_Driver; |
|
11 | class lispLike_Driver; | |
12 | class lispLike_Scanner; |
|
12 | class lispLike_Scanner; | |
13 | } |
|
13 | } | |
14 | } |
|
14 | } | |
15 |
|
15 | |||
16 | %lex-param { QIlib::lispLike_Scanner &scanner } |
|
16 | %lex-param { QIlib::lispLike_Scanner &scanner } | |
17 | %parse-param { QIlib::lispLike_Scanner &scanner } |
|
17 | %parse-param { QIlib::lispLike_Scanner &scanner } | |
18 |
|
18 | |||
19 | %lex-param { QIlib::lispLike_Driver &driver } |
|
19 | %lex-param { QIlib::lispLike_Driver &driver } | |
20 | %parse-param { QIlib::lispLike_Driver &driver } |
|
20 | %parse-param { QIlib::lispLike_Driver &driver } | |
21 |
|
21 | |||
22 | %code{ |
|
22 | %code{ | |
23 | #include <iostream> |
|
23 | #include <iostream> | |
24 | #include <cstdlib> |
|
24 | #include <cstdlib> | |
25 | #include <fstream> |
|
25 | #include <fstream> | |
26 | /* include for all driver functions */ |
|
26 | /* include for all driver functions */ | |
27 | #include <lispLike_driver.h> |
|
27 | #include <lispLike_driver.h> | |
28 |
|
28 | |||
29 | /* this is silly, but I can't figure out a way around */ |
|
29 | /* this is silly, but I can't figure out a way around */ | |
30 | static int yylex(QIlib::lispLike_Parser::semantic_type *yylval, |
|
30 | static int yylex(QIlib::lispLike_Parser::semantic_type *yylval, | |
31 | QIlib::lispLike_Scanner &scanner, |
|
31 | QIlib::lispLike_Scanner &scanner, | |
32 | QIlib::lispLike_Driver &driver); |
|
32 | QIlib::lispLike_Driver &driver); | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | } |
|
35 | } | |
36 |
|
36 | |||
37 | /* token types */ |
|
37 | /* token types */ | |
38 | %union { |
|
38 | %union { | |
39 | QString* sval; |
|
39 | QString* sval; | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | //%token END 0 "end of file" |
|
42 | //%token END 0 "end of file" | |
43 | %token <sval> VALUE |
|
43 | %token <sval> VALUE | |
44 | %token <sval> NODE |
|
44 | %token <sval> NODE | |
45 | %token CLOSENODE |
|
45 | %token CLOSENODE | |
46 |
|
46 | |||
47 | /* destructor rule for <sval> objects */ |
|
47 | /* destructor rule for <sval> objects */ | |
48 | %destructor { if ($$) { delete ($$); ($$) = NULL; } } <sval> |
|
48 | %destructor { if ($$) { delete ($$); ($$) = NULL; } } <sval> | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | %% |
|
51 | %% | |
52 |
|
52 | |||
53 | PartNode |
|
53 | PartNode | |
54 | : NODE { driver.add_node( *$1 ); } |
|
54 | : NODE { driver.add_node( *$1 ); } | |
55 | | PartNode NODE { driver.add_node( *$2 ); } |
|
55 | | PartNode NODE { driver.add_node( *$2 ); } | |
56 | | PartNode VALUE { driver.add_value( *$2 ); } |
|
56 | | PartNode VALUE { driver.add_value( *$2 ); } | |
57 | | PartNode CLOSENODE { driver.close_node(); } |
|
57 | | PartNode CLOSENODE { driver.close_node(); } | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | %% |
|
60 | %% | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | void QIlib::lispLike_Parser::error(const std::string& error) |
|
63 | void QIlib::lispLike_Parser::error(const std::string& error) | |
64 | { |
|
64 | { | |
65 | std::cerr << "Error: " << error << "\n"; |
|
65 | std::cerr << "Error: " << error << "\n"; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 |
|
68 | |||
69 | /* include for access to scanner.yylex */ |
|
69 | /* include for access to scanner.yylex */ | |
70 | #include "lispLike_scanner.h" |
|
70 | #include "lispLike_scanner.h" | |
71 |
|
71 | |||
72 | static int yylex( QIlib::lispLike_Parser::semantic_type *yylval, |
|
72 | static int yylex( QIlib::lispLike_Parser::semantic_type *yylval, | |
73 | QIlib::lispLike_Scanner &scanner, |
|
73 | QIlib::lispLike_Scanner &scanner, | |
74 | QIlib::lispLike_Driver &driver ) |
|
74 | QIlib::lispLike_Driver &driver ) | |
75 | { |
|
75 | { | |
76 | return( scanner.yylex(yylval) ); |
|
76 | return( scanner.yylex(yylval) ); | |
77 | } |
|
77 | } |
@@ -1,148 +1,167 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the Kicad Tools Software |
|
2 | -- This file is a part of the Kicad Tools Software | |
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | const char* add_net_c = "(add_net"; |
|
22 | const char* add_net_c = "(add_net"; | |
|
23 | const char* angle_c = "(angle"; | |||
23 | const char* area_c = "(area"; |
|
24 | const char* area_c = "(area"; | |
|
25 | const char* arrow1a_c = "(arrow1a"; | |||
|
26 | const char* arrow1b_c = "(arrow1b"; | |||
|
27 | const char* arrow2a_c = "(arrow2a"; | |||
|
28 | const char* arrow2b_c = "(arrow2b"; | |||
24 | const char* at_c = "(at"; |
|
29 | const char* at_c = "(at"; | |
25 | const char* attr_c = "(attr"; |
|
30 | const char* attr_c = "(attr"; | |
26 | const char* center_c = "(center"; |
|
31 | const char* center_c = "(center"; | |
27 | const char* clearance_c = "(clearance"; |
|
32 | const char* clearance_c = "(clearance"; | |
28 | const char* code_c = "(code"; |
|
33 | const char* code_c = "(code"; | |
29 | const char* component_c = "(component"; |
|
34 | const char* component_c = "(component"; | |
30 | const char* components_c = "(components"; |
|
35 | const char* components_c = "(components"; | |
|
36 | const char* crossbar_c = "(crossbar"; | |||
31 | const char* date_c = "(date"; |
|
37 | const char* date_c = "(date"; | |
32 | const char* design_c = "(design"; |
|
38 | const char* design_c = "(design"; | |
|
39 | const char* dimension_c = "(dimension"; | |||
33 | const char* drawings_c = "(drawings"; |
|
40 | const char* drawings_c = "(drawings"; | |
|
41 | const char* drill_c = "(drill"; | |||
34 | const char* drillshape_c = "(drillshape"; |
|
42 | const char* drillshape_c = "(drillshape"; | |
35 | const char* edge_width_c = "(edge_width"; |
|
43 | const char* edge_width_c = "(edge_width"; | |
36 | const char* effects_c = "(effects"; |
|
44 | const char* effects_c = "(effects"; | |
37 | const char* end_c = "(end"; |
|
45 | const char* end_c = "(end"; | |
38 | const char* excludeedgelayer_c = "(excludeedgelayer"; |
|
46 | const char* excludeedgelayer_c = "(excludeedgelayer"; | |
39 | const char* export_c = "(export"; |
|
47 | const char* export_c = "(export"; | |
|
48 | const char* feature1_c = "(feature1"; | |||
|
49 | const char* feature2_c = "(feature2"; | |||
40 | const char* field_c = "(field"; |
|
50 | const char* field_c = "(field"; | |
41 | const char* fields_c = "(fields"; |
|
51 | const char* fields_c = "(fields"; | |
42 | const char* font_c = "(font"; |
|
52 | const char* font_c = "(font"; | |
43 | const char* fp_circle_c = "(fp_circle"; |
|
53 | const char* fp_circle_c = "(fp_circle"; | |
44 | const char* fp_line_c = "(fp_line"; |
|
54 | const char* fp_line_c = "(fp_line"; | |
45 | const char* fp_text_c = "(fp_text"; |
|
55 | const char* fp_text_c = "(fp_text"; | |
46 | const char* general_c = "(general"; |
|
56 | const char* general_c = "(general"; | |
|
57 | const char* gr_arc_c = "(gr_arc"; | |||
|
58 | const char* gr_circle_c = "(gr_circle"; | |||
|
59 | const char* gr_line_c = "(gr_line"; | |||
|
60 | const char* gr_text_c = "(gr_text"; | |||
47 | const char* host_c = "(host"; |
|
61 | const char* host_c = "(host"; | |
48 | const char* hpglpendiameter_c = "(hpglpendiameter"; |
|
62 | const char* hpglpendiameter_c = "(hpglpendiameter"; | |
49 | const char* hpglpennumber_c = "(hpglpennumber"; |
|
63 | const char* hpglpennumber_c = "(hpglpennumber"; | |
50 | const char* hpglpenoverlay_c = "(hpglpenoverlay"; |
|
64 | const char* hpglpenoverlay_c = "(hpglpenoverlay"; | |
51 | const char* hpglpenspeed_c = "(hpglpenspeed"; |
|
65 | const char* hpglpenspeed_c = "(hpglpenspeed"; | |
52 | const char* kicad_pcb_c = "(kicad_pcb"; |
|
66 | const char* kicad_pcb_c = "(kicad_pcb"; | |
53 | const char* last_trace_width_c = "(last_trace_width"; |
|
67 | const char* last_trace_width_c = "(last_trace_width"; | |
54 | const char* layers_c = "(layers"; |
|
68 | const char* layers_c = "(layers"; | |
|
69 | const char* layer_c = "(layer"; | |||
55 | const char* layerselection_c = "(layerselection"; |
|
70 | const char* layerselection_c = "(layerselection"; | |
56 | const char* lib_c = "(lib"; |
|
71 | const char* lib_c = "(lib"; | |
57 | const char* libpart_c = "(libpart"; |
|
72 | const char* libpart_c = "(libpart"; | |
58 | const char* libparts_c = "(libparts"; |
|
73 | const char* libparts_c = "(libparts"; | |
59 | const char* libraries_c = "(libraries"; |
|
74 | const char* libraries_c = "(libraries"; | |
60 | const char* library_c = "(library"; |
|
75 | const char* library_c = "(library"; | |
61 | const char* libsource_c = "(libsource"; |
|
76 | const char* libsource_c = "(libsource"; | |
62 | const char* linewidth_c = "(linewidth"; |
|
77 | const char* linewidth_c = "(linewidth"; | |
63 | const char* links_c = "(links"; |
|
78 | const char* links_c = "(links"; | |
64 | const char* logical_c = "(logical"; |
|
79 | const char* logical_c = "(logical"; | |
65 | const char* mirror_c = "(mirror"; |
|
80 | const char* mirror_c = "(mirror"; | |
66 | const char* mod_edge_width_c = "(mod_edge_width"; |
|
81 | const char* mod_edge_width_c = "(mod_edge_width"; | |
67 | const char* mod_text_size_c = "(mod_text_size"; |
|
82 | const char* mod_text_size_c = "(mod_text_size"; | |
68 | const char* mode_c = "(mode"; |
|
83 | const char* mode_c = "(mode"; | |
69 | const char* model_c = "(model"; |
|
84 | const char* model_c = "(model"; | |
70 | const char* module_c = "(module"; |
|
85 | const char* module_c = "(module"; | |
71 | const char* modules_c = "(modules"; |
|
86 | const char* modules_c = "(modules"; | |
72 | const char* name_c = "(name"; |
|
87 | const char* name_c = "(name"; | |
73 | const char* names_c = "(names"; |
|
88 | const char* names_c = "(names"; | |
74 | const char* net_c = "(net"; |
|
89 | const char* net_c = "(net"; | |
75 | const char* net_class_c = "(net_class"; |
|
90 | const char* net_class_c = "(net_class"; | |
76 | const char* nets_c = "(nets"; |
|
91 | const char* nets_c = "(nets"; | |
77 | const char* no_connect_c = "(no_connect"; |
|
92 | const char* no_connect_c = "(no_connect"; | |
78 | const char* node_c = "(node"; |
|
93 | const char* node_c = "(node"; | |
79 | const char* num_c = "(num"; |
|
94 | const char* num_c = "(num"; | |
80 | const char* outputdirectory_c = "(outputdirectory"; |
|
95 | const char* outputdirectory_c = "(outputdirectory"; | |
81 | const char* outputformat_c = "(outputformat"; |
|
96 | const char* outputformat_c = "(outputformat"; | |
82 | const char* pad_c = "(pad"; |
|
97 | const char* pad_c = "(pad"; | |
83 | const char* pad_drill_c = "(pad_drill"; |
|
98 | const char* pad_drill_c = "(pad_drill"; | |
84 | const char* pad_size_c = "(pad_size"; |
|
99 | const char* pad_size_c = "(pad_size"; | |
85 | const char* pad_to_mask_clearance_c = "(pad_to_mask_clearance"; |
|
100 | const char* pad_to_mask_clearance_c = "(pad_to_mask_clearance"; | |
86 | const char* padsonsilk_c = "(padsonsilk"; |
|
101 | const char* padsonsilk_c = "(padsonsilk"; | |
87 | const char* page_c = "(page"; |
|
102 | const char* page_c = "(page"; | |
88 | const char* part_c = "(part"; |
|
103 | const char* part_c = "(part"; | |
89 | const char* path_c = "(path"; |
|
104 | const char* path_c = "(path"; | |
90 | const char* pcb_text_size_c = "(pcb_text_size"; |
|
105 | const char* pcb_text_size_c = "(pcb_text_size"; | |
91 | const char* pcb_text_width_c = "(pcb_text_width"; |
|
106 | const char* pcb_text_width_c = "(pcb_text_width"; | |
92 | const char* pcbplotparams_c = "(pcbplotparams"; |
|
107 | const char* pcbplotparams_c = "(pcbplotparams"; | |
93 | const char* pin_c = "(pin"; |
|
108 | const char* pin_c = "(pin"; | |
94 | const char* pins_c = "(pins"; |
|
109 | const char* pins_c = "(pins"; | |
95 | const char* plotframeref_c = "(plotframeref"; |
|
110 | const char* plotframeref_c = "(plotframeref"; | |
96 | const char* plotinvisibletext_c = "(plotinvisibletext"; |
|
111 | const char* plotinvisibletext_c = "(plotinvisibletext"; | |
97 | const char* plotothertext_c = "(plotothertext"; |
|
112 | const char* plotothertext_c = "(plotothertext"; | |
98 | const char* plotreference_c = "(plotreference"; |
|
113 | const char* plotreference_c = "(plotreference"; | |
99 | const char* plotvalue_c = "(plotvalue"; |
|
114 | const char* plotvalue_c = "(plotvalue"; | |
100 | const char* psa4output_c = "(psa4output"; |
|
115 | const char* psa4output_c = "(psa4output"; | |
101 | const char* psnegative_c = "(psnegative"; |
|
116 | const char* psnegative_c = "(psnegative"; | |
102 | const char* ref_c = "(ref"; |
|
117 | const char* ref_c = "(ref"; | |
103 | const char* rotate = "(rota"; |
|
118 | const char* rotate = "(rota"; | |
104 | const char* scale_c = "(scale"; |
|
119 | const char* scale_c = "(scale"; | |
105 | const char* scaleselection_c = "(scaleselection"; |
|
120 | const char* scaleselection_c = "(scaleselection"; | |
|
121 | const char* segment_c = "(segment"; | |||
106 | const char* segment_width_c = "(segment_width"; |
|
122 | const char* segment_width_c = "(segment_width"; | |
107 | const char* setup_c = "(setup"; |
|
123 | const char* setup_c = "(setup"; | |
108 | const char* sheetpath_c = "(sheetpath"; |
|
124 | const char* sheetpath_c = "(sheetpath"; | |
|
125 | const char* size_c = "(size"; | |||
109 | const char* source_c = "(source"; |
|
126 | const char* source_c = "(source"; | |
110 | const char* start_c = "(start"; |
|
127 | const char* start_c = "(start"; | |
111 | const char* subtractmaskfromsilk_c = "(subtractmaskfromsilk"; |
|
128 | const char* subtractmaskfromsilk_c = "(subtractmaskfromsilk"; | |
112 | const char* tags_c = "(tags"; |
|
129 | const char* tags_c = "(tags"; | |
113 | const char* tedit_c = "(tedit"; |
|
130 | const char* tedit_c = "(tedit"; | |
114 | const char* thickness_c = "(thickness"; |
|
131 | const char* thickness_c = "(thickness"; | |
115 | const char* tool_c = "(tool"; |
|
132 | const char* tool_c = "(tool"; | |
116 | const char* trace_clearance_c = "(trace_clearance"; |
|
133 | const char* trace_clearance_c = "(trace_clearance"; | |
117 | const char* trace_min_c = "(trace_min"; |
|
134 | const char* trace_min_c = "(trace_min"; | |
118 | const char* trace_width_c = "(trace_width"; |
|
135 | const char* trace_width_c = "(trace_width"; | |
119 | const char* tracks_c = "(tracks"; |
|
136 | const char* tracks_c = "(tracks"; | |
120 | const char* tstamp_c = "(tstamp"; |
|
137 | const char* tstamp_c = "(tstamp"; | |
121 | const char* tstamps_c = "(tstamps"; |
|
138 | const char* tstamps_c = "(tstamps"; | |
122 | const char* type_c = "(type"; |
|
139 | const char* type_c = "(type"; | |
123 | const char* uri_c = "(uri"; |
|
140 | const char* uri_c = "(uri"; | |
124 | const char* useauxorigin_c = "(useauxorigin"; |
|
141 | const char* useauxorigin_c = "(useauxorigin"; | |
125 | const char* usegerberextensions_c = "(usegerberextensions"; |
|
142 | const char* usegerberextensions_c = "(usegerberextensions"; | |
126 | const char* uvia_dia_c = "(uvia_dia"; |
|
143 | const char* uvia_dia_c = "(uvia_dia"; | |
127 | const char* uvia_drill_c = "(uvia_drill"; |
|
144 | const char* uvia_drill_c = "(uvia_drill"; | |
128 | const char* uvia_min_drill_c = "(uvia_min_drill"; |
|
145 | const char* uvia_min_drill_c = "(uvia_min_drill"; | |
129 | const char* uvia_min_size_c = "(uvia_min_size"; |
|
146 | const char* uvia_min_size_c = "(uvia_min_size"; | |
130 | const char* uvia_size_c = "(uvia_size"; |
|
147 | const char* uvia_size_c = "(uvia_size"; | |
131 | const char* uvias_allowed_c = "(uvias_allowed"; |
|
148 | const char* uvias_allowed_c = "(uvias_allowed"; | |
132 | const char* value_c = "(value"; |
|
149 | const char* value_c = "(value"; | |
133 | const char* version_c = "(version"; |
|
150 | const char* version_c = "(version"; | |
|
151 | const char* via_c = "(via"; | |||
134 | const char* via_dia_c = "(via_dia"; |
|
152 | const char* via_dia_c = "(via_dia"; | |
135 | const char* via_drill_c = "(via_drill"; |
|
153 | const char* via_drill_c = "(via_drill"; | |
136 | const char* via_min_drill_c = "(via_min_drill"; |
|
154 | const char* via_min_drill_c = "(via_min_drill"; | |
137 | const char* via_min_size_c = "(via_min_size"; |
|
155 | const char* via_min_size_c = "(via_min_size"; | |
138 | const char* via_size_c = "(via_size"; |
|
156 | const char* via_size_c = "(via_size"; | |
139 | const char* viasonmask_c = "(viasonmask"; |
|
157 | const char* viasonmask_c = "(viasonmask"; | |
140 | const char* visible_elements_c = "(visible_elements"; |
|
158 | const char* visible_elements_c = "(visible_elements"; | |
141 | const char* width_c = "(width"; |
|
159 | const char* width_c = "(width"; | |
142 | const char* xyz = "(x"; |
|
160 | const char* xyz = "(x"; | |
143 | const char* zone_45_only_c = "(zone_45_only"; |
|
161 | const char* zone_45_only_c = "(zone_45_only"; | |
144 | const char* zone_clearance_c = "(zone_clearance"; |
|
162 | const char* zone_clearance_c = "(zone_clearance"; | |
|
163 | const char* zone_c = "(zone"; | |||
145 | const char* zones_c = "(zones"; |
|
164 | const char* zones_c = "(zones"; | |
146 |
|
165 | |||
147 |
|
166 | |||
148 |
|
167 |
@@ -1,159 +1,178 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the Kicad Tools Software |
|
2 | -- This file is a part of the Kicad Tools Software | |
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | /* |
|
22 | /* | |
23 | * Have a look to LispLikeLexique.ods |
|
23 | * Have a look to LispLikeLexique.ods | |
24 | */ |
|
24 | */ | |
25 | #ifndef LEXIQUE_H |
|
25 | #ifndef LEXIQUE_H | |
26 | #define LEXIQUE_H |
|
26 | #define LEXIQUE_H | |
27 |
|
27 | |||
28 | namespace QIlib{ |
|
28 | namespace QIlib{ | |
29 |
|
29 | |||
30 | namespace Lexique |
|
30 | namespace Lexique | |
31 | { |
|
31 | { | |
32 | extern "C" const char* add_net_c; |
|
32 | extern "C" const char* add_net_c; | |
|
33 | extern "C" const char* angle_c; | |||
33 | extern "C" const char* area_c; |
|
34 | extern "C" const char* area_c; | |
|
35 | extern "C" const char* arrow1a_c; | |||
|
36 | extern "C" const char* arrow1b_c; | |||
|
37 | extern "C" const char* arrow2a_c; | |||
|
38 | extern "C" const char* arrow2b_c; | |||
34 | extern "C" const char* at_c; |
|
39 | extern "C" const char* at_c; | |
35 | extern "C" const char* attr_c; |
|
40 | extern "C" const char* attr_c; | |
36 | extern "C" const char* center_c; |
|
41 | extern "C" const char* center_c; | |
37 | extern "C" const char* clearance_c; |
|
42 | extern "C" const char* clearance_c; | |
38 | extern "C" const char* code_c; |
|
43 | extern "C" const char* code_c; | |
39 | extern "C" const char* component_c; |
|
44 | extern "C" const char* component_c; | |
40 | extern "C" const char* components_c; |
|
45 | extern "C" const char* components_c; | |
|
46 | extern "C" const char* crossbar_c; | |||
41 | extern "C" const char* date_c; |
|
47 | extern "C" const char* date_c; | |
42 | extern "C" const char* design_c; |
|
48 | extern "C" const char* design_c; | |
|
49 | extern "C" const char* dimension_c; | |||
43 | extern "C" const char* drawings_c; |
|
50 | extern "C" const char* drawings_c; | |
|
51 | extern "C" const char* drill_c; | |||
44 | extern "C" const char* drillshape_c; |
|
52 | extern "C" const char* drillshape_c; | |
45 | extern "C" const char* edge_width_c; |
|
53 | extern "C" const char* edge_width_c; | |
46 | extern "C" const char* effects_c; |
|
54 | extern "C" const char* effects_c; | |
47 | extern "C" const char* end_c; |
|
55 | extern "C" const char* end_c; | |
48 | extern "C" const char* excludeedgelayer_c; |
|
56 | extern "C" const char* excludeedgelayer_c; | |
49 | extern "C" const char* export_c; |
|
57 | extern "C" const char* export_c; | |
|
58 | extern "C" const char* feature1_c; | |||
|
59 | extern "C" const char* feature2_c; | |||
50 | extern "C" const char* field_c; |
|
60 | extern "C" const char* field_c; | |
51 | extern "C" const char* fields_c; |
|
61 | extern "C" const char* fields_c; | |
52 | extern "C" const char* font_c; |
|
62 | extern "C" const char* font_c; | |
53 | extern "C" const char* fp_circle_c; |
|
63 | extern "C" const char* fp_circle_c; | |
54 | extern "C" const char* fp_line_c; |
|
64 | extern "C" const char* fp_line_c; | |
55 | extern "C" const char* fp_text_c; |
|
65 | extern "C" const char* fp_text_c; | |
56 | extern "C" const char* general_c; |
|
66 | extern "C" const char* general_c; | |
|
67 | extern "C" const char* gr_arc_c; | |||
|
68 | extern "C" const char* gr_circle_c; | |||
|
69 | extern "C" const char* gr_line_c; | |||
|
70 | extern "C" const char* gr_text_c; | |||
57 | extern "C" const char* host_c; |
|
71 | extern "C" const char* host_c; | |
58 | extern "C" const char* hpglpendiameter_c; |
|
72 | extern "C" const char* hpglpendiameter_c; | |
59 | extern "C" const char* hpglpennumber_c; |
|
73 | extern "C" const char* hpglpennumber_c; | |
60 | extern "C" const char* hpglpenoverlay_c; |
|
74 | extern "C" const char* hpglpenoverlay_c; | |
61 | extern "C" const char* hpglpenspeed_c; |
|
75 | extern "C" const char* hpglpenspeed_c; | |
62 | extern "C" const char* kicad_pcb_c; |
|
76 | extern "C" const char* kicad_pcb_c; | |
63 | extern "C" const char* last_trace_width_c; |
|
77 | extern "C" const char* last_trace_width_c; | |
64 | extern "C" const char* layers_c; |
|
78 | extern "C" const char* layers_c; | |
|
79 | extern "C" const char* layer_c; | |||
65 | extern "C" const char* layerselection_c; |
|
80 | extern "C" const char* layerselection_c; | |
66 | extern "C" const char* lib_c; |
|
81 | extern "C" const char* lib_c; | |
67 | extern "C" const char* libpart_c; |
|
82 | extern "C" const char* libpart_c; | |
68 | extern "C" const char* libparts_c; |
|
83 | extern "C" const char* libparts_c; | |
69 | extern "C" const char* libraries_c; |
|
84 | extern "C" const char* libraries_c; | |
70 | extern "C" const char* library_c; |
|
85 | extern "C" const char* library_c; | |
71 | extern "C" const char* libsource_c; |
|
86 | extern "C" const char* libsource_c; | |
72 | extern "C" const char* linewidth_c; |
|
87 | extern "C" const char* linewidth_c; | |
73 | extern "C" const char* links_c; |
|
88 | extern "C" const char* links_c; | |
74 | extern "C" const char* logical_c; |
|
89 | extern "C" const char* logical_c; | |
75 | extern "C" const char* mirror_c; |
|
90 | extern "C" const char* mirror_c; | |
76 | extern "C" const char* mod_edge_width_c; |
|
91 | extern "C" const char* mod_edge_width_c; | |
77 | extern "C" const char* mod_text_size_c; |
|
92 | extern "C" const char* mod_text_size_c; | |
78 | extern "C" const char* mode_c; |
|
93 | extern "C" const char* mode_c; | |
79 | extern "C" const char* model_c; |
|
94 | extern "C" const char* model_c; | |
80 | extern "C" const char* module_c; |
|
95 | extern "C" const char* module_c; | |
81 | extern "C" const char* modules_c; |
|
96 | extern "C" const char* modules_c; | |
82 | extern "C" const char* name_c; |
|
97 | extern "C" const char* name_c; | |
83 | extern "C" const char* names_c; |
|
98 | extern "C" const char* names_c; | |
84 | extern "C" const char* net_c; |
|
99 | extern "C" const char* net_c; | |
85 | extern "C" const char* net_class_c; |
|
100 | extern "C" const char* net_class_c; | |
86 | extern "C" const char* nets_c; |
|
101 | extern "C" const char* nets_c; | |
87 | extern "C" const char* no_connect_c; |
|
102 | extern "C" const char* no_connect_c; | |
88 | extern "C" const char* node_c; |
|
103 | extern "C" const char* node_c; | |
89 | extern "C" const char* num_c; |
|
104 | extern "C" const char* num_c; | |
90 | extern "C" const char* outputdirectory_c; |
|
105 | extern "C" const char* outputdirectory_c; | |
91 | extern "C" const char* outputformat_c; |
|
106 | extern "C" const char* outputformat_c; | |
92 | extern "C" const char* pad_c; |
|
107 | extern "C" const char* pad_c; | |
93 | extern "C" const char* pad_drill_c; |
|
108 | extern "C" const char* pad_drill_c; | |
94 | extern "C" const char* pad_size_c; |
|
109 | extern "C" const char* pad_size_c; | |
95 | extern "C" const char* pad_to_mask_clearance_c; |
|
110 | extern "C" const char* pad_to_mask_clearance_c; | |
96 | extern "C" const char* padsonsilk_c; |
|
111 | extern "C" const char* padsonsilk_c; | |
97 | extern "C" const char* page_c; |
|
112 | extern "C" const char* page_c; | |
98 | extern "C" const char* part_c; |
|
113 | extern "C" const char* part_c; | |
99 | extern "C" const char* path_c; |
|
114 | extern "C" const char* path_c; | |
100 | extern "C" const char* pcb_text_size_c; |
|
115 | extern "C" const char* pcb_text_size_c; | |
101 | extern "C" const char* pcb_text_width_c; |
|
116 | extern "C" const char* pcb_text_width_c; | |
102 | extern "C" const char* pcbplotparams_c; |
|
117 | extern "C" const char* pcbplotparams_c; | |
103 | extern "C" const char* pin_c; |
|
118 | extern "C" const char* pin_c; | |
104 | extern "C" const char* pins_c; |
|
119 | extern "C" const char* pins_c; | |
105 | extern "C" const char* plotframeref_c; |
|
120 | extern "C" const char* plotframeref_c; | |
106 | extern "C" const char* plotinvisibletext_c; |
|
121 | extern "C" const char* plotinvisibletext_c; | |
107 | extern "C" const char* plotothertext_c; |
|
122 | extern "C" const char* plotothertext_c; | |
108 | extern "C" const char* plotreference_c; |
|
123 | extern "C" const char* plotreference_c; | |
109 | extern "C" const char* plotvalue_c; |
|
124 | extern "C" const char* plotvalue_c; | |
110 | extern "C" const char* psa4output_c; |
|
125 | extern "C" const char* psa4output_c; | |
111 | extern "C" const char* psnegative_c; |
|
126 | extern "C" const char* psnegative_c; | |
112 | extern "C" const char* ref_c; |
|
127 | extern "C" const char* ref_c; | |
113 | extern "C" const char* rotate; |
|
128 | extern "C" const char* rotate; | |
114 | extern "C" const char* scale_c; |
|
129 | extern "C" const char* scale_c; | |
115 | extern "C" const char* scaleselection_c; |
|
130 | extern "C" const char* scaleselection_c; | |
|
131 | extern "C" const char* segment_c; | |||
116 | extern "C" const char* segment_width_c; |
|
132 | extern "C" const char* segment_width_c; | |
117 | extern "C" const char* setup_c; |
|
133 | extern "C" const char* setup_c; | |
118 | extern "C" const char* sheetpath_c; |
|
134 | extern "C" const char* sheetpath_c; | |
|
135 | extern "C" const char* size_c; | |||
119 | extern "C" const char* source_c; |
|
136 | extern "C" const char* source_c; | |
120 | extern "C" const char* start_c; |
|
137 | extern "C" const char* start_c; | |
121 | extern "C" const char* subtractmaskfromsilk_c; |
|
138 | extern "C" const char* subtractmaskfromsilk_c; | |
122 | extern "C" const char* tags_c; |
|
139 | extern "C" const char* tags_c; | |
123 | extern "C" const char* tedit_c; |
|
140 | extern "C" const char* tedit_c; | |
124 | extern "C" const char* thickness_c; |
|
141 | extern "C" const char* thickness_c; | |
125 | extern "C" const char* tool_c; |
|
142 | extern "C" const char* tool_c; | |
126 | extern "C" const char* trace_clearance_c; |
|
143 | extern "C" const char* trace_clearance_c; | |
127 | extern "C" const char* trace_min_c; |
|
144 | extern "C" const char* trace_min_c; | |
128 | extern "C" const char* trace_width_c; |
|
145 | extern "C" const char* trace_width_c; | |
129 | extern "C" const char* tracks_c; |
|
146 | extern "C" const char* tracks_c; | |
130 | extern "C" const char* tstamp_c; |
|
147 | extern "C" const char* tstamp_c; | |
131 | extern "C" const char* tstamps_c; |
|
148 | extern "C" const char* tstamps_c; | |
132 | extern "C" const char* type_c; |
|
149 | extern "C" const char* type_c; | |
133 | extern "C" const char* uri_c; |
|
150 | extern "C" const char* uri_c; | |
134 | extern "C" const char* useauxorigin_c; |
|
151 | extern "C" const char* useauxorigin_c; | |
135 | extern "C" const char* usegerberextensions_c; |
|
152 | extern "C" const char* usegerberextensions_c; | |
136 | extern "C" const char* uvia_dia_c; |
|
153 | extern "C" const char* uvia_dia_c; | |
137 | extern "C" const char* uvia_drill_c; |
|
154 | extern "C" const char* uvia_drill_c; | |
138 | extern "C" const char* uvia_min_drill_c; |
|
155 | extern "C" const char* uvia_min_drill_c; | |
139 | extern "C" const char* uvia_min_size_c; |
|
156 | extern "C" const char* uvia_min_size_c; | |
140 | extern "C" const char* uvia_size_c; |
|
157 | extern "C" const char* uvia_size_c; | |
141 | extern "C" const char* uvias_allowed_c; |
|
158 | extern "C" const char* uvias_allowed_c; | |
142 | extern "C" const char* value_c; |
|
159 | extern "C" const char* value_c; | |
143 | extern "C" const char* version_c; |
|
160 | extern "C" const char* version_c; | |
|
161 | extern "C" const char* via_c; | |||
144 | extern "C" const char* via_dia_c; |
|
162 | extern "C" const char* via_dia_c; | |
145 | extern "C" const char* via_drill_c; |
|
163 | extern "C" const char* via_drill_c; | |
146 | extern "C" const char* via_min_drill_c; |
|
164 | extern "C" const char* via_min_drill_c; | |
147 | extern "C" const char* via_min_size_c; |
|
165 | extern "C" const char* via_min_size_c; | |
148 | extern "C" const char* via_size_c; |
|
166 | extern "C" const char* via_size_c; | |
149 | extern "C" const char* viasonmask_c; |
|
167 | extern "C" const char* viasonmask_c; | |
150 | extern "C" const char* visible_elements_c; |
|
168 | extern "C" const char* visible_elements_c; | |
151 | extern "C" const char* width_c; |
|
169 | extern "C" const char* width_c; | |
152 | extern "C" const char* xyz; |
|
170 | extern "C" const char* xyz; | |
153 | extern "C" const char* zone_45_only_c; |
|
171 | extern "C" const char* zone_45_only_c; | |
154 | extern "C" const char* zone_clearance_c; |
|
172 | extern "C" const char* zone_clearance_c; | |
|
173 | extern "C" const char* zone_c; | |||
155 | extern "C" const char* zones_c; |
|
174 | extern "C" const char* zones_c; | |
156 | } |
|
175 | } | |
157 | } |
|
176 | } | |
158 |
|
177 | |||
159 | #endif // LEXIQUE_H |
|
178 | #endif // LEXIQUE_H |
This diff has been collapsed as it changes many lines, (908 lines changed) Show them Hide them | |||||
@@ -1,274 +1,1172 | |||||
1 | #include "qicadpcb.h" |
|
1 | #include "qicadpcb.h" | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | QIlib::QIcadPcb::QIcadPcb() |
|
4 | QIlib::QIcadPcb::QIcadPcb() | |
5 | :pcbRoot(NULL) |
|
5 | :pcbRoot(NULL) | |
6 | { |
|
6 | { | |
7 |
|
7 | |||
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | bool QIlib::QIcadPcb::parsePcb(const QString &pcb) |
|
10 | bool QIlib::QIcadPcb::parsePcb(const QString &pcb) | |
11 | { |
|
11 | { | |
12 | parse(pcb.toStdString().c_str()); |
|
12 | parse(pcb.toStdString().c_str()); | |
13 | updateConcreteTree(); |
|
13 | updateConcreteTree(); | |
14 | return false; |
|
14 | return false; | |
15 | } |
|
15 | } | |
16 |
|
16 | |||
17 | QString QIlib::QIcadPcb::toString() |
|
17 | QString QIlib::QIcadPcb::toString() | |
18 | { |
|
18 | { | |
19 |
|
19 | |||
20 | } |
|
20 | } | |
21 |
|
21 | |||
22 | QString QIlib::QIcadPcb::print() |
|
22 | QString QIlib::QIcadPcb::print() | |
23 | { |
|
23 | { | |
24 | return rootNode.print(); |
|
24 | return rootNode.print(); | |
25 | } |
|
25 | } | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | void QIlib::QIcadPcb::updateConcreteTree() |
|
28 | void QIlib::QIcadPcb::updateConcreteTree() | |
29 | { |
|
29 | { | |
30 | if(this->rootNode.nodes.count()) |
|
30 | if(this->rootNode.nodes.count()) | |
31 | { |
|
31 | { | |
32 | if(this->rootNode.nodes.at(0)->name==QIlib::Lexique::kicad_pcb_c) |
|
32 | if(this->rootNode.nodes.at(0)->name==QIlib::Lexique::kicad_pcb_c) | |
33 | { |
|
33 | { | |
34 | if(this->pcbRoot==NULL) |
|
34 | if(this->pcbRoot==NULL) | |
35 | { |
|
35 | { | |
36 | this->pcbRoot = new QIcadPcbRoot(this->rootNode.nodes.at(0)); |
|
36 | this->pcbRoot = new QIcadPcbRoot(this->rootNode.nodes.at(0)); | |
37 | } |
|
37 | } | |
38 | } |
|
38 | } | |
39 | } |
|
39 | } | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | QIlib::QIcadPcbRoot::QIcadPcbRoot(QIlib::AbstractNode *node) |
|
43 | QIlib::QIcadPcbRoot::QIcadPcbRoot(QIlib::AbstractNode *node) | |
44 | :QIcadAbstractNodeWrapper(node) |
|
44 | :QIcadAbstractNodeWrapper(node) | |
45 | { |
|
45 | { | |
46 | this->setNode(node); |
|
46 | this->setNode(node); | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | void QIlib::QIcadPcbRoot::setNode(QIlib::AbstractNode *node) |
|
49 | void QIlib::QIcadPcbRoot::setNode(QIlib::AbstractNode *node) | |
50 | { |
|
50 | { | |
51 | this->p_node = node; |
|
|||
52 | this->clrNets(); |
|
51 | this->clrNets(); | |
|
52 | this->clrModules(); | |||
|
53 | this->clrDimensions(); | |||
|
54 | this->clrLines(); | |||
|
55 | this->clrSegments(); | |||
|
56 | this->clrVias(); | |||
|
57 | this->clrArcs(); | |||
|
58 | this->clrCircles(); | |||
|
59 | this->clrTexts(); | |||
|
60 | this->clrZones(); | |||
53 | if(node->name==QIlib::Lexique::kicad_pcb_c) |
|
61 | if(node->name==QIlib::Lexique::kicad_pcb_c) | |
54 | { |
|
62 | { | |
|
63 | this->p_node = node; | |||
55 | for(int i=0;i<node->nodes.count();i++) |
|
64 | for(int i=0;i<node->nodes.count();i++) | |
56 | { |
|
65 | { | |
57 | if(node->nodes.at(i)->name==QIlib::Lexique::version_c) |
|
66 | if(node->nodes.at(i)->name==QIlib::Lexique::version_c) | |
58 | { |
|
67 | { | |
59 | this->version.setNode(node->nodes.at(i)); |
|
68 | this->version.setNode(node->nodes.at(i)); | |
60 | } |
|
69 | } | |
61 | if(node->nodes.at(i)->name==QIlib::Lexique::host_c) |
|
70 | if(node->nodes.at(i)->name==QIlib::Lexique::host_c) | |
62 | { |
|
71 | { | |
63 | this->host.setNode(node->nodes.at(i)); |
|
72 | this->host.setNode(node->nodes.at(i)); | |
64 | } |
|
73 | } | |
65 | if(node->nodes.at(i)->name==QIlib::Lexique::page_c) |
|
74 | if(node->nodes.at(i)->name==QIlib::Lexique::page_c) | |
66 | { |
|
75 | { | |
67 | this->page.setNode(node->nodes.at(i)); |
|
76 | this->page.setNode(node->nodes.at(i)); | |
68 | } |
|
77 | } | |
69 | if(node->nodes.at(i)->name==QIlib::Lexique::general_c) |
|
78 | if(node->nodes.at(i)->name==QIlib::Lexique::general_c) | |
70 | { |
|
79 | { | |
71 | this->general.setNode(node->nodes.at(i)); |
|
80 | this->general.setNode(node->nodes.at(i)); | |
72 | } |
|
81 | } | |
73 | if(node->nodes.at(i)->name==QIlib::Lexique::layers_c) |
|
82 | if(node->nodes.at(i)->name==QIlib::Lexique::layers_c) | |
74 | { |
|
83 | { | |
75 | this->layers.setNode(node->nodes.at(i)); |
|
84 | this->layers.setNode(node->nodes.at(i)); | |
76 | } |
|
85 | } | |
77 | if(node->nodes.at(i)->name==QIlib::Lexique::setup_c) |
|
86 | if(node->nodes.at(i)->name==QIlib::Lexique::setup_c) | |
78 | { |
|
87 | { | |
79 | this->setup.setNode(node->nodes.at(i)); |
|
88 | this->setup.setNode(node->nodes.at(i)); | |
80 | } |
|
89 | } | |
81 | if(node->nodes.at(i)->name==QIlib::Lexique::net_c) |
|
90 | if(node->nodes.at(i)->name==QIlib::Lexique::net_c) | |
82 | { |
|
91 | { | |
83 | this->apendNet(node->nodes.at(i)); |
|
92 | this->apendNet(node->nodes.at(i)); | |
84 | } |
|
93 | } | |
|
94 | if(node->nodes.at(i)->name==QIlib::Lexique::module_c) | |||
|
95 | { | |||
|
96 | this->apendModule(node->nodes.at(i)); | |||
|
97 | } | |||
|
98 | if(node->nodes.at(i)->name==QIlib::Lexique::gr_line_c) | |||
|
99 | { | |||
|
100 | this->apendLine(node->nodes.at(i)); | |||
|
101 | } | |||
|
102 | if(node->nodes.at(i)->name==QIlib::Lexique::dimension_c) | |||
|
103 | { | |||
|
104 | this->apendDimension(node->nodes.at(i)); | |||
|
105 | } | |||
|
106 | if(node->nodes.at(i)->name==QIlib::Lexique::via_c) | |||
|
107 | { | |||
|
108 | this->apendVia(node->nodes.at(i)); | |||
|
109 | } | |||
|
110 | if(node->nodes.at(i)->name==QIlib::Lexique::segment_c) | |||
|
111 | { | |||
|
112 | this->apendSegment(node->nodes.at(i)); | |||
|
113 | } | |||
|
114 | if(node->nodes.at(i)->name==QIlib::Lexique::gr_text_c) | |||
|
115 | { | |||
|
116 | this->apendText(node->nodes.at(i)); | |||
|
117 | } | |||
|
118 | if(node->nodes.at(i)->name==QIlib::Lexique::gr_arc_c) | |||
|
119 | { | |||
|
120 | this->apendArc(node->nodes.at(i)); | |||
|
121 | } | |||
|
122 | if(node->nodes.at(i)->name==QIlib::Lexique::gr_circle_c) | |||
|
123 | { | |||
|
124 | this->apendCircle(node->nodes.at(i)); | |||
|
125 | } | |||
|
126 | if(node->nodes.at(i)->name==QIlib::Lexique::zone_c) | |||
|
127 | { | |||
|
128 | this->apendZone(node->nodes.at(i)); | |||
|
129 | } | |||
85 | } |
|
130 | } | |
86 | } |
|
131 | } | |
87 | } |
|
132 | } | |
88 |
|
133 | |||
89 | void QIlib::QIcadPcbRoot::clrNets() |
|
134 | void QIlib::QIcadPcbRoot::clrNets() | |
90 | { |
|
135 | { | |
91 | while(nets.count()) |
|
136 | while(nets.count()) | |
92 | { |
|
137 | { | |
93 | QIcadAbstractNodeWrapper* net; |
|
138 | QIcadAbstractNodeWrapper* net; | |
94 | net = nets.last(); |
|
139 | net = nets.last(); | |
95 | nets.removeLast(); |
|
140 | nets.removeLast(); | |
96 | delete net; |
|
141 | delete net; | |
97 | } |
|
142 | } | |
98 | } |
|
143 | } | |
99 |
|
144 | |||
100 | void QIlib::QIcadPcbRoot::apendNet(QIlib::AbstractNode *node) |
|
145 | void QIlib::QIcadPcbRoot::apendNet(QIlib::AbstractNode *node) | |
101 | { |
|
146 | { | |
102 | if(node->name==QIlib::Lexique::net_c) |
|
147 | if(node->name==QIlib::Lexique::net_c) | |
103 | { |
|
148 | { | |
104 | this->nets.append(new QIcadAbstractNodeWrapper(node)); |
|
149 | this->nets.append(new QIcadAbstractNodeWrapper(node)); | |
105 | } |
|
150 | } | |
106 | } |
|
151 | } | |
107 |
|
152 | |||
|
153 | void QIlib::QIcadPcbRoot::clrModules() | |||
|
154 | { | |||
|
155 | while(modules.count()) | |||
|
156 | { | |||
|
157 | QIcadPcbModule* module; | |||
|
158 | module = modules.last(); | |||
|
159 | modules.removeLast(); | |||
|
160 | delete module; | |||
|
161 | } | |||
|
162 | } | |||
|
163 | ||||
|
164 | void QIlib::QIcadPcbRoot::apendModule(QIlib::AbstractNode *node) | |||
|
165 | { | |||
|
166 | if(node->name==QIlib::Lexique::module_c) | |||
|
167 | { | |||
|
168 | this->modules.append(new QIcadPcbModule(node)); | |||
|
169 | } | |||
|
170 | } | |||
|
171 | ||||
|
172 | void QIlib::QIcadPcbRoot::clrDimensions() | |||
|
173 | { | |||
|
174 | while(dimensions.count()) | |||
|
175 | { | |||
|
176 | QIcadPcbDimension* dimension; | |||
|
177 | dimension = dimensions.last(); | |||
|
178 | dimensions.removeLast(); | |||
|
179 | delete dimension; | |||
|
180 | } | |||
|
181 | } | |||
|
182 | ||||
|
183 | void QIlib::QIcadPcbRoot::apendDimension(QIlib::AbstractNode *node) | |||
|
184 | { | |||
|
185 | if(node->name==QIlib::Lexique::dimension_c) | |||
|
186 | { | |||
|
187 | this->dimensions.append(new QIcadPcbDimension(node)); | |||
|
188 | } | |||
|
189 | } | |||
|
190 | ||||
|
191 | void QIlib::QIcadPcbRoot::apendLine(QIlib::AbstractNode *node) | |||
|
192 | { | |||
|
193 | if(node->name==QIlib::Lexique::gr_line_c) | |||
|
194 | { | |||
|
195 | this->lines.append(new QIcadPcbLine(node)); | |||
|
196 | } | |||
|
197 | } | |||
|
198 | ||||
|
199 | void QIlib::QIcadPcbRoot::clrLines() | |||
|
200 | { | |||
|
201 | while(lines.count()) | |||
|
202 | { | |||
|
203 | QIcadPcbLine* line; | |||
|
204 | line = lines.last(); | |||
|
205 | lines.removeLast(); | |||
|
206 | delete line; | |||
|
207 | } | |||
|
208 | } | |||
|
209 | ||||
|
210 | void QIlib::QIcadPcbRoot::clrSegments() | |||
|
211 | { | |||
|
212 | while(segments.count()) | |||
|
213 | { | |||
|
214 | QIcadPcbSegment* segment; | |||
|
215 | segment = segments.last(); | |||
|
216 | segments.removeLast(); | |||
|
217 | delete segment; | |||
|
218 | } | |||
|
219 | } | |||
|
220 | ||||
|
221 | void QIlib::QIcadPcbRoot::apendSegment(QIlib::AbstractNode *node) | |||
|
222 | { | |||
|
223 | if(node->name==QIlib::Lexique::segment_c) | |||
|
224 | { | |||
|
225 | this->segments.append(new QIcadPcbSegment(node)); | |||
|
226 | } | |||
|
227 | } | |||
|
228 | ||||
|
229 | void QIlib::QIcadPcbRoot::clrVias() | |||
|
230 | { | |||
|
231 | while(vias.count()) | |||
|
232 | { | |||
|
233 | QIcadPcbVia* via; | |||
|
234 | via = vias.last(); | |||
|
235 | vias.removeLast(); | |||
|
236 | delete via; | |||
|
237 | } | |||
|
238 | } | |||
|
239 | ||||
|
240 | void QIlib::QIcadPcbRoot::apendVia(QIlib::AbstractNode *node) | |||
|
241 | { | |||
|
242 | if(node->name==QIlib::Lexique::via_c) | |||
|
243 | { | |||
|
244 | this->vias.append(new QIcadPcbVia(node)); | |||
|
245 | } | |||
|
246 | } | |||
|
247 | ||||
|
248 | void QIlib::QIcadPcbRoot::clrArcs() | |||
|
249 | { | |||
|
250 | while(arcs.count()) | |||
|
251 | { | |||
|
252 | QIcadPcbArc* arc; | |||
|
253 | arc = arcs.last(); | |||
|
254 | arcs.removeLast(); | |||
|
255 | delete arc; | |||
|
256 | } | |||
|
257 | } | |||
|
258 | ||||
|
259 | void QIlib::QIcadPcbRoot::apendArc(QIlib::AbstractNode *node) | |||
|
260 | { | |||
|
261 | if(node->name==QIlib::Lexique::gr_arc_c) | |||
|
262 | { | |||
|
263 | this->arcs.append(new QIcadPcbArc(node)); | |||
|
264 | } | |||
|
265 | } | |||
|
266 | ||||
|
267 | void QIlib::QIcadPcbRoot::clrCircles() | |||
|
268 | { | |||
|
269 | while(circles.count()) | |||
|
270 | { | |||
|
271 | QIcadPcbCircle* circle; | |||
|
272 | circle = circles.last(); | |||
|
273 | circles.removeLast(); | |||
|
274 | delete circle; | |||
|
275 | } | |||
|
276 | } | |||
|
277 | ||||
|
278 | void QIlib::QIcadPcbRoot::apendCircle(QIlib::AbstractNode *node) | |||
|
279 | { | |||
|
280 | if(node->name==QIlib::Lexique::gr_circle_c) | |||
|
281 | { | |||
|
282 | this->circles.append(new QIcadPcbCircle(node)); | |||
|
283 | } | |||
|
284 | } | |||
|
285 | ||||
|
286 | void QIlib::QIcadPcbRoot::clrTexts() | |||
|
287 | { | |||
|
288 | while(texts.count()) | |||
|
289 | { | |||
|
290 | QIcadPcbText* text; | |||
|
291 | text = texts.last(); | |||
|
292 | texts.removeLast(); | |||
|
293 | delete text; | |||
|
294 | } | |||
|
295 | } | |||
|
296 | ||||
|
297 | void QIlib::QIcadPcbRoot::apendText(QIlib::AbstractNode *node) | |||
|
298 | { | |||
|
299 | if(node->name==QIlib::Lexique::gr_text_c) | |||
|
300 | { | |||
|
301 | this->texts.append(new QIcadPcbText(node)); | |||
|
302 | } | |||
|
303 | } | |||
|
304 | ||||
|
305 | void QIlib::QIcadPcbRoot::clrZones() | |||
|
306 | { | |||
|
307 | while(zones.count()) | |||
|
308 | { | |||
|
309 | QIcadPcbZone* zone; | |||
|
310 | zone = zones.last(); | |||
|
311 | zones.removeLast(); | |||
|
312 | delete zone; | |||
|
313 | } | |||
|
314 | } | |||
|
315 | ||||
|
316 | void QIlib::QIcadPcbRoot::apendZone(QIlib::AbstractNode *node) | |||
|
317 | { | |||
|
318 | if(node->name==QIlib::Lexique::zone_c) | |||
|
319 | { | |||
|
320 | this->zones.append(new QIcadPcbZone(node)); | |||
|
321 | } | |||
|
322 | } | |||
108 |
|
323 | |||
109 | QIlib::QIcadPcbGeneralInfo::QIcadPcbGeneralInfo(QIlib::AbstractNode *node) |
|
324 | QIlib::QIcadPcbGeneralInfo::QIcadPcbGeneralInfo(QIlib::AbstractNode *node) | |
110 | :QIcadAbstractNodeWrapper(node) |
|
325 | :QIcadAbstractNodeWrapper(node) | |
111 | { |
|
326 | { | |
112 | this->setNode(node); |
|
327 | this->setNode(node); | |
113 | } |
|
328 | } | |
114 |
|
329 | |||
115 | void QIlib::QIcadPcbGeneralInfo::setNode(QIlib::AbstractNode *node) |
|
330 | void QIlib::QIcadPcbGeneralInfo::setNode(QIlib::AbstractNode *node) | |
116 | { |
|
331 | { | |
|
332 | if(node->name==QIlib::Lexique::general_c) | |||
|
333 | { | |||
117 | this->p_node = node; |
|
334 | this->p_node = node; | |
|
335 | for(int i=0;i<node->nodes.count();i++) | |||
|
336 | { | |||
|
337 | if(node->nodes.at(i)->name==QIlib::Lexique::links_c) | |||
|
338 | { | |||
|
339 | this->links.setNode(node->nodes.at(i)); | |||
|
340 | } | |||
|
341 | if(node->nodes.at(i)->name==QIlib::Lexique::no_connect_c) | |||
|
342 | { | |||
|
343 | this->no_connections.setNode(node->nodes.at(i)); | |||
|
344 | } | |||
|
345 | if(node->nodes.at(i)->name==QIlib::Lexique::area_c) | |||
|
346 | { | |||
|
347 | this->area.setNode(node->nodes.at(i)); | |||
|
348 | } | |||
|
349 | if(node->nodes.at(i)->name==QIlib::Lexique::thickness_c) | |||
|
350 | { | |||
|
351 | this->thickness.setNode(node->nodes.at(i)); | |||
|
352 | } | |||
|
353 | if(node->nodes.at(i)->name==QIlib::Lexique::drawings_c) | |||
|
354 | { | |||
|
355 | this->drawings.setNode(node->nodes.at(i)); | |||
|
356 | } | |||
|
357 | if(node->nodes.at(i)->name==QIlib::Lexique::tracks_c) | |||
|
358 | { | |||
|
359 | this->tracks.setNode(node->nodes.at(i)); | |||
|
360 | } | |||
|
361 | if(node->nodes.at(i)->name==QIlib::Lexique::zones_c) | |||
|
362 | { | |||
|
363 | this->zones.setNode(node->nodes.at(i)); | |||
|
364 | } | |||
|
365 | if(node->nodes.at(i)->name==QIlib::Lexique::modules_c) | |||
|
366 | { | |||
|
367 | this->modules.setNode(node->nodes.at(i)); | |||
|
368 | } | |||
|
369 | if(node->nodes.at(i)->name==QIlib::Lexique::nets_c) | |||
|
370 | { | |||
|
371 | this->nets.setNode(node->nodes.at(i)); | |||
|
372 | } | |||
|
373 | } | |||
|
374 | } | |||
118 | } |
|
375 | } | |
119 |
|
376 | |||
120 |
|
377 | |||
121 | QIlib::QIcadPcbLayers::QIcadPcbLayers(QIlib::AbstractNode *node) |
|
378 | QIlib::QIcadPcbLayers::QIcadPcbLayers(QIlib::AbstractNode *node) | |
122 | :QIcadAbstractNodeWrapper(node) |
|
379 | :QIcadAbstractNodeWrapper(node) | |
123 | { |
|
380 | { | |
124 | this->setNode(node); |
|
381 | this->setNode(node); | |
125 | } |
|
382 | } | |
126 |
|
383 | |||
127 | void QIlib::QIcadPcbLayers::setNode(QIlib::AbstractNode *node) |
|
384 | void QIlib::QIcadPcbLayers::setNode(QIlib::AbstractNode *node) | |
128 | { |
|
385 | { | |
129 | this->p_node = node; |
|
386 | this->p_node = node; | |
|
387 | if(node->name==QIlib::Lexique::layers_c) | |||
|
388 | { | |||
|
389 | this->clrLayers(); | |||
|
390 | for(int i=0;i<node->nodes.count();i++) | |||
|
391 | { | |||
|
392 | this->apendLayer(node->nodes.at(i)); | |||
|
393 | } | |||
|
394 | } | |||
|
395 | } | |||
|
396 | ||||
|
397 | void QIlib::QIcadPcbLayers::clrLayers() | |||
|
398 | { | |||
|
399 | while(layers.count()) | |||
|
400 | { | |||
|
401 | QIcadPcbLayer* layer; | |||
|
402 | layer = layers.last(); | |||
|
403 | layers.removeLast(); | |||
|
404 | delete layer; | |||
|
405 | } | |||
|
406 | } | |||
|
407 | ||||
|
408 | void QIlib::QIcadPcbLayers::apendLayer(QIlib::AbstractNode *node) | |||
|
409 | { | |||
|
410 | this->layers.append(new QIcadPcbLayer(node)); | |||
130 | } |
|
411 | } | |
131 |
|
412 | |||
132 |
|
413 | |||
133 | QIlib::QIcadPcbLine::QIcadPcbLine(QIlib::AbstractNode *node) |
|
414 | QIlib::QIcadPcbLine::QIcadPcbLine(QIlib::AbstractNode *node) | |
134 |
:QIcadAbstract |
|
415 | :QIcadAbstractPcbLine(node) | |
135 | { |
|
416 | { | |
136 | this->setNode(node); |
|
417 | this->setNode(node); | |
137 | } |
|
418 | } | |
138 |
|
419 | |||
|
420 | ||||
139 | void QIlib::QIcadPcbLine::setNode(QIlib::AbstractNode *node) |
|
421 | void QIlib::QIcadPcbLine::setNode(QIlib::AbstractNode *node) | |
140 | { |
|
422 | { | |
|
423 | if(node->name==QIlib::Lexique::gr_line_c) | |||
|
424 | { | |||
141 | this->p_node = node; |
|
425 | this->p_node = node; | |
|
426 | for(int i=0;i<node->nodes.count();i++) | |||
|
427 | { | |||
|
428 | if(node->nodes.at(i)->name==QIlib::Lexique::start_c) | |||
|
429 | { | |||
|
430 | this->p_startpos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
431 | this->start.setNode(node->nodes.at(i)); | |||
|
432 | } | |||
|
433 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
434 | { | |||
|
435 | this->p_stoppos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
436 | this->end.setNode(node->nodes.at(i)); | |||
|
437 | } | |||
|
438 | if(node->nodes.at(i)->name==QIlib::Lexique::angle_c) | |||
|
439 | { | |||
|
440 | this->angle.setNode(node->nodes.at(i)); | |||
|
441 | } | |||
|
442 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
443 | { | |||
|
444 | this->p_layers = node->nodes.at(i)->Values; | |||
|
445 | this->layer.setNode(node->nodes.at(i)); | |||
|
446 | } | |||
|
447 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
448 | { | |||
|
449 | this->p_width = nodeValueToDouble(node->nodes.at(i)); | |||
|
450 | this->width.setNode(node->nodes.at(i)); | |||
|
451 | } | |||
|
452 | } | |||
|
453 | } | |||
142 | } |
|
454 | } | |
143 |
|
455 | |||
144 |
|
456 | |||
145 | QIlib::QIcadPcbModule::QIcadPcbModule(QIlib::AbstractNode *node) |
|
457 | QIlib::QIcadPcbModule::QIcadPcbModule(QIlib::AbstractNode *node) | |
146 | :QIcadAbstractNodeWrapper(node) |
|
458 | :QIcadAbstractNodeWrapper(node) | |
147 | { |
|
459 | { | |
148 | this->setNode(node); |
|
460 | this->setNode(node); | |
149 | } |
|
461 | } | |
150 |
|
462 | |||
|
463 | const QPointF &QIlib::QIcadPcbModule::pos() | |||
|
464 | { | |||
|
465 | return p_pos; | |||
|
466 | } | |||
|
467 | ||||
|
468 | double QIlib::QIcadPcbModule::angle() | |||
|
469 | { | |||
|
470 | return p_angle; | |||
|
471 | } | |||
|
472 | ||||
151 | void QIlib::QIcadPcbModule::setNode(QIlib::AbstractNode *node) |
|
473 | void QIlib::QIcadPcbModule::setNode(QIlib::AbstractNode *node) | |
152 | { |
|
474 | { | |
|
475 | this->clrPads(); | |||
|
476 | if(node->name==QIlib::Lexique::module_c) | |||
|
477 | { | |||
153 | this->p_node = node; |
|
478 | this->p_node = node; | |
|
479 | for(int i=0;i<node->nodes.count();i++) | |||
|
480 | { | |||
|
481 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
482 | { | |||
|
483 | this->layer.setNode(node->nodes.at(i)); | |||
|
484 | } | |||
|
485 | if(node->nodes.at(i)->name==QIlib::Lexique::tedit_c) | |||
|
486 | { | |||
|
487 | this->tedit.setNode(node->nodes.at(i)); | |||
|
488 | } | |||
|
489 | if(node->nodes.at(i)->name==QIlib::Lexique::tstamp_c) | |||
|
490 | { | |||
|
491 | this->tstamp.setNode(node->nodes.at(i)); | |||
|
492 | } | |||
|
493 | if(node->nodes.at(i)->name==QIlib::Lexique::at_c) | |||
|
494 | { | |||
|
495 | this->at.setNode(node->nodes.at(i)); | |||
|
496 | QStringList coords=node->nodes.at(i)->Values; | |||
|
497 | p_pos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
498 | if(coords.count()==3) | |||
|
499 | { | |||
|
500 | p_angle = coords.at(2).toDouble(); | |||
|
501 | } | |||
|
502 | } | |||
|
503 | if(node->nodes.at(i)->name==QIlib::Lexique::tags_c) | |||
|
504 | { | |||
|
505 | this->tags.setNode(node->nodes.at(i)); | |||
|
506 | } | |||
|
507 | if(node->nodes.at(i)->name==QIlib::Lexique::path_c) | |||
|
508 | { | |||
|
509 | this->path.setNode(node->nodes.at(i)); | |||
|
510 | } | |||
|
511 | if(node->nodes.at(i)->name==QIlib::Lexique::attr_c) | |||
|
512 | { | |||
|
513 | this->attr.setNode(node->nodes.at(i)); | |||
|
514 | } | |||
|
515 | if(node->nodes.at(i)->name==QIlib::Lexique::pad_c) | |||
|
516 | { | |||
|
517 | this->apendPad(node->nodes.at(i)); | |||
|
518 | } | |||
|
519 | if(node->nodes.at(i)->name==QIlib::Lexique::fp_line_c) | |||
|
520 | { | |||
|
521 | this->apendLine(node->nodes.at(i)); | |||
|
522 | } | |||
|
523 | if(node->nodes.at(i)->name==QIlib::Lexique::fp_text_c) | |||
|
524 | { | |||
|
525 | this->apendText(node->nodes.at(i)); | |||
|
526 | } | |||
|
527 | if(node->nodes.at(i)->name==QIlib::Lexique::fp_circle_c) | |||
|
528 | { | |||
|
529 | this->apendCircle(node->nodes.at(i)); | |||
|
530 | } | |||
|
531 | } | |||
|
532 | } | |||
|
533 | } | |||
|
534 | ||||
|
535 | void QIlib::QIcadPcbModule::clrPads() | |||
|
536 | { | |||
|
537 | while(pads.count()) | |||
|
538 | { | |||
|
539 | QIcadPcbPad* pad; | |||
|
540 | pad = pads.last(); | |||
|
541 | pads.removeLast(); | |||
|
542 | delete pad; | |||
|
543 | } | |||
|
544 | } | |||
|
545 | ||||
|
546 | void QIlib::QIcadPcbModule::apendPad(QIlib::AbstractNode *node) | |||
|
547 | { | |||
|
548 | if(node->name==QIlib::Lexique::pad_c) | |||
|
549 | { | |||
|
550 | this->pads.append(new QIcadPcbPad(node)); | |||
|
551 | } | |||
|
552 | } | |||
|
553 | ||||
|
554 | void QIlib::QIcadPcbModule::clrTexts() | |||
|
555 | { | |||
|
556 | while(fp_texts.count()) | |||
|
557 | { | |||
|
558 | QIcadPcbFPText* text; | |||
|
559 | text = fp_texts.last(); | |||
|
560 | fp_texts.removeLast(); | |||
|
561 | delete text; | |||
|
562 | } | |||
|
563 | } | |||
|
564 | ||||
|
565 | void QIlib::QIcadPcbModule::apendText(QIlib::AbstractNode *node) | |||
|
566 | { | |||
|
567 | if(node->name==QIlib::Lexique::fp_text_c) | |||
|
568 | { | |||
|
569 | this->fp_texts.append(new QIcadPcbFPText(node)); | |||
|
570 | } | |||
|
571 | } | |||
|
572 | ||||
|
573 | void QIlib::QIcadPcbModule::clrLines() | |||
|
574 | { | |||
|
575 | while(fp_lines.count()) | |||
|
576 | { | |||
|
577 | QIcadPcbFPLine* line; | |||
|
578 | line = fp_lines.last(); | |||
|
579 | fp_lines.removeLast(); | |||
|
580 | delete line; | |||
|
581 | } | |||
|
582 | } | |||
|
583 | ||||
|
584 | void QIlib::QIcadPcbModule::apendLine(QIlib::AbstractNode *node) | |||
|
585 | { | |||
|
586 | if(node->name==QIlib::Lexique::fp_line_c) | |||
|
587 | { | |||
|
588 | this->fp_lines.append(new QIcadPcbFPLine(node)); | |||
|
589 | } | |||
|
590 | } | |||
|
591 | ||||
|
592 | void QIlib::QIcadPcbModule::clrCircles() | |||
|
593 | { | |||
|
594 | while(fp_circles.count()) | |||
|
595 | { | |||
|
596 | QIcadPcbFPCircle* circle; | |||
|
597 | circle = fp_circles.last(); | |||
|
598 | fp_circles.removeLast(); | |||
|
599 | delete circle; | |||
|
600 | } | |||
|
601 | } | |||
|
602 | ||||
|
603 | void QIlib::QIcadPcbModule::apendCircle(QIlib::AbstractNode *node) | |||
|
604 | { | |||
|
605 | if(node->name==QIlib::Lexique::fp_circle_c) | |||
|
606 | { | |||
|
607 | this->fp_circles.append(new QIcadPcbFPCircle(node)); | |||
|
608 | } | |||
154 | } |
|
609 | } | |
155 |
|
610 | |||
156 |
|
611 | |||
157 | QIlib::QIcadPcbDimension::QIcadPcbDimension(QIlib::AbstractNode *node) |
|
612 | QIlib::QIcadPcbDimension::QIcadPcbDimension(QIlib::AbstractNode *node) | |
158 | :QIcadAbstractNodeWrapper(node) |
|
613 | :QIcadAbstractNodeWrapper(node) | |
159 | { |
|
614 | { | |
160 | this->setNode(node); |
|
615 | this->setNode(node); | |
161 | } |
|
616 | } | |
162 |
|
617 | |||
163 | void QIlib::QIcadPcbDimension::setNode(QIlib::AbstractNode *node) |
|
618 | void QIlib::QIcadPcbDimension::setNode(QIlib::AbstractNode *node) | |
164 | { |
|
619 | { | |
|
620 | if(node->name==QIlib::Lexique::dimension_c) | |||
|
621 | { | |||
165 | this->p_node = node; |
|
622 | this->p_node = node; | |
|
623 | for(int i=0;i<node->nodes.count();i++) | |||
|
624 | { | |||
|
625 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
626 | { | |||
|
627 | this->width.setNode(node->nodes.at(i)); | |||
|
628 | } | |||
|
629 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
630 | { | |||
|
631 | this->layer.setNode(node->nodes.at(i)); | |||
|
632 | } | |||
|
633 | if(node->nodes.at(i)->name==QIlib::Lexique::gr_text_c) | |||
|
634 | { | |||
|
635 | this->gr_text.setNode(node->nodes.at(i)); | |||
|
636 | } | |||
|
637 | if(node->nodes.at(i)->name==QIlib::Lexique::feature1_c) | |||
|
638 | { | |||
|
639 | this->feature1.setNode(node->nodes.at(i)); | |||
|
640 | } | |||
|
641 | if(node->nodes.at(i)->name==QIlib::Lexique::crossbar_c) | |||
|
642 | { | |||
|
643 | this->crossbar.setNode(node->nodes.at(i)); | |||
|
644 | } | |||
|
645 | if(node->nodes.at(i)->name==QIlib::Lexique::arrow1a_c) | |||
|
646 | { | |||
|
647 | this->arrow1a.setNode(node->nodes.at(i)); | |||
|
648 | } | |||
|
649 | if(node->nodes.at(i)->name==QIlib::Lexique::arrow1b_c) | |||
|
650 | { | |||
|
651 | this->arrow1b.setNode(node->nodes.at(i)); | |||
|
652 | } | |||
|
653 | if(node->nodes.at(i)->name==QIlib::Lexique::arrow2a_c) | |||
|
654 | { | |||
|
655 | this->arrow2a.setNode(node->nodes.at(i)); | |||
|
656 | } | |||
|
657 | if(node->nodes.at(i)->name==QIlib::Lexique::arrow2b_c) | |||
|
658 | { | |||
|
659 | this->arrow2b.setNode(node->nodes.at(i)); | |||
|
660 | } | |||
|
661 | } | |||
|
662 | } | |||
166 | } |
|
663 | } | |
167 |
|
664 | |||
168 |
|
665 | |||
169 | QIlib::QIcadPcbModuleModel::QIcadPcbModuleModel(QIlib::AbstractNode *node) |
|
666 | QIlib::QIcadPcbModuleModel::QIcadPcbModuleModel(QIlib::AbstractNode *node) | |
170 | :QIcadAbstractNodeWrapper(node) |
|
667 | :QIcadAbstractNodeWrapper(node) | |
171 | { |
|
668 | { | |
172 | this->setNode(node); |
|
669 | this->setNode(node); | |
173 | } |
|
670 | } | |
174 |
|
671 | |||
175 | void QIlib::QIcadPcbModuleModel::setNode(QIlib::AbstractNode *node) |
|
672 | void QIlib::QIcadPcbModuleModel::setNode(QIlib::AbstractNode *node) | |
176 | { |
|
673 | { | |
177 | this->p_node = node; |
|
674 | this->p_node = node; | |
178 | } |
|
675 | } | |
179 |
|
676 | |||
180 |
|
677 | |||
181 |
QIlib::QIcadPcbF |
|
678 | QIlib::QIcadPcbFPText::QIcadPcbFPText(QIlib::AbstractNode *node) | |
182 | :QIcadAbstractNodeWrapper(node) |
|
679 | :QIcadAbstractNodeWrapper(node) | |
183 | { |
|
680 | { | |
184 | this->setNode(node); |
|
681 | this->setNode(node); | |
185 | } |
|
682 | } | |
186 |
|
683 | |||
187 |
void QIlib::QIcadPcbF |
|
684 | void QIlib::QIcadPcbFPText::setNode(QIlib::AbstractNode *node) | |
|
685 | { | |||
|
686 | if(node->name==QIlib::Lexique::pad_c) | |||
188 | { |
|
687 | { | |
189 | this->p_node = node; |
|
688 | this->p_node = node; | |
|
689 | for(int i=0;i<node->nodes.count();i++) | |||
|
690 | { | |||
|
691 | if(node->nodes.at(i)->name==QIlib::Lexique::at_c) | |||
|
692 | { | |||
|
693 | this->at.setNode(node->nodes.at(i)); | |||
|
694 | } | |||
|
695 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
696 | { | |||
|
697 | this->layer.setNode(node->nodes.at(i)); | |||
|
698 | } | |||
|
699 | if(node->nodes.at(i)->name==QIlib::Lexique::effects_c) | |||
|
700 | { | |||
|
701 | this->effects.setNode(node->nodes.at(i)); | |||
|
702 | } | |||
|
703 | } | |||
|
704 | } | |||
190 | } |
|
705 | } | |
191 |
|
706 | |||
192 |
|
707 | |||
193 | QIlib::QIcadPcbFpTextEffects::QIcadPcbFpTextEffects(QIlib::AbstractNode *node) |
|
708 | QIlib::QIcadPcbFpTextEffects::QIcadPcbFpTextEffects(QIlib::AbstractNode *node) | |
194 | :QIcadAbstractNodeWrapper(node) |
|
709 | :QIcadAbstractNodeWrapper(node) | |
195 | { |
|
710 | { | |
196 | this->setNode(node); |
|
711 | this->setNode(node); | |
197 | } |
|
712 | } | |
198 |
|
713 | |||
199 | void QIlib::QIcadPcbFpTextEffects::setNode(QIlib::AbstractNode *node) |
|
714 | void QIlib::QIcadPcbFpTextEffects::setNode(QIlib::AbstractNode *node) | |
200 | { |
|
715 | { | |
201 | this->p_node = node; |
|
716 | this->p_node = node; | |
202 | } |
|
717 | } | |
203 |
|
718 | |||
204 |
|
719 | |||
205 | QIlib::QIcadPcbFpTextEffectsFont::QIcadPcbFpTextEffectsFont(QIlib::AbstractNode *node) |
|
720 | QIlib::QIcadPcbFpTextEffectsFont::QIcadPcbFpTextEffectsFont(QIlib::AbstractNode *node) | |
206 | :QIcadAbstractNodeWrapper(node) |
|
721 | :QIcadAbstractNodeWrapper(node) | |
207 | { |
|
722 | { | |
208 | this->setNode(node); |
|
723 | this->setNode(node); | |
209 | } |
|
724 | } | |
210 |
|
725 | |||
211 | void QIlib::QIcadPcbFpTextEffectsFont::setNode(QIlib::AbstractNode *node) |
|
726 | void QIlib::QIcadPcbFpTextEffectsFont::setNode(QIlib::AbstractNode *node) | |
212 | { |
|
727 | { | |
213 | this->p_node = node; |
|
728 | this->p_node = node; | |
214 | } |
|
729 | } | |
215 |
|
730 | |||
216 |
|
731 | |||
217 | QIlib::QIcadPcbNetClass::QIcadPcbNetClass(QIlib::AbstractNode *node) |
|
732 | QIlib::QIcadPcbNetClass::QIcadPcbNetClass(QIlib::AbstractNode *node) | |
218 | :QIcadAbstractNodeWrapper(node) |
|
733 | :QIcadAbstractNodeWrapper(node) | |
219 | { |
|
734 | { | |
220 | this->setNode(node); |
|
735 | this->setNode(node); | |
221 | } |
|
736 | } | |
222 |
|
737 | |||
223 | void QIlib::QIcadPcbNetClass::setNode(QIlib::AbstractNode *node) |
|
738 | void QIlib::QIcadPcbNetClass::setNode(QIlib::AbstractNode *node) | |
224 | { |
|
739 | { | |
225 | this->p_node = node; |
|
740 | this->p_node = node; | |
226 | } |
|
741 | } | |
227 |
|
742 | |||
228 |
|
743 | |||
229 | QIlib::QIcadPcbSetup::QIcadPcbSetup(QIlib::AbstractNode *node) |
|
744 | QIlib::QIcadPcbSetup::QIcadPcbSetup(QIlib::AbstractNode *node) | |
230 | :QIcadAbstractNodeWrapper(node) |
|
745 | :QIcadAbstractNodeWrapper(node) | |
231 | { |
|
746 | { | |
232 | this->setNode(node); |
|
747 | this->setNode(node); | |
233 | } |
|
748 | } | |
234 |
|
749 | |||
235 | void QIlib::QIcadPcbSetup::setNode(QIlib::AbstractNode *node) |
|
750 | void QIlib::QIcadPcbSetup::setNode(QIlib::AbstractNode *node) | |
236 | { |
|
751 | { | |
237 | this->p_node = node; |
|
752 | this->p_node = node; | |
238 | } |
|
753 | } | |
239 |
|
754 | |||
240 |
|
755 | |||
241 | QIlib::QIcadPcbPlotParams::QIcadPcbPlotParams(QIlib::AbstractNode *node) |
|
756 | QIlib::QIcadPcbPlotParams::QIcadPcbPlotParams(QIlib::AbstractNode *node) | |
242 | :QIcadAbstractNodeWrapper(node) |
|
757 | :QIcadAbstractNodeWrapper(node) | |
243 | { |
|
758 | { | |
244 | this->setNode(node); |
|
759 | this->setNode(node); | |
245 | } |
|
760 | } | |
246 |
|
761 | |||
247 | void QIlib::QIcadPcbPlotParams::setNode(QIlib::AbstractNode *node) |
|
762 | void QIlib::QIcadPcbPlotParams::setNode(QIlib::AbstractNode *node) | |
248 | { |
|
763 | { | |
249 | this->p_node = node; |
|
764 | this->p_node = node; | |
250 | } |
|
765 | } | |
251 |
|
766 | |||
252 |
|
767 | |||
253 | QIlib::QIcadPcbSegment::QIcadPcbSegment(QIlib::AbstractNode *node) |
|
768 | QIlib::QIcadPcbSegment::QIcadPcbSegment(QIlib::AbstractNode *node) | |
254 |
:QIcadAbstract |
|
769 | :QIcadAbstractPcbLine(node) | |
255 | { |
|
770 | { | |
256 | this->setNode(node); |
|
771 | this->setNode(node); | |
257 | } |
|
772 | } | |
258 |
|
773 | |||
259 | void QIlib::QIcadPcbSegment::setNode(QIlib::AbstractNode *node) |
|
774 | void QIlib::QIcadPcbSegment::setNode(QIlib::AbstractNode *node) | |
260 | { |
|
775 | { | |
|
776 | if(node->name==QIlib::Lexique::segment_c) | |||
|
777 | { | |||
261 | this->p_node = node; |
|
778 | this->p_node = node; | |
|
779 | for(int i=0;i<node->nodes.count();i++) | |||
|
780 | { | |||
|
781 | if(node->nodes.at(i)->name==QIlib::Lexique::start_c) | |||
|
782 | { | |||
|
783 | this->p_startpos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
784 | this->start.setNode(node->nodes.at(i)); | |||
|
785 | } | |||
|
786 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
787 | { | |||
|
788 | this->p_stoppos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
789 | this->end.setNode(node->nodes.at(i)); | |||
|
790 | } | |||
|
791 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
792 | { | |||
|
793 | this->p_width = nodeValueToDouble(node->nodes.at(i)); | |||
|
794 | this->width.setNode(node->nodes.at(i)); | |||
|
795 | } | |||
|
796 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
797 | { | |||
|
798 | this->p_layers = node->nodes.at(i)->Values; | |||
|
799 | this->layer.setNode(node->nodes.at(i)); | |||
|
800 | } | |||
|
801 | if(node->nodes.at(i)->name==QIlib::Lexique::net_c) | |||
|
802 | { | |||
|
803 | this->net.setNode(node->nodes.at(i)); | |||
|
804 | } | |||
|
805 | } | |||
|
806 | } | |||
262 | } |
|
807 | } | |
263 |
|
808 | |||
264 |
|
809 | |||
265 | QIlib::QIcadPcbVia::QIcadPcbVia(QIlib::AbstractNode *node) |
|
810 | QIlib::QIcadPcbVia::QIcadPcbVia(QIlib::AbstractNode *node) | |
266 | :QIcadAbstractNodeWrapper(node) |
|
811 | :QIcadAbstractNodeWrapper(node) | |
267 | { |
|
812 | { | |
268 | this->setNode(node); |
|
813 | this->setNode(node); | |
269 | } |
|
814 | } | |
270 |
|
815 | |||
271 | void QIlib::QIcadPcbVia::setNode(QIlib::AbstractNode *node) |
|
816 | void QIlib::QIcadPcbVia::setNode(QIlib::AbstractNode *node) | |
272 | { |
|
817 | { | |
|
818 | if(node->name==QIlib::Lexique::via_c) | |||
|
819 | { | |||
|
820 | this->p_node = node; | |||
|
821 | for(int i=0;i<node->nodes.count();i++) | |||
|
822 | { | |||
|
823 | if(node->nodes.at(i)->name==QIlib::Lexique::at_c) | |||
|
824 | { | |||
|
825 | this->at.setNode(node->nodes.at(i)); | |||
|
826 | p_pos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
827 | } | |||
|
828 | if(node->nodes.at(i)->name==QIlib::Lexique::size_c) | |||
|
829 | { | |||
|
830 | this->sizeNode.setNode(node->nodes.at(i)); | |||
|
831 | p_size = nodeTo2DSize(node->nodes.at(i)); | |||
|
832 | } | |||
|
833 | if(node->nodes.at(i)->name==QIlib::Lexique::drill_c) | |||
|
834 | { | |||
|
835 | this->drillNode.setNode(node->nodes.at(i)); | |||
|
836 | p_drill = nodeValueToDouble(node->nodes.at(i)); | |||
|
837 | } | |||
|
838 | if(node->nodes.at(i)->name==QIlib::Lexique::layers_c) | |||
|
839 | { | |||
|
840 | this->layersNode.setNode(node->nodes.at(i)); | |||
|
841 | p_layers = node->nodes.at(i)->Values; | |||
|
842 | } | |||
|
843 | if(node->nodes.at(i)->name==QIlib::Lexique::net_c) | |||
|
844 | { | |||
|
845 | this->net.setNode(node->nodes.at(i)); | |||
|
846 | } | |||
|
847 | if(node->nodes.at(i)->name==QIlib::Lexique::tstamp_c) | |||
|
848 | { | |||
|
849 | this->tstamp.setNode(node->nodes.at(i)); | |||
|
850 | } | |||
|
851 | } | |||
|
852 | } | |||
|
853 | } | |||
|
854 | ||||
|
855 | ||||
|
856 | QIlib::QIcadPcbPad::QIcadPcbPad(QIlib::AbstractNode *node) | |||
|
857 | :QIcadAbstractNodeWrapper(node) | |||
|
858 | { | |||
|
859 | this->setNode(node); | |||
|
860 | } | |||
|
861 | ||||
|
862 | void QIlib::QIcadPcbPad::setNode(QIlib::AbstractNode *node) | |||
|
863 | { | |||
|
864 | if(node->name==QIlib::Lexique::pad_c) | |||
|
865 | { | |||
|
866 | this->p_node = node; | |||
|
867 | if(p_node->Values.count()>=3) | |||
|
868 | { | |||
|
869 | if(!this->p_node->Values.at((2)).compare("rect")) | |||
|
870 | { | |||
|
871 | this->p_shape = rectangle; | |||
|
872 | } | |||
|
873 | else | |||
|
874 | if(!this->p_node->Values.at((2)).compare("circle")) | |||
|
875 | { | |||
|
876 | this->p_shape = circle; | |||
|
877 | } | |||
|
878 | ||||
|
879 | } | |||
|
880 | for(int i=0;i<node->nodes.count();i++) | |||
|
881 | { | |||
|
882 | if(node->nodes.at(i)->name==QIlib::Lexique::at_c) | |||
|
883 | { | |||
|
884 | this->at.setNode(node->nodes.at(i)); | |||
|
885 | this->p_pos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
886 | } | |||
|
887 | if(node->nodes.at(i)->name==QIlib::Lexique::size_c) | |||
|
888 | { | |||
|
889 | this->sizeNode.setNode(node->nodes.at(i)); | |||
|
890 | this->p_size = nodeTo2DSize(node->nodes.at(i)); | |||
|
891 | } | |||
|
892 | if(node->nodes.at(i)->name==QIlib::Lexique::layers_c) | |||
|
893 | { | |||
|
894 | this->layer.setNode(node->nodes.at(i)); | |||
|
895 | this->p_layers = node->nodes.at(i)->Values; | |||
|
896 | } | |||
|
897 | if(node->nodes.at(i)->name==QIlib::Lexique::net_c) | |||
|
898 | { | |||
|
899 | this->netNode.setNode(node->nodes.at(i)); | |||
|
900 | } | |||
|
901 | if(node->nodes.at(i)->name==QIlib::Lexique::drill_c) | |||
|
902 | { | |||
|
903 | this->drillNode.setNode(node->nodes.at(i)); | |||
|
904 | this->p_drill = nodeValueToDouble(node->nodes.at(i)); | |||
|
905 | } | |||
|
906 | } | |||
|
907 | } | |||
|
908 | } | |||
|
909 | ||||
|
910 | ||||
|
911 | QIlib::QIcadPcbFPLine::QIcadPcbFPLine(QIlib::AbstractNode *node) | |||
|
912 | :QIcadAbstractPcbLine(node) | |||
|
913 | { | |||
|
914 | this->setNode(node); | |||
|
915 | } | |||
|
916 | ||||
|
917 | void QIlib::QIcadPcbFPLine::setNode(QIlib::AbstractNode *node) | |||
|
918 | { | |||
|
919 | if(node->name==QIlib::Lexique::fp_line_c) | |||
|
920 | { | |||
|
921 | this->p_node = node; | |||
|
922 | for(int i=0;i<node->nodes.count();i++) | |||
|
923 | { | |||
|
924 | if(node->nodes.at(i)->name==QIlib::Lexique::start_c) | |||
|
925 | { | |||
|
926 | this->p_startpos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
927 | this->start.setNode(node->nodes.at(i)); | |||
|
928 | } | |||
|
929 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
930 | { | |||
|
931 | this->p_stoppos = nodeTo2DCoords(node->nodes.at(i)); | |||
|
932 | this->end.setNode(node->nodes.at(i)); | |||
|
933 | } | |||
|
934 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
935 | { | |||
|
936 | this->p_layers = node->nodes.at(i)->Values; | |||
|
937 | this->layer.setNode(node->nodes.at(i)); | |||
|
938 | } | |||
|
939 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
940 | { | |||
|
941 | this->p_width = nodeValueToDouble(node->nodes.at(i)); | |||
|
942 | this->width.setNode(node->nodes.at(i)); | |||
|
943 | } | |||
|
944 | } | |||
|
945 | } | |||
|
946 | } | |||
|
947 | ||||
|
948 | ||||
|
949 | QIlib::QIcadPcbFPCircle::QIcadPcbFPCircle(QIlib::AbstractNode *node) | |||
|
950 | :QIcadAbstractNodeWrapper(node) | |||
|
951 | { | |||
|
952 | this->setNode(node); | |||
|
953 | } | |||
|
954 | ||||
|
955 | void QIlib::QIcadPcbFPCircle::setNode(QIlib::AbstractNode *node) | |||
|
956 | { | |||
|
957 | if(node->name==QIlib::Lexique::fp_circle_c) | |||
|
958 | { | |||
|
959 | this->p_node = node; | |||
|
960 | for(int i=0;i<node->nodes.count();i++) | |||
|
961 | { | |||
|
962 | if(node->nodes.at(i)->name==QIlib::Lexique::center_c) | |||
|
963 | { | |||
|
964 | this->center.setNode(node->nodes.at(i)); | |||
|
965 | } | |||
|
966 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
967 | { | |||
|
968 | this->end.setNode(node->nodes.at(i)); | |||
|
969 | } | |||
|
970 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
971 | { | |||
|
972 | this->layer.setNode(node->nodes.at(i)); | |||
|
973 | } | |||
|
974 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
975 | { | |||
|
976 | this->width.setNode(node->nodes.at(i)); | |||
|
977 | } | |||
|
978 | } | |||
|
979 | } | |||
|
980 | } | |||
|
981 | ||||
|
982 | ||||
|
983 | QIlib::QIcadPcbText::QIcadPcbText(QIlib::AbstractNode *node) | |||
|
984 | :QIcadAbstractNodeWrapper(node) | |||
|
985 | { | |||
|
986 | this->setNode(node); | |||
|
987 | } | |||
|
988 | ||||
|
989 | void QIlib::QIcadPcbText::setNode(QIlib::AbstractNode *node) | |||
|
990 | { | |||
|
991 | if(node->name==QIlib::Lexique::gr_text_c) | |||
|
992 | { | |||
|
993 | this->p_node = node; | |||
|
994 | for(int i=0;i<node->nodes.count();i++) | |||
|
995 | { | |||
|
996 | if(node->nodes.at(i)->name==QIlib::Lexique::at_c) | |||
|
997 | { | |||
|
998 | this->at.setNode(node->nodes.at(i)); | |||
|
999 | } | |||
|
1000 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
1001 | { | |||
|
1002 | this->layer.setNode(node->nodes.at(i)); | |||
|
1003 | } | |||
|
1004 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
1005 | { | |||
|
1006 | this->width.setNode(node->nodes.at(i)); | |||
|
1007 | } | |||
|
1008 | if(node->nodes.at(i)->name==QIlib::Lexique::effects_c) | |||
|
1009 | { | |||
|
1010 | this->effects.setNode(node->nodes.at(i)); | |||
|
1011 | } | |||
|
1012 | } | |||
|
1013 | } | |||
|
1014 | } | |||
|
1015 | ||||
|
1016 | ||||
|
1017 | QIlib::QIcadPcbCircle::QIcadPcbCircle(QIlib::AbstractNode *node) | |||
|
1018 | :QIcadAbstractNodeWrapper(node) | |||
|
1019 | { | |||
|
1020 | this->setNode(node); | |||
|
1021 | } | |||
|
1022 | ||||
|
1023 | void QIlib::QIcadPcbCircle::setNode(QIlib::AbstractNode *node) | |||
|
1024 | { | |||
|
1025 | if(node->name==QIlib::Lexique::gr_circle_c) | |||
|
1026 | { | |||
|
1027 | this->p_node = node; | |||
|
1028 | for(int i=0;i<node->nodes.count();i++) | |||
|
1029 | { | |||
|
1030 | if(node->nodes.at(i)->name==QIlib::Lexique::center_c) | |||
|
1031 | { | |||
|
1032 | this->center.setNode(node->nodes.at(i)); | |||
|
1033 | } | |||
|
1034 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
1035 | { | |||
|
1036 | this->end.setNode(node->nodes.at(i)); | |||
|
1037 | } | |||
|
1038 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
1039 | { | |||
|
1040 | this->layer.setNode(node->nodes.at(i)); | |||
|
1041 | } | |||
|
1042 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
1043 | { | |||
|
1044 | this->width.setNode(node->nodes.at(i)); | |||
|
1045 | } | |||
|
1046 | } | |||
|
1047 | } | |||
|
1048 | } | |||
|
1049 | ||||
|
1050 | ||||
|
1051 | QIlib::QIcadPcbArc::QIcadPcbArc(QIlib::AbstractNode *node) | |||
|
1052 | :QIcadAbstractNodeWrapper(node) | |||
|
1053 | { | |||
|
1054 | this->setNode(node); | |||
|
1055 | } | |||
|
1056 | ||||
|
1057 | void QIlib::QIcadPcbArc::setNode(QIlib::AbstractNode *node) | |||
|
1058 | { | |||
|
1059 | if(node->name==QIlib::Lexique::gr_arc_c) | |||
|
1060 | { | |||
|
1061 | this->p_node = node; | |||
|
1062 | for(int i=0;i<node->nodes.count();i++) | |||
|
1063 | { | |||
|
1064 | if(node->nodes.at(i)->name==QIlib::Lexique::start_c) | |||
|
1065 | { | |||
|
1066 | this->start.setNode(node->nodes.at(i)); | |||
|
1067 | } | |||
|
1068 | if(node->nodes.at(i)->name==QIlib::Lexique::end_c) | |||
|
1069 | { | |||
|
1070 | this->end.setNode(node->nodes.at(i)); | |||
|
1071 | } | |||
|
1072 | if(node->nodes.at(i)->name==QIlib::Lexique::angle_c) | |||
|
1073 | { | |||
|
1074 | this->angle.setNode(node->nodes.at(i)); | |||
|
1075 | } | |||
|
1076 | if(node->nodes.at(i)->name==QIlib::Lexique::layer_c) | |||
|
1077 | { | |||
|
1078 | this->layer.setNode(node->nodes.at(i)); | |||
|
1079 | } | |||
|
1080 | if(node->nodes.at(i)->name==QIlib::Lexique::width_c) | |||
|
1081 | { | |||
|
1082 | this->width.setNode(node->nodes.at(i)); | |||
|
1083 | } | |||
|
1084 | } | |||
|
1085 | } | |||
|
1086 | } | |||
|
1087 | ||||
|
1088 | ||||
|
1089 | QIlib::QIcadPcbZone::QIcadPcbZone(QIlib::AbstractNode *node) | |||
|
1090 | :QIcadAbstractNodeWrapper(node) | |||
|
1091 | { | |||
|
1092 | this->setNode(node); | |||
|
1093 | } | |||
|
1094 | ||||
|
1095 | void QIlib::QIcadPcbZone::setNode(QIlib::AbstractNode *node) | |||
|
1096 | { | |||
|
1097 | if(node->name==QIlib::Lexique::zone_c) | |||
|
1098 | { | |||
273 | this->p_node = node; |
|
1099 | this->p_node = node; | |
274 | } |
|
1100 | } | |
|
1101 | } | |||
|
1102 | ||||
|
1103 | ||||
|
1104 | const QPointF QIlib::nodeTo2DCoords(QIlib::AbstractNode *node) | |||
|
1105 | { | |||
|
1106 | QPointF point; | |||
|
1107 | QStringList coords=node->Values; | |||
|
1108 | if(coords.count()>=2) | |||
|
1109 | { | |||
|
1110 | point.setX(coords.at(0).toDouble()); | |||
|
1111 | point.setY(coords.at(1).toDouble()); | |||
|
1112 | } | |||
|
1113 | return point; | |||
|
1114 | } | |||
|
1115 | ||||
|
1116 | ||||
|
1117 | double QIlib::nodeValueToDouble(QIlib::AbstractNode *node, int index) | |||
|
1118 | { | |||
|
1119 | if(node->Values.count()>index) | |||
|
1120 | { | |||
|
1121 | return node->Values.at(index).toDouble(); | |||
|
1122 | } | |||
|
1123 | return 0.0; | |||
|
1124 | } | |||
|
1125 | ||||
|
1126 | ||||
|
1127 | int QIlib::nodeValueToInt(QIlib::AbstractNode *node, int index) | |||
|
1128 | { | |||
|
1129 | if(node->Values.count()>index) | |||
|
1130 | { | |||
|
1131 | return node->Values.at(index).toInt(); | |||
|
1132 | } | |||
|
1133 | return 0; | |||
|
1134 | } | |||
|
1135 | ||||
|
1136 | ||||
|
1137 | QIlib::QIcadPcbLayer::QIcadPcbLayer(QIlib::AbstractNode *node) | |||
|
1138 | :QIcadAbstractNodeWrapper(node) | |||
|
1139 | { | |||
|
1140 | this->p_index = QString(this->p_node->name).remove('(').toInt(); | |||
|
1141 | if(this->p_node->Values.count()>=1) | |||
|
1142 | { | |||
|
1143 | this->p_name = this->p_node->Values.at(0); | |||
|
1144 | } | |||
|
1145 | if(this->p_node->Values.count()>=2) | |||
|
1146 | { | |||
|
1147 | QString typestr=this->p_node->Values.at(1); | |||
|
1148 | this->p_type = none; | |||
|
1149 | if(!typestr.compare("signal")) | |||
|
1150 | { | |||
|
1151 | this->p_type = signal; | |||
|
1152 | } | |||
|
1153 | else | |||
|
1154 | if(!typestr.compare("user")) | |||
|
1155 | { | |||
|
1156 | this->p_type = user; | |||
|
1157 | } | |||
|
1158 | } | |||
|
1159 | } | |||
|
1160 | ||||
|
1161 | ||||
|
1162 | const QSizeF QIlib::nodeTo2DSize(QIlib::AbstractNode *node) | |||
|
1163 | { | |||
|
1164 | QSizeF size; | |||
|
1165 | QStringList sz=node->Values; | |||
|
1166 | if(sz.count()>=2) | |||
|
1167 | { | |||
|
1168 | size.setWidth(sz.at(0).toDouble()); | |||
|
1169 | size.setHeight(sz.at(1).toDouble()); | |||
|
1170 | } | |||
|
1171 | return size; | |||
|
1172 | } |
@@ -1,307 +1,487 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the Kicad Tools Software |
|
2 | -- This file is a part of the Kicad Tools Software | |
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef QICADPCB_H |
|
22 | #ifndef QICADPCB_H | |
23 | #define QICADPCB_H |
|
23 | #define QICADPCB_H | |
24 | #include <QString> |
|
24 | #include <QString> | |
25 | #include <QStringList> |
|
25 | #include <QStringList> | |
26 | #include <QList> |
|
26 | #include <QList> | |
27 | #include <QFile> |
|
27 | #include <QFile> | |
28 | #include <parsers/lispLike_driver.h> |
|
28 | #include <parsers/lispLike_driver.h> | |
29 | #include <qicadlisplikelexique.h> |
|
29 | #include <qicadlisplikelexique.h> | |
|
30 | #include <QPointF> | |||
|
31 | #include <QRectF> | |||
30 |
|
32 | |||
31 | namespace QIlib{ |
|
33 | namespace QIlib{ | |
32 |
|
34 | |||
|
35 | const QPointF nodeTo2DCoords(QIlib::AbstractNode* node); | |||
|
36 | const QSizeF nodeTo2DSize(QIlib::AbstractNode* node); | |||
|
37 | double nodeValueToDouble(QIlib::AbstractNode* node,int index=0); | |||
|
38 | int nodeValueToInt(QIlib::AbstractNode* node,int index=0); | |||
|
39 | ||||
|
40 | class QIcadAbstractPcbLine : public QIcadAbstractNodeWrapper | |||
|
41 | { | |||
|
42 | public: | |||
|
43 | QIcadAbstractPcbLine(QIlib::AbstractNode* node) | |||
|
44 | :QIcadAbstractNodeWrapper(node) | |||
|
45 | {} | |||
|
46 | QIcadAbstractPcbLine(){} | |||
|
47 | virtual const QPointF& startPos(){return p_startpos;} | |||
|
48 | virtual const QPointF& stopPos(){return p_stoppos;} | |||
|
49 | virtual double width(){return p_width;} | |||
|
50 | virtual const QStringList& layers(){return p_layers;} | |||
|
51 | protected: | |||
|
52 | double p_width; | |||
|
53 | QPointF p_startpos; | |||
|
54 | QPointF p_stoppos; | |||
|
55 | QStringList p_layers; | |||
|
56 | }; | |||
|
57 | ||||
|
58 | class QIcadPcbLayer : public QIcadAbstractNodeWrapper | |||
|
59 | { | |||
|
60 | public: | |||
|
61 | typedef enum | |||
|
62 | { | |||
|
63 | signal, | |||
|
64 | user, | |||
|
65 | none | |||
|
66 | }layetType_t; | |||
|
67 | QIcadPcbLayer(QIlib::AbstractNode* node); | |||
|
68 | QIcadPcbLayer(){} | |||
|
69 | int index(){return p_index;} | |||
|
70 | const QString& name(){return p_name;} | |||
|
71 | layetType_t type(){return p_type;} | |||
|
72 | protected: | |||
|
73 | int p_index; | |||
|
74 | QString p_name; | |||
|
75 | layetType_t p_type; | |||
|
76 | }; | |||
33 |
|
77 | |||
34 | class QIcadPcbPlotParams : public QIcadAbstractNodeWrapper |
|
78 | class QIcadPcbPlotParams : public QIcadAbstractNodeWrapper | |
35 | { |
|
79 | { | |
36 | public: |
|
80 | public: | |
37 | QIcadPcbPlotParams(QIlib::AbstractNode* node); |
|
81 | QIcadPcbPlotParams(QIlib::AbstractNode* node); | |
38 | QIcadPcbPlotParams(){} |
|
82 | QIcadPcbPlotParams(){} | |
39 | QIcadAbstractNodeWrapper layerselection; |
|
83 | QIcadAbstractNodeWrapper layerselection; | |
40 | QIcadAbstractNodeWrapper usegerberextensions; |
|
84 | QIcadAbstractNodeWrapper usegerberextensions; | |
41 | QIcadAbstractNodeWrapper excludeedgelayer; |
|
85 | QIcadAbstractNodeWrapper excludeedgelayer; | |
42 | QIcadAbstractNodeWrapper linewidth; |
|
86 | QIcadAbstractNodeWrapper linewidth; | |
43 | QIcadAbstractNodeWrapper plotframeref; |
|
87 | QIcadAbstractNodeWrapper plotframeref; | |
44 | QIcadAbstractNodeWrapper viasonmask; |
|
88 | QIcadAbstractNodeWrapper viasonmask; | |
45 | QIcadAbstractNodeWrapper mode; |
|
89 | QIcadAbstractNodeWrapper mode; | |
46 | QIcadAbstractNodeWrapper useauxorigin; |
|
90 | QIcadAbstractNodeWrapper useauxorigin; | |
47 | QIcadAbstractNodeWrapper hpglpennumber; |
|
91 | QIcadAbstractNodeWrapper hpglpennumber; | |
48 | QIcadAbstractNodeWrapper hpglpenspeed; |
|
92 | QIcadAbstractNodeWrapper hpglpenspeed; | |
49 | QIcadAbstractNodeWrapper hpglpendiameter; |
|
93 | QIcadAbstractNodeWrapper hpglpendiameter; | |
50 | QIcadAbstractNodeWrapper hpglpenoverlay; |
|
94 | QIcadAbstractNodeWrapper hpglpenoverlay; | |
51 | QIcadAbstractNodeWrapper psnegative; |
|
95 | QIcadAbstractNodeWrapper psnegative; | |
52 | QIcadAbstractNodeWrapper psa4output; |
|
96 | QIcadAbstractNodeWrapper psa4output; | |
53 | QIcadAbstractNodeWrapper plotreference; |
|
97 | QIcadAbstractNodeWrapper plotreference; | |
54 | QIcadAbstractNodeWrapper plotvalue; |
|
98 | QIcadAbstractNodeWrapper plotvalue; | |
55 | QIcadAbstractNodeWrapper plotothertext; |
|
99 | QIcadAbstractNodeWrapper plotothertext; | |
56 | QIcadAbstractNodeWrapper plotinvisibletext; |
|
100 | QIcadAbstractNodeWrapper plotinvisibletext; | |
57 | QIcadAbstractNodeWrapper padsonsilk; |
|
101 | QIcadAbstractNodeWrapper padsonsilk; | |
58 | QIcadAbstractNodeWrapper subtractmaskfromsilk; |
|
102 | QIcadAbstractNodeWrapper subtractmaskfromsilk; | |
59 | QIcadAbstractNodeWrapper outputformat; |
|
103 | QIcadAbstractNodeWrapper outputformat; | |
60 | QIcadAbstractNodeWrapper mirror; |
|
104 | QIcadAbstractNodeWrapper mirror; | |
61 | QIcadAbstractNodeWrapper drillshape; |
|
105 | QIcadAbstractNodeWrapper drillshape; | |
62 | QIcadAbstractNodeWrapper scaleselection; |
|
106 | QIcadAbstractNodeWrapper scaleselection; | |
63 | QIcadAbstractNodeWrapper outputdirectory; |
|
107 | QIcadAbstractNodeWrapper outputdirectory; | |
64 | void setNode(QIlib::AbstractNode* node); |
|
108 | void setNode(QIlib::AbstractNode* node); | |
65 | }; |
|
109 | }; | |
66 |
|
110 | |||
67 | class QIcadPcbSetup : public QIcadAbstractNodeWrapper |
|
111 | class QIcadPcbSetup : public QIcadAbstractNodeWrapper | |
68 | { |
|
112 | { | |
69 | public: |
|
113 | public: | |
70 | QIcadPcbSetup(QIlib::AbstractNode* node); |
|
114 | QIcadPcbSetup(QIlib::AbstractNode* node); | |
71 | QIcadPcbSetup(){} |
|
115 | QIcadPcbSetup(){} | |
72 | QIcadAbstractNodeWrapper last_trace_width; |
|
116 | QIcadAbstractNodeWrapper last_trace_width; | |
73 | QIcadAbstractNodeWrapper trace_clearance; |
|
117 | QIcadAbstractNodeWrapper trace_clearance; | |
74 | QIcadAbstractNodeWrapper zone_clearance; |
|
118 | QIcadAbstractNodeWrapper zone_clearance; | |
75 | QIcadAbstractNodeWrapper zone_45_only; |
|
119 | QIcadAbstractNodeWrapper zone_45_only; | |
76 | QIcadAbstractNodeWrapper trace_min; |
|
120 | QIcadAbstractNodeWrapper trace_min; | |
77 | QIcadAbstractNodeWrapper segment_width; |
|
121 | QIcadAbstractNodeWrapper segment_width; | |
78 | QIcadAbstractNodeWrapper edge_width; |
|
122 | QIcadAbstractNodeWrapper edge_width; | |
79 | QIcadAbstractNodeWrapper via_size; |
|
123 | QIcadAbstractNodeWrapper via_size; | |
80 | QIcadAbstractNodeWrapper via_dril; |
|
124 | QIcadAbstractNodeWrapper via_dril; | |
81 | QIcadAbstractNodeWrapper via_min_size; |
|
125 | QIcadAbstractNodeWrapper via_min_size; | |
82 | QIcadAbstractNodeWrapper via_min_drill; |
|
126 | QIcadAbstractNodeWrapper via_min_drill; | |
83 | QIcadAbstractNodeWrapper uvia_size; |
|
127 | QIcadAbstractNodeWrapper uvia_size; | |
84 | QIcadAbstractNodeWrapper uvia_drill; |
|
128 | QIcadAbstractNodeWrapper uvia_drill; | |
85 | QIcadAbstractNodeWrapper uvias_allowed; |
|
129 | QIcadAbstractNodeWrapper uvias_allowed; | |
86 | QIcadAbstractNodeWrapper uvia_min_size; |
|
130 | QIcadAbstractNodeWrapper uvia_min_size; | |
87 | QIcadAbstractNodeWrapper uvia_min_drill; |
|
131 | QIcadAbstractNodeWrapper uvia_min_drill; | |
88 | QIcadAbstractNodeWrapper pcb_text_width; |
|
132 | QIcadAbstractNodeWrapper pcb_text_width; | |
89 | QIcadAbstractNodeWrapper pcb_text_size; |
|
133 | QIcadAbstractNodeWrapper pcb_text_size; | |
90 | QIcadAbstractNodeWrapper mod_edge_width; |
|
134 | QIcadAbstractNodeWrapper mod_edge_width; | |
91 | QIcadAbstractNodeWrapper mod_text_size; |
|
135 | QIcadAbstractNodeWrapper mod_text_size; | |
92 | QIcadAbstractNodeWrapper mod_text_width; |
|
136 | QIcadAbstractNodeWrapper mod_text_width; | |
93 | QIcadAbstractNodeWrapper pad_size; |
|
137 | QIcadAbstractNodeWrapper pad_size; | |
94 | QIcadAbstractNodeWrapper pad_drill; |
|
138 | QIcadAbstractNodeWrapper pad_drill; | |
95 | QIcadAbstractNodeWrapper pad_to_mask_clearance; |
|
139 | QIcadAbstractNodeWrapper pad_to_mask_clearance; | |
96 | QIcadAbstractNodeWrapper aux_axis_origin; |
|
140 | QIcadAbstractNodeWrapper aux_axis_origin; | |
97 | QIcadAbstractNodeWrapper visible_elements; |
|
141 | QIcadAbstractNodeWrapper visible_elements; | |
98 | QIcadPcbPlotParams plotParams; |
|
142 | QIcadPcbPlotParams plotParams; | |
99 | void setNode(QIlib::AbstractNode* node); |
|
143 | void setNode(QIlib::AbstractNode* node); | |
100 | }; |
|
144 | }; | |
101 |
|
145 | |||
102 |
|
||||
103 | class QIcadPcbNetClass : public QIcadAbstractNodeWrapper |
|
146 | class QIcadPcbNetClass : public QIcadAbstractNodeWrapper | |
104 | { |
|
147 | { | |
105 | public: |
|
148 | public: | |
106 | QIcadPcbNetClass(QIlib::AbstractNode* node); |
|
149 | QIcadPcbNetClass(QIlib::AbstractNode* node); | |
107 | QIcadPcbNetClass(){} |
|
150 | QIcadPcbNetClass(){} | |
108 | QIcadAbstractNodeWrapper clearance; |
|
151 | QIcadAbstractNodeWrapper clearance; | |
109 | QIcadAbstractNodeWrapper trace_width; |
|
152 | QIcadAbstractNodeWrapper trace_width; | |
110 | QIcadAbstractNodeWrapper via_dia; |
|
153 | QIcadAbstractNodeWrapper via_dia; | |
111 | QIcadAbstractNodeWrapper via_drill; |
|
154 | QIcadAbstractNodeWrapper via_drill; | |
112 | QIcadAbstractNodeWrapper uvia_dia; |
|
155 | QIcadAbstractNodeWrapper uvia_dia; | |
113 | QIcadAbstractNodeWrapper uvia_drill; |
|
156 | QIcadAbstractNodeWrapper uvia_drill; | |
114 | QList<QIcadAbstractNodeWrapper*> nets; |
|
157 | QList<QIcadAbstractNodeWrapper*> nets; | |
115 | void setNode(QIlib::AbstractNode* node); |
|
158 | void setNode(QIlib::AbstractNode* node); | |
116 | }; |
|
159 | }; | |
117 |
|
160 | |||
118 | class QIcadPcbFpTextEffectsFont : public QIcadAbstractNodeWrapper |
|
161 | class QIcadPcbFpTextEffectsFont : public QIcadAbstractNodeWrapper | |
119 | { |
|
162 | { | |
120 | public: |
|
163 | public: | |
121 | QIcadPcbFpTextEffectsFont(QIlib::AbstractNode* node); |
|
164 | QIcadPcbFpTextEffectsFont(QIlib::AbstractNode* node); | |
122 | QIcadAbstractNodeWrapper size; |
|
165 | QIcadAbstractNodeWrapper size; | |
123 | void setNode(QIlib::AbstractNode* node); |
|
166 | void setNode(QIlib::AbstractNode* node); | |
124 | }; |
|
167 | }; | |
125 |
|
168 | |||
126 | class QIcadPcbFpTextEffects : public QIcadAbstractNodeWrapper |
|
169 | class QIcadPcbFpTextEffects : public QIcadAbstractNodeWrapper | |
127 | { |
|
170 | { | |
128 | public: |
|
171 | public: | |
129 | QIcadPcbFpTextEffects(QIlib::AbstractNode* node); |
|
172 | QIcadPcbFpTextEffects(QIlib::AbstractNode* node); | |
130 | QIcadPcbFpTextEffects(){} |
|
173 | QIcadPcbFpTextEffects(){} | |
131 | QIcadAbstractNodeWrapper font; |
|
174 | QIcadAbstractNodeWrapper font; | |
132 | QIcadAbstractNodeWrapper thickness; |
|
175 | QIcadAbstractNodeWrapper thickness; | |
133 | void setNode(QIlib::AbstractNode* node); |
|
176 | void setNode(QIlib::AbstractNode* node); | |
134 | }; |
|
177 | }; | |
135 |
|
178 | |||
136 |
class QIcadPcbF |
|
179 | class QIcadPcbFPText : public QIcadAbstractNodeWrapper | |
137 | { |
|
180 | { | |
138 | public: |
|
181 | public: | |
139 |
QIcadPcbF |
|
182 | QIcadPcbFPText(QIlib::AbstractNode* node); | |
140 |
QIcadPcbF |
|
183 | QIcadPcbFPText(){} | |
141 | QIcadAbstractNodeWrapper at; |
|
184 | QIcadAbstractNodeWrapper at; | |
142 | QIcadAbstractNodeWrapper layer; |
|
185 | QIcadAbstractNodeWrapper layer; | |
|
186 | QIcadPcbFpTextEffects effects; | |||
143 | void setNode(QIlib::AbstractNode* node); |
|
187 | void setNode(QIlib::AbstractNode* node); | |
144 | }; |
|
188 | }; | |
145 |
|
189 | |||
146 | class QIcadPcbModuleModel : public QIcadAbstractNodeWrapper |
|
190 | class QIcadPcbModuleModel : public QIcadAbstractNodeWrapper | |
147 | { |
|
191 | { | |
148 | public: |
|
192 | public: | |
149 | QIcadPcbModuleModel(QIlib::AbstractNode* node); |
|
193 | QIcadPcbModuleModel(QIlib::AbstractNode* node); | |
150 | QIcadPcbModuleModel(){} |
|
194 | QIcadPcbModuleModel(){} | |
151 | QIcadAbstractNodeWrapper at; |
|
195 | QIcadAbstractNodeWrapper at; | |
152 | QIcadAbstractNodeWrapper scale; |
|
196 | QIcadAbstractNodeWrapper scale; | |
153 | QIcadAbstractNodeWrapper rotate; |
|
197 | QIcadAbstractNodeWrapper rotate; | |
154 | void setNode(QIlib::AbstractNode* node); |
|
198 | void setNode(QIlib::AbstractNode* node); | |
155 | }; |
|
199 | }; | |
156 |
|
200 | |||
157 |
|
||||
158 | class QIcadPcbDimension : public QIcadAbstractNodeWrapper |
|
201 | class QIcadPcbDimension : public QIcadAbstractNodeWrapper | |
159 | { |
|
202 | { | |
160 | public: |
|
203 | public: | |
161 | QIcadPcbDimension(QIlib::AbstractNode* node); |
|
204 | QIcadPcbDimension(QIlib::AbstractNode* node); | |
162 | QIcadPcbDimension(){} |
|
205 | QIcadPcbDimension(){} | |
163 | QIcadAbstractNodeWrapper width; |
|
206 | QIcadAbstractNodeWrapper width; | |
164 | QIcadAbstractNodeWrapper layer; |
|
207 | QIcadAbstractNodeWrapper layer; | |
165 | QIcadAbstractNodeWrapper gr_text; |
|
208 | QIcadAbstractNodeWrapper gr_text; | |
166 | QIcadAbstractNodeWrapper feature1; |
|
209 | QIcadAbstractNodeWrapper feature1; | |
167 | QIcadAbstractNodeWrapper feature2; |
|
210 | QIcadAbstractNodeWrapper feature2; | |
168 | QIcadAbstractNodeWrapper crossbar; |
|
211 | QIcadAbstractNodeWrapper crossbar; | |
169 | QIcadAbstractNodeWrapper arrow1a; |
|
212 | QIcadAbstractNodeWrapper arrow1a; | |
170 | QIcadAbstractNodeWrapper arrow1b; |
|
213 | QIcadAbstractNodeWrapper arrow1b; | |
171 | QIcadAbstractNodeWrapper arrow2a; |
|
214 | QIcadAbstractNodeWrapper arrow2a; | |
172 | QIcadAbstractNodeWrapper arrow2b; |
|
215 | QIcadAbstractNodeWrapper arrow2b; | |
173 | void setNode(QIlib::AbstractNode* node); |
|
216 | void setNode(QIlib::AbstractNode* node); | |
174 | }; |
|
217 | }; | |
175 |
|
218 | |||
|
219 | class QIcadPcbPad : public QIcadAbstractNodeWrapper | |||
|
220 | { | |||
|
221 | public: | |||
|
222 | typedef enum | |||
|
223 | { | |||
|
224 | rectangle, | |||
|
225 | circle | |||
|
226 | }padShape; | |||
|
227 | QIcadPcbPad(QIlib::AbstractNode* node); | |||
|
228 | QIcadPcbPad(){} | |||
|
229 | QIcadAbstractNodeWrapper at; | |||
|
230 | QIcadAbstractNodeWrapper sizeNode; | |||
|
231 | QIcadAbstractNodeWrapper layer; | |||
|
232 | QIcadAbstractNodeWrapper netNode; | |||
|
233 | QIcadAbstractNodeWrapper drillNode; | |||
|
234 | const QStringList& layers(){return p_layers;} | |||
|
235 | const QSizeF& size(){return p_size;} | |||
|
236 | const QPointF& pos(){return p_pos;} | |||
|
237 | double drill(){return p_drill;} | |||
|
238 | padShape shape(){return p_shape;} | |||
|
239 | void setNode(QIlib::AbstractNode* node); | |||
|
240 | private: | |||
|
241 | padShape p_shape; | |||
|
242 | double p_drill; | |||
|
243 | QSizeF p_size; | |||
|
244 | QPointF p_pos; | |||
|
245 | QStringList p_layers; | |||
|
246 | }; | |||
|
247 | ||||
|
248 | class QIcadPcbFPLine : public QIcadAbstractPcbLine | |||
|
249 | { | |||
|
250 | public: | |||
|
251 | QIcadPcbFPLine(QIlib::AbstractNode* node); | |||
|
252 | QIcadPcbFPLine(){} | |||
|
253 | QIcadAbstractNodeWrapper start; | |||
|
254 | QIcadAbstractNodeWrapper end; | |||
|
255 | QIcadAbstractNodeWrapper layer; | |||
|
256 | QIcadAbstractNodeWrapper width; | |||
|
257 | void setNode(QIlib::AbstractNode* node); | |||
|
258 | }; | |||
|
259 | ||||
|
260 | class QIcadPcbFPCircle : public QIcadAbstractNodeWrapper | |||
|
261 | { | |||
|
262 | public: | |||
|
263 | QIcadPcbFPCircle(QIlib::AbstractNode* node); | |||
|
264 | QIcadPcbFPCircle(){} | |||
|
265 | QIcadAbstractNodeWrapper center; | |||
|
266 | QIcadAbstractNodeWrapper end; | |||
|
267 | QIcadAbstractNodeWrapper layer; | |||
|
268 | QIcadAbstractNodeWrapper width; | |||
|
269 | void setNode(QIlib::AbstractNode* node); | |||
|
270 | }; | |||
|
271 | ||||
176 | class QIcadPcbModule : public QIcadAbstractNodeWrapper |
|
272 | class QIcadPcbModule : public QIcadAbstractNodeWrapper | |
177 | { |
|
273 | { | |
178 | public: |
|
274 | public: | |
179 | QIcadPcbModule(QIlib::AbstractNode* node); |
|
275 | QIcadPcbModule(QIlib::AbstractNode* node); | |
180 | QIcadPcbModule(){} |
|
276 | QIcadPcbModule(){} | |
|
277 | const QPointF& pos(); | |||
|
278 | double angle(); | |||
181 | QIcadAbstractNodeWrapper layer; |
|
279 | QIcadAbstractNodeWrapper layer; | |
182 | QIcadAbstractNodeWrapper tedit; |
|
280 | QIcadAbstractNodeWrapper tedit; | |
183 | QIcadAbstractNodeWrapper tstamp; |
|
281 | QIcadAbstractNodeWrapper tstamp; | |
184 | QIcadAbstractNodeWrapper at; |
|
282 | QIcadAbstractNodeWrapper at; | |
185 | QIcadAbstractNodeWrapper descr; |
|
283 | QIcadAbstractNodeWrapper descr; | |
186 | QIcadAbstractNodeWrapper tags; |
|
284 | QIcadAbstractNodeWrapper tags; | |
187 | QIcadAbstractNodeWrapper path; |
|
285 | QIcadAbstractNodeWrapper path; | |
188 | QIcadAbstractNodeWrapper attr; |
|
286 | QIcadAbstractNodeWrapper attr; | |
189 |
QList<QIcad |
|
287 | QList<QIcadPcbFPText*> fp_texts; | |
190 |
QList<QIcad |
|
288 | QList<QIcadPcbFPLine*> fp_lines; | |
191 |
QList<QIcad |
|
289 | QList<QIcadPcbFPCircle*> fp_circles; | |
|
290 | QList<QIcadPcbPad*> pads; | |||
192 | QIcadPcbModuleModel model; |
|
291 | QIcadPcbModuleModel model; | |
193 | void setNode(QIlib::AbstractNode* node); |
|
292 | void setNode(QIlib::AbstractNode* node); | |
|
293 | void clrPads(); | |||
|
294 | void apendPad(QIlib::AbstractNode* node); | |||
|
295 | void clrTexts(); | |||
|
296 | void apendText(QIlib::AbstractNode* node); | |||
|
297 | void clrLines(); | |||
|
298 | void apendLine(QIlib::AbstractNode* node); | |||
|
299 | void clrCircles(); | |||
|
300 | void apendCircle(QIlib::AbstractNode* node); | |||
|
301 | private: | |||
|
302 | QPointF p_pos; | |||
|
303 | double p_angle; | |||
194 | }; |
|
304 | }; | |
195 |
|
305 | |||
196 |
class QIcadPcbSegment : public QIcadAbstract |
|
306 | class QIcadPcbSegment : public QIcadAbstractPcbLine | |
197 | { |
|
307 | { | |
198 | public: |
|
308 | public: | |
199 | QIcadPcbSegment(QIlib::AbstractNode* node); |
|
309 | QIcadPcbSegment(QIlib::AbstractNode* node); | |
200 | QIcadPcbSegment(){} |
|
310 | QIcadPcbSegment(){} | |
201 | QIcadAbstractNodeWrapper start; |
|
311 | QIcadAbstractNodeWrapper start; | |
202 | QIcadAbstractNodeWrapper end; |
|
312 | QIcadAbstractNodeWrapper end; | |
203 | QIcadAbstractNodeWrapper width; |
|
313 | QIcadAbstractNodeWrapper width; | |
204 | QIcadAbstractNodeWrapper layer; |
|
314 | QIcadAbstractNodeWrapper layer; | |
205 | QIcadAbstractNodeWrapper net; |
|
315 | QIcadAbstractNodeWrapper net; | |
206 | void setNode(QIlib::AbstractNode* node); |
|
316 | void setNode(QIlib::AbstractNode* node); | |
207 | }; |
|
317 | }; | |
|
318 | ||||
208 | class QIcadPcbVia : public QIcadAbstractNodeWrapper |
|
319 | class QIcadPcbVia : public QIcadAbstractNodeWrapper | |
209 | { |
|
320 | { | |
210 | public: |
|
321 | public: | |
211 | QIcadPcbVia(QIlib::AbstractNode* node); |
|
322 | QIcadPcbVia(QIlib::AbstractNode* node); | |
212 | QIcadPcbVia(){} |
|
323 | QIcadPcbVia(){} | |
213 | QIcadAbstractNodeWrapper at; |
|
324 | QIcadAbstractNodeWrapper at; | |
214 | QIcadAbstractNodeWrapper size; |
|
325 | QIcadAbstractNodeWrapper sizeNode; | |
215 | QIcadAbstractNodeWrapper drill; |
|
326 | QIcadAbstractNodeWrapper drillNode; | |
216 | QIcadAbstractNodeWrapper layer; |
|
327 | QIcadAbstractNodeWrapper layersNode; | |
217 | QIcadAbstractNodeWrapper net; |
|
328 | QIcadAbstractNodeWrapper net; | |
|
329 | QIcadAbstractNodeWrapper tstamp; | |||
218 | void setNode(QIlib::AbstractNode* node); |
|
330 | void setNode(QIlib::AbstractNode* node); | |
|
331 | const QStringList& layers(){return p_layers;} | |||
|
332 | const QSizeF& size(){return p_size;} | |||
|
333 | const QPointF& pos(){return p_pos;} | |||
|
334 | double drill(){return p_drill;} | |||
|
335 | private: | |||
|
336 | double p_drill; | |||
|
337 | QSizeF p_size; | |||
|
338 | QPointF p_pos; | |||
|
339 | QStringList p_layers; | |||
219 | }; |
|
340 | }; | |
220 |
|
341 | |||
221 |
class QIcadPcbLine : public QIcadAbstract |
|
342 | class QIcadPcbLine : public QIcadAbstractPcbLine | |
222 | { |
|
343 | { | |
223 | public: |
|
344 | public: | |
224 | QIcadPcbLine(QIlib::AbstractNode* node); |
|
345 | QIcadPcbLine(QIlib::AbstractNode* node); | |
225 | QIcadPcbLine(){} |
|
346 | QIcadPcbLine(){} | |
226 | QIcadAbstractNodeWrapper start; |
|
347 | QIcadAbstractNodeWrapper start; | |
227 | QIcadAbstractNodeWrapper end; |
|
348 | QIcadAbstractNodeWrapper end; | |
228 | QIcadAbstractNodeWrapper angle; |
|
349 | QIcadAbstractNodeWrapper angle; | |
229 | QIcadAbstractNodeWrapper layer; |
|
350 | QIcadAbstractNodeWrapper layer; | |
230 | QIcadAbstractNodeWrapper width; |
|
351 | QIcadAbstractNodeWrapper width; | |
231 | void setNode(QIlib::AbstractNode* node); |
|
352 | void setNode(QIlib::AbstractNode* node); | |
232 | }; |
|
353 | }; | |
233 |
|
354 | |||
|
355 | class QIcadPcbZone : public QIcadAbstractNodeWrapper | |||
|
356 | { | |||
|
357 | public: | |||
|
358 | QIcadPcbZone(QIlib::AbstractNode* node); | |||
|
359 | QIcadPcbZone(){} | |||
|
360 | void setNode(QIlib::AbstractNode* node); | |||
|
361 | }; | |||
|
362 | ||||
|
363 | class QIcadPcbArc : public QIcadAbstractNodeWrapper | |||
|
364 | { | |||
|
365 | public: | |||
|
366 | QIcadPcbArc(QIlib::AbstractNode* node); | |||
|
367 | QIcadPcbArc(){} | |||
|
368 | QIcadAbstractNodeWrapper start; | |||
|
369 | QIcadAbstractNodeWrapper end; | |||
|
370 | QIcadAbstractNodeWrapper angle; | |||
|
371 | QIcadAbstractNodeWrapper layer; | |||
|
372 | QIcadAbstractNodeWrapper width; | |||
|
373 | void setNode(QIlib::AbstractNode* node); | |||
|
374 | }; | |||
|
375 | ||||
|
376 | class QIcadPcbCircle : public QIcadAbstractNodeWrapper | |||
|
377 | { | |||
|
378 | public: | |||
|
379 | QIcadPcbCircle(QIlib::AbstractNode* node); | |||
|
380 | QIcadPcbCircle(){} | |||
|
381 | QIcadAbstractNodeWrapper center; | |||
|
382 | QIcadAbstractNodeWrapper end; | |||
|
383 | QIcadAbstractNodeWrapper layer; | |||
|
384 | QIcadAbstractNodeWrapper width; | |||
|
385 | void setNode(QIlib::AbstractNode* node); | |||
|
386 | }; | |||
|
387 | ||||
|
388 | class QIcadPcbText : public QIcadAbstractNodeWrapper | |||
|
389 | { | |||
|
390 | public: | |||
|
391 | QIcadPcbText(QIlib::AbstractNode* node); | |||
|
392 | QIcadPcbText(){} | |||
|
393 | QIcadAbstractNodeWrapper at; | |||
|
394 | QIcadAbstractNodeWrapper layer; | |||
|
395 | QIcadAbstractNodeWrapper width; | |||
|
396 | QIcadPcbFpTextEffects effects; | |||
|
397 | void setNode(QIlib::AbstractNode* node); | |||
|
398 | }; | |||
|
399 | ||||
234 | class QIcadPcbLayers : public QIcadAbstractNodeWrapper |
|
400 | class QIcadPcbLayers : public QIcadAbstractNodeWrapper | |
235 | { |
|
401 | { | |
236 | public: |
|
402 | public: | |
237 | QIcadPcbLayers(QIlib::AbstractNode* node); |
|
403 | QIcadPcbLayers(QIlib::AbstractNode* node); | |
238 | QIcadPcbLayers(){} |
|
404 | QIcadPcbLayers(){} | |
239 |
QList<QIcad |
|
405 | QList<QIcadPcbLayer*> layers; | |
240 | void setNode(QIlib::AbstractNode* node); |
|
406 | void setNode(QIlib::AbstractNode* node); | |
|
407 | void clrLayers(); | |||
|
408 | void apendLayer(QIlib::AbstractNode* node); | |||
241 | }; |
|
409 | }; | |
242 |
|
410 | |||
243 | class QIcadPcbGeneralInfo : public QIcadAbstractNodeWrapper |
|
411 | class QIcadPcbGeneralInfo : public QIcadAbstractNodeWrapper | |
244 | { |
|
412 | { | |
245 | public: |
|
413 | public: | |
246 | QIcadPcbGeneralInfo(QIlib::AbstractNode* node); |
|
414 | QIcadPcbGeneralInfo(QIlib::AbstractNode* node); | |
247 | QIcadPcbGeneralInfo(){} |
|
415 | QIcadPcbGeneralInfo(){} | |
248 | QIcadAbstractNodeWrapper links; |
|
416 | QIcadAbstractNodeWrapper links; | |
249 | QIcadAbstractNodeWrapper no_connections; |
|
417 | QIcadAbstractNodeWrapper no_connections; | |
250 | QIcadAbstractNodeWrapper area; |
|
418 | QIcadAbstractNodeWrapper area; | |
251 | QIcadAbstractNodeWrapper thickness; |
|
419 | QIcadAbstractNodeWrapper thickness; | |
252 | QIcadAbstractNodeWrapper drawings; |
|
420 | QIcadAbstractNodeWrapper drawings; | |
253 | QIcadAbstractNodeWrapper tracks; |
|
421 | QIcadAbstractNodeWrapper tracks; | |
254 | QIcadAbstractNodeWrapper zones; |
|
422 | QIcadAbstractNodeWrapper zones; | |
255 | QIcadAbstractNodeWrapper modules; |
|
423 | QIcadAbstractNodeWrapper modules; | |
256 | QIcadAbstractNodeWrapper nets; |
|
424 | QIcadAbstractNodeWrapper nets; | |
257 | void setNode(QIlib::AbstractNode* node); |
|
425 | void setNode(QIlib::AbstractNode* node); | |
258 | }; |
|
426 | }; | |
259 |
|
427 | |||
260 | class QIcadPcbRoot : public QIcadAbstractNodeWrapper |
|
428 | class QIcadPcbRoot : public QIcadAbstractNodeWrapper | |
261 | { |
|
429 | { | |
262 | public: |
|
430 | public: | |
263 | QIcadPcbRoot(QIlib::AbstractNode* node); |
|
431 | QIcadPcbRoot(QIlib::AbstractNode* node); | |
264 | QIcadAbstractNodeWrapper version; |
|
432 | QIcadAbstractNodeWrapper version; | |
265 | QIcadAbstractNodeWrapper host; |
|
433 | QIcadAbstractNodeWrapper host; | |
266 | QIcadAbstractNodeWrapper page; |
|
434 | QIcadAbstractNodeWrapper page; | |
267 | QIcadPcbGeneralInfo general; |
|
435 | QIcadPcbGeneralInfo general; | |
268 | QIcadPcbLayers layers; |
|
436 | QIcadPcbLayers layers; | |
269 | QIcadPcbSetup setup; |
|
437 | QIcadPcbSetup setup; | |
270 | QList<QIcadAbstractNodeWrapper*> nets; |
|
438 | QList<QIcadAbstractNodeWrapper*> nets; | |
271 | QList<QIcadPcbModule*> modules; |
|
439 | QList<QIcadPcbModule*> modules; | |
272 | QList<QIcadPcbDimension*> dimensions; |
|
440 | QList<QIcadPcbDimension*> dimensions; | |
273 | QList<QIcadPcbLine*> lines; |
|
441 | QList<QIcadPcbLine*> lines; | |
274 | QList<QIcadPcbSegment*> segments; |
|
442 | QList<QIcadPcbSegment*> segments; | |
275 | QList<QIcadPcbVia*> vias; |
|
443 | QList<QIcadPcbVia*> vias; | |
|
444 | QList<QIcadPcbArc*> arcs; | |||
|
445 | QList<QIcadPcbCircle*> circles; | |||
|
446 | QList<QIcadPcbText*> texts; | |||
|
447 | QList<QIcadPcbZone*> zones; | |||
276 | void setNode(QIlib::AbstractNode* node); |
|
448 | void setNode(QIlib::AbstractNode* node); | |
277 | void clrNets(); |
|
449 | void clrNets(); | |
278 | void apendNet(QIlib::AbstractNode* node); |
|
450 | void apendNet(QIlib::AbstractNode* node); | |
279 | void setModules(QIlib::AbstractNode* node); |
|
451 | void clrModules(); | |
280 |
void apendModule |
|
452 | void apendModule(QIlib::AbstractNode* node); | |
281 | void setDimensions(QIlib::AbstractNode* node); |
|
453 | void clrDimensions(); | |
282 |
void apendDimension |
|
454 | void apendDimension(QIlib::AbstractNode* node); | |
283 |
void |
|
455 | void apendLine(QIlib::AbstractNode* node); | |
284 | void apendLines(QIlib::AbstractNode* node); |
|
456 | void clrLines(); | |
285 | void setSegments(QIlib::AbstractNode* node); |
|
457 | void clrSegments(); | |
286 |
void apendSegment |
|
458 | void apendSegment(QIlib::AbstractNode* node); | |
287 | void setVias(QIlib::AbstractNode* node); |
|
459 | void clrVias(); | |
288 |
void apendVia |
|
460 | void apendVia(QIlib::AbstractNode* node); | |
|
461 | void clrArcs(); | |||
|
462 | void apendArc(QIlib::AbstractNode* node); | |||
|
463 | void clrCircles(); | |||
|
464 | void apendCircle(QIlib::AbstractNode* node); | |||
|
465 | void clrTexts(); | |||
|
466 | void apendText(QIlib::AbstractNode* node); | |||
|
467 | void clrZones(); | |||
|
468 | void apendZone(QIlib::AbstractNode* node); | |||
289 | }; |
|
469 | }; | |
290 |
|
470 | |||
291 | class QIcadPcb : private lispLike_Driver |
|
471 | class QIcadPcb : private lispLike_Driver | |
292 | { |
|
472 | { | |
293 | public: |
|
473 | public: | |
294 | QIcadPcb(); |
|
474 | QIcadPcb(); | |
295 | bool parsePcb(const QString& pcb); |
|
475 | bool parsePcb(const QString& pcb); | |
296 | QString toString(); |
|
476 | QString toString(); | |
297 | QString fileName; |
|
477 | QString fileName; | |
298 | QString print(); |
|
478 | QString print(); | |
299 |
|
479 | |||
300 | QIcadPcbRoot* pcbRoot; |
|
480 | QIcadPcbRoot* pcbRoot; | |
301 | private: |
|
481 | private: | |
302 | void updateConcreteTree(); |
|
482 | void updateConcreteTree(); | |
303 | }; |
|
483 | }; | |
304 |
|
484 | |||
305 |
|
485 | |||
306 | } |
|
486 | } | |
307 | #endif // QICADPCB_H |
|
487 | #endif // QICADPCB_H |
@@ -1,49 +1,51 | |||||
1 | QT += core gui |
|
1 | QT += core gui | |
2 | CONFIG += qilib |
|
2 | CONFIG += qilib | |
3 |
|
3 | |||
4 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
|
4 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
5 |
|
5 | |||
6 | TARGET = LispLikeDump |
|
6 | TARGET = LispLikeDump | |
7 | TEMPLATE = app |
|
7 | TEMPLATE = app | |
8 | MOC_DIR = moc |
|
8 | MOC_DIR = moc | |
9 | RCC_DIR = resources |
|
9 | RCC_DIR = resources | |
10 | OBJECTS_DIR = obj |
|
10 | OBJECTS_DIR = obj | |
11 | DESTDIR = ../../bin |
|
11 | DESTDIR = ../../bin | |
12 |
|
12 | |||
13 | SOURCES += main.cpp |
|
13 | SOURCES += main.cpp | |
14 |
|
14 | |||
15 | INCLUDEPATH += ../../qilib $${DESTDIR}/../qilib/ |
|
15 | INCLUDEPATH += ../../qilib $${DESTDIR}/../qilib/ | |
16 |
|
16 | |||
17 | LIBS += -L../../bin -lQIlib |
|
17 | LIBS += -L../../bin -lQIlib | |
18 |
|
18 | |||
19 | FILESTOCOPY.files += \ |
|
19 | FILESTOCOPY.files += \ | |
20 | $${PWD}/../testFiles/netlist1.net \ |
|
20 | $${PWD}/../testFiles/netlist1.net \ | |
21 | $${PWD}/../testFiles/netlist2.net \ |
|
21 | $${PWD}/../testFiles/netlist2.net \ | |
22 | $${PWD}/../testFiles/pcb1.kicad_pcb |
|
22 | $${PWD}/../testFiles/pcb1.kicad_pcb\ | |
|
23 | $${PWD}/../testFiles/pcb2.kicad_pcb\ | |||
|
24 | $${PWD}/../testFiles/pcb3.kicad_pcb | |||
23 |
|
25 | |||
24 | FILESTOCOPY.path = $${DESTDIR} |
|
26 | FILESTOCOPY.path = $${DESTDIR} | |
25 |
|
27 | |||
26 | message($${DESTDIR}) |
|
28 | message($${DESTDIR}) | |
27 |
|
29 | |||
28 | defineTest(copyFiles) { |
|
30 | defineTest(copyFiles) { | |
29 | files = $$1 |
|
31 | files = $$1 | |
30 | DDIR = $$2 |
|
32 | DDIR = $$2 | |
31 | win32:DDIR ~= s,/,\\,g |
|
33 | win32:DDIR ~= s,/,\\,g | |
32 | QMAKE_POST_LINK += $$QMAKE_MKDIR $$quote($$DDIR) $$escape_expand(\\n\\t) |
|
34 | QMAKE_POST_LINK += $$QMAKE_MKDIR $$quote($$DDIR) $$escape_expand(\\n\\t) | |
33 | for(FILE, files) { |
|
35 | for(FILE, files) { | |
34 | message(copying file $$FILE to $$DIR) |
|
36 | message(copying file $$FILE to $$DIR) | |
35 | # Replace slashes in paths with backslashes for Windows |
|
37 | # Replace slashes in paths with backslashes for Windows | |
36 | win32:FILE ~= s,/,\\,g |
|
38 | win32:FILE ~= s,/,\\,g | |
37 | QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t) |
|
39 | QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t) | |
38 | } |
|
40 | } | |
39 | export(QMAKE_POST_LINK) |
|
41 | export(QMAKE_POST_LINK) | |
40 | } |
|
42 | } | |
41 |
|
43 | |||
42 |
|
44 | |||
43 |
|
45 | |||
44 | !isEmpty(FILESTOCOPY.files) { |
|
46 | !isEmpty(FILESTOCOPY.files) { | |
45 | copyFiles($$FILESTOCOPY.files,$$FILESTOCOPY.path) |
|
47 | copyFiles($$FILESTOCOPY.files,$$FILESTOCOPY.path) | |
46 | } |
|
48 | } | |
47 |
|
49 | |||
48 |
|
50 | |||
49 |
|
51 |
@@ -1,19 +1,21 | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | TEMPLATE = subdirs |
|
3 | TEMPLATE = subdirs | |
4 | CONFIG += ordered release |
|
4 | CONFIG += ordered release | |
5 |
|
5 | |||
6 | SUBDIRS += dumpLispLikeFiles |
|
6 | SUBDIRS += dumpLispLikeFiles \ | |
|
7 | PCBView | |||
7 |
|
8 | |||
8 |
|
9 | |||
9 |
|
10 | |||
10 |
|
11 | |||
11 | OTHER_FILES += \ |
|
12 | OTHER_FILES += \ | |
12 | testFiles/netlist1.net \ |
|
13 | testFiles/netlist1.net \ | |
13 | testFiles/netlist2.net \ |
|
14 | testFiles/netlist2.net \ | |
14 | testFiles/pcb1.kicad_pcb \ |
|
15 | testFiles/pcb1.kicad_pcb \ | |
15 | testFiles/pcb2.kicad_pcb |
|
16 | testFiles/pcb2.kicad_pcb \ | |
|
17 | testFiles/pcb3.kicad_pcb | |||
16 |
|
18 | |||
17 |
|
19 | |||
18 |
|
20 | |||
19 |
|
21 |
General Comments 0
You need to be logged in to leave comments.
Login now