R
Robin2
Mon, Sep 30, 2019 4:12 PM
Some people say: don't extend OpenSCAD, you can just use Python to
generate OpenSCAD code. Fine, but that doesn't give me a convenient live
coding environment for designing shapes,
I don't see any problem with a live representation of the changes. With the
program I am working on I just have Openscad sitting on one side of the
screen and the Python program beside it. When Python program writes an
updated .scad file Openscad immediately shows the changes.
and that doesn't let experts design new geometric primitives and then
share them over the internet so that other people can use them.
Clearly the Python system has to be designed to be extensible but I don't
see that being a problem. That could be done by allowing Python-created
shapes to be shared and/or by allowing new native-Openscad-shapes to be
usable by the Python system.
The only way this suggestion helps is if you build an OpenSCAD-like live
programming environment for building shapes using Python, and then build a
community and library ecosystem around this tool.
That reads like it would be necessary for the Python system itself to be a
complete CAD system - in essence an alternative to Openscad. I don't see it
like that. I would much prefer to see something that works closely with
Openscad.
...R
--
Sent from: http://forum.openscad.org/
doug.moen wrote
> Some people say: don't extend OpenSCAD, you can just use Python to
> generate OpenSCAD code. Fine, but that doesn't give me a convenient live
> coding environment for designing shapes,
I don't see any problem with a live representation of the changes. With the
program I am working on I just have Openscad sitting on one side of the
screen and the Python program beside it. When Python program writes an
updated .scad file Openscad immediately shows the changes.
> and that doesn't let experts design new geometric primitives and then
> share them over the internet so that other people can use them.
Clearly the Python system has to be designed to be extensible but I don't
see that being a problem. That could be done by allowing Python-created
shapes to be shared and/or by allowing new native-Openscad-shapes to be
usable by the Python system.
> The only way this suggestion helps is if you build an OpenSCAD-like live
> programming environment for building shapes using Python, and then build a
> community and library ecosystem around this tool.
That reads like it would be necessary for the Python system itself to be a
complete CAD system - in essence an alternative to Openscad. I don't see it
like that. I would much prefer to see something that works closely with
Openscad.
...R
--
Sent from: http://forum.openscad.org/
DM
Doug Moen
Mon, Sep 30, 2019 4:36 PM
I don't see any problem with a live representation of the changes. With the
program I am working on I just have Openscad sitting on one side of the
screen and the Python program beside it. When Python program writes an
updated .scad file Openscad immediately shows the changes.
That kind of setup doesn't work for me. I use the customizer to tweak model parameters. The model parameters are input to the geometric primitives. If geometric primitives are written in Python, using the setup you describe above, then the model parameters must also be defined on the Python side, and the OpenSCAD customizer becomes useless.
and that doesn't let experts design new geometric primitives and then
share them over the internet so that other people can use them.
Clearly the Python system has to be designed to be extensible but I don't
see that being a problem. That could be done by allowing Python-created
shapes to be shared and/or by allowing new native-Openscad-shapes to be
usable by the Python system.
The only way this meets the requirements I originally described is if OpenSCAD embeds Python as an extension language, and if OpenSCAD functions and modules can be written in Python. It would have to be possible to write something like use <foo.py> to load a Python module into an OpenSCAD program.
> I don't see any problem with a live representation of the changes. With the
> program I am working on I just have Openscad sitting on one side of the
> screen and the Python program beside it. When Python program writes an
> updated .scad file Openscad immediately shows the changes.
That kind of setup doesn't work for me. I use the customizer to tweak model parameters. The model parameters are input to the geometric primitives. If geometric primitives are written in Python, using the setup you describe above, then the model parameters must also be defined on the Python side, and the OpenSCAD customizer becomes useless.
> > and that doesn't let experts design new geometric primitives and then
> > share them over the internet so that other people can use them.
>
> Clearly the Python system has to be designed to be extensible but I don't
> see that being a problem. That could be done by allowing Python-created
> shapes to be shared and/or by allowing new native-Openscad-shapes to be
> usable by the Python system.
The only way this meets the requirements I originally described is if OpenSCAD embeds Python as an extension language, and if OpenSCAD functions and modules can be written in Python. It would have to be possible to write something like `use <foo.py>` to load a Python module into an OpenSCAD program.
R
Robin2
Mon, Sep 30, 2019 6:03 PM
That kind of setup doesn't work for me. I use the customizer to tweak
model parameters. The model parameters are input to the geometric
primitives. If geometric primitives are written in Python, using the setup
you describe above, then the model parameters must also be defined on the
Python side, and the OpenSCAD customizer becomes useless.
I guess you are a much more sophisticated user than I am. I have in mind a
system that makes things easier for newbies rather than for experts.
I don't even know what the customizer is for.
...R
--
Sent from: http://forum.openscad.org/
doug.moen wrote
> That kind of setup doesn't work for me. I use the customizer to tweak
> model parameters. The model parameters are input to the geometric
> primitives. If geometric primitives are written in Python, using the setup
> you describe above, then the model parameters must also be defined on the
> Python side, and the OpenSCAD customizer becomes useless.
I guess you are a much more sophisticated user than I am. I have in mind a
system that makes things easier for newbies rather than for experts.
I don't even know what the customizer is for.
...R
--
Sent from: http://forum.openscad.org/
JB
Jordan Brown
Mon, Sep 30, 2019 6:14 PM
On 9/30/2019 11:03 AM, Robin2 wrote:
I have in mind a system that makes things easier for newbies rather
than for experts.
The key question there is "what is the hard part for newbies?".
Is it the raw typing, the part where you have to type c u b e ( [ ... ,
... , ... ] ) instead of just typing the three numbers (and some amount
of clicking?
Is it the syntax, the part where you have to remember that it's
cube([x,y,z]) rather than cube(x,y,z) or cube[x,y,z]?
Is it the geometry, where you're trying to understand how a sequence of
translates, rotates, and whatnot interact?
Is it the programming, where you're trying to do things like generate
multiple objects using loops?
Is it parameterization, where you're trying to figure out how to
represent objects using variables rather than constants, so that you can
change the variables and the object changes?
Is it the idiosyncrasies of the OpenSCAD language, where variables are
immutable and have what might be surprising scope rules?
Or is it something else?
Based on the beginner OpenSCAD programs that I've seen, the biggest
thing that would help would be an editor that was Really Harsh about
enforcing indentation rules. Beginners (without other programming
experience) do not seem to understand how important that is to
understandability.
On 9/30/2019 11:03 AM, Robin2 wrote:
> I have in mind a system that makes things easier for newbies rather
> than for experts.
The key question there is "what is the hard part for newbies?".
Is it the raw typing, the part where you have to type c u b e ( [ ... ,
... , ... ] ) instead of just typing the three numbers (and some amount
of clicking?
Is it the syntax, the part where you have to remember that it's
cube([x,y,z]) rather than cube(x,y,z) or cube[x,y,z]?
Is it the geometry, where you're trying to understand how a sequence of
translates, rotates, and whatnot interact?
Is it the programming, where you're trying to do things like generate
multiple objects using loops?
Is it parameterization, where you're trying to figure out how to
represent objects using variables rather than constants, so that you can
change the variables and the object changes?
Is it the idiosyncrasies of the OpenSCAD language, where variables are
immutable and have what might be surprising scope rules?
Or is it something else?
Based on the beginner OpenSCAD programs that I've seen, the biggest
thing that would help would be an editor that was Really Harsh about
enforcing indentation rules. Beginners (without other programming
experience) do not seem to understand how important that is to
understandability.
DM
Doug Moen
Mon, Sep 30, 2019 6:27 PM
The customizer is an important feature for newbies. It lets you modify numeric model parameters by dragging a graphical slider, and you get immediate feedback in the previewer window. The customizer is something you should learn after learning about variables, but before learning about how to define functions and modules. It is pretty fundamental.
First, go to the View menu and uncheck "Hide Customizer".
Then go to the File menu and open Examples/Parametric/Sign.
Then play with the customizer controls on the right side of the window to modify the design.
Doug Moen.
On Mon, Sep 30, 2019, at 2:03 PM, Robin2 wrote:
That kind of setup doesn't work for me. I use the customizer to tweak
model parameters. The model parameters are input to the geometric
primitives. If geometric primitives are written in Python, using the setup
you describe above, then the model parameters must also be defined on the
Python side, and the OpenSCAD customizer becomes useless.
The customizer is an important feature for newbies. It lets you modify numeric model parameters by dragging a graphical slider, and you get immediate feedback in the previewer window. The customizer is something you should learn after learning about variables, but before learning about how to define functions and modules. It is pretty fundamental.
First, go to the View menu and uncheck "Hide Customizer".
Then go to the File menu and open Examples/Parametric/Sign.
Then play with the customizer controls on the right side of the window to modify the design.
Doug Moen.
On Mon, Sep 30, 2019, at 2:03 PM, Robin2 wrote:
> doug.moen wrote
> > That kind of setup doesn't work for me. I use the customizer to tweak
> > model parameters. The model parameters are input to the geometric
> > primitives. If geometric primitives are written in Python, using the setup
> > you describe above, then the model parameters must also be defined on the
> > Python side, and the OpenSCAD customizer becomes useless.
>
> I guess you are a much more sophisticated user than I am. I have in mind a
> system that makes things easier for newbies rather than for experts.
>
> I don't even know what the customizer is for.
>
> ...R
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
R
Robin2
Mon, Sep 30, 2019 9:55 PM
The customizer is an important feature for newbies.
It does not seem to be in my 2015.03-2 version. I tried to update with my
Linux Mint but it does not see the newer version even after updating the
PPA.
...R
--
Sent from: http://forum.openscad.org/
doug.moen wrote
> The customizer is an important feature for newbies.
It does not seem to be in my 2015.03-2 version. I tried to update with my
Linux Mint but it does not see the newer version even after updating the
PPA.
...R
--
Sent from: http://forum.openscad.org/
DM
Doug Moen
Mon, Sep 30, 2019 10:16 PM
The customizer is an important feature for newbies.
You don't have the latest version. Go to
http://www.openscad.org/downloads.html and follow the instructions.
On Mon, Sep 30, 2019, at 5:55 PM, Robin2 wrote:
> doug.moen wrote
> > The customizer is an important feature for newbies.
>
> It does not seem to be in my 2015.03-2 version. I tried to update with my
> Linux Mint but it does not see the newer version even after updating the
> PPA.
>
> ...R
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
A
adrianv
Mon, Sep 30, 2019 11:24 PM
But having seen the possibility of completely eliminating the typing of
code
it is hard to be satisfied with autocomplete :)
I see a big conceptual difference between Openscad and (for example)
Python.
Python is a general purpose language with no preconceived goal. Openscad
has
a very specfic goal. It is a means to manipulate shapes for the purpose of
creating a 3D model. So it seems to me natural that there should be an
optional front end that allows the user to select and define the shapes
without writing code.
I'm kind of puzzled about this. To me the whole reason to use OpenSCAD, and
its big strength, is that I can construct my model by writing code. Aren't
there other packages like Blender or SketchUp that are designed from the
ground up for people who prefer a GUI interface?
--
Sent from: http://forum.openscad.org/
Robin2 wrote
> But having seen the possibility of completely eliminating the typing of
> code
> it is hard to be satisfied with autocomplete :)
>
> I see a big conceptual difference between Openscad and (for example)
> Python.
> Python is a general purpose language with no preconceived goal. Openscad
> has
> a very specfic goal. It is a means to manipulate shapes for the purpose of
> creating a 3D model. So it seems to me natural that there should be an
> optional front end that allows the user to select and define the shapes
> without writing code.
I'm kind of puzzled about this. To me the whole reason to use OpenSCAD, and
its big strength, is that I can construct my model by writing code. Aren't
there other packages like Blender or SketchUp that are designed from the
ground up for people who prefer a GUI interface?
--
Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, Oct 1, 2019 12:06 AM
To me the whole reason to use OpenSCAD, and
its big strength, is that I can construct my model by writing code.
Aren't
there other packages like Blender or SketchUp that are designed from the
ground up for people who prefer a GUI interface?
Exactly.
When I first go into 3D printing I looked around as many of the CAD like
offering as I could try, I even considered commercial software (but most
were out of my $'range).
I found the 'traditional' mouse driven CAD cumbersome, if you want accuracy
you have to do various mousing-about then click on things to open parameters
then type in values etc.
Then I came across OpenSCAD, as I had a programming background it seemed
good, you just type out your specification for the thing, press F5 and there
it is. (after debugging...)
It was also very straight forward for beginners to pick up, and as a
programmer I could see the possibilities with sophisticated use.
As the tag line says "The Programmers Solid 3D CAD Modeller" - that is what
it is.
It is not the GUI, draw a cube and move it around to sit on a cylinder.
That is another CAD program.
Admin - email* me if you need anything, or if I've done something stupid...
- click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Sent from: http://forum.openscad.org/
adrianv wrote
> To me the whole reason to use OpenSCAD, and
> its big strength, is that I can construct my model by writing code.
> Aren't
> there other packages like Blender or SketchUp that are designed from the
> ground up for people who prefer a GUI interface?
Exactly.
When I first go into 3D printing I looked around as many of the CAD like
offering as I could try, I even considered commercial software (but most
were out of my $'range).
I found the 'traditional' mouse driven CAD cumbersome, if you want accuracy
you have to do various mousing-about then click on things to open parameters
then type in values etc.
Then I came across OpenSCAD, as I had a programming background it seemed
good, you just type out your specification for the thing, press F5 and there
it is. (after debugging...)
It was also very straight forward for beginners to pick up, and as a
programmer I could see the possibilities with sophisticated use.
As the tag line says "The Programmers Solid 3D CAD Modeller" - that is what
it is.
It is not the GUI, draw a cube and move it around to sit on a cylinder.
That is another CAD program.
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
RD
Revar Desmera
Tue, Oct 1, 2019 1:09 AM
On Sep 29, 2019, at 11:55 AM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 29.09.19 04:38, Revar Desmera wrote:
[...] It's not something very high at my personal wish-list at
this point [...]
This is perhaps the most highly desired feature request I have. Though it's unclear to me how it would be handled in a function context, since let() only sets the value of a variable for the parts of a function subordinate to the let(). Also, mutable variables become much more useful with a while() conditional loop statement.
- Better data structures. Classes would be beautiful.
I had been thinking of data-only objects, for building data structures for functions, actually. Not sure this proposal would allow that. In any case, at least having a hashtable would allow implementation of the majority of the more complicated structures.
- The ability to rename built-in and existing modules/
functions would allow for extending functionality on
things like linear_extrude(), polygon(), and
polyhedron().
I think the feature for that would be namespaces.
[...]
e.g. something like:
module cube() ::cube(center = true);
This would be a perfectly acceptable solution.
It would be nice to get some input from language design
perspective. I don't know anyone except Doug who has
experience in that topic.
While I've designed and created four domain specific languages, two of them were LISP-like, one was FORTH-like, and only one was a C-like language. That last one was designed to be compiled into the previously mentioned FORTH-like language. Any design help I could provide may be quirky and suspect.
- Access to the bounds of 2D/3D geometry,
What functionality is that? There might be other ways to
get there in some cases.
Things like a version of linear_extrude() that can take an argument like anchor=LEFT, that lets you align the center of the left side of the extruded shape with the origin. LEFT=[-1,0,0]
- Ways to call external C/C++ libraries like ClipperLib.
While possible this seems to make everything dependent on
a specific setup and existing libraries.
Pretty much exactly like how include <BOSL2/std.scad> expects the BOSL2 library to have been installed? :-)
- Ability to read a file from disk, and better string/
binary processing functions.
I don't see a problem with that. It would needs some more
specific definition as anything which goes into the language
is difficult to change later.
> On Sep 29, 2019, at 11:55 AM, Torsten Paul <Torsten.Paul@gmx.de> wrote:
>
> On 29.09.19 04:38, Revar Desmera wrote:
>> 1. Mutable variables.
>
> [...] It's not something very high at my personal wish-list at
> this point [...]
>
This is perhaps the most highly desired feature request I have. Though it's unclear to me how it would be handled in a function context, since `let()` only sets the value of a variable for the parts of a function subordinate to the `let()`. Also, mutable variables become much more useful with a `while()` conditional loop statement.
>> 2. Better data structures. Classes would be beautiful.
>
> I'm not sure if that fits the bill, but what I want to
> look at next, after the function literals are the object
> literals from
> https://github.com/doug-moen/openscad2/blob/master/rfc/Objects.md <https://github.com/doug-moen/openscad2/blob/master/rfc/Objects.md>
I had been thinking of data-only objects, for building data structures for functions, actually. Not sure this proposal would allow that. In any case, at least having a hashtable would allow implementation of the majority of the more complicated structures.
>> 4. The ability to rename built-in and existing modules/
>> functions would allow for extending functionality on
>> things like `linear_extrude()`, `polygon()`, and
>> `polyhedron()`.
>
> I think the feature for that would be namespaces.
> [...]
> e.g. something like:
> module cube() ::cube(center = true);
This would be a perfectly acceptable solution.
> It would be nice to get some input from language design
> perspective. I don't know anyone except Doug who has
> experience in that topic.
While I've designed and created four domain specific languages, two of them were LISP-like, one was FORTH-like, and only one was a C-like language. That last one was designed to be compiled into the previously mentioned FORTH-like language. Any design help I could provide may be quirky and suspect.
>> 5. Access to the bounds of 2D/3D geometry,
>
> What functionality is that? There might be other ways to
> get there in some cases.
Things like a version of `linear_extrude()` that can take an argument like `anchor=LEFT`, that lets you align the center of the left side of the extruded shape with the origin. LEFT=[-1,0,0]
>> 6. Ways to call external C/C++ libraries like ClipperLib.
>
> While possible this seems to make everything dependent on
> a specific setup and existing libraries.
Pretty much exactly like how `include <BOSL2/std.scad>` expects the BOSL2 library to have been installed? :-)
>> 7. Ability to read a file from disk, and better string/
>> binary processing functions.
>
> I don't see a problem with that. It would needs some more
> specific definition as anything which goes into the language
> is difficult to change later.
I would actually point to the string theory library for OpenSCAD as a starting place.
( https://www.thingiverse.com/thing:526023 <https://www.thingiverse.com/thing:526023> )
- Revar