discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

BOSL2: which features do you think are most useful?

MZ
Michael Zimbaro
Sat, May 24, 2025 12:38 PM

Here is my order of most useful:

Rounding and filleting - use it all the time and the reason i installed
bosl in the first place
Building blocks - again bosl was the only way to do a prism
Texturing - used a few times in unique situations
Shorthand - first time hearing about it but will definitely try that out.
That goes for the rest as well.  This is the first time hearing about them
but will try and find a use in the future.

On Fri, May 23, 2025 at 4:11 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

I wrote a summary in which I tried to capture the capabilities provided by
the BOSL2 library, and we've had some discussion about the right order to
list them in.  I'm interested in hearing from users of BOSL2, or even
people who are not (yet/)  BOSL2 users but are interested in BOSL2, about
which features you think are the most useful or most important.  How would
you order this list?  Which features do you think are the least
interesting?  Did I somehow not include on the list your favorite feature?
I encourage you to send your replies by direct email rather than to the
list unless you have something to say that you think is of broad interest.

- *Attachments.* Unless you make models containing just one object the
attachments features can revolutionize your modeling. They let you position
components of a model relative to other components so you don't have to
keep track of the positions and orientations of parts of the model. You can
instead place an something on the TOP of something else, perhaps aligned to
the RIGHT. For a full introduction to attachments, consult the Attachments
Tutorial.
<https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Attachments>
- *Rounding and filleting.* Rounding and filleting is hard in
OpenSCAD. The library provides modules like cuboid()
<https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-cuboid>
to make a cube with any of the edges rounded, offset_sweep()
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep>
to round the ends of a linear extrusion, and prism_connector()
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#module-prism_connector>
which works with the attachments feature to create filleted prisms between
a variety of objects, or even rounded holes through a single object. You
can also use edge_profile()
<https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile>
to apply a variety of different mask profiles to chosen edges of a cubic
shape, or you can directly subtract 3d mask shapes from an edge of objects
that are not cubes.
- *Complex object support.* The path_sweep()
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-path_sweep>
function/module takes a 2d polygon moves it through space along a path and
sweeps out a 3d shape as it moves. You can link together a series of
arbitrary polygons with skin()
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-skin>
or vnf_vertex_array().
<https://github.com/BelfrySCAD/BOSL2/wiki/vnf.scad#functionmodule-vnf_vertex_array>
Support for beziers
<https://github.com/BelfrySCAD/BOSL2/wiki/beziers.scad> and NURBS
<https://github.com/BelfrySCAD/BOSL2/wiki/nurbs.scad> can help you
construct the building blocks you need. Metaballs
<https://github.com/BelfrySCAD/BOSL2/wiki/isosurface.scad#functionmodule-metaballs>
can create organic surfaces that blend shapes together.
- *Building Blocks.* OpenSCAD provides cubes, cones and spheres. The
BOSL2 library extends this to provide different kinds of prisms, tubes, and
other abstract geometrical building blocks. In many cases the BOSL2 objects
include options to round their edges. Basic objects have extensions like
the ability to specify the *inner* radius of a circle to create holes
with a guaranteed minimum size.
- *Texturing.* Many kinds of objects can be created with textures
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#section-texturing>
applied. This can create knurling, but it can do much more than that. A
texture can be any repeating pattern, and applying a texture can actually
replace the base object with something different based on repeating copies
of the texture element. A texture can also be an image; using texturing you
can emboss an arbitrary image onto your model.
- *Parts library.* The parts library includes many useful specific
functional parts including gears
<https://github.com/BelfrySCAD/BOSL2/wiki/gears.scad>, generic
threading
<https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#section-generic-threading>,
and specific threading to match plastic bottles
<https://github.com/BelfrySCAD/BOSL2/wiki/bottlecaps.scad>, pipe
fittings
<https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-npt_threaded_rod>,
or standard screws.
<https://github.com/BelfrySCAD/BOSL2/wiki/screws.scad> Also included
are clips
<https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-tension-clips>,
hinges <https://github.com/BelfrySCAD/BOSL2/wiki/hinges.scad>, and dovetail
joints.
<https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-dovetails>
- *Shorthands.* The shorthands make your code a little shorter, and
more importantly, they can make it significantly easier to read. Compare
up(x) to translate([0,0,x]). The shorthands include operations for
creating copies of objects
<https://github.com/BelfrySCAD/BOSL2/wiki/distributors.scad> and for
applying transformations
<https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad> to objects,
including rot()
<https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad#functionmodule-rot>
which extends rotate in some useful ways that are not easy to do directly.
- *Geometrical operations on data.* In OpenSCAD, geometrical
operations happen on geometry, and information can never be extracted from
geometry. The BOLS2 library provides operations on 2d point lists (called
"paths" or "regions") to make rounded paths
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#function-round_corners>
from ones with corners or do operations like intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#functionmodule-intersection>
and offset
<https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#function-offset>.
It can also do some limited operations on three dimensional data.
- *Programming aids.* The library provides basic mathematical
operations <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad>
including solutions to linear systems of equations
<https://github.com/BelfrySCAD/BOSL2/wiki/linalg.scad#function-linear_solve>
and generic
<https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-root_find>
and polynomial
<https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-real_roots>
numerical root finding. It provides geometrical operations
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad> like line
intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-line_intersection>
or circle intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-circle_circle_intersection>,
coordinate transformations
<https://github.com/BelfrySCAD/BOSL2/wiki/coords.scad>, string
manipulation, <https://github.com/BelfrySCAD/BOSL2/wiki/strings.scad>
and list processing
<https://github.com/BelfrySCAD/BOSL2/wiki/lists.scad>.

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Here is my order of most useful: Rounding and filleting - use it all the time and the reason i installed bosl in the first place Building blocks - again bosl was the only way to do a prism Texturing - used a few times in unique situations Shorthand - first time hearing about it but will definitely try that out. That goes for the rest as well. This is the first time hearing about them but will try and find a use in the future. On Fri, May 23, 2025 at 4:11 PM Adrian Mariano via Discuss < discuss@lists.openscad.org> wrote: > I wrote a summary in which I tried to capture the capabilities provided by > the BOSL2 library, and we've had some discussion about the right order to > list them in. I'm interested in hearing from users of BOSL2, or even > people who are not (yet/) BOSL2 users but are interested in BOSL2, about > which features you think are the most useful or most important. How would > you order this list? Which features do you think are the least > interesting? Did I somehow not include on the list your favorite feature? > I encourage you to send your replies by direct email rather than to the > list unless you have something to say that you think is of broad interest. > > - *Attachments.* Unless you make models containing just one object the > attachments features can revolutionize your modeling. They let you position > components of a model relative to other components so you don't have to > keep track of the positions and orientations of parts of the model. You can > instead place an something on the TOP of something else, perhaps aligned to > the RIGHT. For a full introduction to attachments, consult the Attachments > Tutorial. > <https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Attachments> > - *Rounding and filleting.* Rounding and filleting is hard in > OpenSCAD. The library provides modules like cuboid() > <https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-cuboid> > to make a cube with any of the edges rounded, offset_sweep() > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep> > to round the ends of a linear extrusion, and prism_connector() > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#module-prism_connector> > which works with the attachments feature to create filleted prisms between > a variety of objects, or even rounded holes through a single object. You > can also use edge_profile() > <https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile> > to apply a variety of different mask profiles to chosen edges of a cubic > shape, or you can directly subtract 3d mask shapes from an edge of objects > that are not cubes. > - *Complex object support.* The path_sweep() > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-path_sweep> > function/module takes a 2d polygon moves it through space along a path and > sweeps out a 3d shape as it moves. You can link together a series of > arbitrary polygons with skin() > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-skin> > or vnf_vertex_array(). > <https://github.com/BelfrySCAD/BOSL2/wiki/vnf.scad#functionmodule-vnf_vertex_array> > Support for beziers > <https://github.com/BelfrySCAD/BOSL2/wiki/beziers.scad> and NURBS > <https://github.com/BelfrySCAD/BOSL2/wiki/nurbs.scad> can help you > construct the building blocks you need. Metaballs > <https://github.com/BelfrySCAD/BOSL2/wiki/isosurface.scad#functionmodule-metaballs> > can create organic surfaces that blend shapes together. > - *Building Blocks.* OpenSCAD provides cubes, cones and spheres. The > BOSL2 library extends this to provide different kinds of prisms, tubes, and > other abstract geometrical building blocks. In many cases the BOSL2 objects > include options to round their edges. Basic objects have extensions like > the ability to specify the *inner* radius of a circle to create holes > with a guaranteed minimum size. > - *Texturing.* Many kinds of objects can be created with textures > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#section-texturing> > applied. This can create knurling, but it can do much more than that. A > texture can be any repeating pattern, and applying a texture can actually > replace the base object with something different based on repeating copies > of the texture element. A texture can also be an image; using texturing you > can emboss an arbitrary image onto your model. > - *Parts library.* The parts library includes many useful specific > functional parts including gears > <https://github.com/BelfrySCAD/BOSL2/wiki/gears.scad>, generic > threading > <https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#section-generic-threading>, > and specific threading to match plastic bottles > <https://github.com/BelfrySCAD/BOSL2/wiki/bottlecaps.scad>, pipe > fittings > <https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-npt_threaded_rod>, > or standard screws. > <https://github.com/BelfrySCAD/BOSL2/wiki/screws.scad> Also included > are clips > <https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-tension-clips>, > hinges <https://github.com/BelfrySCAD/BOSL2/wiki/hinges.scad>, and dovetail > joints. > <https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-dovetails> > - *Shorthands.* The shorthands make your code a little shorter, and > more importantly, they can make it significantly easier to read. Compare > up(x) to translate([0,0,x]). The shorthands include operations for > creating copies of objects > <https://github.com/BelfrySCAD/BOSL2/wiki/distributors.scad> and for > applying transformations > <https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad> to objects, > including rot() > <https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad#functionmodule-rot> > which extends rotate in some useful ways that are not easy to do directly. > - *Geometrical operations on data.* In OpenSCAD, geometrical > operations happen on geometry, and information can never be extracted from > geometry. The BOLS2 library provides operations on 2d point lists (called > "paths" or "regions") to make rounded paths > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#function-round_corners> > from ones with corners or do operations like intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#functionmodule-intersection> > and offset > <https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#function-offset>. > It can also do some limited operations on three dimensional data. > - *Programming aids.* The library provides basic mathematical > operations <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad> > including solutions to linear systems of equations > <https://github.com/BelfrySCAD/BOSL2/wiki/linalg.scad#function-linear_solve> > and generic > <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-root_find> > and polynomial > <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-real_roots> > numerical root finding. It provides geometrical operations > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad> like line > intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-line_intersection> > or circle intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-circle_circle_intersection>, > coordinate transformations > <https://github.com/BelfrySCAD/BOSL2/wiki/coords.scad>, string > manipulation, <https://github.com/BelfrySCAD/BOSL2/wiki/strings.scad> > and list processing > <https://github.com/BelfrySCAD/BOSL2/wiki/lists.scad>. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
TA
Todd Allen
Sat, May 24, 2025 4:28 PM

