[OpenSCAD] eval( ) ???

Carsten Arnholm arnholm at arnholm.org
Thu May 14 05:58:36 EDT 2015


On 2015-05-13 20:19, doug moen wrote:
> Miro said: "I'd rather see that function names and variables are saved
> in the same scope".
>
> That's what I want as well. This would allow functions to be first class
> values: you can pass them as arguments to functions, return them as
> results, and store them as elements of a list. No arbitrary restrictions.

Just a point of reflection:

I think it is a mistake that OpenSCAD spends time on defining the syntax 
of a language. All of the resources should be spent on improving 
modelling features. I realise this is much too late given the user base 
of the .scad files, but it strikes me as odd anyway.

A few years ago, I was part of a team that created an modelling 
application with CAD features (it is still significant in its market 
area). It used, and still uses, ACIS as its CAD core, with heavy use of 
boolean operations so it is similar to OpenSCAD in some ways.

The team had a history of creating applications in the past with ad-hoc 
command languages, and we found it was a bad idea in the long run. So 
for the ACIS-based application we decided to use an existing language 
interpreter with a documented syntax. We happened to choose JavaScript 
as the core language and expressed all functionality as JavaScript 
objects. It worked fine.

I am clearly not saying OpenSCAD should adopt JavaScript, but I think it 
would have been easier and better if an existing language had been 
adapted (AngelScript is another example) instead of developing a new one.

Anyway, I realise it is much too late.

What I would like to see is an improvement to the speed of the F6 
rendering, it takes too long in some cases. Plus it would be nice with 
more general sweep options and other common operations in CAD tools 
(lofting is another example).

That said, OpenSCAD is my preferred application for designing 3d printed 
parts! I quite enjoy it.

Carsten Arnholm





More information about the Discuss mailing list