adding a string & list search() function

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

adding a string & list search() function

clothbot
Hey Everyone,

I've been playing around with some code to implement a search() function in OpenSCAD.  My git-fu is rather weak as it relates to maintaining a branch that can be pulled back into the master, but my modifications to func.cc are pretty self-contained.

Others are welcome to give it a try; I opened this "Issue" to make my request:  https://github.com/openscad/openscad/issues/81

Andrew.

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/



Reply | Threaded
Open this post in threaded view
|

Re: adding a string & list search() function

kintel
Administrator
On Feb 4, 2012, at 05:27 AM, Andrew Plumb wrote:

>
> Others are welcome to give it a try; I opened this "Issue" to make my request:  https://github.com/openscad/openscad/issues/81
>

Pull request here: https://github.com/openscad/openscad/pull/82

It would be nice if you could provide some usage scenarios. I'm curious where you'd use this function.

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: adding a string & list search() function

clothbot

On 2012-02-04, at 8:37 AM, Marius Kintel wrote:
On Feb 4, 2012, at 05:27 AM, Andrew Plumb wrote:
Others are welcome to give it a try; I opened this "Issue" to make my request:  https://github.com/openscad/openscad/issues/81


Pull request here: https://github.com/openscad/openscad/pull/82

It would be nice if you could provide some usage scenarios. I'm curious where you'd use this function.

Much appreciated!

Most immediate use is for accessing polygon path tables like this: https://github.com/clothbot/makerbot/blob/master/fabjects/libraries/constructors/fonts.scad

I managed to get a "font_char_index" recursive lookup function working in https://github.com/clothbot/makerbot/blob/master/fabjects/libraries/constructors/text.scad but it was horribly slow.

Andrew.

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/