Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing of Outline #365

Open
dottenbr opened this issue Jun 9, 2021 · 3 comments
Open

Incorrect parsing of Outline #365

dottenbr opened this issue Jun 9, 2021 · 3 comments
Labels
board-shape Issues related to incorrect board shapes

Comments

@dottenbr
Copy link
Contributor

dottenbr commented Jun 9, 2021

This is the outline layer I have

Bildschirmfoto 2021-06-09 um 13 07 58

This is what tracespace turns it into

Bildschirmfoto 2021-06-09 um 13 06 13

This is the file

buggy.GM1.zip

@mcous
Copy link
Member

mcous commented Jun 10, 2021

I can get the board to render correctly if I set the gap fill setting to 3.6 mm. For looking at the outline layer and making the line thickness smaller in the dev tools, there looks to be some fairly sizable gaps between the endpoints of the corner arcs and the line segments.

Screen Shot 2021-06-10 at 16 00 37

tracespace's board outline parsing is really naive; it only really works if all the individual segments of the outline layer line up. It cannot account for gaps this large with its default settings.

@dottenbr
Copy link
Contributor Author

Thank you for this super quick response. I wonder, does such a high gap fill setting cause other unintended effects? Maybe the default could be increased then.

This is a serious issue with the Gerber format in general that it can be sometimes a bid janky.

As a team we will think if we can come up with a good proposal of how this could be improved.

At least I know what to do when this happens.

@mcous mcous added the board-shape Issues related to incorrect board shapes label Jan 22, 2023
@mcous
Copy link
Member

mcous commented Jan 22, 2023

Testing with the new board shape plotter in @tracespace/core@next. With the (completely arbitrary) default settings, this board still does not render properly.

Gaps:

  • gap of 0.03999999999999915 between 26.989,23.5 and 26.949,23.5
  • gap of 0.09999999999999787 between 26.989,0 and 27.089,0
  • gap of 0.13899999999999935 between 16.951,37.745 and 17.09,37.745
  • gap of 7.369883920388437 between 26.949,23.5 and 21.519,18.517
  • gap of 0.05800000000000005 between 1.042,0 and 1.1,0
  • gap of 0.08584287972802494 between 16.078,36.83 and 16.09,36.745
  • gap of 1.4142135623730951 between 16.09,36.745 and 17.09,37.745
  • gap of 5.9559999999999995 between 27.089,0 and 21.133,0
  • gap of 20.032999999999998 between 1.1,0 and 21.133,0
Full outline plot
{
  "regions": [
    {
      "type": "imageRegion",
      "segments": [
        {
          "type": "arc",
          "start": [
            21.519,
            18.517,
            0
          ],
          "end": [
            21.519,
            18.517,
            6.283185307179586
          ],
          "center": [
            20.573999999999998,
            18.517
          ],
          "radius": 0.945
        }
      ]
    }
  ],
  "openPaths": [
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "arc",
          "start": [
            28.008,
            22.481,
            0
          ],
          "end": [
            26.989,
            23.5,
            1.5707963267948966
          ],
          "center": [
            26.989,
            22.481
          ],
          "radius": 1.019
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "line",
          "start": [
            28.008,
            22.481
          ],
          "end": [
            28.008,
            1.019
          ]
        },
        {
          "type": "arc",
          "start": [
            28.008,
            1.019,
            0
          ],
          "end": [
            26.989,
            0,
            -1.5707963267948966
          ],
          "center": [
            26.989,
            1.019
          ],
          "radius": 1.019
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "arc",
          "start": [
            24.451,
            36.745,
            0
          ],
          "end": [
            23.451,
            37.745,
            1.5707963267948966
          ],
          "center": [
            23.451,
            36.745
          ],
          "radius": 1
        },
        {
          "type": "line",
          "start": [
            23.451,
            37.745
          ],
          "end": [
            16.951,
            37.745
          ]
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "line",
          "start": [
            24.451,
            36.745
          ],
          "end": [
            24.451,
            23.5
          ]
        },
        {
          "type": "line",
          "start": [
            24.451,
            23.5
          ],
          "end": [
            26.949,
            23.5
          ]
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "arc",
          "start": [
            0.008,
            1.034,
            3.141592653589793
          ],
          "end": [
            1.042,
            0,
            4.71238898038469
          ],
          "center": [
            1.042,
            1.034
          ],
          "radius": 1.034
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "line",
          "start": [
            0.008,
            1.034
          ],
          "end": [
            0.008,
            22.466
          ]
        },
        {
          "type": "arc",
          "start": [
            0.008,
            22.466,
            3.141592653589793
          ],
          "end": [
            1.042,
            23.5,
            1.5707963267948966
          ],
          "center": [
            1.042,
            22.466
          ],
          "radius": 1.034
        },
        {
          "type": "line",
          "start": [
            1.042,
            23.5
          ],
          "end": [
            16.078,
            23.5
          ]
        },
        {
          "type": "line",
          "start": [
            16.078,
            23.5
          ],
          "end": [
            16.078,
            36.618
          ]
        },
        {
          "type": "line",
          "start": [
            16.078,
            36.618
          ],
          "end": [
            16.078,
            36.83
          ]
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "arc",
          "start": [
            17.09,
            37.745,
            1.5707963267948966
          ],
          "end": [
            16.09,
            36.745,
            3.141592653589793
          ],
          "center": [
            17.09,
            36.745
          ],
          "radius": 1
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "line",
          "start": [
            21.133,
            0
          ],
          "end": [
            27.089,
            0
          ]
        }
      ]
    },
    {
      "type": "imagePath",
      "width": 0,
      "segments": [
        {
          "type": "line",
          "start": [
            21.133,
            0
          ],
          "end": [
            20.65,
            0.483
          ]
        },
        {
          "type": "line",
          "start": [
            20.65,
            0.483
          ],
          "end": [
            10.719,
            0.483
          ]
        },
        {
          "type": "line",
          "start": [
            10.719,
            0.483
          ],
          "end": [
            10.236,
            0
          ]
        },
        {
          "type": "line",
          "start": [
            10.236,
            0
          ],
          "end": [
            1.1,
            0
          ]
        }
      ]
    }
  ],
  "size": [
    19.628999999999998,
    17.572,
    21.519,
    19.462
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board-shape Issues related to incorrect board shapes
Projects
None yet
Development

No branches or pull requests

2 participants