discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Two new support libraries available: openscad_objects, & openscad_logging

JG
Jonathan Gilbert
Tue, Apr 5, 2022 9:11 PM

As a general heads-up, I'd like to announce that I've factored out two
support-like OpenSCAD libraries into their own repositories and made them
publicly available. You might find them useful.

The first is a library for creating and managing object-like lists,
providing a series of functions that act as accessor methods against a
single list, letting you treat it within your .scad as an object
instantiated from a class (well, nearly). "Objects" can be passed about
across your model modules, extended without examining every module arglist,
and have built-in data type checking. A lot of the heavy lifting for
openscad_objects is done through the BOSL2 lists library, which made
constructing this oddity possible.
The openscad_objects library is available at
https://github.com/jon-gilbert/openscad_objects

The second is a library for simple and consistent logging to the OpenSCAD
console. If you've ever used python logging, it's a little like that. Log
messages can be placed throughout your model or model libraries, and the
noise level can be (globally) used to filter away debug messages, or
errors, or some level in between.
The openscad_logging library is available at
https://github.com/jon-gilbert/openscad_logging

Both libraries are available for public use, and both have library
documentation and HOWTO quickstart docs to provide what may be suitable
examples of use. I have absolutely no idea if they'll work for you in your
model, but if you opt to try them and have questions, I think the
respective Github Issues section for each project is the right place to get
help.

(I haven't seen anything or anyone say announcing new library availability
here is not allowed, though to be fair I've only been on this list proper
for a short while, so please LMK if this is not the right place for such
announcements and I'll refrain in the future.)

--

As a general heads-up, I'd like to announce that I've factored out two support-like OpenSCAD libraries into their own repositories and made them publicly available. You might find them useful. The first is a library for creating and managing object-like lists, providing a series of functions that act as accessor methods against a single list, letting you treat it within your .scad as an object instantiated from a class (well, nearly). "Objects" can be passed about across your model modules, extended without examining every module arglist, and have built-in data type checking. A lot of the heavy lifting for openscad_objects is done through the BOSL2 lists library, which made constructing this oddity possible. The openscad_objects library is available at https://github.com/jon-gilbert/openscad_objects The second is a library for simple and consistent logging to the OpenSCAD console. If you've ever used python logging, it's a little like that. Log messages can be placed throughout your model or model libraries, and the noise level can be (globally) used to filter away debug messages, or errors, or some level in between. The openscad_logging library is available at https://github.com/jon-gilbert/openscad_logging Both libraries are available for public use, and both have library documentation and HOWTO quickstart docs to provide what may be suitable examples of use. I have absolutely no idea if they'll work for you in your model, but if you opt to try them and have questions, I think the respective Github Issues section for each project is the right place to get help. (I haven't seen anything or anyone say announcing new library availability here is not allowed, though to be fair I've only been on this list proper for a short while, so please LMK if this is not the right place for such announcements and I'll refrain in the future.) -- - Jon Gilbert jong@jong.org / jgilbertsjc@gmail.com
JB
Jordan Brown
Tue, Apr 5, 2022 11:17 PM

On 4/5/2022 2:11 PM, Jonathan Gilbert wrote:

(I haven't seen anything or anyone say announcing new library
availability here is not allowed, though to be fair I've only been on
this list proper for a short while, so please LMK if this is not the
right place for such announcements and I'll refrain in the future.)

Seems entirely appropriate to me.

On 4/5/2022 2:11 PM, Jonathan Gilbert wrote: > (I haven't seen anything or anyone say announcing new library > availability here is not allowed, though to be fair I've only been on > this list proper for a short while, so please LMK if this is not the > right place for such announcements and I'll refrain in the future.) Seems entirely appropriate to me.