mirror of https://github.com/KLayout/klayout.git
WIP: deep mode and complex DRC ops, debugging
This commit is contained in:
parent
493024734d
commit
dcaa0d0ea5
|
|
@ -83,20 +83,26 @@ CompoundRegionOperationNode::generated_description () const
|
|||
static void translate (db::Layout *layout, const std::vector<std::unordered_set<db::Polygon> > &in, std::vector<std::unordered_set<db::PolygonRef> > &out)
|
||||
{
|
||||
tl_assert (layout != 0);
|
||||
if (out.size () <= in.size ()) {
|
||||
out.resize (in.size ());
|
||||
}
|
||||
for (std::vector<std::unordered_set<db::Polygon> >::const_iterator r = in.begin (); r != in.end (); ++r) {
|
||||
out.push_back (std::unordered_set<db::PolygonRef> ());
|
||||
std::unordered_set<db::PolygonRef> &o = out[r - in.begin ()];
|
||||
for (std::unordered_set<db::Polygon>::const_iterator p = r->begin (); p != r->end (); ++p) {
|
||||
out.back ().insert (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
o.insert (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void translate (db::Layout *, const std::vector<std::unordered_set<db::PolygonRef> > &in, std::vector<std::unordered_set<db::Polygon> > &out)
|
||||
{
|
||||
if (out.size () <= in.size ()) {
|
||||
out.resize (in.size ());
|
||||
}
|
||||
for (std::vector<std::unordered_set<db::PolygonRef> >::const_iterator r = in.begin (); r != in.end (); ++r) {
|
||||
out.push_back (std::unordered_set<db::Polygon> ());
|
||||
std::unordered_set<db::Polygon> &o = out[r - in.begin ()];
|
||||
for (std::unordered_set<db::PolygonRef>::const_iterator p = r->begin (); p != r->end (); ++p) {
|
||||
out.back ().insert (p->obj ().transformed (p->trans ()));
|
||||
o.insert (p->obj ().transformed (p->trans ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -874,8 +880,8 @@ template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::
|
|||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionLogicalCaseSelectOperationNode::CompoundRegionLogicalCaseSelectOperationNode (bool multi_layer, const std::vector<CompoundRegionOperationNode *> &inputs)
|
||||
: CompoundRegionMultiInputOperationNode (inputs), m_multi_layer (multi_layer)
|
||||
CompoundRegionLogicalCaseSelectOperationNode::CompoundRegionLogicalCaseSelectOperationNode (const std::vector<CompoundRegionOperationNode *> &inputs)
|
||||
: CompoundRegionMultiInputOperationNode (inputs), m_multi_layer (false) // TODO: multi-output mode not supported so far.
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ class DB_PUBLIC CompoundRegionLogicalCaseSelectOperationNode
|
|||
: public CompoundRegionMultiInputOperationNode
|
||||
{
|
||||
public:
|
||||
CompoundRegionLogicalCaseSelectOperationNode (bool multi_layer, const std::vector<CompoundRegionOperationNode *> &inputs);
|
||||
CompoundRegionLogicalCaseSelectOperationNode (const std::vector<CompoundRegionOperationNode *> &inputs);
|
||||
|
||||
virtual std::string generated_description () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ static db::CompoundRegionOperationNode *new_outside (db::CompoundRegionOperation
|
|||
|
||||
static db::CompoundRegionOperationNode *new_case (const std::vector<db::CompoundRegionOperationNode *> &inputs)
|
||||
{
|
||||
return new db::CompoundRegionLogicalCaseSelectOperationNode (false, inputs);
|
||||
return new db::CompoundRegionLogicalCaseSelectOperationNode (inputs);
|
||||
}
|
||||
|
||||
static db::CompoundRegionOperationNode *new_corners_as_rectangles_node (db::CompoundRegionOperationNode *input, double angle_start, double angle_end, db::Coord dim = 1)
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ void run_test9 (tl::TestBase *_this, bool deep)
|
|||
db::CompoundRegionProcessingOperationNode *result_default = new db::CompoundRegionProcessingOperationNode (new db::Extents (), primary, true);
|
||||
inputs.push_back (result_default);
|
||||
|
||||
db::CompoundRegionLogicalCaseSelectOperationNode select_node (false, inputs);
|
||||
db::CompoundRegionLogicalCaseSelectOperationNode select_node (inputs);
|
||||
|
||||
db::Region res = r.cop_to_region (select_node);
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue