discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Novice, confused about saving files

RW
Rogier Wolff
Mon, Apr 12, 2021 9:02 AM

On Mon, Apr 12, 2021 at 12:57:06AM -0700, Terrypin via Discuss wrote:

From discussion here I now gather that is by design, although I remain
somewhat unclear why.

As you (not addressing you, terry) can see, the users don't understand
the customizer and how saving works.

I'd object to writing changes in the original file: That's the original
file and should not be touched.

But allowing the user to save a "customized XXX" would be welcome.
Avoid duplicating data, so the customization file would have:

customization of <location of scad>
parameter1=...

etc.

When loading the parameters need to be matched to the scad file again,
and you need to do something when it doesn't match. But when the scad
is stable, then it becomes easy to save/archive different
configurations of an scad file as "printed on 21-03-2021" or "as sent
to shapeways jan 2 2021" or "uncle john's present 2021".

Roger. 

--
** R.E.Wolff@BitWizard.nl ** 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.

On Mon, Apr 12, 2021 at 12:57:06AM -0700, Terrypin via Discuss wrote: > From discussion here I now gather that is by design, although I remain > somewhat unclear why. As you (not addressing you, terry) can see, the users don't understand the customizer and how saving works. I'd object to writing changes in the original file: That's the original file and should not be touched. But allowing the user to save a "customized XXX" would be welcome. Avoid duplicating data, so the customization file would have: customization of <location of scad> parameter1=... etc. When loading the parameters need to be matched to the scad file again, and you need to do something when it doesn't match. But when the scad is stable, then it becomes easy to save/archive different configurations of an scad file as "printed on 21-03-2021" or "as sent to shapeways jan 2 2021" or "uncle john's present 2021". Roger. -- ** R.E.Wolff@BitWizard.nl ** 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.
T
Terrypin
Mon, Apr 12, 2021 11:32 AM

Thanks Roger. Naturally I'd never (knowingly!) over-write the important
original file. Just as I avoid that in all other apps (Excel, Word, Cura, my
text, image and video editors, etc). But what is the downside of OpenSCAD
saving /all/ changes, including those made so conveniently in Customizer?
With the familiar warning whenever an existing file is about to be
over-written with the same name.

Terry

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

Thanks Roger. Naturally I'd never (knowingly!) over-write the important original file. Just as I avoid that in all other apps (Excel, Word, Cura, my text, image and video editors, etc). But what is the downside of OpenSCAD saving /all/ changes, including those made so conveniently in Customizer? With the familiar warning whenever an existing file is about to be over-written with the same name. Terry -- Sent from: http://forum.openscad.org/
NH
nop head
Mon, Apr 12, 2021 11:33 AM

I personally don't want my source code overwritten. It contains the default
values, which never change.

On Mon, 12 Apr 2021 at 12:32, Terrypin via Discuss <
discuss@lists.openscad.org> wrote:

Thanks Roger. Naturally I'd never (knowingly!) over-write the important
original file. Just as I avoid that in all other apps (Excel, Word, Cura,
my text, image and video editors, etc). But what is the downside of
OpenSCAD saving all changes, including those made so conveniently in
Customizer? With the familiar warning whenever an existing file is about to
be over-written with the same name.

Terry

Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I personally don't want my source code overwritten. It contains the default values, which never change. On Mon, 12 Apr 2021 at 12:32, Terrypin via Discuss < discuss@lists.openscad.org> wrote: > Thanks Roger. Naturally I'd never (knowingly!) over-write the important > original file. Just as I avoid that in all other apps (Excel, Word, Cura, > my text, image and video editors, etc). But what is the downside of > OpenSCAD saving *all* changes, including those made so conveniently in > Customizer? With the familiar warning whenever an existing file is about to > be over-written with the same name. > > Terry > ------------------------------ > Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/> > at Nabble.com. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Mon, Apr 12, 2021 12:06 PM

On Mon, Apr 12, 2021 at 04:32:09AM -0700, Terrypin via Discuss wrote:

Thanks Roger. Naturally I'd never (knowingly!) over-write the important
original file.

