RW
Ron Wheeler
Tue, Apr 7, 2020 1:27 AM
Thanks.
Not sure how this gets rid of the events in the log not generated by ECHO.
That is what the grep does - select only lines containing ECHO so that
the rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
Ron
On 2020-04-06 6:28 p.m., Jordan Brown wrote:
On 4/6/2020 11:44 AM, Ron Wheeler via Discuss wrote:
My process for generating a BOM is:
- Added an ECHO to each OpenSCAD module that created and added a
part to the project. The ECHO just says what was added (Part name
with family) and in some cases a parameter (size) if it matters
- Copied and pasted the resulting log into a file. Have to clear the
log before the run to get rid of previous entries.
Is there some way to configure OpenSCAD to write the log
to a new file each run?
You might want to run OpenSCAD from the command line, which makes it
easier to collect the output into a file. You can either let the
output go to stderr (sigh), or you can use -o with a file extension of
".echo" to write it to a file. I haven't used the ".echo" variant,
but I suspect that it completely avoids rendering so runs fast.
It'll be something like
openscad -o mylogfile.echo myProject.scad
- Used Linux's grep command to separate the ECHO lines from the rest
of the log. "grep ECHO <OpenSCAD.log >BOM.csv"
- Used Linux's sed command to remove ECHO: to get a file with comma
separated lines of PartName, Family, Size (optional parameter) "sed
-i s/ECHO://g BOM.csv"
Suggest:
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
Thanks.
Not sure how this gets rid of the events in the log not generated by ECHO.
That is what the grep does - select only lines containing ECHO so that
the rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
Ron
On 2020-04-06 6:28 p.m., Jordan Brown wrote:
> On 4/6/2020 11:44 AM, Ron Wheeler via Discuss wrote:
>> My process for generating a BOM is:
>> 1) Added an ECHO to each OpenSCAD module that created and added a
>> part to the project. The ECHO just says what was added (Part name
>> with family) and in some cases a parameter (size) if it matters
>> 2) Copied and pasted the resulting log into a file. Have to clear the
>> log before the run to get rid of previous entries.
>> Is there some way to configure OpenSCAD to write the log
>> to a new file each run?
>
> You might want to run OpenSCAD from the command line, which makes it
> easier to collect the output into a file. You can either let the
> output go to stderr (sigh), or you can use -o with a file extension of
> ".echo" to write it to a file. I haven't used the ".echo" variant,
> but I suspect that it completely avoids rendering so runs fast.
>
> It'll be something like
>
> openscad -o mylogfile.echo myProject.scad
>
>
>> 3) Used Linux's grep command to separate the ECHO lines from the rest
>> of the log. "grep ECHO <OpenSCAD.log >BOM.csv"
>> 4) Used Linux's sed command to remove ECHO: to get a file with comma
>> separated lines of PartName, Family, Size (optional parameter) "sed
>> -i s/ECHO://g BOM.csv"
> Suggest:
>
> sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
>
>
--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com
JB
Jordan Brown
Tue, Apr 7, 2020 3:31 AM
On 4/6/2020 6:27 PM, Ron Wheeler wrote:
Not sure how this gets rid of the events in the log not generated by
ECHO.
That is what the grep does - select only lines containing ECHO so that
the rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
The "-n" option says "don't print lines by default".
The "p" option says "if the substitute matches, print after substituting".
On 4/6/2020 6:27 PM, Ron Wheeler wrote:
> Not sure how this gets rid of the events in the log not generated by
> ECHO.
> That is what the grep does - select only lines containing ECHO so that
> the rest of the log is not passed on to the next step.
>
> sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
The "-n" option says "don't print lines by default".
The "p" option says "if the substitute matches, print after substituting".
RW
Ron Wheeler
Tue, Apr 7, 2020 3:44 AM
Cool!
Always something new to learn!
Thanks.
Ron
On 2020-04-06 11:31 p.m., Jordan Brown wrote:
On 4/6/2020 6:27 PM, Ron Wheeler wrote:
Not sure how this gets rid of the events in the log not generated by
ECHO.
That is what the grep does - select only lines containing ECHO so
that the rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
The "-n" option says "don't print lines by default".
The "p" option says "if the substitute matches, print after substituting".
Cool!
Always something new to learn!
Thanks.
Ron
On 2020-04-06 11:31 p.m., Jordan Brown wrote:
> On 4/6/2020 6:27 PM, Ron Wheeler wrote:
>> Not sure how this gets rid of the events in the log not generated by
>> ECHO.
>> That is what the grep does - select only lines containing ECHO so
>> that the rest of the log is not passed on to the next step.
>>
>> sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
>
> The "-n" option says "don't print lines by default".
> The "p" option says "if the substitute matches, print after substituting".
>
--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com
JB
Jordan Brown
Tue, Apr 7, 2020 4:27 AM
On 4/6/2020 6:03 PM, Ron Wheeler via Discuss wrote:
Not yet convinced that a clever developer can not solve the problem of
dynamic variables.
The arguments so far seem to be based on "It has not been already
done." or "It would violate some unstated philosophical belief."
Software is usually very mutable once you decide that something has to
be done.
There may be a range of trade-offs between cost(effort), functionality
and delivery time.
Are you saying that a sufficiently clever programmer could make the
existing OpenSCAD do it? Nope. The language just doesn't have the
features.
Are you saying that, with enough work, OpenSCAD could be changed to do
it? Sure, in some sense. Whether you'd ever find anybody interested in
spending the effort, or whether you could do something that's compatible
with today's OpenSCAD so that existing programs would work... that's a
different question. I would not hold my breath.
On 4/6/2020 6:03 PM, Ron Wheeler via Discuss wrote:
> Not yet convinced that a clever developer can not solve the problem of
> dynamic variables.
> The arguments so far seem to be based on "It has not been already
> done." or "It would violate some unstated philosophical belief."
>
> Software is usually very mutable once you decide that something has to
> be done.
> There may be a range of trade-offs between cost(effort), functionality
> and delivery time.
Are you saying that a sufficiently clever programmer could make the
existing OpenSCAD do it? Nope. The language just doesn't have the
features.
Are you saying that, with enough work, OpenSCAD could be changed to do
it? Sure, in some sense. Whether you'd ever find anybody interested in
spending the effort, or whether you could do something that's compatible
with today's OpenSCAD so that existing programs would work... that's a
different question. I would not hold my breath.
RW
Ron Wheeler
Tue, Apr 7, 2020 4:43 AM
Correct.
The question was "What do the users want?" not "What can we do that we
want to do?"
Perhaps the question should have been " Here are 10 things that we want
to do, what would you like to priotize?"
Not sure what "The language just doesn't have the features." actually
means.
I am a Java programmer (plus 26 other languages over the years) and the
number of new features that have been added since version 1.4 is pretty
big as is the list of features deprecated.
Some (a lot) of the programs written in Java 1.4 or even Java 8 are
going to require some rework to run under Java 14.
In choosing what enhancements to undertake, the effect on existing
projects is certainly a consideration but at some point every tool has
to say to the pioneers "You have to do a conversion to change the way
your scripts interact with function X or stick with the current release
until you see a compelling reason to convert to the latest release."
A lot of companies are sticking with Java 6 even though support ended a
while ago and another group are stuck on Java 8 while Java 14 is about
to come out.
At some point these developers are going to have to upgrade their code.
In the meantime, they are going to do without security updates and new
features.
Ron
On 2020-04-07 12:27 a.m., Jordan Brown wrote:
On 4/6/2020 6:03 PM, Ron Wheeler via Discuss wrote:
Not yet convinced that a clever developer can not solve the problem
of dynamic variables.
The arguments so far seem to be based on "It has not been already
done." or "It would violate some unstated philosophical belief."
Software is usually very mutable once you decide that something has
to be done.
There may be a range of trade-offs between cost(effort),
functionality and delivery time.
Are you saying that a sufficiently clever programmer could make the
existing OpenSCAD do it? Nope. The language just doesn't have the
features.
Are you saying that, with enough work, OpenSCAD could be changed to do
it? Sure, in some sense. Whether you'd ever find anybody interested
in spending the effort, or whether you could do something that's
compatible with today's OpenSCAD so that existing programs would
work... that's a different question. I would not hold my breath.
Correct.
The question was "What do the users want?" not "What can we do that we
want to do?"
Perhaps the question should have been " Here are 10 things that we want
to do, what would you like to priotize?"
Not sure what "The language just doesn't have the features." actually
means.
I am a Java programmer (plus 26 other languages over the years) and the
number of new features that have been added since version 1.4 is pretty
big as is the list of features deprecated.
Some (a lot) of the programs written in Java 1.4 or even Java 8 are
going to require some rework to run under Java 14.
In choosing what enhancements to undertake, the effect on existing
projects is certainly a consideration but at some point every tool has
to say to the pioneers "You have to do a conversion to change the way
your scripts interact with function X or stick with the current release
until you see a compelling reason to convert to the latest release."
A lot of companies are sticking with Java 6 even though support ended a
while ago and another group are stuck on Java 8 while Java 14 is about
to come out.
At some point these developers are going to have to upgrade their code.
In the meantime, they are going to do without security updates and new
features.
Ron
On 2020-04-07 12:27 a.m., Jordan Brown wrote:
> On 4/6/2020 6:03 PM, Ron Wheeler via Discuss wrote:
>> Not yet convinced that a clever developer can not solve the problem
>> of dynamic variables.
>> The arguments so far seem to be based on "It has not been already
>> done." or "It would violate some unstated philosophical belief."
>>
>> Software is usually very mutable once you decide that something has
>> to be done.
>> There may be a range of trade-offs between cost(effort),
>> functionality and delivery time.
>
> Are you saying that a sufficiently clever programmer could make the
> existing OpenSCAD do it? Nope. The language just doesn't have the
> features.
>
> Are you saying that, with enough work, OpenSCAD could be changed to do
> it? Sure, in some sense. Whether you'd ever find anybody interested
> in spending the effort, or whether you could do something that's
> compatible with today's OpenSCAD so that existing programs would
> work... that's a different question. I would not hold my breath.
>
--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com
JB
Jordan Brown
Tue, Apr 7, 2020 5:10 AM
On 4/6/2020 9:43 PM, Ron Wheeler wrote:
Not sure what "The language just doesn't have the features." actually
means.
In Java, how do you overload operators, like you can in C++?
You can't. Java doesn't support operator overload.
In OpenSCAD, how do you have a module modify a global variable?
You can't. OpenSCAD doesn't support modifying variables.
There could, hypothetically, be a future version of Java that supported
operator overload.
There could, hypothetically, be a future version of OpenSCAD that
supported modifying variables.
I suspect that the number of people paid to work on OpenSCAD is ...
zero. That means that they will work on the things that interest them,
in the time that they have available.
If you want a full-scale programming language that does CSG... I haven't
done much research, but SolidPython looks interesting. It's a Python
module that accepts straightforward-looking Python constructs and emits
OpenSCAD. With OpenSCAD auto-reload, you could presumably punch "run"
in your favorite Python environment, and have your OpenSCAD window
refreshed.
I'd like to be able to recommend Blender's Python integration, but I
can't. I'm not a dummy, and it was too complex for me. Even once I
found how to do OpenSCAD-like operations (which was hard), it was five
times as complicated as doing it in OpenSCAD.
On 4/6/2020 9:43 PM, Ron Wheeler wrote:
> Not sure what "The language just doesn't have the features." actually
> means.
In Java, how do you overload operators, like you can in C++?
You can't. Java doesn't support operator overload.
In OpenSCAD, how do you have a module modify a global variable?
You can't. OpenSCAD doesn't support modifying variables.
There could, hypothetically, be a future version of Java that supported
operator overload.
There could, hypothetically, be a future version of OpenSCAD that
supported modifying variables.
I suspect that the number of people paid to work on OpenSCAD is ...
zero. That means that they will work on the things that interest them,
in the time that they have available.
If you want a full-scale programming language that does CSG... I haven't
done much research, but SolidPython looks interesting. It's a Python
module that accepts straightforward-looking Python constructs and emits
OpenSCAD. With OpenSCAD auto-reload, you could presumably punch "run"
in your favorite Python environment, and have your OpenSCAD window
refreshed.
I'd like to be able to recommend Blender's Python integration, but I
can't. I'm not a dummy, and it was too complex for me. Even once I
found *how* to do OpenSCAD-like operations (which was hard), it was five
times as complicated as doing it in OpenSCAD.
NH
nop head
Tue, Apr 7, 2020 9:29 AM
I start all my BOM echos with ~ so that random echos added for
debugging don't get added to the BOM.
On Tue, 7 Apr 2020 at 04:45, Ron Wheeler via Discuss <
discuss@lists.openscad.org> wrote:
Cool!
Always something new to learn!
Thanks.
Ron
On 2020-04-06 11:31 p.m., Jordan Brown wrote:
On 4/6/2020 6:27 PM, Ron Wheeler wrote:
Not sure how this gets rid of the events in the log not generated by ECHO.
That is what the grep does - select only lines containing ECHO so that the
rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
The "-n" option says "don't print lines by default".
The "p" option says "if the substitute matches, print after substituting".
--
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 start all my BOM echos with ~ so that random echos added for
debugging don't get added to the BOM.
On Tue, 7 Apr 2020 at 04:45, Ron Wheeler via Discuss <
discuss@lists.openscad.org> wrote:
> Cool!
> Always something new to learn!
>
> Thanks.
>
> Ron
>
> On 2020-04-06 11:31 p.m., Jordan Brown wrote:
>
> On 4/6/2020 6:27 PM, Ron Wheeler wrote:
>
> Not sure how this gets rid of the events in the log not generated by ECHO.
> That is what the grep does - select only lines containing ECHO so that the
> rest of the log is not passed on to the next step.
>
> sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
>
>
> The "-n" option says "don't print lines by default".
> The "p" option says "if the substitute matches, print after substituting".
>
>
> --
> 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
>
RW
Ron Wheeler
Tue, Apr 7, 2020 12:42 PM
Good idea.
On 2020-04-07 5:29 a.m., nop head wrote:
I start all my BOM echos with ~ so that random echos added for
debugging don't get added to the BOM.
On Tue, 7 Apr 2020 at 04:45, Ron Wheeler via Discuss
<discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:
Cool!
Always something new to learn!
Thanks.
Ron
On 2020-04-06 11:31 p.m., Jordan Brown wrote:
On 4/6/2020 6:27 PM, Ron Wheeler wrote:
Not sure how this gets rid of the events in the log not
generated by ECHO.
That is what the grep does - select only lines containing ECHO
so that the rest of the log is not passed on to the next step.
sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
The "-n" option says "don't print lines by default".
The "p" option says "if the substitute matches, print after
substituting".
Good idea.
On 2020-04-07 5:29 a.m., nop head wrote:
> I start all my BOM echos with ~ so that random echos added for
> debugging don't get added to the BOM.
>
> On Tue, 7 Apr 2020 at 04:45, Ron Wheeler via Discuss
> <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote:
>
> Cool!
> Always something new to learn!
>
> Thanks.
>
> Ron
>
> On 2020-04-06 11:31 p.m., Jordan Brown wrote:
>> On 4/6/2020 6:27 PM, Ron Wheeler wrote:
>>> Not sure how this gets rid of the events in the log not
>>> generated by ECHO.
>>> That is what the grep does - select only lines containing ECHO
>>> so that the rest of the log is not passed on to the next step.
>>>
>>> sed -n 's/ECHO://p' OpenSCAD.log > BOM.csv
>>
>> The "-n" option says "don't print lines by default".
>> The "p" option says "if the substitute matches, print after
>> substituting".
>>
>
> --
> 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
TP
Torsten Paul
Tue, Apr 7, 2020 1:19 PM
On 07.04.20 06:43, Ron Wheeler via Discuss wrote:
The question was "What do the users want?"
Perhaps the question should have been " Here are 10
things that we want to do, what would you like to priotize?"
Well, who decides? I'm sure everyone asking for a feature
will likely prioritize their own one, which totally makes
sense. But that just results in all requests at the same
priority 1.
In the last couple of days, the most active contributors
are the students applying for Google Summer of Code and
that is great. So at this point, they are selecting topics
they find interesting, or challenging. For example, we
now almost have nicely working PDF export. Is that the
most important feature request? Probably not. Will I help
them working on that? Absolutely.
Try it (windows snapshots should work, appimage not yet):
https://github.com/openscad/openscad/pull/3266
I don't have a good answer regarding priority. And I've
not seen much other than cases where people are sponsored
via Patreon or so.
I see some criteria that could help getting a feature
request a higher than normal "priority". Well, not
really priority, as there is no ranking as such. Priority
in the sense that it has a higher chance of getting
implemented soon-ish.
-
It's something which is making OpenSCAD much more useful
so it ends up on everyones wishlist
-
Make it a GSoC topic, so it might be picked up at some
point
-
Make a case that the feature is useful for education
-
Describe the feature very well, list arguments why it's
so much nice to have, think about how it integrates
into the existing stuff, provide test examples
-
Find someone who offers to implement or support via
one of the programs similar to GSoC (e.g. in Germany
there was a local one announced this year), or if you
are a software developer, try implementing yourself
-
Try a bounty - although I've seen mixed results.
There were some nice success stories for smaller
feature requests, the bigger ones tend to do not so
well. Maybe the effort to bounty ratio is just
difficult to get to a level that works out well.
At any rate, this is an interesting topic. It would be
cool to hear other options.
ciao,
Torsten.
On 07.04.20 06:43, Ron Wheeler via Discuss wrote:
> The question was "What do the users want?"
https://github.com/openscad/openscad/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Enhancement%22
(currently 141 open requests)
> Perhaps the question should have been " Here are 10
> things that we want to do, what would you like to priotize?"
Well, who decides? I'm sure everyone asking for a feature
will likely prioritize their own one, which totally makes
sense. But that just results in all requests at the same
priority 1.
In the last couple of days, the most active contributors
are the students applying for Google Summer of Code and
that is great. So at this point, they are selecting topics
they find interesting, or challenging. For example, we
now almost have nicely working PDF export. Is that the
most important feature request? Probably not. Will I help
them working on that? Absolutely.
Try it (windows snapshots should work, appimage not yet):
https://github.com/openscad/openscad/pull/3266
I don't have a good answer regarding priority. And I've
not seen much other than cases where people are sponsored
via Patreon or so.
I see some criteria that could help getting a feature
request a higher than normal "priority". Well, not
really priority, as there is no ranking as such. Priority
in the sense that it has a higher chance of getting
implemented soon-ish.
- It's something which is making OpenSCAD much more useful
so it ends up on everyones wishlist
- Make it a GSoC topic, so it might be picked up at some
point
- Make a case that the feature is useful for education
- Describe the feature very well, list arguments why it's
so much nice to have, think about how it integrates
into the existing stuff, provide test examples
- Find someone who offers to implement or support via
one of the programs similar to GSoC (e.g. in Germany
there was a local one announced this year), or if you
are a software developer, try implementing yourself
- Try a bounty - although I've seen mixed results.
There were some nice success stories for smaller
feature requests, the bigger ones tend to do not so
well. Maybe the effort to bounty ratio is just
difficult to get to a level that works out well.
At any rate, this is an interesting topic. It would be
cool to hear other options.
ciao,
Torsten.