The BOLTS library consists of several different components, processes and conventions and a number of precisely defined concepts. The purpose of this document is to specify them.
In this section some concepts are defined, that will be used later in the specification of the blt-file.
A BOLTS repository contains a various sorts of data about objects, that are in some way useful in CAD. A part is a object that can be described by a set of dimensions. E.g. a piece of paper is described by its width of 210mm and its height of 297mm.
However, one often encounters parts that are very similar to each other, for example just differing in their dimensions. These parts can then be more efficiently described as a class of parts. To continue with the paper example, a class describing pieces class could also contain a part with width 100mm and height 100mm.
In a blt-file classes of parts are described, because this case is so frequent. Some parts are one of a kind, so it is not uncommon to have classes that contain just a single part.
The classes of technical parts that BOLTS deals with are often specified by standards issued by standardization bodies. This can be specified for a class in the blt-file.
It turns out to be convenient to organize the classes of a bolts repository in collections. A collection usually has one or few authors, the parts contained are in some sense related to each other and all the data of a collection is under the same licence.
Each collection has a one word identifier, the collection id. The collection id is the filename (without extension) of the blt-file with the information about the collection, and also explicitly specified in the blt-file. For more details information see there.
A BOLTS repository is directory structure with a certain layout. It contains all the data and metadata. The root directory contains at least a "data" directory with the backend independent data in blt-file, plus optionally a number of database directories with data that can be used by a backend. See list-of-databases for details.
A database directory is a directory that contains data about certain aspects of the parts or data in a specific form.Backends can access this data to transform the parts data into specific forms or collect informations.
In contrast to the data in the blt-file, the data in the database directories is optional. If for a class this data is not available, the backend has to be able to deal with it in an appropriate manner, for example by not processing this class.
A backend is a process that uses backend independent data and data from database, transforms this data and outputs a set of files. This output is called the distribution.
Am example for a backend would be a process that uses the backend indepent data about parts, their geometries and dimensions together with a number of templates and stylesheets and produces a set of HTML pages with a nicely rendered, browsable description of the parts. Other backends could produce data that is suitable for use in specific CAD applications.
Backends are not specified in detail by this specification.
The backend independent data is stored in yaml files with the extension .blt. These files contain exactly one YAML document consisting of an associative array with the following keys:
The filename without the .blt extension is called the collection id. For consistency they are repeated in the id field. Collection ids are one word identifiers, which must be unique within the repository. They should contain only letters, numbers and underscores, and should be descriptive, as they may be visible to the user. Some names can not be collection ids: common, gui, template
A class element is an associative array that holds information about a class. It has the following keys:
A parameter element is an associative array that holds information about the parameters of a part. This information is used when doing parameter-collection. Parameters are often dimensions, but are not restricted to be. The following keys are contained in a parameter element.
Some parameter names are forbidden: standard, name.
The two values of the type Bool are true and false (lowercase).
Tables of data are very common in standards and very useful for specifying a class of parts. A table element describes a table of values, where the row is specified by the value an index parameter, and each column contains the value for a parameter. A table element is an associative array that has the following keys:
In some cases, a table-element is not powerful enough to represent the relationship between the values of free parameters and other parameters, for example if the value of a parameter depends on two free parameters at once. This case is covered by a table2d-element.
A table2d-element allows to lookup the value of the result parameter for a row given by a rowindex and a column given by a colindex.
A table2d-element is an associative array with the following keys:
The name of a part should be precise enough to completely describe it, and therefore depends on the values of (some of) the parameters. A naming element is an associative array that holds information about the name of the parts of a class. It has the keys:
Parameter Collection is the process of assigning a value to each parameter. The set of all parameters is found by collecting parameter names from the fields of one or more parameter-element:
It is an error condition if there is a parameter name present as a key in the types field, that is not in the set of all parameters.
Then a value is assigned to each parameter. This can happen by:
It is an error condition if a parameter is not assigned a value or if there is more than one way to assign a value.
The parameter values collected in this way are for example used (among other properties) to populate the template given in the naming-element.
A base file element is an associative array containing informations about a file. Depending on the type of the file the contained keys are different. However, there are some keys that are present in every base file element:
Different data bases contain different base-file-types, for a list see list-of-base-file-types.
The drawings directory contains a number of subdirectories, one for each collection. In each of these directories, drawings of the parts can be stored, that illustrate the geometries of the parts and the meaning of the parameters.
In each directory there is a .base file with the same name as the directory. It contains metadata in form of a list of base-file-element of type "drawing-dimensions" or "drawing-connector" for the files in this directory. See base-file-type-drawing-dimensions and base-file-type-drawing-connectors.
The files containing all the informations necessary to build a geometrical representation of a class in OpenSCAD reside in the "openscad" directory. This database directory contains a folder for each collection that contains files related to this collection, and the folder is named like the collection-id.
To be able to do that it needs informations about base modules. These informations are stored in the base-files of a collection. Base modules are OpenSCAD modules that take as parameters a subset of the parameters of the part (see parameter-collection), and construct the part according to these dimensions.
These modules are stored in one or several files residing in the respective collection directory within the openscad directory, and the base-files contains one base-file-element of type "modules" (see base-file-type-module) for each file with modules.
The "freecad" directory contains files that allow to build a geometrical representation of a class in FreeCAD. This directory contains a folder for each collection with the files related to classes in this collection.
The geometrical representation can either be in the form of python function that constructs the part using the scripting facilities of FreeCAD, or in form of FreeCAD model files. The base-files contains base-file-element of type "function" (see base-file-type-function) for the former form and of type "fcstd" (see base-file-type-fcstd) for the latter form.
The "solidworks" directory contains files necessary to build "design tables" for use with the SolidWorks software. This directory contains a folder for each collection with the files related to classes in this collection.
The geometrical representation of the parts is supplied in the form of parametrized models. Together with "design tables" these models allow to easily obtain different sizes and variations of a part.
This kind of base-file-element describes a drawing showing the dimensional parameters of a part. It is an associative array with the following keys:
This kind of base-file-element describes a file containing OpenSCAD modules. It is an associative array that contains the following keys:
A base module element is a associative array describing an OpenSCAD module with the following keys:
A base-module-cs describes a set of local coordinate systems or connectors that are attached to specific points of the part to allow easy positioning. This is implemented by a OpenSCAD function that returns a coordinate system structure. This function has all the arguments of the module in which the base-module-cs is contained, and an additional argument "location" as the last argument. A base-module-cs is an associative array with the following keys:
This kind of base-file-element describes a file containing geometrical data in the STL format. It is an associative array with the following keys:
This kind of base-file-element describes a python file containing geometrical data in form of functions that build a part in a FreeCAD Document. It is an associative array with the following keys:
A base function element is a associative array describing a python function with the following keys:
This kind of base-file-element describes a file created with FreeCAD. It is an associative array with the following keys:
A base object element is an associative array describing an object in a FreeCAD Document. It has the following keys:
This kind of base-file-element contains all the information necessary to create a design table that can be used together with a model file to create a "configuration". It is an associative array with the following keys:
A designtable class element specifies the classes that should be included in a designtable.
The license of a file contained in BOLTS must be one of the following:
where a + indicates a clause that allows a later version of the license to be used.