mirror of https://github.com/KLayout/klayout.git
OASIS reader: avoiding slight rounding of DBU In python read/write cycle (discussion-2526)
This commit is contained in:
parent
4e430ff38f
commit
b32329c920
|
|
@ -42,7 +42,6 @@ namespace db
|
||||||
OASISReader::OASISReader (tl::InputStream &s)
|
OASISReader::OASISReader (tl::InputStream &s)
|
||||||
: m_stream (s),
|
: m_stream (s),
|
||||||
m_progress (tl::to_string (tr ("Reading OASIS file")), 10000),
|
m_progress (tl::to_string (tr ("Reading OASIS file")), 10000),
|
||||||
m_dbu (0.001),
|
|
||||||
m_expect_strict_mode (-1),
|
m_expect_strict_mode (-1),
|
||||||
mm_repetition (this, "repetition"),
|
mm_repetition (this, "repetition"),
|
||||||
mm_placement_cell (this, "placement-cell"),
|
mm_placement_cell (this, "placement-cell"),
|
||||||
|
|
@ -648,8 +647,7 @@ OASISReader::do_read (db::Layout &layout)
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute database unit in pixel per meter
|
// compute database unit in pixel per meter
|
||||||
m_dbu = 1.0e-6 / res;
|
layout.dbu (1.0 / res);
|
||||||
layout.dbu (m_dbu * 1e6);
|
|
||||||
|
|
||||||
// read over table offsets if required
|
// read over table offsets if required
|
||||||
bool table_offsets_at_end = get_uint ();
|
bool table_offsets_at_end = get_uint ();
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,6 @@ private:
|
||||||
tl::InputStream &m_stream;
|
tl::InputStream &m_stream;
|
||||||
tl::AbsoluteProgress m_progress;
|
tl::AbsoluteProgress m_progress;
|
||||||
std::string m_cellname;
|
std::string m_cellname;
|
||||||
double m_dbu;
|
|
||||||
int m_expect_strict_mode;
|
int m_expect_strict_mode;
|
||||||
size_t m_first_cellname;
|
size_t m_first_cellname;
|
||||||
size_t m_first_propname;
|
size_t m_first_propname;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue