discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

RS
Russell Salerno
Fri, Apr 3, 2020 5:06 PM
  1. Easy & efficient way to create fillets and chamfers.

  2. On OSX version, enable "End" key to move cursor to EOL in editor.

On 4/3/20, discuss-request@lists.openscad.org
discuss-request@lists.openscad.org wrote:

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: User Poll: What do you want to see from OpenSCAD
   development? (AKADAP)

Message: 1
Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST)
From: AKADAP Douglas_Peale@Comcast.net
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] User Poll: What do you want to see from
OpenSCAD development?
Message-ID: 1585852154534-0.post@n5.nabble.com
Content-Type: text/plain; charset=us-ascii

I would like to see either an extension to rotate_extrude() or a new
extrude
function to implement a proper spiral (no linear_extrude() is not good
enough as the object being extruded is not orthogonal to the path).
I feel so strongly about this that I attempted to implement this myself
within the language: https://www.thingiverse.com/thing:1958354
It works after a fashion, but because I could not directly access the
points
of the children, it could not be implemented in the most efficient manner,
and is at best an approximation.

I'd also like to be able to put children into a list. I recently ran into a
limitation of the current version of OpenSCAD that prevented me from
algorithmicly generating children to be passed to a library function. The
output of a for() loop is a union, so it only generates one child, but a
for() loop can generate a list of any other type of object. Being able to
generate a list of children seems to me a useful generalization to solve
the
problem I ran into.

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


Subject: Digest Footer


Discuss mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


End of Discuss Digest, Vol 65, Issue 2


1) Easy & efficient way to create fillets and chamfers. 2) On OSX version, enable "End" key to move cursor to EOL in editor. On 4/3/20, discuss-request@lists.openscad.org <discuss-request@lists.openscad.org> wrote: > Send Discuss mailing list submissions to > discuss@lists.openscad.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > or, via email, send a message with subject or body 'help' to > discuss-request@lists.openscad.org > > You can reach the person managing the list at > discuss-owner@lists.openscad.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Discuss digest..." > > > Today's Topics: > > 1. Re: User Poll: What do you want to see from OpenSCAD > development? (AKADAP) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST) > From: AKADAP <Douglas_Peale@Comcast.net> > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] User Poll: What do you want to see from > OpenSCAD development? > Message-ID: <1585852154534-0.post@n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > I would like to see either an extension to rotate_extrude() or a new > extrude > function to implement a proper spiral (no linear_extrude() is not good > enough as the object being extruded is not orthogonal to the path). > I feel so strongly about this that I attempted to implement this myself > within the language: https://www.thingiverse.com/thing:1958354 > It works after a fashion, but because I could not directly access the > points > of the children, it could not be implemented in the most efficient manner, > and is at best an approximation. > > I'd also like to be able to put children into a list. I recently ran into a > limitation of the current version of OpenSCAD that prevented me from > algorithmicly generating children to be passed to a library function. The > output of a for() loop is a union, so it only generates one child, but a > for() loop can generate a list of any other type of object. Being able to > generate a list of children seems to me a useful generalization to solve > the > problem I ran into. > > > > -- > Sent from: http://forum.openscad.org/ > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Discuss mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > ------------------------------ > > End of Discuss Digest, Vol 65, Issue 2 > ************************************** >
K
ken@volksswitch.org
Sat, Apr 4, 2020 10:49 PM
  1. provide a Lint like feature () to help me identify modules that are never called and variables that are never used
  2. allow a variable to be assigned a new value after it has already been assigned a value
  3. allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes
  4. allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set

-- and fillets/chamfers like Russell says below!

-----Original Message-----
From: Russell Salerno rssalerno@gmail.com
Sent: Friday, April 3, 2020 11:06 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

  1. Easy & efficient way to create fillets and chamfers.

  2. On OSX version, enable "End" key to move cursor to EOL in editor.

On 4/3/20, discuss-request@lists.openscad.org
discuss-request@lists.openscad.org wrote:

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: User Poll: What do you want to see from OpenSCAD
   development? (AKADAP)

Message: 1
Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST)
From: AKADAP Douglas_Peale@Comcast.net
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] User Poll: What do you want to see from
OpenSCAD development?
Message-ID: 1585852154534-0.post@n5.nabble.com
Content-Type: text/plain; charset=us-ascii

I would like to see either an extension to rotate_extrude() or a new
extrude function to implement a proper spiral (no linear_extrude() is
not good enough as the object being extruded is not orthogonal to the
path).
I feel so strongly about this that I attempted to implement this
myself within the language: https://www.thingiverse.com/thing:1958354
It works after a fashion, but because I could not directly access the
points of the children, it could not be implemented in the most
efficient manner, and is at best an approximation.

I'd also like to be able to put children into a list. I recently ran
into a limitation of the current version of OpenSCAD that prevented me
from algorithmicly generating children to be passed to a library
function. The output of a for() loop is a union, so it only generates
one child, but a
for() loop can generate a list of any other type of object. Being able
to generate a list of children seems to me a useful generalization to
solve the problem I ran into.

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


Subject: Digest Footer


Discuss mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


End of Discuss Digest, Vol 65, Issue 2


1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used 2) allow a variable to be assigned a new value after it has already been assigned a value 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes 4) allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set -- and fillets/chamfers like Russell says below! -----Original Message----- From: Russell Salerno <rssalerno@gmail.com> Sent: Friday, April 3, 2020 11:06 AM To: discuss@lists.openscad.org Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2 1) Easy & efficient way to create fillets and chamfers. 2) On OSX version, enable "End" key to move cursor to EOL in editor. On 4/3/20, discuss-request@lists.openscad.org <discuss-request@lists.openscad.org> wrote: > Send Discuss mailing list submissions to > discuss@lists.openscad.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > or, via email, send a message with subject or body 'help' to > discuss-request@lists.openscad.org > > You can reach the person managing the list at > discuss-owner@lists.openscad.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Discuss digest..." > > > Today's Topics: > > 1. Re: User Poll: What do you want to see from OpenSCAD > development? (AKADAP) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST) > From: AKADAP <Douglas_Peale@Comcast.net> > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] User Poll: What do you want to see from > OpenSCAD development? > Message-ID: <1585852154534-0.post@n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > I would like to see either an extension to rotate_extrude() or a new > extrude function to implement a proper spiral (no linear_extrude() is > not good enough as the object being extruded is not orthogonal to the > path). > I feel so strongly about this that I attempted to implement this > myself within the language: https://www.thingiverse.com/thing:1958354 > It works after a fashion, but because I could not directly access the > points of the children, it could not be implemented in the most > efficient manner, and is at best an approximation. > > I'd also like to be able to put children into a list. I recently ran > into a limitation of the current version of OpenSCAD that prevented me > from algorithmicly generating children to be passed to a library > function. The output of a for() loop is a union, so it only generates > one child, but a > for() loop can generate a list of any other type of object. Being able > to generate a list of children seems to me a useful generalization to > solve the problem I ran into. > > > > -- > Sent from: http://forum.openscad.org/ > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Discuss mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > ------------------------------ > > End of Discuss Digest, Vol 65, Issue 2 > ************************************** >
DM
Doug Moen
Sat, Apr 4, 2020 11:13 PM

Ken said: 4) allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set

What limitations prevent you from using the 'if' statement for this?

Doug Moen

On Sat, Apr 4, 2020, at 6:49 PM, ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are
    never called and variables that are never used
  2. allow a variable to be assigned a new value after it has already
    been assigned a value
  3. allow for a variable to be assigned a value in an if statement and
    then have that value preserved when the if completes
  4. allow for directives/pragma that can specify that certain blocks of
    code aren't executed if a property is set

-- and fillets/chamfers like Russell says below!

-----Original Message-----
From: Russell Salerno rssalerno@gmail.com
Sent: Friday, April 3, 2020 11:06 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

  1. Easy & efficient way to create fillets and chamfers.

  2. On OSX version, enable "End" key to move cursor to EOL in editor.

On 4/3/20, discuss-request@lists.openscad.org
discuss-request@lists.openscad.org wrote:

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: User Poll: What do you want to see from OpenSCAD
   development? (AKADAP)

Message: 1
Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST)
From: AKADAP Douglas_Peale@Comcast.net
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] User Poll: What do you want to see from
OpenSCAD development?
Message-ID: 1585852154534-0.post@n5.nabble.com
Content-Type: text/plain; charset=us-ascii

I would like to see either an extension to rotate_extrude() or a new
extrude function to implement a proper spiral (no linear_extrude() is
not good enough as the object being extruded is not orthogonal to the
path).
I feel so strongly about this that I attempted to implement this
myself within the language: https://www.thingiverse.com/thing:1958354
It works after a fashion, but because I could not directly access the
points of the children, it could not be implemented in the most
efficient manner, and is at best an approximation.

I'd also like to be able to put children into a list. I recently ran
into a limitation of the current version of OpenSCAD that prevented me
from algorithmicly generating children to be passed to a library
function. The output of a for() loop is a union, so it only generates
one child, but a
for() loop can generate a list of any other type of object. Being able
to generate a list of children seems to me a useful generalization to
solve the problem I ran into.

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


Subject: Digest Footer


Discuss mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


End of Discuss Digest, Vol 65, Issue 2


Ken said: 4) allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set What limitations prevent you from using the 'if' statement for this? Doug Moen On Sat, Apr 4, 2020, at 6:49 PM, ken@volksswitch.org wrote: > 1) provide a Lint like feature () to help me identify modules that are > never called and variables that are never used > 2) allow a variable to be assigned a new value after it has already > been assigned a value > 3) allow for a variable to be assigned a value in an if statement and > then have that value preserved when the if completes > 4) allow for directives/pragma that can specify that certain blocks of > code aren't executed if a property is set > > -- and fillets/chamfers like Russell says below! > > > -----Original Message----- > From: Russell Salerno <rssalerno@gmail.com> > Sent: Friday, April 3, 2020 11:06 AM > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2 > > 1) Easy & efficient way to create fillets and chamfers. > > 2) On OSX version, enable "End" key to move cursor to EOL in editor. > > On 4/3/20, discuss-request@lists.openscad.org > <discuss-request@lists.openscad.org> wrote: > > Send Discuss mailing list submissions to > > discuss@lists.openscad.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > or, via email, send a message with subject or body 'help' to > > discuss-request@lists.openscad.org > > > > You can reach the person managing the list at > > discuss-owner@lists.openscad.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Discuss digest..." > > > > > > Today's Topics: > > > > 1. Re: User Poll: What do you want to see from OpenSCAD > > development? (AKADAP) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST) > > From: AKADAP <Douglas_Peale@Comcast.net> > > To: discuss@lists.openscad.org > > Subject: Re: [OpenSCAD] User Poll: What do you want to see from > > OpenSCAD development? > > Message-ID: <1585852154534-0.post@n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > I would like to see either an extension to rotate_extrude() or a new > > extrude function to implement a proper spiral (no linear_extrude() is > > not good enough as the object being extruded is not orthogonal to the > > path). > > I feel so strongly about this that I attempted to implement this > > myself within the language: https://www.thingiverse.com/thing:1958354 > > It works after a fashion, but because I could not directly access the > > points of the children, it could not be implemented in the most > > efficient manner, and is at best an approximation. > > > > I'd also like to be able to put children into a list. I recently ran > > into a limitation of the current version of OpenSCAD that prevented me > > from algorithmicly generating children to be passed to a library > > function. The output of a for() loop is a union, so it only generates > > one child, but a > > for() loop can generate a list of any other type of object. Being able > > to generate a list of children seems to me a useful generalization to > > solve the problem I ran into. > > > > > > > > -- > > Sent from: http://forum.openscad.org/ > > > > > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > Discuss mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > > > > ------------------------------ > > > > End of Discuss Digest, Vol 65, Issue 2 > > ************************************** > > > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
K
ken@volksswitch.org
Sat, Apr 4, 2020 11:19 PM

I need to control the execution of code that appears in the Customizer
region of the code.  That means that I have to define the controlling
parameter before that code... which exposes the controlling parameter in the
Customizer.  In fact, you can't wrap Customizer parameters in an If block
anyway so what I just said is moot - I don't think I could use an inline If
either...

Thanks,
Ken

-----Original Message-----
From: Doug Moen doug@moens.org
Sent: Saturday, April 4, 2020 5:14 PM
To: ken@volksswitch.org; OpenSCAD Discuss discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

Ken said: 4) allow for directives/pragma that can specify that certain
blocks of code aren't executed if a property is set

What limitations prevent you from using the 'if' statement for this?

Doug Moen

On Sat, Apr 4, 2020, at 6:49 PM, ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are
    never called and variables that are never used
  2. allow a variable to be assigned a new value after it has already
    been assigned a value
  3. allow for a variable to be assigned a value in an if statement and
    then have that value preserved when the if completes
  4. allow for directives/pragma that can specify that certain blocks of
    code aren't executed if a property is set

-- and fillets/chamfers like Russell says below!

-----Original Message-----
From: Russell Salerno rssalerno@gmail.com
Sent: Friday, April 3, 2020 11:06 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

  1. Easy & efficient way to create fillets and chamfers.

  2. On OSX version, enable "End" key to move cursor to EOL in editor.

On 4/3/20, discuss-request@lists.openscad.org
discuss-request@lists.openscad.org wrote:

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit

http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.or
g or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: User Poll: What do you want to see from OpenSCAD
   development? (AKADAP)

--

Message: 1
Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST)
From: AKADAP Douglas_Peale@Comcast.net
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] User Poll: What do you want to see from
OpenSCAD development?
Message-ID: 1585852154534-0.post@n5.nabble.com
Content-Type: text/plain; charset=us-ascii

I would like to see either an extension to rotate_extrude() or a new
extrude function to implement a proper spiral (no linear_extrude()
is not good enough as the object being extruded is not orthogonal to
the path).
I feel so strongly about this that I attempted to implement this
myself within the language:
https://www.thingiverse.com/thing:1958354
It works after a fashion, but because I could not directly access
the points of the children, it could not be implemented in the most
efficient manner, and is at best an approximation.

I'd also like to be able to put children into a list. I recently ran
into a limitation of the current version of OpenSCAD that prevented
me from algorithmicly generating children to be passed to a library
function. The output of a for() loop is a union, so it only
generates one child, but a
for() loop can generate a list of any other type of object. Being
able to generate a list of children seems to me a useful
generalization to solve the problem I ran into.

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


Subject: Digest Footer


Discuss mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.or
g


End of Discuss Digest, Vol 65, Issue 2


I need to control the execution of code that appears in the Customizer region of the code. That means that I have to define the controlling parameter before that code... which exposes the controlling parameter in the Customizer. In fact, you can't wrap Customizer parameters in an If block anyway so what I just said is moot - I don't think I could use an inline If either... Thanks, Ken -----Original Message----- From: Doug Moen <doug@moens.org> Sent: Saturday, April 4, 2020 5:14 PM To: ken@volksswitch.org; OpenSCAD Discuss <discuss@lists.openscad.org> Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2 Ken said: 4) allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set What limitations prevent you from using the 'if' statement for this? Doug Moen On Sat, Apr 4, 2020, at 6:49 PM, ken@volksswitch.org wrote: > 1) provide a Lint like feature () to help me identify modules that are > never called and variables that are never used > 2) allow a variable to be assigned a new value after it has already > been assigned a value > 3) allow for a variable to be assigned a value in an if statement and > then have that value preserved when the if completes > 4) allow for directives/pragma that can specify that certain blocks of > code aren't executed if a property is set > > -- and fillets/chamfers like Russell says below! > > > -----Original Message----- > From: Russell Salerno <rssalerno@gmail.com> > Sent: Friday, April 3, 2020 11:06 AM > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2 > > 1) Easy & efficient way to create fillets and chamfers. > > 2) On OSX version, enable "End" key to move cursor to EOL in editor. > > On 4/3/20, discuss-request@lists.openscad.org > <discuss-request@lists.openscad.org> wrote: > > Send Discuss mailing list submissions to > > discuss@lists.openscad.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.or > > g or, via email, send a message with subject or body 'help' to > > discuss-request@lists.openscad.org > > > > You can reach the person managing the list at > > discuss-owner@lists.openscad.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Discuss digest..." > > > > > > Today's Topics: > > > > 1. Re: User Poll: What do you want to see from OpenSCAD > > development? (AKADAP) > > > > > > -------------------------------------------------------------------- > > -- > > > > Message: 1 > > Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST) > > From: AKADAP <Douglas_Peale@Comcast.net> > > To: discuss@lists.openscad.org > > Subject: Re: [OpenSCAD] User Poll: What do you want to see from > > OpenSCAD development? > > Message-ID: <1585852154534-0.post@n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > I would like to see either an extension to rotate_extrude() or a new > > extrude function to implement a proper spiral (no linear_extrude() > > is not good enough as the object being extruded is not orthogonal to > > the path). > > I feel so strongly about this that I attempted to implement this > > myself within the language: > > https://www.thingiverse.com/thing:1958354 > > It works after a fashion, but because I could not directly access > > the points of the children, it could not be implemented in the most > > efficient manner, and is at best an approximation. > > > > I'd also like to be able to put children into a list. I recently ran > > into a limitation of the current version of OpenSCAD that prevented > > me from algorithmicly generating children to be passed to a library > > function. The output of a for() loop is a union, so it only > > generates one child, but a > > for() loop can generate a list of any other type of object. Being > > able to generate a list of children seems to me a useful > > generalization to solve the problem I ran into. > > > > > > > > -- > > Sent from: http://forum.openscad.org/ > > > > > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > Discuss mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.or > > g > > > > > > ------------------------------ > > > > End of Discuss Digest, Vol 65, Issue 2 > > ************************************** > > > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
JB
Jordan Brown
Sat, Apr 4, 2020 11:26 PM

