Skip to content

Gerbv incorrectly rounds aperture coordinates in fast render mode #167

@jaseg

Description

@jaseg

In fast render mode, gerbv currently seemingly rounds the screen space coordinates of rendered apertures to the pixel grid based on the top, left corner of the aperture's bounding box. This leads to artifacts where several apertures flashed at the same location are not always rendered concentric with each other when their bounding boxes are different. Ideally, when gerbv needs to round coordinates of an aperture, it should round based on the aperture's origin, which for everything except for aperture macros is the aperture's center.

An example where this rounding error is especially visible is a standard THT pad at low zoom as shown in the example below. At high zoom, the holes are correctly rendered centered on the pads. At low zoom, instead, the holes are rendered shifted to the top, left corner of the pad's bounding box.

Example screenshot at low zoom with the holes rendered shifted:
Screenshot from 2023-04-05 13-18-04

Example screenshot at high zoom with the holes rendered concentric:
Screenshot from 2023-04-05 13-18-10

gerbv version: Version 2.9.5 Compiled on Nov 29 2022 at 23:22:25, from the Archlinux package repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions