qnngroup / qnngds

MIT License
5 stars 3 forks source link

increase precision of nTron union #79

Closed reed-foster closed 4 months ago

reed-foster commented 4 months ago

Default 1e-4 precision for pg.union can cause the (high-precision) ports to not be aligned with the new (low-precision) union'd device. This is bad because it can cause gaps when the nTron is connected to another device by the port.

I increased the precision of the union to 1e-6, and also added some code to offset the port by the minimum amount required to ensure it's inside of the device (assuming pg.union's precision is used to perform nearest-integer rounding instead of just truncation)