On 4/4/2020 3:49 PM, ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are never called and variables that are never used

Note that as in lint itself there would need to be a way to mark a file
as containing a library, since it's normal not to use all of the
features exported by the library.

  1. allow a variable to be assigned a new value after it has already been assigned a value
  2. allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes

I'm not one of the developers, but this is easy to answer:  not going to
happen.  OpenSCAD doesn't execute anything like a conventional
language.  It does not execute lines in the order that you expect.
(And some features, like the children() feature, depend on that fact.)

For fun, try this program.  Try to predict this output, then run it,
then try to understand the results.

module foo() {
    a = echo("foo assignment 1") 0;
    children(1);
    children(0);
    b = echo("foo assignment 2") 0;
}

foo() {
    x = echo("assignment 1") 0;
    echo("child 1");
    echo("child 2");
    echo("child 3");
    y = echo("assignment 2") 0;
}

For extra fun, try throwing $ variables into the mix.

On 4/4/2020 3:49 PM, ken@volksswitch.org wrote: > 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used Note that as in lint itself there would need to be a way to mark a file as containing a library, since it's normal not to use all of the features exported by the library. > 2) allow a variable to be assigned a new value after it has already been assigned a value > 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes I'm not one of the developers, but this is easy to answer:  not going to happen.  OpenSCAD doesn't execute anything like a conventional language.  It does *not* execute lines in the order that you expect. (And some features, like the children() feature, depend on that fact.) For fun, try this program.  Try to predict this output, then run it, then try to understand the results. module foo() { a = echo("foo assignment 1") 0; children(1); children(0); b = echo("foo assignment 2") 0; } foo() { x = echo("assignment 1") 0; echo("child 1"); echo("child 2"); echo("child 3"); y = echo("assignment 2") 0; } For extra fun, try throwing $ variables into the mix.
RW
Ron Wheeler
Sat, Apr 4, 2020 11:54 PM

I also want #2 and #3.
I would like to count included components as they are added and need
true global variables/functions that last for the entire execution to do
this.
If you are adding dozens of different OTS components to a product
design, it is a PITA not to be able to come up with a BOM for the
product as part of the design.

#4 seems to make a lot of sense if you are really trying to do
parametric design.
One should not have to copy, paste and edit a module for each library
used to build the product

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#Special_variables
seems to suggest that user defined variables actually might do this but
it appears that the documentation is wrong or misleading. Needs a look
from someone who knows.

Mine:
Error messages should be less about the way a programmer sees an
internal function failing and more about what the designer/user might
have done. This might require a bit of work to suggest issues that
started in earlier lines but some might be easy - too many or too few
"}" could be explained "Missing closing bracket" "More closing brackets
than opening brackets" This would seem to be easy to detect and report.

Missing closing ";" might be suggested when it is easy to guess that the
syntax would be correct if the earlier line had been closed properly.
That is, the parser sees a token that is legal but not in the right
context. This would only be a suggestion to the designer as a place to
look. 'Did you forget a ";"?'

I am a new user and like the project so far. I am a software guy but
have supported engineers using parametric CAD for more than 15 years and
have been using Blender for a long time and recently for 3D printing.
Would like to move to openSCAD and so far I am pretty happy. Not printed
anything yet but we are under self-isolating lockdown for now.

Ron

On 2020-04-04 6:49 p.m., ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are never called and variables that are never used
  2. allow a variable to be assigned a new value after it has already been assigned a value
  3. allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes
  4. allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set

-- and fillets/chamfers like Russell says below!

-----Original Message-----
From: Russell Salerno rssalerno@gmail.com
Sent: Friday, April 3, 2020 11:06 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2

  1. Easy & efficient way to create fillets and chamfers.

  2. On OSX version, enable "End" key to move cursor to EOL in editor.