Data duplication in whatever form is bad. Leads to all sorts of bad
stuff.

There should be as little "double data" as possible.

Computing environment example: 35 years ago as a young programmer I
took the easy way out: I could have added a parameter to a function
that would make it do a slight variation of what it was supposed to
do. Instead I copied the function and just changed what needed to be
changed. That bit me in the behind when a bug was found in the common
code between those now-two routines. Twice. (bug found and fixed, then
2 weeks later: Didn't I fix this bug before? Same symptoms!)

"real world" example:

I've moved my company. So I notified the bank: I've moved, this is the
new address.

All is fine I get the statements at the new address and
everything. Then... (2.5 years after the move!) I notice my creditcard
has expired. When I call them, it turns out the creditcard division is
"separate enough from the bank" to have their own
addresses-database. Not updated from the main bank-database.They
probably mailed me the new card at the old address. That card is still
floating around somewhere.

So you saving the whole file under a new name causes data duplication:
A bug that you might find in the original will now need fixing is all
the variants you've made!

Nop head has explained why overwriting the defaults in the main source
file is not a good idea.

Roger.

--
** R.E.Wolff@BitWizard.nl ** 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.

On Mon, Apr 12, 2021 at 04:32:09AM -0700, Terrypin via Discuss wrote: > Thanks Roger. Naturally I'd never (knowingly!) over-write the important > original file. Data duplication in whatever form is bad. Leads to all sorts of bad stuff. There should be as little "double data" as possible. Computing environment example: 35 years ago as a young programmer I took the easy way out: I could have added a parameter to a function that would make it do a slight variation of what it was supposed to do. Instead I copied the function and just changed what needed to be changed. That bit me in the behind when a bug was found in the common code between those now-two routines. Twice. (bug found and fixed, then 2 weeks later: Didn't I fix this bug before? Same symptoms!) "real world" example: I've moved my company. So I notified the bank: I've moved, this is the new address. All is fine I get the statements at the new address and everything. Then... (2.5 years after the move!) I notice my creditcard has expired. When I call them, it turns out the creditcard division is "separate enough from the bank" to have their own addresses-database. Not updated from the main bank-database.They probably mailed me the new card at the old address. That card is still floating around somewhere. So you saving the whole file under a new name causes data duplication: A bug that you might find in the original will now need fixing is all the variants you've made! Nop head has explained why overwriting the defaults in the main source file is not a good idea. Roger. -- ** R.E.Wolff@BitWizard.nl ** 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.
RV
Roel Vanhout
Mon, Apr 12, 2021 12:10 PM

I'm a bit puzzled by this whole conversation. Maybe it's because I'm a
software developer, but the idea that the Customizer would make changes
that get applied and saved to/with the source code is completely foreign to
me. My mental model is: the GUI opens the source file, parses it and builds
an in-memory AST. The Customizer is a sort of backdoor into this, i.e.
anything you change there, is applied to specific nodes in the AST. Then
the model is rendered and that is what you see. But, if you would want to
save the AST with the changes applied, you would have to keep a bunch of
information that is (I presume, I never looked at OpenSCAD source code)
lost to the software after parsing (like comments and whitespace).
'Compiling' source code is a one-way street. Yes, there are IDE's that try
to intelligently help you with inserting code, sometimes based on
information derived from compiling the source; but not by serializing a
modified abstract representation of that code. The Customizer is not a tool
that edits source code; it's a convenient way of building simple GUI's for
parametric models (at least, this is how I as a relatively novice user see
it, not trying to claim universal truths here).

Again, I'm probably brain damaged by being a developer for 20 years to the
point where I am no longer able to really empathize with the way others see
source code or some other things in software in general, but maybe it would
help you to not see the Customizer as a tool to 'edit' models, but only as
one to 'customize' existing models. In this model it makes much more sense
to have separate 'presets' that are distinct from the source code itself.

cheers

Roel

PS on the other topic of this thread - for me the big advantages of using
an external editor are 1) that I can use the more powerful editor I use for
everything else to also edit OpenSCAD models/source code, and 2) I can have
that editor on another monitor and have more preview screen real estate for
the OpenSCAD GUI on another monitor.

On Mon, Apr 12, 2021 at 1:32 PM Terrypin via Discuss <
discuss@lists.openscad.org> wrote:

Thanks Roger. Naturally I'd never (knowingly!) over-write the important
original file. Just as I avoid that in all other apps (Excel, Word, Cura,
my text, image and video editors, etc). But what is the downside of
OpenSCAD saving all changes, including those made so conveniently in
Customizer? With the familiar warning whenever an existing file is about to
be over-written with the same name.

Terry

Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I'm a bit puzzled by this whole conversation. Maybe it's because I'm a software developer, but the idea that the Customizer would make changes that get applied and saved to/with the source code is completely foreign to me. My mental model is: the GUI opens the source file, parses it and builds an in-memory AST. The Customizer is a sort of backdoor into this, i.e. anything you change there, is applied to specific nodes in the AST. Then the model is rendered and that is what you see. But, if you would want to save the AST with the changes applied, you would have to keep a bunch of information that is (I presume, I never looked at OpenSCAD source code) lost to the software after parsing (like comments and whitespace). 'Compiling' source code is a one-way street. Yes, there are IDE's that try to intelligently help you with inserting code, sometimes based on information derived from compiling the source; but not by serializing a modified abstract representation of that code. The Customizer is not a tool that edits source code; it's a convenient way of building simple GUI's for parametric models (at least, this is how I as a relatively novice user see it, not trying to claim universal truths here). Again, I'm probably brain damaged by being a developer for 20 years to the point where I am no longer able to really empathize with the way others see source code or some other things in software in general, but maybe it would help you to not see the Customizer as a tool to 'edit' models, but only as one to 'customize' existing models. In this model it makes much more sense to have separate 'presets' that are distinct from the source code itself. cheers Roel PS on the other topic of this thread - for me the big advantages of using an external editor are 1) that I can use the more powerful editor I use for everything else to also edit OpenSCAD models/source code, and 2) I can have that editor on another monitor and have more preview screen real estate for the OpenSCAD GUI on another monitor. On Mon, Apr 12, 2021 at 1:32 PM Terrypin via Discuss < discuss@lists.openscad.org> wrote: > Thanks Roger. Naturally I'd never (knowingly!) over-write the important > original file. Just as I avoid that in all other apps (Excel, Word, Cura, > my text, image and video editors, etc). But what is the downside of > OpenSCAD saving *all* changes, including those made so conveniently in > Customizer? With the familiar warning whenever an existing file is about to > be over-written with the same name. > > Terry > ------------------------------ > Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/> > at Nabble.com. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Mon, Apr 12, 2021 3:59 PM

On 4/12/2021 1:14 AM, Terrypin via Discuss wrote:

Thanks but I still don’t get it, sorry! I’m using /only/ the forum,
so....?

It’s trivial I know (adding my sig fixes the anonymity) but is there
really no simple fix to display ‘terrypin’ rather than ‘OpenSCAD
mailing list-2’?

I don't know about the forum, but on the mailing list you come through
as "Terrypin via Discuss", with a CC of "Terrypin
T.pinnell@btinternet.com".

(And the Reply-To is set to the mailing list... evil, evil, evil.)

On 4/12/2021 1:14 AM, Terrypin via Discuss wrote: > Thanks but I still don’t get it, sorry! I’m using /only/ the forum, > so....? > > It’s trivial I know (adding my sig fixes the anonymity) but is there > really no simple fix to display ‘terrypin’ rather than ‘OpenSCAD > mailing list-2’? I don't know about the forum, but on the mailing list you come through as "Terrypin via Discuss", with a CC of "Terrypin <T.pinnell@btinternet.com>". (And the Reply-To is set to the mailing list... evil, evil, evil.)
JB
Jordan Brown
Mon, Apr 12, 2021 4:07 PM

On 4/12/2021 5:10 AM, Roel Vanhout wrote:

[ AST ]

I don't think there's any chance that a beginner will think of it in
terms of the AST.

The Customizer is not a tool that edits source code; it's a convenient
way of building simple GUI's for parametric models
[... ]
but maybe it would help you to not see the Customizer as a tool to
'edit' models, but only as one to 'customize' existing models. In this
model it makes much more sense to have separate 'presets' that are
distinct from the source code itself.

Yes, I think those are the right mental model.

PS on the other topic of this thread - for me the big advantages of
using an external editor are [...] 2) I can have that editor on
another monitor and have more preview screen real estate for the
OpenSCAD GUI on another monitor.

Edit / Preferences / Advanced, check "Enable undocking of Editor and
Console to separate windows".  If you have a lot of screen real estate,
it's the only way to fly.

On 4/12/2021 5:10 AM, Roel Vanhout wrote: > [ AST ] I don't think there's any chance that a beginner will think of it in terms of the AST. > The Customizer is not a tool that edits source code; it's a convenient > way of building simple GUI's for parametric models > [... ] > but maybe it would help you to not see the Customizer as a tool to > 'edit' models, but only as one to 'customize' existing models. In this > model it makes much more sense to have separate 'presets' that are > distinct from the source code itself. Yes, I think those are the right mental model. > PS on the other topic of this thread - for me the big advantages of > using an external editor are [...] 2) I can have that editor on > another monitor and have more preview screen real estate for the > OpenSCAD GUI on another monitor. Edit / Preferences / Advanced, check "Enable undocking of Editor and Console to separate windows".  If you have a lot of screen real estate, it's the only way to fly.
M
MichaelAtOz
Tue, Apr 13, 2021 1:43 AM

Thanks for more clues.

This may be the Mailing-list DMARC mitigation.

I've changed the option, to wrap the message, added a message '<Wrapped message - DMARC mitigation>'.

We'll see with your next post.

BTW it is never only on the Forum, Forum proto-posts go to the Mailing-list, then back to the Forum to then be posted there.


From: Terrypin via Discuss [mailto:discuss@lists.openscad.org]
Sent: Mon, 12 Apr 2021 18:14
To: discuss@lists.openscad.org
Cc: Terrypin
Subject: [OpenSCAD] Re: Novice, confused about saving files

Thanks but I still don’t get it, sorry! I’m using only the forum, so....?

It’s trivial I know (adding my sig fixes the anonymity) but is there really no simple fix to display ‘terrypin’ rather than ‘OpenSCAD mailing list-2’?

Terry


Sent from the OpenSCAD mailing http://forum.openscad.org/  list archive at Nabble.com.

--
This email has been checked for viruses by AVG.
https://www.avg.com

Thanks for more clues. This may be the Mailing-list DMARC mitigation. I've changed the option, to wrap the message, added a message '<Wrapped message - DMARC mitigation>'. We'll see with your next post. BTW it is never only on the Forum, Forum proto-posts go to the Mailing-list, then back to the Forum to then be posted there. _____ From: Terrypin via Discuss [mailto:discuss@lists.openscad.org] Sent: Mon, 12 Apr 2021 18:14 To: discuss@lists.openscad.org Cc: Terrypin Subject: [OpenSCAD] Re: Novice, confused about saving files Thanks but I still don’t get it, sorry! I’m using only the forum, so....? It’s trivial I know (adding my sig fixes the anonymity) but is there really no simple fix to display ‘terrypin’ rather than ‘OpenSCAD mailing list-2’? Terry _____ Sent from the OpenSCAD mailing <http://forum.openscad.org/> list archive at Nabble.com. -- This email has been checked for viruses by AVG. https://www.avg.com
T
Terrypin
Tue, Apr 13, 2021 10:56 AM

OK, I'm clearly on my own about this then. So I'll defer to the experts
rather than press my case further!

However I'd appreciate suggestions on how to overcome the minor frustration
that prompted this thread. Six weeks into this hobby I'm working with
several types of SCAD file and workflow differs between them. Files for
simple learning exercises are irrelevant in the present context. If there
are any parameters, or I add them, I don't use Customizer but edit directly.

