mirror of https://github.com/KLayout/klayout.git
WIP: more tests, debugging
This commit is contained in:
parent
9c6e0129d9
commit
3707fae3c2
|
|
@ -835,6 +835,7 @@ void compound_region_generic_operation_node<TS, TI, TR>::implement_compute_local
|
|||
|
||||
const CompoundRegionOperationNode *self = child (0);
|
||||
std::vector<std::unordered_set<TS> > self_result;
|
||||
self_result.push_back (std::unordered_set<TS> ());
|
||||
|
||||
shape_interactions<TTS, TTI> self_interactions_heap;
|
||||
const shape_interactions<TTS, TTI> &self_interactions = interactions_for_child (interactions, 0, self_interactions_heap);
|
||||
|
|
@ -851,6 +852,7 @@ void compound_region_generic_operation_node<TS, TI, TR>::implement_compute_local
|
|||
|
||||
const CompoundRegionOperationNode *intruder = child (ci);
|
||||
std::vector<std::unordered_set<TI> > intruder_result;
|
||||
intruder_result.push_back (std::unordered_set<TI> ());
|
||||
|
||||
shape_interactions<TTS, TTI> intruder_interactions_heap;
|
||||
const shape_interactions<TTS, TTI> &intruder_interactions = interactions_for_child (interactions, ci, intruder_interactions_heap);
|
||||
|
|
|
|||
|
|
@ -137,9 +137,6 @@ TEST(3_BooleanOperations)
|
|||
reader.read (ly);
|
||||
}
|
||||
|
||||
db::RegionCheckOptions check_options;
|
||||
check_options.metrics = db::Projection;
|
||||
|
||||
unsigned int l1 = ly.get_layer (db::LayerProperties (1, 0));
|
||||
db::Region r (db::RecursiveShapeIterator (ly, ly.cell (*ly.begin_top_down ()), l1));
|
||||
|
||||
|
|
@ -166,3 +163,73 @@ TEST(3_BooleanOperations)
|
|||
db::compare_layouts (_this, ly, tl::testsrc () + "/testdata/drc/compound_au3.gds");
|
||||
}
|
||||
|
||||
TEST(4_SizeOperation)
|
||||
{
|
||||
db::Layout ly;
|
||||
{
|
||||
std::string fn (tl::testsrc ());
|
||||
fn += "/testdata/drc/compound_4.gds";
|
||||
tl::InputStream stream (fn);
|
||||
db::Reader reader (stream);
|
||||
reader.read (ly);
|
||||
}
|
||||
|
||||
unsigned int l1 = ly.get_layer (db::LayerProperties (1, 0));
|
||||
db::Region r (db::RecursiveShapeIterator (ly, ly.cell (*ly.begin_top_down ()), l1));
|
||||
|
||||
unsigned int l2 = ly.get_layer (db::LayerProperties (2, 0));
|
||||
db::Region r2 (db::RecursiveShapeIterator (ly, ly.cell (*ly.begin_top_down ()), l2));
|
||||
|
||||
db::CompoundRegionOperationPrimaryNode *primary = new db::CompoundRegionOperationPrimaryNode ();
|
||||
db::CompoundRegionSizeOperationNode geo_size (250, 250, 2, primary);
|
||||
|
||||
db::Region res = r.cop_to_region (geo_size);
|
||||
|
||||
unsigned int l1000 = ly.get_layer (db::LayerProperties (1000, 0));
|
||||
res.insert_into (&ly, *ly.begin_top_down (), l1000);
|
||||
|
||||
db::CompoundRegionOperationSecondaryNode *secondary = new db::CompoundRegionOperationSecondaryNode (&r2);
|
||||
db::CompoundRegionSizeOperationNode geo_size2 (-250, -250, 2, secondary);
|
||||
|
||||
res = r.cop_to_region (geo_size2);
|
||||
|
||||
unsigned int l1001 = ly.get_layer (db::LayerProperties (1001, 0));
|
||||
res.insert_into (&ly, *ly.begin_top_down (), l1001);
|
||||
|
||||
CHECKPOINT();
|
||||
db::compare_layouts (_this, ly, tl::testsrc () + "/testdata/drc/compound_au4.gds");
|
||||
}
|
||||
|
||||
TEST(5_InteractOperation)
|
||||
{
|
||||
db::Layout ly;
|
||||
{
|
||||
std::string fn (tl::testsrc ());
|
||||
fn += "/testdata/drc/compound_5.gds";
|
||||
tl::InputStream stream (fn);
|
||||
db::Reader reader (stream);
|
||||
reader.read (ly);
|
||||
}
|
||||
|
||||
db::RegionCheckOptions check_options;
|
||||
check_options.metrics = db::Projection;
|
||||
|
||||
unsigned int l1 = ly.get_layer (db::LayerProperties (1, 0));
|
||||
db::Region r (db::RecursiveShapeIterator (ly, ly.cell (*ly.begin_top_down ()), l1));
|
||||
|
||||
unsigned int l2 = ly.get_layer (db::LayerProperties (2, 0));
|
||||
db::Region r2 (db::RecursiveShapeIterator (ly, ly.cell (*ly.begin_top_down ()), l2));
|
||||
|
||||
db::CompoundRegionOperationPrimaryNode *primary = new db::CompoundRegionOperationPrimaryNode ();
|
||||
db::CompoundRegionOperationSecondaryNode *secondary = new db::CompoundRegionOperationSecondaryNode (&r2);
|
||||
db::CompoundRegionInteractOperationNode interact (primary, secondary, 0, true, false);
|
||||
|
||||
db::Region res = r.cop_to_region (interact);
|
||||
|
||||
unsigned int l1000 = ly.get_layer (db::LayerProperties (1000, 0));
|
||||
res.insert_into (&ly, *ly.begin_top_down (), l1000);
|
||||
|
||||
CHECKPOINT();
|
||||
db::compare_layouts (_this, ly, tl::testsrc () + "/testdata/drc/compound_au5.gds");
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue