diff --git a/src/ruby/mask_data.rb b/src/ruby/mask_data.rb index 7f4789d..8dcb496 100644 --- a/src/ruby/mask_data.rb +++ b/src/ruby/mask_data.rb @@ -318,11 +318,9 @@ def produce_geom(xy, z, into, through, on, taper, bias, mode, buried, method) end d &= RBA::Region::new(into_data) - - poly = [] - d.each { |p| poly << p } - return poly - + + # Keep polygons touching the surface + return d.interacting(me).each.collect { |p| p } end # Computes the convolution of the edge sequence with the kernel