So far, everything I've designed with this library has worked just fine when rendered and printed.Īlso note that the library should be added to your project with the use command rather than include, or you will get unwanted test renders in your model. Note that this library abuses OpenSCAD a bit to achieve this, so you may notice some visual glitches when previewing models in OpenSCAD. To use, simply install the library into your OpenSCAD library folder. A simple example of using this library for both 2D and 3D geometry can be found in the "test" directory in the file "trophy.scad". Support for 3-dimensional geometry is still a work in progress. Text(Text, valign="center", halign="center") Use // Be sure to "use" rather than "include" Note that the string is scaled to fit the width of the square: If it's too wide for the space, it will be scaled to fit the width, otherwise it will fit the height.įor example, this code was used to generate the following image (the red square shows the area being scaled to). It allows 2-dimensional geometry to be scaled to fit a given space without distortion. Well, I wasn't satisifed, so I wrote this library to solve this weakness. The designer must determine whether to fit the text to the width of the space or the height of the space, or provide an additional option for the user to select which. This means, for instance, that allowing the user to enter arbitrary text to be incorporated into the model can be difficult since there is no way to tell how wide the text will be and to ensure it can be scaled correctly. One of the greatest weaknesses of OpenSCAD is that it does not provide a way to query the dimensions of geometry. The end user of a well-written model does not need to understand OpenSCAD code to develop their own customized model. One of the great strengths of OpenSCAD is the ability to develop parametric models that can be modified easily using the OpenSCAD customizer. This is an OpenSCAD library designed to solve one of my biggest annoyances with the program, which I'm finding difficult to describe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |