diff --git a/src/db/db/dbDeepRegion.cc b/src/db/db/dbDeepRegion.cc index 1ab9d322e..6c2e2fe53 100644 --- a/src/db/db/dbDeepRegion.cc +++ b/src/db/db/dbDeepRegion.cc @@ -252,8 +252,8 @@ static void transform_deep_layer (db::DeepLayer &deep_layer, const Trans &t) // Plain move - // build cell variants for different orientations - db::OrientationReducer same_orientation; + // build cell variants for different orientations and magnifications + db::MagnificationAndOrientationReducer same_orientation; db::VariantsCollectorBase vars (&same_orientation); vars.collect (deep_layer.layout (), deep_layer.initial_cell ()); diff --git a/src/db/unit_tests/dbDeepRegionTests.cc b/src/db/unit_tests/dbDeepRegionTests.cc index 45e449621..5bdeaadd3 100644 --- a/src/db/unit_tests/dbDeepRegionTests.cc +++ b/src/db/unit_tests/dbDeepRegionTests.cc @@ -2779,6 +2779,37 @@ TEST(issue_400_with_region) db::compare_layouts (_this, ly, tl::testdata () + "/algo/deep_region_au400c.gds"); } +TEST(deep_region_transform_with_scaled) +{ + db::Layout ly; + { + std::string fn (tl::testdata ()); + fn += "/algo/deep_region_transform_with_scaled.gds"; + tl::InputStream stream (fn); + db::Reader reader (stream); + reader.read (ly); + } + + db::cell_index_type top_cell_index = *ly.begin_top_down (); + db::Cell &top_cell = ly.cell (top_cell_index); + + db::DeepShapeStore dss; + + for (db::Layout::layer_iterator l = ly.begin_layers (); l != ly.end_layers (); ++l) { + + unsigned int li = (*l).first; + db::Region r (db::RecursiveShapeIterator (ly, top_cell, li), dss); + r.transform (db::Trans (db::Vector (10000, 0))); + + ly.clear_layer (li); + r.insert_into (&ly, top_cell_index, li); + + } + + CHECKPOINT(); + db::compare_layouts (_this, ly, tl::testdata () + "/algo/deep_region_transform_with_scaled_au.gds"); +} + TEST(issue_663_separation_from_inside) { db::Layout ly; diff --git a/src/lay/lay/TechMacrosPage.ui b/src/lay/lay/TechMacrosPage.ui index aa4143759..309c02894 100644 --- a/src/lay/lay/TechMacrosPage.ui +++ b/src/lay/lay/TechMacrosPage.ui @@ -1,7 +1,8 @@ - + + TechMacrosPage - - + + 0 0 @@ -9,94 +10,86 @@ 492 - + Form - - - 9 - - + + 6 + + 9 + - - - - 5 - 0 + + + 0 0 - + %CAT_DESC% - - - - 5 - 5 + + + 0 1 - + QFrame::NoFrame - + QFrame::Raised - - - 0 - - + + 6 + + 0 + - - + + Qt::Horizontal - - - - 5 - 7 + + + 0 0 - - - - 5 - 5 + + + 3 0 - + QFrame::NoFrame - + QFrame::Raised - - - 0 - - + + 6 + + 0 + - - + + QTextEdit::NoWrap @@ -109,70 +102,68 @@ - - - <html><body><span style=" font-weight:600;">Note</span>: to edit, add or delete scripts, use the macro development facility in "Tools/Macro Development" or "Tools/Verification/DRC/Edit DRC Scripts". You will find a branch for this technology there.</p></body></html> + + + <html><body><span style=" font-weight:600;">Note</span>: to edit, add or delete scripts, use the macro development facility in "Tools/Macro Development". You will find a branch for this technology there.</p></body></html> - + true - - - - 5 - 5 + + + 0 0 - - <html><body><span style=" font-weight:600;">Note</span>: this page is empty because no valid base path is set.<br/>Select a base path on the "General" page to establish one.</p></body></html> + + <html><body><span style=" font-weight:600;">Note</span>: this page is empty because no valid base path is set.<br/>Select a base path on the "General" page to establish one.</p></body></html> - + Qt::AlignCenter - + true - - + + 16 200 - + QFrame::NoFrame - + QFrame::Raised - - + + 0 - + 6 - - - + + + Create Folder Now - + - + Qt::Horizontal - + 211 20 @@ -180,12 +171,12 @@ - + - + Qt::Horizontal - + 231 20 @@ -193,12 +184,12 @@ - + - + Qt::Vertical - + 651 40 @@ -206,12 +197,12 @@ - + - + Qt::Vertical - + 671 40 @@ -219,23 +210,21 @@ - - - - - 5 - 5 + + + + 0 0 - - <html><body><span style=" font-weight:600;">Note</span>: this page is empty, because the corresponding macro folder</p><p style=" margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><i>%BASE_PATH%/%CAT%</i></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">cannot be found or is not accessible.</p></body></html> + + <html><body><span style=" font-weight:600;">Note</span>: this page is empty, because the corresponding macro folder</p><p style=" margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><i>%BASE_PATH%/%CAT%</i></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">cannot be found or is not accessible.</p></body></html> - + Qt::AlignCenter - + true @@ -244,15 +233,15 @@ - - - <html><body> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Note</span>: this page is empty, because the macro location is shared by a different macro site (specifically "<i>%ALT_DESC%</i>"). Such a site cannot be made technology specific. Choose a base path that points to a different location.</p></body></html> + + + <html><body> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Note</span>: this page is empty, because the macro location is shared by a different macro site (specifically "<i>%ALT_DESC%</i>"). Such a site cannot be made technology specific. Choose a base path that points to a different location.</p></body></html> - + Qt::AlignCenter - + true diff --git a/src/lay/lay/layMacroEditorDialog.cc b/src/lay/lay/layMacroEditorDialog.cc index bf8c9ed03..1d0a53711 100644 --- a/src/lay/lay/layMacroEditorDialog.cc +++ b/src/lay/lay/layMacroEditorDialog.cc @@ -2790,7 +2790,7 @@ BEGIN_PROTECTED std::string new_path = tl::to_string (QFileInfo (new_dir).absoluteFilePath ()); paths.push_back (std::make_pair (new_path, cat)); - lym::MacroCollection *c = mp_root->add_folder (tl::to_string (QObject::tr ("Project")) + " - " + new_path, new_path, cat, false); + lym::MacroCollection *c = mp_root->add_folder (tl::to_string (QObject::tr ("Project")) + " - " + new_path, new_path, cat, false /* writeable */, false /* do not auto-create folders */); if (!c) { throw tl::Exception (tl::to_string (QObject::tr ("The selected directory is already installed as custom location"))); } diff --git a/src/lym/lym/lymMacroCollection.cc b/src/lym/lym/lymMacroCollection.cc index 39a9c9deb..c55f71ba6 100644 --- a/src/lym/lym/lymMacroCollection.cc +++ b/src/lym/lym/lymMacroCollection.cc @@ -262,7 +262,7 @@ MacroCollection::make_readonly (bool f) } MacroCollection * -MacroCollection::add_folder (const std::string &description, const std::string &p, const std::string &cat, bool readonly, bool force_create) +MacroCollection::add_folder (const std::string &description, const std::string &p, const std::string &cat, bool readonly, bool auto_create) { if (! p.empty () && p[0] == ':') { @@ -278,7 +278,7 @@ MacroCollection::add_folder (const std::string &description, const std::string & if (! tl::file_exists (fp)) { // Try to create the folder since it does not exist yet or skip that one - if (! force_create) { + if (readonly || ! auto_create) { if (tl::verbosity () >= 20) { tl::log << tl::to_string (tr ("Folder does not exist - skipping: ")) << fp; @@ -831,7 +831,7 @@ void MacroCollection::reload (bool safe) lym::MacroCollection new_collection; for (lym::MacroCollection::child_iterator c = begin_children (); c != end_children (); ++c) { - new_collection.add_folder (c->second->description (), c->second->path (), c->second->category (), c->second->is_readonly (), false /* don't force to create */); + new_collection.add_folder (c->second->description (), c->second->path (), c->second->category (), c->second->is_readonly (), false /* don't auto-create folder */); } // and synchronize current with the actual one diff --git a/src/lym/lym/lymMacroCollection.h b/src/lym/lym/lymMacroCollection.h index 850a24c76..60c779bc5 100644 --- a/src/lym/lym/lymMacroCollection.h +++ b/src/lym/lym/lymMacroCollection.h @@ -89,7 +89,7 @@ public: * If force_create is true (the default), the folder will be created if it does not * exist yet. On error, 0 is returned. */ - MacroCollection *add_folder (const std::string &description, const std::string &path, const std::string &category, bool readonly, bool force_create = true); + MacroCollection *add_folder (const std::string &description, const std::string &path, const std::string &category, bool readonly, bool auto_create = true); /** * @brief Gets the category tag of the collection diff --git a/testdata/algo/deep_region_transform_with_scaled.gds b/testdata/algo/deep_region_transform_with_scaled.gds new file mode 100644 index 000000000..7bd4b1a0f Binary files /dev/null and b/testdata/algo/deep_region_transform_with_scaled.gds differ diff --git a/testdata/algo/deep_region_transform_with_scaled_au.gds b/testdata/algo/deep_region_transform_with_scaled_au.gds new file mode 100644 index 000000000..278bc5a93 Binary files /dev/null and b/testdata/algo/deep_region_transform_with_scaled_au.gds differ