improving the OpenSCAD Language manual

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

improving the OpenSCAD Language manual

doug.moen
I just started using OpenSCAD seriously on the weekend, and I noticed that the Language documentation is incomplete, and needs improvement. I initially noticed that there is no documentation for user defined functions (which I wanted to use); then I noticed that boolean values are not documented. There's a comment attached to the Language manual that expresses mystification about the 'nan' value.

Since I'm a professional programming language designer, and have decent tech writing skills, I figured that improving the Language manual would be a good way to contribute to the project.

I submitted an initial set of changes last night, which are still pending review. I created a new section under General called Values and Data Types. I created subsections for Numbers, Boolean Values, Strings, Vectors and the Undefined Value, and moved some of the text from Variables to here. Plus, there's more detail. Booleans and 'nan' are now both documented, for example.

There's more work I plan to do. The section on Variables could be much improved (I just read a Hackaday forum post from Dec 2013 from an experienced user claiming that OpenSCAD has no concept of local variables, which is an unfortunate misconception, and functions are still not documented).

I hope this is considered socially acceptable behaviour within this group. The community page says "Improve the documentation (it's a wiki)", so I figured it's better to dive in and get it done, rather than spam the issue tracker with a lot of documentation bugs.

However, I will gladly accept feedback, guidance, and suggestions about what parts of the language are still undocumented, from anybody with an interest in this.

Doug Moen.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

szabi
Great thanks!
(From a user point of view -- no development affiliation here).

Szelp, André Szabolcs

+43 (650) 79 22 400


On Mon, Mar 17, 2014 at 12:22 PM, doug moen <[hidden email]> wrote:
I just started using OpenSCAD seriously on the weekend, and I noticed that the Language documentation is incomplete, and needs improvement. I initially noticed that there is no documentation for user defined functions (which I wanted to use); then I noticed that boolean values are not documented. There's a comment attached to the Language manual that expresses mystification about the 'nan' value.

Since I'm a professional programming language designer, and have decent tech writing skills, I figured that improving the Language manual would be a good way to contribute to the project.

I submitted an initial set of changes last night, which are still pending review. I created a new section under General called Values and Data Types. I created subsections for Numbers, Boolean Values, Strings, Vectors and the Undefined Value, and moved some of the text from Variables to here. Plus, there's more detail. Booleans and 'nan' are now both documented, for example.

There's more work I plan to do. The section on Variables could be much improved (I just read a Hackaday forum post from Dec 2013 from an experienced user claiming that OpenSCAD has no concept of local variables, which is an unfortunate misconception, and functions are still not documented).

I hope this is considered socially acceptable behaviour within this group. The community page says "Improve the documentation (it's a wiki)", so I figured it's better to dive in and get it done, rather than spam the issue tracker with a lot of documentation bugs.

However, I will gladly accept feedback, guidance, and suggestions about what parts of the language are still undocumented, from anybody with an interest in this.

Doug Moen.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

Miro Hrončok
In reply to this post by doug.moen
Thanks.

Miro Hrončok

Telefon: +420777974800


2014-03-17 12:22 GMT+01:00 doug moen <[hidden email]>:
I just started using OpenSCAD seriously on the weekend, and I noticed that the Language documentation is incomplete, and needs improvement. I initially noticed that there is no documentation for user defined functions (which I wanted to use); then I noticed that boolean values are not documented. There's a comment attached to the Language manual that expresses mystification about the 'nan' value.

Since I'm a professional programming language designer, and have decent tech writing skills, I figured that improving the Language manual would be a good way to contribute to the project.

I submitted an initial set of changes last night, which are still pending review. I created a new section under General called Values and Data Types. I created subsections for Numbers, Boolean Values, Strings, Vectors and the Undefined Value, and moved some of the text from Variables to here. Plus, there's more detail. Booleans and 'nan' are now both documented, for example.

There's more work I plan to do. The section on Variables could be much improved (I just read a Hackaday forum post from Dec 2013 from an experienced user claiming that OpenSCAD has no concept of local variables, which is an unfortunate misconception, and functions are still not documented).

I hope this is considered socially acceptable behaviour within this group. The community page says "Improve the documentation (it's a wiki)", so I figured it's better to dive in and get it done, rather than spam the issue tracker with a lot of documentation bugs.

However, I will gladly accept feedback, guidance, and suggestions about what parts of the language are still undocumented, from anybody with an interest in this.

Doug Moen.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

kintel
Administrator
In reply to this post by doug.moen
On Mar 17, 2014, at 12:22 PM, doug moen <[hidden email]> wrote:

> Since I'm a professional programming language designer, and have decent tech writing skills, I figured that improving the Language manual would be a good way to contribute to the project.
>
Excellent!
I’m out traveling, so I won’t have the chance to look over it right now. Also, how the wikibooks docs are reviewed is still a mystery to me, but I guess someone here are authorized reviewers..

Cheers,

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
tp3
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

tp3
In reply to this post by doug.moen
doug.moen wrote
I just started using OpenSCAD seriously on the weekend, and I noticed that
the Language documentation is incomplete, and needs improvement still.
That's true, any help is greatly appreciated. Thanks.

doug.moen wrote
I initially noticed that there is no documentation for user defined functions
(which I wanted to use); then I noticed that boolean values are not
documented. There's a comment attached to the Language manual that
expresses mystification about the 'nan' value.
There actually was some information quite hidden somewhere, so I moved it to
a separate paragraph (http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions)
and added some more information, But this certainly needs improvement.

doug.moen wrote
Since I'm a professional programming language designer, and have decent
tech writing skills, I figured that improving the Language manual would be
a good way to contribute to the project.
Nice, there are quite some areas where input would help to improve the manual. Not
only regarding content but also the structure of the document. I think the current
manual is quite useful but in a lot of cases it's hard to find the actual information
even though it's there somewhere.

I don't have review rights yet, but I'm working on that :-).
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

Michael Möller
In reply to this post by doug.moen
Hi Doug

Had the same experience, feeling and consequence back late 2012. You see
a bunch of edits from me with that timestamp. You may have discovered my
thoughts that I have placed in the appropiate Discussion pages. Didn't
get much response. It gets "lonely" doing by your self, so feel free to
contact me for discussion.

I noticed the edits "Values and Datatypes" has been approved. :-)

And thanks and karma for your contribution.

Den 17-03-2014 12:22, doug moen skrev:

> I just started using OpenSCAD seriously on the weekend, and I noticed
> that the Language documentation is incomplete, and needs improvement.
> I initially noticed that there is no documentation for user defined
> functions (which I wanted to use); then I noticed that boolean values
> are not documented. There's a comment attached to the Language manual
> that expresses mystification about the 'nan' value.
>
> Since I'm a professional programming language designer, and have
> decent tech writing skills, I figured that improving the Language
> manual would be a good way to contribute to the project.
>
> I submitted an initial set of changes last night, which are still
> pending review. I created a new section under General called Values
> and Data Types. I created subsections for Numbers, Boolean Values,
> Strings, Vectors and the Undefined Value, and moved some of the text
> from Variables to here. Plus, there's more detail. Booleans and 'nan'
> are now both documented, for example.
>
> There's more work I plan to do. The section on Variables could be much
> improved (I just read a Hackaday forum post from Dec 2013 from an
> experienced user claiming that OpenSCAD has no concept of local
> variables, which is an unfortunate misconception, and functions are
> still not documented).
>
> I hope this is considered socially acceptable behaviour within this
> group. The community page says "Improve the documentation (it's a
> wiki)", so I figured it's better to dive in and get it done, rather
> than spam the issue tracker with a lot of documentation bugs.
>
> However, I will gladly accept feedback, guidance, and suggestions
> about what parts of the language are still undocumented, from anybody
> with an interest in this.
>
> Doug Moen.
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

doug.moen
In reply to this post by tp3
Thanks Torsten. I didn't know about default values for function parameters.

Yes, I agree that the Language manual needs to be restructured. I'm working my up to that.

Doug.


On 17 March 2014 09:13, tp3 <[hidden email]> wrote:
doug.moen wrote
> I just started using OpenSCAD seriously on the weekend, and I noticed that
> the Language documentation is incomplete, and needs improvement still.

That's true, any help is greatly appreciated. Thanks.


doug.moen wrote
> I initially noticed that there is no documentation for user defined
> functions
> (which I wanted to use); then I noticed that boolean values are not
> documented. There's a comment attached to the Language manual that
> expresses mystification about the 'nan' value.

There actually was some information quite hidden somewhere, so I moved it to
a separate paragraph
(http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions)
and added some more information, But this certainly needs improvement.


doug.moen wrote
> Since I'm a professional programming language designer, and have decent
> tech writing skills, I figured that improving the Language manual would be
> a good way to contribute to the project.

Nice, there are quite some areas where input would help to improve the
manual. Not
only regarding content but also the structure of the document. I think the
current
manual is quite useful but in a lot of cases it's hard to find the actual
information
even though it's there somewhere.

I don't have review rights yet, but I'm working on that :-).




-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7308.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
tp3
Reply | Threaded
Open this post in threaded view
|

Re: improving the OpenSCAD Language manual

tp3
doug.moen wrote
Yes, I agree that the Language manual needs to be restructured. I'm working
my up to that.
Cool. I just moved the description of ranges which was hidden in the for-loop section into the new data types chapter. They really are an internal data type and not for-loop specific syntax (and used for the children() module too).
-- Torsten
Reply | Threaded
Open this post in threaded view
|

To add one function to adjust line and object length and dimension ?

sarunnvel
In reply to this post by kintel
if we create a triangle object of 10'x6'x6' then needs to adjust the dimensions.  

if we clicks (or double-clicks) on one side and can drag the edge to make the side longer or shorter.  

We can also able to type  in a new dimension.

Please help me to do above requirement.
tp3
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

tp3
sarunnvel wrote
if we create a triangle object of 10'x6'x6' then needs to adjust the dimensions.  
if we clicks (or double-clicks) on one side and can drag the edge to make the side longer or shorter.  
We can also able to type  in a new dimension.
Please help me to do above requirement.
Can you maybe explain the steps you are trying to do with some short example SCAD code and maybe a screenshot? I don't understand yet what you are trying to do.

(Please create a new topic instead of using "reply" so the discussion does not end up in the documentation discussion thread).
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

szabi
I think he tries to describe to be able to change the model via the graphical (so far) "preview" mode... similar requests have surfaced lately here.  (i.e. interactive dragging/changing in the graphical window with code updates in the editor).

At least that's how I understood him.

(IMHO such editing could be a nice addition, but is definitely not a necessary core feature for a solids based cad).

Szelp, André Szabolcs

+43 (650) 79 22 400


On Tue, Mar 18, 2014 at 10:49 AM, tp3 <[hidden email]> wrote:
sarunnvel wrote
> if we create a triangle object of 10'x6'x6' then needs to adjust the
> dimensions.
> if we clicks (or double-clicks) on one side and can drag the edge to make
> the side longer or shorter.
> We can also able to type  in a new dimension.
> Please help me to do above requirement.

Can you maybe explain the steps you are trying to do with some short example
SCAD code and maybe a screenshot? I don't understand yet what you are trying
to do.

(Please create a new topic instead of using "reply" so the discussion does
not end up in the documentation discussion thread).



-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7326.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

nophead
I can't see how this could ever work. A triangle on the screen could be a polygon with three points, the difference of two or more squares or even the hull of three more acute angled triangles.

The dimensions could be arbitrary expressions or even recursive function calls. In general using numeric literals in object dimensions is poor practice. They should always be meaningfully named constants and are almost always needed in more than one place for relative positioning, etc. With a typical script all the objects are related to each other so changing one would have to change others.

How on earth is a GUI click going to resolve to something in the code that can be changed? The only way I can see it work is if you insert some special markers into the expressions to indicate that value can be edited in the GUI.


On 18 March 2014 10:11, Szelp, A. Sz. <[hidden email]> wrote:
I think he tries to describe to be able to change the model via the graphical (so far) "preview" mode... similar requests have surfaced lately here.  (i.e. interactive dragging/changing in the graphical window with code updates in the editor).

At least that's how I understood him.

(IMHO such editing could be a nice addition, but is definitely not a necessary core feature for a solids based cad).

Szelp, André Szabolcs

<a href="tel:%2B43%20%28650%29%2079%2022%20400" value="+436507922400" target="_blank">+43 (650) 79 22 400


On Tue, Mar 18, 2014 at 10:49 AM, tp3 <[hidden email]> wrote:
sarunnvel wrote
> if we create a triangle object of 10'x6'x6' then needs to adjust the
> dimensions.
> if we clicks (or double-clicks) on one side and can drag the edge to make
> the side longer or shorter.
> We can also able to type  in a new dimension.
> Please help me to do above requirement.

Can you maybe explain the steps you are trying to do with some short example
SCAD code and maybe a screenshot? I don't understand yet what you are trying
to do.

(Please create a new topic instead of using "reply" so the discussion does
not end up in the documentation discussion thread).



-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7326.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

doug.moen
I find this a fascinating topic, but in the context of OpenSCAD, I think it's a research project, and not a feature request. I wonder if S Arunnvel is mistaking OpenSCAD for something it's not. Maybe FreeCAD would be a better choice of program.



On 18 March 2014 06:26, nop head <[hidden email]> wrote:
I can't see how this could ever work. A triangle on the screen could be a polygon with three points, the difference of two or more squares or even the hull of three more acute angled triangles.

The dimensions could be arbitrary expressions or even recursive function calls. In general using numeric literals in object dimensions is poor practice. They should always be meaningfully named constants and are almost always needed in more than one place for relative positioning, etc. With a typical script all the objects are related to each other so changing one would have to change others.

How on earth is a GUI click going to resolve to something in the code that can be changed? The only way I can see it work is if you insert some special markers into the expressions to indicate that value can be edited in the GUI.


On 18 March 2014 10:11, Szelp, A. Sz. <[hidden email]> wrote:
I think he tries to describe to be able to change the model via the graphical (so far) "preview" mode... similar requests have surfaced lately here.  (i.e. interactive dragging/changing in the graphical window with code updates in the editor).

At least that's how I understood him.

(IMHO such editing could be a nice addition, but is definitely not a necessary core feature for a solids based cad).

Szelp, André Szabolcs

<a href="tel:%2B43%20%28650%29%2079%2022%20400" value="+436507922400" target="_blank">+43 (650) 79 22 400


On Tue, Mar 18, 2014 at 10:49 AM, tp3 <[hidden email]> wrote:
sarunnvel wrote
> if we create a triangle object of 10'x6'x6' then needs to adjust the
> dimensions.
> if we clicks (or double-clicks) on one side and can drag the edge to make
> the side longer or shorter.
> We can also able to type  in a new dimension.
> Please help me to do above requirement.

Can you maybe explain the steps you are trying to do with some short example
SCAD code and maybe a screenshot? I don't understand yet what you are trying
to do.

(Please create a new topic instead of using "reply" so the discussion does
not end up in the documentation discussion thread).



-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7326.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

szabi
>I wonder if S Arunnvel is mistaking OpenSCAD for something it's not. Maybe FreeCAD
> would be a better choice of program.

I'd think so.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

