mirror of https://github.com/KLayout/klayout.git
Merge branch 'master' into devel
This commit is contained in:
commit
73dc31244a
|
|
@ -56,7 +56,7 @@ jobs:
|
||||||
HOST_CCACHE_DIR="$(ccache -k cache_dir)"
|
HOST_CCACHE_DIR="$(ccache -k cache_dir)"
|
||||||
mkdir -p $HOST_CCACHE_DIR
|
mkdir -p $HOST_CCACHE_DIR
|
||||||
- name: Build wheels # check https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions
|
- name: Build wheels # check https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions
|
||||||
uses: pypa/cibuildwheel@v2.21.3
|
uses: pypa/cibuildwheel@v2.22.0
|
||||||
# to supply options, put them in 'env', like:
|
# to supply options, put them in 'env', like:
|
||||||
# env:
|
# env:
|
||||||
# CIBW_SOME_OPTION: value
|
# CIBW_SOME_OPTION: value
|
||||||
|
|
@ -103,7 +103,7 @@ jobs:
|
||||||
name: artifact
|
name: artifact
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@v1.11.0
|
- uses: pypa/gh-action-pypi-publish@v1.12.3
|
||||||
continue-on-error: true # might fail if we don't bump the version
|
continue-on-error: true # might fail if we don't bump the version
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
|
|
@ -120,7 +120,7 @@ jobs:
|
||||||
name: artifact
|
name: artifact
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@v1.11.0
|
- uses: pypa/gh-action-pypi-publish@v1.12.3
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.pypi_password }}
|
password: ${{ secrets.pypi_password }}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 203 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 201 KiB |
|
|
@ -192,7 +192,7 @@ RubySequoia = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions
|
||||||
# install with 'sudo port install ruby33'
|
# install with 'sudo port install ruby33'
|
||||||
# [Key Type Name] = 'MP33'
|
# [Key Type Name] = 'MP33'
|
||||||
Ruby33MacPorts = { 'exe': '/opt/local/bin/ruby3.3',
|
Ruby33MacPorts = { 'exe': '/opt/local/bin/ruby3.3',
|
||||||
'inc': '/opt/local/include/ruby-3.3.5',
|
'inc': '/opt/local/include/ruby-3.3.6',
|
||||||
'lib': '/opt/local/lib/libruby.3.3.dylib'
|
'lib': '/opt/local/lib/libruby.3.3.dylib'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1258,7 +1258,7 @@ AsIfFlatRegion::sized (coord_type dx, coord_type dy, unsigned int mode) const
|
||||||
|
|
||||||
// simplified handling for a box
|
// simplified handling for a box
|
||||||
db::Box b = bbox ().enlarged (db::Vector (dx, dy));
|
db::Box b = bbox ().enlarged (db::Vector (dx, dy));
|
||||||
return region_from_box (b, begin ()->prop_id ());
|
return region_from_box (b, db::RegionIterator (begin ()).prop_id ());
|
||||||
|
|
||||||
} else if (! merged_semantics () || is_merged ()) {
|
} else if (! merged_semantics () || is_merged ()) {
|
||||||
|
|
||||||
|
|
@ -1435,13 +1435,13 @@ AsIfFlatRegion::and_with (const Region &other, PropertyConstraint property_const
|
||||||
|
|
||||||
} else if (is_box () && other.is_box ()) {
|
} else if (is_box () && other.is_box ()) {
|
||||||
|
|
||||||
if (pc_skip (property_constraint) || pc_match (property_constraint, begin ()->prop_id (), other.begin ().prop_id ())) {
|
if (pc_skip (property_constraint) || pc_match (property_constraint, db::RegionIterator (begin ()).prop_id (), other.begin ().prop_id ())) {
|
||||||
|
|
||||||
// Simplified handling for boxes
|
// Simplified handling for boxes
|
||||||
db::Box b = bbox ();
|
db::Box b = bbox ();
|
||||||
b &= other.bbox ();
|
b &= other.bbox ();
|
||||||
|
|
||||||
db::properties_id_type prop_id_out = pc_norm (property_constraint, begin ()->prop_id ());
|
db::properties_id_type prop_id_out = pc_norm (property_constraint, db::RegionIterator (begin ()).prop_id ());
|
||||||
|
|
||||||
return region_from_box (b, prop_id_out);
|
return region_from_box (b, prop_id_out);
|
||||||
|
|
||||||
|
|
@ -1451,7 +1451,7 @@ AsIfFlatRegion::and_with (const Region &other, PropertyConstraint property_const
|
||||||
|
|
||||||
} else if (is_box () && ! other.strict_handling ()) {
|
} else if (is_box () && ! other.strict_handling ()) {
|
||||||
|
|
||||||
db::properties_id_type self_prop_id = pc_skip (property_constraint) ? 0 : begin ()->prop_id ();
|
db::properties_id_type self_prop_id = pc_skip (property_constraint) ? 0 : db::RegionIterator (begin ()).prop_id ();
|
||||||
|
|
||||||
// map AND with box to clip ..
|
// map AND with box to clip ..
|
||||||
db::Box b = bbox ();
|
db::Box b = bbox ();
|
||||||
|
|
|
||||||
|
|
@ -774,7 +774,6 @@ RegionDelegate *
|
||||||
DeepRegion::and_with (const Region &other, PropertyConstraint property_constraint) const
|
DeepRegion::and_with (const Region &other, PropertyConstraint property_constraint) const
|
||||||
{
|
{
|
||||||
const DeepRegion *other_deep = dynamic_cast <const DeepRegion *> (other.delegate ());
|
const DeepRegion *other_deep = dynamic_cast <const DeepRegion *> (other.delegate ());
|
||||||
|
|
||||||
if (empty ()) {
|
if (empty ()) {
|
||||||
|
|
||||||
return clone ()->remove_properties (pc_remove (property_constraint));
|
return clone ()->remove_properties (pc_remove (property_constraint));
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@
|
||||||
namespace db
|
namespace db
|
||||||
{
|
{
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
class generic_shape_iterator;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class DB_PUBLIC generic_shape_iterator_delegate_base
|
class DB_PUBLIC generic_shape_iterator_delegate_base
|
||||||
{
|
{
|
||||||
|
|
@ -40,6 +43,9 @@ public:
|
||||||
generic_shape_iterator_delegate_base () { }
|
generic_shape_iterator_delegate_base () { }
|
||||||
virtual ~generic_shape_iterator_delegate_base () { }
|
virtual ~generic_shape_iterator_delegate_base () { }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
friend class generic_shape_iterator<T>;
|
||||||
|
|
||||||
virtual void do_reset (const db::Box & /*region*/, bool /*overlapping*/) { }
|
virtual void do_reset (const db::Box & /*region*/, bool /*overlapping*/) { }
|
||||||
virtual db::Box bbox () const { return db::Box::world (); }
|
virtual db::Box bbox () const { return db::Box::world (); }
|
||||||
virtual bool is_addressable () const = 0;
|
virtual bool is_addressable () const = 0;
|
||||||
|
|
@ -62,6 +68,7 @@ public:
|
||||||
: m_iter (from), m_from (from), m_to (to)
|
: m_iter (from), m_from (from), m_to (to)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
protected:
|
||||||
virtual bool is_addressable () const
|
virtual bool is_addressable () const
|
||||||
{
|
{
|
||||||
return addressable;
|
return addressable;
|
||||||
|
|
@ -122,6 +129,7 @@ public:
|
||||||
: m_iter (from), m_from (from)
|
: m_iter (from), m_from (from)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
protected:
|
||||||
virtual bool is_addressable () const
|
virtual bool is_addressable () const
|
||||||
{
|
{
|
||||||
return addressable;
|
return addressable;
|
||||||
|
|
@ -185,6 +193,7 @@ public:
|
||||||
set ();
|
set ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
virtual bool is_addressable () const
|
virtual bool is_addressable () const
|
||||||
{
|
{
|
||||||
return m_is_addressable;
|
return m_is_addressable;
|
||||||
|
|
|
||||||
|
|
@ -614,7 +614,7 @@ PCellParametersPage::setup (lay::LayoutViewBase *view, int cv_index, const db::P
|
||||||
m_initial_states = m_states;
|
m_initial_states = m_states;
|
||||||
mp_error_frame->hide ();
|
mp_error_frame->hide ();
|
||||||
|
|
||||||
update_widgets_from_states (m_states);
|
update_widgets_from_states (m_states, lazy_evaluation ());
|
||||||
|
|
||||||
mp_parameters_area->setWidget (mp_main_frame);
|
mp_parameters_area->setWidget (mp_main_frame);
|
||||||
mp_main_frame->show ();
|
mp_main_frame->show ();
|
||||||
|
|
@ -713,7 +713,7 @@ PCellParametersPage::do_parameter_changed ()
|
||||||
db::ParameterStates states = m_states;
|
db::ParameterStates states = m_states;
|
||||||
get_parameters (states, &ok); // includes coerce
|
get_parameters (states, &ok); // includes coerce
|
||||||
if (ok) {
|
if (ok) {
|
||||||
update_widgets_from_states (states);
|
update_widgets_from_states (states, lazy_evaluation ());
|
||||||
if (! lazy_evaluation ()) {
|
if (! lazy_evaluation ()) {
|
||||||
emit edited ();
|
emit edited ();
|
||||||
}
|
}
|
||||||
|
|
@ -959,11 +959,11 @@ PCellParametersPage::set_parameters (const std::vector<tl::Variant> ¶meters)
|
||||||
m_initial_states = m_states;
|
m_initial_states = m_states;
|
||||||
mp_error_frame->hide ();
|
mp_error_frame->hide ();
|
||||||
|
|
||||||
set_parameters_internal (m_states, false);
|
update_widgets_from_states (m_states, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PCellParametersPage::update_widgets_from_states (const db::ParameterStates &states)
|
PCellParametersPage::update_widgets_from_states (const db::ParameterStates &states, bool tentatively)
|
||||||
{
|
{
|
||||||
if (! mp_pcell_decl) {
|
if (! mp_pcell_decl) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1031,7 +1031,7 @@ PCellParametersPage::update_widgets_from_states (const db::ParameterStates &stat
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_parameters_internal (states, lazy_evaluation ());
|
set_parameters_internal (states, tentatively);
|
||||||
|
|
||||||
// QGridLayouts are bad in handling nested QFrame (or QGroupBox) with their own layouts,
|
// QGridLayouts are bad in handling nested QFrame (or QGroupBox) with their own layouts,
|
||||||
// so we help a little here:
|
// so we help a little here:
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ private:
|
||||||
bool lazy_evaluation ();
|
bool lazy_evaluation ();
|
||||||
void set_parameters_internal (const db::ParameterStates &states, bool tentatively);
|
void set_parameters_internal (const db::ParameterStates &states, bool tentatively);
|
||||||
bool update_current_parameters ();
|
bool update_current_parameters ();
|
||||||
void update_widgets_from_states (const db::ParameterStates &states);
|
void update_widgets_from_states (const db::ParameterStates &states, bool tentatively);
|
||||||
void get_parameters_internal (db::ParameterStates &states, bool &edit_error);
|
void get_parameters_internal (db::ParameterStates &states, bool &edit_error);
|
||||||
std::vector<tl::Variant> parameter_from_states (const db::ParameterStates &states) const;
|
std::vector<tl::Variant> parameter_from_states (const db::ParameterStates &states) const;
|
||||||
void states_from_parameters (db::ParameterStates &states, const std::vector<tl::Variant> ¶meters);
|
void states_from_parameters (db::ParameterStates &states, const std::vector<tl::Variant> ¶meters);
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,8 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END_PROTECTED
|
// Note: Qt does not like popups during drag-and-drop operations ...
|
||||||
|
END_PROTECTED_SILENT
|
||||||
}
|
}
|
||||||
|
|
||||||
void dragLeaveEvent (QDragLeaveEvent * /*event*/)
|
void dragLeaveEvent (QDragLeaveEvent * /*event*/)
|
||||||
|
|
@ -309,7 +310,8 @@ public:
|
||||||
svc = next;
|
svc = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
END_PROTECTED
|
// Note: Qt does not like popups during drag-and-drop operations ...
|
||||||
|
END_PROTECTED_SILENT
|
||||||
}
|
}
|
||||||
|
|
||||||
void dragMoveEvent (QDragMoveEvent *event)
|
void dragMoveEvent (QDragMoveEvent *event)
|
||||||
|
|
@ -332,7 +334,8 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END_PROTECTED
|
// Note: Qt does not like popups during drag-and-drop operations ...
|
||||||
|
END_PROTECTED_SILENT
|
||||||
}
|
}
|
||||||
|
|
||||||
void dropEvent (QDropEvent *event)
|
void dropEvent (QDropEvent *event)
|
||||||
|
|
@ -355,7 +358,8 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END_PROTECTED
|
// Note: Qt does not like popups during drag-and-drop operations ...
|
||||||
|
END_PROTECTED_SILENT
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseMoveEvent (QMouseEvent *e)
|
void mouseMoveEvent (QMouseEvent *e)
|
||||||
|
|
|
||||||
|
|
@ -404,13 +404,13 @@ DataMappingLookupTable::update_table (double xmin, double xmax, double delta_y,
|
||||||
double dx = fabs (t->first - t[-1].first);
|
double dx = fabs (t->first - t[-1].first);
|
||||||
double dy = fabs (t->second - t[-1].second);
|
double dy = fabs (t->second - t[-1].second);
|
||||||
|
|
||||||
if (dx * delta_y < delta_x * dy) {
|
if (dx > 1e-10 && dy > 1e-10 && dx * delta_y < delta_x * dy) {
|
||||||
delta_x = dx / dy * delta_y;
|
delta_x = dx / dy * delta_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t nsteps = size_t (ceil((xmax - xmin) / delta_x - 1e-6));
|
size_t nsteps = size_t (ceil ((xmax - xmin) / delta_x - 1e-6));
|
||||||
|
|
||||||
// Limit the number of interpolation points (this is an arbitrary number - it could be somewhat else)
|
// Limit the number of interpolation points (this is an arbitrary number - it could be somewhat else)
|
||||||
nsteps = std::min (size_t (16384), nsteps);
|
nsteps = std::min (size_t (16384), nsteps);
|
||||||
|
|
@ -422,7 +422,9 @@ DataMappingLookupTable::update_table (double xmin, double xmax, double delta_y,
|
||||||
|
|
||||||
std::vector< std::pair<double, double> >::const_iterator t = table.begin ();
|
std::vector< std::pair<double, double> >::const_iterator t = table.begin ();
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (double x = xmin; i < nsteps; ++i, x += delta_x) {
|
double x;
|
||||||
|
for ( ; i < nsteps; ++i) {
|
||||||
|
x = xmin + i * delta_x;
|
||||||
while (t != table.end () && t->first <= x) {
|
while (t != table.end () && t->first <= x) {
|
||||||
++t;
|
++t;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1498,6 +1498,36 @@ class DBRegion_TestClass < TestBase
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# issue #1955 (locking of layout object inside DSS)
|
||||||
|
def test_issue1955
|
||||||
|
|
||||||
|
ly = RBA::Layout::new
|
||||||
|
top = ly.create_cell("TOP")
|
||||||
|
l1 = ly.layer(1, 0)
|
||||||
|
|
||||||
|
dss = RBA::DeepShapeStore::new
|
||||||
|
|
||||||
|
rr = RBA::Region::new(RBA::Box::new(100, 100, 1100, 1100))
|
||||||
|
|
||||||
|
r = RBA::Region::new(top.begin_shapes_rec(l1), dss)
|
||||||
|
r += RBA::Region::new(RBA::Box::new(0, 0, 1000, 1000))
|
||||||
|
|
||||||
|
# this spoils the dss object, if
|
||||||
|
# 1. the first region is a deep region
|
||||||
|
# 2. the second region is a flat region
|
||||||
|
# 3. both regions are boxes
|
||||||
|
# after this operation, bounding boxes are no
|
||||||
|
# longer updated inside the DSS.
|
||||||
|
randrr = r & rr
|
||||||
|
assert_equal(randrr.to_s, "(100,100;100,1000;1000,1000;1000,100)")
|
||||||
|
|
||||||
|
r += RBA::Region::new(RBA::Box::new(1000, 1000, 2000, 2000))
|
||||||
|
|
||||||
|
assert_equal(r.to_s, "(0,0;0,1000;1000,1000;1000,0);(1000,1000;1000,2000;2000,2000;2000,1000)")
|
||||||
|
assert_equal(r.bbox.to_s, "(0,0;2000,2000)")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
load("test_epilogue.rb")
|
load("test_epilogue.rb")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue