discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

ClikScad - create OpenSCAD models without all the typing

R
Robin2
Sun, Oct 27, 2019 5:53 PM

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-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/
W
WillAdams
Sun, Oct 27, 2019 7:44 PM

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/

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/
R
Robin2
Sun, Oct 27, 2019 7:51 PM

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-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/
W
WillAdams
Sun, Oct 27, 2019 8:20 PM

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/

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/
FS
Felipe Sanches
Sun, Oct 27, 2019 9:55 PM

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 robin@nbleopard.com 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <robin@nbleopard.com> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
NH
nop head
Sun, Oct 27, 2019 9:57 PM

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 robin@nbleopard.com 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <robin@nbleopard.com> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
Robin2
Sun, Oct 27, 2019 10:01 PM

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-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/
TP
Torsten Paul
Sun, Oct 27, 2019 11:09 PM
$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.

> $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.
W
WillAdams
Sun, Oct 27, 2019 11:11 PM

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/

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/
R
Robin2
Mon, Oct 28, 2019 9:05 AM

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-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/