R
runsun
Sat, Jul 30, 2016 11:25 PM
Hello, is it possible to parse a string to
csv spreadsheet like in Ruby
http://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html
, for example writing this
<br>
<br>
<code>
CSV.open(save_path, 'wb') do |csv|
<br>
arr.each{|row| csv << row}
<br>
end
<br>
</code>
<br>
will parse an array of string to csv format and I can then to save/export
it for my spreadsheet work.
To my understanding, there's no parser capability in OpenScad. The only
thing I found close is something described in String Theory, a string
library for OpenSCAD http://www.thingiverse.com/thing:526023 (also check
out the comments), which is far from a full-scale text-file parser, not to
mention that OpenSCAD cannot read a text file as a string.
lanette wrote
Additionally, I would like to get the module name and the bounding box
dimension of a module (which contains shapes/union/difference etc) in the
form of x_length, y_width and z_depth and return them as a string.
<br>
<br>
Really appreciate if someone could give pointers on how to go develop
them.
This is also not possible in OpenSCAD. However, blobule
http://forum.openscad.org/template/NamlServlet.jtp?macro=user_nodes&user=1094
developed some stuff to calc the center and vol of a mass, from there it
might be possible to the the dimension (my really wild guess):
http://forum.openscad.org/Volume-and-Center-of-mass-td15421.html
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
View this message in context: http://forum.openscad.org/Parsing-string-to-spreadsheet-tp18007p18008.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
lanette wrote
> Hello, is it possible to parse a string to
> csv spreadsheet like in Ruby
> <http://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html>
> , for example writing this
> <br>
> <br>
> <code>
> CSV.open(save_path, 'wb') do |csv|
> <br>
> arr.each{|row| csv << row}
> <br>
> end
> <br>
> </code>
> <br>
> will parse an array of string to csv format and I can then to save/export
> it for my spreadsheet work.
To my understanding, there's no parser capability in OpenScad. The only
thing I found close is something described in String Theory, a string
library for OpenSCAD <http://www.thingiverse.com/thing:526023> (also check
out the comments), which is far from a full-scale text-file parser, not to
mention that OpenSCAD cannot read a text file as a string.
lanette wrote
> Additionally, I would like to get the module name and the bounding box
> dimension of a module (which contains shapes/union/difference etc) in the
> form of x_length, y_width and z_depth and return them as a string.
> <br>
> <br>
> Really appreciate if someone could give pointers on how to go develop
> them.
This is also not possible in OpenSCAD. However, blobule
<http://forum.openscad.org/template/NamlServlet.jtp?macro=user_nodes&user=1094>
developed some stuff to calc the center and vol of a mass, from there it
might be possible to the the dimension (my really wild guess):
http://forum.openscad.org/Volume-and-Center-of-mass-td15421.html
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Parsing-string-to-spreadsheet-tp18007p18008.html
Sent from the OpenSCAD mailing list archive at Nabble.com.