Giter Site home page Giter Site logo

Comments (13)

ajw287 avatar ajw287 commented on June 14, 2024 1

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.

Argmaster avatar Argmaster commented on June 14, 2024 1

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.

ajw287 avatar ajw287 commented on June 14, 2024 1

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.

Argmaster avatar Argmaster commented on June 14, 2024 1

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 .

drawing_gerbers-highlght drawing_gerbers

I will temporarily aid that by shrinking circle sizes by one pixel in each direction, it seems to look good afterwards:

output

from pygerber.

ajw287 avatar ajw287 commented on June 14, 2024

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

render_diff
test_gerbers.tar.gz

from pygerber.

Argmaster avatar Argmaster commented on June 14, 2024

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.

ajw287 avatar ajw287 commented on June 14, 2024

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.

Argmaster avatar Argmaster commented on June 14, 2024

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.

Argmaster avatar Argmaster commented on June 14, 2024

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.

Argmaster avatar Argmaster commented on June 14, 2024

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.

Argmaster avatar Argmaster commented on June 14, 2024

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

render_diff test_gerbers.tar.gz

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.

Argmaster avatar Argmaster commented on June 14, 2024

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.

Argmaster avatar Argmaster commented on June 14, 2024

Hi, I have discovered why WARNING:root:Created region with no boundaries. warnings were shown, fixed it in #55.

from pygerber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.