flatcam

Open full view…

Excellon file - the bug still not resolved

igorp45
Thu, 14 Jun 2018 21:30:27 GMT

Hi, I am using Diptrace for my PCBs and the output for drilling looks like this: ..... METRIC,00000.00 ..... T01 X+0034900Y+0245200 X+0034900Y+0296000 etc... The result of using such values is wrong, because FlatCAM supposes for metric format 000.000 (six or five numbers) . According to http://flatcam.org/fileformats, the program works well, but is not there any workaround to made FlatCAM to accept seven numbers with two decimals in metrics? With best regards Igor

Marius Stanciu
Thu, 14 Jun 2018 22:50:51 GMT

Igor, it's one of the changes that I already made and I want to propose in the immediate future to be included in the main branch of FlatCAM. Until then, you can give it a try to the Nightly that I just posted. In the Excellon sections of the Options -> Application Defaults there are some fields under the headline named Excellon format. Change them according to your need and then click Save. You'll see also a lot of the changes that I helped include in the main branch of FlatCAM and some are not there yet. There is also 3D acceleration (done by Dennis) and drill path optimization with Google OR tools algorithms and so much more. But you need a 64bit Windows OS. You can hover with the mouse over the "Excellon Format" title to have a list of possible settings for different EDA software, although it seems there is a typo for Diptrace, it is written format 4:2 MM TZ which should be 5.2 MM TZ (5 units, 2 decimals, metric, trailing zeros) What's you see in the attached picture is a small PCB done in Diptrace. [Excellon_format](//muut.com/u/flatcam/s2/:flatcam:QPZi:excellon_format.jpg.jpg)

igorp45
Sat, 16 Jun 2018 17:15:49 GMT

Hi Marius, many thanks for your effort, never the less it doesn't help me. I haven't use Windows for many years, I prefer Linux instead. I tried to run FlatCAM from source, but no way. First, modules are written in python 3 and second, many libraries are missing in my instalation ( for instance ortools). I am considered to write some easy program to modify Exellon file I have will be much easier task. BTW. I downloaded your Nighty, installer works fine under WINE, but no way to start the program. With regards Igor

Marius Stanciu
Sat, 16 Jun 2018 18:43:47 GMT

Igor, If that's the case you can use the Python source files from here: https://bitbucket.org/marius_stanciu/flatcam_vispy_pyqt4/get/2a52c336715f.zip Or-tools you can get from here (they work on Linux, too but it has to be 64bit): https://github.com/google/or-tools https://developers.google.com/optimization/introduction/installing/binary You need Python 3.6 x64, shapely, rtree, vispy, svg.path, simplejson, pyqt4 and of course or-tools from above. You need a graphic card and graphic drivers that support OpenGL 2.1 with programmable pipeline. The performance level is good, there is ~ 100% improvement in speed (loading Gerbers, etc) so the effort is worth it.

Marius Stanciu
Sat, 16 Jun 2018 18:49:36 GMT

Add to what's enumerated above, pyopengl.

igorp45
Tue, 19 Jun 2018 16:44:42 GMT

Hi Marius, installed all your list of modules I am able to start FlatCAM from sources. Never the less I am not able to solve Runtime error I am getting: WARNING: Although PyQt4 is already imported, the PyQt4 backend could not be used ("cannot import name 'QtOpenGL'"). Note that running multiple GUI toolkits simultaneously can cause side effects. libEGL warning: DRI2: failed to authenticate Traceback (most recent call last): File "FlatCAM.py", line 34, in <module> fc = App() File "/home/ipokorny/smazat/marius_stanciu-flatcam_vispy_pyqt4-2a52c336715f /FlatCAMApp.py", line 244, in __init__ self.plotcanvas = PlotCanvas(self.ui.right_layout, self) File "/home/ipokorny/smazat/marius_stanciu-flatcam_vispy_pyqt4-2a52c336715f /PlotCanvas.py", line 44, in __init__ self.vispy_canvas = VisPyCanvas() File "/home/ipokorny/smazat/marius_stanciu-flatcam_vispy_pyqt4-2a52c336715f /VisPyCanvas.py", line 12, in __init__ scene.SceneCanvas.__init__(self, keys=None, config=config) File "/usr/local/lib/python3.5/dist-packages/vispy/scene/canvas.py", line 136, in _ _init__ always_on_top, px_scale) File "/usr/local/lib/python3.5/dist-packages/vispy/app/canvas.py", line 169, in __init__ self._app = use_app(call_reuse=False) File "/usr/local/lib/python3.5/dist-packages/vispy/app/_default_app.py", line 47, in use_app default_app = Application(backend_name) File "/usr/local/lib/python3.5/dist-packages/vispy/app/application.py", line 49, in __init__ self._use(backend_name) File "/usr/local/lib/python3.5/dist-packages/vispy/app/application.py", line 244, in _use 'PyQt' % [b[0] for b in CORE_BACKENDS]) RuntimeError: Could not import any of the backends. You need to install any of ['PyQt4', 'PyQt5', 'PySide', 'Pyglet', 'Glfw', 'SDL2', 'wx', 'EGL', 'osmesa']. We recommend PyQt But pip3 show PyOpenGL Name: PyOpenGL Version: 3.1.0 Summary: Standard OpenGL bindings for Python Home-page: http://pyopengl.sourceforge.net Author: Mike C. Fletcher Author-email: [email protected] License: BSD Location: /usr/local/lib/python3.5/dist-packages Any help? PS. My graphic card is GeForce 7025 / nForce 630a/integrated/SSE2 supports GL 2.1.2