drxenocide
Maybe an "easy" way to do it would be to add tags to variables, which would then produce sliders (with defined ranges) on the preview (like maybe a ? in front of a variable would produce a slider and somehow calculate which objects depended on it, highlighting them in say blue - not to be confused with red highlighting of #). The sliders could be adjusted, and then the variables would change in preview mode. I think this would be a decent compromise considering what people have been asking the GUI to do, it would also seem to be possible with how OpenSCAD works.


On Tue, Mar 18, 2014 at 8:25 AM, Szelp, A. Sz. <[hidden email]> wrote:
>I wonder if S Arunnvel is mistaking OpenSCAD for something it's not. Maybe FreeCAD
> would be a better choice of program.

I'd think so.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
tp3
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

tp3
Ari Diacou wrote
Maybe an "easy" way to do it would be to add tags to variables, which would
then produce sliders (with defined ranges) ....
Yes, that's essentially what https://github.com/openscad/openscad/wiki/Ideas:-GSoC-2014#thingiverse-customizer-and-sculpteo-customizer-support is about.

But that's quite different from having the model changeable from the 3D Window. I agree with nop head. I think that this is probably even a bit against the base idea of OpenSCAD where you describe the model using a scripting language. (Having some kind of feedback like selecting something in the 3D view and highlight the responsible code area is something else again)

It should be possible to add some kind of helper dialogs to generate code snippets, e.g. like that nice web app http://daid.eu/~daid/3d/
-- Torsten
RGH
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

RGH

I'd agree that changing dimensions in the viewer window would be almost impossible. I use variables for just about everything, mostly so I can change the dimensions easily.

Going back an earlier suggestion though, I do think a way of jumping to, or highlighting the code upon a mouse click would be really helpful.

On 18 Mar 2014 09:23, "tp3" <[hidden email]> wrote:
Ari Diacou wrote
> Maybe an "easy" way to do it would be to add tags to variables, which
> would
> then produce sliders (with defined ranges) ....

Yes, that's essentially what
https://github.com/openscad/openscad/wiki/Ideas:-GSoC-2014#thingiverse-customizer-and-sculpteo-customizer-support
is about.

But that's quite different from having the model changeable from the 3D
Window. I agree with nop head. I think that this is probably even a bit
against the base idea of OpenSCAD where you describe the model using a
scripting language. (Having some kind of feedback like selecting something
in the 3D view and highlight the responsible code area is something else
again)

It should be possible to add some kind of helper dialogs to generate code
snippets, e.g. like that nice web app http://daid.eu/~daid/3d/




-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
RGH
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

RGH
I've just had a few more thoughts on the viewer interface. Some of these suggestions have definitely come up before, but I'm putting them out there again.

1. Being able to interactively make an object translucent (equivalent to appending %). i.e. upon clicking or click plus hotkey.

2. Have different coloured translucent objects. (I already sort of do this using % and #).

3. On the subject of jumping to, or highlighting the code, it occurred to me that I almost always create objects using modules. Sometimes I want to jump to the place where I call the module so I can play with the variables, or the rotation/translation of the call. On the other hand sometimes I want to jump to the appropriate place inside the module itself, so I can change the base code. Therefore if we're going to implement some sort of "highlight" or "jump to" thing, I'd like to see hotkeys implemented where I can either jump to the appropriate primitive inside the module, or jump to the called module. (Since module created objects and primitives are a bit different I'm not exactly sure how this might work- if you just want to highlight the entire object upon mouse click and just go to the entire module and not figure out where inside it, that would work almost as well.)

It seems to me that there are a number of things we might like to do in the object viewer, and therefore a mouse click should highlight an object/primitive, and then a hotkey or mouse list (right click?) performs a function upon that object. (i.e. make it transparent, jump to the code etc etc). 

Hope this stimulates some discussion/ideas.

Robert



On Tue, Mar 18, 2014 at 9:36 AM, Robert Harris <[hidden email]> wrote:

I'd agree that changing dimensions in the viewer window would be almost impossible. I use variables for just about everything, mostly so I can change the dimensions easily.

Going back an earlier suggestion though, I do think a way of jumping to, or highlighting the code upon a mouse click would be really helpful.

On 18 Mar 2014 09:23, "tp3" <[hidden email]> wrote:
Ari Diacou wrote
> Maybe an "easy" way to do it would be to add tags to variables, which
> would
> then produce sliders (with defined ranges) ....

Yes, that's essentially what
https://github.com/openscad/openscad/wiki/Ideas:-GSoC-2014#thingiverse-customizer-and-sculpteo-customizer-support
is about.

But that's quite different from having the model changeable from the 3D
Window. I agree with nop head. I think that this is probably even a bit
against the base idea of OpenSCAD where you describe the model using a
scripting language. (Having some kind of feedback like selecting something
in the 3D view and highlight the responsible code area is something else
again)

It should be possible to add some kind of helper dialogs to generate code
snippets, e.g. like that nice web app http://daid.eu/~daid/3d/




-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
----------------------------------------------------

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

doug.moen
In reply to this post by tp3
OpenSCAD is a parametric CAD program. You can define a relatively complex geometric model in terms of a relatively small number of parameters. You can modify the parameters, and the rendered object changes, without violating any of the design constraints. You can define new parameterized geometric primitives (modules), and hierarchically decompose a complex design into a tree of modules.

I love the idea of having the model source code visible in the left pane, the rendered object view in the right pane, and being able to edit the model in either pane.

I won't pretend that we could change OpenSCAD to do this while retaining backward compatibility for the existing scripting language. I think a more realistic question is: how do you design a system that works this way? What would you give up, that exists in OpenSCAD, in order to have this kind of interface?

It is definitely possible to write a parametric CAD program that lets you change parameters in the model by interacting with the rendered object view (eg, by dragging control points around). The ones I am aware of work by solving a network of constraints, so that GUI gestures can be backward mapped through the constraint network back to the original parameters in the model. [Disclaimer: I've never used SolidWorks. Too expensive.]

However, I believe these kinds of constraint solving systems are limited in their expressive power. I don't think you can have the full power of OpenSCAD in a practical geometric constraint solving system (although I could be wrong). Part of the problem is avoiding constraint solving algorithms with high algorithmic complexity, so that the UI can respond in real time.

I'm also aware of hybrid systems. At the upper level, you have a GUI where you can select from a set of parameterized geometric primitives, and you can compose scenes from these primitives. And this can be a parameteric CAD system with a real-time constraint solver. At the lower level, you have a powerful scripting language for defining new parameterized geometric primitives.

Maybe it's possible to do better than this. I haven't spent much time thinking about it.


On 18 March 2014 09:23, tp3 <[hidden email]> wrote:
Ari Diacou wrote
> Maybe an "easy" way to do it would be to add tags to variables, which
> would
> then produce sliders (with defined ranges) ....

Yes, that's essentially what
https://github.com/openscad/openscad/wiki/Ideas:-GSoC-2014#thingiverse-customizer-and-sculpteo-customizer-support
is about.

But that's quite different from having the model changeable from the 3D
Window. I agree with nop head. I think that this is probably even a bit
against the base idea of OpenSCAD where you describe the model using a
scripting language. (Having some kind of feedback like selecting something
in the 3D view and highlight the responsible code area is something else
again)

It should be possible to add some kind of helper dialogs to generate code
snippets, e.g. like that nice web app http://daid.eu/~daid/3d/




-----
-- Torsten
--
View this message in context: http://forum.openscad.org/improving-the-OpenSCAD-Language-manual-tp7300p7336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: To add one function to adjust line and object length and dimension ?

Greg Frost
A simple enhancement that I have always thought would be nice is the ability to use the mouse wheel to modify a literal at the location of the cursor. For example if I had a literal of 1.02 and the cursor was between the 0 and the 2, pushing the mouse wheel should increment the literal in 0.1 increments. The mouse wheel would normally scroll the text so perhaps this functionality should be via a keyboard modifier (alt?).
12