mirror of https://github.com/KLayout/klayout.git
WIP: Introduced DRC negative options in GSI
This commit is contained in:
parent
82a70bdde0
commit
815b81ce59
|
|
@ -1100,7 +1100,7 @@ AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons,
|
|||
check.set_min_projection (options.min_projection);
|
||||
check.set_max_projection (options.max_projection);
|
||||
|
||||
db::check_local_operation<db::Polygon, db::Polygon> op (check, different_polygons, other != 0, other && other->is_merged (), options.shielded, options.opposite_filter, options.rect_filter);
|
||||
db::check_local_operation<db::Polygon, db::Polygon> op (check, different_polygons, other != 0, other && other->is_merged (), options);
|
||||
|
||||
db::local_processor<db::Polygon, db::Polygon, db::EdgePair> proc;
|
||||
proc.set_base_verbosity (base_verbosity ());
|
||||
|
|
@ -1154,7 +1154,7 @@ AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons,
|
|||
check.set_min_projection (options.min_projection);
|
||||
check.set_max_projection (options.max_projection);
|
||||
|
||||
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, different_polygons, other != 0 /*requires different layers*/, options.shielded);
|
||||
edge2edge_check_negative_or_positive<db::FlatEdgePairs> edge_check (check, *result, options.negative, different_polygons, other != 0 /*requires different layers*/, options.shielded);
|
||||
poly2poly_check<db::Polygon, db::FlatEdgePairs> poly_check (edge_check);
|
||||
|
||||
do {
|
||||
|
|
@ -1177,8 +1177,8 @@ AsIfFlatRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord
|
|||
check.set_min_projection (options.min_projection);
|
||||
check.set_max_projection (options.max_projection);
|
||||
|
||||
edge2edge_check<db::FlatEdgePairs> edge_check (check, *result, false /*=same polygons*/, false /*=same layers*/, options.shielded);
|
||||
poly2poly_check<db::Polygon, db::FlatEdgePairs> poly_check (edge_check);
|
||||
edge2edge_check_negative_or_positive<db::FlatEdgePairs> edge_check (check, *result, options.negative, false /*=same polygons*/, false /*=same layers*/, options.shielded);
|
||||
poly2poly_check<db::Polygon> poly_check (edge_check);
|
||||
|
||||
do {
|
||||
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ CompoundRegionCheckOperationNode::do_compute_local (db::Layout *layout, const sh
|
|||
{
|
||||
bool other_merged = (children () > 0 && !inputs ()[0]);
|
||||
|
||||
db::check_local_operation<db::Polygon, db::Polygon> op (m_check, m_different_polygons, children () > 0, other_merged, m_options.shielded, m_options.opposite_filter, m_options.rect_filter);
|
||||
db::check_local_operation<db::Polygon, db::Polygon> op (m_check, m_different_polygons, children () > 0, other_merged, m_options);
|
||||
|
||||
tl_assert (results.size () == 1);
|
||||
if (results.front ().empty ()) {
|
||||
|
|
@ -1439,7 +1439,7 @@ CompoundRegionCheckOperationNode::do_compute_local (db::Layout *layout, const sh
|
|||
{
|
||||
bool other_merged = (children () > 0 && !inputs ()[0]);
|
||||
|
||||
db::check_local_operation<db::PolygonRef, db::PolygonRef> op (m_check, m_different_polygons, children () > 0, other_merged, m_options.shielded, m_options.opposite_filter, m_options.rect_filter);
|
||||
db::check_local_operation<db::PolygonRef, db::PolygonRef> op (m_check, m_different_polygons, children () > 0, other_merged, m_options);
|
||||
|
||||
tl_assert (results.size () == 1);
|
||||
if (results.front ().empty ()) {
|
||||
|
|
|
|||
|
|
@ -1443,7 +1443,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, other && other->is_merged (), options.shielded, options.opposite_filter, options.rect_filter);
|
||||
db::CheckLocalOperation op (check, different_polygons, other_deep != 0, other && other->is_merged (), options);
|
||||
|
||||
db::local_processor<db::PolygonRef, db::PolygonRef, db::EdgePair> proc (const_cast<db::Layout *> (&polygons.layout ()),
|
||||
const_cast<db::Cell *> (&polygons.initial_cell ()),
|
||||
|
|
@ -1482,8 +1482,8 @@ DeepRegion::run_single_polygon_check (db::edge_relation_type rel, db::Coord d, c
|
|||
|
||||
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, options.shielded);
|
||||
poly2poly_check<db::Polygon, db::Shapes> poly_check (edge_check);
|
||||
edge2edge_check_negative_or_positive<db::Shapes> edge_check (check, result, options.negative, false, false, options.shielded);
|
||||
poly2poly_check<db::Polygon> poly_check (edge_check);
|
||||
|
||||
db::Polygon poly;
|
||||
s->polygon (poly);
|
||||
|
|
|
|||
|
|
@ -45,92 +45,6 @@ class EdgesDelegate;
|
|||
class EdgePairsDelegate;
|
||||
class CompoundRegionOperationNode;
|
||||
|
||||
/**
|
||||
* @brief A structure holding the options for the region checks (space, width, ...)
|
||||
*/
|
||||
struct DB_PUBLIC RegionCheckOptions
|
||||
{
|
||||
typedef db::coord_traits<db::Coord>::distance_type distance_type;
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
RegionCheckOptions (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,
|
||||
OppositeFilter _opposite_filter = NoOppositeFilter,
|
||||
RectFilter _rect_filter = NoSideAllowed)
|
||||
: whole_edges (_whole_edges),
|
||||
metrics (_metrics),
|
||||
ignore_angle (_ignore_angle),
|
||||
min_projection (_min_projection),
|
||||
max_projection (_max_projection),
|
||||
shielded (_shielded),
|
||||
opposite_filter (_opposite_filter),
|
||||
rect_filter (_rect_filter)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Specifies is whole edges are to be delivered
|
||||
*
|
||||
* Without "whole_edges", the parts of
|
||||
* the edges are returned which violate the condition. If "whole_edges" is true, the
|
||||
* result will contain the complete edges participating in the result.
|
||||
*/
|
||||
bool whole_edges;
|
||||
|
||||
/**
|
||||
* @brief Measurement metrics
|
||||
*
|
||||
* The metrics parameter specifies which metrics to use. "Euclidian", "Square" and "Projected"
|
||||
* metrics are available.
|
||||
*/
|
||||
metrics_type metrics;
|
||||
|
||||
/**
|
||||
* @brief Specifies the obtuse angle threshold
|
||||
*
|
||||
* "ignore_angle" allows specification of a maximum angle that connected edges can have to not participate
|
||||
* in the check. By choosing 90 degree, edges with angles of 90 degree and larger are not checked,
|
||||
* but acute corners are for example.
|
||||
*/
|
||||
double ignore_angle;
|
||||
|
||||
/**
|
||||
* @brief Specifies the projection limit's minimum value
|
||||
*
|
||||
* With min_projection and max_projection it is possible to specify how edges must be related
|
||||
* to each other. If the length of the projection of either edge on the other is >= min_projection
|
||||
* or < max_projection, the edges are considered for the check.
|
||||
*/
|
||||
distance_type min_projection;
|
||||
|
||||
/**
|
||||
* @brief Specifies the projection limit's maximum value
|
||||
*/
|
||||
distance_type max_projection;
|
||||
|
||||
/**
|
||||
* @brief Specifies shielding
|
||||
*
|
||||
* Set this option to false to disable shielding. By default, shielding is on.
|
||||
*/
|
||||
bool shielded;
|
||||
|
||||
/**
|
||||
* @brief Specifies the opposite filter
|
||||
*/
|
||||
OppositeFilter opposite_filter;
|
||||
|
||||
/**
|
||||
* @brief Specifies a filter for error markers on rectangular shapes
|
||||
*/
|
||||
RectFilter rect_filter;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A base class for polygon filters
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ static bool shields_interaction (const db::EdgePair &ep, const P &poly)
|
|||
}
|
||||
|
||||
template <class TS, class TI>
|
||||
check_local_operation<TS, TI>::check_local_operation (const EdgeRelationFilter &check, bool different_polygons, bool has_other, bool other_is_merged, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
: m_check (check), m_different_polygons (different_polygons), m_has_other (has_other), m_other_is_merged (other_is_merged), m_shielded (shielded), m_opposite_filter (opposite_filter), m_rect_filter (rect_filter)
|
||||
check_local_operation<TS, TI>::check_local_operation (const EdgeRelationFilter &check, bool different_polygons, bool has_other, bool other_is_merged, const db::RegionCheckOptions &options)
|
||||
: m_check (check), m_different_polygons (different_polygons), m_has_other (has_other), m_other_is_merged (other_is_merged), m_options (options)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -173,8 +173,8 @@ check_local_operation<TS, TI>::compute_local (db::Layout *layout, const shape_in
|
|||
std::unordered_set<db::EdgePair> &result = results.front ();
|
||||
tl_assert (result.empty ());
|
||||
|
||||
edge2edge_check<std::unordered_set<db::EdgePair> > edge_check (m_check, result, m_different_polygons, m_has_other, m_shielded);
|
||||
poly2poly_check<TS, std::unordered_set<db::EdgePair> > poly_check (edge_check);
|
||||
edge2edge_check_negative_or_positive<std::unordered_set<db::EdgePair> > edge_check (m_check, result, m_options.negative, m_different_polygons, m_has_other, m_options.shielded);
|
||||
poly2poly_check<TS> poly_check (edge_check);
|
||||
|
||||
std::list<TS> heap;
|
||||
db::box_scanner<TS, size_t> scanner;
|
||||
|
|
@ -270,7 +270,7 @@ check_local_operation<TS, TI>::compute_local (db::Layout *layout, const shape_in
|
|||
|
||||
// detect and remove parts of the result which have or do not have results "opposite"
|
||||
// ("opposite" is defined by the projection of edges "through" the subject shape)
|
||||
if (m_opposite_filter != db::NoOppositeFilter && ! result.empty ()) {
|
||||
if (m_options.opposite_filter != db::NoOppositeFilter && ! result.empty ()) {
|
||||
|
||||
db::EdgeRelationFilter opp (db::WidthRelation, std::numeric_limits<db::EdgeRelationFilter::distance_type>::max (), db::Projection);
|
||||
|
||||
|
|
@ -306,15 +306,15 @@ check_local_operation<TS, TI>::compute_local (db::Layout *layout, const shape_in
|
|||
|
||||
if (! projections.empty ()) {
|
||||
db::Edges ce;
|
||||
if (m_opposite_filter == db::OnlyOpposite) {
|
||||
if (m_options.opposite_filter == db::OnlyOpposite) {
|
||||
ce = db::Edges (ep1->first ()) & db::Edges (projections.begin (), projections.end ());
|
||||
} else if (m_opposite_filter == db::NotOpposite) {
|
||||
} else if (m_options.opposite_filter == db::NotOpposite) {
|
||||
ce = db::Edges (ep1->first ()) - db::Edges (projections.begin (), projections.end ());
|
||||
}
|
||||
for (db::Edges::const_iterator re = ce.begin (); ! re.at_end (); ++re) {
|
||||
cleaned_result.insert (db::EdgePair (*re, ep1->second ()));
|
||||
}
|
||||
} else if (m_opposite_filter == db::NotOpposite) {
|
||||
} else if (m_options.opposite_filter == db::NotOpposite) {
|
||||
cleaned_result.insert (*ep1);
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ check_local_operation<TS, TI>::compute_local (db::Layout *layout, const shape_in
|
|||
}
|
||||
|
||||
// implements error filtering on rectangles
|
||||
if (m_rect_filter != RectFilter::NoSideAllowed && ! result.empty ()) {
|
||||
if (m_options.rect_filter != RectFilter::NoSideAllowed && ! result.empty ()) {
|
||||
|
||||
std::unordered_set<db::EdgePair> waived;
|
||||
|
||||
|
|
@ -358,7 +358,7 @@ check_local_operation<TS, TI>::compute_local (db::Layout *layout, const shape_in
|
|||
bool can_be_waived = false;
|
||||
|
||||
// decode pattern: consider each group of 4 bits and match them against the error pattern in their four rotation variants
|
||||
uint32_t p32 = (uint32_t) m_rect_filter;
|
||||
uint32_t p32 = (uint32_t) m_options.rect_filter;
|
||||
while (p32 != 0 && ! can_be_waived) {
|
||||
|
||||
uint32_t p4 = p32 & 0xf;
|
||||
|
|
|
|||
|
|
@ -102,12 +102,105 @@ enum OppositeFilter
|
|||
NotOpposite
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A structure holding the options for the region checks (space, width, ...)
|
||||
*/
|
||||
struct DB_PUBLIC RegionCheckOptions
|
||||
{
|
||||
typedef db::coord_traits<db::Coord>::distance_type distance_type;
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
RegionCheckOptions (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,
|
||||
OppositeFilter _opposite_filter = NoOppositeFilter,
|
||||
RectFilter _rect_filter = NoSideAllowed,
|
||||
bool _negative = false)
|
||||
: whole_edges (_whole_edges),
|
||||
metrics (_metrics),
|
||||
ignore_angle (_ignore_angle),
|
||||
min_projection (_min_projection),
|
||||
max_projection (_max_projection),
|
||||
shielded (_shielded),
|
||||
opposite_filter (_opposite_filter),
|
||||
rect_filter (_rect_filter),
|
||||
negative (_negative)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Specifies is whole edges are to be delivered
|
||||
*
|
||||
* Without "whole_edges", the parts of
|
||||
* the edges are returned which violate the condition. If "whole_edges" is true, the
|
||||
* result will contain the complete edges participating in the result.
|
||||
*/
|
||||
bool whole_edges;
|
||||
|
||||
/**
|
||||
* @brief Measurement metrics
|
||||
*
|
||||
* The metrics parameter specifies which metrics to use. "Euclidian", "Square" and "Projected"
|
||||
* metrics are available.
|
||||
*/
|
||||
metrics_type metrics;
|
||||
|
||||
/**
|
||||
* @brief Specifies the obtuse angle threshold
|
||||
*
|
||||
* "ignore_angle" allows specification of a maximum angle that connected edges can have to not participate
|
||||
* in the check. By choosing 90 degree, edges with angles of 90 degree and larger are not checked,
|
||||
* but acute corners are for example.
|
||||
*/
|
||||
double ignore_angle;
|
||||
|
||||
/**
|
||||
* @brief Specifies the projection limit's minimum value
|
||||
*
|
||||
* With min_projection and max_projection it is possible to specify how edges must be related
|
||||
* to each other. If the length of the projection of either edge on the other is >= min_projection
|
||||
* or < max_projection, the edges are considered for the check.
|
||||
*/
|
||||
distance_type min_projection;
|
||||
|
||||
/**
|
||||
* @brief Specifies the projection limit's maximum value
|
||||
*/
|
||||
distance_type max_projection;
|
||||
|
||||
/**
|
||||
* @brief Specifies shielding
|
||||
*
|
||||
* Set this option to false to disable shielding. By default, shielding is on.
|
||||
*/
|
||||
bool shielded;
|
||||
|
||||
/**
|
||||
* @brief Specifies the opposite filter
|
||||
*/
|
||||
OppositeFilter opposite_filter;
|
||||
|
||||
/**
|
||||
* @brief Specifies a filter for error markers on rectangular shapes
|
||||
*/
|
||||
RectFilter rect_filter;
|
||||
|
||||
/**
|
||||
* @brief Specifies whether to produce negative output
|
||||
*/
|
||||
bool negative;
|
||||
};
|
||||
|
||||
template <class TS, class TI>
|
||||
class check_local_operation
|
||||
: public local_operation<TS, TI, db::EdgePair>
|
||||
{
|
||||
public:
|
||||
check_local_operation (const EdgeRelationFilter &check, bool different_polygons, bool has_other, bool other_is_merged, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter);
|
||||
check_local_operation (const EdgeRelationFilter &check, bool different_polygons, bool has_other, bool other_is_merged, const db::RegionCheckOptions &options);
|
||||
|
||||
virtual void compute_local (db::Layout * /*layout*/, const shape_interactions<TS, TI> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, size_t /*max_vertex_count*/, double /*area_ratio*/) const;
|
||||
|
||||
|
|
@ -120,9 +213,7 @@ private:
|
|||
bool m_different_polygons;
|
||||
bool m_has_other;
|
||||
bool m_other_is_merged;
|
||||
bool m_shielded;
|
||||
db::OppositeFilter m_opposite_filter;
|
||||
db::RectFilter m_rect_filter;
|
||||
db::RegionCheckOptions m_options;
|
||||
};
|
||||
|
||||
typedef check_local_operation<db::PolygonRef, db::PolygonRef> CheckLocalOperation;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ Edge2EdgeCheckBase::distance () const
|
|||
// Poly2PolyCheckBase implementation
|
||||
|
||||
template <class PolygonType>
|
||||
poly2poly_check_base<PolygonType>::poly2poly_check_base (Edge2EdgeCheckBase &output)
|
||||
poly2poly_check<PolygonType>::poly2poly_check (Edge2EdgeCheckBase &output)
|
||||
: mp_output (& output)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
|
|
@ -349,7 +349,7 @@ poly2poly_check_base<PolygonType>::poly2poly_check_base (Edge2EdgeCheckBase &out
|
|||
|
||||
template <class PolygonType>
|
||||
void
|
||||
poly2poly_check_base<PolygonType>::finish (const PolygonType *o, size_t p)
|
||||
poly2poly_check<PolygonType>::finish (const PolygonType *o, size_t p)
|
||||
{
|
||||
enter (*o, p);
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@ static size_t vertices (const db::PolygonRef &p)
|
|||
|
||||
template <class PolygonType>
|
||||
void
|
||||
poly2poly_check_base<PolygonType>::enter (const PolygonType &o, size_t p)
|
||||
poly2poly_check<PolygonType>::enter (const PolygonType &o, size_t p)
|
||||
{
|
||||
if (! mp_output->requires_different_layers () && ! mp_output->different_polygons ()) {
|
||||
|
||||
|
|
@ -394,14 +394,14 @@ poly2poly_check_base<PolygonType>::enter (const PolygonType &o, size_t p)
|
|||
|
||||
template <class PolygonType>
|
||||
void
|
||||
poly2poly_check_base<PolygonType>::add (const PolygonType *o1, size_t p1, const PolygonType *o2, size_t p2)
|
||||
poly2poly_check<PolygonType>::add (const PolygonType *o1, size_t p1, const PolygonType *o2, size_t p2)
|
||||
{
|
||||
enter (*o1, p1, *o2, p2);
|
||||
}
|
||||
|
||||
template <class PolygonType>
|
||||
void
|
||||
poly2poly_check_base<PolygonType>::enter (const PolygonType &o1, size_t p1, const PolygonType &o2, size_t p2)
|
||||
poly2poly_check<PolygonType>::enter (const PolygonType &o1, size_t p1, const PolygonType &o2, size_t p2)
|
||||
{
|
||||
if ((! mp_output->different_polygons () || p1 != p2) && (! mp_output->requires_different_layers () || ((p1 ^ p2) & 1) != 0)) {
|
||||
|
||||
|
|
@ -438,8 +438,8 @@ poly2poly_check_base<PolygonType>::enter (const PolygonType &o1, size_t p1, cons
|
|||
}
|
||||
|
||||
// explicit instantiations
|
||||
template class poly2poly_check_base<db::Polygon>;
|
||||
template class poly2poly_check_base<db::PolygonRef>;
|
||||
template class poly2poly_check<db::Polygon>;
|
||||
template class poly2poly_check<db::PolygonRef>;
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// SinglePolygonCheck implementation
|
||||
|
|
@ -460,8 +460,8 @@ SinglePolygonCheck::process (const db::Polygon &polygon, std::vector<db::EdgePai
|
|||
check.set_min_projection (m_options.min_projection);
|
||||
check.set_max_projection (m_options.max_projection);
|
||||
|
||||
edge2edge_check<std::unordered_set<db::EdgePair> > edge_check (check, result, false /*=same polygons*/, false /*=same layers*/, m_options.shielded);
|
||||
poly2poly_check<db::Polygon, std::unordered_set<db::EdgePair> > poly_check (edge_check);
|
||||
edge2edge_check_negative_or_positive <std::unordered_set<db::EdgePair> > edge_check (check, result, m_options.negative, false /*=same polygons*/, false /*=same layers*/, m_options.shielded);
|
||||
poly2poly_check<db::Polygon> poly_check (edge_check);
|
||||
|
||||
do {
|
||||
poly_check.enter (polygon, 0);
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ private:
|
|||
* This class implements the edge-to-edge part of the polygon DRC.
|
||||
* This version has only negative edge output.
|
||||
*/
|
||||
template <class Output, class NegativeEdgeOutput>
|
||||
template <class NegativeEdgeOutput>
|
||||
class DB_PUBLIC_TEMPLATE edge2edge_check_negative
|
||||
: public Edge2EdgeCheckBase
|
||||
{
|
||||
|
|
@ -668,15 +668,55 @@ private:
|
|||
NegativeEdgeOutput *mp_l1_negative_output, *mp_l2_negative_output;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A helper class for the DRC functionality
|
||||
*
|
||||
* This class implements the edge-to-edge part of the polygon DRC.
|
||||
* This version has positive or negative output. Negative output is mapped to edge pairs
|
||||
* as well.
|
||||
*/
|
||||
template <class Output>
|
||||
class DB_PUBLIC_TEMPLATE edge2edge_check_negative_or_positive
|
||||
: public Edge2EdgeCheckBase
|
||||
{
|
||||
public:
|
||||
edge2edge_check_negative_or_positive (const EdgeRelationFilter &check, Output &output, bool negative_output, bool different_polygons, bool requires_different_layers, bool with_shielding)
|
||||
: Edge2EdgeCheckBase (check, different_polygons, requires_different_layers, with_shielding),
|
||||
mp_output (&output)
|
||||
{
|
||||
set_has_negative_edge_output (negative_output);
|
||||
set_has_edge_pair_output (! negative_output);
|
||||
}
|
||||
|
||||
protected:
|
||||
void put_negative (const db::Edge &edge, int layer) const
|
||||
{
|
||||
if (layer == 0) {
|
||||
mp_output->insert (db::EdgePair (edge, edge.swapped_points ()));
|
||||
}
|
||||
if (layer == 1) {
|
||||
mp_output->insert (db::EdgePair (edge.swapped_points (), edge));
|
||||
}
|
||||
}
|
||||
|
||||
void put (const db::EdgePair &edge) const
|
||||
{
|
||||
mp_output->insert (edge);
|
||||
}
|
||||
|
||||
private:
|
||||
Output *mp_output;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A helper class for the DRC functionality which acts as an edge pair receiver
|
||||
*/
|
||||
template <class PolygonType>
|
||||
class DB_PUBLIC poly2poly_check_base
|
||||
class DB_PUBLIC poly2poly_check
|
||||
: public db::box_scanner_receiver<PolygonType, size_t>
|
||||
{
|
||||
public:
|
||||
poly2poly_check_base (Edge2EdgeCheckBase &output);
|
||||
poly2poly_check (Edge2EdgeCheckBase &output);
|
||||
|
||||
void finish (const PolygonType *o, size_t p);
|
||||
void enter (const PolygonType&o, size_t p);
|
||||
|
|
@ -689,21 +729,6 @@ private:
|
|||
std::vector<db::Edge> m_edges;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A helper class for the DRC functionality which acts as an edge pair receiver
|
||||
*/
|
||||
template <class PolygonType, class Output>
|
||||
class DB_PUBLIC_TEMPLATE poly2poly_check
|
||||
: public poly2poly_check_base<PolygonType>
|
||||
{
|
||||
public:
|
||||
poly2poly_check (edge2edge_check<Output> &output)
|
||||
: poly2poly_check_base<PolygonType> (output)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A class wrapping the single-polygon checks into a polygon-to-edge pair processor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ static db::CompoundRegionOperationNode *new_edge_pair_to_second_edges (db::Compo
|
|||
return new db::CompoundRegionEdgePairToEdgeProcessingOperationNode (new db::EdgePairToSecondEdgesProcessor (), input, true /*processor is owned*/);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_check_node (db::edge_relation_type rel, bool different_polygons, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_check_node (db::edge_relation_type rel, bool different_polygons, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new db::CompoundRegionCheckOperationNode (rel, different_polygons, d,
|
||||
db::RegionCheckOptions (whole_edges,
|
||||
|
|
@ -363,11 +363,12 @@ static db::CompoundRegionOperationNode *new_check_node (db::edge_relation_type r
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite_filter,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_check_node (db::CompoundRegionOperationNode *input, db::edge_relation_type rel, bool different_polygons, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_check_node (db::CompoundRegionOperationNode *input, db::edge_relation_type rel, bool different_polygons, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
check_non_null (input, "input");
|
||||
return new db::CompoundRegionCheckOperationNode (input, rel, different_polygons, d,
|
||||
|
|
@ -378,11 +379,12 @@ static db::CompoundRegionOperationNode *new_check_node (db::CompoundRegionOperat
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite_filter,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_width_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
|
||||
static db::CompoundRegionOperationNode *new_width_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, bool negative)
|
||||
{
|
||||
db::RegionCheckOptions options (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -390,20 +392,21 @@ static db::CompoundRegionOperationNode *new_width_check (db::Coord d, bool whole
|
|||
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> (),
|
||||
shielded);
|
||||
options.negative = negative;
|
||||
return new db::CompoundRegionToEdgePairProcessingOperationNode (new db::SinglePolygonCheck (db::WidthRelation, d, options), new_primary (), true /*processor is owned*/);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_space_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_space_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new_check_node (db::SpaceRelation, false, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter);
|
||||
return new_check_node (db::SpaceRelation, false, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_isolated_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_isolated_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new_check_node (db::SpaceRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter);
|
||||
return new_check_node (db::SpaceRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_notch_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
|
||||
static db::CompoundRegionOperationNode *new_notch_check (db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, bool negative)
|
||||
{
|
||||
db::RegionCheckOptions options (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -411,22 +414,23 @@ static db::CompoundRegionOperationNode *new_notch_check (db::Coord d, bool whole
|
|||
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> (),
|
||||
shielded);
|
||||
options.negative = negative;
|
||||
return new db::CompoundRegionToEdgePairProcessingOperationNode (new db::SinglePolygonCheck (db::SpaceRelation, d, options), new_primary (), true /*processor is owned*/);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_separation_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_separation_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new_check_node (input, db::SpaceRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter);
|
||||
return new_check_node (input, db::SpaceRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_overlap_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_overlap_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new_check_node (input, db::OverlapRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter);
|
||||
return new_check_node (input, db::OverlapRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_inside_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter)
|
||||
static db::CompoundRegionOperationNode *new_inside_check (db::CompoundRegionOperationNode *input, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return new_check_node (input, db::InsideRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter);
|
||||
return new_check_node (input, db::InsideRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_perimeter_filter (db::CompoundRegionOperationNode *input, bool inverse, db::coord_traits<db::Coord>::perimeter_type pmin, db::coord_traits<db::Coord>::perimeter_type pmax)
|
||||
|
|
@ -578,25 +582,25 @@ Class<db::CompoundRegionOperationNode> decl_CompoundRegionOperationNode ("db", "
|
|||
gsi::constructor ("new_minkowsky_sum", &new_minkowsky_sum_node4, gsi::arg ("input"), gsi::arg ("p"),
|
||||
"@brief Creates a node providing a Minkowsky sum with a point sequence forming a contour.\n"
|
||||
) +
|
||||
gsi::constructor ("new_width_check", &new_width_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true),
|
||||
gsi::constructor ("new_width_check", &new_width_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing a width check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_space_check", &new_space_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed),
|
||||
gsi::constructor ("new_space_check", &new_space_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing a space check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_isolated_check", &new_isolated_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed),
|
||||
gsi::constructor ("new_isolated_check", &new_isolated_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing a isolated polygons (space between different polygons) check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_notch_check", &new_notch_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true),
|
||||
gsi::constructor ("new_notch_check", &new_notch_check, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing a intra-polygon space check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_separation_check", &new_separation_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed),
|
||||
gsi::constructor ("new_separation_check", &new_separation_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing a separation check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_overlap_check", &new_overlap_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed),
|
||||
gsi::constructor ("new_overlap_check", &new_overlap_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing an overlap check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_inside_check", &new_inside_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed),
|
||||
gsi::constructor ("new_inside_check", &new_inside_check, gsi::arg ("input"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter), gsi::arg ("rect_filter", db::NoSideAllowed), gsi::arg ("negative", false),
|
||||
"@brief Creates a node providing an inside (enclosure) check.\n"
|
||||
) +
|
||||
gsi::constructor ("new_perimeter_filter", &new_perimeter_filter, gsi::arg ("input"), gsi::arg ("inverse", false), gsi::arg ("pmin", 0), gsi::arg ("pmax", std::numeric_limits<db::coord_traits<db::Coord>::perimeter_type>::max (), "max"),
|
||||
|
|
|
|||
|
|
@ -438,18 +438,21 @@ static db::Region merged_ext2 (db::Region *r, bool min_coherence, int min_wc)
|
|||
return r->merged (min_coherence, std::max (0, min_wc - 1));
|
||||
}
|
||||
|
||||
static db::EdgePairs width2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
|
||||
static db::EdgePairs width2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, bool negative)
|
||||
{
|
||||
return r->width_check (d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
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> (),
|
||||
shielded)
|
||||
shielded,
|
||||
db::NoOppositeFilter,
|
||||
db::NoSideAllowed,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->space_check (d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -458,22 +461,26 @@ static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, b
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs notch2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded)
|
||||
static db::EdgePairs notch2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, bool negative)
|
||||
{
|
||||
return r->notch_check (d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
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> (),
|
||||
shielded)
|
||||
shielded,
|
||||
db::NoOppositeFilter,
|
||||
db::NoSideAllowed,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->isolated_check (d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -482,11 +489,12 @@ static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->inside_check (other, d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -495,11 +503,12 @@ static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->overlap_check (other, d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -508,11 +517,12 @@ static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db:
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->enclosing_check (other, d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -521,11 +531,12 @@ static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, d
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
static db::EdgePairs separation2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter)
|
||||
static db::EdgePairs separation2 (const db::Region *r, const db::Region &other, db::Region::distance_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite, db::RectFilter rect_filter, bool negative)
|
||||
{
|
||||
return r->separation_check (other, d, db::RegionCheckOptions (whole_edges,
|
||||
metrics,
|
||||
|
|
@ -534,7 +545,8 @@ static db::EdgePairs separation2 (const db::Region *r, const db::Region &other,
|
|||
max_projection.is_nil () ? std::numeric_limits<db::Region::distance_type>::max () : max_projection.to<db::Region::distance_type> (),
|
||||
shielded,
|
||||
opposite,
|
||||
rect_filter)
|
||||
rect_filter,
|
||||
negative)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -2027,7 +2039,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"\n"
|
||||
"@return The transformed region.\n"
|
||||
) +
|
||||
method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true),
|
||||
method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2036,6 +2048,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@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"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"This version is similar to the simple version with one parameter. In addition, it allows "
|
||||
"to specify many more options.\n"
|
||||
|
|
@ -2065,9 +2078,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded' option has been introduced in version 0.27."
|
||||
"The 'shielded' and 'negative' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2077,6 +2090,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2106,9 +2120,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("notch_check", ¬ch2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true),
|
||||
method_ext ("notch_check", ¬ch2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2117,6 +2131,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@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"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"This version is similar to the simple version with one parameter. In addition, it allows "
|
||||
"to specify many more options.\n"
|
||||
|
|
@ -2146,9 +2161,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded' option has been introduced in version 0.27."
|
||||
"The 'shielded' and 'negative' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("isolated_check", &isolated2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("isolated_check", &isolated2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2158,6 +2173,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2187,9 +2203,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("inside_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("inside_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2200,6 +2216,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2229,9 +2246,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2242,6 +2259,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2271,9 +2289,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2284,6 +2302,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2313,9 +2332,9 @@ 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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"),
|
||||
method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::metrics_type::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
|
||||
"@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"
|
||||
|
|
@ -2326,6 +2345,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"@param max_projection The upper limit of the projected length of one edge onto another\n"
|
||||
"@param opposite_filter Specifies a filter mode for errors happening on opposite sides of inputs shapes\n"
|
||||
"@param rect_filter Specifies an error filter for rectangular input shapes\n"
|
||||
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
|
||||
"\n"
|
||||
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
|
||||
"edges which contribute in the width check.\n"
|
||||
|
|
@ -2355,7 +2375,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"
|
||||
"\n"
|
||||
"The 'shielded', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27."
|
||||
) +
|
||||
method_ext ("area", &area1,
|
||||
"@brief The area of the region\n"
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ TEST(1_SimpleLShape)
|
|||
db::Polygon poly;
|
||||
poly.assign_hull (pts, pts + sizeof (pts) / sizeof (pts[0]));
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
// single polygon check
|
||||
|
|
@ -117,7 +117,7 @@ TEST(2_SimpleLWithBigPart)
|
|||
db::Polygon poly;
|
||||
poly.assign_hull (pts, pts + sizeof (pts) / sizeof (pts[0]));
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
// single polygon check
|
||||
|
|
@ -152,7 +152,7 @@ TEST(3_SimpleTWithBigPart)
|
|||
db::Polygon poly;
|
||||
poly.assign_hull (pts, pts + sizeof (pts) / sizeof (pts[0]));
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
// single polygon check
|
||||
|
|
@ -187,7 +187,7 @@ TEST(4_SimpleNotch)
|
|||
db::Polygon poly;
|
||||
poly.assign_hull (pts, pts + sizeof (pts) / sizeof (pts[0]));
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
// single polygon check
|
||||
|
|
@ -224,7 +224,7 @@ TEST(5_LShapeNotch)
|
|||
db::Polygon poly;
|
||||
poly.assign_hull (pts, pts + sizeof (pts) / sizeof (pts[0]));
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
// single polygon check
|
||||
|
|
@ -271,7 +271,7 @@ TEST(6_SeparationLvsBox)
|
|||
scanner.insert (&poly1, 0); // layer 0
|
||||
scanner.insert (&poly2, 1); // layer 1
|
||||
|
||||
db::poly2poly_check_base<db::Polygon> poly_check (e2e);
|
||||
db::poly2poly_check<db::Polygon> poly_check (e2e);
|
||||
|
||||
do {
|
||||
scanner.process (poly_check, er.distance (), db::box_convert<db::Polygon> ());
|
||||
|
|
|
|||
Loading…
Reference in New Issue