On 4/3/20, discuss-request@lists.openscad.org
discuss-request@lists.openscad.org wrote:

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

 1. Re: User Poll: What do you want to see from OpenSCAD
    development? (AKADAP)

Message: 1
Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST)
From: AKADAP Douglas_Peale@Comcast.net
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] User Poll: What do you want to see from
OpenSCAD development?
Message-ID: 1585852154534-0.post@n5.nabble.com
Content-Type: text/plain; charset=us-ascii

I would like to see either an extension to rotate_extrude() or a new
extrude function to implement a proper spiral (no linear_extrude() is
not good enough as the object being extruded is not orthogonal to the
path).
I feel so strongly about this that I attempted to implement this
myself within the language: https://www.thingiverse.com/thing:1958354
It works after a fashion, but because I could not directly access the
points of the children, it could not be implemented in the most
efficient manner, and is at best an approximation.

I'd also like to be able to put children into a list. I recently ran
into a limitation of the current version of OpenSCAD that prevented me
from algorithmicly generating children to be passed to a library
function. The output of a for() loop is a union, so it only generates
one child, but a
for() loop can generate a list of any other type of object. Being able
to generate a list of children seems to me a useful generalization to
solve the problem I ran into.

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


Subject: Digest Footer


Discuss mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


End of Discuss Digest, Vol 65, Issue 2


--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com

I also want #2 and #3. I would like to count included components as they are added and need true global variables/functions that last for the entire execution to do this. If you are adding dozens of different OTS components to a product design, it is a PITA not to be able to come up with a BOM for the product as part of the design. #4 seems to make a lot of sense if you are really trying to do parametric design. One should not have to copy, paste and edit a module for each library used to build the product https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#Special_variables seems to suggest that user defined variables actually might do this but it appears that the documentation is wrong or misleading. Needs a look from someone who knows. Mine: Error messages should be less about the way a programmer sees an internal function failing and more about what the designer/user might have done. This might require a bit of work to suggest issues that started in earlier lines but some might be easy - too many or too few "}" could be explained "Missing closing bracket" "More closing brackets than opening brackets" This would seem to be easy to detect and report. Missing closing ";" might be suggested when it is easy to guess that the syntax would be correct if the earlier line had been closed properly. That is, the parser sees a token that is legal but not in the right context. This would only be a suggestion to the designer as a place to look. 'Did you forget a ";"?' I am a new user and like the project so far. I am a software guy but have supported engineers using parametric CAD for more than 15 years and have been using Blender for a long time and recently for 3D printing. Would like to move to openSCAD and so far I am pretty happy. Not printed anything yet but we are under self-isolating lockdown for now. Ron On 2020-04-04 6:49 p.m., ken@volksswitch.org wrote: > 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used > 2) allow a variable to be assigned a new value after it has already been assigned a value > 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes > 4) allow for directives/pragma that can specify that certain blocks of code aren't executed if a property is set > > -- and fillets/chamfers like Russell says below! > > > -----Original Message----- > From: Russell Salerno <rssalerno@gmail.com> > Sent: Friday, April 3, 2020 11:06 AM > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] Discuss Digest, Vol 65, Issue 2 > > 1) Easy & efficient way to create fillets and chamfers. > > 2) On OSX version, enable "End" key to move cursor to EOL in editor. > > On 4/3/20, discuss-request@lists.openscad.org > <discuss-request@lists.openscad.org> wrote: >> Send Discuss mailing list submissions to >> discuss@lists.openscad.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> or, via email, send a message with subject or body 'help' to >> discuss-request@lists.openscad.org >> >> You can reach the person managing the list at >> discuss-owner@lists.openscad.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Discuss digest..." >> >> >> Today's Topics: >> >> 1. Re: User Poll: What do you want to see from OpenSCAD >> development? (AKADAP) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 2 Apr 2020 11:29:14 -0700 (MST) >> From: AKADAP <Douglas_Peale@Comcast.net> >> To: discuss@lists.openscad.org >> Subject: Re: [OpenSCAD] User Poll: What do you want to see from >> OpenSCAD development? >> Message-ID: <1585852154534-0.post@n5.nabble.com> >> Content-Type: text/plain; charset=us-ascii >> >> I would like to see either an extension to rotate_extrude() or a new >> extrude function to implement a proper spiral (no linear_extrude() is >> not good enough as the object being extruded is not orthogonal to the >> path). >> I feel so strongly about this that I attempted to implement this >> myself within the language: https://www.thingiverse.com/thing:1958354 >> It works after a fashion, but because I could not directly access the >> points of the children, it could not be implemented in the most >> efficient manner, and is at best an approximation. >> >> I'd also like to be able to put children into a list. I recently ran >> into a limitation of the current version of OpenSCAD that prevented me >> from algorithmicly generating children to be passed to a library >> function. The output of a for() loop is a union, so it only generates >> one child, but a >> for() loop can generate a list of any other type of object. Being able >> to generate a list of children seems to me a useful generalization to >> solve the problem I ran into. >> >> >> >> -- >> Sent from: http://forum.openscad.org/ >> >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> Discuss mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> >> ------------------------------ >> >> End of Discuss Digest, Vol 65, Issue 2 >> ************************************** >> > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Ron Wheeler Artifact Software 438-345-3369 rwheeler@artifact-software.com
RW
Ron Wheeler
Sun, Apr 5, 2020 12:41 AM

Not sure that your example is a "normal use case" where variables might
be helpful.
I can not even visualize what you are trying to make.

