octave-maintainers
[Top][All Lists]
Advanced

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

Re: GSoC '16 - Boolean Operations on Polygons : Merge Code to geometry P


From: John Swensen
Subject: Re: GSoC '16 - Boolean Operations on Polygons : Merge Code to geometry Package
Date: Mon, 15 Aug 2016 08:47:53 -0700


On Aug 15, 2016, at 8:05 AM, Philip Nienhuis <address@hidden> wrote:

Juan Pablo Carbajal wrote:
Hi all,

I am sorry for the delay. I am quite behind updating several patches I
got for geometry. I will check the bitbucket repo and see how long it
will take me to integrate these changes (hopefully not much!).

After a quick look, what is the include/poli2try folder? Is it meant
to be part of the package?

Juan /others

Now that I am (just) back from vacation it appears to me that Amr has implemented several functions that have already been submitted earlier on in patch #9000; most of them have matgeom counterparts that are already in the geometry package. In hindsight I think the communication between John S. as mentor and you and me as involved package maintainers could have been better :-(

Once I have my holiday backlog sorted out (~end of this week) I'll try to make an overview of the various implementations of the function we now have so that we can decide what goes where. Some performance tests might be helpful.
IMO some of the new functions should go in geometry, some in mapping. Patch #9000 is still a good start.

As to polytri, that is a dependency hat Amr hasn't mentioned - it is a library for triangulation that can transform patches-with-holes into a triangulated surface for the filled part(s). It is merely meant for drawing polygons (and as such indispensable although polycut does merely the same - hopefully the polytri solution is faster).

Philip


Sorry, that is probably my fault. I guess I had missed this bug/patch. We had gone and looked at the splitPolygon and joinPolygon in the geometry package repository, but I don’t recall why we didn’t just repurpose those.

We had discussed the usage of clipper vs Boost.Polygon vs Boost.Geometry vs one other library at the outset. We had seen an implementation of the polybool using Clipper, but there was some discussion about whether converting to 64 bit integer, performing the boolean operations, then converting back to floating point numbers was the correct approach. We had decided to us Boost.Geometry instead because of its ability to use float/double as the core representation, has emerging support for correcting self-intersections, and it very actively being maintained by a community of GIS professionals. Maybe we should have gotten permission/blessing from you guys as maintainers before heading in that direction full-force.

poly2tri is a library I have used with great success in the past for doing triangulations of polygons with holes. I had seen that one of you was working on the polycut function, but because the poly2tri library has been around for so long, seems to have the majority of kinks and corner cases worked out, and it involved including a relatively small number of source files as a dependency, that it would be an ideal solution to implementing the poly2fv function. Sometimes I like to re-invent the wheel because I learn a lot about what is really going on under the hood, and other times I just want to use an algorithm that I know works well. This was one of those latter cases.

I don’t think Amr has checked it into his repository yet, but one of the really great things he accomplished was to take all of the polygon tests from http://www.angusj.com/delphi/clipper.php and implement them to run in both Matlab and Octave. This allows us to compare performance between both Matlab and Octave, other non-Octave implementation, and the alternative Octave implementations that were in this Patch #9000.

I apologize if we duplicated work unnecessarily. That was not our intent. I think Amr has done a pretty good job and any shortcomings are really my fault for not keeping tabs with you two better.

John S.






reply via email to

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