derkork / openscad-graph-editor

OpenSCAD Graph Editor
GNU General Public License v3.0
217 stars 12 forks source link

Add //!OpenSCAD comment at beginning of file and put modules at the top #39

Closed WillAdams closed 1 year ago

WillAdams commented 1 year ago

Other tools add the line:

//!OpenSCAD

and it seems to be more appropriate to have imported modules at the top of the file before variable declarations:

//!OpenSCAD

include <C:/Users/willa/OneDrive/Documents/RapCAD/Libraries/gcodepreview.scad>
include <C:/Users/willa/OneDrive/Documents/RapCAD/Libraries/gcp_joinery.scad>

Would that be a viable approach/option?

derkork commented 1 year ago

Should be doable. Maybe we could do a "preamble" setting, so you can add arbitrary text to be added before the generated code and this can be set up per project as needed.

WillAdams commented 1 year ago

A further consideration here --- should a semi-colon be included at the end of include?

OpenSCAD doesn't mind, but RapCAD does:

image