OpenScad advice... required. April 01, 2014 04:30PM |
Registered: 10 years ago Posts: 314 |
Re: OpenScad advice... required. April 01, 2014 06:29PM |
Registered: 10 years ago Posts: 256 |
Re: OpenScad advice... required. April 02, 2014 01:28AM |
Registered: 10 years ago Posts: 209 |
Re: OpenScad advice... required. April 02, 2014 05:49AM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 02, 2014 08:47AM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 02, 2014 10:53AM |
Registered: 10 years ago Posts: 2,472 |
Re: OpenScad advice... required. April 02, 2014 01:27PM |
Registered: 10 years ago Posts: 314 |
Re: OpenScad advice... required. April 02, 2014 02:42PM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 03, 2014 05:31AM |
Registered: 10 years ago Posts: 300 |
Quote
GregL
I suspect that OpenSCAD might have some links back to an old AI language called Lisp - it too had a habit of doing things in reverse order.
Separate statements ( terminated by ';' or '}' ) are seemingly performed in a normal sequence - However inside the statement, where there are cascaded operations, it starts with the one at the terminator, and works its way backwards towards the beginning of the statement.
The difference operator takes the first statement as the initial blank, and then subtracts the shapes defined by each of the following statements.
Greg
Re: OpenScad advice... required. April 03, 2014 06:20AM |
Registered: 10 years ago Posts: 157 |
Re: OpenScad advice... required. April 03, 2014 06:23AM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 04, 2014 04:11AM |
Registered: 10 years ago Posts: 300 |
Re: OpenScad advice... required. April 04, 2014 10:31AM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 04, 2014 11:24AM |
Registered: 10 years ago Posts: 314 |
Many thanks for this, I'm far from understanding the sequence...., but I'm starting to visualise the code functions.Quote
GregL
I have annotated the code I used in my earlier post above.
It uses the Paraboloid code from elsewhere, with a bit of mycode to call it a couple of times.
...
Greg
No I had not seen that before and it is very helpful, Thanks.Quote
3D-ES
.......
Have you seen this PDF / presentation?
Thanks for this link, with that code and the subsequent discussions I should be able to produce what I require.Quote
bobtidey
paraboloid maybe a good starting point
Re: OpenScad advice... required. April 04, 2014 12:19PM |
Registered: 10 years ago Posts: 859 |
Re: OpenScad advice... required. April 04, 2014 12:57PM |
Registered: 10 years ago Posts: 314 |
@Kim, thanks for the post, hmmm a minute, probably will be more than that per line for me in OpenScad!Quote
KimBrown
[attachment 29991 junk.jpg]
I did this in about a minute in FreeCad..
Kim
Re: OpenScad advice... required. April 04, 2014 03:35PM |
Registered: 10 years ago Posts: 145 |
Quote
Treth
Regarding the execution sequence.
So the code is effectively all read in until a semi-colon is reached, hence .1 and .2 are executed.
Then all the lines are read in until another semi-colon (at 0.3) is found and code is execute back up the lines....
What happens with the jump from sequence at 0.8 and 0.9? and again with .11 and .12?
So as I gradually learn to read and modify code, that is one thing, but what's the thought process for creating from scratch?
Re: OpenScad advice... required. April 04, 2014 04:09PM |
Registered: 10 years ago Posts: 314 |
Re: OpenScad advice... required. April 05, 2014 11:06AM |
Registered: 10 years ago Posts: 145 |
Re: OpenScad advice... required. April 06, 2014 05:11AM |
Registered: 10 years ago Posts: 859 |
Re: OpenScad advice... required. April 06, 2014 01:19PM |
Registered: 10 years ago Posts: 256 |
/* parabolic reflector n.b need to enable concat in preferences */ /* parabolic curve x:integer is number of points xscale: float is expansion of x in x dir */ function parabola_pts(x, xscale) = (x == 0) ?[[0,0]] :concat(parabola_pts(x-1,xscale),[[xscale *x, x*x]]); basic_curve = parabola_pts(20, 50); rotate_extrude(){ polygon (points = concat([[basic_curve[20][0],0]], basic_curve)); }
Re: OpenScad advice... required. April 07, 2014 03:22AM |
Registered: 10 years ago Posts: 314 |
Hi Kim, good instructions and screen shots, thanks. I will have a look FreeCad.Quote
KimBrown
In FreeCad I first click file, then New to start a new project.
I then placed a Sphere the size I wanted for the inside,
To alter the Sphere sizes, first click on one of the Spheres...(If you right click it you can give it a name if you wish).
Then in the panel on the left, at the bottom, you will see a tab with Data......
I suggest you look around their Helpful Videos....
The Engine Block is a good one to try...
Kim..
Re: OpenScad advice... required. April 07, 2014 03:25AM |
Registered: 10 years ago Posts: 314 |
Thanks Andy, this has helped also. I'll study the code in more detail, but have to have a week break now with family here enjoying the wet and windy weather in Cornwall UK.Quote
kwikius
I found a much more concise method of generating the parabolic section, though it requires you to enable OpenSCAD's concat function in preferences, but then you can create your polygon inline... Here is a view of the result:
The code is a few lines only :
/* parabolic reflector n.b need to enable concat in preferences */ /* parabolic curve x:integer is number of points xscale: float is expansion of x in x dir */ function parabola_pts(x, xscale) = (x == 0) ?[[0,0]] :concat(parabola_pts(x-1,xscale),[[xscale *x, x*x]]); basic_curve = parabola_pts(20, 50); rotate_extrude(){ polygon (points = concat([[basic_curve[20][0],0]], basic_curve)); }
Re: OpenScad advice... required. April 07, 2014 08:04AM |
Registered: 10 years ago Posts: 256 |
Re: OpenScad advice... required. April 07, 2014 12:06PM |
Registered: 10 years ago Posts: 2,472 |
Quote
KimBrown
In FreeCad I first click file, then New to start a new project.
I then placed a Sphere the size I wanted for the inside,
To alter the Spere sizes, first click on one of the Spheres...(If you right click it you can give it a name if you wish).
Kim..
Re: OpenScad advice... required. April 07, 2014 12:48PM |
Registered: 10 years ago Posts: 859 |
Re: OpenScad advice... required. April 07, 2014 03:35PM |
Registered: 10 years ago Posts: 314 |
Re: OpenScad advice... required. April 07, 2014 05:03PM |
Registered: 10 years ago Posts: 300 |
Re: OpenScad advice... required. April 12, 2014 04:06AM |
Registered: 10 years ago Posts: 314 |
Great idea about the acetone and ABS, I have seen this used with models and ornaments etc., but yes there could be a good 'engineering' use as well.Quote
Radian
I'm greatly enjoying this thread - it's really switched me on to OpenSCAD and I'm also dreaming up ideas for projects involving parabolas. Treth, have you thought about printing in ABS and using the Acetone polishing method: [hackaday.com] ?