[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56506] [octave-forge] (geometry) clpPolygon_m
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #56506] [octave-forge] (geometry) clpPolygon_mrf crashes on non-overlapping polygons |
Date: |
Fri, 21 Jun 2019 14:19:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48 |
Update of bug #56506 (project octave):
Status: None => Patch Submitted
Assigned to: juanpi => philipnienhuis
_______________________________________________________
Follow-up Comment #1:
Indeed, the issue was integer overflow after subtracting 1 from a zero-valued
octave_idx_type.
Now I get:
>> subpol = [0 0; 5 5; 2.5 4;0 0];
>> clppol2 = [10 1; 16 6; 13.5 5; 10 1];
>> [outpol, f] = clipPolygon_mrf (subpol, clppol2, 1)
outpol = [](0x0)
f = 0
cset attached. I hope it's not too much of a kludge.
@JuanPi:
BTW, in this case polybool_mrf.oct returns a [](0x0) value for the output
polygon. Wouldn't you think it better returns a [](0x2) empty array? I can
imagine some script concatenating output polygons from boolean operations and
that would error out if it tried to add this 0x0 empty value to an Nx2 array.
I leave to you to decide (and optionally adapt polygon_mrf.cc).
(file #47119)
_______________________________________________________
Additional Item Attachment:
File name: bug#56506_polybool_mrf.cset Size:1 KB
<https://savannah.gnu.org/file/bug#56506_polybool_mrf.cset?file_id=47119>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56506>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/