[consider merging] Bugfix: DRC collect_xyz is available now also for edge pair layers

This commit is contained in:
Matthias Koefferlein 2026-01-11 00:32:03 +01:00
parent c0059959b8
commit c3b6476176
2 changed files with 5 additions and 3 deletions

View File

@ -1714,7 +1714,7 @@ CODE
dbu_trans = RBA::VCplxTrans::new(1.0 / @engine.dbu)
@engine.run_timed("\\"#{f}\\" in: " + @engine.src_line, self.data) do
self.data.send(new_data.is_a?(RBA::EdgePairs) ? :each : :each_merged) do |object|
self.data.send(self.data.is_a?(RBA::EdgePairs) ? :each : :each_merged) do |object|
insert_object_into(new_data, block.call(object.transformed(t)), dbu_trans)
end
new_data

View File

@ -105,8 +105,10 @@ a1.edges.collect_to_region { |p| p.length < 0.8 && p.bbox.enlarged(0.1, 0.1) }.o
a1.edges.collect_to_region { |p| p.length < 0.8 && p.bbox.transformed(RBA::VCplxTrans::new(1000.0)).enlarged(100, 100) }.output(1123, 0)
# edge pair collect
a1.width(1.5).collect { |p| p.transformed(RBA::VCplxTrans::new(1000.0)) }.output(1120, 0)
a1.width(1.5).collect_to_edge_pairs { |p| p.transformed(RBA::VCplxTrans::new(1000.0)) }.output(1121, 0)
a1.width(1.5).collect { |p| p.transformed(RBA::VCplxTrans::new(1000.0)) }.output(1130, 0)
a1.width(1.5).collect_to_edge_pairs { |p| p.transformed(RBA::VCplxTrans::new(1000.0)) }.output(1131, 0)
a1.width(1.5).collect_to_edges { |p| p.transformed(RBA::VCplxTrans::new(1000.0)).first }.output(1132, 0)
a1.width(1.5).collect_to_region { |p| p.polygon(0.0).transformed(RBA::VCplxTrans::new(1000.0)) }.output(1133, 0)
expect_count(a1.edges, 9, 9, "a1.edges")
expect_count(a1.width(1.5), 5, 5, "a1.width(1.5)")