Quantcast

GSoC 2017 - Implement boolean operations on polygons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GSoC 2017 - Implement boolean operations on polygons

abhishek singla
My name is Abhishek Singla. I am interested in working on the idea " Implement boolean operations on polygons". 
I have knowledge of C++ and have also used octave as part of my curriculum in subject Numerical Mathematics.
I want to contribute to the idea as I think I possess the required skill set for this. But I do not know how to start working on it.
I would highly appreciate if you could give me a brief procedure on how to get started on this idea. 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

PhilipNienhuis
abhishek singla wrote
My name is Abhishek Singla. I am interested in working on the idea
" Implement boolean operations on polygons".
I have knowledge of C++ and have also used octave as part of my curriculum
in subject Numerical Mathematics.
I want to contribute to the idea as I think I possess the required skill
set for this. But I do not know how to start working on it.
I would highly appreciate if you could give me a brief procedure on how to
get started on this idea.
The description of this project needs to be adapted.
Last year most of this has already been implemented (by Amr Keleg who did good work), but not yet integrated into the geometry or mapping package. To get that far several issues have to be solved:

- Weeding out the Boost library dependency (comprising just include files). In the eyes of the involved package maintainers (who weren't involved as mentors) this is a ridiculously large library compared to the two or three functions that use it.

- Polishing the existing code (a.o., error catching, input validation, etc).

- Making the code independent of just one Boost version (currently 1.60).

More info in the patch tracker, see patch #9000.

I doubt if the above three together would qualify for a GSOC project.

Philip
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Sat, Mar 4, 2017 at 6:14 PM, PhilipNienhuis <[hidden email]> wrote:

> abhishek singla wrote
>> My name is Abhishek Singla. I am interested in working on the idea
>> " Implement boolean operations on polygons".
>> I have knowledge of C++ and have also used octave as part of my curriculum
>> in subject Numerical Mathematics.
>> I want to contribute to the idea as I think I possess the required skill
>> set for this. But I do not know how to start working on it.
>> I would highly appreciate if you could give me a brief procedure on how to
>> get started on this idea.
>
> The description of this project needs to be adapted.
> Last year most of this has already been implemented (by Amr Keleg who did
> good work), but not yet integrated into the geometry or mapping package. To
> get that far several issues have to be solved:
>
> - Weeding out the Boost library dependency (comprising just include files).
> In the eyes of the involved package maintainers (who weren't involved as
> mentors) this is a ridiculously large library compared to the two or three
> functions that use it.
>
> - Polishing the existing code (a.o., error catching, input validation, etc).
>
> - Making the code independent of just one Boost version (currently 1.60).
>
> More info in the patch tracker, see patch #9000.
>
> I doubt if the above three together would qualify for a GSOC project.
>
> Philip
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682164.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>
Hi,

Exactly as Phillip said, the interaciont with boost has to be more clever.

If you want to move in another direction, binding to CGAL[1] would be
another option. This will also allows us to have many other cool
functions for geometry.
Now this approach might be worth a new package maybe called CGAL.
Just to have it in mind. Choose wisely (hint: the boost cleaning up is
simpler).

[1]: http://doc.cgal.org/latest/Boolean_set_operations_2/index.html

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Richard Crozier


On 04/03/17 23:13, Juan Pablo Carbajal wrote:

> On Sat, Mar 4, 2017 at 6:14 PM, PhilipNienhuis <[hidden email]> wrote:
>> abhishek singla wrote
>>> My name is Abhishek Singla. I am interested in working on the idea
>>> " Implement boolean operations on polygons".
>>> I have knowledge of C++ and have also used octave as part of my curriculum
>>> in subject Numerical Mathematics.
>>> I want to contribute to the idea as I think I possess the required skill
>>> set for this. But I do not know how to start working on it.
>>> I would highly appreciate if you could give me a brief procedure on how to
>>> get started on this idea.
>>
>> The description of this project needs to be adapted.
>> Last year most of this has already been implemented (by Amr Keleg who did
>> good work), but not yet integrated into the geometry or mapping package. To
>> get that far several issues have to be solved:
>>
>> - Weeding out the Boost library dependency (comprising just include files).
>> In the eyes of the involved package maintainers (who weren't involved as
>> mentors) this is a ridiculously large library compared to the two or three
>> functions that use it.
>>
>> - Polishing the existing code (a.o., error catching, input validation, etc).
>>
>> - Making the code independent of just one Boost version (currently 1.60).
>>
>> More info in the patch tracker, see patch #9000.
>>
>> I doubt if the above three together would qualify for a GSOC project.
>>
>> Philip
>>
>>
>>
>> --
>> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682164.html
>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>
> Hi,
>
> Exactly as Phillip said, the interaciont with boost has to be more clever.
>
> If you want to move in another direction, binding to CGAL[1] would be
> another option. This will also allows us to have many other cool
> functions for geometry.
> Now this approach might be worth a new package maybe called CGAL.
> Just to have it in mind. Choose wisely (hint: the boost cleaning up is
> simpler).
>
> [1]: http://doc.cgal.org/latest/Boolean_set_operations_2/index.html
>
>

I'd be wary of CGAL, I tried to create a wrapper, see here:

https://github.com/crobarcro/mpolycsg

but I found their algorithms to have limitations that made them of no
use to me, see:

http://cgal-discuss.949826.n4.nabble.com/CGAL-difference-on-Nef-polyhedron-produces-shape-with-duplicate-vertices-td4659760.html#a4659782

That was a couple of years ago now, so maybe they fixed the issues, but
their code is very complex and difficult to use, and far inferior to,
say, OpenCASCADE which would be far more useful.

There is a python interface to OpenCASCADE based on SWIG (see
http://www.pythonocc.org/), there is also FreeCAD, which is a GUI
program, but also a standalone python interface to OpenCASCADE geometry
modelling routines and probably simpler to copy if anyone was interested.

Richard




--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Mon, Mar 6, 2017 at 5:03 PM, Richard Crozier <[hidden email]> wrote:

>
>
> On 04/03/17 23:13, Juan Pablo Carbajal wrote:
>>
>> On Sat, Mar 4, 2017 at 6:14 PM, PhilipNienhuis <[hidden email]>
>> wrote:
>>>
>>> abhishek singla wrote
>>>>
>>>> My name is Abhishek Singla. I am interested in working on the idea
>>>> " Implement boolean operations on polygons".
>>>> I have knowledge of C++ and have also used octave as part of my
>>>> curriculum
>>>> in subject Numerical Mathematics.
>>>> I want to contribute to the idea as I think I possess the required skill
>>>> set for this. But I do not know how to start working on it.
>>>> I would highly appreciate if you could give me a brief procedure on how
>>>> to
>>>> get started on this idea.
>>>
>>>
>>> The description of this project needs to be adapted.
>>> Last year most of this has already been implemented (by Amr Keleg who did
>>> good work), but not yet integrated into the geometry or mapping package.
>>> To
>>> get that far several issues have to be solved:
>>>
>>> - Weeding out the Boost library dependency (comprising just include
>>> files).
>>> In the eyes of the involved package maintainers (who weren't involved as
>>> mentors) this is a ridiculously large library compared to the two or
>>> three
>>> functions that use it.
>>>
>>> - Polishing the existing code (a.o., error catching, input validation,
>>> etc).
>>>
>>> - Making the code independent of just one Boost version (currently 1.60).
>>>
>>> More info in the patch tracker, see patch #9000.
>>>
>>> I doubt if the above three together would qualify for a GSOC project.
>>>
>>> Philip
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682164.html
>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>
>> Hi,
>>
>> Exactly as Phillip said, the interaciont with boost has to be more clever.
>>
>> If you want to move in another direction, binding to CGAL[1] would be
>> another option. This will also allows us to have many other cool
>> functions for geometry.
>> Now this approach might be worth a new package maybe called CGAL.
>> Just to have it in mind. Choose wisely (hint: the boost cleaning up is
>> simpler).
>>
>> [1]: http://doc.cgal.org/latest/Boolean_set_operations_2/index.html
>>
>>
>
> I'd be wary of CGAL, I tried to create a wrapper, see here:
>
> https://github.com/crobarcro/mpolycsg
>
> but I found their algorithms to have limitations that made them of no use to
> me, see:
>
> http://cgal-discuss.949826.n4.nabble.com/CGAL-difference-on-Nef-polyhedron-produces-shape-with-duplicate-vertices-td4659760.html#a4659782
>
> That was a couple of years ago now, so maybe they fixed the issues, but
> their code is very complex and difficult to use, and far inferior to, say,
> OpenCASCADE which would be far more useful.
>
> There is a python interface to OpenCASCADE based on SWIG (see
> http://www.pythonocc.org/), there is also FreeCAD, which is a GUI program,
> but also a standalone python interface to OpenCASCADE geometry modelling
> routines and probably simpler to copy if anyone was interested.
>
> Richard
>
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>

Hi Richard,

I use CGAl without much troubles but I will check the links.

I think the philosophy is to provide bindings many bindings and let
the user choose which one they use. We will have low level functions
like
clipPolygons_boost.m, clipPolygons_cgal.m, clipPolygons_openCascade.m,
etc.., and then a front-end function clipPolygon.m which would provide
a friendly interface, input checking and maybe input formatting.

Since OpenCasecade has a python interface the decision to amke would
be whether we use it via the future octpy or we write another one
using the Octave C++ API.

As I said, since the boost interface is already in place, one could
improve that one as a low hanging fruit.

Regards,

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

piyushjain
In reply to this post by PhilipNienhuis
Sir,
Are we supposed to work on the existing Octclip package?
Can you give some initial idea or relevant link on how to use library to implement these functions?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
Hi,

We tried to merge octclip in the past but due to maintainers decision
we rever it to two different packages.
We can add a wrapper in the gometry package that calls octclip boolean
functions if necessary, but this is not the kind of work we are aiming
at.

We like to have C++ interfaces in Octave to C++ polygon clipping
libraries. Examples: boost, cgal, clipper, etc...
We would like some unsecure no-overhead m-file using these functions
and then merge them all under a secure front-end function, see how it
done for orientation of polygon

https://sourceforge.net/p/octave/geometry/ci/default/tree/inst/polygons2d/isPolygonCCW.m

Feel free to suggest better ways of doing this.

Regards,



On Wed, Mar 8, 2017 at 2:18 PM, piyushjain <[hidden email]> wrote:

> Sir,
> Are we supposed to work on the existing Octclip package?
> Can you give some initial idea or relevant link on how to use library to
> implement these functions?
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682210.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

José Luis García Pallero
2017-03-08 16:40 GMT+01:00 Juan Pablo Carbajal <[hidden email]>:

> Hi,
>
> We tried to merge octclip in the past but due to maintainers decision
> we rever it to two different packages.
> We can add a wrapper in the gometry package that calls octclip boolean
> functions if necessary, but this is not the kind of work we are aiming
> at.
>
> We like to have C++ interfaces in Octave to C++ polygon clipping
> libraries. Examples: boost, cgal, clipper, etc...
> We would like some unsecure no-overhead m-file using these functions
> and then merge them all under a secure front-end function, see how it
> done for orientation of polygon
>
> https://sourceforge.net/p/octave/geometry/ci/default/tree/inst/polygons2d/isPolygonCCW.m
>
> Feel free to suggest better ways of doing this.
>
> Regards,
>
>
>
> On Wed, Mar 8, 2017 at 2:18 PM, piyushjain <[hidden email]> wrote:
>> Sir,
>> Are we supposed to work on the existing Octclip package?
>> Can you give some initial idea or relevant link on how to use library to
>> implement these functions?

Hello:

OctCLIP is an implementation of the Greiner-Hormann algorithm
(http://davis.wpi.edu/~matt/courses/clipping/), which is a NON ROBUST
algorithm in the sense that it needs to perturb vertex in special
cases. I wrote the code some years ago because for me was enough, even
with its non robustness (and also because I needed a pure C polygon
clipping implementation, and I couldn't find any).

I'm not following this discussion in the list, but why not to use CGAL
in Octave? AFAIK, it is a well tested library and is (L)GPL

Cheers

>>
>>
>>
>> --
>> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682210.html
>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>
>



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

José Luis García Pallero
2017-03-08 16:52 GMT+01:00 José Luis García Pallero <[hidden email]>:

> 2017-03-08 16:40 GMT+01:00 Juan Pablo Carbajal <[hidden email]>:
>> Hi,
>>
>> We tried to merge octclip in the past but due to maintainers decision
>> we rever it to two different packages.
>> We can add a wrapper in the gometry package that calls octclip boolean
>> functions if necessary, but this is not the kind of work we are aiming
>> at.
>>
>> We like to have C++ interfaces in Octave to C++ polygon clipping
>> libraries. Examples: boost, cgal, clipper, etc...
>> We would like some unsecure no-overhead m-file using these functions
>> and then merge them all under a secure front-end function, see how it
>> done for orientation of polygon
>>
>> https://sourceforge.net/p/octave/geometry/ci/default/tree/inst/polygons2d/isPolygonCCW.m
>>
>> Feel free to suggest better ways of doing this.
>>
>> Regards,
>>
>>
>>
>> On Wed, Mar 8, 2017 at 2:18 PM, piyushjain <[hidden email]> wrote:
>>> Sir,
>>> Are we supposed to work on the existing Octclip package?
>>> Can you give some initial idea or relevant link on how to use library to
>>> implement these functions?
>
> Hello:
>
> OctCLIP is an implementation of the Greiner-Hormann algorithm
> (http://davis.wpi.edu/~matt/courses/clipping/), which is a NON ROBUST
> algorithm in the sense that it needs to perturb vertex in special
> cases. I wrote the code some years ago because for me was enough, even
> with its non robustness (and also because I needed a pure C polygon
> clipping implementation, and I couldn't find any).
>
> I'm not following this discussion in the list, but why not to use CGAL
> in Octave? AFAIK, it is a well tested library and is (L)GPL

The documentation shows some examples:
http://doc.cgal.org/latest/Boolean_set_operations_2/index.html

>
> Cheers
>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682210.html
>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>
>>
>
>
>
> --
> *****************************************
> José Luis García Pallero
> [hidden email]
> (o<
> / / \
> V_/_
> Use Debian GNU/Linux and enjoy!
> *****************************************



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

José Luis García Pallero
There is also an algorithm for boolean operations on polygons by
Francisco Martínez del Río
(http://www4.ujaen.es/~fmartin/bool_op.html). Hi put his C++ code in
public domain and also provides an imlementation based on CGAL exact
kernels. Maybe it could be considered for Octave


2017-03-08 16:53 GMT+01:00 José Luis García Pallero <[hidden email]>:

> 2017-03-08 16:52 GMT+01:00 José Luis García Pallero <[hidden email]>:
>> 2017-03-08 16:40 GMT+01:00 Juan Pablo Carbajal <[hidden email]>:
>>> Hi,
>>>
>>> We tried to merge octclip in the past but due to maintainers decision
>>> we rever it to two different packages.
>>> We can add a wrapper in the gometry package that calls octclip boolean
>>> functions if necessary, but this is not the kind of work we are aiming
>>> at.
>>>
>>> We like to have C++ interfaces in Octave to C++ polygon clipping
>>> libraries. Examples: boost, cgal, clipper, etc...
>>> We would like some unsecure no-overhead m-file using these functions
>>> and then merge them all under a secure front-end function, see how it
>>> done for orientation of polygon
>>>
>>> https://sourceforge.net/p/octave/geometry/ci/default/tree/inst/polygons2d/isPolygonCCW.m
>>>
>>> Feel free to suggest better ways of doing this.
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Wed, Mar 8, 2017 at 2:18 PM, piyushjain <[hidden email]> wrote:
>>>> Sir,
>>>> Are we supposed to work on the existing Octclip package?
>>>> Can you give some initial idea or relevant link on how to use library to
>>>> implement these functions?
>>
>> Hello:
>>
>> OctCLIP is an implementation of the Greiner-Hormann algorithm
>> (http://davis.wpi.edu/~matt/courses/clipping/), which is a NON ROBUST
>> algorithm in the sense that it needs to perturb vertex in special
>> cases. I wrote the code some years ago because for me was enough, even
>> with its non robustness (and also because I needed a pure C polygon
>> clipping implementation, and I couldn't find any).
>>
>> I'm not following this discussion in the list, but why not to use CGAL
>> in Octave? AFAIK, it is a well tested library and is (L)GPL
>
> The documentation shows some examples:
> http://doc.cgal.org/latest/Boolean_set_operations_2/index.html
>
>>
>> Cheers
>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682210.html
>>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>>
>>>
>>
>>
>>
>> --
>> *****************************************
>> José Luis García Pallero
>> [hidden email]
>> (o<
>> / / \
>> V_/_
>> Use Debian GNU/Linux and enjoy!
>> *****************************************
>
>
>
> --
> *****************************************
> José Luis García Pallero
> [hidden email]
> (o<
> / / \
> V_/_
> Use Debian GNU/Linux and enjoy!
> *****************************************



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

piyushjain
In reply to this post by José Luis García Pallero
Sir,
I read CGAL Manual about implementation of boolean operations for simple and relatively simple polygons and polygon with holes.
Now , to create a C++ interface in Octave for the same, I read something called mkoctfile command which compiles source code written in C/C++. Am I following right ? Or any other suggestion to proceed?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Mon, Mar 13, 2017 at 1:07 PM, piyushjain <[hidden email]> wrote:

>
> Sir,
> I read CGAL Manual about implementation of boolean operations for simple and
> relatively simple polygons and polygon with holes.
> Now , to create a C++ interface in Octave for the same, I read something
> called mkoctfile command which compiles source code written in C/C++. Am I
> following right ? Or any other suggestion to proceed?
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682322.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>

Yes, you are in the right track. Do check already exiisting oct-files
to see how to do it. For example check the current geometry package
development. You can also see other packages like fem-fenics.
Also, do not forget that it might be easier to polish the current boos
interface.
https://bitbucket.org/amr_keleg/octave-geometry

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

piyushjain
Sir, I went through the current geometry package development and also read about mkoctfile command, and how to use oct create and use oct-files.

So, can you tell me what are the milestones of the project? I mean,going step-wise, what do I need to implement?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Thu, Mar 16, 2017 at 9:56 PM, piyushjain <[hidden email]> wrote:

> Sir, I went through the current geometry package development and also read
> about mkoctfile command, and how to use oct create and use oct-files.
>
> So, can you tell me what are the milestones of the project? I mean,going
> step-wise, what do I need to implement?
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>
So you know what you want to pursue already?
1. Cleanning up the boost interface
2. Adding clipper interface, read this
https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options
3. Adding CGAL interface

When you know that, it is easy to set up goals. I suggest you choose
something that provides a working example quickly, so we can check
your code and see what do we need to strengthen, in the case we can
select you.

Warning: CGAL might be challenging if you are not used to c++ templates

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

PhilipNienhuis
Juan Pablo Carbajal-2 wrote
On Thu, Mar 16, 2017 at 9:56 PM, piyushjain <[hidden email]> wrote:
> Sir, I went through the current geometry package development and also read
> about mkoctfile command, and how to use oct create and use oct-files.
>
> So, can you tell me what are the milestones of the project? I mean,going
> step-wise, what do I need to implement?
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>
So you know what you want to pursue already?
1. Cleanning up the boost interface
2. Adding clipper interface, read this
https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options
From my memory, the Clipper interface should be about done.
I'm still busy with making it clip polylines (works now) and interpolating Z values (got stuck there); but for "ordinary" 2D polygons I think it just works as it is.

Philip
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Fri, Mar 17, 2017 at 9:41 AM, PhilipNienhuis <[hidden email]> wrote:

> Juan Pablo Carbajal-2 wrote
>> On Thu, Mar 16, 2017 at 9:56 PM, piyushjain &lt;
>
>> piyushjain1sa@
>
>> &gt; wrote:
>>> Sir, I went through the current geometry package development and also
>>> read
>>> about mkoctfile command, and how to use oct create and use oct-files.
>>>
>>> So, can you tell me what are the milestones of the project? I mean,going
>>> step-wise, what do I need to implement?
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>
>> So you know what you want to pursue already?
>> 1. Cleanning up the boost interface
>> 2. Adding clipper interface, read this
>> https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options
>
> From my memory, the Clipper interface should be about done.
> I'm still busy with making it clip polylines (works now) and interpolating Z
> values (got stuck there); but for "ordinary" 2D polygons I think it just
> works as it is.
>
> Philip
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682445.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>

In that case I suggest you provide patches to integrate Philip work
into geomtry, following the guidelines described in that savanah
thread.
I was planning to do this in Octconf so I will give you quick feedback
if you provide something beginning of next week.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

PhilipNienhuis
Juan Pablo Carbajal wrote:

> On Fri, Mar 17, 2017 at 9:41 AM, PhilipNienhuis <[hidden email]> wrote:
>> Juan Pablo Carbajal-2 wrote
>>> On Thu, Mar 16, 2017 at 9:56 PM, piyushjain &lt;
>>
>>> piyushjain1sa@
>>
>>> &gt; wrote:
>>>> Sir, I went through the current geometry package development and also
>>>> read
>>>> about mkoctfile command, and how to use oct create and use oct-files.
>>>>
>>>> So, can you tell me what are the milestones of the project? I mean,going
>>>> step-wise, what do I need to implement?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
>>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>>
>>> So you know what you want to pursue already?
>>> 1. Cleanning up the boost interface
>>> 2. Adding clipper interface, read this
>>> https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options
>>
>> From my memory, the Clipper interface should be about done.
>> I'm still busy with making it clip polylines (works now) and interpolating Z
>> values (got stuck there); but for "ordinary" 2D polygons I think it just
>> works as it is.
>>
>> Philip
>>
>>
>>
>> --
>> View this message in context: http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682445.html
>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>
>
> In that case I suggest you provide patches to integrate Philip work
> into geomtry, following the guidelines described in that savanah
> thread.
> I was planning to do this in Octconf so I will give you quick feedback
> if you provide something beginning of next week.

Chances are I'll be at OctConf 2017 as well, so then JuanPi and I could
discuss things there.

Philip

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

piyushjain
In reply to this post by Juan Pablo Carbajal-2
Sir,
I have tried to implement polyUnion using Clipper library just to show you my work.
Link : https://github.com/piyush-jain1/Octave-geometry
Have a look at it and guide further.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

John Swensen-3
In reply to this post by Juan Pablo Carbajal-2

On Mar 17, 2017, at 2:56 AM, Juan Pablo Carbajal <[hidden email]> wrote:

On Fri, Mar 17, 2017 at 9:41 AM, PhilipNienhuis <[hidden email]> wrote:
Juan Pablo Carbajal-2 wrote
On Thu, Mar 16, 2017 at 9:56 PM, piyushjain &lt;

piyushjain1sa@

&gt; wrote:
Sir, I went through the current geometry package development and also
read
about mkoctfile command, and how to use oct create and use oct-files.

So, can you tell me what are the milestones of the project? I mean,going
step-wise, what do I need to implement?



--
View this message in context:
http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.

So you know what you want to pursue already?
1. Cleanning up the boost interface
2. Adding clipper interface, read this
https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options

From my memory, the Clipper interface should be about done.
I'm still busy with making it clip polylines (works now) and interpolating Z
values (got stuck there); but for "ordinary" 2D polygons I think it just
works as it is.

Philip



--

In that case I suggest you provide patches to integrate Philip work
into geomtry, following the guidelines described in that savanah
thread.
I was planning to do this in Octconf so I will give you quick feedback
if you provide something beginning of next week.


One final comment. I know I pushed the Boost solution because at the time I thought it had the most robust solution for self-intersecting polygons, polygons with parallel lines, etc. I now feel a little bad that we spent all that time and it hasn’t been incorporated into the package. It is quite cumbersome to get Boost set up to compile with the version that supports self-intersection correction. I think that more work could be done to make it a much better solution by making a “Point concept abstraction” that would allow it to operate on the Octave variable data in-place without having to copy. For larger datasets, this could be a huge memory (and potentially performance) improvement over the other solutions where you have to transform the Octave data into the format required by the library.

Has anyone ever explored the license for GPC (http://www.cs.man.ac.uk/~toby/gpc/)? It says it is free for private/hobbyist/education purposes, but I don’t know whether the license is compatible with the GPL and Octave. From my experience, GPC is one of the fastest and most robust polygon clipper out there. Maybe we overlooked it because of its split license and the fact that the license isn’t very well defined?

John S.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GSoC 2017 - Implement boolean operations on polygons

Juan Pablo Carbajal-2
On Fri, Mar 17, 2017 at 7:52 PM, John Swensen <[hidden email]> wrote:

>
> On Mar 17, 2017, at 2:56 AM, Juan Pablo Carbajal <[hidden email]>
> wrote:
>
> On Fri, Mar 17, 2017 at 9:41 AM, PhilipNienhuis <[hidden email]>
> wrote:
>
> Juan Pablo Carbajal-2 wrote
>
> On Thu, Mar 16, 2017 at 9:56 PM, piyushjain &lt;
>
>
> piyushjain1sa@
>
>
> &gt; wrote:
>
> Sir, I went through the current geometry package development and also
> read
> about mkoctfile command, and how to use oct create and use oct-files.
>
> So, can you tell me what are the milestones of the project? I mean,going
> step-wise, what do I need to implement?
>
>
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/GSoC-2017-Implement-boolean-operations-on-polygons-tp4682161p4682435.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>
> So you know what you want to pursue already?
> 1. Cleanning up the boost interface
> 2. Adding clipper interface, read this
> https://savannah.gnu.org/patch/?func=detailitem&item_id=9000#options
>
>
> From my memory, the Clipper interface should be about done.
> I'm still busy with making it clip polylines (works now) and interpolating Z
> values (got stuck there); but for "ordinary" 2D polygons I think it just
> works as it is.
>
> Philip
>
>
>
> --
>
>
> In that case I suggest you provide patches to integrate Philip work
> into geomtry, following the guidelines described in that savanah
> thread.
> I was planning to do this in Octconf so I will give you quick feedback
> if you provide something beginning of next week.
>
>
> One final comment. I know I pushed the Boost solution because at the time I
> thought it had the most robust solution for self-intersecting polygons,
> polygons with parallel lines, etc. I now feel a little bad that we spent all
> that time and it hasn’t been incorporated into the package. It is quite
> cumbersome to get Boost set up to compile with the version that supports
> self-intersection correction. I think that more work could be done to make
> it a much better solution by making a “Point concept abstraction” that would
> allow it to operate on the Octave variable data in-place without having to
> copy. For larger datasets, this could be a huge memory (and potentially
> performance) improvement over the other solutions where you have to
> transform the Octave data into the format required by the library.
>
> Has anyone ever explored the license for GPC
> (http://www.cs.man.ac.uk/~toby/gpc/)? It says it is free for
> private/hobbyist/education purposes, but I don’t know whether the license is
> compatible with the GPL and Octave. From my experience, GPC is one of the
> fastest and most robust polygon clipper out there. Maybe we overlooked it
> because of its split license and the fact that the license isn’t very well
> defined?
>
> John S.

Hi John,

Do not feel bad, somebody has to start doing something, and you did
it. We should salvage as much as we can from the work done.
Will you be at OctConf?

12
Loading...