In my case, I only need the variables to persist from start to end and
be acted on at some time during that period whenever an operation is
requested that adds a component.
If I add bunch of purchased or printed parts or a number of pipes of a
certain length, I would like to generate a BOM
24 part A
47 part B
3   Part C (custom part to print from a separate OpenSCAD used in the
assembly)
2     10 foot pipes
20   2 foot pipes
16   3 foot pipes
and so on.

When your project gets into the dozens of each part and there are 100+
parts, the effort of redoing the count from a picture and the chance of
missing a part both get high.

Is there another/better way to tag objects created to enable a BOM to be
generated at the end?
If so, I could get a list of all tags created during the execution and
then loop through the list and write ECHO "A count of all getTagName(i)
is  getTagCount(i)"; at the end.
During the creation of objects I would have to code something to say 
"Tag this group of commands as a "Part A", "Tag this group as
"Pipe_1.25_Inch-36" where 36 is some local value (length, width,
diameter, etc.) used in the creation of the object.

It does not solve all of the parametric design issues but would solve
the BOM problem.

Ron

On 2020-04-04 7:26 p.m., Jordan Brown wrote:

On 4/4/2020 3:49 PM, ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are never called and variables that are never used

Note that as in lint itself there would need to be a way to mark a
file as containing a library, since it's normal not to use all of the
features exported by the library.

  1. allow a variable to be assigned a new value after it has already been assigned a value
  2. allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes

I'm not one of the developers, but this is easy to answer:  not going
to happen.  OpenSCAD doesn't execute anything like a conventional
language.  It does not execute lines in the order that you expect.
(And some features, like the children() feature, depend on that fact.)

For fun, try this program.  Try to predict this output, then run it,
then try to understand the results.

 module foo() {
      a = echo("foo assignment 1") 0;
      children(1);
      children(0);
      b = echo("foo assignment 2") 0;
 }

 foo() {
      x = echo("assignment 1") 0;
      echo("child 1");
      echo("child 2");
      echo("child 3");
      y = echo("assignment 2") 0;
 }

For extra fun, try throwing $ variables into the mix.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com

Not sure that your example is a "normal use case" where variables might be helpful. I can not even visualize what you are trying to make. In my case, I only need the variables to persist from start to end and be acted on at some time during that period whenever an operation is requested that adds a component. If I add bunch of purchased or printed parts or a number of pipes of a certain length, I would like to generate a BOM 24 part A 47 part B 3   Part C (custom part to print from a separate OpenSCAD used in the assembly) 2     10 foot pipes 20   2 foot pipes 16   3 foot pipes and so on. When your project gets into the dozens of each part and there are 100+ parts, the effort of redoing the count from a picture and the chance of missing a part both get high. Is there another/better way to tag objects created to enable a BOM to be generated at the end? If so, I could get a list of all tags created during the execution and then loop through the list and write ECHO "A count of all getTagName(i) is  getTagCount(i)"; at the end. During the creation of objects I would have to code something to say  "Tag this group of commands as a "Part A", "Tag this group as "Pipe_1.25_Inch-36" where 36 is some local value (*length*, width, diameter, etc.) used in the creation of the object. It does not solve all of the parametric design issues but would solve the BOM problem. Ron On 2020-04-04 7:26 p.m., Jordan Brown wrote: > On 4/4/2020 3:49 PM, ken@volksswitch.org wrote: >> 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used > > Note that as in lint itself there would need to be a way to mark a > file as containing a library, since it's normal not to use all of the > features exported by the library. > >> 2) allow a variable to be assigned a new value after it has already been assigned a value >> 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes > > I'm not one of the developers, but this is easy to answer:  not going > to happen.  OpenSCAD doesn't execute anything like a conventional > language.  It does *not* execute lines in the order that you expect. > (And some features, like the children() feature, depend on that fact.) > > For fun, try this program.  Try to predict this output, then run it, > then try to understand the results. > > module foo() { > a = echo("foo assignment 1") 0; > children(1); > children(0); > b = echo("foo assignment 2") 0; > } > > foo() { > x = echo("assignment 1") 0; > echo("child 1"); > echo("child 2"); > echo("child 3"); > y = echo("assignment 2") 0; > } > > For extra fun, try throwing $ variables into the mix. > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Ron Wheeler Artifact Software 438-345-3369 rwheeler@artifact-software.com
NH
nop head
Sun, Apr 5, 2020 7:53 AM

I generate BOMs using modules that echo and then process the output stream
with Python scripts that generate BOMs and assembly diagrams and
instructions.

On Sun, 5 Apr 2020 at 01:42, Ron Wheeler via Discuss <
discuss@lists.openscad.org> wrote:

Not sure that your example is a "normal use case" where variables might be
helpful.
I can not even visualize what you are trying to make.

In my case, I only need the variables to persist from start to end and be
acted on at some time during that period whenever an operation is requested
that adds a component.
If I add bunch of purchased or printed parts or a number of pipes of a
certain length, I would like to generate a BOM
24 part A
47 part B
3  Part C (custom part to print from a separate OpenSCAD used in the
assembly)
2    10 foot pipes
20  2 foot pipes
16  3 foot pipes
and so on.

When your project gets into the dozens of each part and there are 100+
parts, the effort of redoing the count from a picture and the chance of
missing a part both get high.

Is there another/better way to tag objects created to enable a BOM to be
generated at the end?
If so, I could get a list of all tags created during the execution and
then loop through the list and write ECHO "A count of all getTagName(i) is
getTagCount(i)"; at the end.
During the creation of objects I would have to code something to say  "Tag
this group of commands as a "Part A", "Tag this group as
"Pipe_1.25_Inch-36" where 36 is some local value (length, width,
diameter, etc.) used in the creation of the object.

