[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Geometry pkg Octave bug
From: |
PhilipNienhuis |
Subject: |
RE: Geometry pkg Octave bug |
Date: |
Fri, 14 Jun 2019 15:42:30 -0500 (CDT) |
Rodrigo:
1. please do not top-post, answer below the message
2. for my answer, see below
Rodrigo Eguíluz wrote
> Dear Juan Pablo and others,
>
> Thanks for the quick answer. I apologize for not using the maintainers
> mailing list. I will in the future.
>
>
> I have attached small script with the set of XY points of the 2 polygons
> and how clipPolygon is being called. At the current timestep, these 2
> polygons are not intersecting as you will see, but that has not caused
> this error in the past.
>
> [cid:image001.png@01D52214.38763960]
>
>
>
> Answering your question about the OS, I am using Windows 10.
>
> Once again, thank you.
>
> Regards,
> Rodrigo
>
> -----Original Message-----
> From: Juan Pablo Carbajal [mailto:
> ajuanpi+dev@
> ]
> Sent: Thursday, June 13, 2019 08:52
> To: Rodrigo Eguíluz <
> REguiluz@
> >; Maintainers GNU Octave <
> octave-maintainers@
> >; Philip Nienhuis <
> pr.nienhuis@
> >
> Subject: Re: Geometry pkg Octave bug
When I run it in a self-compiled Octave-5.1.1, I get:
>> [outpol , ~] = clipPolygon(jet,Rotora,1)
error: zeros: conversion of 2.5 to int64_t value failed
error: called from
__dbl2int64__ at line 40 column 8
clipPolygon_clipper at line 96 column 29
clipPolygon at line 93 column 15
and that is a bug I fixed quite a while ago. Since then no new geometry
package has been released, so I wonder how you can get any meaningful
result.
In a self-compiled octave-6.0.0 from early June, using development versions
of the geometry and matgeom packages, I get:
>> help clipPolygon
'clipPolygon' is a function from the file
C:\Programs\Octave\OCTAVE~2.0_2\mingw64\share\octave\packages\matgeom-1.0.0\polygons2d\clipPolygon.m
====================================================
CLIPPOLYGON Clip a polygon with a rectangular box
POLY2 = clipPolygon(POLY, BOX);
POLY is [Nx2] array of points
BOX has the form: [XMIN XMAX YMIN YMAX].
Returns the polygon created by the itnersection of the polygon POLY and
the bounding box BOX.
Note: Works only for convex polygons at the moment.
====================================================
so it turns out that the clipPolygon I wrote as wrapper for the geometry
package is shadowed by a primitive one in the matgeom package.
To access that shadowed one I did
pkg unload geometry
pkg load geometry, an then:
====================================================
>> [outpol , ~] = clipPolygon(jet,Rotora,1)
outpol = [](0x2)
====================================================
-or-
====================================================
>> [outpol , ~] = clipPolygon_clipper(jet,Rotora,1)
outpol = [](0x2)
====================================================
which is the correct result,
-but-
====================================================
>> [outpol , ~] = clipPolygon_mrf(jet,Rotora,1)
error: out of memory or dimension too large for Octave's index type
error: called from
clipPolygon_mrf at line 104 column 16
====================================================
which implies the mrf method doesn't get built properly or is incompatible
with Octave-6.0.0.
That's as far as I have time right now.
@JuanPi I suppose the issues are:
- matgeom now shadows functions in the geometry package with quite inferior
stuff;
- the mrf polygon clipping functions doesn't work.
Philip
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html