mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-12-07 19:32:06 +00:00
Page:
Home
Pages
AlphaIndex
CheatSheet
Glossary
Home
TOC
Topics
Tutorial Attachment Align
Tutorial Attachment Attach
Tutorial Attachment Basic Positioning
Tutorial Attachment Color
Tutorial Attachment Edge Profiling
Tutorial Attachment Making
Tutorial Attachment Overview
Tutorial Attachment Parts
Tutorial Attachment Position
Tutorial Attachment Relative Positioning
Tutorial Attachment Tags
Tutorial Beziers_for_Beginners
Tutorial Distributors
Tutorial FractalTree
Tutorial Mutators
Tutorial Paths
Tutorial Rounding_the_Cube
Tutorial Shapes2d
Tutorial Shapes3d
Tutorial Transforms
Tutorial VNF
Tutorials
attachments.scad
ball_bearings.scad
beziers.scad
bottlecaps.scad
color.scad
comparisons.scad
constants.scad
coords.scad
cubetruss.scad
distributors.scad
drawing.scad
fnliterals.scad
gears.scad
geometry.scad
hinges.scad
hooks.scad
isosurface.scad
joiners.scad
linalg.scad
linear_bearings.scad
lists.scad
masks.scad
masks2d.scad
masks3d.scad
math.scad
miscellaneous.scad
modular_hose.scad
nema_steppers.scad
nurbs.scad
partitions.scad
paths.scad
polyhedra.scad
regions.scad
rounding.scad
screw_drive.scad
screws.scad
shapes2d.scad
shapes3d.scad
skin.scad
sliders.scad
strings.scad
structs.scad
threading.scad
transforms.scad
trigonometry.scad
tripod_mounts.scad
turtle3d.scad
utility.scad
vectors.scad
version.scad
vnf.scad
walls.scad
wiring.scad
No results
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Belfry OpenSCAD Library v2
Documentation Indices
- Index by File (Table of Contents)
- Index by Function/Module Name
- Index by Topic
- Usage Cheat Sheet
- List of Tutorials
Overview
The BOSL2 library is an enormous library that provides many different kinds of capabilities to simplify the development of models in OpenSCAD, and to make things possible that are difficult in native OpenSCAD. Some of the things BOSL2 provides are:
- Shorthands. The shorthands make your code a little shorter, and more importantly, they can make it significantly easier to read. Compare
up(x)totranslate([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. - 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.
- 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.
Installation
- Download the .zip or .tar.gz release file for this library. Currently you should be able to find this at https://github.com/BelfrySCAD/BOSL2/archive/refs/heads/master.zip
- Unpack it. Make sure that you unpack the whole file structure. Some zipfile unpackers call this option "Use folder names". It should create either a
BOSL-v2.0orBOSL2-masterdirectory with the library files within it. You should see "examples", "scripts", "tests", and other subdirectories. - Rename the unpacked main directory to
BOSL2. - Move the
BOSL2directory into the apropriate OpenSCAD library directory. The library directory may be on the list below, but for SNAP or other prepackaged installations, it is probably somewhere else. To find it, run OpenSCAD and select Help→Library Info, and look for the entry that says "User Library Path". This is your default library directory. You may choose to change it to something more convenient by setting the environment variable OPENSCADPATH. Using this variable also means that all versions of OpenSCAD you install will look for libraries in the same location.- Windows:
My Documents\OpenSCAD\libraries\ - Linux:
$HOME/.local/share/OpenSCAD/libraries/ - Mac OS X:
$HOME/Documents/OpenSCAD/libraries/
- Windows:
- Restart OpenSCAD.
Other Libraries that Synergize with BOSL2
- Pathbuilder – SVG path string parsing.
- Attachable Text3d - FontMetrics aware attachable text for BOSL2.
- JL_SCAD - A Library to make enclosures for electronics projects, with BOSL2.
Indices
Table of Contents
Function Index
Topics Index
Glossary
Cheat Sheet
Tutorials
List of Files:
Basic Modeling:
- constants.scad STD
- transforms.scad STD
- attachments.scad STD
- shapes2d.scad STD
- shapes3d.scad STD
- masks.scad STD
- drawing.scad STD
- distributors.scad STD
- color.scad STD
- partitions.scad STD
- miscellaneous.scad STD
Advanced Modeling:
- paths.scad STD
- regions.scad STD
- skin.scad STD
- vnf.scad STD
- beziers.scad STD
- nurbs.scad
- rounding.scad STD
- turtle3d.scad
- isosurface.scad
Math:
- math.scad STD
- linalg.scad STD
- vectors.scad STD
- coords.scad STD
- geometry.scad STD
- trigonometry.scad STD
Data Management:
- version.scad STD
- comparisons.scad STD
- lists.scad STD
- utility.scad STD
- strings.scad STD
- structs.scad STD
- fnliterals.scad
Threaded Parts:
Parts:
- ball_bearings.scad
- cubetruss.scad
- gears.scad
- hinges.scad
- joiners.scad
- linear_bearings.scad
- modular_hose.scad
- nema_steppers.scad
- polyhedra.scad
- sliders.scad
- tripod_mounts.scad
- walls.scad
- wiring.scad
- hooks.scad
Footnotes:
STD = Included in std.scad
