heitzmann / gdspy

Python module for creating GDSII stream files, usually CAD layouts.
Boost Software License 1.0
352 stars 128 forks source link

Update library.py #239

Closed gillenhaalb closed 4 months ago

gillenhaalb commented 7 months ago

UNITS block set the scaling "factor", but was positioned below the XY block. So the XY block was using the default factor value of 1. Default GDS values lead to factor=0.001, and with this not being accounted for in each XY element, GDSs in microns were suddenly scaled up to mm.

heitzmann commented 7 months ago

I don't see how the block being moved inside the series of if/else clauses will have any impact. What matters is the order in which the data is stored in the GDSII file being loaded.