ClikScad - create OpenSCAD models without all the typing

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

Re: ClikScad - create OpenSCAD models without all the typing

OpenSCAD mailing list-2
My apologies.

I am using Windows 10 (build 1703) with Google Chrome

No message or warning from Python (I started it by double-clicking on
clikscad.py since Python isn't in my path).

William




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
OpenSCAD mailing list-2 wrote
> My apologies.
>
> I am using Windows 10 (build 1703) with Google Chrome
>
> No message or warning from Python (I started it by double-clicking on
> clikscad.py since Python isn't in my path).

Absolutely nothing to apologise for.

You should see a message like this from Python
      Bottle v0.12.7 server starting up (using WSGIRefServer())...
      Listening on http://localhost:8085/

...R





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

OpenSCAD mailing list-2
Yes, I see:

>Bottle v0.12.7 server starting up (using WSGIRefServer())...
Listening on http://localhost:8085/
Hit Ctrl-C to quit.

and it turns out the problem was not including the trailing slash.

Running now --- will hopefully have useful feedback or results presently.

William




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
OpenSCAD mailing list-2 wrote
> Running now --- will hopefully have useful feedback or results presently.

Thanks. I appreciate any feedback.

Having started using it myself I have made a few changes that allow me to
work with many fewer elements (and clicks) but it will probably be a week or
so before I feel confident to publish the newer version. The general
approach to creating things will be the same.

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

OpenSCAD mailing list-2
It's an interesting alternative to Blockscad and so forth.

It's a bit awkward for me, since the variables all end up buried in main():

//  Code created by ClikScad  at   15:36:12  27 Oct 2019

module Sph_15722048553 (radius = $radius, segments = 32, ){
        sphere( radius,  $fn = segments);
};

module main (){
        $diameter = 6;
        $radius = $diameter/2;

                Sph_15722048553();

};

main();

and won't interact with the customizer.

The things I'd need for it to work for me:

 - variables at top of code so that they will work in the customizer
 - ability to more easily modify variables --- ideally one would be able to
set them to function exactly as they would in the customizer, and interact
with them thus, though just providing a way to set the comments around them
so that they would work in the customizer in OpenSCAD and modifying them in
the customizer pane in OpenSCAD would be workable

Need a good term for this category of application/interface.

Thanks!

William



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Felipe Sanches
In reply to this post by Robin2
The very first thing I would suggest changing in this would be to completely remove the "Apply / Cancel" buttons. Making changes automatically apply will encourage experimentation by making the workflow much more fluid and with much faster feedback

Em sáb, 12 de out de 2019 às 11:53, Robin2 <[hidden email]> escreveu:
I've mentioned elsewhere on this Forum that I have been working on a simple
Python program that enables me to create OpenSCAD code without having to
type all the syntactical stuff.

I think the program has now advanced far enough to make it public for anyone
that might be interested. I do appreciate that it will probably be more
attractive for the occasional OpenSCAD user as compared to those who are a
great deal more expert with OpenSCAD than I am.

<http://forum.openscad.org/file/t2631/GetStartedBoth.png>

This short Youtube video should give you a flavour of how ClikScad is used.
The video is intended for illustration rather than education.
https://youtu.be/q1Sd0Fuppuw

The Python code and the documentation can be downloaded from Google Drive.
https://drive.google.com/drive/folders/1uBpil6TeYyaar_0l8Zm_17UvE-EOTza7?usp=sharing

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
In reply to this post by OpenSCAD mailing list-2
OpenSCAD mailing list-2 wrote
> It's an interesting alternative to Blockscad and so forth.
>
> It's a bit awkward for me, since the variables all end up buried in
> main():

Thanks for your comments.

As I mentioned elsewhere I don't see the typical ClikScad user as someone
who would be advanced enough to build the customizer into his models.

However I  would very much appreciate it if you would be kind enough to
hand-edit the ClikScad code you posted so that it satisfies the needs of the
customizer. That way I will have an example I can think about. Maybe it is a
feature that would not be difficult to add.


...R






--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

nophead
You don't really need to do anything special to make the customiser work with a  typical model. It just takes all the global variables before the first function or module and makes them editable. You can add comments to describe them and specify ranges, etc, and also put a stop marker to for variables that you don't want to edit.

All of my projects include some constants at the top so it sort of works by default.


On Sun, 27 Oct 2019 at 21:51, Robin2 <[hidden email]> wrote:
OpenSCAD mailing list-2 wrote
> It's an interesting alternative to Blockscad and so forth.
>
> It's a bit awkward for me, since the variables all end up buried in
> main():

Thanks for your comments.

As I mentioned elsewhere I don't see the typical ClikScad user as someone
who would be advanced enough to build the customizer into his models.

However I  would very much appreciate it if you would be kind enough to
hand-edit the ClikScad code you posted so that it satisfies the needs of the
customizer. That way I will have an example I can think about. Maybe it is a
feature that would not be difficult to add.


...R






--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

OpenSCAD mailing list-2
In reply to this post by Robin2
Sure!

//  Code created by ClikScad  at   18:57:14  27 Oct 2019
//see https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Customizer 

        $diameter = 6;
        $radius = $diameter/2;
        $height = 3;
        $width = 4;
        $depth = 5;


module Sph_15722048553 (radius = $radius, segments = 32, ){
        sphere( radius,  $fn = segments);
};

module Cub_15722169053 (xlength = $width, ylength = $depth, zlength =
$height, center = false, ){
        cube( [xlength, ylength, zlength], center = center);
};

module Trns_15722169779 (xMove = $radius+$width, yMove = 0, zMove = 0, ){
        translate( [ xMove, yMove, zMove]){
                Cub_15722169053();
        };
};

module main (){

                Sph_15722048553();
                Trns_15722169779();

};

main();



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

tp3
> $diameter = 6;
> $radius = $diameter/2;
> $height = 3;
> $width = 4;
> $depth = 5;

Why all the $ variables? That makes them dynamically
scoped which should be only used for cases where that
is really needed.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
In reply to this post by OpenSCAD mailing list-2
OpenSCAD mailing list-2 wrote
> Sure!

Many thanks. I will consider that.

But just thinking about things overnight, if someone had ClikScad why would
they need to use the Optimizer. They could just as easily change the values
in MAIN in ClikScad - easier, maybe.

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
In reply to this post by tp3
tp3 wrote
> Why all the $ variables?

To be perfectly honest I cannot now remember but I believe I had concluded
that the way my ClikScad creates code would only work with $variables. If I
have some time today I will read back through my development notes - maybe I
wrote about it.

Keep in mind that ClikScad has two primary (and parallel) objectives - {A}
keeping the Python code simple and {B} the whole thing aimed at
inexperienced and occasional users of OpenSCAD. Power users are very
welcome, but they are not the target market.

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
Later ....

Modifying ClikScad so it produces OpenSCAD code that is compatible with the
Customizer has proved to be very easy and I will probably incorporate that
in the next version, primarily so that I don't alienate those who favour the
Customizer.

However from a practical point of view it seems to me that it would just
confuse ClikScad users to offer two ways of doing the same thing - ClikScad
and the Customizer. IMHO it would be easier for the user to make the changes
directly in ClikScad.


And on the subject of $variables, even though it was not the primary reason
for choosing to use them, they offer a very convenient means to trigger a
popup from which the user can select them and avoid the risk of typing
errors. So they will be staying. That may offend some programming purists
but I don't believe it will cause any irreparable damage to anyone's model.

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

tp3
On 28.10.19 14:47, Robin2 wrote:
> And on the subject of $variables, even though it was
> not the primary reason for choosing to use them, they
> offer a very convenient means to trigger a popup from
> which the user can select them and avoid the risk of
> typing errors. So they will be staying. That may
> offend some programming purists but I don't believe
> it will cause any irreparable damage to anyone's model.

It's not about purists or style.

Using $ variables means fundamentally different behavior.

All I'm saying is: Don't use them because the *look*
cute. If usage matches the intended behavior, that's
fine.

Or in other words, be aware of the effects to not get
something similar to
https://geekandpoke.typepad.com/geekandpoke/2012/04/simply-explained-gv.html

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

kintel
Administrator
In reply to this post by Robin2
On Oct 25, 2019, at 04:30, Robin2 <[hidden email]> wrote:
>
> I don't know their names but I presume there are some people who act as the
> "guardian" of the OpenSCAD project
> All I mean by "support" is a statement of encouragement - "We believe XXX
> would be a useful addition to OpenSCAD[...] maybe "we will bundle it with (or link to it from) OpenSCAD wen
> it is sufficiently complete"
>
A graphical editor has been thought about and discussed many times, and it's a really interesting topic.
Both the MIT Scratch concept and the node-based editor, as discussed in this thread, are common solutions to such a challenge and they both have numerous implementations both in other software and as part of OpenSCAD or OpenSCAD-inspired software.

I do encourage exploration and experimentation in this domain, and we'd be happy to at the very least _link_ to interesting projects that relates to OpenSCAD in some way.

Two things to keep in mind:

* Even if this mainly provides value to occasional or new users of OpenSCAD and hence is primarily targeting small designs,
I think that such a feature should consider what would happen if used "one level up". Lots of interesting topics can pop up here (e.g. are the two representations isomorphic?, how do you compose larger objects? how do you manage abstractions?)

* Bundling such an editor with OpenSCAD pretty much means integrating it into the software itself, which is likely a bit of an undertaking which includes both writing the editor itself, necessary refactoring of our internal APIs and UI to make it fit, plus long-term maintenance. Maintaining this as a stand-alone companion tool is probably a much easier way to test out the concept, learn about your users and refine both the concept and solution until it's clear where it fits.

Kind Regards,

 -Marius








_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
kintel wrote
>  (e.g. are the two representations isomorphic?, how do you compose larger
> objects? how do you manage abstractions?)

Perhaps the most eloquent response I can make is that I have no idea what
you mean by that. You clearly know a great deal more about OpenSCAD and how
3D models can be represented.

I see some very esoteric discussions on this Forum but I cannot conceive of
what the models behind them will be used for.They seem to be much too
complex for 3D printing as a single object. I have to say I get the
impression (perhaps wrongly) that some people are trying to use OpenSCAD in
situations where another CAD program would be more suitable.


> * Bundling such an editor with OpenSCAD

I don't see any need for it in the near term. What could be useful for
beginners is a page that can be accessed from the Documentation index
(http://www.openscad.org/documentation.html?version=2015.03) that has links
to the various graphical front ends that are available and, perhaps, some
guidance to help someone understand their differences and encourage people
to try that approach to using OpenSCAD.

Many thanks fr your interest,

...R





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

nophead
> They seem to be much too complex for 3D printing as a single object.  I have to say I get the impression (perhaps wrongly) that some people are trying to use OpenSCAD in situations where another CAD program would be more suitable.

Why should OpenSCAD be limited to describing single objects? Most of my designs have multiple printed parts and dozens of vitamins. Why would another CAD tool be more appropriate? I use OpenSCAD because I am a programmer with CNC tools, not a mechanical designer. Perhaps if I was designing something as complex as a 737 plane OpenSCAD would run out of steam but it easily copes with anything I build. The most complex being 3D printers with perhaps 2000 parts, 100 of them printed.

On Tue, 29 Oct 2019 at 08:41, Robin2 <[hidden email]> wrote:
kintel wrote
>  (e.g. are the two representations isomorphic?, how do you compose larger
> objects? how do you manage abstractions?)

Perhaps the most eloquent response I can make is that I have no idea what
you mean by that. You clearly know a great deal more about OpenSCAD and how
3D models can be represented.

I see some very esoteric discussions on this Forum but I cannot conceive of
what the models behind them will be used for.They seem to be much too
complex for 3D printing as a single object. I have to say I get the
impression (perhaps wrongly) that some people are trying to use OpenSCAD in
situations where another CAD program would be more suitable.


> * Bundling such an editor with OpenSCAD

I don't see any need for it in the near term. What could be useful for
beginners is a page that can be accessed from the Documentation index
(http://www.openscad.org/documentation.html?version=2015.03) that has links
to the various graphical front ends that are available and, perhaps, some
guidance to help someone understand their differences and encourage people
to try that approach to using OpenSCAD.

Many thanks fr your interest,

...R





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

Robin2
nophead wrote
> Why should OpenSCAD be limited to describing single objects? Most of my
> designs have multiple printed parts and dozens of vitamins. Why would
> another CAD tool be more appropriate?

I'm finding it difficult to explain myself.  Some of the discussions I see
here seem to involve very complex manipulations that, I suspect, would be
completely unnecessary and irrelevant in other CAD programs. It's just a
feeling I have that in some cases OpenSCAD is being pushed too far from its
essential simplicity. That's why I have been asking questions about the
intended "market" for OpenSCAD. If it gets too complicated I fear it will
lose its attraction for people who don't need a complex CAD system yet it
will still not match the capabilities of (say) FreeCad or SolveSpace.

I have no objection to people creating complex models. I reckon most of them
could be created with ClikScad (or Graphscad or Blocscad).

...R



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

tp3
In reply to this post by OpenSCAD mailing list-2
On 24.10.19 19:27, WillAdams via Discuss wrote:
> I have a URL I'd like to use for that --- designinto3d.com
> but I'm kind of mystified by the whole web server hosting
> thing. Even better would be if the server could run TeX/LaTeX
> and serve up files thusly generated.

Do you plan to actually host a full service? Most of the
existing sites focus on the printing part of the workflow,
not so much the design.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: ClikScad - create OpenSCAD models without all the typing

JordanBrown
In reply to this post by Robin2
On 10/29/2019 4:13 AM, Robin2 wrote:
I'm finding it difficult to explain myself. Some of the discussions I see here seem to involve very complex manipulations that, I suspect, would be completely unnecessary and irrelevant in other CAD programs. It's just a feeling I have that in some cases OpenSCAD is being pushed too far from itsessential simplicity. That's why I have been asking questions about the intended "market" for OpenSCAD. If it gets too complicated I fear it will lose its attraction for people who don't need a complex CAD system yet it will still not match the capabilities of (say) FreeCad or SolveSpace.

Maybe I just haven't tried hard enough to learn those tools, but they seem harder to use than OpenSCAD, for less functionality.  I *did* try to learn Blender, and ... yuck.  If I was a sculptor it would be good, maybe, but I'm not - I'm an engineer.  I've tried pretty hard to use SketchUp, but it's a pain in the neck to do anything where you want precise positioning, and it has zero capability for parameterization and repetition.

So far, I can't see building any but the simplest of my models using a point-and-click user interface.  I want to duplicate and parameterize them too much.

I have no objection to people creating complex models. I reckon most of them
could be created with ClikScad (or Graphscad or Blocscad).
https://www.thingiverse.com/thing:2638382 is one of my first models.  I can't imagine building it using a tool that would require positioning each element.  I could come close to doing it in BlocksCAD, but it seems like the mouse work involved would be much slower than the typing in OpenSCAD, and the resulting program would be visually much larger.  And I can't actually do it the way that I did it in OpenSCAD, because BlocksCAD doesn't have any way to import drawings.

It's 49 lines of OpenSCAD, including comments, plus a DXF file for the cross section.  (Today I'd do the Bezier curve directly in OpenSCAD, but I didn't have the functions back then.)

Or even this stupid little rack for drying bottles:



In a typical point and click UI, if I decided the spacing was wrong I'd nearly have to start from scratch.

I'm sure that the more elaborate CAD programs can handle this kind of repetition and parameterization, but they come with their own complexity.  I know how to write programs, and so writing programs is, for me, the easy way to do it.

In fact, I'd say that answers your question about audience.  Just look at the page title for openscad.org:
OpenSCAD - The Programmers Solid 3D CAD Modeller
The intended audience is programmers who want to do 3D modeling.

BTW, here's photos of some of my more recent and elaborate models:




'



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
1234