mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-02 02:47:48 +02:00
Enhancements to implementation
- OASIS layers are turned into pure layer name (not lxdy_name) for MAG output - Boxes of instances had been incorrect - consistent naming of cell files in presence of special chars
This commit is contained in:
@@ -399,7 +399,10 @@ MAGReader::do_merge_part (Layout &layout, cell_index_type cell_index)
|
||||
db::ShapeProcessor sp;
|
||||
if (tl::verbosity () >= 40) {
|
||||
sp.enable_progress (tl::to_string (tr ("Merging shapes for MAG reader")));
|
||||
} else {
|
||||
sp.disable_progress ();
|
||||
}
|
||||
sp.set_base_verbosity (40);
|
||||
|
||||
std::vector<db::Text> saved_texts;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void
|
||||
MAGWriter::write (db::Layout &layout, tl::OutputStream &stream, const db::SaveLayoutOptions &options)
|
||||
{
|
||||
std::vector <std::pair <unsigned int, db::LayerProperties> > layers;
|
||||
options.get_valid_layers (layout, layers, db::SaveLayoutOptions::LP_AssignName);
|
||||
options.get_valid_layers (layout, layers, db::SaveLayoutOptions::LP_AssignNameWithPriority);
|
||||
|
||||
std::set <db::cell_index_type> cell_set;
|
||||
options.get_cells (layout, cell_set, layers);
|
||||
@@ -102,9 +102,9 @@ MAGWriter::filename_for_cell (db::cell_index_type ci, db::Layout &layout)
|
||||
{
|
||||
tl::URI uri (m_base_uri);
|
||||
if (uri.path ().empty ()) {
|
||||
uri.set_path (std::string (layout.cell_name (ci)) + "." + m_ext);
|
||||
uri.set_path (make_string (layout.cell_name (ci)) + "." + m_ext);
|
||||
} else {
|
||||
uri.set_path (uri.path () + "/" + std::string (layout.cell_name (ci)) + "." + m_ext);
|
||||
uri.set_path (uri.path () + "/" + make_string (layout.cell_name (ci)) + "." + m_ext);
|
||||
}
|
||||
return uri.to_string ();
|
||||
}
|
||||
@@ -320,7 +320,7 @@ MAGWriter::write_single_instance (db::cell_index_type ci, db::ICplxTrans trans,
|
||||
db::Vector d = scaled (trans.disp ());
|
||||
os << "transform " << m.m11 () << " " << m.m12 () << " " << d.x () << " " << m.m21 () << " " << m.m22 () << " " << d.y () << "\n";
|
||||
|
||||
db::Box bx = scaled (trans * layout.cell (ci).bbox ());
|
||||
db::Box bx = scaled (layout.cell (ci).bbox ());
|
||||
os << "box " << bx.left () << " " << bx.bottom () << " " << bx.right () << " " << bx.top () << "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user