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

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

[Octave-patch-tracker] [patch #9000] Polgon functions for geometry/mappi


From: Juan Pablo Carbajal
Subject: [Octave-patch-tracker] [patch #9000] Polgon functions for geometry/mapping package
Date: Thu, 26 May 2016 17:51:00 +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 #1, patch #9000 (project octave):

Hi,
Thanks!
I am trying to merge this into geometry.
I have some questions

* drwpatch 
 Why is this function calling polyclip? If the holes are already given in the
input argument, why do we need to clip again?
I will probably merge this function with current filklPolygon or make a new
one called drawPolygonPatch

* optimize_branch_cuts
 We shouldn't check for installed packages. Let the function fail when it
calls the geometry functions. The error should make the
user aware of the missing function.

Trying out the function I use this code

p  = [0 0; 0 1; 1 1; 1 0]; %ccw
ph = p + [1.2 0];
# add hole
ph(end+1,:) = nan;
ph          = [ph; ([0 0; 1 0; 1 1; 0 1]-[0.5 0.5])*0.5+[1.7 0.5]];
po = optimize_branch_cuts(ph);
patch (po(:,1), po(:,2))


But the patch doesn't look correct. It has the hole alright, but the I get
edges that go from the outer polygon to inner polygon:  (bottom left)->(bottom
left) and (bottom left)->(top left). I am missing something?

    _______________________________________________________

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]