Marius Stanciu
Tue, 19 Jun 2018 20:03:22 GMT

Hi Igor, The main error is: "Although PyQt4 is already imported, the PyQt4 backend could not be used (“cannot import name ‘QtOpenGL’”)." I don't know how things are in Linux but you may need to install also Qt and/or python-qt4-gl As you can see, in Windows are included also the Qt DLL's so you may need something equivalent in Linux. Maybe: sudo apt-get install python-qt4 qt4-designer and/or sudo apt-get install python-qt4-gl will help ... not sure if qt-designer it's needed but since it is included in Windows ... why not?! [Qt4](//muut.com/u/flatcam/s1/:flatcam:uEKr:qt4.jpg.jpg)

Marius Stanciu
Tue, 19 Jun 2018 20:19:30 GMT

At some point I've got this error, too: "File “ [...] /vispy/app/application.py”, line 244, in use ‘PyQt’ % [b[0] for b in CORE_BACKENDS]) RuntimeError: Could not import any of the backends. You need to install any of ['PyQt4' when I deleted too much files from the PyQt4 folder in my attempt to lighten the windows installer size. In that case I had to put back those files and then the windows installer worked perfectly. More exactly, it was the "QtOpenGL.pyd" and "QtOpenGL.dll" that were required. QtOpenGL.pyd is part of the PyQt4 but QtOpenGL.dll is part from Qt package. I think.

Marius Stanciu
Tue, 19 Jun 2018 20:20:36 GMT

https://stackoverflow.com/questions/1419650/just-installed-qtopengl-but-cannot-import-it-from-python

Marius Stanciu
Tue, 19 Jun 2018 20:32:36 GMT

For python 3 the package names might be different as it seems to suggest one of the answers in the link above.

igorp45
Tue, 19 Jun 2018 23:09:47 GMT

Hi Marius, sudo apt-get install python3-pyqt4.qtopengl was the right way to run FlatCAM. The program is running well with one (big) problem - the right side of the window is empty - no drawing at all. I have got some error messages - ERROR: Invoking <bound method SceneCanvas.on_draw of <VisPyCanvas (PyQt4) at 0x7f9890689f60>> repeat 256 Traceback (most recent call last): File "/home/ipokorny/smazat/marius_stanciu-flatcam_vispy_pyqt4-2a52c336715f /FlatCAMApp.py", line 1895, in on_preferences self.show() AttributeError: 'App' object has no attribute 'show' ERROR: Invoking <bound method SceneCanvas.on_draw of <VisPyCanvas (PyQt4) at 0x7f9890689f60>> repeat 512 I think it will be a problem with graphic acceleration. I am going to dig deeper tomorrow and when you are interested let you know.

Marius Stanciu
Wed, 20 Jun 2018 08:59:51 GMT

If you can document your efforts here, I think there might be other interested and they will need guidance. Which you can provide after solving the issues. Regarding the error, it was a bug in the software, for some reasons it worked in Windows but anyway, I solved it and pushed the change to bitbucket. Please try the latest source: https://bitbucket.org/marius_stanciu/flatcam_vispy_pyqt4/get/85b3eaa72543.zip

Marius Stanciu
Thu, 21 Jun 2018 19:10:13 GMT

I just have installed Linux Xubuntu 18.04 X64 in a Vmware virtual machine, purged python2.7 with apt-get purge python2.7 and then installed vmware-tools, installed the following packages with: sudo apt-get install python3-pyqt4 python3-pyqt4.qtopengl python3-rtree python3-shapely python3-tk and with pip3 pip3 install svg.path pip3 install pyopengl pip3 install rtree (don't know if it was needed since I installed it also as python3-rtree) pip3 install pyopengl-accelerate pip3 install simplejson - -upgrade pip3 install ortools pip3 install vispy Everything is working OK as you can see in the picture. [Screenshot_2018-06-21](//muut.com/u/flatcam/s3/:flatcam:RSmr:screenshot_20180621.png.jpg)

igorp45
Sat, 23 Jun 2018 21:05:04 GMT

Hi Marius, my wife's computer has the same version of Ubuntu installed so I tried to install modules there by my list - the same as I used on my computer running Linux Mint 18.1 (it's Ubuntu too). You were right , the new instalation works perfectly. I tried to do some debugging, but it's difficult to get any useable results because of threads. In which module is plotting done? Regards Igor

Marius Stanciu
Sat, 23 Jun 2018 21:41:11 GMT

Used to be PlotCanvas.py but now the VisPy modules (VisPyCanvas, VisPyTesselators, VisPyVisuals and VisPyPatches) are the ones doing most of the plotting job.