For me using OpenSCAD without BOSL2 would be like using C without the
preprocessor and standard library.

The things I most depend on are offset_sweep(), path_sweep() and skin() but
most everything else you have listed is of value to me also.

On Fri, May 23, 2025 at 3:11 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

I wrote a summary in which I tried to capture the capabilities provided by
the BOSL2 library, and we've had some discussion about the right order to
list them in.  I'm interested in hearing from users of BOSL2, or even
people who are not (yet/)  BOSL2 users but are interested in BOSL2, about
which features you think are the most useful or most important.  How would
you order this list?  Which features do you think are the least
interesting?  Did I somehow not include on the list your favorite feature?
I encourage you to send your replies by direct email rather than to the
list unless you have something to say that you think is of broad interest.

- *Attachments.* Unless you make models containing just one object the
attachments features can revolutionize your modeling. They let you position
components of a model relative to other components so you don't have to
keep track of the positions and orientations of parts of the model. You can
instead place an something on the TOP of something else, perhaps aligned to
the RIGHT. For a full introduction to attachments, consult the Attachments
Tutorial.
<https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Attachments>
- *Rounding and filleting.* Rounding and filleting is hard in
OpenSCAD. The library provides modules like cuboid()
<https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-cuboid>
to make a cube with any of the edges rounded, offset_sweep()
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep>
to round the ends of a linear extrusion, and prism_connector()
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#module-prism_connector>
which works with the attachments feature to create filleted prisms between
a variety of objects, or even rounded holes through a single object. You
can also use edge_profile()
<https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile>
to apply a variety of different mask profiles to chosen edges of a cubic
shape, or you can directly subtract 3d mask shapes from an edge of objects
that are not cubes.
- *Complex object support.* The path_sweep()
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-path_sweep>
function/module takes a 2d polygon moves it through space along a path and
sweeps out a 3d shape as it moves. You can link together a series of
arbitrary polygons with skin()
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-skin>
or vnf_vertex_array().
<https://github.com/BelfrySCAD/BOSL2/wiki/vnf.scad#functionmodule-vnf_vertex_array>
Support for beziers
<https://github.com/BelfrySCAD/BOSL2/wiki/beziers.scad> and NURBS
<https://github.com/BelfrySCAD/BOSL2/wiki/nurbs.scad> can help you
construct the building blocks you need. Metaballs
<https://github.com/BelfrySCAD/BOSL2/wiki/isosurface.scad#functionmodule-metaballs>
can create organic surfaces that blend shapes together.
- *Building Blocks.* OpenSCAD provides cubes, cones and spheres. The
BOSL2 library extends this to provide different kinds of prisms, tubes, and
other abstract geometrical building blocks. In many cases the BOSL2 objects
include options to round their edges. Basic objects have extensions like
the ability to specify the *inner* radius of a circle to create holes
with a guaranteed minimum size.
- *Texturing.* Many kinds of objects can be created with textures
<https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#section-texturing>
applied. This can create knurling, but it can do much more than that. A
texture can be any repeating pattern, and applying a texture can actually
replace the base object with something different based on repeating copies
of the texture element. A texture can also be an image; using texturing you
can emboss an arbitrary image onto your model.
- *Parts library.* The parts library includes many useful specific
functional parts including gears
<https://github.com/BelfrySCAD/BOSL2/wiki/gears.scad>, generic
threading
<https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#section-generic-threading>,
and specific threading to match plastic bottles
<https://github.com/BelfrySCAD/BOSL2/wiki/bottlecaps.scad>, pipe
fittings
<https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-npt_threaded_rod>,
or standard screws.
<https://github.com/BelfrySCAD/BOSL2/wiki/screws.scad> Also included
are clips
<https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-tension-clips>,
hinges <https://github.com/BelfrySCAD/BOSL2/wiki/hinges.scad>, and dovetail
joints.
<https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-dovetails>
- *Shorthands.* The shorthands make your code a little shorter, and
more importantly, they can make it significantly easier to read. Compare
up(x) to translate([0,0,x]). The shorthands include operations for
creating copies of objects
<https://github.com/BelfrySCAD/BOSL2/wiki/distributors.scad> and for
applying transformations
<https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad> to objects,
including rot()
<https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad#functionmodule-rot>
which extends rotate in some useful ways that are not easy to do directly.
- *Geometrical operations on data.* In OpenSCAD, geometrical
operations happen on geometry, and information can never be extracted from
geometry. The BOLS2 library provides operations on 2d point lists (called
"paths" or "regions") to make rounded paths
<https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#function-round_corners>
from ones with corners or do operations like intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#functionmodule-intersection>
and offset
<https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#function-offset>.
It can also do some limited operations on three dimensional data.
- *Programming aids.* The library provides basic mathematical
operations <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad>
including solutions to linear systems of equations
<https://github.com/BelfrySCAD/BOSL2/wiki/linalg.scad#function-linear_solve>
and generic
<https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-root_find>
and polynomial
<https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-real_roots>
numerical root finding. It provides geometrical operations
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad> like line
intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-line_intersection>
or circle intersection
<https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-circle_circle_intersection>,
coordinate transformations
<https://github.com/BelfrySCAD/BOSL2/wiki/coords.scad>, string
manipulation, <https://github.com/BelfrySCAD/BOSL2/wiki/strings.scad>
and list processing
<https://github.com/BelfrySCAD/BOSL2/wiki/lists.scad>.

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

For me using OpenSCAD without BOSL2 would be like using C without the preprocessor and standard library. The things I most depend on are offset_sweep(), path_sweep() and skin() but most everything else you have listed is of value to me also. On Fri, May 23, 2025 at 3:11 PM Adrian Mariano via Discuss < discuss@lists.openscad.org> wrote: > I wrote a summary in which I tried to capture the capabilities provided by > the BOSL2 library, and we've had some discussion about the right order to > list them in. I'm interested in hearing from users of BOSL2, or even > people who are not (yet/) BOSL2 users but are interested in BOSL2, about > which features you think are the most useful or most important. How would > you order this list? Which features do you think are the least > interesting? Did I somehow not include on the list your favorite feature? > I encourage you to send your replies by direct email rather than to the > list unless you have something to say that you think is of broad interest. > > - *Attachments.* Unless you make models containing just one object the > attachments features can revolutionize your modeling. They let you position > components of a model relative to other components so you don't have to > keep track of the positions and orientations of parts of the model. You can > instead place an something on the TOP of something else, perhaps aligned to > the RIGHT. For a full introduction to attachments, consult the Attachments > Tutorial. > <https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Attachments> > - *Rounding and filleting.* Rounding and filleting is hard in > OpenSCAD. The library provides modules like cuboid() > <https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-cuboid> > to make a cube with any of the edges rounded, offset_sweep() > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep> > to round the ends of a linear extrusion, and prism_connector() > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#module-prism_connector> > which works with the attachments feature to create filleted prisms between > a variety of objects, or even rounded holes through a single object. You > can also use edge_profile() > <https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile> > to apply a variety of different mask profiles to chosen edges of a cubic > shape, or you can directly subtract 3d mask shapes from an edge of objects > that are not cubes. > - *Complex object support.* The path_sweep() > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-path_sweep> > function/module takes a 2d polygon moves it through space along a path and > sweeps out a 3d shape as it moves. You can link together a series of > arbitrary polygons with skin() > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#functionmodule-skin> > or vnf_vertex_array(). > <https://github.com/BelfrySCAD/BOSL2/wiki/vnf.scad#functionmodule-vnf_vertex_array> > Support for beziers > <https://github.com/BelfrySCAD/BOSL2/wiki/beziers.scad> and NURBS > <https://github.com/BelfrySCAD/BOSL2/wiki/nurbs.scad> can help you > construct the building blocks you need. Metaballs > <https://github.com/BelfrySCAD/BOSL2/wiki/isosurface.scad#functionmodule-metaballs> > can create organic surfaces that blend shapes together. > - *Building Blocks.* OpenSCAD provides cubes, cones and spheres. The > BOSL2 library extends this to provide different kinds of prisms, tubes, and > other abstract geometrical building blocks. In many cases the BOSL2 objects > include options to round their edges. Basic objects have extensions like > the ability to specify the *inner* radius of a circle to create holes > with a guaranteed minimum size. > - *Texturing.* Many kinds of objects can be created with textures > <https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#section-texturing> > applied. This can create knurling, but it can do much more than that. A > texture can be any repeating pattern, and applying a texture can actually > replace the base object with something different based on repeating copies > of the texture element. A texture can also be an image; using texturing you > can emboss an arbitrary image onto your model. > - *Parts library.* The parts library includes many useful specific > functional parts including gears > <https://github.com/BelfrySCAD/BOSL2/wiki/gears.scad>, generic > threading > <https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#section-generic-threading>, > and specific threading to match plastic bottles > <https://github.com/BelfrySCAD/BOSL2/wiki/bottlecaps.scad>, pipe > fittings > <https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-npt_threaded_rod>, > or standard screws. > <https://github.com/BelfrySCAD/BOSL2/wiki/screws.scad> Also included > are clips > <https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-tension-clips>, > hinges <https://github.com/BelfrySCAD/BOSL2/wiki/hinges.scad>, and dovetail > joints. > <https://github.com/BelfrySCAD/BOSL2/wiki/joiners.scad#section-dovetails> > - *Shorthands.* The shorthands make your code a little shorter, and > more importantly, they can make it significantly easier to read. Compare > up(x) to translate([0,0,x]). The shorthands include operations for > creating copies of objects > <https://github.com/BelfrySCAD/BOSL2/wiki/distributors.scad> and for > applying transformations > <https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad> to objects, > including rot() > <https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad#functionmodule-rot> > which extends rotate in some useful ways that are not easy to do directly. > - *Geometrical operations on data.* In OpenSCAD, geometrical > operations happen on geometry, and information can never be extracted from > geometry. The BOLS2 library provides operations on 2d point lists (called > "paths" or "regions") to make rounded paths > <https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#function-round_corners> > from ones with corners or do operations like intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#functionmodule-intersection> > and offset > <https://github.com/BelfrySCAD/BOSL2/wiki/regions.scad#function-offset>. > It can also do some limited operations on three dimensional data. > - *Programming aids.* The library provides basic mathematical > operations <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad> > including solutions to linear systems of equations > <https://github.com/BelfrySCAD/BOSL2/wiki/linalg.scad#function-linear_solve> > and generic > <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-root_find> > and polynomial > <https://github.com/BelfrySCAD/BOSL2/wiki/math.scad#function-real_roots> > numerical root finding. It provides geometrical operations > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad> like line > intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-line_intersection> > or circle intersection > <https://github.com/BelfrySCAD/BOSL2/wiki/geometry.scad#function-circle_circle_intersection>, > coordinate transformations > <https://github.com/BelfrySCAD/BOSL2/wiki/coords.scad>, string > manipulation, <https://github.com/BelfrySCAD/BOSL2/wiki/strings.scad> > and list processing > <https://github.com/BelfrySCAD/BOSL2/wiki/lists.scad>. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
L
larry
Sat, May 24, 2025 8:15 PM

On Sat, 2025-05-24 at 11:28 -0500, Todd Allen via Discuss wrote:

For me using OpenSCAD without BOSL2 would be like using C without the
preprocessor and standard library.
The things I most depend on are offset_sweep(), path_sweep() and
skin() but most everything else you have listed is of value to me
also.

Exactly!
One of the things I have done with C and with various assemblers, is to
make macros that allow me to re-use code that I don't have to find
documentation for each time I want to use it.

I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the
BOSL2 Wiki would be VERY handy. I would go so far as to say that an
easy way to make a header that makes an include of BOSL2/std.scad would
be even handier.

I use the shortcuts a LOT. Not sure what all else I use most, but the
Wiki is my go-to for code examples.

On Fri, May 23, 2025 at 3:11 PM Adrian Mariano via Discuss
discuss@lists.openscad.org wrote:

I wrote a summary in which I tried to capture the capabilities
provided by the BOSL2 library, and we've had some discussion about
the right order to list them in.  I'm interested in hearing from
users of BOSL2, or even people who are not (yet/)  BOSL2 users but
are interested in BOSL2, about which features you think are the
most useful or most important.   How would you order this list? 
Which features do you think are the least interesting?  Did I
somehow not include on the list your favorite feature?   I
encourage you to send your replies by direct email rather than to
the list unless you have something to say that you think is of
broad interest. 
 * Attachments. Unless you make models containing just one object
the attachments features can revolutionize your modeling. They let
you position components of a model relative to other components so
you don't have to keep track of the positions and orientations of
parts of the model. You can instead place an something on the TOP
of something else, perhaps aligned to the RIGHT. For a full
introduction to attachments, consult the Attachments Tutorial.
 * Rounding and filleting. Rounding and filleting is hard in
OpenSCAD. The library provides modules like cuboid() to make a cube
with any of the edges rounded, offset_sweep() to round the ends of
a linear extrusion, and prism_connector() which works with the
attachments feature to create filleted prisms between a variety of
objects, or even rounded holes through a single object. You can
also use edge_profile() to apply a variety of different mask
profiles to chosen edges of a cubic shape, or you can directly
subtract 3d mask shapes from an edge of objects that are not cubes.
 * Complex object support. The path_sweep() function/module takes a
2d polygon moves it through space along a path and sweeps out a 3d
shape as it moves. You can link together a series of arbitrary
polygons with skin() or vnf_vertex_array(). Support for beziers and
NURBS can help you construct the building blocks you need.
Metaballs can create organic surfaces that blend shapes together.
 * Building Blocks. OpenSCAD provides cubes, cones and spheres. The
BOSL2 library extends this to provide different kinds of prisms,
tubes, and other abstract geometrical building blocks. In many
cases the BOSL2 objects include options to round their edges. Basic
objects have extensions like the ability to specify the inner
radius of a circle to create holes with a guaranteed minimum size.
 * Texturing. Many kinds of objects can be created with textures
applied. This can create knurling, but it can do much more than
that. A texture can be any repeating pattern, and applying a
texture can actually replace the base object with something
different based on repeating copies of the texture element. A
texture can also be an image; using texturing you can emboss an
arbitrary image onto your model.
 * Parts library. The parts library includes many useful specific
functional parts including gears, generic threading, and specific
threading to match plastic bottles, pipe fittings, or standard
screws. Also included are clips, hinges, and dovetail joints.
 * Shorthands. The shorthands make your code a little shorter, and
more importantly, they can make it significantly easier to read.
Compare up(x) to translate([0,0,x]). The shorthands include
operations for creating copies of objects and for applying
transformations to objects, including rot() which extends rotate in
some useful ways that are not easy to do directly.
 * Geometrical operations on data. In OpenSCAD, geometrical
operations happen on geometry, and information can never be
extracted from geometry. The BOLS2 library provides operations on
2d point lists (called "paths" or "regions") to make rounded paths
from ones with corners or do operations like intersection and
offset. It can also do some limited operations on three dimensional
data.
 * Programming aids. The library provides basic mathematical
operations including solutions to linear systems of equations and
generic and polynomial numerical root finding. It provides
geometrical operations like line intersection or circle
intersection, coordinate transformations, string manipulation, and
list processing.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

On Sat, 2025-05-24 at 11:28 -0500, Todd Allen via Discuss wrote: > For me using OpenSCAD without BOSL2 would be like using C without the > preprocessor and standard library. > The things I most depend on are offset_sweep(), path_sweep() and > skin() but most everything else you have listed is of value to me > also. Exactly! One of the things I have done with C and with various assemblers, is to make macros that allow me to re-use code that I don't have to find documentation for each time I want to use it. I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the BOSL2 Wiki would be VERY handy. I would go so far as to say that an easy way to make a header that makes an include of BOSL2/std.scad would be even handier. I use the shortcuts a LOT. Not sure what all else I use most, but the Wiki is my go-to for code examples. > On Fri, May 23, 2025 at 3:11 PM Adrian Mariano via Discuss > <discuss@lists.openscad.org> wrote: > > I wrote a summary in which I tried to capture the capabilities > > provided by the BOSL2 library, and we've had some discussion about > > the right order to list them in.  I'm interested in hearing from > > users of BOSL2, or even people who are not (yet/)  BOSL2 users but > > are interested in BOSL2, about which features you think are the > > most useful or most important.   How would you order this list?  > > Which features do you think are the least interesting?  Did I > > somehow not include on the list your favorite feature?   I > > encourage you to send your replies by direct email rather than to > > the list unless you have something to say that you think is of > > broad interest.  > >  * Attachments. Unless you make models containing just one object > > the attachments features can revolutionize your modeling. They let > > you position components of a model relative to other components so > > you don't have to keep track of the positions and orientations of > > parts of the model. You can instead place an something on the TOP > > of something else, perhaps aligned to the RIGHT. For a full > > introduction to attachments, consult the Attachments Tutorial. > >  * Rounding and filleting. Rounding and filleting is hard in > > OpenSCAD. The library provides modules like cuboid() to make a cube > > with any of the edges rounded, offset_sweep() to round the ends of > > a linear extrusion, and prism_connector() which works with the > > attachments feature to create filleted prisms between a variety of > > objects, or even rounded holes through a single object. You can > > also use edge_profile() to apply a variety of different mask > > profiles to chosen edges of a cubic shape, or you can directly > > subtract 3d mask shapes from an edge of objects that are not cubes. > >  * Complex object support. The path_sweep() function/module takes a > > 2d polygon moves it through space along a path and sweeps out a 3d > > shape as it moves. You can link together a series of arbitrary > > polygons with skin() or vnf_vertex_array(). Support for beziers and > > NURBS can help you construct the building blocks you need. > > Metaballs can create organic surfaces that blend shapes together. > >  * Building Blocks. OpenSCAD provides cubes, cones and spheres. The > > BOSL2 library extends this to provide different kinds of prisms, > > tubes, and other abstract geometrical building blocks. In many > > cases the BOSL2 objects include options to round their edges. Basic > > objects have extensions like the ability to specify the inner > > radius of a circle to create holes with a guaranteed minimum size. > >  * Texturing. Many kinds of objects can be created with textures > > applied. This can create knurling, but it can do much more than > > that. A texture can be any repeating pattern, and applying a > > texture can actually replace the base object with something > > different based on repeating copies of the texture element. A > > texture can also be an image; using texturing you can emboss an > > arbitrary image onto your model. > >  * Parts library. The parts library includes many useful specific > > functional parts including gears, generic threading, and specific > > threading to match plastic bottles, pipe fittings, or standard > > screws. Also included are clips, hinges, and dovetail joints. > >  * Shorthands. The shorthands make your code a little shorter, and > > more importantly, they can make it significantly easier to read. > > Compare up(x) to translate([0,0,x]). The shorthands include > > operations for creating copies of objects and for applying > > transformations to objects, including rot() which extends rotate in > > some useful ways that are not easy to do directly. > >  * Geometrical operations on data. In OpenSCAD, geometrical > > operations happen on geometry, and information can never be > > extracted from geometry. The BOLS2 library provides operations on > > 2d point lists (called "paths" or "regions") to make rounded paths > > from ones with corners or do operations like intersection and > > offset. It can also do some limited operations on three dimensional > > data. > >  * Programming aids. The library provides basic mathematical > > operations including solutions to linear systems of equations and > > generic and polynomial numerical root finding. It provides > > geometrical operations like line intersection or circle > > intersection, coordinate transformations, string manipulation, and > > list processing. > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jon Bondy
Sat, May 24, 2025 8:41 PM

Maybe add a link at the bottom of the Cheat Sheet, like the link to
MCAD?  Or a link to a page like this:

https://openscad.org/libraries.html

Jon

On 5/24/2025 4:15 PM, larry via Discuss wrote:

I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the
BOSL2 Wiki would be VERY handy.

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Maybe add a link at the bottom of the Cheat Sheet, like the link to MCAD?  Or a link to a page like this: https://openscad.org/libraries.html Jon On 5/24/2025 4:15 PM, larry via Discuss wrote: > I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the > BOSL2 Wiki would be VERY handy. -- This email has been checked for viruses by AVG antivirus software. www.avg.com
K
Ken
Sat, May 24, 2025 11:34 PM

I'm with Larry- keep them separate, but put a hyperlink to the BOSL2 wiki in the "about" window, right next to the link to the cheat sheet.

And I also would very much like the ability to create a permanent header that automatically appears in a new file- I have 12 lines that I copy & paste into every new file I make, for various bits & pieces I use most the time.

On 2025-05-25 06:15, larry via Discuss wrote:

One of the things I have done with C and with various assemblers, is to
make macros that allow me to re-use code that I don't have to find
documentation for each time I want to use it.

I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the
BOSL2 Wiki would be VERY handy. I would go so far as to say that an
easy way to make a header that makes an include of BOSL2/std.scad would
be even handier.

I use the shortcuts a LOT. Not sure what all else I use most, but the
Wiki is my go-to for code examples.

Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

I'm with Larry- keep them separate, but put a hyperlink to the BOSL2 wiki in the "about" window, right next to the link to the cheat sheet. And I also would very much like the ability to create a permanent header that automatically appears in a new file- I have 12 lines that I copy & paste into every new file I make, for various bits & pieces I use most the time. On 2025-05-25 06:15, larry via Discuss wrote: > One of the things I have done with C and with various assemblers, is to > make macros that allow me to re-use code that I don't have to find > documentation for each time I want to use it. > > I'm all for keeping OpenSCAD and BOSL2 separate, but a link to the > BOSL2 Wiki would be VERY handy. I would go so far as to say that an > easy way to make a header that makes an include of BOSL2/std.scad would > be even handier. > > I use the shortcuts a LOT. Not sure what all else I use most, but the > Wiki is my go-to for code examples. > Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!
JB
Jon Bondy
Sat, May 24, 2025 11:53 PM

I would love this!  Maybe if a file called "header.inc" or "header.scad"
exists, then automatically put it at the top of the file.

Jon

On 5/24/2025 7:34 PM, Ken via Discuss wrote:

And I also would very much like the ability to create a permanent
header that automatically appears in a new file- I have 12 lines that
I copy & paste into every new file I make, for various bits & pieces I
use most the time.

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

I would love this!  Maybe if a file called "header.inc" or "header.scad" exists, then automatically put it at the top of the file. Jon On 5/24/2025 7:34 PM, Ken via Discuss wrote: > And I also would very much like the ability to create a permanent > header that automatically appears in a new file- I have 12 lines that > I copy & paste into every new file I make, for various bits & pieces I > use most the time. > -- This email has been checked for viruses by AVG antivirus software. www.avg.com
TP
Torsten Paul
Sun, May 25, 2025 12:10 AM

On 25.05.25 01:53, Jon Bondy via Discuss wrote:

I would love this!  Maybe if a file called "header.inc" or "header.scad"
exists, then automatically put it at the top of the file.

It's not fully automatic, but maybe a bit more flexible...

Create a "templates" subfolder in the configuration directory,
e.g. on Linux: $HOME/.config/OpenSCAD/templates

Into that folder, put a file, e.g. called header.json with the
following content (including the curly braces)

{
"key" : "MyHeader",
"content" : "// Hi There!\n// This is my very special
template\n\n^~^"
}

Use ALT+Ins (no idea what that would be on macOS), or use
mouse right-click -> insert template. Select "MyHeader" in
the popup.

The "^~^" is the marker where to place the cursor.

ciao,
Torsten.

