Made shielding an option for some DRC features.

This commit is contained in:
Matthias Koefferlein 2020-09-16 23:44:44 +02:00
parent a20bd38f17
commit 3043418f8a
18 changed files with 263 additions and 129 deletions

View File

@ -774,7 +774,7 @@ AsIfFlatRegion::scaled_and_snapped (db::Coord gx, db::Coord mx, db::Coord dx, db
}
EdgePairsDelegate *
AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
std::auto_ptr<FlatEdgePairs> result (new FlatEdgePairs ());
@ -810,7 +810,7 @@ AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons,
check.set_min_projection (min_projection);
check.set_max_projection (max_projection);
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, different_polygons, other != 0 /*requires different layers*/, true /*shielded*/);
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, different_polygons, other != 0 /*requires different layers*/, shielded);
poly2poly_check<db::FlatEdgePairs> poly_check (edge_check);
do {
@ -821,7 +821,7 @@ AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons,
}
EdgePairsDelegate *
AsIfFlatRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
AsIfFlatRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
std::auto_ptr<FlatEdgePairs> result (new FlatEdgePairs ());
@ -832,7 +832,7 @@ AsIfFlatRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord
check.set_min_projection (min_projection);
check.set_max_projection (max_projection);
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, false /*=same polygons*/, false /*=same layers*/, true /*shielded*/);
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, false /*=same polygons*/, false /*=same layers*/, shielded);
poly2poly_check<db::FlatEdgePairs> poly_check (edge_check);
do {

View File

@ -55,44 +55,44 @@ public:
virtual std::string to_string (size_t nmax) const;
EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_single_polygon_check (db::WidthRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_single_polygon_check (db::WidthRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, false, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, false, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, true, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, true, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_single_polygon_check (db::SpaceRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_single_polygon_check (db::SpaceRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::OverlapRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::OverlapRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::WidthRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::WidthRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::InsideRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::InsideRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
virtual EdgePairsDelegate *grid_check (db::Coord gx, db::Coord gy) const;
@ -259,8 +259,8 @@ protected:
void update_bbox (const db::Box &box);
void invalidate_bbox ();
EdgePairsDelegate *run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const;
EdgePairsDelegate *run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const;
EdgePairsDelegate *run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const;
EdgePairsDelegate *run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const;
virtual RegionDelegate *selected_interacting_generic (const Region &other, int mode, bool touching, bool inverse) const;
virtual RegionDelegate *selected_interacting_generic (const Edges &other, bool inverse) const;
virtual RegionDelegate *selected_interacting_generic (const Texts &other, bool inverse) const;

View File

@ -1312,8 +1312,8 @@ class CheckLocalOperation
: public local_operation<db::PolygonRef, db::PolygonRef, db::EdgePair>
{
public:
CheckLocalOperation (const EdgeRelationFilter &check, bool different_polygons, bool has_other)
: m_check (check), m_different_polygons (different_polygons), m_has_other (has_other)
CheckLocalOperation (const EdgeRelationFilter &check, bool different_polygons, bool has_other, bool shielded)
: m_check (check), m_different_polygons (different_polygons), m_has_other (has_other), m_shielded (shielded)
{
// .. nothing yet ..
}
@ -1323,7 +1323,7 @@ public:
tl_assert (results.size () == 1);
std::unordered_set<db::EdgePair> &result = results.front ();
edge2edge_check<std::unordered_set<db::EdgePair> > edge_check (m_check, result, m_different_polygons, m_has_other, true /*shielded*/);
edge2edge_check<std::unordered_set<db::EdgePair> > edge_check (m_check, result, m_different_polygons, m_has_other, m_shielded);
poly2poly_check<std::unordered_set<db::EdgePair> > poly_check (edge_check);
std::list<db::Polygon> heap;
@ -1397,18 +1397,19 @@ private:
EdgeRelationFilter m_check;
bool m_different_polygons;
bool m_has_other;
bool m_shielded;
};
}
EdgePairsDelegate *
DeepRegion::run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
DeepRegion::run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
const db::DeepRegion *other_deep = 0;
if (other) {
other_deep = dynamic_cast<const db::DeepRegion *> (other->delegate ());
if (! other_deep) {
return db::AsIfFlatRegion::run_check (rel, different_polygons, other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return db::AsIfFlatRegion::run_check (rel, different_polygons, other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
}
@ -1423,7 +1424,7 @@ DeepRegion::run_check (db::edge_relation_type rel, bool different_polygons, cons
std::auto_ptr<db::DeepEdgePairs> res (new db::DeepEdgePairs (polygons.derived ()));
db::CheckLocalOperation op (check, different_polygons, other_deep != 0);
db::CheckLocalOperation op (check, different_polygons, other_deep != 0, shielded);
db::local_processor<db::PolygonRef, db::PolygonRef, db::EdgePair> proc (const_cast<db::Layout *> (&polygons.layout ()),
const_cast<db::Cell *> (&polygons.initial_cell ()),
@ -1441,7 +1442,7 @@ DeepRegion::run_check (db::edge_relation_type rel, bool different_polygons, cons
}
EdgePairsDelegate *
DeepRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
DeepRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
const db::DeepLayer &polygons = merged_deep_layer ();
@ -1462,7 +1463,7 @@ DeepRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, b
for (db::Shapes::shape_iterator s = shapes.begin (db::ShapeIterator::Polygons); ! s.at_end (); ++s) {
edge2edge_check<db::Shapes> edge_check (check, result, false, false, true /*shielded*/);
edge2edge_check<db::Shapes> edge_check (check, result, false, false, shielded);
poly2poly_check<db::Shapes> poly_check (edge_check);
db::Polygon poly;

View File

@ -88,44 +88,44 @@ public:
virtual RegionDelegate *add_in_place (const Region &other);
virtual RegionDelegate *add (const Region &other) const;
EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_single_polygon_check (db::WidthRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_single_polygon_check (db::WidthRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, false, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, false, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, true, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, true, 0, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_single_polygon_check (db::SpaceRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_single_polygon_check (db::SpaceRelation, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::OverlapRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::OverlapRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::WidthRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::WidthRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::SpaceRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::SpaceRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const
EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const
{
return run_check (db::InsideRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection);
return run_check (db::InsideRelation, true, &other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded);
}
virtual EdgePairsDelegate *grid_check (db::Coord gx, db::Coord gy) const;
@ -186,8 +186,8 @@ private:
const DeepLayer &merged_deep_layer () const;
DeepLayer and_or_not_with(const DeepRegion *other, bool and_op) const;
std::pair<DeepLayer, DeepLayer> and_and_not_with (const DeepRegion *other) const;
EdgePairsDelegate *run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const;
EdgePairsDelegate *run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const;
EdgePairsDelegate *run_check (db::edge_relation_type rel, bool different_polygons, const Region *other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const;
EdgePairsDelegate *run_single_polygon_check (db::edge_relation_type rel, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const;
virtual RegionDelegate *selected_interacting_generic (const Region &other, int mode, bool touching, bool inverse) const;
virtual RegionDelegate *selected_interacting_generic (const Edges &other, bool inverse) const;
virtual RegionDelegate *selected_interacting_generic (const Texts &other, bool inverse) const;

View File

@ -97,49 +97,49 @@ EmptyRegion::processed_to_edge_pairs (const PolygonToEdgePairProcessorBase &) co
}
EdgePairsDelegate *
EmptyRegion::width_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::width_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::space_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::space_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::isolated_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::isolated_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::notch_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::notch_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::enclosing_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::enclosing_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::overlap_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::overlap_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::separation_check (const Region &, db::Coord, bool , metrics_type, double, distance_type, distance_type) const
EmptyRegion::separation_check (const Region &, db::Coord, bool , metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}
EdgePairsDelegate *
EmptyRegion::inside_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const
EmptyRegion::inside_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const
{
return new EmptyEdgePairs ();
}

View File

@ -61,14 +61,14 @@ public:
virtual Box bbox () const { return Box (); }
virtual EdgePairsDelegate *width_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *space_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *isolated_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *notch_check (db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *enclosing_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *overlap_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *separation_check (const Region &, db::Coord, bool , metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *inside_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type) const;
virtual EdgePairsDelegate *width_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *space_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *isolated_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *notch_check (db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *enclosing_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *overlap_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *separation_check (const Region &, db::Coord, bool , metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *inside_check (const Region &, db::Coord, bool, metrics_type, double, distance_type, distance_type, bool) const;
virtual EdgePairsDelegate *grid_check (db::Coord, db::Coord) const;
virtual EdgePairsDelegate *angle_check (double, double, bool) const;

View File

@ -722,9 +722,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs width_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs width_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->width_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->width_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -735,9 +735,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs space_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs space_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->space_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->space_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -748,9 +748,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs isolated_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs isolated_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->isolated_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->isolated_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -761,9 +761,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs notch_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs notch_check (db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->notch_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->notch_check (d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -778,9 +778,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs enclosing_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs enclosing_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->enclosing_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->enclosing_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -795,9 +795,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs overlap_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs overlap_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->overlap_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->overlap_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -812,9 +812,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs separation_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs separation_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->separation_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->separation_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**
@ -829,9 +829,9 @@ public:
*
* Merged semantics applies.
*/
EdgePairs inside_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max ()) const
EdgePairs inside_check (const Region &other, db::Coord d, bool whole_edges = false, metrics_type metrics = db::Euclidian, double ignore_angle = 90, distance_type min_projection = 0, distance_type max_projection = std::numeric_limits<distance_type>::max (), bool shielded = true) const
{
return EdgePairs (mp_delegate->inside_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection));
return EdgePairs (mp_delegate->inside_check (other, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded));
}
/**

View File

@ -225,14 +225,14 @@ public:
virtual perimeter_type perimeter (const db::Box &box) const = 0;
virtual Box bbox () const = 0;
virtual EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection) const = 0;
virtual EdgePairsDelegate *width_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *space_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *isolated_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *notch_check (db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *enclosing_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *overlap_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *separation_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *inside_check (const Region &other, db::Coord d, bool whole_edges, metrics_type metrics, double ignore_angle, distance_type min_projection, distance_type max_projection, bool shielded) const = 0;
virtual EdgePairsDelegate *grid_check (db::Coord gx, db::Coord gy) const = 0;
virtual EdgePairsDelegate *angle_check (double min, double max, bool inverse) const = 0;

View File

@ -45,29 +45,31 @@ Edge2EdgeCheckBase::prepare_next_pass ()
if (m_pass == 1) {
if (m_with_shielding && ! m_ep.empty ()) {
if ((m_with_shielding || m_has_negative_edge_output) && ! m_ep.empty ()) {
m_ep_discarded.resize (m_ep.size (), false);
// second pass:
return true;
}
} else if (m_pass == 2) {
}
if (m_has_edge_pair_output) {
if (! m_ep.empty () && m_has_edge_pair_output) {
std::vector<bool>::const_iterator d = m_ep_discarded.begin ();
std::vector<db::EdgePair>::const_iterator ep = m_ep.begin ();
while (ep != m_ep.end ()) {
bool use_result = true;
if (d != m_ep_discarded.end ()) {
use_result = ! *d;
++d;
}
if (use_result) {
put (*ep);
}
++ep;
std::vector<bool>::const_iterator d = m_ep_discarded.begin ();
std::vector<db::EdgePair>::const_iterator ep = m_ep.begin ();
while (ep != m_ep.end ()) {
bool use_result = true;
if (d != m_ep_discarded.end ()) {
use_result = ! *d;
++d;
}
if (use_result) {
put (*ep);
}
++ep;
}
}
@ -206,7 +208,9 @@ Edge2EdgeCheckBase::add (const db::Edge *o1, size_t p1, const db::Edge *o2, size
ec.add (o1, 0);
for (std::multimap<std::pair<db::Edge, size_t>, size_t>::const_iterator i = i0; i != m_e2ep.end () && i->first == k; ++i) {
ec.add (&m_ep [i->second].first (), 1);
if (i->second >= m_ep_discarded.size () || !m_ep_discarded [i->second]) {
ec.add (&m_ep [i->second].first (), 1);
}
}
ec.finish ();

View File

@ -441,13 +441,14 @@ static db::EdgePairs width1 (const db::Region *r, db::Region::distance_type d)
return r->width_check (d);
}
static db::EdgePairs width2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs width2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->width_check (d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs space1 (const db::Region *r, db::Region::distance_type d)
@ -455,13 +456,14 @@ static db::EdgePairs space1 (const db::Region *r, db::Region::distance_type d)
return r->space_check (d);
}
static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->space_check (d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs notch1 (const db::Region *r, db::Region::distance_type d)
@ -469,13 +471,14 @@ static db::EdgePairs notch1 (const db::Region *r, db::Region::distance_type d)
return r->notch_check (d);
}
static db::EdgePairs notch2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs notch2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->notch_check (d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs isolated1 (const db::Region *r, db::Region::distance_type d)
@ -483,13 +486,14 @@ static db::EdgePairs isolated1 (const db::Region *r, db::Region::distance_type d
return r->isolated_check (d);
}
static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->isolated_check (d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs inside1 (const db::Region *r, const db::Region &other, db::Region::distance_type d)
@ -497,13 +501,14 @@ static db::EdgePairs inside1 (const db::Region *r, const db::Region &other, db::
return r->inside_check (other, d);
}
static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->inside_check (other, d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs overlap1 (const db::Region *r, const db::Region &other, db::Region::distance_type d)
@ -511,13 +516,14 @@ static db::EdgePairs overlap1 (const db::Region *r, const db::Region &other, db:
return r->overlap_check (other, d);
}
static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->overlap_check (other, d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs enclosing1 (const db::Region *r, const db::Region &other, db::Region::distance_type d)
@ -525,13 +531,14 @@ static db::EdgePairs enclosing1 (const db::Region *r, const db::Region &other, d
return r->enclosing_check (other, d);
}
static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->enclosing_check (other, d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static db::EdgePairs separation1 (const db::Region *r, const db::Region &other, db::Region::distance_type d)
@ -539,13 +546,14 @@ static db::EdgePairs separation1 (const db::Region *r, const db::Region &other,
return r->separation_check (other, d);
}
static db::EdgePairs separation2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection)
static db::EdgePairs separation2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, const tl::Variant &metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
{
return r->separation_check (other, d, whole_edges,
metrics.is_nil () ? db::Euclidian : db::metrics_type (metrics.to_int ()),
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Region::distance_type (0) : min_projection.to<db::Region::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> ());
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
shielded);
}
static std::vector<db::Region> andnot (const db::Region *r, const db::Region &other)
@ -1920,7 +1928,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs a width check with options\n"
"@param d The minimum width for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n"
@ -1928,6 +1936,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param ignore_angle The angle above which no check is performed\n"
"@param min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper limit of the projected length of one edge onto another\n"
"@param shielded Enables shielding\n"
"\n"
"This version is similar to the simple version with one parameter. In addition, it allows "
"to specify many more options.\n"
@ -1949,7 +1958,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("space_check", &space1, gsi::arg ("d"),
"@brief Performs a space check\n"
@ -1965,7 +1982,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs a space check with options\n"
"@param d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n"
@ -1994,7 +2011,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("notch_check", &notch1, gsi::arg ("d"),
"@brief Performs a space check between edges of the same polygon\n"
@ -2012,7 +2037,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("notch_check", &notch2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("notch_check", &notch2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs a space check between edges of the same polygon with options\n"
"@param d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n"
@ -2041,7 +2066,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("isolated_check", &isolated1, gsi::arg ("d"),
"@brief Performs a space check between edges of different polygons\n"
@ -2059,7 +2092,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("isolated_check", &isolated2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("isolated_check", &isolated2, gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs a space check between edges of different polygons with options\n"
"@param d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n"
@ -2088,7 +2121,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("inside_check", &inside1, gsi::arg ("other"), gsi::arg ("d"),
"@brief Performs a check whether polygons of this region are inside polygons of the other region by some amount\n"
@ -2101,7 +2142,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("inside_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("inside_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs an inside check with options\n"
"@param d The minimum distance for which the polygons are checked\n"
"@param other The other region against which to check\n"
@ -2131,7 +2172,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("overlap_check", &overlap1, gsi::arg ("other"), gsi::arg ("d"),
"@brief Performs a check whether polygons of this region overlap polygons of the other region by some amount\n"
@ -2142,7 +2191,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs an overlap check with options\n"
"@param d The minimum overlap for which the polygons are checked\n"
"@param other The other region against which to check\n"
@ -2172,7 +2221,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("enclosing_check", &enclosing1, gsi::arg ("other"), gsi::arg ("d"),
"@brief Performs a check whether polygons of this region enclose polygons of the other region by some amount\n"
@ -2183,7 +2240,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs an enclosing check with options\n"
"@param d The minimum enclosing distance for which the polygons are checked\n"
"@param other The other region against which to check\n"
@ -2213,7 +2270,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("separation_check", &separation1, gsi::arg ("other"), gsi::arg ("d"),
"@brief Performs a check whether polygons of this region are separated from polygons of the other region by some amount\n"
@ -2224,7 +2289,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
) +
method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"),
method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges"), gsi::arg ("metrics"), gsi::arg ("ignore_angle"), gsi::arg ("min_projection"), gsi::arg ("max_projection"), gsi::arg ("shielded", true),
"@brief Performs a separation check with options\n"
"@param d The minimum separation for which the polygons are checked\n"
"@param other The other region against which to check\n"
@ -2254,7 +2319,15 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one limit, pass nil to the respective value.\n"
"\n"
"\"shielded\" controls whether shielding is applied. Shielding means that rule violations are not "
"detected 'through' other features. Measurements are only made where the opposite edge is unobstructed.\n"
"Shielding often is not optional as a rule violation in shielded case automatically comes with rule "
"violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to "
"false. In general, this will improve performance somewhat.\n"
"\n"
"Merged semantics applies for the input of this method (see \\merged_semantics= of merged semantics)\n"
"\n"
"The 'shielded' option has been introduced in version 0.27."
) +
method_ext ("area", &area1,
"@brief The area of the region\n"

View File

@ -836,3 +836,43 @@ TEST(18_breaking)
db::compare_layouts (_this, layout, au, db::NoNormalization);
}
TEST(19_shielding)
{
std::string rs = tl::testsrc ();
rs += "/testdata/drc/drcSimpleTests_19.drc";
std::string input = tl::testsrc ();
input += "/testdata/drc/drcSimpleTests_19.gds";
std::string au = tl::testsrc ();
au += "/testdata/drc/drcSimpleTests_au19.gds";
std::string output = this->tmp_file ("tmp.gds");
{
// Set some variables
lym::Macro config;
config.set_text (tl::sprintf (
"$drc_test_source = '%s'\n"
"$drc_test_target = '%s'\n"
, input, output)
);
config.set_interpreter (lym::Macro::Ruby);
EXPECT_EQ (config.run (), 0);
}
lym::Macro drc;
drc.load_from (rs);
EXPECT_EQ (drc.run (), 0);
db::Layout layout;
{
tl::InputStream stream (output);
db::Reader reader (stream);
reader.read (layout);
}
db::compare_layouts (_this, layout, au, db::NoNormalization);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

16
testdata/drc/drcSimpleTests_19.drc vendored Normal file
View File

@ -0,0 +1,16 @@
# Hierarchical antenna check
source($drc_test_source, "TOP")
target($drc_test_target)
l1 = input(1, 0)
l2 = input(2, 0)
l1.output(1, 0)
l2.output(2, 0)
l1.space(3.0, transparent, projection).output(100, 0)
l1.space(3.0, shielded, projection).output(101, 0)
l2.separation(l1, 3.0, transparent, projection).output(110, 0)
l2.separation(l1, 3.0, shielded, projection).output(111, 0)

BIN
testdata/drc/drcSimpleTests_19.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au19.gds vendored Normal file

Binary file not shown.