Mapping deep-mode 'or' (DRC) to 'add' to avoid flat processing.

This commit is contained in:
Matthias Koefferlein 2021-05-22 22:32:29 +02:00
parent 560234cacb
commit 4bc665cbf3
2 changed files with 9 additions and 0 deletions

View File

@ -651,6 +651,13 @@ DeepRegion::not_with (const Region &other) const
}
}
RegionDelegate *
DeepRegion::or_with (const Region &other) const
{
// NOTE: this is somewhat different from the as if flat case because it does not merge
return add (other);
}
std::pair<RegionDelegate *, RegionDelegate *>
DeepRegion::andnot_with (const Region &other) const
{
@ -1090,6 +1097,7 @@ public:
virtual void do_compute_local (db::Layout * /*layout*/, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, size_t /*max_vertex_count*/, double /*area_ratio*/) const
{
db::EdgeProcessor ep;
ep.set_base_verbosity (50);
for (shape_interactions<db::PolygonRef, db::PolygonRef>::subject_iterator s = interactions.begin_subjects (); s != interactions.end_subjects (); ++s) {
ep.insert (s->second);

View File

@ -99,6 +99,7 @@ public:
virtual RegionDelegate *and_with (const Region &other) const;
virtual RegionDelegate *not_with (const Region &other) const;
virtual RegionDelegate *xor_with (const Region &other) const;
virtual RegionDelegate *or_with (const Region &other) const;
virtual std::pair<RegionDelegate *, RegionDelegate *> andnot_with (const Region &) const;
virtual RegionDelegate *add_in_place (const Region &other);