On 25.05.25 01:53, Jon Bondy via Discuss wrote: > I would love this!  Maybe if a file called "header.inc" or "header.scad" > exists, then automatically put it at the top of the file. It's not fully automatic, but maybe a bit more flexible... Create a "templates" subfolder in the configuration directory, e.g. on Linux: $HOME/.config/OpenSCAD/templates Into that folder, put a file, e.g. called header.json with the following content (including the curly braces) { "key" : "MyHeader", "content" : "// Hi There!\n// This is my very special template\n\n^~^" } Use ALT+Ins (no idea what that would be on macOS), or use mouse right-click -> insert template. Select "MyHeader" in the popup. The "^~^" is the marker where to place the cursor. ciao, Torsten.
JB
Jon Bondy
Sun, May 25, 2025 12:44 PM

Torsten:

Thank you.  Nice idea, with many problems.

First off, the folder you specified is protected by Windows.  It takes
quite a bit of wrangling to create and edit such a file.  I have to
create and edit the file elsewhere and then copy it to the folder. 
Eventually, I created such a file using your content.

Then the new file does not appear in the popup list, even after
restarting OpenSCAD.

AND once the list pops up, I cannot select an entry using the <enter>
key or using a mouse click.  Wait.  I can select using a mouse DOUBLE
click.  Who on earth decided that selecting from a list required a
DOUBLE click?

In any event, this approach appears to need some work.

Is this working better for others using Windows?

Thanks

Jon

On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote:

On 25.05.25 01:53, Jon Bondy via Discuss wrote:

I would love this!  Maybe if a file called "header.inc" or
"header.scad" exists, then automatically put it at the top of the file.

It's not fully automatic, but maybe a bit more flexible...

Create a "templates" subfolder in the configuration directory,
e.g. on Linux: $HOME/.config/OpenSCAD/templates

Into that folder, put a file, e.g. called header.json with the
following content (including the curly braces)

{
        "key" : "MyHeader",
        "content" : "// Hi There!\n// This is my very special
template\n\n^~^"
}

Use ALT+Ins (no idea what that would be on macOS), or use
mouse right-click -> insert template. Select "MyHeader" in
the popup.

The "^~^" is the marker where to place the cursor.

ciao,
  Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Torsten: Thank you.  Nice idea, with many problems. First off, the folder you specified is protected by Windows.  It takes quite a bit of wrangling to create and edit such a file.  I have to create and edit the file elsewhere and then copy it to the folder.  Eventually, I created such a file using your content. Then the new file does not appear in the popup list, even after restarting OpenSCAD. AND once the list pops up, I cannot select an entry using the <enter> key or using a mouse click.  Wait.  I can select using a mouse DOUBLE click.  Who on earth decided that selecting from a list required a DOUBLE click? In any event, this approach appears to need some work. Is this working better for others using Windows? Thanks Jon On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote: > On 25.05.25 01:53, Jon Bondy via Discuss wrote: >> I would love this!  Maybe if a file called "header.inc" or >> "header.scad" exists, then automatically put it at the top of the file. > > It's not fully automatic, but maybe a bit more flexible... > > Create a "templates" subfolder in the configuration directory, > e.g. on Linux: $HOME/.config/OpenSCAD/templates > > Into that folder, put a file, e.g. called header.json with the > following content (including the curly braces) > > { >         "key" : "MyHeader", >         "content" : "// Hi There!\n// This is my very special > template\n\n^~^" > } > > Use ALT+Ins (no idea what that would be on macOS), or use > mouse right-click -> insert template. Select "MyHeader" in > the popup. > > The "^~^" is the marker where to place the cursor. > > ciao, >   Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG antivirus software. www.avg.com
JJ
jon jonbondy.com
Sun, May 25, 2025 12:49 PM

It works if I put the file here:

C:\Users\jon\AppData\Local\OpenSCAD

On 5/25/2025 8:44 AM, Jon Bondy wrote:

Torsten:

Thank you.  Nice idea, with many problems.

First off, the folder you specified is protected by Windows.  It takes
quite a bit of wrangling to create and edit such a file.  I have to
create and edit the file elsewhere and then copy it to the folder. 
Eventually, I created such a file using your content.

Then the new file does not appear in the popup list, even after
restarting OpenSCAD.

AND once the list pops up, I cannot select an entry using the <enter>
key or using a mouse click.  Wait.  I can select using a mouse DOUBLE
click.  Who on earth decided that selecting from a list required a
DOUBLE click?

In any event, this approach appears to need some work.

Is this working better for others using Windows?

Thanks

Jon

On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote:

On 25.05.25 01:53, Jon Bondy via Discuss wrote:

I would love this!  Maybe if a file called "header.inc" or
"header.scad" exists, then automatically put it at the top of the file.

It's not fully automatic, but maybe a bit more flexible...

Create a "templates" subfolder in the configuration directory,
e.g. on Linux: $HOME/.config/OpenSCAD/templates

Into that folder, put a file, e.g. called header.json with the
following content (including the curly braces)

{
        "key" : "MyHeader",
        "content" : "// Hi There!\n// This is my very special
template\n\n^~^"
}

Use ALT+Ins (no idea what that would be on macOS), or use
mouse right-click -> insert template. Select "MyHeader" in
the popup.

The "^~^" is the marker where to place the cursor.

ciao,
  Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

