Good point, this is making OpenSCAD almost like Scratch Junior, which is a very cool thing to have done, and something I’ve wondered about and definitely appreciate. But for complex code it will be a lot of nested boxes!
One thing I would really like, which might actually exist, is a more powerful code editor which could do a running sense check because it knows Openscad code, and have options to zoom back to where variables are defined, etc. Things that would really speed up and help keeping your head around big Openscad projects.
Also… if just clicking on a section of code could highlight the parts of the model that depend on it…. That would be amazing. Not sure how feasible that is…?
I have a couple of designs that are 5000+ lines, and almost exclusively parametric. One was laid out in a basic form and is a total nightmare to maintain – not that I did it badly, it’s just too much scrolling! The other I broke out into separate .scad files a whole hierarchy of geometries, parts, subassemblies, major assemblies… it would be lovely to be able to navigate between them more intuitively.
Something this makes me want to do is make myself some keyboard macros to insert certain snippets of frequently used OpenSCAD code, like text and Minkowkski etc…
The thing is that when you are really in the middle of a project and the ideas are flowing, my brain is able to work ahead and typing the code is not really slowing me down. Then, going back over, is normally a text edit function.
Cheers,
Alex Gibson
admg consulting
edumaker limited
· Project management
· Operations & Process improvement
· 3D Printing
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of nop head
Sent: 25 October 2019 12:31
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] ClikScad - create OpenSCAD models without all the typing
Yes I have seen your video but what would the screen look like for the design I am working on at the moment?
image.png
It is 350 lines of code and it has taken me a couple of days. I am the worlds worst typist but that is not what takes the time. It is working out how the parts are going to fit together without clashes.
On Fri, 25 Oct 2019 at 12:14, William F. Adams via Discuss discuss@lists.openscad.org wrote:
Using the customizer forces one to use variables, and think about the model in those terms, which I believe helps.
The added complexity is worth it, though it would be nicer if it were more hierarchical.
William
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
@nophead: Using text is a major benefit of OpenSCAD because it can be pasted into emails and checked into source control. It is also fairly concise. I imagine the graphical representation of my typical designs would be an enormous tree.
All this is true; text is important.
@nophead: Do people really struggle much with syntax?
Yes, some people do really struggle with syntax. The Elm community calls this "the syntax cliff": "How many people fall off the syntax cliff and give up on a language or just quit programming entirely?". https://elm-lang.org/news/the-syntax-cliff
As a professional software engineer, I can memorize large amounts of programming language syntax. It's a skill not everyone has, just as a concert pianist can sight read music notation while playing the piano in real time with all 10 fingers (I can't do that).
I know that OpenSCAD is a "CAD" program, but I got into it in order to make art. In the 3D computer graphics business, the most popular interface for programming languages aimed at artists is "node and wire" syntax. For example, Blender has this.
I'm not claiming that node+wire is the "best" graphical syntax. However, here are the benefits:
For me, the ability to tweak module parameters using a slider and get real time feedback in the preview window is a game changer. It makes me much productive in certain tasks. For other people, not having to memorize syntax is the key feature.
There are ways to combine the benefits of text syntax with the benefits I listed of the node+wire syntax. A "projectional editor" represents the program in memory, not as a character string, but as a syntax tree. As you edit the program, the syntax tree is modified, and the syntax tree is "projected" onto the display, possibly as text, or possibly using a graphical syntax, such as node+wire, or like BlocksCad. There are lots of text-based IDEs for conventional programming languages, which use this approach to provide assistance to the user, such as tab-completion of identifiers, auto-fill-in of function argument lists, and even sliders for tweaking numeric parameters. The GlslEditor supports sliders for live editing of GLSL shader programs (GLSL has a C-like text syntax).
What I think would be really cool is a projectional editor that lets you switch back and forth between text syntax and graphical syntax. I'm looking around to see if someone has implemented this idea already.
The problem is it is too sparse because typically one line of code becomes
a box. So what happens to a design that is 350 lines?
OpenSCAD is a very small language, it can all be summarised on the one page
cheat sheet. I am surprised anybody would struggle to learn the syntax but
using it to create geometry is much more complex than the language. It
requires an ability to imagine a shape and then decompose it it cubes and
cylinders, etc, and be able to understand what manifold is and do high
school level trigonometry. I don't see how replacing the text with boxes
helps with any of that. Code completion if the editor achieves more or less
the same.
On Fri, 25 Oct 2019 at 14:35, Doug Moen doug@moens.org wrote:
@nophead: Using text is a major benefit of OpenSCAD because it can be
pasted into emails and checked into source control. It is also fairly
concise. I imagine the graphical representation of my typical designs would
be an enormous tree.
All this is true; text is important.
@nophead: Do people really struggle much with syntax?
Yes, some people do really struggle with syntax. The Elm community calls
this "the syntax cliff": "How many people fall off the syntax cliff and
give up on a language or just quit programming entirely?".
https://elm-lang.org/news/the-syntax-cliff
As a professional software engineer, I can memorize large amounts of
programming language syntax. It's a skill not everyone has, just as a
concert pianist can sight read music notation while playing the piano in
real time with all 10 fingers (I can't do that).
I know that OpenSCAD is a "CAD" program, but I got into it in order to
make art. In the 3D computer graphics business, the most popular interface
for programming languages aimed at artists is "node and wire" syntax. For
example, Blender has this.
I'm not claiming that node+wire is the "best" graphical syntax. However,
here are the benefits:
For me, the ability to tweak module parameters using a slider and get real
time feedback in the preview window is a game changer. It makes me much
productive in certain tasks. For other people, not having to memorize
syntax is the key feature.
There are ways to combine the benefits of text syntax with the benefits I
listed of the node+wire syntax. A "projectional editor" represents the
program in memory, not as a character string, but as a syntax tree. As you
edit the program, the syntax tree is modified, and the syntax tree is
"projected" onto the display, possibly as text, or possibly using a
graphical syntax, such as node+wire, or like BlocksCad. There are lots of
text-based IDEs for conventional programming languages, which use this
approach to provide assistance to the user, such as tab-completion of
identifiers, auto-fill-in of function argument lists, and even sliders for
tweaking numeric parameters. The GlslEditor supports sliders for live
editing of GLSL shader programs (GLSL has a C-like text syntax).
What I think would be really cool is a projectional editor that lets you
switch back and forth between text syntax and graphical syntax. I'm looking
around to see if someone has implemented this idea already.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I watched the ClikScad video, and ClikScad is cute, but I cannot imagine
doing actual work with that UI. Has anyone designed a real part (not a
simple part, a REAL part) using technology like that? I would love to
see that.
Also, I find changing the parameter values and pressing F5 is no slower
than what was shown in the video.
I agree that ClikScad is simpler for a novice, but the down side is that
it could seduce them into thinking that they can get real work done,
only to hit the wall and have to go back and do it in the old fashioned
way, and then give up for the usual reasons
On 10/25/2019 9:50 AM, nop head wrote:
The problem is it is too sparse because typically one line of code
becomes a box. So what happens to a design that is 350 lines?
OpenSCAD is a very small language, it can all be summarised on the one
page cheat sheet. I am surprised anybody would struggle to learn the
syntax but using it to create geometry is much more complex than the
language. It requires an ability to imagine a shape and then decompose
it it cubes and cylinders, etc, and be able to understand what
manifold is and do high school level trigonometry. I don't see how
replacing the text with boxes helps with any of that. Code completion
if the editor achieves more or less the same.
@nophead: The problem is it is too sparse because typically one line of code becomes a box. So what happens to a design that is 350 lines?
If you have text and graphics and direct manipulation, then you can build a better user interface than what you can build using text and a keyboard alone. So it becomes a matter of user interface design.
2D layout can pack more information onto the screen then 1 dimensional text layout. A zooming user interface, plus hierarchical structure, can allow you to manage programs containing thousands of nodes.
Nuke (by Foundry) has an overview pane that shows the entire program zoomed out, and an edit pane where you are zoomed in to part of the program. A zooming user interface can display fewer details of a node when you are zoomed out (eg, only the module name) and more details when you are zoomed in (eg, the module name and the parameters).
Here's one way to represent hierarchy using node+wire. It would be better if each supernode had an optional title that is visible when zoomed out:
Not sure what your definition of "real" part is, but I've worked up some
projects using BlockSCAD:
https://community.carbide3d.com/t/design-into-3d-games-chinese-checkers/16056
https://community.carbide3d.com/t/design-into-3d-boxes-magazine-storage/16238
For the latter, I actually worked through posting screengrabs of bits of the
code as I worked, so maybe proves the concept?
Two features which help in BlockSCAD are the ability to collapse blocks and
their contents, and to create modules. If it just had robust support for the
customizer I'd be goodl.
--
Sent from: http://forum.openscad.org/
nophead wrote
Yes I have seen your video but what would the screen look like for the
design I am working on at the moment?
It is 350 lines of code and it has taken me a couple of days.
I suspect that you are not the type of user I have in mind for ClikScad.
Indeed as far as I can see none of the recent Threads in this Fourm have
been posted by newbies looking for assistance.
My mind is very firmly focused on the person who would like to design the
occasional part for their 3D printer without needing to take the trouble and
the time to learn a 3D drawing product. I think OpenSCAD provides an
excellent platform for that.
/And I have to confess that I don't understand the purpose of a model as
complex as yours - though it looks very impressive. In my mind I would model
each of the parts separately so I could print them one at a time and I see
no problem doing that with ClikScad./
...R
--
Sent from: http://forum.openscad.org/
On 25.10.19 10:30, Robin2 wrote:
I don't know their names but I presume there are some
people who act as the "guardian" of the OpenSCAD project.
I guess that would then be something like 90% Marius and
10% myself ;-).
All I mean by "support" is a statement of encouragement
I can speak only for myself, but in my opinion it would
be nice to have some additional GUI support. There's
a lot of opportunities to do that, Customizer and the
latest auto-completion changes are a small step into
that direction. I personally prefer some integrated
solution though.
For example I'd love to have a GUI editable polygon
where you can do something like right click it and
edit via some 2D editor.
All that is supposed to be optional features that can
be ignored by people who don't need them.
ciao,
Torsten.
On 25.10.19 15:50, nop head wrote:
The problem is it is too sparse because typically one
line of code becomes a box. So what happens to a design
that is 350 lines?
Not necessarily. Maybe a more sensible comparison would
be ICEStudio https://github.com/FPGAwars/icestudio which
can create blocks for whole Verilog modules.
ciao,
Torsten.
I always create full assembled models because a) I have to fit the plastic
parts around other off the shelf parts and b) my framework creates a full
bill of materials and assembly instructions. This is totally necessary
because a lot of my designs have hundreds of parts. and dozens of sub
assemblies. I often spend more time modelling the vitamins than I do the
printed parts.
This design is a case for an Enviro+ environmental sensors board that plugs
into an RPI Zero at right angles. There is also a particle counter module
and a tiny fan. Getting all the parts into a small space was a challenge
and the only way to do it is to model it as an assembly. I use the
customiser to switch different bits on an off in the view so I can see
inside.
The case is is a library item that is fully parametric. I can specify
arbitrary additions and subtractions as children. I added the optional
waves to see if it reduces the tendency to warp but I also like the
aesthetic. It does make it more difficult to have holes in the sides
because you can't have wavy bridges, so all apertures have 45 degree
chamfered surrounds that build out to a straight edge that can be bridged.
This is the BOM it produced.
Parts list
MainTOTALS
Vitamins
1 1 Enviro+
1 1 Fan 17mm x 8mm
4 4 Heatfit insert M2
1 1 Micro SD card
4 4 Nut M2.5 x 2.2mm nyloc
1 1 PMS5003 particle detector
1 1 Pin header 20 x 2 right_angle
1 1 Raspberry Pi Zero
4 4 Screw M2 cap x 6mm
2 2 Screw M2.5 pan x 6.4mm
4 4 Screw M2.5 pan x 8mm
3 3 Screw M3 pan x 6mm
4 4 Washer M2 x 5mm x 0.3mm
4 4 Washer M2.5 x 5.9mm x 0.5mm
3 3 Washer M3 x 7mm x 0.5mm
38 38 Total vitamins count
3D printed parts
1 1 bulkhead.stl
1 1 enviro_plus_case.stl
1 1 enviro_plus_case_base.stl
1 1 fan_jacket.stl
3 3 foot.stl
7 7 Total 3D printed parts count
And here are the printed parts that I designed:
[image: bulkhead.png]
[image: enviro_plus_case.png]
[image: enviro_plus_case_base.png]
[image: fan_jacket.png]
[image: foot.png]
The is quite small for my projects. The last one has 637 vitamins, 62
printed parts and 12 routed parts in 28 assemblies.
On Fri, 25 Oct 2019 at 20:20, Robin2 robin@nbleopard.com wrote:
nophead wrote
Yes I have seen your video but what would the screen look like for the
design I am working on at the moment?
It is 350 lines of code and it has taken me a couple of days.
I suspect that you are not the type of user I have in mind for ClikScad.
Indeed as far as I can see none of the recent Threads in this Fourm have
been posted by newbies looking for assistance.
My mind is very firmly focused on the person who would like to design the
occasional part for their 3D printer without needing to take the trouble
and
the time to learn a 3D drawing product. I think OpenSCAD provides an
excellent platform for that.
/And I have to confess that I don't understand the purpose of a model as
complex as yours - though it looks very impressive. In my mind I would
model
each of the parts separately so I could print them one at a time and I see
no problem doing that with ClikScad./
...R
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org