octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9000] Polygon functions for geometry/mapp


From: Juan Pablo Carbajal
Subject: [Octave-patch-tracker] [patch #9000] Polygon functions for geometry/mapping package
Date: Thu, 26 May 2016 22:31:56 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36

Follow-up Comment #3, patch #9000 (project octave):

Hi Philip,

Ok, so the function polyclip is just saying which one of the subpolygons
(separated by nan rows) are ccw (outer polygons, guess should be considered as
union) and which ones are cw (holes, to be substracted from the union of outer
polygons).

Maybe polyclip is not the best name. I think isPolyCW or (iscw) might be
better. When we get the all the functions we will select the best in terms of
performance.

In the geometry package we always make sure the polygons are closed before
plotting. So we always add a point repeating the last/first one. I would do
that to avoid the problem I had with optimize_branch_cuts...name is still very
unhappy...

Regarding dependency with other packages. Just let the functions fail, the
error should give the user a hint of what packages to install (because they
get a "missing XX function" error).
This reduces the amount of checks you have to do and simplifies code.

I would definitely like to have multiple functions doing the same thing, so we
just need to agree on good names for them.
I will probably decorate the name of the function with the external library
they use and then provide an interface function with the most general name.
For example

clipPolygon.m

can call

clipPolygon_clipper.m
clipPolygon_boost.m
clipPolygon_native.m

depending on a user defined argument. clipPolygon would do all the input
sanity checks and error handling, the clipPolgon_* functions would be unsafe
and terser.

This also allows for clipping in systems without boost or clipper.

PS: I am adding Mohamed to the CC list

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?9000>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]