New DRC features:

* inside, not_inside, outside, not_outside (edge/edge, edge/polygon)
* related select_*
* split_inside, split_outside (edge/edge, edge/polygon)
* andnot (edge/edge, edge/polygon)
* inside_outside_part (edge/polygon)
This commit is contained in:
Matthias Koefferlein
2022-08-31 23:38:23 +02:00
parent 81b605c197
commit c720e2d3eb
4 changed files with 119 additions and 27 deletions
+8 -27
View File
@@ -2858,29 +2858,6 @@ CODE
CODE
end
%w(split_inside split_outside).each do |f|
eval <<"CODE"
def #{f}(other, *args)
@engine._context("#{f}") do
check_is_layer(other)
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
elsif self.data.is_a?(RBA::Region)
other.requires_region
end
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data, *minmax_count(*args))
[ DRCLayer::new(@engine, res[0]), DRCLayer::new(@engine, res[1]) ]
end
end
CODE
end
%w(overlapping not_overlapping covering not_covering).each do |f|
eval <<"CODE"
@@ -2971,15 +2948,19 @@ CODE
%w(split_inside split_outside).each do |f|
eval <<"CODE"
def #{f}(other)
def #{f}(other, *args)
@engine._context("#{f}") do
check_is_layer(other)
requires_region
other.requires_region
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
elsif self.data.is_a?(RBA::Region)
other.requires_region
end
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data)
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data, *minmax_count(*args))
[ DRCLayer::new(@engine, res[0]), DRCLayer::new(@engine, res[1]) ]
end