It does not solve all of the parametric design issues but would solve the
BOM problem.

Ron

On 2020-04-04 7:26 p.m., Jordan Brown wrote:

On 4/4/2020 3:49 PM, ken@volksswitch.org wrote:

  1. provide a Lint like feature () to help me identify modules that are never called and variables that are never used

Note that as in lint itself there would need to be a way to mark a file as
containing a library, since it's normal not to use all of the features
exported by the library.

  1. allow a variable to be assigned a new value after it has already been assigned a value
  2. allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes

I'm not one of the developers, but this is easy to answer:  not going to
happen.  OpenSCAD doesn't execute anything like a conventional language.
It does not execute lines in the order that you expect. (And some
features, like the children() feature, depend on that fact.)

For fun, try this program.  Try to predict this output, then run it, then
try to understand the results.

module foo() {
a = echo("foo assignment 1") 0;
children(1);
children(0);
b = echo("foo assignment 2") 0;
}

foo() {
x = echo("assignment 1") 0;
echo("child 1");
echo("child 2");
echo("child 3");
y = echo("assignment 2") 0;
}

For extra fun, try throwing $ variables into the mix.


OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Ron Wheeler
Artifact Software
438-345-3369rwheeler@artifact-software.com


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I generate BOMs using modules that echo and then process the output stream with Python scripts that generate BOMs and assembly diagrams and instructions. On Sun, 5 Apr 2020 at 01:42, Ron Wheeler via Discuss < discuss@lists.openscad.org> wrote: > Not sure that your example is a "normal use case" where variables might be > helpful. > I can not even visualize what you are trying to make. > > In my case, I only need the variables to persist from start to end and be > acted on at some time during that period whenever an operation is requested > that adds a component. > If I add bunch of purchased or printed parts or a number of pipes of a > certain length, I would like to generate a BOM > 24 part A > 47 part B > 3 Part C (custom part to print from a separate OpenSCAD used in the > assembly) > 2 10 foot pipes > 20 2 foot pipes > 16 3 foot pipes > and so on. > > When your project gets into the dozens of each part and there are 100+ > parts, the effort of redoing the count from a picture and the chance of > missing a part both get high. > > Is there another/better way to tag objects created to enable a BOM to be > generated at the end? > If so, I could get a list of all tags created during the execution and > then loop through the list and write ECHO "A count of all getTagName(i) is > getTagCount(i)"; at the end. > During the creation of objects I would have to code something to say "Tag > this group of commands as a "Part A", "Tag this group as > "Pipe_1.25_Inch-36" where 36 is some local value (*length*, width, > diameter, etc.) used in the creation of the object. > > > It does not solve all of the parametric design issues but would solve the > BOM problem. > > > Ron > > On 2020-04-04 7:26 p.m., Jordan Brown wrote: > > On 4/4/2020 3:49 PM, ken@volksswitch.org wrote: > > 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used > > > Note that as in lint itself there would need to be a way to mark a file as > containing a library, since it's normal not to use all of the features > exported by the library. > > 2) allow a variable to be assigned a new value after it has already been assigned a value > 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes > > > I'm not one of the developers, but this is easy to answer: not going to > happen. OpenSCAD doesn't execute anything like a conventional language. > It does *not* execute lines in the order that you expect. (And some > features, like the children() feature, depend on that fact.) > > For fun, try this program. Try to predict this output, then run it, then > try to understand the results. > > module foo() { > a = echo("foo assignment 1") 0; > children(1); > children(0); > b = echo("foo assignment 2") 0; > } > > foo() { > x = echo("assignment 1") 0; > echo("child 1"); > echo("child 2"); > echo("child 3"); > y = echo("assignment 2") 0; > } > > For extra fun, try throwing $ variables into the mix. > > _______________________________________________ > OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > -- > Ron Wheeler > Artifact Software > 438-345-3369rwheeler@artifact-software.com > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
A
arnholm@arnholm.org
Sun, Apr 5, 2020 11:01 AM

On 2020-04-05 01:54, Ron Wheeler via Discuss wrote:

I also want #2 and #3.

It is not going to happen in OpenSCAD as other have explained, the
language does not execute in the traditional sense. In AngelCAD it works
as you suggest https://arnholm.github.io/angelcad-docs/

Carsten Arnholm

On 2020-04-05 01:54, Ron Wheeler via Discuss wrote: > I also want #2 and #3. It is not going to happen in OpenSCAD as other have explained, the language does not execute in the traditional sense. In AngelCAD it works as you suggest https://arnholm.github.io/angelcad-docs/ Carsten Arnholm
RW
Ron Wheeler
Sun, Apr 5, 2020 1:31 PM

Very interesting idea. I will give that a shot.

Thanks

Ron

On 2020-04-05 3:53 a.m., nop head wrote:

I generate BOMs using modules that echo and then process the output
stream with Python scripts that generate BOMs and assembly diagrams
and instructions.

