[OpenSCAD] What's the best way to accomplish splitting these elements?

MichaelAtOz oz.at.michael at gmail.com
Mon Jul 8 04:30:04 EDT 2019


guaranteed_interwoven wrote
> (As an aside, I have been writing openscad code the same way I am used to
> writing C, with the opening braces on the next line. However, I defer to
> the
> style guide of the language of course, is this generally frowned upon?
> Should I adopt the style I have seen in examples in this thread?)

Personal taste. I like saving vertical space in the editor.
Your way allows the command to be commented out for debugging. e.g.

//cutCyl()
{
  gen_node(data[0][0], data[0][1], data[0][2]);
  gen_node(data[1][0], data[1][1], data[1][2]);
  gen_node(data[2][0], data[2][1], data[2][2]);
  gen_node(data[3][0], data[3][1], data[3][2]);
} 




-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list