suggestion window options override

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

suggestion window options override

snas
I think Openscad is quite intimidating to those without programming experience and so anything that makes it easier to use and less intimidating can only be a good thing. With that in mind, I would like to suggest adding a feature whereby the window options can be set/overridden using a bit of code within the scad file itself.

eg
window(editor=0, consol=0, error log=0, customizer=1);

This way designers can export their creations in their least threatening, Customizer form.

I know it doesn't seem like a big deal to simply tell new users to go to the window menu and change the window options manually but all these little frictions add up and can ultimately put some people off using scad, which would be a real shame. The one good thing about Thingvese's Customizer was its usability, no installation, no lists of menus, no unfamiliar icons, just very straightforward to use.  Openscad may be better than Customizer in every other respect but it could still aspire to Customizer level of accessibility.

Insedenterly, I have no idea how easy or not it would be to modify the UI from code within the editor! :D

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

JordanBrown
On 6/3/2021 6:24 AM, snas wrote:
I think Openscad is quite intimidating to those without programming experience and so anything that makes it easier to use and less intimidating can only be a good thing. With that in mind, I would like to suggest adding a feature whereby the window options can be set/overridden using a bit of code within the scad file itself.

eg
window(editor=0, consol=0, error log=0, customizer=1);

Unfortunately, that precise idea won't help a lot, because OpenSCAD wouldn't know to do it until the user actually "runs" the program with F5 or F6 (or has set up automatic preview on load), and that means that the user already knows to do those things.

However, one could imagine some kind of comment-based tag, like the existing customizer tags, that explicitly tells OpenSCAD that the file is set up for the customizer and to open up the customizer when it's loaded.

I'm not sure whether there would need to be an option for an experienced user to defeat that mechanism.


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
rew
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

rew
On Thu, Jun 03, 2021 at 03:30:23PM +0000, Jordan Brown wrote:

> Unfortunately, that precise idea won't help a lot, because OpenSCAD
> wouldn't know to do it until the user actually "runs" the program with
> F5 or F6 (or has set up automatic preview on load), and that means that
> the user already knows to do those things.

Welll.... IMHO, the "auto-preview-on-load" feature should be on by
default. This is for consistency with other programs: Everything from
word and exel to "eagle" has an internal representation (modern word
and exel, that's an XML representation), which gets rendered to the
screen on startup. You might argue that openscad may need several
minutes to render something. Agreed. That's a disadvantage.

Advanced users who create models that are complicated enough to
warrant: "only render when I tell you to" can flip the
setting... Maybe add if rendertime > 10s popup: "this takes long to
render, turn off autorender?"

        Roger.


--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

JordanBrown
On 6/3/2021 8:54 AM, Rogier Wolff wrote:
Welll.... IMHO, the "auto-preview-on-load" feature should be on by default. This is for consistency with other programs: Everything from word and exel to "eagle" has an internal representation (modern word and exel, that's an XML representation), which gets rendered to the screen on startup.

I have mixed feelings about making the option be on by default, but I think the analogy is flawed.

The text of an OpenSCAD program is not some internal form like the XML that underlies Word or Excel.  It is the form that the user works with, and when the user is ready the user tells OpenSCAD to execute it.  Do Excel and Word, by default, execute macros embedded in the document when it is loaded?

OpenSCAD is an integrated development environment, an IDE, for a programming language.  Do *any* other IDEs automatically execute the program when you load its source?

---

Should it be on by default?  Ideally... maybe.  Today... no.  Preview renders can take an arbitrarily long amount of time, and are not interruptible.  If you have a flawed program that takes forever to execute, you would never be able to load and edit it to fix it.  If previews ran asynchronously, so that you still had access to the editor while the preview was running, maybe.  If previews were interruptible, maybe.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

GeoffHorton
Well, you can open the file in an external editor and fix it, but that's a pain.

On Thu, Jun 3, 2021 at 11:23 AM Jordan Brown <[hidden email]> wrote:
On 6/3/2021 8:54 AM, Rogier Wolff wrote:
Welll.... IMHO, the "auto-preview-on-load" feature should be on by default. This is for consistency with other programs: Everything from word and exel to "eagle" has an internal representation (modern word and exel, that's an XML representation), which gets rendered to the screen on startup.

I have mixed feelings about making the option be on by default, but I think the analogy is flawed.

The text of an OpenSCAD program is not some internal form like the XML that underlies Word or Excel.  It is the form that the user works with, and when the user is ready the user tells OpenSCAD to execute it.  Do Excel and Word, by default, execute macros embedded in the document when it is loaded?

OpenSCAD is an integrated development environment, an IDE, for a programming language.  Do *any* other IDEs automatically execute the program when you load its source?

---

Should it be on by default?  Ideally... maybe.  Today... no.  Preview renders can take an arbitrarily long amount of time, and are not interruptible.  If you have a flawed program that takes forever to execute, you would never be able to load and edit it to fix it.  If previews ran asynchronously, so that you still had access to the editor while the preview was running, maybe.  If previews were interruptible, maybe.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

DanS
In reply to this post by JordanBrown
I wouldn't compare OpenSCAD to word processors, static drawing programs, spreadsheets.

It is more like something dynamic and more processor-intensive, like an animation program, a music editing program, or as people have said a programming language (which it is).  I would not want auto-render.  Render can take quite a bit of time, especially if you did a non-optimal job.  If rendering was instantaneous, maybe auto-render would not be a pain, but I can't see that ever being guaranteed.

On Thu, Jun 3, 2021 at 12:23 PM Jordan Brown <[hidden email]> wrote:
On 6/3/2021 8:54 AM, Rogier Wolff wrote:
Welll.... IMHO, the "auto-preview-on-load" feature should be on by default. This is for consistency with other programs: Everything from word and exel to "eagle" has an internal representation (modern word and exel, that's an XML representation), which gets rendered to the screen on startup.

I have mixed feelings about making the option be on by default, but I think the analogy is flawed.

The text of an OpenSCAD program is not some internal form like the XML that underlies Word or Excel.  It is the form that the user works with, and when the user is ready the user tells OpenSCAD to execute it.  Do Excel and Word, by default, execute macros embedded in the document when it is loaded?

OpenSCAD is an integrated development environment, an IDE, for a programming language.  Do *any* other IDEs automatically execute the program when you load its source?

---

Should it be on by default?  Ideally... maybe.  Today... no.  Preview renders can take an arbitrarily long amount of time, and are not interruptible.  If you have a flawed program that takes forever to execute, you would never be able to load and edit it to fix it.  If previews ran asynchronously, so that you still had access to the editor while the preview was running, maybe.  If previews were interruptible, maybe.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

snas
In reply to this post by rew
Clearly, I've opened a bit of a can of worms with my, ill-conceived, code idea :D
As you say, I think that precise method of execution can be scaped.

How would your tagging thing work? i.e where would the tag be stored and how would the designer apply one?

Another alternative option that occurs to me is to just have two big buttons in the top left corner, one called "Customizer" and the other "Edit Code". This would make it obvious and easy to flick between window configurations.

In addition, the Customizer configuration would be the default unless changed in the properties menu.



Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

DXF import doesn't render

Michele Denber
In reply to this post by GeoffHorton
While trying to do this in version 2015.03-2

linear_extrude(height = 10, center = true, convexity = 10)
   import (file = "BrainiacDisc.dxf", layer = "plate");

I get this output:

Compiling design (CSG Tree generation)...

Compiling design (CSG Products generation)...

Geometries in cache: 8

Geometry cache size in bytes: 544

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 1 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 0 seconds


but no graphics in the preview window with either F5 or F6.  Adding a render () ; doesn't help.  This is the file: https://content.instructables.com/ORIG/FVW/KRMO/JYOOS8QT/FVWKRMOJYOOS8QT.dxf


I can open it in CorelDraw and it looks OK there.  What am I doing wrong?


            - Michele



_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
dpa
Reply | Threaded
Open this post in threaded view
|

Re: DXF import doesn't render

dpa
it has a long layer name, not the one you set it scad:
Bildschirmfoto 2021-06-03 um 21.55.52.png

I renamed this layer to 'aaa' and changed that in scad as well - works for me (mac)
Bildschirmfoto 2021-06-03 um 21.59.51.png

Am Do., 3. Juni 2021 um 21:31 Uhr schrieb Michele Denber <[hidden email]>:
While trying to do this in version 2015.03-2

linear_extrude(height = 10, center = true, convexity = 10)
   import (file = "BrainiacDisc.dxf", layer = "plate");

I get this output:

Compiling design (CSG Tree generation)...

Compiling design (CSG Products generation)...

Geometries in cache: 8

Geometry cache size in bytes: 544

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 1 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 0 seconds


but no graphics in the preview window with either F5 or F6.  Adding a render () ; doesn't help.  This is the file: https://content.instructables.com/ORIG/FVW/KRMO/JYOOS8QT/FVWKRMOJYOOS8QT.dxf


I can open it in CorelDraw and it looks OK there.  What am I doing wrong?


            - Michele


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

JordanBrown
In reply to this post by snas
On 6/3/2021 12:16 PM, snas wrote:
How would your tagging thing work? i.e where would the tag be stored and how would the designer apply one?

Today, the customizer allows for a number of comment-based tags:

/* [ this is a tab name ] */
// This describes the following variable
var = "these";	// [ these, are, possible, values ]

Extending that concept, we could have a tag like

// HEY OPENSCAD OPEN CUSTOMIZER BY DEFAULT

Or perhaps

// CUSTOMIZABLE

or

// ** CUSTOMIZABLE **
Another alternative option that occurs to me is to just have two big buttons in the top left corner, one called "Customizer" and the other "Edit Code". This would make it obvious and easy to flick between window configurations.

In addition, the Customizer configuration would be the default unless changed in the properties menu.

Remember that the editor and the Customizer are not either-or; you can have neither, either, or both displayed.

I started to suggest that we might enable the Customizer by default, but on reflection I don't think that would be a good idea.  Showing this extra panel by default would be useful only for those users who want to customize; it would be somewhere between useless and confusing for users who want to use OpenSCAD proper.

Another different idea:  kind of like Word's special treatment of .DOT files, where opening one creates a new document with the file's contents, perhaps designed-for-Customizer files might get a different file extension that would trigger a different user experience.


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DXF import doesn't render

leebc
In reply to this post by Michele Denber
Make sure the file is where OpenSCAD is looking for it.

Typically for me this means:
        Saved in the same directory
        My openscad file is saved
        I've re-opened my openscad file.

There might be some issues with the layers too...


Thus Michele Denber hast written on Thu, Jun 03, 2021 at 03:31:38PM -0400, and, according to prophecy, it shall come to pass that:

> While trying to do this in version 2015.03-2
>
> linear_extrude(height = 10, center = true, convexity = 10)
>    import (file = "BrainiacDisc.dxf", layer = "plate");
>
> I get this output:
>
>
> Compiling design (CSG Tree generation)...
>
> Compiling design (CSG Products generation)...
>
> Geometries in cache: 8
>
> Geometry cache size in bytes: 544
>
> CGAL Polyhedrons in cache: 0
>
> CGAL cache size in bytes: 0
>
> Compiling design (CSG Products normalization)...
>
> Normalized CSG tree has 1 elements
>
> Compile and preview finished.
>
> Total rendering time: 0 hours, 0 minutes, 0 seconds
>
>
> but no graphics in the preview window with either F5 or F6.  Adding a render ()
> ; doesn't help.  This is the file: https://content.instructables.com/ORIG/FVW/
> KRMO/JYOOS8QT/FVWKRMOJYOOS8QT.dxf
>
>
> I can open it in CorelDraw and it looks OK there.  What am I doing wrong?
>
>
>             - Michele
>
>

> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DXF import doesn't render

Michele Denber
In reply to this post by dpa
On 06-03-2021 4:01 PM, dpa wrote:
> it has a long layer name, not the one you set it scad:
Thanks.  I did not appreciate the significance of all those parameter. 
I just copied them from the example in the user's manual.

             - Michele

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
rew
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

rew
In reply to this post by JordanBrown
On Thu, Jun 03, 2021 at 04:23:13PM +0000, Jordan Brown wrote:
>� Do
> Excel and Word, by default, execute macros embedded in the document when
> it is loaded?

They used to, but I haven't used them in a while. (decades).

> OpenSCAD is an integrated development environment, an IDE, for a
> programming language.  Do *any* other IDEs automatically execute the
> program when you load its source?

It seems that you think of openscad as a program that generates an
object. I think of the openscad code as BEING the object.

A program DOES things. Now, the distinction has become blurry,
Spreadsheets executing macros makes a spreadsheet partly a program.
(Leading to the "don't execute by default on startup" strategy
that is common now.)

In the discussion, I want a variable to change value during execution
it is always said that openscad is not a programming language. On the
other hand, it has lots of features that makes it look like one.


Suppose I make a gui shell around openscad. I click on "new cube" and
it adds "cube ([10,10,10]);" to the internal representation. I click
properties and change the default size to 40/20/10, the gui changes
the representation to "cube ([40,20,10]);". I then click "move object"
in the gui, and it changes to "translate ([0,0,0]) cube ([40,20,10]);"
Now I drag it 50 units along the X axis: "translate ([50,0,0]) cube
([40,20,10]);" .

This is just like word and excel: There is an internal representation
and the user thinks of it as objects in the object-space (for word
the objects are paragraphs, for excel it's datavalues and formulas
and for openscad-gui it's cubes and cylinders).

Current openscad is just this hypothetical openscad-gui but where the
user interacts with the objects in a different way.

        Roger.

--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

JordanBrown
On 6/3/2021 11:00 PM, Rogier Wolff wrote:
In the discussion, I want a variable to change value during execution
it is always said that openscad is not a programming language. On the
other hand, it has lots of features that makes it look like one.

I call OpenSCAD a programming language.  A very specialized one, but a programming language nonetheless.  Not that it directly matters to me, but I believe it's Turing-complete.  There are also arguments that it's a high-functioning macro language, but I don't find that to be a useful mental model.  I think computer scientists would describe it as a functional programming language, but I'm not sure - I'm a software engineer, not a computer scientist.

Suppose I make a gui shell around openscad. I click on "new cube" and
it adds "cube ([10,10,10]);" to the internal representation. I click
properties and change the default size to 40/20/10, the gui changes
the representation to "cube ([40,20,10]);". I then click "move object"
in the gui, and it changes to "translate ([0,0,0]) cube ([40,20,10]);"
Now I drag it 50 units along the X axis: "translate ([50,0,0]) cube
([40,20,10]);" . 

This is just like word and excel: There is an internal representation
and the user thinks of it as objects in the object-space (for word
the objects are paragraphs, for excel it's datavalues and formulas
and for openscad-gui it's cubes and cylinders). 

Current openscad is just this hypothetical openscad-gui but where the
user interacts with the objects in a different way.

I consider that to be the most uninteresting use of OpenSCAD possible.  If you're going to do that, why not just use a CSG tree?  Why bother with parsing the language and the complexity of variables, modules, et cetera? Using OpenSCAD to directly represent a CSG tree is like using Excel to represent an array of values, with no formulas.  Yeah, there are occasional applications for that trivial case, but formulas are what makes a spreadsheet an interesting tool.

OpenSCAD is interesting precisely because it allows you to write programs that generate objects.  Not just lists of objects, transforms, and boolean operations (and whatever class of operation hull and minkowski are), but with parameters and loops and decisions and functions and procedures.

If you're writing BlocksCAD then maybe your internal form would be OpenSCAD.  But if you're writing a "draw a cube and drag it" style application, using OpenSCAD as your internal form wouldn't make sense.

I use OpenSCAD precisely because it is *not* a "draw a cube and drag it" model.  I was going to say that I occasionally, but rarely, use it in that model, but I'm not sure that I *ever* do.  Even the near-trivial object that I designed yesterday (four cylinders, two transforms) I wouldn't want to do in a pure draw-and-drag model, because several of the dimensions are tied to one another.

I was about to say that it wouldn't be wrong to consider an OpenSCAD program to be a representation of a 3D object, but as I think about it more that's not correct.  It's not *just* a 3D object; it's also a representation of output text.  But more than that:  the Customizer lets it have a user interface that lets users adjust parameters.  And still more:  it has random numbers, so even with the same inputs it may not yield the same object on each run.

I'm not quite sure where this is going, but if you think that OpenSCAD is just a way to position and combine shapes in 3-space, I think you're drastically undervaluing it.


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

MichaelAtOz
Administrator
In reply to this post by snas

Dragging this back on topic.

Perhaps a command-line option?

 

enable 'customizer mode',

 

openscad.exe --customizer some-thing.scad

 

or just a hide or show windows option

 

openscad.exe --windows=[console,customizer] some-thing.scad

 

(any not included are hidden)

 

 

 


From: snas [mailto:[hidden email]]
Sent: Thu, 3 Jun 2021 23:25
To: [hidden email]
Subject: [OpenSCAD] suggestion window options override

 

I think Openscad is quite intimidating to those without programming experience and so anything that makes it easier to use and less intimidating can only be a good thing. With that in mind, I would like to suggest adding a feature whereby the window options can be set/overridden using a bit of code within the scad file itself.

eg
window(editor=0, consol=0, error log=0, customizer=1);

This way designers can export their creations in their least threatening, Customizer form.

I know it doesn't seem like a big deal to simply tell new users to go to the window menu and change the window options manually but all these little frictions add up and can ultimately put some people off using scad, which would be a real shame. The one good thing about Thingvese's Customizer was its usability, no installation, no lists of menus, no unfamiliar icons, just very straightforward to use.  Openscad may be better than Customizer in every other respect but it could still aspire to Customizer level of accessibility.

Insedenterly, I have no idea how easy or not it would be to modify the UI from code within the editor! :D


Sent from the OpenSCAD mailing list archive at Nabble.com.


Virus-free. www.avg.com

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

OpenSCAD mailing list-2
Why not have both?

Aren't there options for putting CLI options on the first line of a file in a comment in some tools? 

If there aren't any CLI options invoked, then parse that first line and execute any commands which are in the comments.

William

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

Troberg
In reply to this post by rew
rew wrote
Welll.... IMHO, the "auto-preview-on-load" feature should be on by
default. This is for consistency with other programs: Everything from
word and exel to "eagle" has an internal representation (modern word
and exel, that's an XML representation), which gets rendered to the
screen on startup. You might argue that openscad may need several
minutes to render something. Agreed. That's a disadvantage.
And sometimes you eff up and get stuck in an infinite loop and have to kill OpenSCAD to get out of it. It's nice if the first thing to happen when you restart it isn't a new lockup...

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

JordanBrown
In reply to this post by MichaelAtOz
On 6/5/2021 1:13 AM, MichaelAtOz wrote:

Dragging this back on topic.

Perhaps a command-line option?

 

enable 'customizer mode',

 

openscad.exe --customizer some-thing.scad

 

or just a hide or show windows option

 

openscad.exe --windows=[console,customizer] some-thing.scad

 

(any not included are hidden)



Doesn't really address the "total newbie not really interested in OpenSCAD per se has downloaded a customizable object from Thingiverse" use case.


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: suggestion window options override

nophead
If they are not interested in OpenSCAD why wouldn't they just use the Thingiverse customiser to get a customised STL? Why does OpenSCAD need to cater for  newbies not really interested in OpenSCAD?

On Sun, 6 Jun 2021 at 16:31, Jordan Brown <[hidden email]> wrote:
On 6/5/2021 1:13 AM, MichaelAtOz wrote:

Dragging this back on topic.

Perhaps a command-line option?

 

enable 'customizer mode',

 

openscad.exe --customizer some-thing.scad

 

or just a hide or show windows option

 

openscad.exe --windows=[console,customizer] some-thing.scad

 

(any not included are hidden)



Doesn't really address the "total newbie not really interested in OpenSCAD per se has downloaded a customizable object from Thingiverse" use case.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]