On Sun, 5 Apr 2020 at 01:42, Ron Wheeler via Discuss
<discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

 Not sure that your example is a "normal use case" where variables
 might be helpful.
 I can not even visualize what you are trying to make.

 In my case, I only need the variables to persist from start to end
 and be acted on at some time during that period whenever an
 operation is requested that adds a component.
 If I add bunch of purchased or printed parts or a number of pipes
 of a certain length, I would like to generate a BOM
 24 part A
 47 part B
 3   Part C (custom part to print from a separate OpenSCAD used in
 the assembly)
 2     10 foot pipes
 20   2 foot pipes
 16   3 foot pipes
 and so on.

 When your project gets into the dozens of each part and there are
 100+ parts, the effort of redoing the count from a picture and the
 chance of missing a part both get high.

 Is there another/better way to tag objects created to enable a BOM
 to be generated at the end?
 If so, I could get a list of all tags created during the execution
 and then loop through the list and write ECHO "A count of all
 getTagName(i) is  getTagCount(i)"; at the end.
 During the creation of objects I would have to code something to
 say  "Tag this group of commands as a "Part A", "Tag this group as
 "Pipe_1.25_Inch-36" where 36 is some local value (*length*, width,
 diameter, etc.) used in the creation of the object.


 It does not solve all of the parametric design issues but would
 solve the BOM problem.


 Ron

 On 2020-04-04 7:26 p.m., Jordan Brown wrote:
 On 4/4/2020 3:49 PM, ken@volksswitch.org
 <mailto:ken@volksswitch.org> wrote:
 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used
 Note that as in lint itself there would need to be a way to mark
 a file as containing a library, since it's normal not to use all
 of the features exported by the library.
 2) allow a variable to be assigned a new value after it has already been assigned a value
 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes
 I'm not one of the developers, but this is easy to answer:  not
 going to happen.  OpenSCAD doesn't execute anything like a
 conventional language.  It does *not* execute lines in the order
 that you expect. (And some features, like the children() feature,
 depend on that fact.)

 For fun, try this program.  Try to predict this output, then run
 it, then try to understand the results.

     module foo() {
          a = echo("foo assignment 1") 0;
          children(1);
          children(0);
          b = echo("foo assignment 2") 0;
     }

     foo() {
          x = echo("assignment 1") 0;
          echo("child 1");
          echo("child 2");
          echo("child 3");
          y = echo("assignment 2") 0;
     }

 For extra fun, try throwing $ variables into the mix.


 _______________________________________________
 OpenSCAD mailing list
 Discuss@lists.openscad.org  <mailto:Discuss@lists.openscad.org>
 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 -- 
 Ron Wheeler
 Artifact Software
 438-345-3369
 rwheeler@artifact-software.com  <mailto:rwheeler@artifact-software.com>

 _______________________________________________
 OpenSCAD mailing list
 Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com

Very interesting idea. I will give that a shot. Thanks Ron On 2020-04-05 3:53 a.m., nop head wrote: > I generate BOMs using modules that echo and then process the output > stream with Python scripts that generate BOMs and assembly diagrams > and instructions. > > On Sun, 5 Apr 2020 at 01:42, Ron Wheeler via Discuss > <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote: > > Not sure that your example is a "normal use case" where variables > might be helpful. > I can not even visualize what you are trying to make. > > In my case, I only need the variables to persist from start to end > and be acted on at some time during that period whenever an > operation is requested that adds a component. > If I add bunch of purchased or printed parts or a number of pipes > of a certain length, I would like to generate a BOM > 24 part A > 47 part B > 3   Part C (custom part to print from a separate OpenSCAD used in > the assembly) > 2     10 foot pipes > 20   2 foot pipes > 16   3 foot pipes > and so on. > > When your project gets into the dozens of each part and there are > 100+ parts, the effort of redoing the count from a picture and the > chance of missing a part both get high. > > Is there another/better way to tag objects created to enable a BOM > to be generated at the end? > If so, I could get a list of all tags created during the execution > and then loop through the list and write ECHO "A count of all > getTagName(i) is  getTagCount(i)"; at the end. > During the creation of objects I would have to code something to > say  "Tag this group of commands as a "Part A", "Tag this group as > "Pipe_1.25_Inch-36" where 36 is some local value (*length*, width, > diameter, etc.) used in the creation of the object. > > > It does not solve all of the parametric design issues but would > solve the BOM problem. > > > Ron > > On 2020-04-04 7:26 p.m., Jordan Brown wrote: >> On 4/4/2020 3:49 PM, ken@volksswitch.org >> <mailto:ken@volksswitch.org> wrote: >>> 1) provide a Lint like feature () to help me identify modules that are never called and variables that are never used >> >> Note that as in lint itself there would need to be a way to mark >> a file as containing a library, since it's normal not to use all >> of the features exported by the library. >> >>> 2) allow a variable to be assigned a new value after it has already been assigned a value >>> 3) allow for a variable to be assigned a value in an if statement and then have that value preserved when the if completes >> >> I'm not one of the developers, but this is easy to answer:  not >> going to happen.  OpenSCAD doesn't execute anything like a >> conventional language.  It does *not* execute lines in the order >> that you expect. (And some features, like the children() feature, >> depend on that fact.) >> >> For fun, try this program.  Try to predict this output, then run >> it, then try to understand the results. >> >> module foo() { >> a = echo("foo assignment 1") 0; >> children(1); >> children(0); >> b = echo("foo assignment 2") 0; >> } >> >> foo() { >> x = echo("assignment 1") 0; >> echo("child 1"); >> echo("child 2"); >> echo("child 3"); >> y = echo("assignment 2") 0; >> } >> >> For extra fun, try throwing $ variables into the mix. >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > -- > Ron Wheeler > Artifact Software > 438-345-3369 > rwheeler@artifact-software.com <mailto:rwheeler@artifact-software.com> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Ron Wheeler Artifact Software 438-345-3369 rwheeler@artifact-software.com