Pads not importing in RS-274-X Gerber files
Win64, FlatCAM v8.994beta
Hi,
Can you tell me what is wrong with these Gerber lines? The file is rejected by FlatCAM as “probably not a Gerber file”, but I can load it just fine in an online PCB verification tool.
%FSLAX33Y33*%
%MOMM*%
%ADD10R, 1.422X1.422*%
G54D10*
G01X013970Y012065D02*
G55D03*
M02*
I am including the entire file generated by QCAD; this code snippet is the very first pad after the aperture descriptions (I renamed the aperture from 15 down to 10, and tagged on the END statement to figure what is obsolete/incorrect in the files from QCAD).
I can see the lines and holes just fine in FlatCAM (using just the Top layer until I figure what’s going on), but none of the pads are showing. All the pads (square and round) show up just fine in the online verification tool.
Thanks!
Comments (20)
-
reporter -
reporter I just noticed that I have only apertures 10, 11 and 13 listed in the properties for the top layer. Shouldn’t they all be listed there?
I’m missing apertures 12, and 14 to 17.
-
Hi Robert,
The reason for the error is that the software that generated the Gerber file uses an obsoleted format.
It is because of the G55D03* lines.The Gerber specification says:
After adding support for the G55 obsoleted command I get this using the sources from here:
https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995
-
Fixed in latest commit here:
https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995 -
reporter Thank you so much Marius. So now I’m trying to figure out how to get those lines of code updated into FlatCAM.
I’m a mainframe programmer by trade (retired) and dabble in C++, but I’ve never done Python, nor used BitBucket.
I have VS 2022 v17.7.4 installed along with Python support, but I assume the integration is done via that Python download we had to do…?
-
reporter Bitbucket instructions say I’m supposed to be able to pull the modified file into my local folder.
But I see no PULL button on the page…?
-
reporter I don’t see any PULL button if I go via the SOURCE icon on the left.
-
Hi,
I can understand not being familiar with an environment.
Here is a shortcut to the sources zip bundle: https://bitbucket.org/marius_stanciu/flatcam_beta/get/ca630be1490151bc6461a0fcc73cd0c11fbe424c.zipWARNING: this is not a finished software, there are bugs. Some features are not finished. Tools Database is NOT working.
In regards of how to use the sources you can watch this video:
https://www.youtube.com/watch?v=doPdeA0YgzQ&ab_channel=MariusStanciu -
reporter I started over, uninstalled FlatCAM and WinPython and reinstalled:
- Winpython64-3.11.4.0dot.exe
- FlatCAM v8.994beta
I followed that video to use the source files you linked. I get 2 errors when trying to start FlatCAM using those instructions (tried it both with and without .\ prefix)
PS C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901> python .\flatcam.py Traceback (most recent call last): File "C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901\flatcam.py", line 9, in <module> from appMain import App File "C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901\appMain.py", line 38, in <module> from shapely import Point, MultiPolygon, MultiLineString, Polygon, LinearRing, LineString ImportError: cannot import name 'Point' from 'shapely' (C:\Winpython64-3.11.4.0dot\python-3.11.4.amd64\Lib\site-packages\shapely\__init__.py) PS C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901> python flatcam.py Traceback (most recent call last): File "C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901\flatcam.py", line 9, in <module> from appMain import App File "C:\Users\Papa\Downloads\FlatCAM\marius_stanciu-flatcam_beta-ca630be14901\appMain.py", line 38, in <module> from shapely import Point, MultiPolygon, MultiLineString, Polygon, LinearRing, LineString ImportError: cannot import name 'Point' from 'shapely' (C:\Winpython64-3.11.4.0dot\python-3.11.4.amd64\Lib\site-packages\shapely\__init__.py)
I kept a text logfile of all the package installations as a I followed the video. code snippet doesn't make a scroll window and I can’t upload a TXT or ZIP (it says only IMAGES are allowed). So I’ll only post it if you want to see it so I don’t clutter the thread.
-
reporter Hmm, I can’t open the WinPython Control Panel. It keeps crashing.
I'm going to uninstall everything and start over with Winpython64-3.9.10.0dot.
-
reporter I redid everything with WinPython v3.9.10. I get the same 2 errors when I enter PYTHON FLATCAM.PY.
-
reporter I’m certain that I had uninstalled Python from the Windows Apps list the first time.
But since I installed v3.9.10, it no longer shows up there, and it keeps crashing when I try to open the WinPython Control Panel to check if PYQT5 and PYQT4 are there.
There’s something wonky in my system….?
-
reporter Uninstalled the Python language in Visual Studio 2022 to make sure that didn't interfere. Rebooted.
Did another attempt; same errors:
...POINTING TO FLATCAM SOURCE FOLDER... python flatcam.py Traceback (most recent call last): File "C:\Users\Papa\Downloads\FlatCAM source\Files\flatcam.py", line 9, in <module> from appMain import App File "C:\Users\Papa\Downloads\FlatCAM source\Files\appMain.py", line 38, in <module> from shapely import Point, MultiPolygon, MultiLineString, Polygon, LinearRing, LineString ImportError: cannot import name 'Point' from 'shapely' (C:\Winpython64-3.9.10.0dot\python-3.9.10.amd64\lib\site-packages\shapely\init.py)
I kept a summary of all the package installations and results:
...POINTING TO PYTHON PACKAGE FOLDER...
python
version3.9.10.0dot installedpip -v
version 21.3.1 installedpip install .\GDAL-3.4.3-cp39-cp39-win_amd64.whl
Successfully installed GDAL-3.4.3pip install .\matplotlib-3.5.2-cp39-cp39-win_amd64.whl
Successfully installed cycler-0.12.0
fonttools-4.42.1
kiwisolver-1.4.5
matplotlib-3.5.2
numpy-1.26.0
packaging-23.1
pillow-10.0.1
pyparsing-3.1.1
python-dateutil-2.8.2
six-1.16.0pip install .\rasterio-1.2.10-cp39-cp39-win_amd64.whl
Successfully installed affine-2.4.0
attrs-23.1.0
certifi-2023.7.22
click-8.1.7
click-plugins-1.1.1
cligj-0.7.2
colorama-0.4.6
rasterio-1.2.10
snuggs-1.4.7pip install .\Rtree-1.0.0-cp39-cp39-win_amd64.whl
Successfully installed Rtree-1.0.0pip install .\Shapely-1.8.2-cp39-cp39-win_amd64.whl
Successfully installed Shapely-1.8.2pip install dill
Successfully installed dill-0.3.7pip install pyopengl
Successfully installed pyopengl-3.1.7pip install ortools
Successfully installed absl-py-2.0.0
ortools-9.7.2996
protobuf-4.24.3pip install svg.path
Successfully installed svg.path-6.3pip install simplejson
Successfully installed simplejson-3.19.1pip install freetype-py
Successfully installed freetype-py-2.4.0pip install lxml
Successfully installed lxml-4.9.3pip install ezdxf
Successfully installed ezdxf-1.1.0
typing-extensions-4.8.0pip install qrcode
Successfully installed pypng-0.20220715.0
qrcode-7.4.2pip install reportlab
Successfully installed reportlab-4.0.5pip install svglib
Successfully installed cssselect2-0.7.0
svglib-1.5.1
tinycss2-1.2.1
webencodings-0.5.1pip install pyserial
Successfully installed pyserial-3.5pip install pikepdf
Successfully installed deprecation-2.1.0
pikepdf-8.4.1pip install pywin32
Successfully installed pywin32-306pip install pyqt6
Successfully installed PyQt6-Qt6-6.5.2
PyQt6-sip-13.5.2
pyqt6-6.5.2pip install vispy
Successfully installed hsluv-5.0.4
vispy-0.14.0pip install foronoi
Successfully installed foronoi-1.0.3
graphviz-0.20.1pip install networkx
Successfully installed networkx-3.1
Kept a list of all packages installed:
pip list
Package Versionabsl-py 2.0.0
affine 2.4.0
attrs 23.1.0
certifi 2023.7.22
click 8.1.7
click-plugins 1.1.1
cligj 0.7.2
colorama 0.4.6
cssselect2 0.7.0
cycler 0.12.0
deprecation 2.1.0
dill 0.3.7
ezdxf 1.1.0
fonttools 4.42.1
foronoi 1.0.3
freetype-py 2.4.0
GDAL 3.4.3
graphviz 0.20.1
hsluv 5.0.4
kiwisolver 1.4.5
lxml 4.9.3
matplotlib 3.5.2
msvc-runtime 14.29.30133
networkx 3.1
numpy 1.26.0
ortools 9.7.2996
packaging 23.1
pikepdf 8.4.1
Pillow 10.0.1
pip 21.3.1
protobuf 4.24.3
PyOpenGL 3.1.7
pyparsing 3.1.1
pypng 0.20220715.0
PyQt6 6.5.2
PyQt6-Qt6 6.5.2
PyQt6-sip 13.5.2
pyserial 3.5
python-dateutil 2.8.2
pywin32 306
qrcode 7.4.2
rasterio 1.2.10
reportlab 4.0.5
Rtree 1.0.0
setuptools 60.5.0
Shapely 1.8.2
simplejson 3.19.1
six 1.16.0
snuggs 1.4.7
sqlite-bro 0.12.1
svg.path 6.3
svglib 1.5.1
tinycss2 1.2.1
typing_extensions 4.8.0
vispy 0.14.0
webencodings 0.5.1
wheel 0.37.1
winpython 4.6.20220116 -
Hi,
Using the sources bundle link that I’ve posted above, you can also use the latest version of WinPython, one based on Python 3.11.x.
The error you get is because you use the Shapely 1.8.2 package. Upgrade that package using the Command Prompt and typing:
pip install --upgrade shapely
In the end you should have a 2.x version of Shapely.PS:
I have never used the WinPython Control Panel so I can’t tell you why it crashed.
Using the sources you will launch what will eventually be FlatCAM EVO so you don’t need to have FlatCAM 8.994 installed on your system. -
reporter Thank you very much Marius!
Updated to Shapely v2.0.1
python flatcam.py
ModuleNotFoundError: No module named 'qdarktheme'
pip install pyqtdarktheme
Successfully installed darkdetect-0.7.1
pyqtdarktheme-2.1.0python flatcam.py
ModuleNotFoundError: No module named ‘qdarktheme.themes'Can’t find any link in google that says how to install the light and dark themes. So I did what they did here and commented out those lines.
https://aur.archlinux.org/packages/flatcam-qt6#comment-848387
but I would much have preferred to install whatever module I am still missing.... Resistance is futile. You will be assimilated ...
-
reporter Should I remain on Python 3.9.10.0dot?
Or should I reinstall with v3.11.4.0dot?
What do you recommend so that I don’t get stuck on some compatibility issue down the road?
-
- changed status to open
-
Hi,
I think you should use WinPython based on Python 3.11.x, it is a little better in term of performance.In regards of the
pyqtdarktheme
package, it is always a good thing to look in therequirements.txt
file in the sources.
It is not always updated but it may give you hints.So in the case of
pyqtdarktheme
do this:
pip install pyqtdarktheme==1.1.1
The latter versions of this package changed too much the package and I preferred to keep using this older version.
-
reporter Excellent (Mr Burns voice)
Darktheme corrected, restored original AppMain.py and I’m a happy camper.
:) -
reporter As a thank you for all this, I’ve added a comment in your video. I tried to document all the packages required, without getting into all the details and reasons so they still have to listen to your video.
Hopefully the next guy like me with ZERO Python or Bitbucket knowledge will find things a tad easier.
Cheers! ;)
- Log in to comment
I forgot to show what I have in my FlatCAM folder.
Also, I installed Winpython64-3.11.4.0.
(I’m having problems uploading images, so forgive me if my comment comes out all screwed up with multiple image copies)