Implemented low-level option for collinear edge handling in Edges and Region

This commit is contained in:
Matthias Koefferlein 2024-01-24 14:22:05 +01:00
parent 899985e616
commit fcdec05863
4 changed files with 185 additions and 53 deletions

View File

@ -234,63 +234,69 @@ static db::Edges with_angle3 (const db::Edges *r, db::SpecialEdgeOrientationFilt
return r->filtered (f); return r->filtered (f);
} }
static db::EdgePairs width2 (const db::Edges *r, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs width2 (const db::Edges *r, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->width_check (d, db::EdgesCheckOptions (whole_edges, return r->width_check (d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
static db::EdgePairs space2 (const db::Edges *r, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs space2 (const db::Edges *r, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->space_check (d, db::EdgesCheckOptions (whole_edges, return r->space_check (d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
static db::EdgePairs inside2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs inside2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->inside_check (other, d, db::EdgesCheckOptions (whole_edges, return r->inside_check (other, d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
static db::EdgePairs overlap2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs overlap2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->overlap_check (other, d, db::EdgesCheckOptions (whole_edges, return r->overlap_check (other, d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
static db::EdgePairs enclosing2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs enclosing2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->enclosing_check (other, d, db::EdgesCheckOptions (whole_edges, return r->enclosing_check (other, d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
static db::EdgePairs separation2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection) static db::EdgePairs separation2 (const db::Edges *r, const db::Edges &other, db::Edges::coord_type d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, db::collinear_mode_type collinear_mode)
{ {
return r->separation_check (other, d, db::EdgesCheckOptions (whole_edges, return r->separation_check (other, d, db::EdgesCheckOptions (whole_edges,
metrics, metrics,
ignore_angle.is_nil () ? 90 : ignore_angle.to_double (), ignore_angle.is_nil () ? 90 : ignore_angle.to_double (),
min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (), min_projection.is_nil () ? db::Edges::distance_type (0) : min_projection.to<db::Edges::distance_type> (),
max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> ()) max_projection.is_nil () ? std::numeric_limits<db::Edges::distance_type>::max () : max_projection.to<db::Edges::distance_type> (),
collinear_mode)
); );
} }
@ -1399,7 +1405,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"\n" "\n"
"This variant has been introduced in version 0.27." "This variant has been introduced in version 0.27."
) + ) +
method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("width_check", &width2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a width check with options\n" "@brief Performs a width check with options\n"
"@param d The minimum width for which the edges are checked\n" "@param d The minimum width for which the edges are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -1407,6 +1413,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -1424,8 +1431,10 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"It is sufficient if the projection of one edge on the other matches the specified condition. " "It is sufficient if the projection of one edge on the other matches the specified condition. "
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". " "The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("space_check", &space2, gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a space check with options\n" "@brief Performs a space check with options\n"
"@param d The minimum distance for which the edges are checked\n" "@param d The minimum distance for which the edges are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -1433,6 +1442,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the space check.\n" "edges which contribute in the space check.\n"
@ -1450,8 +1460,10 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"It is sufficient if the projection of one edge on the other matches the specified condition. " "It is sufficient if the projection of one edge on the other matches the specified condition. "
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". " "The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("inside_check|enclosed_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("inside_check|enclosed_check", &inside2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an inside check with options\n" "@brief Performs an inside check with options\n"
"@param d The minimum distance for which the edges are checked\n" "@param d The minimum distance for which the edges are checked\n"
"@param other The other edge collection against which to check\n" "@param other The other edge collection against which to check\n"
@ -1460,6 +1472,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -1479,8 +1492,9 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n" "\n"
"The 'enclosed_check' alias was introduced in version 0.27.5.\n" "The 'enclosed_check' alias was introduced in version 0.27.5.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("enclosing_check", &enclosing2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an enclosing check with options\n" "@brief Performs an enclosing check with options\n"
"@param d The minimum distance for which the edges are checked\n" "@param d The minimum distance for which the edges are checked\n"
"@param other The other edge collection against which to check\n" "@param other The other edge collection against which to check\n"
@ -1489,6 +1503,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -1506,8 +1521,10 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"It is sufficient if the projection of one edge on the other matches the specified condition. " "It is sufficient if the projection of one edge on the other matches the specified condition. "
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". " "The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("overlap_check", &overlap2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an overlap check with options\n" "@brief Performs an overlap check with options\n"
"@param d The minimum distance for which the edges are checked\n" "@param d The minimum distance for which the edges are checked\n"
"@param other The other edge collection against which to check\n" "@param other The other edge collection against which to check\n"
@ -1516,6 +1533,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -1533,8 +1551,10 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"It is sufficient if the projection of one edge on the other matches the specified condition. " "It is sufficient if the projection of one edge on the other matches the specified condition. "
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". " "The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max"), method_ext ("separation_check", &separation2, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::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 ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an overlap check with options\n" "@brief Performs an overlap check with options\n"
"@param d The minimum distance for which the edges are checked\n" "@param d The minimum distance for which the edges are checked\n"
"@param other The other edge collection against which to check\n" "@param other The other edge collection against which to check\n"
@ -1543,6 +1563,7 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"@param ignore_angle The threshold angle above which no check is performed\n" "@param ignore_angle The threshold 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 min_projection The lower threshold of the projected length of one edge onto another\n"
"@param max_projection The upper threshold of the projected length of one edge onto another\n" "@param max_projection The upper threshold of the projected length of one edge onto another\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -1560,6 +1581,8 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
"It is sufficient if the projection of one edge on the other matches the specified condition. " "It is sufficient if the projection of one edge on the other matches the specified condition. "
"The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". " "The projected length must be larger or equal to \"min_projection\" and less than \"max_projection\". "
"If you don't want to specify one threshold, pass nil to the respective value.\n" "If you don't want to specify one threshold, pass nil to the respective value.\n"
"\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("extents", &extents0, method_ext ("extents", &extents0,
"@brief Returns a region with the bounding boxes of the edges\n" "@brief Returns a region with the bounding boxes of the edges\n"

View File

@ -526,7 +526,7 @@ 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)); 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, bool negative, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->width_check (d, db::RegionCheckOptions (whole_edges, return r->width_check (d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -537,11 +537,12 @@ static db::EdgePairs width2 (const db::Region *r, db::Region::distance_type d, b
db::NoOppositeFilter, db::NoOppositeFilter,
db::NoRectFilter, db::NoRectFilter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->notch_check (d, db::RegionCheckOptions (whole_edges, return r->notch_check (d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -552,11 +553,12 @@ static db::EdgePairs notch2 (const db::Region *r, db::Region::distance_type d, b
db::NoOppositeFilter, db::NoOppositeFilter,
db::NoRectFilter, db::NoRectFilter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->isolated_check (d, db::RegionCheckOptions (whole_edges, return r->isolated_check (d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -567,11 +569,12 @@ static db::EdgePairs isolated2 (const db::Region *r, db::Region::distance_type d
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->space_check (d, db::RegionCheckOptions (whole_edges, return r->space_check (d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -582,11 +585,12 @@ static db::EdgePairs space2 (const db::Region *r, db::Region::distance_type d, b
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->inside_check (other, d, db::RegionCheckOptions (whole_edges, return r->inside_check (other, d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -597,11 +601,12 @@ static db::EdgePairs inside2 (const db::Region *r, const db::Region &other, db::
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->overlap_check (other, d, db::RegionCheckOptions (whole_edges, return r->overlap_check (other, d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -612,11 +617,12 @@ static db::EdgePairs overlap2 (const db::Region *r, const db::Region &other, db:
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->enclosing_check (other, d, db::RegionCheckOptions (whole_edges, return r->enclosing_check (other, d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -627,11 +633,12 @@ static db::EdgePairs enclosing2 (const db::Region *r, const db::Region &other, d
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
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, db::PropertyConstraint prop_constraint) 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, db::PropertyConstraint prop_constraint, db::collinear_mode_type collinear_mode)
{ {
return r->separation_check (other, d, db::RegionCheckOptions (whole_edges, return r->separation_check (other, d, db::RegionCheckOptions (whole_edges,
metrics, metrics,
@ -642,7 +649,8 @@ static db::EdgePairs separation2 (const db::Region *r, const db::Region &other,
opposite, opposite,
rect_filter, rect_filter,
negative, negative,
prop_constraint) prop_constraint,
collinear_mode)
); );
} }
@ -2589,7 +2597,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n" "\n"
"This variant was introduced in version 0.27.\n" "This variant was introduced in version 0.27.\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), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a width check with options\n" "@brief Performs a width check with options\n"
"@param d The minimum width for which the polygons are checked\n" "@param d The minimum width for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -2600,6 +2608,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param shielded Enables shielding\n" "@param shielded Enables shielding\n"
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n" "@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
"@param property_constraint Only \\IgnoreProperties and \\NoPropertyConstraint are allowed - in the last case, properties are copied from the original shapes to the output. " "@param property_constraint Only \\IgnoreProperties and \\NoPropertyConstraint are allowed - in the last case, properties are copied from the original shapes to the output. "
"@param collinear_mode Specifies how to handle collinear edges\n"
"Other than 'width' allow more options here.\n" "Other than 'width' allow more options here.\n"
"\n" "\n"
"This version is similar to the simple version with one parameter. In addition, it allows " "This version is similar to the simple version with one parameter. In addition, it allows "
@ -2630,9 +2639,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n" "Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n"
"\n" "\n"
"The 'shielded' and 'negative' options have been introduced in version 0.27. " "The 'shielded' and 'negative' options have been introduced in version 0.27. "
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a space check with options\n" "@brief Performs a space check with options\n"
"@param d The minimum space for which the polygons are checked\n" "@param d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -2644,6 +2654,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input 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" "@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2673,9 +2684,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n" "Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n"
"\n" "\n"
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27.\n" "The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("notch_check", &notch2, 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), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), method_ext ("notch_check", &notch2, 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), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a space check between edges of the same polygon with options\n" "@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 d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -2687,6 +2699,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n" "@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param property_constraint Only \\IgnoreProperties and \\NoPropertyConstraint are allowed - in the last case, properties are copied from the original shapes to the output" "@param property_constraint Only \\IgnoreProperties and \\NoPropertyConstraint are allowed - in the last case, properties are copied from the original shapes to the output"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"This version is similar to the simple version with one parameter. In addition, it allows " "This version is similar to the simple version with one parameter. In addition, it allows "
"to specify many more options.\n" "to specify many more options.\n"
@ -2716,9 +2729,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n" "Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n"
"\n" "\n"
"The 'shielded' and 'negative' options have been introduced in version 0.27.\n" "The 'shielded' and 'negative' options have been introduced in version 0.27.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a space check between edges of different polygons with options\n" "@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 d The minimum space for which the polygons are checked\n"
"@param whole_edges If true, deliver the whole edges\n" "@param whole_edges If true, deliver the whole edges\n"
@ -2730,6 +2744,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input 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" "@param negative If true, edges not violation the condition will be output as pseudo-edge pairs\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2759,9 +2774,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n" "Merged semantics applies for the input of this method (see \\merged_semantics= for a description of this concept)\n"
"\n" "\n"
"The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27.\n" "The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("inside_check|enclosed_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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), method_ext ("inside_check|enclosed_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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an inside check with options\n" "@brief Performs an inside check with options\n"
"@param d The minimum distance for which the polygons are checked\n" "@param d The minimum distance for which the polygons are checked\n"
"@param other The other region against which to check\n" "@param other The other region against which to check\n"
@ -2774,6 +2790,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input shapes\n" "@param rect_filter Specifies an error filter for rectangular input shapes\n"
"@param negative Negative output from the first input\n" "@param negative Negative output from the first input\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2810,9 +2827,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"The 'shielded', 'negative', '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. "
"The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n" "The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n"
"The 'enclosed_check' alias was introduced in version 0.27.5.\n" "The 'enclosed_check' alias was introduced in version 0.27.5.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an overlap check with options\n" "@brief Performs an overlap check with options\n"
"@param d The minimum overlap for which the polygons are checked\n" "@param d The minimum overlap for which the polygons are checked\n"
"@param other The other region against which to check\n" "@param other The other region against which to check\n"
@ -2825,6 +2843,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input shapes\n" "@param rect_filter Specifies an error filter for rectangular input shapes\n"
"@param negative Negative output from the first input\n" "@param negative Negative output from the first input\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2860,9 +2879,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n" "\n"
"The 'shielded', 'negative', '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. "
"The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n" "The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs an enclosing check with options\n" "@brief Performs an enclosing check with options\n"
"@param d The minimum enclosing distance for which the polygons are checked\n" "@param d The minimum enclosing distance for which the polygons are checked\n"
"@param other The other region against which to check\n" "@param other The other region against which to check\n"
@ -2875,6 +2895,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input shapes\n" "@param rect_filter Specifies an error filter for rectangular input shapes\n"
"@param negative Negative output from the first input\n" "@param negative Negative output from the first input\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2910,9 +2931,10 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n" "\n"
"The 'shielded', 'negative', '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. "
"The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n" "The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), 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::NoRectFilter, "NoRectFilter"), gsi::arg ("negative", false), gsi::arg ("property_constraint", db::IgnoreProperties, "IgnoreProperties"), gsi::arg ("collinear_mode", db::IncludeCollinearWhenTouch, "IncludeCollinearWhenTouch"),
"@brief Performs a separation check with options\n" "@brief Performs a separation check with options\n"
"@param d The minimum separation for which the polygons are checked\n" "@param d The minimum separation for which the polygons are checked\n"
"@param other The other region against which to check\n" "@param other The other region against which to check\n"
@ -2925,6 +2947,7 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"@param rect_filter Specifies an error filter for rectangular input shapes\n" "@param rect_filter Specifies an error filter for rectangular input shapes\n"
"@param negative Negative output from the first input\n" "@param negative Negative output from the first input\n"
"@param property_constraint Specifies whether to consider only shapes with a certain property relation\n" "@param property_constraint Specifies whether to consider only shapes with a certain property relation\n"
"@param collinear_mode Specifies how to handle collinear edges\n"
"\n" "\n"
"If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole " "If \"whole_edges\" is true, the resulting \\EdgePairs collection will receive the whole "
"edges which contribute in the width check.\n" "edges which contribute in the width check.\n"
@ -2960,7 +2983,8 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n" "\n"
"The 'shielded', 'negative', '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. "
"The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n" "The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1.\n"
"'property_constraint' has been added in version 0.28.4." "'property_constraint' has been added in version 0.28.4.\n"
"'collinear_mode' has been added in version 0.29."
) + ) +
method_ext ("area", &area1, method_ext ("area", &area1,
"@brief The area of the region\n" "@brief The area of the region\n"
@ -3234,6 +3258,11 @@ gsi::Enum<db::metrics_type> decl_Metrics ("db", "Metrics",
"This enum has been introduced in version 0.27." "This enum has been introduced in version 0.27."
); );
// Inject the Region::Metrics declarations into Region and Edges:
// (Edges injection has to be done here because only here defs() is available)
gsi::ClassExt<db::Region> inject_Metrics_in_Region (decl_Metrics.defs ());
gsi::ClassExt<db::Edges> inject_Metrics_in_Edges (decl_Metrics.defs ());
gsi::Enum<db::collinear_mode_type> decl_CollinearMode ("db", "CollinearMode", gsi::Enum<db::collinear_mode_type> decl_CollinearMode ("db", "CollinearMode",
gsi::enum_const ("NeverIncludeCollinear", db::NeverIncludeCollinear, gsi::enum_const ("NeverIncludeCollinear", db::NeverIncludeCollinear,
"@brief Specifies that check functions should never include collinear edges.\n" "@brief Specifies that check functions should never include collinear edges.\n"
@ -3258,10 +3287,10 @@ gsi::Enum<db::collinear_mode_type> decl_CollinearMode ("db", "CollinearMode",
"This enum has been introduced in version 0.29." "This enum has been introduced in version 0.29."
); );
// Inject the Region::Metrics declarations into Region and Edges: // Inject the Region::CollinearMode declarations into Region and Edges:
// (Edges injection has to be done here because only here defs() is available) // (Edges injection has to be done here because only here defs() is available)
gsi::ClassExt<db::Region> inject_Metrics_in_Region (decl_Metrics.defs ()); gsi::ClassExt<db::Region> inject_CollinearMode_in_Region (decl_CollinearMode.defs ());
gsi::ClassExt<db::Edges> inject_Metrics_in_Edges (decl_Metrics.defs ()); gsi::ClassExt<db::Edges> inject_CollinearMode_in_Edges (decl_CollinearMode.defs ());
gsi::Enum<db::PropertyConstraint> decl_PropertyConstraint ("db", "PropertyConstraint", gsi::Enum<db::PropertyConstraint> decl_PropertyConstraint ("db", "PropertyConstraint",
gsi::enum_const ("IgnoreProperties", db::IgnoreProperties, gsi::enum_const ("IgnoreProperties", db::IgnoreProperties,

View File

@ -476,6 +476,48 @@ class DBEdges_TestClass < TestBase
assert_equal((r2 | r1).width_check(60, true, RBA::Edges::Projection, nil, 50, nil).to_s, "(120,20;120,380)/(130,380;130,20)") assert_equal((r2 | r1).width_check(60, true, RBA::Edges::Projection, nil, 50, nil).to_s, "(120,20;120,380)/(130,380;130,20)")
assert_equal((r2 | r1).width_check(60, true, RBA::Edges::Projection, nil, nil, 50).to_s, "(50,200;50,220)/(100,400;100,0)") assert_equal((r2 | r1).width_check(60, true, RBA::Edges::Projection, nil, nil, 50).to_s, "(50,200;50,220)/(100,400;100,0)")
# kissing corner/separation case
r1 = RBA::Region::new
r1.insert(RBA::Box::new(0, 0, 100, 200))
r1 = r1.edges
r2 = RBA::Region::new
r2.insert(RBA::Box::new(100, 200, 200, 400))
r2 = r2.edges
r3a = RBA::Region::new
r3a.insert(RBA::Box::new(-10, 0, 110, 100))
r3a = r3a.edges
r3b = RBA::Region::new
r3b.insert(RBA::Box::new(10, 0, 90, 100))
r3b = r3b.edges
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(160,200;100,200)/(40,200;100,200)"))
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(160,200;100,200)/(40,200;100,200)"))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(160,200;100,200)/(40,200;100,200)"))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(160,200;100,200)/(40,200;100,200)"))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,0;0,0)/(90,0;10,0)"))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,0;0,0)/(90,0;10,0)"))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,0;0,0)/(110,0;-10,0)"))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,0;0,0)/(110,0;-10,0)"))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, RBA::Edges::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
end end
# with.. # with..

View File

@ -550,6 +550,44 @@ class DBRegion_TestClass < TestBase
assert_equal((r1 | r2).merged.width_check(60, true, RBA::Region::Projection, nil, 50, nil).to_s, "(120,20;120,380)|(130,380;130,20)") assert_equal((r1 | r2).merged.width_check(60, true, RBA::Region::Projection, nil, 50, nil).to_s, "(120,20;120,380)|(130,380;130,20)")
assert_equal((r1 | r2).merged.width_check(60, true, RBA::Region::Projection, nil, nil, 50).to_s, "(50,200;50,220)|(100,400;100,0)") assert_equal((r1 | r2).merged.width_check(60, true, RBA::Region::Projection, nil, nil, 50).to_s, "(50,200;50,220)|(100,400;100,0)")
# kissing corner/separation case
r1 = RBA::Region::new
r1.insert(RBA::Box::new(0, 0, 100, 200))
r2 = RBA::Region::new
r2.insert(RBA::Box::new(100, 200, 200, 400))
r3a = RBA::Region::new
r3a.insert(RBA::Box::new(-10, 0, 110, 100))
r3b = RBA::Region::new
r3b.insert(RBA::Box::new(10, 0, 90, 100))
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)|(100,200;100,260);(40,200;100,200)|(160,200;100,200)"))
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, true, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort((r2 | r1).width_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, true, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)|(100,200;100,260);(40,200;100,200)|(160,200;100,200)"))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)|(100,200;100,260);(40,200;100,200)|(160,200;100,200)"))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort((r2 | r1).space_check(60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)|(100,200;100,260);(40,200;100,200)|(160,200;100,200)"))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.separation_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,0;0,0)/(90,0;10,0)"))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.inside_check(r3b, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,0;0,0)/(90,0;10,0)"))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,0;0,0)/(110,0;-10,0)"))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.enclosing_check(r3a, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,0;0,0)/(110,0;-10,0)"))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::NeverIncludeCollinear).to_s), csort(""))
assert_equal(csort(r1.overlap_check(r2, 60, false, RBA::Edges::Euclidian, nil, nil, nil, true, RBA::Region::NoOppositeFilter, RBA::Region::NoRectFilter, false, RBA::Region::IgnoreProperties, RBA::Region::IncludeCollinearWhenTouch).to_s), csort("(100,200;100,140)/(100,200;100,260);(40,200;100,200)/(160,200;100,200)"))
end end
# Others # Others