Comments (13)
P.S. I just wanted to say that what you have done if F8ciking awesome. Honestly, in such a short time a whole API that renders the gerber format is a really great achievement! There is a lack of tools around this technology so, I'm really stoked that you are developing. :)
P.P.S I hope that you don't mind the shameless 'inspiration' that I took from the pygerber logo for diffgerber project.
from pygerber.
I will try to reproduce it, but possible fixes will be included in PyGerber 2.1.0, as we have to release 2.0.0 version soon.
from pygerber.
Hey,
Just to say, pygerber is doing great things! I will show the current setup off at KiCon this weekend - I mention pygerber 1.0 and 2.0 and your name - I hope that's ok.
If the talk is online I'll send you a link. I have realized that the issue with rendering at least two things (some of which I think you will be aware of) - in the second example the pads disappear, I think that the rounded rectangles aren't implemented yet (or subroutines?) I also get lots of warnings in the command line:
WARNING:root:Created region with no boundaries.
Searching the code for this warning, I see that it is when it hits 'G37', e.g. :
G37* %TD.AperFunction*% %TA.AperFunction,Conductor*%
AperFunction is defined elsewhere in the gerber file. So I think that this might be because we haven't got to subroutines or something?
I've uploaded a second example in diffgerber (https://github.com/ajw287/diffgerber/tree/main/examples) if you open the 'front copper' layer, you can see that most pads aren't rendered, the PCB was output from kicad.
from pygerber.
I noticed this difference in rendering between the pygerber and the same gerber viewed in KiCAD gerber viewer. I don't know if the KiCAD gerber viewer is specifically removing these artifacts or something, but I thought I'd draw your attention to it as PCB designers look out for these kinds of artefacts (and remove them) as they can be caused during layout .
I will temporarily aid that by shrinking circle sizes by one pixel in each direction, it seems to look good afterwards:
from pygerber.
This demo gerber file shows another render oddity, seems like keepout isn't right. Here I'm rendering the images at 400 dpi. Sorry for all the messages - just excited about getting pygerber 2.0.0 out there in the best light :D
from pygerber.
IMO those artifacts are caused by low DPI and therefore low precision. You are comparing low DPI rasterized image to high DPI vector image. Try rendering with DPI like 1000 or 2000.
from pygerber.
The first one was rendered at 1400, I'm pretty sure artefacts are real, but it would be useful if you could reproduce this. It is the original demo gerber for pygerber. The second one is at 400dpi, but the keepouts around the tracks are very different sizes.
from pygerber.
I have realized that the issue with rendering at least two things (some of which I think you will be aware of) - in the second example the pads disappear, I think that the rounded rectangles aren't implemented yet (or subroutines?)
Indeed there are at least two separate problems. I will create separate issues for each of them. Problem visible on first set of images probably has to do with sizing of apertures and position rounding, while the second may consist of region boundary drawing. However I have to check first how it interacts with DPI changes.
I also get lots of warnings in the command line:
WARNING:root:Created region with no boundaries.
Searching the code for this warning, I see that it is when it hits 'G37', e.g. :
G37* %TD.AperFunction*% %TA.AperFunction,Conductor*%
AperFunction is defined elsewhere in the gerber file. So I think that this might be because we haven't got to subroutines or something?
This error is showing up because between G36 and G37 (start and end of region) there were no line draws, which makes this region invalid. It is possible that line draws in this region were not correctly recognized though.
I've uploaded a second example in diffgerber (https://github.com/ajw287/diffgerber/tree/main/examples) if you open the 'front copper' layer, you can see that most pads aren't rendered, the PCB was output from kicad.
Could you please create clean list of what images are outputs from what gerber files? Preferably with links to both images and gerber files. For now it's a bit ambigous and I'm having hard time to match them.
from pygerber.
Just to say, pygerber is doing great things! I will show the current setup off at KiCon this weekend - I mention pygerber 1.0 and 2.0 and your name - I hope that's ok.
I'm happy to hear that, It would be great.
from pygerber.
I have managed to fix second issue with (#37), but first one is not responding to precision changes which is a bit odd. I don't yet know how to fix it and it seems unlikely that I will be able to discover it soon. For now fix for first issue is going to be included in 2.0.1 release and this issue will remain open until first part is fixed.
from pygerber.
This demo gerber file shows another render oddity, seems like keepout isn't right. Here I'm rendering the images at 400 dpi. Sorry for all the messages - just excited about getting pygerber 2.0.0 out there in the best light :D
As for this case (missing rounded rectangles part), unfortunately it will not fully work for now as macros are not yet implemented, I will try to implement them in 2.1.0
from pygerber.
I am not sure if I should also shrink other apertures similarly to circle and if this shrinking shouldn't be applied in millimeters instead of pixels.
from pygerber.
Hi, I have discovered why WARNING:root:Created region with no boundaries.
warnings were shown, fixed it in #55.
from pygerber.
Related Issues (20)
- Parser - Deprecated Gerber Features
- Rasterized2DBackend
- Macro support
- Add basic Block Aperture (AB) support HOT 1
- Progress with pygerber HOT 9
- Region support
- Release 2.0.0 checklist
- Add region handling of boundary points from arc HOT 2
- Image coloring according to scheme
- Create Gerber code pretty formatter
- Create Gerber code minifier HOT 2
- Image from Rasterized2DLayer.render/Layer HOT 5
- No module named 'pygerber.gerberx3.api.color_scheme' HOT 7
- Add file type recognition from file attributes
- Incorrect rendering of single quadrant arc
- Add file type recognition from file extension
- Drawing with 0 surface apertures may still create lines HOT 3
- Add public stable API for providing callbacks to Gerber parser
- Create Gerber Optimizer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygerber.