Thingiverse
Error-Checking In Preview Window for Customizable OpenSCAD Objects
di kickahaota
10
Download
8
Likes
0
Makes
This library implements an "assert" feature with a difference: rather than displaying
a console error, it actually renders 3D text of your choice describing the assertion
failure.
This is particularly useful for customizable (parameterized) SCAD files, where you want
a user to be able to customize the parameters on Thingiverse or in the OpenSCAD
application's Customizer pane. Your parameters may have limitations that can't be
expressed in customizer syntax, so you may be doing parameter-checking using assert
statements instead. But a user likely won't even see 'assert' output, and likely
wouldn't understand it if they did. So this library allows you to display error
messages directly in the preview window. That's almost impossible for a user to miss,
and you can write your own user-friendly messages.
Usage instructions:
* Put this file in the same directory as your .scad file (or in a library directory;
see the OpenSCAD documentation)
* Add this to your .scad f
a console error, it actually renders 3D text of your choice describing the assertion
failure.
This is particularly useful for customizable (parameterized) SCAD files, where you want
a user to be able to customize the parameters on Thingiverse or in the OpenSCAD
application's Customizer pane. Your parameters may have limitations that can't be
expressed in customizer syntax, so you may be doing parameter-checking using assert
statements instead. But a user likely won't even see 'assert' output, and likely
wouldn't understand it if they did. So this library allows you to display error
messages directly in the preview window. That's almost impossible for a user to miss,
and you can write your own user-friendly messages.
Usage instructions:
* Put this file in the same directory as your .scad file (or in a library directory;
see the OpenSCAD documentation)
* Add this to your .scad f
Hai stampato questo modello? Accedi e condividi il tuo make!
Accedi per lasciare un commento
AccediAncora nessun commento – sii il primo!