There are also more complex models that I'm impatient to use to get stuff
printed, even before fully understanding the code. Take the current example
of nophead's 'Polygonal hole test'. I downloaded the SCAD from
https://www.thingiverse.com/thing:6118 to
C:\Users\terry\Dropbox\3D Printer\PROJECTS\Polygonal_hole_test\nophead
original\polyholes.scad
and opened it in OpenSCAD then gave it the new name and location of
C:\Users\terry\Dropbox\3D
Printer\PROJECTS\Polygonal_hole_test\polyholes-e1.stl
where the '-e1' suffix indicates my first edit.
http://forum.openscad.org/file/t3184/polyholes-e1.jpg

It's not parameterised so I customised it by editing the code as shown.
(This was to get a much smaller 'test template', as I mainly want holes for
the lids of small project cases, with size M2, M3 or M4 screws/bolts.)

I then saved the STL as polyholes-e1.scad, opened that in Cura for slicing,
where I saved an image including settings as polyholes-e1.jpg, and then
saved the result as polyholes-e1.gcode and printed it.

All four file types have identical names for fast access.

Suppose I then decided that I'd like to add a seventh hole. I could simply
open my latest edit and proceed to make that further change.

If the model had been parametrised, at this stage of my ignorance I might
have impatiently sacrificed the learning opportunity and used the
Customizer. But that would not have allowed me to save an appropriately
named new SCAD file. My intuitive workflow - one I'm used to in just about
every other application, such as those I listed earlier - would then be
broken.

Terry (who doesn't know an AST from an elbow! )

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

OK, I'm clearly on my own about this then. So I'll defer to the experts rather than press my case further! However I'd appreciate suggestions on how to overcome the minor frustration that prompted this thread. Six weeks into this hobby I'm working with several types of SCAD file and workflow differs between them. Files for simple learning exercises are irrelevant in the present context. If there are any parameters, or I add them, I don't use Customizer but edit directly. There are also more complex models that I'm impatient to use to get stuff printed, even before fully understanding the code. Take the current example of nophead's 'Polygonal hole test'. I downloaded the SCAD from https://www.thingiverse.com/thing:6118 to C:\Users\terry\Dropbox\3D Printer\PROJECTS\Polygonal_hole_test\nophead original\polyholes.scad and opened it in OpenSCAD then gave it the new name and location of C:\Users\terry\Dropbox\3D Printer\PROJECTS\Polygonal_hole_test\polyholes-e1.stl where the '-e1' suffix indicates my first edit. <http://forum.openscad.org/file/t3184/polyholes-e1.jpg> It's not parameterised so I customised it by editing the code as shown. (This was to get a much smaller 'test template', as I mainly want holes for the lids of small project cases, with size M2, M3 or M4 screws/bolts.) I then saved the STL as polyholes-e1.scad, opened that in Cura for slicing, where I saved an image including settings as polyholes-e1.jpg, and then saved the result as polyholes-e1.gcode and printed it. All four file types have identical names for fast access. Suppose I then decided that I'd like to add a seventh hole. I could simply open my latest edit and proceed to make that further change. If the model had been parametrised, at this stage of my ignorance I might have impatiently sacrificed the learning opportunity and used the Customizer. But that would not have allowed me to save an appropriately named new SCAD file. My intuitive workflow - one I'm used to in just about every other application, such as those I listed earlier - would then be broken. Terry (who doesn't know an AST from an elbow! ) -- Sent from: http://forum.openscad.org/
T
Terrypin
Tue, Apr 13, 2021 11:47 AM

Thanks Michael, but that doesn’t seem to have worked.

BTW, I first tried sending this reply using the ‘Reply to author’ option,
but that resulted in an ‘invalid’ email returned.

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

Thanks Michael, but that doesn’t seem to have worked. BTW, I first tried sending this reply using the ‘Reply to author’ option, but that resulted in an ‘invalid’ email returned. -- Sent from: http://forum.openscad.org/