question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to load .gdo gerber files

See original GitHub issue

Tried to upload a set of Gerber Files exported from Mentor PADS (extension .gdo).

Error I get is: Uncaught TypeError: Cannot read property 'type' of undefined from _pad-shape.js:239

Those few lines of code:

var runMacro = function(mods, blocks) {
  var emptyMacro = {shape: [], box: boundingBox.new()}
  var exposure = 1

  blocks = blocks || []

  return blocks.reduce(function(result, block) {
    var shapeAndBox

    if (block.type !== 'variable' && block.type !== 'comment') {

Line 239 is the last line^, looks like block is undefined… not sure if there needs to be some type of parsing adding for Mentor files, or if there just needs to be a check that returns from the function if block===undefined

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mehulmshahcommented, Apr 29, 2021

@kasbah Adding that check prevents the error and allows the gerbers to render. Now the issue is that the gerbers are rendered slightly incorrectly (but this is at least better than the code breaking!)

I have found the issue for my gerber set – the gerber specifies G74* (Disable 360° circular interpolation (single quadrant)) When I change that to G75* (Enable 360° circular interpolation (multiquadrant)), the Gerber renders correctly. Maybe this is something that needs to be added into Gerber Settings? I’ll look into how easy that is and if I can just make a PR.

0reactions
mehulmshahcommented, Apr 29, 2021

Ah yeah you’re correct, I think #82 is the more relevant one. I emailed you & @kasbah the files for this issue if you wanted to take a closer look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gerber Files Fail to Load - V-One - Voltera
If your files fail to load, it's very likely that the Gerber files don't conform to the gerber standard. Check your export settings...
Read more >
Common Gerber File Issues, and How to Fix Them - Bittele
1 – Missing Board Outline​​ The board outline is perhaps the most simple and straightforward piece of your Gerber files, but it is...
Read more >
Developers - Fails to load .gdo gerber files - - Bountysource
Tried to upload a set of Gerber Files exported from Mentor PADS (extension .gdo). Error I get is: Uncaught TypeError: Cannot read property...
Read more >
Some Gerber files do not load | Flatcam - Muut
More importantly, it does not allow copper removal, which is sometimes very handy. So I installed Alpha 5 on my Windows machine and...
Read more >
Gerber Output Problem - KiCad.info Forums
The problem may be in files you did not submit. You might try them on the Reference Gerber Viewer and see if it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found