I would like to see measure functions, such as:
I am working on robot arm simulations using the animation features. To
analyze the simulation I am using a large echo statement and then grabbing
the console window text, pasting it in a spreadsheet, running a macro to
clean up the text, and then creating charts from the data. This is tedious
and I have seen a lot of discussion about a feature to “echo” to a .csv
file or such, which would be great. It would be nice if this function
worked like animation “dump images” and only dumped a single time cycle of
data.
Steve Amorosi
In my OpenSCAD scripts I use ECHO commands like
echo ("BOM", "CROSS",...);
and
echo ("BOM", "TEE", ...);
to track every time I create a CROSS or TEE.
After the generation, I copy and paste the console to a file
"inputdata/OpenSCAD.log".
Using Linux, I do
grep 'ECHO: "BOM"' <inputdata/OpenSCAD.log >inputdata/BOM.csv This
extracts the lines from file that relate to the ECHO statements dealing
with BOM and puts them in "inputdata/BOM.csv". Any debug or information
ECHO commands are eliminated in this step
sed -i s/'ECHO: "BOM",'//g inputdata/BOM.csv this cuts the 'ECHO:
"BOM"' text from the front of each line so that I only have to deal with
the pertinent content of my ECHO statement.
After that I use a utility that I created to turn the stream of ECHO
statements into a Bill of Materials which I output as an HTML report and
as a csv file that I can bring into a spreadsheet to do costing.
This is all automated after the original cut and paste of the log file.
It has been brought to my attention that if I ran the OpenSCAD
generation step as a batch job, I could get the log into a file as part
of the generation thus automating the entire process.
I could also output the BOM into an Excel file which should allow me to
add formulas and secondary sheets with pricing for costing to produce a
fully costed BOM without manual intervention.
As I have only 11 distinct parts, I have not attempted to add this yet
but with the self-isolation caused by COVID-19, there is no telling what
I will get up to over the next few days!
Ron
On 2020-04-07 7:58 p.m., Stephen Amorosi wrote:
I would like to see measure functions, such as:
* distance from point to anything
* distance from line to anything
* minimum and maximum distance between two CSG objects
* Surface Area
* CSG (top node) Volume
To implement measure functions It seems like OpenSCAD needs the
ability to give or get a CSG branch identifier so users can then have
the ability to select those CSG objects.
I am working on robot arm simulations using the animation features.
To analyze the simulation I am using a large echo statement and then
grabbing the console window text, pasting it in a spreadsheet, running
a macro to clean up the text, and then creating charts from the data.
This is tedious and I have seen a lot of discussion about a feature to
“echo” to a .csv file or such, which would be great. It would be nice
if this function worked like animation “dump images” and only dumped a
single time cycle of data.
Steve Amorosi
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