mirror of https://github.com/KLayout/klayout.git
commit
fa9e7e7c12
|
|
@ -2308,9 +2308,11 @@ static void decompose_convex_helper (int depth, PreferredOrientation po, const d
|
|||
|
||||
db::Box bbox = sp.box ();
|
||||
db::coord_traits<db::Coord>::area_type atot = 0;
|
||||
db::coord_traits<db::Coord>::distance_type min_edge = std::numeric_limits<db::coord_traits<db::Coord>::distance_type>::max ();
|
||||
for (size_t i = 0; i < n; ++i) {
|
||||
db::Edge ep (sp.hull ()[(i + n - 1) % n], sp.hull ()[i]);
|
||||
atot += db::vprod (ep.p2 () - db::Point (), ep.p1 () - db::Point ());
|
||||
min_edge = std::min (min_edge, ep.length ());
|
||||
}
|
||||
|
||||
std::set<db::Point> skipped;
|
||||
|
|
@ -2457,9 +2459,14 @@ static void decompose_convex_helper (int depth, PreferredOrientation po, const d
|
|||
int cr = 0;
|
||||
if (x.second == efc.p1 ()) {
|
||||
if (db::vprod (efc, efp) < 0) {
|
||||
cr = 2; // cut terminates at another concave corner
|
||||
cr = 3; // cut terminates at another concave corner
|
||||
} else {
|
||||
cr = 1; // cut terminates at a convex corner
|
||||
cr = 2; // cut terminates at a convex corner
|
||||
}
|
||||
} else {
|
||||
db::coord_traits<db::Coord>::distance_type el = std::min (x.second.distance (efc.p1 ()), x.second.distance (efc.p2 ()));
|
||||
if (el >= min_edge) {
|
||||
cr = 1; // does not induce shorter edge than we have so far
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -888,10 +888,12 @@ gsi::Console *PythonInterpreter::current_console () const
|
|||
|
||||
void PythonInterpreter::begin_execution ()
|
||||
{
|
||||
m_file_id_map.clear ();
|
||||
m_block_exceptions = false;
|
||||
if (m_current_exec_level++ == 0 && mp_current_exec_handler) {
|
||||
mp_current_exec_handler->start_exec (this);
|
||||
if (m_current_exec_level++ == 0) {
|
||||
m_file_id_map.clear ();
|
||||
if (mp_current_exec_handler) {
|
||||
mp_current_exec_handler->start_exec (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2486,9 +2486,11 @@ RubyInterpreter::begin_exec ()
|
|||
{
|
||||
d->exit_on_next = false;
|
||||
d->block_exceptions = false;
|
||||
d->file_id_map.clear ();
|
||||
if (d->current_exec_level++ == 0 && d->current_exec_handler) {
|
||||
d->current_exec_handler->start_exec (this);
|
||||
if (d->current_exec_level++ == 0) {
|
||||
d->file_id_map.clear ();
|
||||
if (d->current_exec_handler) {
|
||||
d->current_exec_handler->start_exec (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue