Skip to content

Commit 5b0a811

Browse files
committed
fixing #62, round spacing after multiplying by grid_steps_per_unit
1 parent 96cfe54 commit 5b0a811

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gdshelpers/export/gdsii_export.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ def _cell_to_gdsii_binary(cell, grid_steps_per_unit, max_points, max_line_points
7979
np.array(ref['origin']) * grid_steps_per_unit).astype(
8080
'>i4').tobytes()) # XY INTEGER_8 origin
8181
if aref:
82-
b.write((np.round(np.array((ref['spacing'][0] * ref['columns'], 0)) +
83-
np.array(ref['origin'])) * grid_steps_per_unit).astype(
82+
b.write((np.round((np.array((ref['spacing'][0] * ref['columns'], 0)) +
83+
np.array(ref['origin'])) * grid_steps_per_unit)).astype(
8484
'>i4').tobytes()) # XY INTEGER_8 edge_x
85-
b.write((np.round(np.array((0, ref['spacing'][1] * ref['rows'])) +
86-
np.array(ref['origin'])) * grid_steps_per_unit).astype(
85+
b.write((np.round((np.array((0, ref['spacing'][1] * ref['rows'])) +
86+
np.array(ref['origin'])) * grid_steps_per_unit)).astype(
8787
'>i4').tobytes()) # XY INTEGER_8 edge_y
8888

8989
b.write(pack('>2H', 4, 0x1100)) # ENDEL NO_DATA

0 commit comments

Comments
 (0)