Pointers for implementing convex hull as 2d operator?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Pointers for implementing convex hull as 2d operator?

Len Trigg
Last night I wanted to take the convex hull of a 2d object but
OpenSCAD does not have this ability.

Am I right in thinking that since GCAL has convex hull implementations
(http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_2_ref/Chapter_intro.html)
it should be a relatively easy thing (mostly a matter of plumbing) to
add to OpenSCAD?  Could someone give me some pointers on how to go
about this?

(A quick OpenSCAD architecture overview would possibly help ease other
people into contributing to OpenSCAD)

Cheers,
Len.

Reply | Threaded
Open this post in threaded view
|

Re: Pointers for implementing convex hull as 2d operator?

Giles Bathgate-2
In cgaladv.cc there are some stubs for Glide and Sibdiv you could
start by adding a stub for Hull (or whatever you want call it) by
referencing the stub for minkowski as an example. Then you would want
to look at the examples on
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_3/Chapter_main.html
and work out what code is required to do the transformation on a
Nef_Polyhedron to give you the convex hull polyhedron. I might be able
to give some help. Send me a message in #openscad on irc.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: Pointers for implementing convex hull as 2d operator?

clothbot
There's an #openscad IRC channel?  Where?  I'm not seeing it on irc.freenode.net so perhaps it's on a different server.?.

Andrew.

On 2011-04-08, at 3:07 PM, Giles Bathgate wrote:

In cgaladv.cc there are some stubs for Glide and Sibdiv you could
start by adding a stub for Hull (or whatever you want call it) by
referencing the stub for minkowski as an example. Then you would want
to look at the examples on
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_3/Chapter_main.html
and work out what code is required to do the transformation on a
Nef_Polyhedron to give you the convex hull polyhedron. I might be able
to give some help. Send me a message in #openscad on irc.

Regards

Giles
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

--

Makerbot Number Nine... #9... 0x09... 0o11... 0b1001... 
http://clothbot.com/wiki/MakerBotNumberNine



Reply | Threaded
Open this post in threaded view
|

Re: Pointers for implementing convex hull as 2d operator?

Giles Bathgate-2
On 8 April 2011 20:12, Andrew Plumb <[hidden email]> wrote:
> There's an #openscad IRC channel?  Where?  I'm not seeing it on
> irc.freenode.net so perhaps it's on a different server.?.
> Andrew.
> On 2011-04-08, at 3:07 PM, Giles Bathgate wrote:

I am in irc.freenode.net #openscad now with 8 other people.

Failing that you can always talk to me in #rapcad on irc.freenode.net

Reply | Threaded
Open this post in threaded view
|

Re: Pointers for implementing convex hull as 2d operator?

Giles Bathgate-2
In reply to this post by Len Trigg
On 7 April 2011 22:34, Len Trigg <[hidden email]> wrote:
> Last night I wanted to take the convex hull of a 2d object but
> OpenSCAD does not have this ability.

Just for everyone else's benefit Len and I have now got a working
implementation of this

http://gitorious.org/openscad/openscad/commits/convex-hull

Its very rough around the edges, and could do with some
review/improvement/tidy up.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: Pointers for implementing convex hull as 2d operator?

kintel
Administrator
FYI: Latest version with convex hull and 2D minkowski is merged into master and the Mac snapshot binaries are up.

 -Marius