It works if I put the file here: C:\Users\jon\AppData\Local\OpenSCAD On 5/25/2025 8:44 AM, Jon Bondy wrote: > Torsten: > > Thank you.  Nice idea, with many problems. > > First off, the folder you specified is protected by Windows.  It takes > quite a bit of wrangling to create and edit such a file.  I have to > create and edit the file elsewhere and then copy it to the folder.  > Eventually, I created such a file using your content. > > Then the new file does not appear in the popup list, even after > restarting OpenSCAD. > > AND once the list pops up, I cannot select an entry using the <enter> > key or using a mouse click.  Wait.  I can select using a mouse DOUBLE > click.  Who on earth decided that selecting from a list required a > DOUBLE click? > > In any event, this approach appears to need some work. > > Is this working better for others using Windows? > > Thanks > > Jon > > > On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote: >> On 25.05.25 01:53, Jon Bondy via Discuss wrote: >>> I would love this!  Maybe if a file called "header.inc" or >>> "header.scad" exists, then automatically put it at the top of the file. >> >> It's not fully automatic, but maybe a bit more flexible... >> >> Create a "templates" subfolder in the configuration directory, >> e.g. on Linux: $HOME/.config/OpenSCAD/templates >> >> Into that folder, put a file, e.g. called header.json with the >> following content (including the curly braces) >> >> { >>         "key" : "MyHeader", >>         "content" : "// Hi There!\n// This is my very special >> template\n\n^~^" >> } >> >> Use ALT+Ins (no idea what that would be on macOS), or use >> mouse right-click -> insert template. Select "MyHeader" in >> the popup. >> >> The "^~^" is the marker where to place the cursor. >> >> ciao, >>   Torsten. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org
JJ
jon jonbondy.com
Sun, May 25, 2025 1:08 PM

Creating and debugging a Template is made more awkward than necessary
because it appears that Templates are only loaded when OpenSCAD starts
up (rather than when the user requests the list of Templates).  Thus one
must start OS, select New, wait for everything to load, test the
Template, and then kill OS and do it all over again.

I gather that Json requires that the entire text string be on one line. 
What a marvelous combination of flexibility and inflexibiitily.

Is there a way to pop up the list of Templates without using an obscure
key combination?  I know that some love this approach, but not everyone.

Thanks.  This does 99% of what I needed!

Jon

On 5/25/2025 8:49 AM, Jon Bondy wrote:

It works if I put the file here:

C:\Users\jon\AppData\Local\OpenSCAD

On 5/25/2025 8:44 AM, Jon Bondy wrote:

Torsten:

Thank you.  Nice idea, with many problems.

First off, the folder you specified is protected by Windows.  It
takes quite a bit of wrangling to create and edit such a file. I have
to create and edit the file elsewhere and then copy it to the
folder.  Eventually, I created such a file using your content.

Then the new file does not appear in the popup list, even after
restarting OpenSCAD.

AND once the list pops up, I cannot select an entry using the <enter>
key or using a mouse click.  Wait.  I can select using a mouse DOUBLE
click.  Who on earth decided that selecting from a list required a
DOUBLE click?

In any event, this approach appears to need some work.

Is this working better for others using Windows?

Thanks

Jon

On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote:

On 25.05.25 01:53, Jon Bondy via Discuss wrote:

I would love this!  Maybe if a file called "header.inc" or
"header.scad" exists, then automatically put it at the top of the
file.

It's not fully automatic, but maybe a bit more flexible...

Create a "templates" subfolder in the configuration directory,
e.g. on Linux: $HOME/.config/OpenSCAD/templates

Into that folder, put a file, e.g. called header.json with the
following content (including the curly braces)

{
        "key" : "MyHeader",
        "content" : "// Hi There!\n// This is my very special
template\n\n^~^"
}

Use ALT+Ins (no idea what that would be on macOS), or use
mouse right-click -> insert template. Select "MyHeader" in
the popup.

The "^~^" is the marker where to place the cursor.

ciao,
  Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Creating and debugging a Template is made more awkward than necessary because it appears that Templates are only loaded when OpenSCAD starts up (rather than when the user requests the list of Templates).  Thus one must start OS, select New, wait for everything to load, test the Template, and then kill OS and do it all over again. I gather that Json requires that the entire text string be on one line.  What a marvelous combination of flexibility and inflexibiitily. Is there a way to pop up the list of Templates without using an obscure key combination?  I know that some love this approach, but not everyone. Thanks.  This does 99% of what I needed! Jon On 5/25/2025 8:49 AM, Jon Bondy wrote: > It works if I put the file here: > > C:\Users\jon\AppData\Local\OpenSCAD > > > On 5/25/2025 8:44 AM, Jon Bondy wrote: >> Torsten: >> >> Thank you.  Nice idea, with many problems. >> >> First off, the folder you specified is protected by Windows.  It >> takes quite a bit of wrangling to create and edit such a file. I have >> to create and edit the file elsewhere and then copy it to the >> folder.  Eventually, I created such a file using your content. >> >> Then the new file does not appear in the popup list, even after >> restarting OpenSCAD. >> >> AND once the list pops up, I cannot select an entry using the <enter> >> key or using a mouse click.  Wait.  I can select using a mouse DOUBLE >> click.  Who on earth decided that selecting from a list required a >> DOUBLE click? >> >> In any event, this approach appears to need some work. >> >> Is this working better for others using Windows? >> >> Thanks >> >> Jon >> >> >> On 5/24/2025 8:10 PM, Torsten Paul via Discuss wrote: >>> On 25.05.25 01:53, Jon Bondy via Discuss wrote: >>>> I would love this!  Maybe if a file called "header.inc" or >>>> "header.scad" exists, then automatically put it at the top of the >>>> file. >>> >>> It's not fully automatic, but maybe a bit more flexible... >>> >>> Create a "templates" subfolder in the configuration directory, >>> e.g. on Linux: $HOME/.config/OpenSCAD/templates >>> >>> Into that folder, put a file, e.g. called header.json with the >>> following content (including the curly braces) >>> >>> { >>>         "key" : "MyHeader", >>>         "content" : "// Hi There!\n// This is my very special >>> template\n\n^~^" >>> } >>> >>> Use ALT+Ins (no idea what that would be on macOS), or use >>> mouse right-click -> insert template. Select "MyHeader" in >>> the popup. >>> >>> The "^~^" is the marker where to place the cursor. >>> >>> ciao, >>>   Torsten. >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org