From 4cac38258121c27a28f635cd30a13fec36b73388 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Thu, 24 Dec 2020 16:04:59 +0000 Subject: [PATCH] Single backtick now used for all code quotes. --- docs/usage.md | 112 +- printed/box_assembly.scad | 2 +- printed/butt_box.scad | 2 +- printed/corner_block.scad | 4 +- printed/drag_chain.scad | 2 +- printed/fan_guard.scad | 2 +- printed/fixing_block.scad | 4 +- printed/flat_hinge.scad | 4 +- readme.md | 4578 ++++++++++++++--------------- scripts/doc_scripts.py | 4 +- scripts/make_all.py | 2 +- scripts/panels.py | 2 +- scripts/platters.py | 2 +- scripts/readme.md | 32 +- scripts/tests.py | 4 +- utils/bezier.scad | 12 +- utils/catenary.scad | 14 +- utils/core/bom.scad | 26 +- utils/core/global.scad | 12 +- utils/core/rounded_rectangle.scad | 9 +- utils/core/sphere.scad | 2 +- utils/core/teardrops.scad | 2 +- utils/gears.scad | 8 +- utils/hanging_hole.scad | 2 +- utils/horiholes.scad | 2 +- utils/layout.scad | 4 +- utils/maths.scad | 12 +- utils/offset.scad | 2 +- utils/quadrant.scad | 2 +- utils/rounded_cylinder.scad | 2 +- utils/rounded_polygon.scad | 2 +- utils/sector.scad | 2 +- utils/sweep.scad | 4 +- utils/thread.scad | 6 +- utils/tube.scad | 5 +- vitamins/axial.scad | 2 +- vitamins/belt.scad | 2 +- vitamins/component.scad | 2 +- vitamins/fan.scad | 2 +- vitamins/insert.scad | 2 +- vitamins/light_strip.scad | 2 +- vitamins/microview.scad | 2 +- vitamins/o_ring.scad | 6 +- vitamins/rail.scad | 2 +- vitamins/screw.scad | 2 +- vitamins/scs_bearing_block.scad | 2 +- vitamins/smd.scad | 2 +- vitamins/wire.scad | 2 +- vitamins/ziptie.scad | 2 +- 49 files changed, 2459 insertions(+), 2459 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index d03f6db..fa26e90 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -22,37 +22,37 @@ The 7 SEGMENT.TTF font from the docs directory is needed for simulating 7 segmen ## Installation -OpenSCAD has to be setup to find libraries by setting the ```OPENSCADPATH``` environment variable to where you want to file your libraries and NopSCADlib needs to be installed -in the directory it points to. This can be done with ```git clone https://github.com/nophead/NopSCADlib.git``` while in that directory or, if you don't want to use GIT, +OpenSCAD has to be setup to find libraries by setting the `OPENSCADPATH` environment variable to where you want to file your libraries and NopSCADlib needs to be installed +in the directory it points to. This can be done with `git clone https://github.com/nophead/NopSCADlib.git` while in that directory or, if you don't want to use GIT, by downloading https://github.com/nophead/NopSCADlib/archive/master.zip and unzipping it to a directory called NopSCADlib. -The ```NopSCADlib/scripts``` directory needs to be added to the executable search path, ```PATH``` on Windows and ```path``` on Linux and Mac. +The `NopSCADlib/scripts` directory needs to be added to the executable search path, `PATH` on Windows and `path` on Linux and Mac. -The installation can be tested by opening ```NopSCADlib/libtest.scad``` in the OpenSCAD GUI. It should render all the objects in the library in about 1 minute. +The installation can be tested by opening `NopSCADlib/libtest.scad` in the OpenSCAD GUI. It should render all the objects in the library in about 1 minute. -Running ```tests``` from the command line will run all the tests in the ```tests``` directory and build the ```readme.md``` catalog for GitHub and render it to ```readme.html``` +Running `tests` from the command line will run all the tests in the `tests` directory and build the `readme.md` catalog for GitHub and render it to `readme.html` for local preview. ## Directory structure | Path | Contents | |:-----|:------| -| ```NopSCADlib``` | Top level scad files, e.g. ```lib.scad``` | -| ```NopSCADlib/doc``` | Documentation like this that is not automatically generated | -| ```NopSCADlib/examples``` | Example projects | -| ```NopSCADlib/gallery``` | Pictures of items that have been made with the library | -| ```NopSCADlib/printed``` | Scad files for making reusable printed parts | -| ```NopSCADlib/scripts``` | Python scripts | -| ```NopSCADlib/tests``` | A stand alone test for each type of vitamin and most of the utilities | -| ```NopSCADlib/utils``` | Utility scad files | -| ```NopSCADlib/utils/core``` | Core utilities used by nearly everything | -| ```NopSCADlib/vitamins``` | Generally a pair of .scad files for each type of vitamin. The plural version contains object definitions to be included and it uses the singular version. | +| `NopSCADlib` | Top level scad files, e.g. `lib.scad` | +| `NopSCADlib/doc` | Documentation like this that is not automatically generated | +| `NopSCADlib/examples` | Example projects | +| `NopSCADlib/gallery` | Pictures of items that have been made with the library | +| `NopSCADlib/printed` | Scad files for making reusable printed parts | +| `NopSCADlib/scripts` | Python scripts | +| `NopSCADlib/tests` | A stand alone test for each type of vitamin and most of the utilities | +| `NopSCADlib/utils` | Utility scad files | +| `NopSCADlib/utils/core` | Core utilities used by nearly everything | +| `NopSCADlib/vitamins` | Generally a pair of .scad files for each type of vitamin. The plural version contains object definitions to be included and it uses the singular version. | ## Making a project Each project has its own directory and that is used to derive the project's name. -There should also be a subdirectory called ```scad``` with a scad file in it that contains the main assembly. +There should also be a subdirectory called `scad` with a scad file in it that contains the main assembly. A skeleton project looks like this: - //! Project description in Markdown format before the first include. @@ -72,30 +72,30 @@ A skeleton project looks like this: - Other scad files can be added to the scad directory and included or used as required. -* Subassemblies can be added in the same format as ```main_assembly()```, i.e. a module called ```something_assembly()```, taking no parameters and calling ```assembly("something")``` +* Subassemblies can be added in the same format as `main_assembly()`, i.e. a module called `something_assembly()`, taking no parameters and calling `assembly("something")` with the rest of its contents passed as children. -It needs to be called directly or indirectly from ```main_assembly()``` to appear in the view and on the BOM. -Assembly instructions should be added directly before the module definition in comments marked with ```//!```. +It needs to be called directly or indirectly from `main_assembly()` to appear in the view and on the BOM. +Assembly instructions should be added directly before the module definition in comments marked with `//!`. -* Any printed parts should be made by a module called ```something_stl()```, taking no parameters and calling ```stl("something")``` so they appear on the BOM when called from -an assembly. Printed parts are usually ```color```ed and ```render```ed at the point they are used in the assembly. +* Any printed parts should be made by a module called `something_stl()`, taking no parameters and calling `stl("something")` so they appear on the BOM when called from +an assembly. Printed parts are usually `color`ed and `render`ed at the point they are used in the assembly. -* Any 2D routed parts should be made by a module called ```something_dxf()```, taking no parameters and calling ```dxf("something")``` so they appear on the BOM when called from an -assembly. They are generally made from a ```sheet_2D()``` with holes subtracted from it. That will also put the sheet material on the BOM. -They are then expanded to 3D using ```render_2D_sheet()``` when they are placed in an assembly. +* Any 2D routed parts should be made by a module called `something_dxf()`, taking no parameters and calling `dxf("something")` so they appear on the BOM when called from an +assembly. They are generally made from a `sheet_2D()` with holes subtracted from it. That will also put the sheet material on the BOM. +They are then expanded to 3D using `render_2D_sheet()` when they are placed in an assembly. -When ```make_all``` is run from the top level directory of the project it will create the following sub-directories and populate them:- +When `make_all` is run from the top level directory of the project it will create the following sub-directories and populate them:- | Directory | Contents | |:----------|:---------| | assemblies | For each assembly: an assembled view and an exploded assembly view, in large and small formats | -| bom | A flat BOM in ```bom.txt``` for the whole project, flat BOMs in text format for each assembly and a hierarchical BOM in JSON format: ```bom.json```.| +| bom | A flat BOM in `bom.txt` for the whole project, flat BOMs in text format for each assembly and a hierarchical BOM in JSON format: `bom.json`.| | deps | Dependency files for each scad file in the project, so that subsequent builds can be incremental | | dxfs | DXF files for all the CNC routed parts in the project and small PNG images of them | | stls | STL files for all the printed parts in the project and small PNG images of them | -It will also make a Markdown assembly manual called ```readme.md``` suitable for GitHub, a version rendered to HTML for viewing locally called ```readme.html``` and a second -HTML version called ```printme.html```. This has page breaks instead of horizontal rules between sections and can be converted to PDF using Chrome to make a stand alone manual. +It will also make a Markdown assembly manual called `readme.md` suitable for GitHub, a version rendered to HTML for viewing locally called `readme.html` and a second +HTML version called `printme.html`. This has page breaks instead of horizontal rules between sections and can be converted to PDF using Chrome to make a stand alone manual. Each time OpenSCAD is run to produce STL files, DXF files or assembly views, the time it takes is recorded and compared with the previous time. At the end the times are printed with the delta from the last run and coloured red or green if they have got significantly faster or slower. @@ -112,7 +112,7 @@ All the vitamins and utilities are included if you include [NopSCADlib/lib.scad] Printed parts are not included and need to be used or included explicitly, their documentation states which files need to be included rather than used. This is the easiest way to use the library and is reasonably efficient because the only files included are the object list definitions, all the functions and modules are used, so -get shared if other files in the project include ```lib.scad``` as well, or if you have multiple projects open in the same instance of OpenSCAD. +get shared if other files in the project include `lib.scad` as well, or if you have multiple projects open in the same instance of OpenSCAD. One downside is that any change to the library will mean all the project files need regenerating. A more optimised approach for large projects is to include [NopSCADlib/core.scad](../core.scad) instead. @@ -123,17 +123,17 @@ Any other vitamins used need to be included explicitly. One can copy the include Modules that generate parts and assemblies need to take no parameters so that they can be called from the framework to make the STL files and assembly views, etc. Sometimes parts or asemblies need to be parametric, for example fan guards take the fan as a parameter. -To work around this the ```fan_guard()``` module calls the ```stl()``` module with a variable name which has a suffix of the fan width, e.g. "fan_guard_60". +To work around this the `fan_guard()` module calls the `stl()` module with a variable name which has a suffix of the fan width, e.g. "fan_guard_60". This ensures that if there are different sized fans in the same project the STL files have unique names. -It is then up to the user to add a wrapper to their project called ```fan_guard_60_stl()``` that calls ```fan_guard()``` with a 60mm fan: - +It is then up to the user to add a wrapper to their project called `fan_guard_60_stl()` that calls `fan_guard()` with a 60mm fan: - module fan_guard_60_stl() fan_guard(fan60x15); -Calling ```fan_guard(fan60x15)``` draws a fan guard for a 60mm fan and puts ```fan_guard_60.stl``` on the BOM. The framework then looks for a module ```fan_guard_60_stl()``` to +Calling `fan_guard(fan60x15)` draws a fan guard for a 60mm fan and puts `fan_guard_60.stl` on the BOM. The framework then looks for a module `fan_guard_60_stl()` to generate it. This is OK if the fan will always be 60mm but what if the project is parametric and the fan size can vary? -To cater for that ```fan_guard()``` can be passed a ```name``` parameter to name the STL. +To cater for that `fan_guard()` can be passed a `name` parameter to name the STL. For example a 3D printer might have a bed cooling fan and different sized machines might have different size fans. bed_fan = fan80x38; @@ -144,7 +144,7 @@ In this case the STL file has a constant name related to its use, regardless of ### Assembly boundaries -The ```assembly()``` module is used to mark assemblies that correspond to a step of construction. +The `assembly()` module is used to mark assemblies that correspond to a step of construction. Each assembly named in this way gets a page in the build manual with a list of the parts and sub-assemblies that it uses, an exploded view, some build instructions and then the assembled view. This doesn't always correspond with how one would want to structure the code. @@ -182,26 +182,26 @@ This is achieved by having a pair of modules: - screw_and_washer(screw, screw_length, true); } -Notice how the first module ```handle_assembly()``` uses ```assembly()``` and has a build instruction. It isn't used directly in a project though, ```handle_fastened_assembly()``` is +Notice how the first module `handle_assembly()` uses `assembly()` and has a build instruction. It isn't used directly in a project though, `handle_fastened_assembly()` is what is actually called from the parent assembly. -Because it doesn't have a call to ```assembly()```, the fasteners are added to the parent but the STL and the inserts become a sub-assembly. +Because it doesn't have a call to `assembly()`, the fasteners are added to the parent but the STL and the inserts become a sub-assembly. When the parent assembly is shown exploded the handle's screws will be exploded but the inserts won't. They only explode when the sub-assembly is shown exloded. -Note also the ```pose([225, 0, 150], [0, 0, 14])``` call before the ```assembly()``` call. This allows the sub-assembly to be posed differently in its build step but doesn't +Note also the `pose([225, 0, 150], [0, 0, 14])` call before the `assembly()` call. This allows the sub-assembly to be posed differently in its build step but doesn't affect its orientation in the parent assembly. The pose parameters are the rotation and the translation taken from the GUI. ### Exploded diagrams -A lot of vitamins explode themselves when ```$explode=1```. This is done with module ```explode()``` that can be passed a Z offset, or a 3D vector that gives the displacement +A lot of vitamins explode themselves when `$explode=1`. This is done with module `explode()` that can be passed a Z offset, or a 3D vector that gives the displacement and it draws a line from the origial position to the exploded position. The line can be offset from the origin of the component by specifying an offset vector. -Often user assemblies need to add ```explode()``` in various places to explode printed parts, for example. +Often user assemblies need to add `explode()` in various places to explode printed parts, for example. ### Creating vitamins Most vitamins are parametric and use a named list of properties to describe them is a pseudo OO style. -These lists are passed to every function or module related to the vitamin as the first parameter called ```type```. +These lists are passed to every function or module related to the vitamin as the first parameter called `type`. They need to be included in the user code, so that the list names are visible. The functions and modules however only need to be used, not included. This leads to a pair of files for each vitamin. One with a plural name that defines the objects and then uses the file with a singular name @@ -216,50 +216,50 @@ These functions take a particular form, so they can be scraped out and added to function spring_od(type) = type[1]; //! Outside diameter -Other functions and modules with ```//!``` comments will be added to the documentation as functions and modules. +Other functions and modules with `//!` comments will be added to the documentation as functions and modules. Functions and modules without these special comments are considered private and do not appear in the documentation. -A vitamin announces itself to the BOM by calling the ```vitamin()``` module with a string description composed of two parts separated by a colon. +A vitamin announces itself to the BOM by calling the `vitamin()` module with a string description composed of two parts separated by a colon. The first part is a string representation of the module instantiation. This is used in the documentation to show how to instantiate every part available. -To facilitate this the first element in the type list is the name of the list as a string and is simply accessed as ```type[0]```. +To facilitate this the first element in the type list is the name of the list as a string and is simply accessed as `type[0]`. The part of the description after the colon is free format text that appears on the BOM. Since vitamins are listed alphabetically starting the description with the broad category of the part and leaving the more refined description to the end generates tidier parts lists. -For example ```Screw M3 pan x 30mm``` ensures all the screws appear together and are ordered by their diameter before length, although ```M3 x 30mm pan screw``` would be +For example `Screw M3 pan x 30mm` ensures all the screws appear together and are ordered by their diameter before length, although `M3 x 30mm pan screw` would be more natural. Vitamins are only ever previewed, so they are optimised to draw quickly in F5 and don't need to worry about being manifold. In OpenCSG 3D difference and intersection are relatively slow and the negative volumes interfere with nearby objects when they are composed into assemblies. For this reason as much -as possible is done by unioning primitives and extruded 2D shapes. Any 3D differences or intersections are wrapped in ```render()``` so that CGAL will compute a polyhedron +as possible is done by unioning primitives and extruded 2D shapes. Any 3D differences or intersections are wrapped in `render()` so that CGAL will compute a polyhedron that is cached and reused. This will be very slow the first time it renders but very fast afterwards. ### Panels and Platters -The ```stls``` and ```dxfs``` scripts produce a file for each part but often it is desirable to print or route collections of parts laid out together. -This can be done by adding scad files to folders called ```platters``` for STL files and ```panels``` for DXF files. -These can aggregate and lay out parts by including ```NopSCADlib/core.scad``` and using modules ```use_stl(name)``` and ```use_dxf(name)```. +The `stls` and `dxfs` scripts produce a file for each part but often it is desirable to print or route collections of parts laid out together. +This can be done by adding scad files to folders called `platters` for STL files and `panels` for DXF files. +These can aggregate and lay out parts by including `NopSCADlib/core.scad` and using modules `use_stl(name)` and `use_dxf(name)`. These modules import the already generated singular STL and DXF files, so they are relatively fast. The name does not include the suffix. The scad files typically also need to include other files from the project to get the dimensions of the parts to calculate their positions. -The composite part files have the same name as the scad file that generates them, with the suffix changed to ```.stl``` or ```.dxf```. +The composite part files have the same name as the scad file that generates them, with the suffix changed to `.stl` or `.dxf`. -The generated files are placed in ```stls/printed``` and ```dxfs/routed```. -Any parts that are not covered by the platters / panels are copied into the ```printed``` / ```routed``` directories, so that they contain everything to be made. +The generated files are placed in `stls/printed` and `dxfs/routed`. +Any parts that are not covered by the platters / panels are copied into the `printed` / `routed` directories, so that they contain everything to be made. ### Multiple configurations Some parametric designs might have several configurations, for example a 3D printer with different size options. If several configurations need to be supported at the same time multiple sets of BOMS, STLS and DXFs need to be generated in separate diectories. NopSCADlib supports this by having multiple configuration files named -```config_.scad```. All the scripts take an optional first parameter that selects one of these config files by specifying ```target_name```. +`config_.scad`. All the scripts take an optional first parameter that selects one of these config files by specifying `target_name`. -The target config file is selected by generating ```target.scad``` that includes ```config_.scad```. -The rest of the project includes ```target.scad``` to use the configuration. -Additionally all the generated file directories (assemblies, bom, stls, dxfs, etc.) are placed in a sub-directory called ``````. +The target config file is selected by generating `target.scad` that includes `config_.scad`. +The rest of the project includes `target.scad` to use the configuration. +Additionally all the generated file directories (assemblies, bom, stls, dxfs, etc.) are placed in a sub-directory called ``. ### Other libraries The build scripts need to be able to locate the source files where the modules to generate the STL files and assemblies reside. They will search all the scad files -in the project plus any ```printed``` directories outside the project. This covers the printed parts in NopSCADlib but also allows other libraries of printed parts. +in the project plus any `printed` directories outside the project. This covers the printed parts in NopSCADlib but also allows other libraries of printed parts. Other libraries of vitamins and utilities can be used provided they follow the same convensions of NopSCADlib. The build scripts don't need to search those. diff --git a/printed/box_assembly.scad b/printed/box_assembly.scad index 040451d..721da34 100644 --- a/printed/box_assembly.scad +++ b/printed/box_assembly.scad @@ -18,7 +18,7 @@ // // -// The assembly is ```include```d so the panel definitions can be overridden to add holes and components. +// The assembly is `include`d so the panel definitions can be overridden to add holes and components. // The _box_module also needs to be wrapped in the file that uses it so it can be called without // parameters to make the assembly views. E.g. module box_assembly() _box_assembly(box); // diff --git a/printed/butt_box.scad b/printed/butt_box.scad index b2fb650..8096bb3 100644 --- a/printed/butt_box.scad +++ b/printed/butt_box.scad @@ -21,7 +21,7 @@ //! A box made from CNC cut panels butted together using printed fixing blocks. Useful for making large //! boxes with minimal 3D printing. More blocks are added as the box gets bigger. //! -//! Needs to be ```include```d rather than ```use```d to allow the panel definitions to be overridden to add holes +//! Needs to be `include`d rather than `use`d to allow the panel definitions to be overridden to add holes //! and mounted components. //! //! A list specifies the internal dimensions, screw type, top, bottom and side sheet types and the block diff --git a/printed/corner_block.scad b/printed/corner_block.scad index b5f1ea8..9c8f777 100644 --- a/printed/corner_block.scad +++ b/printed/corner_block.scad @@ -25,10 +25,10 @@ //! //! Note that the block with its inserts is defined as a sub assembly, but its fasteners get added to the parent assembly. //! -//! Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting ```show_block``` to false. +//! Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting `show_block` to false. //! This allows the block and one set of fasteners to be on one assembly and the other fasteners on the mating assemblies. //! -//! Star washers can be omitted by setting ```star_washers``` to false. +//! Star washers can be omitted by setting `star_washers` to false. // include <../core.scad> use <../vitamins/insert.scad> diff --git a/printed/drag_chain.scad b/printed/drag_chain.scad index 09b8747..6198135 100644 --- a/printed/drag_chain.scad +++ b/printed/drag_chain.scad @@ -27,7 +27,7 @@ //! The ends can have screw lugs with four screw positions to choose from, specified by a list of two arrays of four bools. //! If none are enabled then a child object is expected to customise the end and this gets unioned with the blank end. //! If both ends are customised then two children are expected. -//! Each child is called twice, once with ```$fasteners``` set to 0 to augment the STL and again with ```$fasteners``` set to 1 to add +//! Each child is called twice, once with `$fasteners` set to 0 to augment the STL and again with `$fasteners` set to 1 to add //! to the assembly, for example to add inserts. // diff --git a/printed/fan_guard.scad b/printed/fan_guard.scad index 7a8857d..46ff114 100644 --- a/printed/fan_guard.scad +++ b/printed/fan_guard.scad @@ -17,7 +17,7 @@ // If not, see . // -//! Pintable fan finger guard to match the specified fan. To be ```include```d, not ```use```d. +//! Pintable fan finger guard to match the specified fan. To be `include`d, not `use`d. //! //! The ring spacing as well as the number of spokes can be specified, if zero a gasket is generated instead of a guard. // diff --git a/printed/fixing_block.scad b/printed/fixing_block.scad index 4e64fb9..78c2db4 100644 --- a/printed/fixing_block.scad +++ b/printed/fixing_block.scad @@ -25,10 +25,10 @@ //! //! Note that the block with its inserts is defined as a sub assembly, but its fasteners get added to the parent assembly. //! -//! Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting ```show_block``` to false. +//! Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting `show_block` to false. //! This allows the block and one set of fasteners to be on one assembly and the other fasteners on the mating assemblies. //! -//! Star washers can be omitted by setting ```star_washers``` to false. +//! Star washers can be omitted by setting `star_washers` to false. // include <../core.scad> use <../vitamins/insert.scad> diff --git a/printed/flat_hinge.scad b/printed/flat_hinge.scad index dfb4047..19d8c06 100644 --- a/printed/flat_hinge.scad +++ b/printed/flat_hinge.scad @@ -25,8 +25,8 @@ //! //! Opening the test in OpenSCAD with its customiser enabled allows these parameters to be played with. //! -//! Note setting ```thickness1``` or ```thickness2``` to zero in the ```hinge_fastened_assembly()``` removes the screws from one side or the other and -//! setting ```show_hinge``` to false removes the hinge. +//! Note setting `thickness1` or `thickness2` to zero in the `hinge_fastened_assembly()` removes the screws from one side or the other and +//! setting `show_hinge` to false removes the hinge. //! This allows the hinges and one set of screws to belong to one assembly and the other set of screws to another assembly. // include <../core.scad> diff --git a/readme.md b/readme.md index 3375725..b0376bf 100644 --- a/readme.md +++ b/readme.md @@ -62,33 +62,33 @@ Axial components for PCBs. ### Properties | Function | Description | |:--- |:--- | -| ```ax_res_colour(type)``` | Body colour | -| ```ax_res_diameter(type)``` | Body diameter | -| ```ax_res_end_d(type)``` | End cap diameter | -| ```ax_res_end_l(type)``` | End cap length | -| ```ax_res_length(type)``` | Body length | -| ```ax_res_wattage(type)``` | Power rating | -| ```ax_res_wire(type)``` | Wire diameter | +| `ax_res_colour(type)` | Body colour | +| `ax_res_diameter(type)` | Body diameter | +| `ax_res_end_d(type)` | End cap diameter | +| `ax_res_end_l(type)` | End cap length | +| `ax_res_length(type)` | Body length | +| `ax_res_wattage(type)` | Power rating | +| `ax_res_wire(type)` | Wire diameter | ### Modules | Module | Description | |:--- |:--- | -| ```ax_res(type, value, tol = 5, pitch = 0)``` | Through hole axial resistor. If ```pitch``` is zero the minimum is used. If below the minimum the resistor is placed vertical. | -| ```wire_link(d, l, h = 1, tail = 3)``` | Draw a wire jumper link. | +| `ax_res(type, value, tol = 5, pitch = 0)` | Through hole axial resistor. If `pitch` is zero the minimum is used. If below the minimum the resistor is placed vertical. | +| `wire_link(d, l, h = 1, tail = 3)` | Draw a wire jumper link. | ![axials](tests/png/axials.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```pcb(PERF60x40)``` | Perfboard 60 x 40mm | -| 1 | ```ax_res(res1_8, 1000)``` | Resistor 1000 Ohms 5% 0.125W | -| 1 | ```ax_res(res1_8, 2200, tol = 1)``` | Resistor 2200 Ohms 1% 0.125W | -| 1 | ```ax_res(res1_4, 39000, tol = 1)``` | Resistor 39000 Ohms 1% 0.25W | -| 1 | ```ax_res(res1_4, 47000)``` | Resistor 47000 Ohms 5% 0.25W | -| 1 | ```ax_res(res1_2, 8200)``` | Resistor 8200 Ohms 5% 0.5W | -| 1 | ```ax_res(res1_2, 8250, tol = 1)``` | Resistor 8250 Ohms 1% 0.5W | -| 1 | ```wire_link(0.8, 10.16)``` | Wire link 0.8mm x 0.4" | +| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm | +| 1 | `ax_res(res1_8, 1000)` | Resistor 1000 Ohms 5% 0.125W | +| 1 | `ax_res(res1_8, 2200, tol = 1)` | Resistor 2200 Ohms 1% 0.125W | +| 1 | `ax_res(res1_4, 39000, tol = 1)` | Resistor 39000 Ohms 1% 0.25W | +| 1 | `ax_res(res1_4, 47000)` | Resistor 47000 Ohms 5% 0.25W | +| 1 | `ax_res(res1_2, 8200)` | Resistor 8200 Ohms 5% 0.5W | +| 1 | `ax_res(res1_2, 8250, tol = 1)` | Resistor 8250 Ohms 1% 0.5W | +| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" | Top @@ -113,32 +113,32 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry. ### Properties | Function | Description | |:--- |:--- | -| ```bb_bore(type)``` | Internal diameter | -| ```bb_colour(type)``` | Shield colour, "silver" for metal | -| ```bb_diameter(type)``` | External diameter | -| ```bb_hub(type)``` | Inner rim thickness guesstimate | -| ```bb_name(type)``` | Part code without shield type suffix | -| ```bb_rim(type)``` | Outer rim thickness guesstimate | -| ```bb_width(type)``` | Width | +| `bb_bore(type)` | Internal diameter | +| `bb_colour(type)` | Shield colour, "silver" for metal | +| `bb_diameter(type)` | External diameter | +| `bb_hub(type)` | Inner rim thickness guesstimate | +| `bb_name(type)` | Part code without shield type suffix | +| `bb_rim(type)` | Outer rim thickness guesstimate | +| `bb_width(type)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```ball_bearing(type)``` | Draw a ball bearing | -| ```bearing_ball(dia)``` | Draw a steel bearing ball | +| `ball_bearing(type)` | Draw a ball bearing | +| `bearing_ball(dia)` | Draw a steel bearing ball | ![ball_bearings](tests/png/ball_bearings.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```ball_bearing(BB608)``` | Ball bearing 608-2RS 8mm x 22mm x 7mm | -| 1 | ```ball_bearing(BB6200)``` | Ball bearing 6200-2RS 10mm x 30mm x 9mm | -| 1 | ```ball_bearing(BB6201)``` | Ball bearing 6201-2RS 12mm x 32mm x 10mm | -| 1 | ```ball_bearing(BB624)``` | Ball bearing 624-2RS 4mm x 13mm x 5mm | -| 1 | ```ball_bearing(BB6808)``` | Ball bearing 6808-2RS 40mm x 52mm x 7mm | -| 1 | ```ball_bearing(BBSMR95)``` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm | -| 6 | ``` bearing_ball(3)``` | Steel ball 3mm | +| 1 | `ball_bearing(BB608)` | Ball bearing 608-2RS 8mm x 22mm x 7mm | +| 1 | `ball_bearing(BB6200)` | Ball bearing 6200-2RS 10mm x 30mm x 9mm | +| 1 | `ball_bearing(BB6201)` | Ball bearing 6201-2RS 12mm x 32mm x 10mm | +| 1 | `ball_bearing(BB624)` | Ball bearing 624-2RS 4mm x 13mm x 5mm | +| 1 | `ball_bearing(BB6808)` | Ball bearing 6808-2RS 40mm x 52mm x 7mm | +| 1 | `ball_bearing(BBSMR95)` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm | +| 6 | ` bearing_ball(3)` | Steel ball 3mm | Top @@ -163,43 +163,43 @@ exposing enough information to make a battery box. ### Properties | Function | Description | |:--- |:--- | -| ```battery_colour(type)``` | Casing colour | -| ```battery_contact(type)``` | Contact type | -| ```battery_diameter(type)``` | Casing diameter | -| ```battery_led_positions(type)``` | LED positions for Lumintop | -| ```battery_length(type)``` | Total length including terminals | -| ```battery_neg_dia(type)``` | Negative terminal diameter | -| ```battery_pos_dia(type)``` | Positive terminal diameter | -| ```battery_pos_height(type)``` | Positive terminal height above the casing | -| ```battery_usb_offset(type)``` | USB connector offset from the top | -| ```contact_height(type)``` | Height of the flat part | -| ```contact_neg(type)``` | Negative spring height above the plate when compressed and the spring type | -| ```contact_pos(type)``` | Positive contact dimple height and top and bottom internal diameter | -| ```contact_tab_length(type)``` | Length of the tab | -| ```contact_tab_width(type)``` | Width of the tab | -| ```contact_thickness(type)``` | Thickness of the metal | -| ```contact_width(type)``` | Width of the flat part | +| `battery_colour(type)` | Casing colour | +| `battery_contact(type)` | Contact type | +| `battery_diameter(type)` | Casing diameter | +| `battery_led_positions(type)` | LED positions for Lumintop | +| `battery_length(type)` | Total length including terminals | +| `battery_neg_dia(type)` | Negative terminal diameter | +| `battery_pos_dia(type)` | Positive terminal diameter | +| `battery_pos_height(type)` | Positive terminal height above the casing | +| `battery_usb_offset(type)` | USB connector offset from the top | +| `contact_height(type)` | Height of the flat part | +| `contact_neg(type)` | Negative spring height above the plate when compressed and the spring type | +| `contact_pos(type)` | Positive contact dimple height and top and bottom internal diameter | +| `contact_tab_length(type)` | Length of the tab | +| `contact_tab_width(type)` | Width of the tab | +| `contact_thickness(type)` | Thickness of the metal | +| `contact_width(type)` | Width of the flat part | ### Modules | Module | Description | |:--- |:--- | -| ```battery(type)``` | Draw a battery | -| ```battery_contact(type, pos = true)``` | Draw a positive or negative battery contact for specified battery | -| ```battery_led_positions(type)``` | Position of the LEDs on a Lumintop | +| `battery(type)` | Draw a battery | +| `battery_contact(type, pos = true)` | Draw a positive or negative battery contact for specified battery | +| `battery_led_positions(type)` | Position of the LEDs on a Lumintop | ![batteries](tests/png/batteries.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 6 | ```battery_contact(bcontact, false)``` | Battery negative contact | -| 6 | ```battery_contact(bcontact, true)``` | Battery positive contact | -| 1 | ```battery(AACELL)``` | Cell AA | -| 1 | ```battery(AAACELL)``` | Cell AAA | -| 1 | ```battery(CCELL)``` | Cell C | -| 1 | ```battery(DCELL)``` | Cell D | -| 1 | ```battery(LUMINTOP)``` | Cell LUMINTOP 18650 LION with charger | -| 1 | ```battery(S25R18650)``` | Cell Samsung 25R 18650 LION | +| 6 | `battery_contact(bcontact, false)` | Battery negative contact | +| 6 | `battery_contact(bcontact, true)` | Battery positive contact | +| 1 | `battery(AACELL)` | Cell AA | +| 1 | `battery(AAACELL)` | Cell AAA | +| 1 | `battery(CCELL)` | Cell C | +| 1 | `battery(DCELL)` | Cell D | +| 1 | `battery(LUMINTOP)` | Cell LUMINTOP 18650 LION with charger | +| 1 | `battery(S25R18650)` | Cell Samsung 25R 18650 LION | Top @@ -213,7 +213,7 @@ Only models 2D paths, so not crossed belt core XY! To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius. By default the path is a closed loop but a gap length and position can be specified to make open loops. -To draw the gap its XY position is specified by ```gap_pos```. ```gap_pos.z``` can be used to specify a rotation if the gap is not at the bottom of the loop. +To draw the gap its XY position is specified by `gap_pos`. `gap_pos.z` can be used to specify a rotation if the gap is not at the bottom of the loop. Individual teeth are not drawn, instead they are represented by a lighter colour. @@ -227,40 +227,40 @@ Individual teeth are not drawn, instead they are represented by a lighter colour ### Properties | Function | Description | |:--- |:--- | -| ```belt_pitch(type)``` | Pitch in mm | -| ```belt_pitch_height(type)``` | Offset of the pitch radius from the tips of the teeth | -| ```belt_thickness(type)``` | Total thickness including teeth | -| ```belt_tooth_height(type)``` | Tooth height | -| ```belt_width(type)``` | Width in mm | +| `belt_pitch(type)` | Pitch in mm | +| `belt_pitch_height(type)` | Offset of the pitch radius from the tips of the teeth | +| `belt_thickness(type)` | Total thickness including teeth | +| `belt_tooth_height(type)` | Tooth height | +| `belt_width(type)` | Width in mm | ### Functions | Function | Description | |:--- |:--- | -| ```belt_length(points, gap = 0)``` | Compute belt length given path and optional gap | -| ```belt_pitch_to_back(type)``` | Offset of the back from the pitch radius | +| `belt_length(points, gap = 0)` | Compute belt length given path and optional gap | +| `belt_pitch_to_back(type)` | Offset of the back from the pitch radius | ### Modules | Module | Description | |:--- |:--- | -| ```belt(type, points, gap = 0, gap_pos = undef, belt_colour = grey(20)``` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified | +| `belt(type, points, gap = 0, gap_pos = undef, belt_colour = grey(20)` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified | ![belts](tests/png/belts.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```belt(GT2x6, [ ... ])``` | Belt GT2 x 6mm x 128mm | -| 2 | ```belt(GT2x6, [ ... ], 80, [0, 0])``` | Belt GT2 x 6mm x 572mm | -| 1 | ```belt(T2p5x6, [ ... ])``` | Belt T2.5 x 6mm x 130mm | -| 1 | ```belt(T5x10, [ ... ])``` | Belt T5 x 10mm x 130mm | -| 1 | ```belt(T5x6, [ ... ])``` | Belt T5 x 6mm x 130mm | -| 2 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 2 | ```pulley(GT2x16_toothed_idler)``` | Pulley GT2 idler 16 teeth | -| 4 | ```pulley(GT2x20_toothed_idler)``` | Pulley GT2 idler 20 teeth | -| 2 | ```pulley(GT2x16_plain_idler)``` | Pulley GT2 idler smooth 9.63mm | -| 2 | ```pulley(GT2x20ob_pulley)``` | Pulley GT2OB 20 teeth | -| 2 | ```screw(M3_cs_cap_screw, 20)``` | Screw M3 cs cap x 20mm | -| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm | +| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 128mm | +| 2 | `belt(GT2x6, [ ... ], 80, [0, 0])` | Belt GT2 x 6mm x 572mm | +| 1 | `belt(T2p5x6, [ ... ])` | Belt T2.5 x 6mm x 130mm | +| 1 | `belt(T5x10, [ ... ])` | Belt T5 x 10mm x 130mm | +| 1 | `belt(T5x6, [ ... ])` | Belt T5 x 6mm x 130mm | +| 2 | `insert(F1BM3)` | Heatfit insert M3 | +| 2 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth | +| 4 | `pulley(GT2x20_toothed_idler)` | Pulley GT2 idler 20 teeth | +| 2 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm | +| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth | +| 2 | `screw(M3_cs_cap_screw, 20)` | Screw M3 cs cap x 20mm | +| 4 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm | Top @@ -280,49 +280,49 @@ Models of radial blowers. ### Properties | Function | Description | |:--- |:--- | -| ```blower_axis(type)``` | XY coordinates of the axle | -| ```blower_base(type)``` | Thickness of the base | -| ```blower_bore(type)``` | The air intake hole diameter | -| ```blower_depth(type)``` | Height | -| ```blower_exit(type)``` | The width of the exit port | -| ```blower_hub(type)``` | Rotor hub diameter | -| ```blower_hub_height(type)``` | Height of the rotor | -| ```blower_length(type)``` | Length of enclosing rectangle | -| ```blower_lug(type)``` | Height of the lugs | -| ```blower_screw(type)``` | The type of screws needed | -| ```blower_screw_hole(type)``` | Screw hole diameter | -| ```blower_screw_holes(type)``` | List of XY coordinates of the screw holes | -| ```blower_top(type)``` | Thickness of the top | -| ```blower_wall(type)``` | Side wall thickness | -| ```blower_width(type)``` | Width of enclosing rectangle | +| `blower_axis(type)` | XY coordinates of the axle | +| `blower_base(type)` | Thickness of the base | +| `blower_bore(type)` | The air intake hole diameter | +| `blower_depth(type)` | Height | +| `blower_exit(type)` | The width of the exit port | +| `blower_hub(type)` | Rotor hub diameter | +| `blower_hub_height(type)` | Height of the rotor | +| `blower_length(type)` | Length of enclosing rectangle | +| `blower_lug(type)` | Height of the lugs | +| `blower_screw(type)` | The type of screws needed | +| `blower_screw_hole(type)` | Screw hole diameter | +| `blower_screw_holes(type)` | List of XY coordinates of the screw holes | +| `blower_top(type)` | Thickness of the top | +| `blower_wall(type)` | Side wall thickness | +| `blower_width(type)` | Width of enclosing rectangle | ### Functions | Function | Description | |:--- |:--- | -| ```blower_casing_is_square(type)``` | True for square radial fans, false for spiral shape radial blowers | -| ```blower_exit_offset(type)``` | Offset of exit's centre from the edge | +| `blower_casing_is_square(type)` | True for square radial fans, false for spiral shape radial blowers | +| `blower_exit_offset(type)` | Offset of exit's centre from the edge | ### Modules | Module | Description | |:--- |:--- | -| ```blower(type)``` | Draw specified blower | -| ```blower_hole_positions(type)``` | Translate children to screw hole positions | -| ```blower_square(type)``` | Draw a square blower | +| `blower(type)` | Draw specified blower | +| `blower_hole_positions(type)` | Translate children to screw hole positions | +| `blower_square(type)` | Draw a square blower | ![blowers](tests/png/blowers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 | -| 1 | ```blower(RB5015)``` | Blower Runda RB5015 | -| 4 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm | -| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm | -| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm | -| 1 | ```blower(BL40x10)``` | Square radial 4010 | -| 4 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `blower(PE4020)` | Blower Pengda Technology 4020 | +| 1 | `blower(RB5015)` | Blower Runda RB5015 | +| 4 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm | +| 3 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm | +| 2 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm | +| 1 | `blower(BL40x10)` | Square radial 4010 | +| 4 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 3 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 2 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -344,26 +344,26 @@ better. ### Properties | Function | Description | |:--- |:--- | -| ```bulldog_depth(type)``` | Depth from the back to the front of the tubes | -| ```bulldog_handle_length(type)``` | Length that the handle protrudes from the back | -| ```bulldog_height(type)``` | Height at the back | -| ```bulldog_length(type)``` | Length along the profile | -| ```bulldog_radius(type)``` | Outside radius of the back corners | -| ```bulldog_thickness(type)``` | Thickness of the metal | -| ```bulldog_tube(type)``` | Outside diameter of the tubes | +| `bulldog_depth(type)` | Depth from the back to the front of the tubes | +| `bulldog_handle_length(type)` | Length that the handle protrudes from the back | +| `bulldog_height(type)` | Height at the back | +| `bulldog_length(type)` | Length along the profile | +| `bulldog_radius(type)` | Outside radius of the back corners | +| `bulldog_thickness(type)` | Thickness of the metal | +| `bulldog_tube(type)` | Outside diameter of the tubes | ### Modules | Module | Description | |:--- |:--- | -| ```bulldog(type, open = 4)``` | Draw bulldog clip open by specified amount | +| `bulldog(type, open = 4)` | Draw bulldog clip open by specified amount | ![bulldogs](tests/png/bulldogs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```bulldog(small_bulldog)``` | Bulldog clip 19mm | -| 1 | ```bulldog(large_bulldog)``` | Bulldog clip 25mm | +| 1 | `bulldog(small_bulldog)` | Bulldog clip 19mm | +| 1 | `bulldog(large_bulldog)` | Bulldog clip 25mm | Top @@ -383,31 +383,31 @@ PCB mounted buttons. Can optionally have a coloured cap ### Properties | Function | Description | |:--- |:--- | -| ```square_button_cap_d(type)``` | Diameter of the body of the cap | -| ```square_button_cap_flange_d(type)``` | Diameter of the flange of the cap | -| ```square_button_cap_flange_h(type)``` | Height of the cap flange | -| ```square_button_cap_h(type)``` | Height of the cap including the stem | -| ```square_button_cap_stem(type)``` | Length of the cap stem | -| ```square_button_d(type)``` | Button diameter | -| ```square_button_h(type)``` | Height of the button above the PCB | -| ```square_button_height(type)``` | Height of the base | -| ```square_button_rivit(type)``` | Size of the corner rivets | -| ```square_button_wall(type)``` | Offset of the metal part | -| ```square_button_width(type)``` | Width and depth of the base | +| `square_button_cap_d(type)` | Diameter of the body of the cap | +| `square_button_cap_flange_d(type)` | Diameter of the flange of the cap | +| `square_button_cap_flange_h(type)` | Height of the cap flange | +| `square_button_cap_h(type)` | Height of the cap including the stem | +| `square_button_cap_stem(type)` | Length of the cap stem | +| `square_button_d(type)` | Button diameter | +| `square_button_h(type)` | Height of the button above the PCB | +| `square_button_height(type)` | Height of the base | +| `square_button_rivit(type)` | Size of the corner rivets | +| `square_button_wall(type)` | Offset of the metal part | +| `square_button_width(type)` | Width and depth of the base | ### Modules | Module | Description | |:--- |:--- | -| ```square_button(type, colour = "yellow")``` | Draw square button with specified cap colour if it has a cap | +| `square_button(type, colour = "yellow")` | Draw square button with specified cap colour if it has a cap | ![buttons](tests/png/buttons.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```square_button(button_12mm, "yellow")``` | Square button 12mm with yellow cap | -| 1 | ```square_button(button_4p5mm)``` | Square button 4.5mm | -| 1 | ```square_button(button_6mm)``` | Square button 6mm | +| 1 | `square_button(button_12mm, "yellow")` | Square button 12mm with yellow cap | +| 1 | `square_button(button_4p5mm)` | Square button 4.5mm | +| 1 | `square_button(button_6mm)` | Square button 6mm | Top @@ -430,22 +430,22 @@ When the sides are constrained then a circular model is more accurate. ### Functions | Function | Description | |:--- |:--- | -| ```bezier_cable_length(depth, min_z, pos)``` | Calculate a length that will achieve the desired minimum z | -| ```cable_strip_length(depth, travel, extra = 15)``` | Calculate circular cable strip length | +| `bezier_cable_length(depth, min_z, pos)` | Calculate a length that will achieve the desired minimum z | +| `cable_strip_length(depth, travel, extra = 15)` | Calculate circular cable strip length | ### Modules | Module | Description | |:--- |:--- | -| ```bezier_cable_strip(ways, depth, length, below, extra, pos = 0)``` | Draw a cable strip using a Bezier curve | -| ```cable_strip(ways, depth, travel, extra = 15, pos = 0)``` | Draw a cable stripe with a semi circular fold | +| `bezier_cable_strip(ways, depth, length, below, extra, pos = 0)` | Draw a cable strip using a Bezier curve | +| `cable_strip(ways, depth, travel, extra = 15, pos = 0)` | Draw a cable stripe with a semi circular fold | ![cable_strips](tests/png/cable_strips.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 3 | ```bezier_cable_strip(20, 50, 150, 100, 10)``` | Polypropylene strip 170mm x 26mm x 0.8mm | -| 3 | ```cable_strip(20, 25, 100, 30)``` | Polypropylene strip 189mm x 24mm x 0.8mm | +| 3 | `bezier_cable_strip(20, 50, 150, 100, 10)` | Polypropylene strip 170mm x 26mm x 0.8mm | +| 3 | `cable_strip(20, 25, 100, 30)` | Polypropylene strip 189mm x 24mm x 0.8mm | Top @@ -465,26 +465,26 @@ PCB cameras. ### Properties | Function | Description | |:--- |:--- | -| ```camera_connector_pos(type)``` | The flex connector block for the camera itself's position | -| ```camera_connector_size(type)``` | The flex connector block for the camera itself's size | -| ```camera_lens(type)``` | Stack of lens parts, can be round, rectanular or rounded rectangular, with optional tapered aperture | -| ```camera_lens_offset(type)``` | Offset of the lens center from the PCB centre | -| ```camera_pcb(type)``` | The PCB part of the camera | +| `camera_connector_pos(type)` | The flex connector block for the camera itself's position | +| `camera_connector_size(type)` | The flex connector block for the camera itself's size | +| `camera_lens(type)` | Stack of lens parts, can be round, rectanular or rounded rectangular, with optional tapered aperture | +| `camera_lens_offset(type)` | Offset of the lens center from the PCB centre | +| `camera_pcb(type)` | The PCB part of the camera | ### Modules | Module | Description | |:--- |:--- | -| ```camera(type, show_lens = true)``` | Draw specified PCB camera | -| ```camera_lens(type, offset = 0, show_lens = true)``` | Draw the lens stack, with optional offset for making a clearance hole | +| `camera(type, show_lens = true)` | Draw specified PCB camera | +| `camera_lens(type, offset = 0, show_lens = true)` | Draw the lens stack, with optional offset for making a clearance hole | ![cameras](tests/png/cameras.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```camera(rpi_camera_v1)``` | Raspberry Pi camera V1 | -| 1 | ```camera(rpi_camera_v2)``` | Raspberry Pi camera V2 | -| 1 | ```camera(rpi_camera)``` | Raspberry Pi focusable camera | +| 1 | `camera(rpi_camera_v1)` | Raspberry Pi camera V1 | +| 1 | `camera(rpi_camera_v2)` | Raspberry Pi camera V2 | +| 1 | `camera(rpi_camera)` | Raspberry Pi focusable camera | Top @@ -504,29 +504,29 @@ Circlips aka tapered retaining rings. ### Properties | Function | Description | |:--- |:--- | -| ```circlip_a(type)``` | Size of the lugs | -| ```circlip_b(type)``` | Widest part of the taper | -| ```circlip_d1(type)``` | Nominal OD, i.e. diameter of tube | -| ```circlip_d2(type)``` | Groove diameter, i.e. OD when installed | -| ```circlip_d3(type)``` | Relaxed OD when not installed | -| ```circlip_d5(type)``` | Plier hole diameter | -| ```circlip_thickness(type)``` | Thickness | +| `circlip_a(type)` | Size of the lugs | +| `circlip_b(type)` | Widest part of the taper | +| `circlip_d1(type)` | Nominal OD, i.e. diameter of tube | +| `circlip_d2(type)` | Groove diameter, i.e. OD when installed | +| `circlip_d3(type)` | Relaxed OD when not installed | +| `circlip_d5(type)` | Plier hole diameter | +| `circlip_thickness(type)` | Thickness | ### Modules | Module | Description | |:--- |:--- | -| ```internal_circlip(type, open = 0)``` | Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install | +| `internal_circlip(type, open = 0)` | Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install | ![circlips](tests/png/circlips.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 3 | ```circlip(circlip_12i)``` | Circlip internal 12mm | -| 3 | ```circlip(circlip_15i)``` | Circlip internal 15mm | -| 3 | ```circlip(circlip_19i)``` | Circlip internal 19mm | -| 3 | ```circlip(circlip_21i)``` | Circlip internal 21mm | -| 3 | ```circlip(circlip_28i)``` | Circlip internal 28mm | +| 3 | `circlip(circlip_12i)` | Circlip internal 12mm | +| 3 | `circlip(circlip_15i)` | Circlip internal 15mm | +| 3 | `circlip(circlip_19i)` | Circlip internal 19mm | +| 3 | `circlip(circlip_21i)` | Circlip internal 21mm | +| 3 | `circlip(circlip_28i)` | Circlip internal 28mm | Top @@ -546,82 +546,82 @@ Various electronic components used in hot ends and heated beds. ### Properties | Function | Description | |:--- |:--- | -| ```al_clad_clearance(type)``` | Clearance from screw hole centre to the body | -| ```al_clad_height(type)``` | Body height | -| ```al_clad_hole(type)``` | Hole diameter | -| ```al_clad_hpitch(type)``` | Lengthways pitch between screw holes | -| ```al_clad_length(type)``` | Body length | -| ```al_clad_tab(type)``` | Tab width | -| ```al_clad_thickness(type)``` | Tab thickness | -| ```al_clad_vpitch(type)``` | Widthways pitch between screw holes | -| ```al_clad_width(type)``` | Width including tabs | -| ```al_clad_wire_length(type)``` | Total length including wires | -| ```resistor_colour(type)``` | Body colour | -| ```resistor_diameter(type)``` | Body diameter | -| ```resistor_hole(type)``` | Hole big enough to glue it into | -| ```resistor_length(type)``` | Body length | -| ```resistor_radial(type)``` | Radial gives bead thermistor style body | -| ```resistor_sleeved(type)``` | Are the leads sleeved | -| ```resistor_wire_diameter(type)``` | Wire diameter | -| ```resistor_wire_length(type)``` | Wire length from body | -| ```tc_body_height(type)``` | Plastic body height | -| ```tc_body_inset(type)``` | How far metal is inset into the plastic body | -| ```tc_body_length(type)``` | Plastic body length | -| ```tc_body_width(type)``` | Plastic body width | -| ```tc_hole_dia(type)``` | Screw hole diameter | -| ```tc_hole_pitch(type)``` | Screw hole pitch | -| ```tc_length(type)``` | Across the lugs | -| ```tc_spade_height(type)``` | Terminal spade height measured from base | -| ```tc_spade_pitch(type)``` | Terminal spade pitch | -| ```tc_thickness(type)``` | Metal thickness | -| ```tc_width(type)``` | Width of lugs | +| `al_clad_clearance(type)` | Clearance from screw hole centre to the body | +| `al_clad_height(type)` | Body height | +| `al_clad_hole(type)` | Hole diameter | +| `al_clad_hpitch(type)` | Lengthways pitch between screw holes | +| `al_clad_length(type)` | Body length | +| `al_clad_tab(type)` | Tab width | +| `al_clad_thickness(type)` | Tab thickness | +| `al_clad_vpitch(type)` | Widthways pitch between screw holes | +| `al_clad_width(type)` | Width including tabs | +| `al_clad_wire_length(type)` | Total length including wires | +| `resistor_colour(type)` | Body colour | +| `resistor_diameter(type)` | Body diameter | +| `resistor_hole(type)` | Hole big enough to glue it into | +| `resistor_length(type)` | Body length | +| `resistor_radial(type)` | Radial gives bead thermistor style body | +| `resistor_sleeved(type)` | Are the leads sleeved | +| `resistor_wire_diameter(type)` | Wire diameter | +| `resistor_wire_length(type)` | Wire length from body | +| `tc_body_height(type)` | Plastic body height | +| `tc_body_inset(type)` | How far metal is inset into the plastic body | +| `tc_body_length(type)` | Plastic body length | +| `tc_body_width(type)` | Plastic body width | +| `tc_hole_dia(type)` | Screw hole diameter | +| `tc_hole_pitch(type)` | Screw hole pitch | +| `tc_length(type)` | Across the lugs | +| `tc_spade_height(type)` | Terminal spade height measured from base | +| `tc_spade_pitch(type)` | Terminal spade pitch | +| `tc_thickness(type)` | Metal thickness | +| `tc_width(type)` | Width of lugs | ### Functions | Function | Description | |:--- |:--- | -| ```TO220_thickness()``` | Thickness of the tab of a TO220 | -| ```fack2spm_bezel_size()``` | FACK2SPM Bezel dimensions | -| ```fack2spm_screw()``` | Screw type for FACK2SPM | +| `TO220_thickness()` | Thickness of the tab of a TO220 | +| `fack2spm_bezel_size()` | FACK2SPM Bezel dimensions | +| `fack2spm_screw()` | Screw type for FACK2SPM | ### Modules | Module | Description | |:--- |:--- | -| ``` TO220(description, leads = 3, lead_length = 16)``` | Draw a TO220 package, use ```description``` to describe what it is | -| ```al_clad_resistor(type, value, leads = true)``` | Draw an aluminium clad resistor | -| ```al_clad_resistor_hole_positions(type)``` | Position children at the screw holes of an aluminium clad resistor | -| ```al_clad_resistor_holes(type, h = 100)``` | Drill screw holes for an aluminium clad resistor | -| ```fack2spm()``` | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler | -| ```fack2spm_hole_positions()``` | Place children at the FACK2SPM mounting hole positions | -| ```fack2spm_holes(h = 0)``` | Cut the holes for a FACK2SPM | -| ```panel_USBA()``` | Draw a panel mount USBA connector | -| ```panel_USBA_hole_positions()``` | Place children at hole positions | -| ```panel_USBA_holes(h = 100)``` | Make holes for USBA connector | -| ```resistor(type)``` | Draw specified type of resitor | -| ```sleeved_resistor(type, sleeving, bare = 5, heatshrink = false)``` | Draw a resistor with sleeved leads and option heatshrink | -| ```thermal_cutout(type)``` | Draw specified thermal cutout | -| ```thermal_cutout_hole_positions(type)``` | Place children at hole positions | +| ` TO220(description, leads = 3, lead_length = 16)` | Draw a TO220 package, use `description` to describe what it is | +| `al_clad_resistor(type, value, leads = true)` | Draw an aluminium clad resistor | +| `al_clad_resistor_hole_positions(type)` | Position children at the screw holes of an aluminium clad resistor | +| `al_clad_resistor_holes(type, h = 100)` | Drill screw holes for an aluminium clad resistor | +| `fack2spm()` | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler | +| `fack2spm_hole_positions()` | Place children at the FACK2SPM mounting hole positions | +| `fack2spm_holes(h = 0)` | Cut the holes for a FACK2SPM | +| `panel_USBA()` | Draw a panel mount USBA connector | +| `panel_USBA_hole_positions()` | Place children at hole positions | +| `panel_USBA_holes(h = 100)` | Make holes for USBA connector | +| `resistor(type)` | Draw specified type of resitor | +| `sleeved_resistor(type, sleeving, bare = 5, heatshrink = false)` | Draw a resistor with sleeved leads and option heatshrink | +| `thermal_cutout(type)` | Draw specified thermal cutout | +| `thermal_cutout_hole_positions(type)` | Place children at hole positions | ![components](tests/png/components.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```TO220("Generic TO220 package")``` | Generic TO220 package | -| 8 | ```tubing(HSHRNK32)``` | Heatshrink sleeving ID 3.2mm x 15mm | -| 1 | ```resistor(RWM04106R80J)``` | Resistor RWM04106R80J 6R8 3W vitreous enamel | -| 1 | ```resistor(RIE1212UB5C5R6)``` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | -| 1 | ```al_clad_resistor(THS10, 4.7)``` | Resistor aluminium clad THS10 4.7 | -| 1 | ```al_clad_resistor(THS15, 4.7)``` | Resistor aluminium clad THS15 4.7 | -| 1 | ```al_clad_resistor(THS25, 4.7)``` | Resistor aluminium clad THS25 4.7 | -| 1 | ```al_clad_resistor(THS50, 4.7)``` | Resistor aluminium clad THS50 4.7 | -| 4 | ```screw(M2p5_pan_screw, 16)``` | Screw M2.5 pan x 16mm | -| 4 | ```screw(M3_pan_screw, 16)``` | Screw M3 pan x 16mm | -| 1 | ```panel_USBA()``` | Socket USB A panel mount | -| 1 | ```tuk_fack2spm()``` | TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler | -| 1 | ```thermal_cutout(TC)``` | Thermal cutout TC | -| 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% | -| 1 | ```resistor(EpcosBlue)``` | Thermistor Epcos B57861S104F40 100K 1% | -| 1 | ```resistor(Honewell)``` | Thermistor Honeywell 135-104LAC-J01 100K 1% | +| 1 | `TO220("Generic TO220 package")` | Generic TO220 package | +| 8 | `tubing(HSHRNK32)` | Heatshrink sleeving ID 3.2mm x 15mm | +| 1 | `resistor(RWM04106R80J)` | Resistor RWM04106R80J 6R8 3W vitreous enamel | +| 1 | `resistor(RIE1212UB5C5R6)` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | +| 1 | `al_clad_resistor(THS10, 4.7)` | Resistor aluminium clad THS10 4.7 | +| 1 | `al_clad_resistor(THS15, 4.7)` | Resistor aluminium clad THS15 4.7 | +| 1 | `al_clad_resistor(THS25, 4.7)` | Resistor aluminium clad THS25 4.7 | +| 1 | `al_clad_resistor(THS50, 4.7)` | Resistor aluminium clad THS50 4.7 | +| 4 | `screw(M2p5_pan_screw, 16)` | Screw M2.5 pan x 16mm | +| 4 | `screw(M3_pan_screw, 16)` | Screw M3 pan x 16mm | +| 1 | `panel_USBA()` | Socket USB A panel mount | +| 1 | `tuk_fack2spm()` | TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler | +| 1 | `thermal_cutout(TC)` | Thermal cutout TC | +| 1 | `resistor(Epcos)` | Thermistor Epcos B57560G104F 100K 1% | +| 1 | `resistor(EpcosBlue)` | Thermistor Epcos B57861S104F40 100K 1% | +| 1 | `resistor(Honewell)` | Thermistor Honeywell 135-104LAC-J01 100K 1% | Top @@ -641,43 +641,43 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou ### Properties | Function | Description | |:--- |:--- | -| ``` d_flange_length(type)``` | Length of the flange | -| ``` d_flange_thickness(type)``` | Thickness of the flange | -| ``` d_flange_width(type)``` | Width of the flange | -| ``` d_front_height(type)``` | From the back of the flange to the front | -| ``` d_height(type)``` | From the front to the back of the metal part | -| ``` d_hole_pitch(type)``` | Mounting hole pitch | -| ``` d_lengths(type)``` | Lengths of the D for plug and socket | -| ``` d_ways(type)``` | Number of ways | -| ``` d_widths(type)``` | Widths of the D for plug and socket | +| ` d_flange_length(type)` | Length of the flange | +| ` d_flange_thickness(type)` | Thickness of the flange | +| ` d_flange_width(type)` | Width of the flange | +| ` d_front_height(type)` | From the back of the flange to the front | +| ` d_height(type)` | From the front to the back of the metal part | +| ` d_hole_pitch(type)` | Mounting hole pitch | +| ` d_lengths(type)` | Lengths of the D for plug and socket | +| ` d_ways(type)` | Number of ways | +| ` d_widths(type)` | Widths of the D for plug and socket | ### Functions | Function | Description | |:--- |:--- | -| ``` d_mate_distance(type)``` | Spacing when mated | -| ``` d_pcb_offset(type)``` | Height of the back of the flange above the PCB | -| ``` d_slot_length(type)``` | Slot to clear the back | +| ` d_mate_distance(type)` | Spacing when mated | +| ` d_pcb_offset(type)` | Height of the back of the flange above the PCB | +| ` d_slot_length(type)` | Slot to clear the back | ### Modules | Module | Description | |:--- |:--- | -| ```d_connector_holes(type)``` | Place children at the screw hole positions | -| ```d_pillar()``` | Draw a pillar for a D-connector | -| ```d_plug(type, socket = false, pcb = false, idc = false)``` | Draw specified D plug, which can be IDC, PCB or plain solder bucket | -| ```d_socket(connector, pcb = false, idc = false)``` | Draw specified D socket, which can be IDC, PCB or plain solder bucket | +| `d_connector_holes(type)` | Place children at the screw hole positions | +| `d_pillar()` | Draw a pillar for a D-connector | +| `d_plug(type, socket = false, pcb = false, idc = false)` | Draw specified D plug, which can be IDC, PCB or plain solder bucket | +| `d_socket(connector, pcb = false, idc = false)` | Draw specified D socket, which can be IDC, PCB or plain solder bucket | ![d_connectors](tests/png/d_connectors.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```d_plug(DCONN15, idc = true)``` | D-type 15 way IDC plug | -| 1 | ```d_socket(DCONN15, idc = true)``` | D-type 15 way IDC socket | -| 1 | ```d_plug(DCONN25, pcb = true)``` | D-type 25 way PCB mount plug | -| 1 | ```d_socket(DCONN25, pcb = true)``` | D-type 25 way PCB mount socket | -| 1 | ```d_plug(DCONN9)``` | D-type 9 way plug | -| 1 | ```d_socket(DCONN9)``` | D-type 9 way socket | -| 6 | ```d_pillar()``` | D-type connector pillar | +| 1 | `d_plug(DCONN15, idc = true)` | D-type 15 way IDC plug | +| 1 | `d_socket(DCONN15, idc = true)` | D-type 15 way IDC socket | +| 1 | `d_plug(DCONN25, pcb = true)` | D-type 25 way PCB mount plug | +| 1 | `d_socket(DCONN25, pcb = true)` | D-type 25 way PCB mount socket | +| 1 | `d_plug(DCONN9)` | D-type 9 way plug | +| 1 | `d_socket(DCONN9)` | D-type 9 way socket | +| 6 | `d_pillar()` | D-type connector pillar | Top @@ -695,33 +695,33 @@ Dual inline IC packages and sockets ### Properties | Function | Description | |:--- |:--- | -| ```pdip_pin_W(type)``` | Pin shoulder width | -| ```pdip_pin_h(type)``` | Pin height | -| ```pdip_pin_n(type)``` | Pin neck | -| ```pdip_pin_s(type)``` | Height above seating plane | -| ```pdip_pin_t(type)``` | Pin thickness | -| ```pdip_pin_w(type)``` | Pin width | +| `pdip_pin_W(type)` | Pin shoulder width | +| `pdip_pin_h(type)` | Pin height | +| `pdip_pin_n(type)` | Pin neck | +| `pdip_pin_s(type)` | Height above seating plane | +| `pdip_pin_t(type)` | Pin thickness | +| `pdip_pin_w(type)` | Pin width | ### Modules | Module | Description | |:--- |:--- | -| ```dip(n, part, size, w, pitch, pin)``` | Draw DIP package | -| ```pdip(pins, part, socketed, w = inch(0.3)``` | Draw standard 0.1" PDIP IC package | -| ```pdip_pin(type, l, end)``` | Draw a pin | +| `dip(n, part, size, w, pitch, pin)` | Draw DIP package | +| `pdip(pins, part, socketed, w = inch(0.3)` | Draw standard 0.1" PDIP IC package | +| `pdip_pin(type, l, end)` | Draw a pin | ![dip](tests/png/dip.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```dil_socket(14, 7.62)``` | DIL socket 28 x 0.3" | -| 1 | ```pdip(14, 74HC00)``` | IC 74HC00 PDIP14 | -| 1 | ```pdip(20, 74HC245)``` | IC 74HC245 PDIP20 | -| 1 | ```pdip(28, ATMEGA328)``` | IC ATMEGA328 PDIP28 | -| 1 | ```pdip(8, NE555)``` | IC NE555 PDIP8 | -| 1 | ```pdip(6, OPTO)``` | IC OPTO PDIP6 | -| 1 | ```pdip(16, ULN2003)``` | IC ULN2003 PDIP16 | -| 1 | ```pdip(18, ULN2803)``` | IC ULN2803 PDIP18 | +| 1 | `dil_socket(14, 7.62)` | DIL socket 28 x 0.3" | +| 1 | `pdip(14, 74HC00)` | IC 74HC00 PDIP14 | +| 1 | `pdip(20, 74HC245)` | IC 74HC245 PDIP20 | +| 1 | `pdip(28, ATMEGA328)` | IC ATMEGA328 PDIP28 | +| 1 | `pdip(8, NE555)` | IC NE555 PDIP8 | +| 1 | `pdip(6, OPTO)` | IC OPTO PDIP6 | +| 1 | `pdip(16, ULN2003)` | IC ULN2003 PDIP16 | +| 1 | `pdip(18, ULN2803)` | IC ULN2803 PDIP18 | Top @@ -741,38 +741,38 @@ LCD dispays. ### Properties | Function | Description | |:--- |:--- | -| ```display_aperture(type)``` | Size of the aperture including its depth | -| ```display_height(type)``` | Depth of the metal part | -| ```display_pcb(type)``` | PCB mounted on the back | -| ```display_pcb_offset(type)``` | 3D offset of the PCB centre | -| ```display_ribbon(type)``` | Keep out region for ribbon cable | -| ```display_thickness(type)``` | Height of the metal part | -| ```display_threads(type)``` | Length that studs protrude from the PCB holes | -| ```display_touch_screen(type)``` | Touch screen position and size | -| ```display_width(type)``` | Width of the metal part | +| `display_aperture(type)` | Size of the aperture including its depth | +| `display_height(type)` | Depth of the metal part | +| `display_pcb(type)` | PCB mounted on the back | +| `display_pcb_offset(type)` | 3D offset of the PCB centre | +| `display_ribbon(type)` | Keep out region for ribbon cable | +| `display_thickness(type)` | Height of the metal part | +| `display_threads(type)` | Length that studs protrude from the PCB holes | +| `display_touch_screen(type)` | Touch screen position and size | +| `display_width(type)` | Width of the metal part | ### Functions | Function | Description | |:--- |:--- | -| ```display_depth(type)``` | Total thickness including touch screen and PCB | -| ```display_ts_thickness(type)``` | Touch screen thickness or 0 | +| `display_depth(type)` | Total thickness including touch screen and PCB | +| `display_ts_thickness(type)` | Touch screen thickness or 0 | ### Modules | Module | Description | |:--- |:--- | -| ```display(type)``` | Draw specified display | -| ```display_aperture(type, clearance, clear_pcb = false)``` | Make aperture cutout | +| `display(type)` | Draw specified display | +| `display_aperture(type, clearance, clear_pcb = false)` | Make aperture cutout | ![displays](tests/png/displays.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```display(BigTreeTech_TFT35v3_0)``` | BigTreeTech TFT35 v3.0 | -| 1 | ```display(HDMI5)``` | HDMI display 5" | -| 1 | ```display(LCD1602A)``` | LCD display 1602A | -| 1 | ```display(LCDS7282B)``` | LCD display S-7282B | -| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" | +| 1 | `display(BigTreeTech_TFT35v3_0)` | BigTreeTech TFT35 v3.0 | +| 1 | `display(HDMI5)` | HDMI display 5" | +| 1 | `display(LCD1602A)` | LCD display 1602A | +| 1 | `display(LCDS7282B)` | LCD display S-7282B | +| 1 | `display(SSD1963_4p3)` | LCD display SSD1963 4.3" | Top @@ -792,35 +792,35 @@ Brackets for joining extrusions at a corner. ### Properties | Function | Description | |:--- |:--- | -| ```extrusion_corner_bracket_base_thickness(type)``` | Thickness of base of bracket | -| ```extrusion_corner_bracket_hole_offset(type)``` | Hole offset from corner | -| ```extrusion_corner_bracket_side_thickness(type)``` | Thickness of side of bracket | -| ```extrusion_corner_bracket_size(type)``` | Size of bracket | -| ```extrusion_inner_corner_bracket_size(type)``` | Size of inner bracket | +| `extrusion_corner_bracket_base_thickness(type)` | Thickness of base of bracket | +| `extrusion_corner_bracket_hole_offset(type)` | Hole offset from corner | +| `extrusion_corner_bracket_side_thickness(type)` | Thickness of side of bracket | +| `extrusion_corner_bracket_size(type)` | Size of bracket | +| `extrusion_inner_corner_bracket_size(type)` | Size of inner bracket | ### Modules | Module | Description | |:--- |:--- | -| ```extrusion_corner_bracket(type)``` | Corner bracket for extrusion | -| ```extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6)``` | Assembly with fasteners in place | -| ```extrusion_corner_bracket_hole_positions(type)``` | Place children at hole positions | -| ```extrusion_inner_corner_bracket(type, grub_screws = true)``` | Inner corner bracket for extrusion | +| `extrusion_corner_bracket(type)` | Corner bracket for extrusion | +| `extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6)` | Assembly with fasteners in place | +| `extrusion_corner_bracket_hole_positions(type)` | Place children at hole positions | +| `extrusion_inner_corner_bracket(type, grub_screws = true)` | Inner corner bracket for extrusion | ![extrusion_brackets](tests/png/extrusion_brackets.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```extrusion(E2020, 20)``` | Extrusion E2020 x 20mm | -| 1 | ```extrusion(E2020, 30)``` | Extrusion E2020 x 30mm | -| 1 | ```extrusion(E2020, 40)``` | Extrusion E2020 x 40mm | -| 1 | ```extrusion(E2020, 50)``` | Extrusion E2020 x 50mm | -| 2 | ```extrusion_corner_bracket(E20_corner_bracket)``` | Extrusion corner bracket 20 | -| 2 | ```extrusion_inner_corner_bracket(E20_inner_corner_bracket, true)``` | Extrusion inner corner bracket 4.5 | -| 1 | ```extrusion_inner_corner_bracket(E20_inner_corner_bracket, false)``` | Extrusion inner corner bracket 4.5 | -| 4 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T | -| 4 | ```screw(M4_cap_screw, 8)``` | Screw M4 cap x 8mm | -| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `extrusion(E2020, 20)` | Extrusion E2020 x 20mm | +| 1 | `extrusion(E2020, 30)` | Extrusion E2020 x 30mm | +| 1 | `extrusion(E2020, 40)` | Extrusion E2020 x 40mm | +| 1 | `extrusion(E2020, 50)` | Extrusion E2020 x 50mm | +| 2 | `extrusion_corner_bracket(E20_corner_bracket)` | Extrusion corner bracket 20 | +| 2 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket, true)` | Extrusion inner corner bracket 4.5 | +| 1 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket, false)` | Extrusion inner corner bracket 4.5 | +| 4 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T | +| 4 | `screw(M4_cap_screw, 8)` | Screw M4 cap x 8mm | +| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -840,36 +840,36 @@ Aluminium extrusion. ### Properties | Function | Description | |:--- |:--- | -| ```extrusion_center_hole(type)``` | Diameter of center hole | -| ```extrusion_center_square(type)``` | Size of center square | -| ```extrusion_channel_width(type)``` | Channel width | -| ```extrusion_channel_width_internal(type)``` | Internal channel width | -| ```extrusion_corner_hole(type)``` | Diameter of corner hole | -| ```extrusion_fillet(type)``` | Radius of corner fillet | -| ```extrusion_height(type)``` | Height of extrusion | -| ```extrusion_spar_thickness(type)``` | Spar thickness | -| ```extrusion_tab_thickness(type)``` | Tab thickness | -| ```extrusion_width(type)``` | Width of extrusion | +| `extrusion_center_hole(type)` | Diameter of center hole | +| `extrusion_center_square(type)` | Size of center square | +| `extrusion_channel_width(type)` | Channel width | +| `extrusion_channel_width_internal(type)` | Internal channel width | +| `extrusion_corner_hole(type)` | Diameter of corner hole | +| `extrusion_fillet(type)` | Radius of corner fillet | +| `extrusion_height(type)` | Height of extrusion | +| `extrusion_spar_thickness(type)` | Spar thickness | +| `extrusion_tab_thickness(type)` | Tab thickness | +| `extrusion_width(type)` | Width of extrusion | ### Modules | Module | Description | |:--- |:--- | -| ```extrusion(type, length, center = true, cornerHole = false)``` | Draw the specified extrusion | +| `extrusion(type, length, center = true, cornerHole = false)` | Draw the specified extrusion | ![extrusions](tests/png/extrusions.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```extrusion(E1515, 80)``` | Extrusion E1515 x 80mm | -| 1 | ```extrusion(E2020, 80)``` | Extrusion E2020 x 80mm | -| 1 | ```extrusion(E2040, 80)``` | Extrusion E2040 x 80mm | -| 1 | ```extrusion(E2060, 80)``` | Extrusion E2060 x 80mm | -| 1 | ```extrusion(E2080, 80)``` | Extrusion E2080 x 80mm | -| 1 | ```extrusion(E3030, 80, cornerHole = true)``` | Extrusion E3030 x 80mm | -| 1 | ```extrusion(E3060, 80, cornerHole = true)``` | Extrusion E3060 x 80mm | -| 1 | ```extrusion(E4040, 80, cornerHole = true)``` | Extrusion E4040 x 80mm | -| 1 | ```extrusion(E4080, 80, cornerHole = true)``` | Extrusion E4080 x 80mm | +| 1 | `extrusion(E1515, 80)` | Extrusion E1515 x 80mm | +| 1 | `extrusion(E2020, 80)` | Extrusion E2020 x 80mm | +| 1 | `extrusion(E2040, 80)` | Extrusion E2040 x 80mm | +| 1 | `extrusion(E2060, 80)` | Extrusion E2060 x 80mm | +| 1 | `extrusion(E2080, 80)` | Extrusion E2080 x 80mm | +| 1 | `extrusion(E3030, 80, cornerHole = true)` | Extrusion E3030 x 80mm | +| 1 | `extrusion(E3060, 80, cornerHole = true)` | Extrusion E3060 x 80mm | +| 1 | `extrusion(E4040, 80, cornerHole = true)` | Extrusion E4040 x 80mm | +| 1 | `extrusion(E4080, 80, cornerHole = true)` | Extrusion E4080 x 80mm | Top @@ -891,56 +891,56 @@ Can draw three styles: solid, open frame and open frame with screw bosses. ### Properties | Function | Description | |:--- |:--- | -| ```fan_aperture(type)``` | Optional diameter for the aperture, which can be bigger than the bore it has flared corners. | -| ```fan_blades(type)``` | The number of blades | -| ```fan_bore(type)``` | Diameter of the hole for the blades | -| ```fan_boss_d(type)``` | Diameter of the screw bosses | -| ```fan_depth(type)``` | Depth of fan | -| ```fan_hole_pitch(type)``` | Screw hole pitch | -| ```fan_hub(type)``` | Diameter of the hub | -| ```fan_outer_diameter(type)``` | Outside diameter of the frame | -| ```fan_screw(type)``` | Screw type | -| ```fan_thickness(type)``` | Thickness of the frame | -| ```fan_width(type)``` | Width of square | +| `fan_aperture(type)` | Optional diameter for the aperture, which can be bigger than the bore it has flared corners. | +| `fan_blades(type)` | The number of blades | +| `fan_bore(type)` | Diameter of the hole for the blades | +| `fan_boss_d(type)` | Diameter of the screw bosses | +| `fan_depth(type)` | Depth of fan | +| `fan_hole_pitch(type)` | Screw hole pitch | +| `fan_hub(type)` | Diameter of the hub | +| `fan_outer_diameter(type)` | Outside diameter of the frame | +| `fan_screw(type)` | Screw type | +| `fan_thickness(type)` | Thickness of the frame | +| `fan_width(type)` | Width of square | ### Modules | Module | Description | |:--- |:--- | -| ```fan(type)``` | Draw specified fan, origin in the centre | -| ```fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false)``` | Fan with its fasteners | -| ```fan_hole_positions(type, z = undef)``` | Position children at the screw hole positions | -| ```fan_holes(type, poly = false, screws = true, h = 100)``` | Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. | +| `fan(type)` | Draw specified fan, origin in the centre | +| `fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false)` | Fan with its fasteners | +| `fan_hole_positions(type, z = undef)` | Position children at the screw hole positions | +| `fan_holes(type, poly = false, screws = true, h = 100)` | Make all the holes for the fan, or just the aperture if `screws` is false. Set `poly` true for poly_holes. | ![fans](tests/png/fans.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```fan(fan120x25)``` | Fan 120mm x 25mm | -| 1 | ```fan(fan17x8)``` | Fan 17mm x 8mm | -| 1 | ```fan(fan25.4x10)``` | Fan 25.4mm x 10mm | -| 1 | ```fan(fan30x10)``` | Fan 30mm x 10mm | -| 1 | ```fan(fan40x11)``` | Fan 40mm x 11mm | -| 1 | ```fan(fan50x15)``` | Fan 50mm x 15mm | -| 1 | ```fan(fan60x15)``` | Fan 60mm x 15mm | -| 1 | ```fan(fan60x25)``` | Fan 60mm x 25mm | -| 1 | ```fan(fan70x15)``` | Fan 70mm x 15mm | -| 1 | ```fan(fan80x25)``` | Fan 80mm x 25mm | -| 1 | ```fan(fan80x38)``` | Fan 80mm x 38mm | -| 4 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | -| 4 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc | -| 8 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 28 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 4 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm | -| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm | -| 8 | ```screw(M3_dome_screw, 20)``` | Screw M3 dome x 20mm | -| 20 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm | -| 4 | ```screw(M4_dome_screw, 25)``` | Screw M4 dome x 25mm | -| 4 | ```screw(M4_dome_screw, 30)``` | Screw M4 dome x 30mm | -| 8 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 8 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm | -| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 32 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `fan(fan120x25)` | Fan 120mm x 25mm | +| 1 | `fan(fan17x8)` | Fan 17mm x 8mm | +| 1 | `fan(fan25.4x10)` | Fan 25.4mm x 10mm | +| 1 | `fan(fan30x10)` | Fan 30mm x 10mm | +| 1 | `fan(fan40x11)` | Fan 40mm x 11mm | +| 1 | `fan(fan50x15)` | Fan 50mm x 15mm | +| 1 | `fan(fan60x15)` | Fan 60mm x 15mm | +| 1 | `fan(fan60x25)` | Fan 60mm x 25mm | +| 1 | `fan(fan70x15)` | Fan 70mm x 15mm | +| 1 | `fan(fan80x25)` | Fan 80mm x 25mm | +| 1 | `fan(fan80x38)` | Fan 80mm x 38mm | +| 4 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | +| 4 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc | +| 8 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 28 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 4 | `screw(M2_cap_screw, 16)` | Screw M2 cap x 16mm | +| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm | +| 8 | `screw(M3_dome_screw, 20)` | Screw M3 dome x 20mm | +| 20 | `screw(M4_dome_screw, 16)` | Screw M4 dome x 16mm | +| 4 | `screw(M4_dome_screw, 25)` | Screw M4 dome x 25mm | +| 4 | `screw(M4_dome_screw, 30)` | Screw M4 dome x 30mm | +| 8 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 8 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | +| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 32 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -958,20 +958,20 @@ Can draw three styles: solid, open frame and open frame with screw bosses. ### Functions | Function | Description | |:--- |:--- | -| ```fuseholder_diameter()``` | Outside diameter of flange | +| `fuseholder_diameter()` | Outside diameter of flange | ### Modules | Module | Description | |:--- |:--- | -| ```fuseholder(thickness)``` | Fuseholder with nut in place for specified panel thickness | -| ```fuseholder_hole(h = 100)``` | Hole with flats for fuseholder | +| `fuseholder(thickness)` | Fuseholder with nut in place for specified panel thickness | +| `fuseholder_hole(h = 100)` | Hole with flats for fuseholder | ![fuseholder](tests/png/fuseholder.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```fuseholder(6)``` | Fuse holder 20mm | +| 1 | `fuseholder(6)` | Fuse holder 20mm | Top @@ -991,38 +991,38 @@ Geared tin can steppers ### Properties | Function | Description | |:--- |:--- | -| ```gs_boss_d(type)``` | Boss around the shaft diameter | -| ```gs_boss_h(type)``` | Boss around the shaft height | -| ```gs_bulge2_d(type)``` | Plastic rear bulge depth from centre | -| ```gs_bulge2_h(type)``` | Plastic rear bulge height | -| ```gs_bulge2_w(type)``` | Plastic rear bulge width | -| ```gs_bulge_d(type)``` | Plastic bulge depth from centre | -| ```gs_bulge_h(type)``` | Plastic bulge height | -| ```gs_bulge_w(type)``` | Plastic bulge width | -| ```gs_diameter(type)``` | Can diameter | -| ```gs_flat_length(type)``` | Shaft flat length | -| ```gs_height(type)``` | Can height | -| ```gs_hole_d(type)``` | Screw hole diameter | -| ```gs_lug_t(type)``` | Screw lug thickness | -| ```gs_lug_w(type)``` | Screw lug width | -| ```gs_offset(type)``` | Offset of the shaft from the centre of the can | -| ```gs_pitch(type)``` | Screw pitch | -| ```gs_shaft_d(type)``` | Shaft diameter | -| ```gs_shaft_flat(type)``` | Shaft width across the flats | -| ```gs_shaft_length(type)``` | Shaft length | +| `gs_boss_d(type)` | Boss around the shaft diameter | +| `gs_boss_h(type)` | Boss around the shaft height | +| `gs_bulge2_d(type)` | Plastic rear bulge depth from centre | +| `gs_bulge2_h(type)` | Plastic rear bulge height | +| `gs_bulge2_w(type)` | Plastic rear bulge width | +| `gs_bulge_d(type)` | Plastic bulge depth from centre | +| `gs_bulge_h(type)` | Plastic bulge height | +| `gs_bulge_w(type)` | Plastic bulge width | +| `gs_diameter(type)` | Can diameter | +| `gs_flat_length(type)` | Shaft flat length | +| `gs_height(type)` | Can height | +| `gs_hole_d(type)` | Screw hole diameter | +| `gs_lug_t(type)` | Screw lug thickness | +| `gs_lug_w(type)` | Screw lug width | +| `gs_offset(type)` | Offset of the shaft from the centre of the can | +| `gs_pitch(type)` | Screw pitch | +| `gs_shaft_d(type)` | Shaft diameter | +| `gs_shaft_flat(type)` | Shaft width across the flats | +| `gs_shaft_length(type)` | Shaft length | ### Modules | Module | Description | |:--- |:--- | -| ```geared_stepper(type)``` | Draw the specified geared stepper | -| ```geared_stepper_screw_positions(type)``` | Place children at the screw positions | +| `geared_stepper(type)` | Draw the specified geared stepper | +| `geared_stepper_screw_positions(type)` | Place children at the screw positions | ![geared_steppers](tests/png/geared_steppers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```geared_stepper(28BYJ_48)``` | Geared stepper - 28BYJ-48 5V | +| 1 | `geared_stepper(28BYJ_48)` | Geared stepper - 28BYJ-48 5V | Top @@ -1042,37 +1042,37 @@ Parametric green terminal blocks ### Properties | Function | Description | |:--- |:--- | -| ```gt_back_depth(type)``` | Back ledge depth | -| ```gt_back_height(type)``` | Height at the back | -| ```gt_box_h(type)``` | Height of the cable entry box | -| ```gt_box_setback(type)``` | How far the contact box is set back from the front | -| ```gt_box_w(type)``` | Width inside the cable entry box | -| ```gt_depth(type)``` | Total front to back depth | -| ```gt_front_depth(type)``` | Front ledge depth | -| ```gt_front_height(type)``` | Height at the front | -| ```gt_front_t(type)``` | Thickness of frame around the front aperture | -| ```gt_height(type)``` | Height of the flat top | -| ```gt_pitch(type)``` | Pitch between terminals | -| ```gt_screw_r(type)``` | Screw head radius | -| ```gt_top(type)``` | Depth at the top | -| ```gt_tube_h(type)``` | Height of optional tubes around the screws | -| ```gt_y_offset(type)``` | Offset of the pins from centre of the depth | -| ```gt_y_offset2(type)``` | Offset of the pins from the screws | +| `gt_back_depth(type)` | Back ledge depth | +| `gt_back_height(type)` | Height at the back | +| `gt_box_h(type)` | Height of the cable entry box | +| `gt_box_setback(type)` | How far the contact box is set back from the front | +| `gt_box_w(type)` | Width inside the cable entry box | +| `gt_depth(type)` | Total front to back depth | +| `gt_front_depth(type)` | Front ledge depth | +| `gt_front_height(type)` | Height at the front | +| `gt_front_t(type)` | Thickness of frame around the front aperture | +| `gt_height(type)` | Height of the flat top | +| `gt_pitch(type)` | Pitch between terminals | +| `gt_screw_r(type)` | Screw head radius | +| `gt_top(type)` | Depth at the top | +| `gt_tube_h(type)` | Height of optional tubes around the screws | +| `gt_y_offset(type)` | Offset of the pins from centre of the depth | +| `gt_y_offset2(type)` | Offset of the pins from the screws | ### Modules | Module | Description | |:--- |:--- | -| ```green_terminal(type, ways, skip = [], colour = "lime")``` | Draw green terminal blocks, skip can be used to remove pins. | +| `green_terminal(type, ways, skip = [], colour = "lime")` | Draw green terminal blocks, skip can be used to remove pins. | ![green_terminals](tests/png/green_terminals.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```green_terminal(gt_6p35, 2)``` | Terminal block 2 way 0.25" | -| 1 | ```green_terminal(gt_5p08, 3)``` | Terminal block 3 way 0.2" | -| 1 | ```green_terminal(gt_3p5, 4)``` | Terminal block 4 way 3.5mm | -| 1 | ```green_terminal(gt_2p54, 5)``` | Terminal block 5 way 0.1" | +| 1 | `green_terminal(gt_6p35, 2)` | Terminal block 2 way 0.25" | +| 1 | `green_terminal(gt_5p08, 3)` | Terminal block 3 way 0.2" | +| 1 | `green_terminal(gt_3p5, 4)` | Terminal block 4 way 3.5mm | +| 1 | `green_terminal(gt_2p54, 5)` | Terminal block 5 way 0.1" | Top @@ -1094,49 +1094,49 @@ Needs updating as mostly obsolete versions. ### Properties | Function | Description | |:--- |:--- | -| ```hot_end_duct_height_fan(type)``` | Duct height at fan end | -| ```hot_end_duct_height_nozzle(type)``` | Duct height at nozzle end | -| ```hot_end_duct_offset(type)``` | Offset of circular duct centre from the nozzle | -| ```hot_end_duct_radius(type)``` | Require radius to clear the heater block | -| ```hot_end_groove(type)``` | Groove length | -| ```hot_end_groove_dia(type)``` | Groove internal diameter | -| ```hot_end_inset(type)``` | The length that goes into the mounting | -| ```hot_end_insulator_colour(type)``` | Colour of the insulator | -| ```hot_end_insulator_diameter(type)``` | Outside diameter | -| ```hot_end_insulator_length(type)``` | Length of the insulator | -| ```hot_end_part(type)``` | Description | -| ```hot_end_style(type)``` | Basic type, jhead or e3d | -| ```hot_end_total_length(type)``` | Length from nozzle tip to the top | +| `hot_end_duct_height_fan(type)` | Duct height at fan end | +| `hot_end_duct_height_nozzle(type)` | Duct height at nozzle end | +| `hot_end_duct_offset(type)` | Offset of circular duct centre from the nozzle | +| `hot_end_duct_radius(type)` | Require radius to clear the heater block | +| `hot_end_groove(type)` | Groove length | +| `hot_end_groove_dia(type)` | Groove internal diameter | +| `hot_end_inset(type)` | The length that goes into the mounting | +| `hot_end_insulator_colour(type)` | Colour of the insulator | +| `hot_end_insulator_diameter(type)` | Outside diameter | +| `hot_end_insulator_length(type)` | Length of the insulator | +| `hot_end_part(type)` | Description | +| `hot_end_style(type)` | Basic type, jhead or e3d | +| `hot_end_total_length(type)` | Length from nozzle tip to the top | ### Functions | Function | Description | |:--- |:--- | -| ```hot_end_length(type)``` | The amount the hot end extends below its mounting | -| ```hot_end_need_cooling(type)``` | Has own fan so don't need cooling hole in the duct | +| `hot_end_length(type)` | The amount the hot end extends below its mounting | +| `hot_end_need_cooling(type)` | Has own fan so don't need cooling hole in the duct | ### Modules | Module | Description | |:--- |:--- | -| ```hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false)``` | Draw specified hot end | +| `hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false)` | Draw specified hot end | ![hot_ends](tests/png/hot_ends.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```tubing(HSHRNK16)``` | Heatshrink sleeving ID 1.6mm x 15mm | -| 4 | ```tubing(HSHRNK64, 60)``` | Heatshrink sleeving ID 6.4mm x 60mm | -| 1 | ```e3d_hot_end(E3Dv5, 3)``` | Hot end E3D V5 direct 3mm | -| 1 | ```e3d_hot_end(E3Dv6, 3)``` | Hot end E3D V6 direct 3mm | -| 1 | ```e3d_hot_end(E3D_clone, 3)``` | Hot end E3D clone aliexpress 3mm | -| 1 | ```jhead_hot_end(JHeadMk5, 3)``` | Hot end JHead MK5 3mm | -| 2 | ```tubing(PTFE07, 62)``` | PTFE sleeving OD 1.2mm ID 0.71mm x 62mm | -| 2 | ```tubing(PTFE20, 45)``` | PTFE sleeving OD 2.6mm ID 2mm x 45mm | -| 1 | ```resistor(RIE1212UB5C5R6)``` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | +| 2 | `tubing(HSHRNK16)` | Heatshrink sleeving ID 1.6mm x 15mm | +| 4 | `tubing(HSHRNK64, 60)` | Heatshrink sleeving ID 6.4mm x 60mm | +| 1 | `e3d_hot_end(E3Dv5, 3)` | Hot end E3D V5 direct 3mm | +| 1 | `e3d_hot_end(E3Dv6, 3)` | Hot end E3D V6 direct 3mm | +| 1 | `e3d_hot_end(E3D_clone, 3)` | Hot end E3D clone aliexpress 3mm | +| 1 | `jhead_hot_end(JHeadMk5, 3)` | Hot end JHead MK5 3mm | +| 2 | `tubing(PTFE07, 62)` | PTFE sleeving OD 1.2mm ID 0.71mm x 62mm | +| 2 | `tubing(PTFE20, 45)` | PTFE sleeving OD 2.6mm ID 2mm x 45mm | +| 1 | `resistor(RIE1212UB5C5R6)` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | | 1 | | Tape self amalgamating silicone 110mm x 25mm | -| 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% | +| 1 | `resistor(Epcos)` | Thermistor Epcos B57560G104F 100K 1% | | 2 | | Wire Red PTFE 16/0.2mm strands, length 170mm | -| 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 2.5mm x 100mm min length | +| 4 | `ziptie(small_ziptie, 8)` | Ziptie 2.5mm x 100mm min length | Top @@ -1154,20 +1154,20 @@ Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge ### Functions | Function | Description | |:--- |:--- | -| ```hygrometer_or()``` | The outside radius of a hygrometer | +| `hygrometer_or()` | The outside radius of a hygrometer | ### Modules | Module | Description | |:--- |:--- | -| ```hygrometer()``` | Draw a hygrometer | -| ```hygrometer_hole(h = 0)``` | Drill the hole for a hygrometer | +| `hygrometer()` | Draw a hygrometer | +| `hygrometer_hole(h = 0)` | Drill the hole for a hygrometer | ![hygrometer](tests/png/hygrometer.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```hygrometer()``` | Mini LCD Digital Thermometer / Hygrometer | +| 1 | `hygrometer()` | Mini LCD Digital Thermometer / Hygrometer | Top @@ -1187,55 +1187,55 @@ IEC mains inlets and outlet. ### Properties | Function | Description | |:--- |:--- | -| ```iec_bezel_h(type)``` | Bezel height | -| ```iec_bezel_r(type)``` | Bezel corner radius | -| ```iec_bezel_t(type)``` | Bezel thickness | -| ```iec_bezel_w(type)``` | Bezel width | -| ```iec_body_h(type)``` | Body height | -| ```iec_body_r(type)``` | Body corner radius | -| ```iec_body_w(type)``` | Body width | -| ```iec_body_w2(type)``` | Body width at the narrow part | -| ```iec_depth(type)``` | Depth of the body below the flange | -| ```iec_flange_h(type)``` | Flange height | -| ```iec_flange_r(type)``` | Flange corner radius | -| ```iec_flange_t(type)``` | Flange thickness | -| ```iec_flange_w(type)``` | Flange width not including the lugs | -| ```iec_male(type)``` | True for an outlet | -| ```iec_part(type)``` | Description | -| ```iec_pitch(type)``` | Screw hole pitch | -| ```iec_screw(type)``` | Screw type | -| ```iec_spades(type)``` | Spade type | -| ```iec_width(type)``` | Widest part including the lugs | +| `iec_bezel_h(type)` | Bezel height | +| `iec_bezel_r(type)` | Bezel corner radius | +| `iec_bezel_t(type)` | Bezel thickness | +| `iec_bezel_w(type)` | Bezel width | +| `iec_body_h(type)` | Body height | +| `iec_body_r(type)` | Body corner radius | +| `iec_body_w(type)` | Body width | +| `iec_body_w2(type)` | Body width at the narrow part | +| `iec_depth(type)` | Depth of the body below the flange | +| `iec_flange_h(type)` | Flange height | +| `iec_flange_r(type)` | Flange corner radius | +| `iec_flange_t(type)` | Flange thickness | +| `iec_flange_w(type)` | Flange width not including the lugs | +| `iec_male(type)` | True for an outlet | +| `iec_part(type)` | Description | +| `iec_pitch(type)` | Screw hole pitch | +| `iec_screw(type)` | Screw type | +| `iec_spades(type)` | Spade type | +| `iec_width(type)` | Widest part including the lugs | ### Functions | Function | Description | |:--- |:--- | -| ```iec_insert_screw_length()``` | Screw length used for inserts | +| `iec_insert_screw_length()` | Screw length used for inserts | ### Modules | Module | Description | |:--- |:--- | -| ```iec(type)``` | Draw specified IEC connector | -| ```iec_assembly(type, thickness)``` | Assembly with fasteners given panel thickness | -| ```iec_holes(type, h = 100, poly = false, horizontal = false, insert = false)``` | Drill the required panel holes | -| ```iec_inserts(type)``` | Place the inserts | -| ```iec_screw_positions(type)``` | Position children at the screw holes | +| `iec(type)` | Draw specified IEC connector | +| `iec_assembly(type, thickness)` | Assembly with fasteners given panel thickness | +| `iec_holes(type, h = 100, poly = false, horizontal = false, insert = false)` | Drill the required panel holes | +| `iec_inserts(type)` | Place the inserts | +| `iec_screw_positions(type)` | Position children at the screw holes | ![iecs](tests/png/iecs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```iec(IEC_fused_inlet)``` | IEC fused inlet JR-101-1F | -| 1 | ```iec(IEC_fused_inlet2)``` | IEC fused inlet old | -| 1 | ```iec(IEC_inlet)``` | IEC inlet | -| 1 | ```iec(IEC_inlet_atx)``` | IEC inlet for ATX | -| 1 | ```iec(IEC_outlet)``` | IEC outlet RS 811-7193 | -| 1 | ```iec(IEC_switched_fused_inlet)``` | IEC320 C14 switched fused inlet module | -| 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 4 | ```screw(M3_cs_cap_screw, 10)``` | Screw M3 cs cap x 10mm | -| 8 | ```screw(M3_cs_cap_screw, 12)``` | Screw M3 cs cap x 12mm | -| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 1 | `iec(IEC_fused_inlet)` | IEC fused inlet JR-101-1F | +| 1 | `iec(IEC_fused_inlet2)` | IEC fused inlet old | +| 1 | `iec(IEC_inlet)` | IEC inlet | +| 1 | `iec(IEC_inlet_atx)` | IEC inlet for ATX | +| 1 | `iec(IEC_outlet)` | IEC outlet RS 811-7193 | +| 1 | `iec(IEC_switched_fused_inlet)` | IEC320 C14 switched fused inlet module | +| 12 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 4 | `screw(M3_cs_cap_screw, 10)` | Screw M3 cs cap x 10mm | +| 8 | `screw(M3_cs_cap_screw, 12)` | Screw M3 cs cap x 12mm | +| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | Top @@ -1255,38 +1255,38 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir ### Properties | Function | Description | |:--- |:--- | -| ```insert_barrel_d(type)``` | Diameter of the main barrel | -| ```insert_hole_radius(type)``` | Radius of the required hole in the plastic | -| ```insert_length(type)``` | Length | -| ```insert_outer_d(type)``` | Outer diameter at the top | -| ```insert_ring1_h(type)``` | Height of the top and middle rings | -| ```insert_ring2_d(type)``` | Diameter of the middle ring | -| ```insert_ring3_d(type)``` | Diameter of the bottom ring | -| ```insert_screw_diameter(type)``` | Screw size | +| `insert_barrel_d(type)` | Diameter of the main barrel | +| `insert_hole_radius(type)` | Radius of the required hole in the plastic | +| `insert_length(type)` | Length | +| `insert_outer_d(type)` | Outer diameter at the top | +| `insert_ring1_h(type)` | Height of the top and middle rings | +| `insert_ring2_d(type)` | Diameter of the middle ring | +| `insert_ring3_d(type)` | Diameter of the bottom ring | +| `insert_screw_diameter(type)` | Screw size | ### Functions | Function | Description | |:--- |:--- | -| ```insert_boss_radius(type, wall)``` | Compute the outer radius of an insert boss | -| ```insert_nose_length(type, d)``` | The length before the second ring. | +| `insert_boss_radius(type, wall)` | Compute the outer radius of an insert boss | +| `insert_nose_length(type, d)` | The length before the second ring. | ### Modules | Module | Description | |:--- |:--- | -| ```insert(type)``` | Draw specified insert | -| ```insert_boss(type, z, wall = 2 * extrusion_width)``` | Make a boss to take an insert | -| ```insert_hole(type, counterbore = 0, horizontal = false)``` | Make a hole to take an insert, ```counterbore``` is the extra length for the screw | -| ```insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) | +| `insert(type)` | Draw specified insert | +| `insert_boss(type, z, wall = 2 * extrusion_width)` | Make a boss to take an insert | +| `insert_hole(type, counterbore = 0, horizontal = false)` | Make a hole to take an insert, `counterbore` is the extra length for the screw | +| `insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true)` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) | ![inserts](tests/png/inserts.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```insert(F1BM2)``` | Heatfit insert M2 | -| 1 | ```insert(F1BM2p5)``` | Heatfit insert M2.5 | -| 1 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 1 | ```insert(F1BM4)``` | Heatfit insert M4 | +| 1 | `insert(F1BM2)` | Heatfit insert M2 | +| 1 | `insert(F1BM2p5)` | Heatfit insert M2.5 | +| 1 | `insert(F1BM3)` | Heatfit insert M3 | +| 1 | `insert(F1BM4)` | Heatfit insert M4 | Top @@ -1305,26 +1305,26 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r ### Functions | Function | Description | |:--- |:--- | -| ```jack_4mm_hole_radius()``` | Panel hole radius for 4mm jack | -| ```jack_4mm_shielded_hole_radius()``` | Panel hole radius for 4mm shielded jack | -| ```post_4mm_diameter()``` | Outer diameter of 4mm binding post | +| `jack_4mm_hole_radius()` | Panel hole radius for 4mm jack | +| `jack_4mm_shielded_hole_radius()` | Panel hole radius for 4mm shielded jack | +| `post_4mm_diameter()` | Outer diameter of 4mm binding post | ### Modules | Module | Description | |:--- |:--- | -| ```jack_4mm(colour, thickness, display_colour = false)``` | Draw a 4mm jack socket with nut positioned for specified panel thickness | -| ```jack_4mm_shielded(colour, thickness, display_colour = false)``` | Draw a 4mm shielded jack | -| ```post_4mm(colour, thickness, display_colour = false)``` | Draw a 4mm binding post | -| ```post_4mm_hole(h = 100, poly = false)``` | Drill hole for 4mm binding post | +| `jack_4mm(colour, thickness, display_colour = false)` | Draw a 4mm jack socket with nut positioned for specified panel thickness | +| `jack_4mm_shielded(colour, thickness, display_colour = false)` | Draw a 4mm shielded jack | +| `post_4mm(colour, thickness, display_colour = false)` | Draw a 4mm binding post | +| `post_4mm_hole(h = 100, poly = false)` | Drill hole for 4mm binding post | ![jack](tests/png/jack.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```post_4mm("red", 3)``` | 4mm jack binding post red | -| 1 | ```jack_4mm("blue", 3, "royalblue")``` | 4mm jack socket blue | -| 1 | ```jack_4mm_shielded("brown", 3, "sienna")``` | 4mm shielded jack socket brown | +| 1 | `post_4mm("red", 3)` | 4mm jack binding post red | +| 1 | `jack_4mm("blue", 3, "royalblue")` | 4mm jack socket blue | +| 1 | `jack_4mm_shielded("brown", 3, "sienna")` | 4mm shielded jack socket brown | Top @@ -1344,40 +1344,40 @@ KP pillow block bearings ### Properties | Function | Description | |:--- |:--- | -| ```kp_base_height(type)``` | Height of base containing the bolts | -| ```kp_diameter(type)``` | Rod hole diameter | -| ```kp_hole_offset(type)``` | Rod hole offset | -| ```kp_screw_separation(type)``` | Separation of bolts in the base | +| `kp_base_height(type)` | Height of base containing the bolts | +| `kp_diameter(type)` | Rod hole diameter | +| `kp_hole_offset(type)` | Rod hole offset | +| `kp_screw_separation(type)` | Separation of bolts in the base | ### Functions | Function | Description | |:--- |:--- | -| ```kp_size(type)``` | Size of bracket | +| `kp_size(type)` | Size of bracket | ### Modules | Module | Description | |:--- |:--- | -| ```kp_pillow_block(type)``` | Draw the KP pillow block | -| ```kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef)``` | Assembly with fasteners in place | -| ```kp_pillow_block_hole_positions(type)``` | Place children at hole positions | +| `kp_pillow_block(type)` | Draw the KP pillow block | +| `kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef)` | Assembly with fasteners in place | +| `kp_pillow_block_hole_positions(type)` | Place children at hole positions | ![kp_pillow_blocks](tests/png/kp_pillow_blocks.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```kp_pillow_block(KP000)``` | KP000 pillow block | -| 1 | ```kp_pillow_block(KP001)``` | KP001 pillow block | -| 1 | ```kp_pillow_block(KP08_15)``` | KP08_15 pillow block | -| 1 | ```kp_pillow_block(KP08_18)``` | KP08_18 pillow block | -| 2 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer | -| 2 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T | -| 2 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T | -| 2 | ```nut(M5_nut, nyloc = undef)``` | Nut M5 x 4mm | -| 4 | ```screw(M4_cap_screw, 10)``` | Screw M4 cap x 10mm | -| 4 | ```screw(M5_cap_screw, 12)``` | Screw M5 cap x 12mm | -| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 6 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm | +| 1 | `kp_pillow_block(KP000)` | KP000 pillow block | +| 1 | `kp_pillow_block(KP001)` | KP001 pillow block | +| 1 | `kp_pillow_block(KP08_15)` | KP08_15 pillow block | +| 1 | `kp_pillow_block(KP08_18)` | KP08_18 pillow block | +| 2 | `sliding_t_nut(M4_hammer_nut)` | Nut M4 hammer | +| 2 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T | +| 2 | `sliding_t_nut(M5_sliding_t_nut)` | Nut M5 sliding T | +| 2 | `nut(M5_nut, nyloc = undef)` | Nut M5 x 4mm | +| 4 | `screw(M4_cap_screw, 10)` | Screw M4 cap x 10mm | +| 4 | `screw(M5_cap_screw, 12)` | Screw M5 cap x 12mm | +| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 6 | `washer(M5_washer)` | Washer M5 x 10mm x 1mm | Top @@ -1399,26 +1399,26 @@ Larger ones seem to have both a higher dark resistance and a lower bright light ### Properties | Function | Description | |:--- |:--- | -| ```ldr_active(type)``` | The active width | -| ```ldr_description(type)``` | Description | -| ```ldr_diameter(type)``` | The diameter of the round bit | -| ```ldr_lead_d(type)``` | The lead diameter | -| ```ldr_pitch(type)``` | Pitch between the leads | -| ```ldr_thickness(type)``` | Thickness | -| ```ldr_width(type)``` | Across the flats | +| `ldr_active(type)` | The active width | +| `ldr_description(type)` | Description | +| `ldr_diameter(type)` | The diameter of the round bit | +| `ldr_lead_d(type)` | The lead diameter | +| `ldr_pitch(type)` | Pitch between the leads | +| `ldr_thickness(type)` | Thickness | +| `ldr_width(type)` | Across the flats | ### Modules | Module | Description | |:--- |:--- | -| ```LDR(type, lead_length = 3)``` | Draw an LDR, can specify the lead length | +| `LDR(type, lead_length = 3)` | Draw an LDR, can specify the lead length | ![ldrs](tests/png/ldrs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```ldr(large_ldr)``` | Light dependent resistor - large | -| 1 | ```ldr(small_ldr)``` | Light dependent resistor - small | +| 1 | `ldr(large_ldr)` | Light dependent resistor - large | +| 1 | `ldr(small_ldr)` | Light dependent resistor - small | Top @@ -1438,37 +1438,37 @@ Nuts for leadscrews. ### Properties | Function | Description | |:--- |:--- | -| ```leadnut_bore(type)``` | Thread size | -| ```leadnut_flange_dia(type)``` | Flange diameter | -| ```leadnut_flange_offset(type)``` | Offset of the flange from the top | -| ```leadnut_flange_t(type)``` | Flange thickness | -| ```leadnut_height(type)``` | Total height | -| ```leadnut_hole_dia(type)``` | The diameter of the screw holes | -| ```leadnut_hole_pitch(type)``` | The radia pitch of the screw holes | -| ```leadnut_holes(type)``` | The number of screw holes | -| ```leadnut_lead(type)``` | Screw lead | -| ```leadnut_od(type)``` | Outer diameter of the shank | -| ```leadnut_pitch(type)``` | Screw pitch | -| ```leadnut_screw(type)``` | The type of the fixing screws | +| `leadnut_bore(type)` | Thread size | +| `leadnut_flange_dia(type)` | Flange diameter | +| `leadnut_flange_offset(type)` | Offset of the flange from the top | +| `leadnut_flange_t(type)` | Flange thickness | +| `leadnut_height(type)` | Total height | +| `leadnut_hole_dia(type)` | The diameter of the screw holes | +| `leadnut_hole_pitch(type)` | The radia pitch of the screw holes | +| `leadnut_holes(type)` | The number of screw holes | +| `leadnut_lead(type)` | Screw lead | +| `leadnut_od(type)` | Outer diameter of the shank | +| `leadnut_pitch(type)` | Screw pitch | +| `leadnut_screw(type)` | The type of the fixing screws | ### Functions | Function | Description | |:--- |:--- | -| ```leadnut_shank(type)``` | The length of the shank below the flange | +| `leadnut_shank(type)` | The length of the shank below the flange | ### Modules | Module | Description | |:--- |:--- | -| ```leadnut(type)``` | Draw specified leadnut | -| ```leadnut_screw_positions(type)``` | Position children at the screw holes | +| `leadnut(type)` | Draw specified leadnut | +| `leadnut_screw_positions(type)` | Position children at the screw holes | ![leadnuts](tests/png/leadnuts.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```leadnut(LSN8x2)``` | Leadscrew nut 8 x 2 | -| 1 | ```leadnut(LSN8x8)``` | Leadscrew nut 8 x 8 RobotDigg | +| 1 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 | +| 1 | `leadnut(LSN8x8)` | Leadscrew nut 8 x 8 RobotDigg | Top @@ -1492,41 +1492,41 @@ The 7 SEGMENT.TTF font from the [docs](docs) directory needs to be installed to ### Properties | Function | Description | |:--- |:--- | -| ```meter_hole_pitch(type)``` | Lug hole pitch | -| ```meter_hole_radius(type)``` | Lug hole radius | -| ```meter_lug_offset(type)``` | Lug position, 0 = center, +1 = top | -| ```meter_lug_size(type)``` | Lug length and width | -| ```meter_offset(type)``` | Display position, 0 = center, +1 = top | -| ```meter_pcb_size(type)``` | PCB size excluding lugs | -| ```meter_shunt(type)``` | Ammeter shunt wire | -| ```meter_size(type)``` | Size of display | +| `meter_hole_pitch(type)` | Lug hole pitch | +| `meter_hole_radius(type)` | Lug hole radius | +| `meter_lug_offset(type)` | Lug position, 0 = center, +1 = top | +| `meter_lug_size(type)` | Lug length and width | +| `meter_offset(type)` | Display position, 0 = center, +1 = top | +| `meter_pcb_size(type)` | PCB size excluding lugs | +| `meter_shunt(type)` | Ammeter shunt wire | +| `meter_size(type)` | Size of display | ### Functions | Function | Description | |:--- |:--- | -| ```meter_bezel_length(type)``` | Printed bezel length | -| ```meter_bezel_rad(type)``` | Printed bezel corner radius | -| ```meter_bezel_wall(type)``` | Printed bezel wall thickness | -| ```meter_bezel_width(type)``` | Printed bezel width | -| ```meter_shunt_y(type)``` | Shunt y coordinate | +| `meter_bezel_length(type)` | Printed bezel length | +| `meter_bezel_rad(type)` | Printed bezel corner radius | +| `meter_bezel_wall(type)` | Printed bezel wall thickness | +| `meter_bezel_width(type)` | Printed bezel width | +| `meter_shunt_y(type)` | Shunt y coordinate | ### Modules | Module | Description | |:--- |:--- | -| ```meter(type, colour = "red", value = "888", display_colour = false)``` | Draw a meter with optional colour and display value | -| ```meter_assembly(type, colour = "red", value = "888", display_colour = false)``` | Meter assembled into the bezel | -| ```meter_bezel(type)``` | Generate the STL for the meter bezel | -| ```meter_bezel_hole(type, h = 100)``` | Make a hole to fit the meter Bezel | -| ```meter_hole_positions(type)``` | Position children over the holes | +| `meter(type, colour = "red", value = "888", display_colour = false)` | Draw a meter with optional colour and display value | +| `meter_assembly(type, colour = "red", value = "888", display_colour = false)` | Meter assembled into the bezel | +| `meter_bezel(type)` | Generate the STL for the meter bezel | +| `meter_bezel_hole(type, h = 100)` | Make a hole to fit the meter Bezel | +| `meter_hole_positions(type)` | Position children over the holes | ![led_meters](tests/png/led_meters.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```meter(led_ameter, colour = "blue")``` | LED ammeter blue | -| 1 | ```meter(led_meter, colour = "blue")``` | LED voltmeter blue | -| 1 | ```meter(led_meter)``` | LED voltmeter red | +| 1 | `meter(led_ameter, colour = "blue")` | LED ammeter blue | +| 1 | `meter(led_meter, colour = "blue")` | LED voltmeter blue | +| 1 | `meter(led_meter)` | LED voltmeter red | ### Printed | Qty | Filename | @@ -1551,31 +1551,31 @@ Standard domed through hole LEDs. Can specify colour and lead length. ### Properties | Function | Description | |:--- |:--- | -| ```led_diameter(type)``` | Body diameter | -| ```led_height(type)``` | Body height | -| ```led_lead_t(type)``` | Lead thickness | -| ```led_pitch(type)``` | Lead pitch | -| ```led_rim_dia(type)``` | Rim diameter | -| ```led_rim_t(type)``` | Rim height | +| `led_diameter(type)` | Body diameter | +| `led_height(type)` | Body height | +| `led_lead_t(type)` | Lead thickness | +| `led_pitch(type)` | Lead pitch | +| `led_rim_dia(type)` | Rim diameter | +| `led_rim_t(type)` | Rim height | ### Functions | Function | Description | |:--- |:--- | -| ```led_hole_radius(type)``` | Radius of panel hole to accept LED | +| `led_hole_radius(type)` | Radius of panel hole to accept LED | ### Modules | Module | Description | |:--- |:--- | -| ```led(type, colour = "red", lead = 5)``` | Draw specified LED with desired colour and led length | +| `led(type, colour = "red", lead = 5)` | Draw specified LED with desired colour and led length | ![leds](tests/png/leds.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```led(LED10mm)``` | LED 10 mm red | -| 1 | ```led(LED3mm, "green")``` | LED 3 mm green | -| 1 | ```led(LED5mm, "blue")``` | LED 5 mm blue | +| 1 | `led(LED10mm)` | LED 10 mm red | +| 1 | `led(LED3mm, "green")` | LED 3 mm green | +| 1 | `led(LED5mm, "blue")` | LED 5 mm blue | Top @@ -1586,7 +1586,7 @@ Standard domed through hole LEDs. Can specify colour and lead length. LED strip lights that can be cut to size. The definitions are for the full length but they can be cut to size by specifying how many segments, -which can by calcuated using ```light_strip_segments(type, max_length)```. +which can by calcuated using `light_strip_segments(type, max_length)`. The `light_strip_clip()` module makes a clip to go around the light that can be incorporated into a printed bracket to hold it. @@ -1600,39 +1600,39 @@ The `light_strip_clip()` module makes a clip to go around the light that can be ### Properties | Function | Description | |:--- |:--- | -| ```light_strip_aperture(type)``` | Inside width | -| ```light_strip_depth(type)``` | Outside depth | -| ```light_strip_grouped(type)``` | Number of LEDs in each group | -| ```light_strip_leds(type)``` | Total number of LEDs | -| ```light_strip_length(type)``` | Un-cut length | -| ```light_strip_pcb_thickness(type)``` | PCB thickness | -| ```light_strip_thickness(type)``` | Metal thickness | -| ```light_strip_width(type)``` | Outside width | +| `light_strip_aperture(type)` | Inside width | +| `light_strip_depth(type)` | Outside depth | +| `light_strip_grouped(type)` | Number of LEDs in each group | +| `light_strip_leds(type)` | Total number of LEDs | +| `light_strip_length(type)` | Un-cut length | +| `light_strip_pcb_thickness(type)` | PCB thickness | +| `light_strip_thickness(type)` | Metal thickness | +| `light_strip_width(type)` | Outside width | ### Functions | Function | Description | |:--- |:--- | -| ```light_strip_clip_depth(light)``` | Depth of the clip | -| ```light_strip_clip_length(light)``` | Outside length of clip | -| ```light_strip_clip_slot(light)``` | Clip slot size | -| ```light_strip_clip_wall()``` | Clip wall thickness | -| ```light_strip_clip_width(light)``` | Outside width of clip | -| ```light_strip_cut_length(type, segs)``` | Calculate cut length given segments | -| ```light_strip_segments(type, max_length)``` | Calculate the maximum number of segments that fit in max_length | +| `light_strip_clip_depth(light)` | Depth of the clip | +| `light_strip_clip_length(light)` | Outside length of clip | +| `light_strip_clip_slot(light)` | Clip slot size | +| `light_strip_clip_wall()` | Clip wall thickness | +| `light_strip_clip_width(light)` | Outside width of clip | +| `light_strip_cut_length(type, segs)` | Calculate cut length given segments | +| `light_strip_segments(type, max_length)` | Calculate the maximum number of segments that fit in max_length | ### Modules | Module | Description | |:--- |:--- | -| ```light_strip(type, segs = undef)``` | Draw specified light strip, segs can be used to limit the length | -| ```light_strip_clip(light)``` | Make a clip to go over the strip to be incorporated into a bracket | +| `light_strip(type, segs = undef)` | Draw specified light strip, segs can be used to limit the length | +| `light_strip_clip(light)` | Make a clip to go over the strip to be incorporated into a bracket | ![light_strips](tests/png/light_strips.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```light_strip(Rigid5050, 6)``` | Light strip rigid SMD5050 low profile x 250mm (6 segments) | -| 1 | ```light_strip(RIGID5050, 6)``` | Light strip rigid SMD5050 x 250mm (6 segments) | +| 1 | `light_strip(Rigid5050, 6)` | Light strip rigid SMD5050 low profile x 250mm (6 segments) | +| 1 | `light_strip(RIGID5050, 6)` | Light strip rigid SMD5050 x 250mm (6 segments) | Top @@ -1652,44 +1652,44 @@ LMnUU linear bearings. ### Properties | Function | Description | |:--- |:--- | -| ```bearing_dia(type)``` | Outside diameter | -| ```bearing_groove_dia(type)``` | Groove diameter | -| ```bearing_groove_length(type)``` | Groove length | -| ```bearing_groove_spacing(type)``` | Spacing between grooves, outer to outer, ie includes the grooves themselves | -| ```bearing_length(type)``` | Total length | -| ```bearing_rod_dia(type)``` | Internal diameter | +| `bearing_dia(type)` | Outside diameter | +| `bearing_groove_dia(type)` | Groove diameter | +| `bearing_groove_length(type)` | Groove length | +| `bearing_groove_spacing(type)` | Spacing between grooves, outer to outer, ie includes the grooves themselves | +| `bearing_length(type)` | Total length | +| `bearing_rod_dia(type)` | Internal diameter | ### Functions | Function | Description | |:--- |:--- | -| ```bearing_radius(type)``` | Outside radius | +| `bearing_radius(type)` | Outside radius | ### Modules | Module | Description | |:--- |:--- | -| ```linear_bearing(type)``` | Draw specified linear bearing | +| `linear_bearing(type)` | Draw specified linear bearing | ![linear_bearings](tests/png/linear_bearings.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```linear_bearing(LM10LUU)``` | Linear bearing LM10LUU | -| 1 | ```linear_bearing(LM10UU)``` | Linear bearing LM10UU | -| 1 | ```linear_bearing(LM12LUU)``` | Linear bearing LM12LUU | -| 1 | ```linear_bearing(LM12UU)``` | Linear bearing LM12UU | -| 1 | ```linear_bearing(LM16LUU)``` | Linear bearing LM16LUU | -| 1 | ```linear_bearing(LM16UU)``` | Linear bearing LM16UU | -| 1 | ```linear_bearing(LM3LUU)``` | Linear bearing LM3LUU | -| 1 | ```linear_bearing(LM3UU)``` | Linear bearing LM3UU | -| 1 | ```linear_bearing(LM4LUU)``` | Linear bearing LM4LUU | -| 1 | ```linear_bearing(LM4UU)``` | Linear bearing LM4UU | -| 1 | ```linear_bearing(LM5LUU)``` | Linear bearing LM5LUU | -| 1 | ```linear_bearing(LM5UU)``` | Linear bearing LM5UU | -| 1 | ```linear_bearing(LM6LUU)``` | Linear bearing LM6LUU | -| 1 | ```linear_bearing(LM6UU)``` | Linear bearing LM6UU | -| 1 | ```linear_bearing(LM8LUU)``` | Linear bearing LM8LUU | -| 1 | ```linear_bearing(LM8UU)``` | Linear bearing LM8UU | +| 1 | `linear_bearing(LM10LUU)` | Linear bearing LM10LUU | +| 1 | `linear_bearing(LM10UU)` | Linear bearing LM10UU | +| 1 | `linear_bearing(LM12LUU)` | Linear bearing LM12LUU | +| 1 | `linear_bearing(LM12UU)` | Linear bearing LM12UU | +| 1 | `linear_bearing(LM16LUU)` | Linear bearing LM16LUU | +| 1 | `linear_bearing(LM16UU)` | Linear bearing LM16UU | +| 1 | `linear_bearing(LM3LUU)` | Linear bearing LM3LUU | +| 1 | `linear_bearing(LM3UU)` | Linear bearing LM3UU | +| 1 | `linear_bearing(LM4LUU)` | Linear bearing LM4LUU | +| 1 | `linear_bearing(LM4UU)` | Linear bearing LM4UU | +| 1 | `linear_bearing(LM5LUU)` | Linear bearing LM5LUU | +| 1 | `linear_bearing(LM5UU)` | Linear bearing LM5UU | +| 1 | `linear_bearing(LM6LUU)` | Linear bearing LM6LUU | +| 1 | `linear_bearing(LM6UU)` | Linear bearing LM6UU | +| 1 | `linear_bearing(LM8LUU)` | Linear bearing LM8LUU | +| 1 | `linear_bearing(LM8UU)` | Linear bearing LM8UU | Top @@ -1709,15 +1709,15 @@ Cylindrical and ring magnets. ### Properties | Function | Description | |:--- |:--- | -| ```magnet_h(type)``` | Height | -| ```magnet_id(type)``` | Inside diameter if a ring | -| ```magnet_od(type)``` | Outer diameter | -| ```magnet_r(type)``` | Corner radius | +| `magnet_h(type)` | Height | +| `magnet_id(type)` | Inside diameter if a ring | +| `magnet_od(type)` | Outer diameter | +| `magnet_r(type)` | Corner radius | ### Modules | Module | Description | |:--- |:--- | -| ```magnet(type)``` | Draw specified magnet | +| `magnet(type)` | Draw specified magnet | ![magnets](tests/png/magnets.png) @@ -1739,36 +1739,36 @@ UK 13A sockets at the moment. ### Properties | Function | Description | |:--- |:--- | -| ```mains_socket_corner(type)``` | Corner radius | -| ```mains_socket_depth(type)``` | Depth at the base | -| ```mains_socket_height(type)``` | Height | -| ```mains_socket_offset(type)``` | Offset of the socket from the centre | -| ```mains_socket_pitch(type)``` | Screw hole pitch | -| ```mains_socket_t(type)``` | Plastic thickness | -| ```mains_socket_top_d(type)``` | Depth at the top, might be tapered | -| ```mains_socket_top_w(type)``` | Width at the top, might be tapered | -| ```mains_socket_width(type)``` | Width at the base | +| `mains_socket_corner(type)` | Corner radius | +| `mains_socket_depth(type)` | Depth at the base | +| `mains_socket_height(type)` | Height | +| `mains_socket_offset(type)` | Offset of the socket from the centre | +| `mains_socket_pitch(type)` | Screw hole pitch | +| `mains_socket_t(type)` | Plastic thickness | +| `mains_socket_top_d(type)` | Depth at the top, might be tapered | +| `mains_socket_top_w(type)` | Width at the top, might be tapered | +| `mains_socket_width(type)` | Width at the base | ### Functions | Function | Description | |:--- |:--- | -| ```mains_socket_screw(type)``` | Screw type | +| `mains_socket_screw(type)` | Screw type | ### Modules | Module | Description | |:--- |:--- | -| ```mains_socket(type)``` | Draw specified 13A socket | -| ```mains_socket_earth_position(type)``` | Position of earth terminal for DiBond panel | -| ```mains_socket_hole_positions(type)``` | Position children at the screw holes | -| ```mains_socket_holes(type, h = 0)``` | Panel cutout | +| `mains_socket(type)` | Draw specified 13A socket | +| `mains_socket_earth_position(type)` | Position of earth terminal for DiBond panel | +| `mains_socket_hole_positions(type)` | Position children at the screw holes | +| `mains_socket_holes(type, h = 0)` | Panel cutout | ![mains_sockets](tests/png/mains_sockets.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```mains_socket(Contactum)``` | Mains socket 13A | -| 1 | ```mains_socket(MKLOGIC)``` | Mains socket 13A, switched | +| 1 | `mains_socket(Contactum)` | Mains socket 13A | +| 1 | `mains_socket(MKLOGIC)` | Mains socket 13A, switched | Top @@ -1788,41 +1788,41 @@ Used for limit switches. ### Properties | Function | Description | |:--- |:--- | -| ```microswitch_body_clr(type)``` | Body colour | -| ```microswitch_button_clr(type)``` | Button colour | -| ```microswitch_button_pos(type)``` | Button position | -| ```microswitch_button_t(type)``` | Button thickness | -| ```microswitch_button_w(type)``` | Button width | -| ```microswitch_hole_d(type)``` | Screw hole diameter | -| ```microswitch_holes(type)``` | Hole positions | -| ```microswitch_leg(type)``` | Leg types | -| ```microswitch_legs(type)``` | Leg positions | -| ```microswitch_length(type)``` | Body length | -| ```microswitch_radius(type)``` | Body corner radius | -| ```microswitch_thickness(type)``` | Body thickness | -| ```microswitch_width(type)``` | Body width | +| `microswitch_body_clr(type)` | Body colour | +| `microswitch_button_clr(type)` | Button colour | +| `microswitch_button_pos(type)` | Button position | +| `microswitch_button_t(type)` | Button thickness | +| `microswitch_button_w(type)` | Button width | +| `microswitch_hole_d(type)` | Screw hole diameter | +| `microswitch_holes(type)` | Hole positions | +| `microswitch_leg(type)` | Leg types | +| `microswitch_legs(type)` | Leg positions | +| `microswitch_length(type)` | Body length | +| `microswitch_radius(type)` | Body corner radius | +| `microswitch_thickness(type)` | Body thickness | +| `microswitch_width(type)` | Body width | ### Functions | Function | Description | |:--- |:--- | -| ```microswitch_lower_extent(type)``` | How far legs extend downwards | -| ```microswitch_right_extent(type)``` | How far legs extend right | +| `microswitch_lower_extent(type)` | How far legs extend downwards | +| `microswitch_right_extent(type)` | How far legs extend right | ### Modules | Module | Description | |:--- |:--- | -| ```microswitch(type)``` | Draw specified microswitch | -| ```microswitch_hole_positions(type)``` | Place children at the hole positions | -| ```microswitch_wire_positions(type, skip = undef)``` | Place children at the leg hole positions | +| `microswitch(type)` | Draw specified microswitch | +| `microswitch_hole_positions(type)` | Place children at the hole positions | +| `microswitch_wire_positions(type, skip = undef)` | Place children at the leg hole positions | ![microswitches](tests/png/microswitches.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```microswitch(small_microswitch)``` | Microswitch DM1-00P-110-3 | -| 1 | ```microswitch(medium_microswitch)``` | Microswitch SS-01 or SS-5GL | -| 1 | ```microswitch(large_microswitch)``` | Microswitch Saia G3 low force | +| 1 | `microswitch(small_microswitch)` | Microswitch DM1-00P-110-3 | +| 1 | `microswitch(medium_microswitch)` | Microswitch SS-01 or SS-5GL | +| 1 | `microswitch(large_microswitch)` | Microswitch Saia G3 low force | Top @@ -1832,7 +1832,7 @@ Used for limit switches. ## Microview Microview OLED display with on board AVR by geekammo / Sparkfun. -```microview()``` generates the model. ```microview(true)``` makes an object to cut out a panel aperture for it. +`microview()` generates the model. `microview(true)` makes an object to cut out a panel aperture for it. Uses STL files copyright geekammo and licenced with MIT license, see [microview/LICENSE.txt](vitamins/microview/LICENSE.txt). @@ -1844,14 +1844,14 @@ Uses STL files copyright geekammo and licenced with MIT license, see [microview/ ### Modules | Module | Description | |:--- |:--- | -| ```microview(cutout = false)``` | Draw microview or generate a panel cutout for it | +| `microview(cutout = false)` | Draw microview or generate a panel cutout for it | ![microview](tests/png/microview.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```microview()``` | Microview OLED display | +| 1 | `microview()` | Microview OLED display | Top @@ -1871,31 +1871,31 @@ Random screw down modules. Currently just DROK buck converters. ### Properties | Function | Description | |:--- |:--- | -| ```mod_height(type)``` | Body height | -| ```mod_hole_r(type)``` | Screw hole radius | -| ```mod_holes(type)``` | Screw hole positions | -| ```mod_length(type)``` | Body length | -| ```mod_part(type)``` | Description | -| ```mod_screw(type)``` | Screw type | -| ```mod_screw_z(type)``` | Thickness of screw lug | -| ```mod_width(type)``` | Body width | +| `mod_height(type)` | Body height | +| `mod_hole_r(type)` | Screw hole radius | +| `mod_holes(type)` | Screw hole positions | +| `mod_length(type)` | Body length | +| `mod_part(type)` | Description | +| `mod_screw(type)` | Screw type | +| `mod_screw_z(type)` | Thickness of screw lug | +| `mod_width(type)` | Body width | ### Modules | Module | Description | |:--- |:--- | -| ```mod(type)``` | Draw specified module | -| ```mod_screw_positions(type)``` | Position children at the screw positions | -| ```module_assembly(type, thickness)``` | Module with its fasteners in place | +| `mod(type)` | Draw specified module | +| `mod_screw_positions(type)` | Position children at the screw positions | +| `module_assembly(type, thickness)` | Module with its fasteners in place | ![modules](tests/png/modules.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```mod(drok_buck)``` | Drok buck converter | -| 2 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 2 | ```screw(M4_dome_screw, 12)``` | Screw M4 dome x 12mm | -| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `mod(drok_buck)` | Drok buck converter | +| 2 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 2 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm | +| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -1917,66 +1917,66 @@ If a nut is given a child then it gets placed on its top surface. ### Properties | Function | Description | |:--- |:--- | -| ```nut_pitch(type)``` | Pitch if not standard metric course thread | -| ```nut_radius(type)``` | Radius across the corners | -| ```nut_size(type)``` | Diameter of the corresponding screw | -| ```nut_square_size(type)``` | Diameter of the corresponding screw | -| ```nut_square_thickness(type)``` | Thickness of the square nut | -| ```nut_square_width(type)``` | Width of the square nut | -| ```nut_trap_depth(type)``` | Depth of nut trap | -| ```nut_washer(type)``` | Corresponding washer | +| `nut_pitch(type)` | Pitch if not standard metric course thread | +| `nut_radius(type)` | Radius across the corners | +| `nut_size(type)` | Diameter of the corresponding screw | +| `nut_square_size(type)` | Diameter of the corresponding screw | +| `nut_square_thickness(type)` | Thickness of the square nut | +| `nut_square_width(type)` | Width of the square nut | +| `nut_trap_depth(type)` | Depth of nut trap | +| `nut_washer(type)` | Corresponding washer | ### Functions | Function | Description | |:--- |:--- | -| ```nut_flat_radius(type)``` | Radius across the flats | -| ```nut_thickness(type, nyloc = false)``` | Thickness of plain or nyloc version | -| ```nut_trap_flat_radius(nut, horizontal = false)``` | Radius across the flats of a nut trap | -| ```nut_trap_radius(nut, horizontal = false)``` | Radius across the corners of a nut trap | +| `nut_flat_radius(type)` | Radius across the flats | +| `nut_thickness(type, nyloc = false)` | Thickness of plain or nyloc version | +| `nut_trap_flat_radius(nut, horizontal = false)` | Radius across the flats of a nut trap | +| `nut_trap_radius(nut, horizontal = false)` | Radius across the corners of a nut trap | ### Modules | Module | Description | |:--- |:--- | -| ```nut(type, nyloc = false, brass = false, nylon = false)``` | Draw specified nut | -| ```nut_and_washer(type, nyloc)``` | Draw nut with corresponding washer | -| ```nut_square(type, brass = false, nylon = false)``` | Draw specified square nut | -| ```nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200)``` | Make a nut trap | -| ```wingnut(type)``` | Draw a wingnut | +| `nut(type, nyloc = false, brass = false, nylon = false)` | Draw specified nut | +| `nut_and_washer(type, nyloc)` | Draw nut with corresponding washer | +| `nut_square(type, brass = false, nylon = false)` | Draw specified square nut | +| `nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200)` | Make a nut trap | +| `wingnut(type)` | Draw a wingnut | ![nuts](tests/png/nuts.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```nut(M2_nut)``` | Nut M2 x 1.6mm | -| 1 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | -| 1 | ```nut(M2p5_nut)``` | Nut M2.5 x 2.2mm | -| 1 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc | -| 1 | ```nut(M2p5_nut, nylon = true)``` | Nut M2.5 x 2.2mm nylon | -| 1 | ```sliding_t_nut(M3_hammer_nut)``` | Nut M3 hammer | -| 1 | ```sliding_t_nut(M3_sliding_t_nut)``` | Nut M3 sliding T | -| 1 | ```nut(M3_nut)``` | Nut M3 x 2.4mm | -| 1 | ```nut(M3_nut, brass = true)``` | Nut M3 x 2.4mm brass | -| 1 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 1 | ```nut(M3nS_thin_nut)``` | Nut M3nS 5.5 x 1.8mm | -| 1 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer | -| 1 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T | -| 1 | ```nut(M4_nut)``` | Nut M4 x 3.2mm | -| 1 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 1 | ```nut(M4nS_thin_nut)``` | Nut M4nS 7 x 2.2mm | -| 1 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T | -| 1 | ```nut(M5_nut)``` | Nut M5 x 4mm | -| 1 | ```nut(M5_nut, nyloc = true)``` | Nut M5 x 4mm nyloc | -| 1 | ```nut(M5nS_thin_nut)``` | Nut M5nS 8 x 2.7mm | -| 1 | ```nut(M6_half_nut)``` | Nut M6 x 3mm | -| 1 | ```nut(M6_nut)``` | Nut M6 x 5mm | -| 1 | ```nut(M6_nut, nyloc = true)``` | Nut M6 x 5mm nyloc | -| 1 | ```nut(M6nS_thin_nut)``` | Nut M6nS 10 x 3.2mm | -| 1 | ```nut(M8_nut)``` | Nut M8 x 6.5mm | -| 1 | ```nut(M8_nut, nyloc = true)``` | Nut M8 x 6.5mm nyloc | -| 1 | ```nut(M8nS_thin_nut)``` | Nut M8nS 13 x 4mm | -| 1 | ```washer(M6_washer)``` | Washer M6 x 12.5mm x 1.5mm | -| 1 | ```wingnut(M4_wingnut)``` | Wingnut M4 | +| 1 | `nut(M2_nut)` | Nut M2 x 1.6mm | +| 1 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | +| 1 | `nut(M2p5_nut)` | Nut M2.5 x 2.2mm | +| 1 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc | +| 1 | `nut(M2p5_nut, nylon = true)` | Nut M2.5 x 2.2mm nylon | +| 1 | `sliding_t_nut(M3_hammer_nut)` | Nut M3 hammer | +| 1 | `sliding_t_nut(M3_sliding_t_nut)` | Nut M3 sliding T | +| 1 | `nut(M3_nut)` | Nut M3 x 2.4mm | +| 1 | `nut(M3_nut, brass = true)` | Nut M3 x 2.4mm brass | +| 1 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 1 | `nut(M3nS_thin_nut)` | Nut M3nS 5.5 x 1.8mm | +| 1 | `sliding_t_nut(M4_hammer_nut)` | Nut M4 hammer | +| 1 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T | +| 1 | `nut(M4_nut)` | Nut M4 x 3.2mm | +| 1 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 1 | `nut(M4nS_thin_nut)` | Nut M4nS 7 x 2.2mm | +| 1 | `sliding_t_nut(M5_sliding_t_nut)` | Nut M5 sliding T | +| 1 | `nut(M5_nut)` | Nut M5 x 4mm | +| 1 | `nut(M5_nut, nyloc = true)` | Nut M5 x 4mm nyloc | +| 1 | `nut(M5nS_thin_nut)` | Nut M5nS 8 x 2.7mm | +| 1 | `nut(M6_half_nut)` | Nut M6 x 3mm | +| 1 | `nut(M6_nut)` | Nut M6 x 5mm | +| 1 | `nut(M6_nut, nyloc = true)` | Nut M6 x 5mm nyloc | +| 1 | `nut(M6nS_thin_nut)` | Nut M6nS 10 x 3.2mm | +| 1 | `nut(M8_nut)` | Nut M8 x 6.5mm | +| 1 | `nut(M8_nut, nyloc = true)` | Nut M8 x 6.5mm nyloc | +| 1 | `nut(M8nS_thin_nut)` | Nut M8nS 13 x 4mm | +| 1 | `washer(M6_washer)` | Washer M6 x 12.5mm x 1.5mm | +| 1 | `wingnut(M4_wingnut)` | Wingnut M4 | Top @@ -1986,8 +1986,8 @@ If a nut is given a child then it gets placed on its top surface. ## O_ring Nitrile rubber O-rings. -Just a black torus specified by internal diameter, ```id``` and ```minor_d``` plus a BOM entry. -Can be shown stretched by specifying the ```actual_id```. +Just a black torus specified by internal diameter, `id` and `minor_d` plus a BOM entry. +Can be shown stretched by specifying the `actual_id`. [vitamins/o_ring.scad](vitamins/o_ring.scad) Implementation. @@ -1997,14 +1997,14 @@ Can be shown stretched by specifying the ```actual_id```. ### Modules | Module | Description | |:--- |:--- | -| ```O_ring(id, minor_d, actual_id = 0)``` | Draw O-ring with specified internal diameter and minor diameter. ```actual_id``` can be used to stretch it around something. | +| `O_ring(id, minor_d, actual_id = 0)` | Draw O-ring with specified internal diameter and minor diameter. `actual_id` can be used to stretch it around something. | ![o_ring](tests/png/o_ring.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```O_ring(2.5, 1.6)``` | O-ring nitrile 2.5mm x 1.6mm | +| 1 | `O_ring(2.5, 1.6)` | O-ring nitrile 2.5mm x 1.6mm | Top @@ -2024,27 +2024,27 @@ A permanent magnet that can be magnatized and de-magnatized electronically. ### Functions | Function | Description | |:--- |:--- | -| ```opengrab_depth()``` | Module height | -| ```opengrab_pcb()``` | The PCB | -| ```opengrab_pcb_z()``` | PCB offset from the front | -| ```opengrab_target_thickness()``` | Target sheet thickness | -| ```opengrab_width()``` | Module width | +| `opengrab_depth()` | Module height | +| `opengrab_pcb()` | The PCB | +| `opengrab_pcb_z()` | PCB offset from the front | +| `opengrab_target_thickness()` | Target sheet thickness | +| `opengrab_width()` | Module width | ### Modules | Module | Description | |:--- |:--- | -| ```opengrab()``` | Draw OpenGrab module | -| ```opengrab_hole_positions()``` | Position children at the screw positions | -| ```opengrab_side_hole_positions()``` | Position children at the two 4mm hole | -| ```opengrab_target()``` | Draw OpenGrab target | +| `opengrab()` | Draw OpenGrab module | +| `opengrab_hole_positions()` | Position children at the screw positions | +| `opengrab_side_hole_positions()` | Position children at the two 4mm hole | +| `opengrab_target()` | Draw OpenGrab target | ![opengrab](tests/png/opengrab.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet | -| 1 | ```opengrab_target()``` | OpenGrab silicon steel target plate | +| 1 | `opengrab()` | OpenGrab V3 electro permanent magnet | +| 1 | `opengrab_target()` | OpenGrab silicon steel target plate | Top @@ -2069,46 +2069,46 @@ Notes on the DSN_VC288: ### Properties | Function | Description | |:--- |:--- | -| ```pmeter_aperture(type)``` | Aperture length, width and bevel | -| ```pmeter_bevel(type)``` | Bezel bevel inset and start height or a radius | -| ```pmeter_bezel(type)``` | Bezel size | -| ```pmeter_bezel_r(type)``` | Bezel radius | -| ```pmeter_button_colour(type)``` | Button colour | -| ```pmeter_button_pos(type)``` | Button position | -| ```pmeter_button_r(type)``` | Button radius | -| ```pmeter_button_size(type)``` | Button size | -| ```pmeter_buttons(type)``` | List of buttons | -| ```pmeter_inner_ap(type)``` | Inner aperture | -| ```pmeter_inner_ap_o(type)``` | Inner aperture offset | -| ```pmeter_pcb(type)``` | Optional PCB for open types | -| ```pmeter_pcb_h(type)``` | Component height from the front | -| ```pmeter_pcb_z(type)``` | Distance of PCB from the back | -| ```pmeter_size(type)``` | Body size including bezel height | -| ```pmeter_tab(type)``` | Tab size | -| ```pmeter_tab_z(type)``` | Tab vertical position | -| ```pmeter_thickness(type)``` | Wall thickness if not closed | +| `pmeter_aperture(type)` | Aperture length, width and bevel | +| `pmeter_bevel(type)` | Bezel bevel inset and start height or a radius | +| `pmeter_bezel(type)` | Bezel size | +| `pmeter_bezel_r(type)` | Bezel radius | +| `pmeter_button_colour(type)` | Button colour | +| `pmeter_button_pos(type)` | Button position | +| `pmeter_button_r(type)` | Button radius | +| `pmeter_button_size(type)` | Button size | +| `pmeter_buttons(type)` | List of buttons | +| `pmeter_inner_ap(type)` | Inner aperture | +| `pmeter_inner_ap_o(type)` | Inner aperture offset | +| `pmeter_pcb(type)` | Optional PCB for open types | +| `pmeter_pcb_h(type)` | Component height from the front | +| `pmeter_pcb_z(type)` | Distance of PCB from the back | +| `pmeter_size(type)` | Body size including bezel height | +| `pmeter_tab(type)` | Tab size | +| `pmeter_tab_z(type)` | Tab vertical position | +| `pmeter_thickness(type)` | Wall thickness if not closed | ### Functions | Function | Description | |:--- |:--- | -| ```pmeter_depth(type)``` | Depth below bezel | +| `pmeter_depth(type)` | Depth below bezel | ### Modules | Module | Description | |:--- |:--- | -| ```panel_meter(type)``` | Draw panel mounted LCD meter module | -| ```panel_meter_button(type)``` | Draw panel meter button | -| ```panel_meter_cutout(type, h = 0)``` | Make panel cutout | +| `panel_meter(type)` | Draw panel mounted LCD meter module | +| `panel_meter_button(type)` | Draw panel meter button | +| `panel_meter_cutout(type, h = 0)` | Make panel cutout | ![panel_meters](tests/png/panel_meters.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```panel_meter(DSN_VC288)``` | DSN-VC288 DC 100V 10A Voltmeter ammeter | -| 1 | ```panel_meter(PZEM001)``` | Peacefair PZEM-001 AC digital multi-function meter | -| 1 | ```panel_meter(PZEM021)``` | Peacefair PZEM-021 AC digital multi-function meter | -| 1 | ```panel_meter(DSP5005)``` | Ruideng DSP5005 Power supply module | +| 1 | `panel_meter(DSN_VC288)` | DSN-VC288 DC 100V 10A Voltmeter ammeter | +| 1 | `panel_meter(PZEM001)` | Peacefair PZEM-001 AC digital multi-function meter | +| 1 | `panel_meter(PZEM021)` | Peacefair PZEM-021 AC digital multi-function meter | +| 1 | `panel_meter(DSP5005)` | Ruideng DSP5005 Power supply module | Top @@ -2126,124 +2126,124 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o ### Properties | Function | Description | |:--- |:--- | -| ```ff_back(type)``` | Flat flex back section size | -| ```ff_latch(type)``` | Flat flex latch size | -| ```ff_mid(type)``` | Flat flex middle section size | -| ```ff_slot(type)``` | Flat flex slot size | -| ```hdmi_depth(type)``` | Front to back depth | -| ```hdmi_height(type)``` | Outside height above the PCB | -| ```hdmi_height1(type)``` | Inside height at the sides | -| ```hdmi_height2(type)``` | Inside height in the middle | -| ```hdmi_thickness(type)``` | Wall thickness of the metal | -| ```hdmi_width1(type)``` | Inside width at the top | -| ```hdmi_width2(type)``` | Inside width at the bottom | -| ```pcb_accessories(type)``` | List of accessories to go on the BOM, SD cards, USB cables, etc. | -| ```pcb_colour(type)``` | Colour of the subtrate | -| ```pcb_components(type)``` | List of components | -| ```pcb_grid(type)``` | Grid if a perfboard | -| ```pcb_hole_d(type)``` | Mounting hole diameter | -| ```pcb_holes(type)``` | List of hole positions | -| ```pcb_land_d(type)``` | Pad around mounting hole | -| ```pcb_length(type)``` | Length | -| ```pcb_name(type)``` | Description | -| ```pcb_parts_on_bom(type)``` | True if the parts should be separate BOM items | -| ```pcb_polygon(type)``` | Optional outline polygon for odd shaped boards | -| ```pcb_radius(type)``` | Corner radius | -| ```pcb_thickness(type)``` | Thickness | -| ```pcb_width(type)``` | Width | +| `ff_back(type)` | Flat flex back section size | +| `ff_latch(type)` | Flat flex latch size | +| `ff_mid(type)` | Flat flex middle section size | +| `ff_slot(type)` | Flat flex slot size | +| `hdmi_depth(type)` | Front to back depth | +| `hdmi_height(type)` | Outside height above the PCB | +| `hdmi_height1(type)` | Inside height at the sides | +| `hdmi_height2(type)` | Inside height in the middle | +| `hdmi_thickness(type)` | Wall thickness of the metal | +| `hdmi_width1(type)` | Inside width at the top | +| `hdmi_width2(type)` | Inside width at the bottom | +| `pcb_accessories(type)` | List of accessories to go on the BOM, SD cards, USB cables, etc. | +| `pcb_colour(type)` | Colour of the subtrate | +| `pcb_components(type)` | List of components | +| `pcb_grid(type)` | Grid if a perfboard | +| `pcb_hole_d(type)` | Mounting hole diameter | +| `pcb_holes(type)` | List of hole positions | +| `pcb_land_d(type)` | Pad around mounting hole | +| `pcb_length(type)` | Length | +| `pcb_name(type)` | Description | +| `pcb_parts_on_bom(type)` | True if the parts should be separate BOM items | +| `pcb_polygon(type)` | Optional outline polygon for odd shaped boards | +| `pcb_radius(type)` | Corner radius | +| `pcb_thickness(type)` | Thickness | +| `pcb_width(type)` | Width | ### Functions | Function | Description | |:--- |:--- | -| ```pcb_component_position(type, name, index = 0)``` | Return x y position of specified component | -| ```pcb_coord(type, p)``` | Convert offsets from the edge to coordinates relative to the centre | -| ```pcb_grid_pos(type, x, y, z = 0)``` | Returns a pcb grid position | -| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type | -| ```pcb_size(type)``` | Length, width and thickness in a vector | +| `pcb_component_position(type, name, index = 0)` | Return x y position of specified component | +| `pcb_coord(type, p)` | Convert offsets from the edge to coordinates relative to the centre | +| `pcb_grid_pos(type, x, y, z = 0)` | Returns a pcb grid position | +| `pcb_screw(type, cap = hs_cap)` | Mounting screw type | +| `pcb_size(type)` | Length, width and thickness in a vector | ### Modules | Module | Description | |:--- |:--- | -| ```barrel_jack(cutout = false)``` | Draw barrel power jack | -| ```block(size, colour, makes_cutout, cutouts)``` | Draw a coloured cube to represent a random PCB component | -| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and colour | -| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component | -| ```flat_flex(type, cutout = false)``` | Draw flat flexistrip connector as used on RPI0 | -| ```flex(cutout = false)``` | Draw flexistrip connector | -| ```hdmi(type, cutout = false)``` | Draw HDMI socket | -| ```jack(cutout = false)``` | Draw 3.5mm jack | -| ```molex_254(ways)``` | Draw molex header | -| ```molex_usb_Ax2(cutout)``` | Draw Molex USB connector suitable for perf board | -| ```pcb(type)``` | Draw specified PCB | -| ```pcb_assembly(type, height, thickness)``` | Draw PCB assembly with spaces and fasteners in place | -| ```pcb_base(type, height, thickness, wall = 2)``` | Generate STL for a base with PCB spacers | -| ```pcb_component(comp, cutouts = false, angle = undef)``` | Draw pcb component from description | -| ```pcb_component_position(type, name)``` | Position child at the specified component position | -| ```pcb_components(type, cutouts = false, angle = undef)``` | Draw list of PCB components on the PCB | -| ```pcb_cutouts(type, angle = undef)``` | Make cut outs to clear components on a PCB | -| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid position | -| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions | -| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer | -| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector | -| ```standoff(h, d, h2, d2)``` | Draw a standoff | -| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block | -| ```trimpot10(vertical, cutout = false)``` | Draw a ten turn trimpot | -| ```uSD(size, cutout = false)``` | Draw uSD socket | -| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket | -| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket | -| ```usb_B(cutout = false)``` | Draw USB B connector | -| ```usb_C(cutout = false)``` | Draw USB C connector | -| ```usb_uA(cutout = false)``` | Draw USB micro A connector | +| `barrel_jack(cutout = false)` | Draw barrel power jack | +| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component | +| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour | +| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component | +| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 | +| `flex(cutout = false)` | Draw flexistrip connector | +| `hdmi(type, cutout = false)` | Draw HDMI socket | +| `jack(cutout = false)` | Draw 3.5mm jack | +| `molex_254(ways)` | Draw molex header | +| `molex_usb_Ax2(cutout)` | Draw Molex USB connector suitable for perf board | +| `pcb(type)` | Draw specified PCB | +| `pcb_assembly(type, height, thickness)` | Draw PCB assembly with spaces and fasteners in place | +| `pcb_base(type, height, thickness, wall = 2)` | Generate STL for a base with PCB spacers | +| `pcb_component(comp, cutouts = false, angle = undef)` | Draw pcb component from description | +| `pcb_component_position(type, name)` | Position child at the specified component position | +| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB | +| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB | +| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position | +| `pcb_screw_positions(type)` | Positions children at the mounting hole positions | +| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer | +| `rj45(cutout = false)` | Draw RJ45 Ethernet connector | +| `standoff(h, d, h2, d2)` | Draw a standoff | +| `terminal_35(ways, colour = "blue")` | Draw 3.5mm terminal block | +| `trimpot10(vertical, cutout = false)` | Draw a ten turn trimpot | +| `uSD(size, cutout = false)` | Draw uSD socket | +| `usb_Ax1(cutout = false)` | Draw USB type A single socket | +| `usb_Ax2(cutout = false)` | Draw USB type A dual socket | +| `usb_B(cutout = false)` | Draw USB B connector | +| `usb_C(cutout = false)` | Draw USB C connector | +| `usb_uA(cutout = false)` | Draw USB micro A connector | ![pcb](tests/png/pcb.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```box_header(2p54header, 4, 2)``` | Box header 4 x 2 | -| 1 | ```d_plug(DCONN9, pcb = true)``` | D-type 9 way PCB mount plug | -| 1 | ```dil_socket(12, 15.24)``` | DIL socket 24 x 0.6" | -| 1 | ```hdmi(hdmi_full)``` | HDMI socket | -| 1 | ```pdip(24, 27C32, w = 15.24)``` | IC 27C32 PDIP24 | -| 1 | ```pdip(8, NE555)``` | IC NE555 PDIP8 | -| 1 | ```idc_transition(2p54header, 5)``` | IDC transition header 5 x 2 | -| 1 | ```led(LED10mm, "yellow")``` | LED 10 mm yellow | -| 1 | ```led(LED3mm)``` | LED 3 mm red | -| 1 | ```led(LED5mm, "orange")``` | LED 5 mm orange | -| 1 | ```microswitch(small_microswitch)``` | Microswitch DM1-00P-110-3 | -| 1 | ```hdmi(hdmi_mini)``` | Mini HDMI socket | -| 1 | ```molex_254(2)``` | Molex KK header 2 way | -| 1 | ```pin_header(2p54header, 4, 1)``` | Pin header 4 x 1 | -| 1 | ```pin_header(2p54header, 5, 1)``` | Pin header 5 x 1 | -| 1 | ```pin_socket(2p54header, 4, 1)``` | Pin socket 4 x 1 | -| 1 | ```pin_socket(2p54header, 6, 1)``` | Pin socket 6 x 1 | -| 2 | ```pin_socket(2p54header, 8, 1)``` | Pin socket 8 x 1 | -| 1 | ```ax_res(res1_2, 10, tol = 10)``` | Resistor 10 Ohms 10% 0.5W | -| 1 | ```ax_res(res1_4, 100, tol = 2)``` | Resistor 100 Ohms 2% 0.25W | -| 1 | ```ax_res(res1_8, 1000)``` | Resistor 1000 Ohms 5% 0.125W | -| 1 | ```ax_res(res1_4, 10000)``` | Resistor 10000 Ohms 5% 0.25W | -| 1 | ```ax_res(res1_2, 100000)``` | Resistor 100000 Ohms 5% 0.5W | -| 1 | ```ax_res(res1_8, 1e+6, tol = 1)``` | Resistor 1e+6 Ohms 1% 0.125W | -| 1 | ```smd_led(LED0603, orange)``` | SMD LED 0603 orange | -| 1 | ```smd_led(LED0805, red)``` | SMD LED 0805 red | -| 1 | ```smd_resistor(RES0603, 1K)``` | SMD resistor 0603 1K 0.1W | -| 1 | ```smd_resistor(RES0805, 1K)``` | SMD resistor 0805 1K 0.125W | -| 1 | ```smd_resistor(RES1206, 1K)``` | SMD resistor 1206 1K 0.25W | -| 1 | ```square_button(button_4p5mm)``` | Square button 4.5mm | -| 1 | ```square_button(button_6mm)``` | Square button 6mm | -| 1 | ```pcb(TMC2130)``` | TMC2130 | -| 1 | ```green_terminal(gt_5p08, 2)``` | Terminal block 2 way 0.2" | -| 2 | ```green_terminal(gt_6p35, 2)``` | Terminal block 2 way 0.25" | -| 1 | ```green_terminal(gt_5x17, 2)``` | Terminal block 2 way 5mm | -| 2 | ```green_terminal(gt_2p54, 3)``` | Terminal block 3 way 0.1" | -| 1 | ```terminal_35(3)``` | Terminal block 3 way 3.5mm | -| 1 | ```green_terminal(gt_5x11, 3)``` | Terminal block 3 way 5mm | -| 1 | ```green_terminal(gt_5x17, 3)``` | Terminal block 3 way 5mm | -| 2 | ```green_terminal(gt_3p5, 4)``` | Terminal block 4 way 3.5mm | -| 1 | ```terminal_35(4)``` | Terminal block 4 way 3.5mm | -| 1 | ```pcb(TestPCB)``` | Test PCB | -| 1 | ```wire_link(0.8, 5.08, h = 10.16)``` | Wire link 0.8mm x 0.2" | -| 1 | ```wire_link(0.8, 10.16)``` | Wire link 0.8mm x 0.4" | +| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 | +| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug | +| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" | +| 1 | `hdmi(hdmi_full)` | HDMI socket | +| 1 | `pdip(24, 27C32, w = 15.24)` | IC 27C32 PDIP24 | +| 1 | `pdip(8, NE555)` | IC NE555 PDIP8 | +| 1 | `idc_transition(2p54header, 5)` | IDC transition header 5 x 2 | +| 1 | `led(LED10mm, "yellow")` | LED 10 mm yellow | +| 1 | `led(LED3mm)` | LED 3 mm red | +| 1 | `led(LED5mm, "orange")` | LED 5 mm orange | +| 1 | `microswitch(small_microswitch)` | Microswitch DM1-00P-110-3 | +| 1 | `hdmi(hdmi_mini)` | Mini HDMI socket | +| 1 | `molex_254(2)` | Molex KK header 2 way | +| 1 | `pin_header(2p54header, 4, 1)` | Pin header 4 x 1 | +| 1 | `pin_header(2p54header, 5, 1)` | Pin header 5 x 1 | +| 1 | `pin_socket(2p54header, 4, 1)` | Pin socket 4 x 1 | +| 1 | `pin_socket(2p54header, 6, 1)` | Pin socket 6 x 1 | +| 2 | `pin_socket(2p54header, 8, 1)` | Pin socket 8 x 1 | +| 1 | `ax_res(res1_2, 10, tol = 10)` | Resistor 10 Ohms 10% 0.5W | +| 1 | `ax_res(res1_4, 100, tol = 2)` | Resistor 100 Ohms 2% 0.25W | +| 1 | `ax_res(res1_8, 1000)` | Resistor 1000 Ohms 5% 0.125W | +| 1 | `ax_res(res1_4, 10000)` | Resistor 10000 Ohms 5% 0.25W | +| 1 | `ax_res(res1_2, 100000)` | Resistor 100000 Ohms 5% 0.5W | +| 1 | `ax_res(res1_8, 1e+6, tol = 1)` | Resistor 1e+6 Ohms 1% 0.125W | +| 1 | `smd_led(LED0603, orange)` | SMD LED 0603 orange | +| 1 | `smd_led(LED0805, red)` | SMD LED 0805 red | +| 1 | `smd_resistor(RES0603, 1K)` | SMD resistor 0603 1K 0.1W | +| 1 | `smd_resistor(RES0805, 1K)` | SMD resistor 0805 1K 0.125W | +| 1 | `smd_resistor(RES1206, 1K)` | SMD resistor 1206 1K 0.25W | +| 1 | `square_button(button_4p5mm)` | Square button 4.5mm | +| 1 | `square_button(button_6mm)` | Square button 6mm | +| 1 | `pcb(TMC2130)` | TMC2130 | +| 1 | `green_terminal(gt_5p08, 2)` | Terminal block 2 way 0.2" | +| 2 | `green_terminal(gt_6p35, 2)` | Terminal block 2 way 0.25" | +| 1 | `green_terminal(gt_5x17, 2)` | Terminal block 2 way 5mm | +| 2 | `green_terminal(gt_2p54, 3)` | Terminal block 3 way 0.1" | +| 1 | `terminal_35(3)` | Terminal block 3 way 3.5mm | +| 1 | `green_terminal(gt_5x11, 3)` | Terminal block 3 way 5mm | +| 1 | `green_terminal(gt_5x17, 3)` | Terminal block 3 way 5mm | +| 2 | `green_terminal(gt_3p5, 4)` | Terminal block 4 way 3.5mm | +| 1 | `terminal_35(4)` | Terminal block 4 way 3.5mm | +| 1 | `pcb(TestPCB)` | Test PCB | +| 1 | `wire_link(0.8, 5.08, h = 10.16)` | Wire link 0.8mm x 0.2" | +| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" | Top @@ -2263,130 +2263,130 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o ### Properties | Function | Description | |:--- |:--- | -| ```ff_back(type)``` | Flat flex back section size | -| ```ff_latch(type)``` | Flat flex latch size | -| ```ff_mid(type)``` | Flat flex middle section size | -| ```ff_slot(type)``` | Flat flex slot size | -| ```hdmi_depth(type)``` | Front to back depth | -| ```hdmi_height(type)``` | Outside height above the PCB | -| ```hdmi_height1(type)``` | Inside height at the sides | -| ```hdmi_height2(type)``` | Inside height in the middle | -| ```hdmi_thickness(type)``` | Wall thickness of the metal | -| ```hdmi_width1(type)``` | Inside width at the top | -| ```hdmi_width2(type)``` | Inside width at the bottom | -| ```pcb_accessories(type)``` | List of accessories to go on the BOM, SD cards, USB cables, etc. | -| ```pcb_colour(type)``` | Colour of the subtrate | -| ```pcb_components(type)``` | List of components | -| ```pcb_grid(type)``` | Grid if a perfboard | -| ```pcb_hole_d(type)``` | Mounting hole diameter | -| ```pcb_holes(type)``` | List of hole positions | -| ```pcb_land_d(type)``` | Pad around mounting hole | -| ```pcb_length(type)``` | Length | -| ```pcb_name(type)``` | Description | -| ```pcb_parts_on_bom(type)``` | True if the parts should be separate BOM items | -| ```pcb_polygon(type)``` | Optional outline polygon for odd shaped boards | -| ```pcb_radius(type)``` | Corner radius | -| ```pcb_thickness(type)``` | Thickness | -| ```pcb_width(type)``` | Width | +| `ff_back(type)` | Flat flex back section size | +| `ff_latch(type)` | Flat flex latch size | +| `ff_mid(type)` | Flat flex middle section size | +| `ff_slot(type)` | Flat flex slot size | +| `hdmi_depth(type)` | Front to back depth | +| `hdmi_height(type)` | Outside height above the PCB | +| `hdmi_height1(type)` | Inside height at the sides | +| `hdmi_height2(type)` | Inside height in the middle | +| `hdmi_thickness(type)` | Wall thickness of the metal | +| `hdmi_width1(type)` | Inside width at the top | +| `hdmi_width2(type)` | Inside width at the bottom | +| `pcb_accessories(type)` | List of accessories to go on the BOM, SD cards, USB cables, etc. | +| `pcb_colour(type)` | Colour of the subtrate | +| `pcb_components(type)` | List of components | +| `pcb_grid(type)` | Grid if a perfboard | +| `pcb_hole_d(type)` | Mounting hole diameter | +| `pcb_holes(type)` | List of hole positions | +| `pcb_land_d(type)` | Pad around mounting hole | +| `pcb_length(type)` | Length | +| `pcb_name(type)` | Description | +| `pcb_parts_on_bom(type)` | True if the parts should be separate BOM items | +| `pcb_polygon(type)` | Optional outline polygon for odd shaped boards | +| `pcb_radius(type)` | Corner radius | +| `pcb_thickness(type)` | Thickness | +| `pcb_width(type)` | Width | ### Functions | Function | Description | |:--- |:--- | -| ```pcb_component_position(type, name, index = 0)``` | Return x y position of specified component | -| ```pcb_coord(type, p)``` | Convert offsets from the edge to coordinates relative to the centre | -| ```pcb_grid_pos(type, x, y, z = 0)``` | Returns a pcb grid position | -| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type | -| ```pcb_size(type)``` | Length, width and thickness in a vector | +| `pcb_component_position(type, name, index = 0)` | Return x y position of specified component | +| `pcb_coord(type, p)` | Convert offsets from the edge to coordinates relative to the centre | +| `pcb_grid_pos(type, x, y, z = 0)` | Returns a pcb grid position | +| `pcb_screw(type, cap = hs_cap)` | Mounting screw type | +| `pcb_size(type)` | Length, width and thickness in a vector | ### Modules | Module | Description | |:--- |:--- | -| ```barrel_jack(cutout = false)``` | Draw barrel power jack | -| ```block(size, colour, makes_cutout, cutouts)``` | Draw a coloured cube to represent a random PCB component | -| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and colour | -| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component | -| ```flat_flex(type, cutout = false)``` | Draw flat flexistrip connector as used on RPI0 | -| ```flex(cutout = false)``` | Draw flexistrip connector | -| ```hdmi(type, cutout = false)``` | Draw HDMI socket | -| ```jack(cutout = false)``` | Draw 3.5mm jack | -| ```molex_254(ways)``` | Draw molex header | -| ```molex_usb_Ax2(cutout)``` | Draw Molex USB connector suitable for perf board | -| ```pcb(type)``` | Draw specified PCB | -| ```pcb_assembly(type, height, thickness)``` | Draw PCB assembly with spaces and fasteners in place | -| ```pcb_base(type, height, thickness, wall = 2)``` | Generate STL for a base with PCB spacers | -| ```pcb_component(comp, cutouts = false, angle = undef)``` | Draw pcb component from description | -| ```pcb_component_position(type, name)``` | Position child at the specified component position | -| ```pcb_components(type, cutouts = false, angle = undef)``` | Draw list of PCB components on the PCB | -| ```pcb_cutouts(type, angle = undef)``` | Make cut outs to clear components on a PCB | -| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid position | -| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions | -| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer | -| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector | -| ```standoff(h, d, h2, d2)``` | Draw a standoff | -| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block | -| ```trimpot10(vertical, cutout = false)``` | Draw a ten turn trimpot | -| ```uSD(size, cutout = false)``` | Draw uSD socket | -| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket | -| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket | -| ```usb_B(cutout = false)``` | Draw USB B connector | -| ```usb_C(cutout = false)``` | Draw USB C connector | -| ```usb_uA(cutout = false)``` | Draw USB micro A connector | +| `barrel_jack(cutout = false)` | Draw barrel power jack | +| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component | +| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour | +| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component | +| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 | +| `flex(cutout = false)` | Draw flexistrip connector | +| `hdmi(type, cutout = false)` | Draw HDMI socket | +| `jack(cutout = false)` | Draw 3.5mm jack | +| `molex_254(ways)` | Draw molex header | +| `molex_usb_Ax2(cutout)` | Draw Molex USB connector suitable for perf board | +| `pcb(type)` | Draw specified PCB | +| `pcb_assembly(type, height, thickness)` | Draw PCB assembly with spaces and fasteners in place | +| `pcb_base(type, height, thickness, wall = 2)` | Generate STL for a base with PCB spacers | +| `pcb_component(comp, cutouts = false, angle = undef)` | Draw pcb component from description | +| `pcb_component_position(type, name)` | Position child at the specified component position | +| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB | +| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB | +| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position | +| `pcb_screw_positions(type)` | Positions children at the mounting hole positions | +| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer | +| `rj45(cutout = false)` | Draw RJ45 Ethernet connector | +| `standoff(h, d, h2, d2)` | Draw a standoff | +| `terminal_35(ways, colour = "blue")` | Draw 3.5mm terminal block | +| `trimpot10(vertical, cutout = false)` | Draw a ten turn trimpot | +| `uSD(size, cutout = false)` | Draw uSD socket | +| `usb_Ax1(cutout = false)` | Draw USB type A single socket | +| `usb_Ax2(cutout = false)` | Draw USB type A dual socket | +| `usb_B(cutout = false)` | Draw USB B connector | +| `usb_C(cutout = false)` | Draw USB C connector | +| `usb_uA(cutout = false)` | Draw USB micro A connector | ![pcbs](tests/png/pcbs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```pcb(ArduinoLeonardo)``` | Arduino Leonardo | -| 1 | ```pcb(ArduinoUno3)``` | Arduino Uno R3 | +| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo | +| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 | | 1 | | Cat 5 patch cable 300mm | -| 1 | ```d_plug(DCONN15, pcb = true)``` | D-type 15 way PCB mount plug | -| 1 | ```pcb(DuetE)``` | Duet 2 Ethernet electronics | -| 1 | ```pcb(Duex2)``` | Duex2 expansion board | -| 1 | ```pcb(Duex5)``` | Duex5 expansion board | -| 1 | ```pcb(EnviroPlus)``` | Enviro+ | -| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB | -| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board | -| 1 | ```pcb(MP1584EN)``` | MP1584EN 3A buck converter | -| 1 | ```pcb(MT3608)``` | MT3608 boost converter module | +| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug | +| 1 | `pcb(DuetE)` | Duet 2 Ethernet electronics | +| 1 | `pcb(Duex2)` | Duex2 expansion board | +| 1 | `pcb(Duex5)` | Duex5 expansion board | +| 1 | `pcb(EnviroPlus)` | Enviro+ | +| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB | +| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board | +| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter | +| 1 | `pcb(MT3608)` | MT3608 boost converter module | | 4 | | Micro SD card | -| 1 | ```molex_254(2)``` | Molex KK header 2 way | -| 1 | ```molex_254(3)``` | Molex KK header 3 way | -| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | -| 34 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc | -| 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 1 | ```pcb(PI_IO)``` | PI_IO V2 | -| 1 | ```pcb(PSU12V1A)``` | PSU 12V 1A | -| 1 | ```pcb(PERF60x40)``` | Perfboard 60 x 40mm | -| 1 | ```pcb(PERF70x30)``` | Perfboard 70 x 30mm | -| 1 | ```pcb(PERF70x50)``` | Perfboard 70 x 50mm | -| 1 | ```pcb(PERF74x51)``` | Perfboard 74 x 51mm | -| 1 | ```pcb(PERF80x20)``` | Perfboard 80 x 20mm | -| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle | -| 1 | ```pcb(RAMPSEndstop)``` | RAMPS Endstop Switch | -| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 | -| 1 | ```pcb(RPI4)``` | Raspberry Pi 4 | -| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero | -| 12 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm | -| 4 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm | -| 2 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm | -| 8 | ```screw(M2p5_cap_screw, 25)``` | Screw M2.5 cap x 25mm | -| 8 | ```screw(M2p5_cap_screw, 30)``` | Screw M2.5 cap x 30mm | -| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm | -| 12 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm | -| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm | -| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm | -| 12 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm | -| 1 | ```pcb(TP4056)``` | TP4056 Li-lon Battery charger module | -| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm | -| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" | -| 1 | ```pcb(WD2002SJ)``` | WD2002SJ Buck Boost DC-DC converter | -| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 34 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm | -| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB | +| 1 | `molex_254(2)` | Molex KK header 2 way | +| 1 | `molex_254(3)` | Molex KK header 3 way | +| 16 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | +| 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc | +| 12 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 12 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 1 | `pcb(PI_IO)` | PI_IO V2 | +| 1 | `pcb(PSU12V1A)` | PSU 12V 1A | +| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm | +| 1 | `pcb(PERF70x30)` | Perfboard 70 x 30mm | +| 1 | `pcb(PERF70x50)` | Perfboard 70 x 50mm | +| 1 | `pcb(PERF74x51)` | Perfboard 74 x 51mm | +| 1 | `pcb(PERF80x20)` | Perfboard 80 x 20mm | +| 1 | `pin_socket(2p54header, 13, 2, right_angle = true)` | Pin socket 13 x 2 right_angle | +| 1 | `pcb(RAMPSEndstop)` | RAMPS Endstop Switch | +| 1 | `pcb(RPI3)` | Raspberry Pi 3 | +| 1 | `pcb(RPI4)` | Raspberry Pi 4 | +| 1 | `pcb(RPI0)` | Raspberry Pi Zero | +| 12 | `screw(M2_cap_screw, 16)` | Screw M2 cap x 16mm | +| 4 | `screw(M2_cap_screw, 20)` | Screw M2 cap x 20mm | +| 2 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm | +| 8 | `screw(M2p5_cap_screw, 25)` | Screw M2.5 cap x 25mm | +| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm | +| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm | +| 12 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm | +| 4 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | +| 8 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm | +| 12 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm | +| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module | +| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm | +| 2 | `green_terminal(gt_2p54, 4)` | Terminal block 4 way 0.1" | +| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter | +| 16 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | +| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 12 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB | ### Printed | Qty | Filename | @@ -2429,35 +2429,35 @@ Threaded pillars. Each end can be male or female. ### Properties | Function | Description | |:--- |:--- | -| ```pillar_bot_thread(type)``` | Bottom thread length, + for male, - for female | -| ```pillar_height(type)``` | Body height | -| ```pillar_i_colour(type)``` | Colour of the inner part | -| ```pillar_id(type)``` | Inner diameter of metal part | -| ```pillar_ifn(type)``` | Inner number of sides, 6 for hex, 0 for smooth cylinder | -| ```pillar_name(type)``` | Name of part | -| ```pillar_o_colour(type)``` | Colour of the outer part | -| ```pillar_od(type)``` | Outer diameter of body | -| ```pillar_ofn(type)``` | Outer number of sides, 6 for hex, 0 for smooth cylinder | -| ```pillar_thread(type)``` | Thread diameter | -| ```pillar_top_thread(type)``` | Top thread length, + for male, - for female | +| `pillar_bot_thread(type)` | Bottom thread length, + for male, - for female | +| `pillar_height(type)` | Body height | +| `pillar_i_colour(type)` | Colour of the inner part | +| `pillar_id(type)` | Inner diameter of metal part | +| `pillar_ifn(type)` | Inner number of sides, 6 for hex, 0 for smooth cylinder | +| `pillar_name(type)` | Name of part | +| `pillar_o_colour(type)` | Colour of the outer part | +| `pillar_od(type)` | Outer diameter of body | +| `pillar_ofn(type)` | Outer number of sides, 6 for hex, 0 for smooth cylinder | +| `pillar_thread(type)` | Thread diameter | +| `pillar_top_thread(type)` | Top thread length, + for male, - for female | ### Modules | Module | Description | |:--- |:--- | -| ```pillar(type)``` | Draw specified pillar | +| `pillar(type)` | Draw specified pillar | ![pillars](tests/png/pillars.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```pillar(M3x13_hex_pillar)``` | Pillar hex M/F M3x13 | -| 1 | ```pillar(M3x20_hex_pillar)``` | Pillar hex M/F M3x20 | -| 1 | ```pillar(M3x10_nylon_hex_pillar)``` | Pillar hex nylon M/F M3x10 | -| 1 | ```pillar(M3x20_nylon_hex_pillar)``` | Pillar hex nylon M/F M3x20 | -| 1 | ```pillar(M2x16_brass_pillar)``` | Pillar nurled F/M M2x16 | -| 1 | ```pillar(M3x20_nylon_pillar)``` | Pillar nylon M/F M3x20 | -| 1 | ```pillar(M4x17_nylon_pillar)``` | Pillar nylon M/F M4x20 | +| 1 | `pillar(M3x13_hex_pillar)` | Pillar hex M/F M3x13 | +| 1 | `pillar(M3x20_hex_pillar)` | Pillar hex M/F M3x20 | +| 1 | `pillar(M3x10_nylon_hex_pillar)` | Pillar hex nylon M/F M3x10 | +| 1 | `pillar(M3x20_nylon_hex_pillar)` | Pillar hex nylon M/F M3x20 | +| 1 | `pillar(M2x16_brass_pillar)` | Pillar nurled F/M M2x16 | +| 1 | `pillar(M3x20_nylon_pillar)` | Pillar nylon M/F M3x20 | +| 1 | `pillar(M4x17_nylon_pillar)` | Pillar nylon M/F M4x20 | Top @@ -2477,47 +2477,47 @@ Pin headers and sockets, etc. ### Properties | Function | Description | |:--- |:--- | -| ```hdr_base_colour(type)``` | Header insulator colour | -| ```hdr_box_size(type)``` | Box header outside dimensions | -| ```hdr_box_wall(type)``` | Box header wall thickness | -| ```hdr_pin_below(type)``` | Header pin length underneath | -| ```hdr_pin_colour(type)``` | Header pin colour | -| ```hdr_pin_length(type)``` | Header pin length | -| ```hdr_pin_width(type)``` | Header pin size | -| ```hdr_pitch(type)``` | Header pitch | -| ```hdr_ra_box_offset(type)``` | Offset between back of the box and the pins | -| ```hdr_ra_height(type)``` | Height of right angle connector | -| ```hdr_socket_depth(type)``` | Socket depth for female housing | -| ```hdr_y_offset(type)``` | Y offset of pins from center of the box | +| `hdr_base_colour(type)` | Header insulator colour | +| `hdr_box_size(type)` | Box header outside dimensions | +| `hdr_box_wall(type)` | Box header wall thickness | +| `hdr_pin_below(type)` | Header pin length underneath | +| `hdr_pin_colour(type)` | Header pin colour | +| `hdr_pin_length(type)` | Header pin length | +| `hdr_pin_width(type)` | Header pin size | +| `hdr_pitch(type)` | Header pitch | +| `hdr_ra_box_offset(type)` | Offset between back of the box and the pins | +| `hdr_ra_height(type)` | Height of right angle connector | +| `hdr_socket_depth(type)` | Socket depth for female housing | +| `hdr_y_offset(type)` | Y offset of pins from center of the box | ### Modules | Module | Description | |:--- |:--- | -| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header | -| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header | -| ```jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false)``` | Draw JST XH connector | -| ```pin(type, length = undef)``` | Draw a header pin | -| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour)``` | Draw pin header | -| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour)``` | Draw pin socket | +| `box_header(type, cols = 1, rows = 1, smt = false, cutout = false)` | Draw box header | +| `idc_transition(type, cols = 5, skip = [], cutout = false)` | Draw IDC transition header | +| `jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false)` | Draw JST XH connector | +| `pin(type, length = undef)` | Draw a header pin | +| `pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour)` | Draw pin header | +| `pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour)` | Draw pin socket | ![pin_headers](tests/png/pin_headers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```box_header(2p54header, 10, 2)``` | Box header 10 x 2 | -| 1 | ```box_header(2p54header, 8, 1)``` | Box header 8 x 1 | -| 1 | ```idc_transition(2p54header, 10)``` | IDC transition header 10 x 2 | -| 1 | ```pin_header(2p54header, 10, 2)``` | Pin header 10 x 2 | -| 1 | ```pin_header(2p54header, 3, 1, right_angle = true)``` | Pin header 3 x 1 right_angle | -| 1 | ```pin_header(2p54header, 3, 2, right_angle = true)``` | Pin header 3 x 2 right_angle | -| 1 | ```pin_header(2p54header, 3, 3, right_angle = true)``` | Pin header 3 x 3 right_angle | -| 1 | ```pin_header(2p54header, 8, 1)``` | Pin header 8 x 1 | -| 1 | ```pin_socket(2p54header, 10, 2)``` | Pin socket 10 x 2 | -| 1 | ```pin_socket(2p54header, 3, 1, right_angle = true)``` | Pin socket 3 x 1 right_angle | -| 1 | ```pin_socket(2p54header, 3, 2, right_angle = true)``` | Pin socket 3 x 2 right_angle | -| 1 | ```pin_socket(2p54header, 3, 3, right_angle = true)``` | Pin socket 3 x 3 right_angle | -| 1 | ```pin_socket(2p54header, 8, 1)``` | Pin socket 8 x 1 | +| 1 | `box_header(2p54header, 10, 2)` | Box header 10 x 2 | +| 1 | `box_header(2p54header, 8, 1)` | Box header 8 x 1 | +| 1 | `idc_transition(2p54header, 10)` | IDC transition header 10 x 2 | +| 1 | `pin_header(2p54header, 10, 2)` | Pin header 10 x 2 | +| 1 | `pin_header(2p54header, 3, 1, right_angle = true)` | Pin header 3 x 1 right_angle | +| 1 | `pin_header(2p54header, 3, 2, right_angle = true)` | Pin header 3 x 2 right_angle | +| 1 | `pin_header(2p54header, 3, 3, right_angle = true)` | Pin header 3 x 3 right_angle | +| 1 | `pin_header(2p54header, 8, 1)` | Pin header 8 x 1 | +| 1 | `pin_socket(2p54header, 10, 2)` | Pin socket 10 x 2 | +| 1 | `pin_socket(2p54header, 3, 1, right_angle = true)` | Pin socket 3 x 1 right_angle | +| 1 | `pin_socket(2p54header, 3, 2, right_angle = true)` | Pin socket 3 x 2 right_angle | +| 1 | `pin_socket(2p54header, 3, 3, right_angle = true)` | Pin socket 3 x 3 right_angle | +| 1 | `pin_socket(2p54header, 8, 1)` | Pin socket 8 x 1 | Top @@ -2539,46 +2539,46 @@ Face order is bottom, top, left, right, front, back. ### Properties | Function | Description | |:--- |:--- | -| ```atx_psu(type)``` | True if an ATX style PSU | -| ```psu_accessories(type)``` | Accessories to add to BOM, e.g. mains lead | -| ```psu_face_cutouts(type)``` | List of polygons to remove | -| ```psu_face_fan(type)``` | Fan x,y position and type | -| ```psu_face_grill(type)``` | Is this face a grill | -| ```psu_face_holes(type)``` | List of screw hole positions | -| ```psu_face_iec(type)``` | IEC connector x,y, rotation and type | -| ```psu_face_switch(type)``` | Rocker switch x,y, rotation and type | -| ```psu_face_thickness(type)``` | The thickness | -| ```psu_face_vents(type)``` | Vents array position x,y, rotation, size and corner radius | -| ```psu_faces(type)``` | List of face descriptions | -| ```psu_height(type)``` | Height | -| ```psu_left_bay(type)``` | Bay for terminals | -| ```psu_length(type)``` | Length | -| ```psu_name(type)``` | The part name | -| ```psu_right_bay(type)``` | Bay for heatsink | -| ```psu_screw(type)``` | Screw type | -| ```psu_screw_hole_radius(type)``` | Clearance hole for screw, bigger than normal on ATX | -| ```psu_terminals(type)``` | How many terminals and the y offset from the back | -| ```psu_width(type)``` | Width | -| ```terminal_block_depth(type)``` | Total depth | -| ```terminal_block_depth2(type)``` | Depth of contact well | -| ```terminal_block_divider(type)``` | Width of the dividers | -| ```terminal_block_height(type)``` | Height of the dividers | -| ```terminal_block_height2(type)``` | Height under the contacts | -| ```terminal_block_pitch(type)``` | Pitch between screws | +| `atx_psu(type)` | True if an ATX style PSU | +| `psu_accessories(type)` | Accessories to add to BOM, e.g. mains lead | +| `psu_face_cutouts(type)` | List of polygons to remove | +| `psu_face_fan(type)` | Fan x,y position and type | +| `psu_face_grill(type)` | Is this face a grill | +| `psu_face_holes(type)` | List of screw hole positions | +| `psu_face_iec(type)` | IEC connector x,y, rotation and type | +| `psu_face_switch(type)` | Rocker switch x,y, rotation and type | +| `psu_face_thickness(type)` | The thickness | +| `psu_face_vents(type)` | Vents array position x,y, rotation, size and corner radius | +| `psu_faces(type)` | List of face descriptions | +| `psu_height(type)` | Height | +| `psu_left_bay(type)` | Bay for terminals | +| `psu_length(type)` | Length | +| `psu_name(type)` | The part name | +| `psu_right_bay(type)` | Bay for heatsink | +| `psu_screw(type)` | Screw type | +| `psu_screw_hole_radius(type)` | Clearance hole for screw, bigger than normal on ATX | +| `psu_terminals(type)` | How many terminals and the y offset from the back | +| `psu_width(type)` | Width | +| `terminal_block_depth(type)` | Total depth | +| `terminal_block_depth2(type)` | Depth of contact well | +| `terminal_block_divider(type)` | Width of the dividers | +| `terminal_block_height(type)` | Height of the dividers | +| `terminal_block_height2(type)` | Height under the contacts | +| `terminal_block_pitch(type)` | Pitch between screws | ### Functions | Function | Description | |:--- |:--- | -| ```psu_face_transform(type, face)``` | Returns a transformation matrix to get to the specified face | -| ```terminal_block_length(type, ways)``` | Total length of terminal block | +| `psu_face_transform(type, face)` | Returns a transformation matrix to get to the specified face | +| `terminal_block_length(type, ways)` | Total length of terminal block | ### Modules | Module | Description | |:--- |:--- | -| ```atx_psu_cutout(type)``` | Cut out for the rear of an ATX | -| ```psu(type)``` | Draw a power supply | -| ```psu_screw_positions(type, face = undef)``` | Position children at the screw positions on the preferred mounting face, which can be overridden. | -| ```terminal_block(type, ways)``` | Draw a power supply terminal block | +| `atx_psu_cutout(type)` | Cut out for the rear of an ATX | +| `psu(type)` | Draw a power supply | +| `psu_screw_positions(type, face = undef)` | Position children at the screw positions on the preferred mounting face, which can be overridden. | +| `terminal_block(type, ways)` | Draw a power supply terminal block | ![psus](tests/png/psus.png) @@ -2586,17 +2586,17 @@ Face order is bottom, top, left, right, front, back. | Qty | Module call | BOM entry | | ---:|:--- |:---| | 1 | | IEC mains lead | -| 1 | ```psu(ATX500)``` | PSU ATX500 | -| 1 | ```psu(KY240W)``` | PSU KY-240W-12-L | -| 1 | ```psu(PD_150_12)``` | PSU PD-150-12 | -| 1 | ```psu(S_250_48)``` | PSU S-250-48 | -| 1 | ```psu(S_300_12)``` | PSU S-300-12 | -| 4 | ```screw(No632_pan_screw, 8)``` | Screw 6-32 pan x 8mm | -| 4 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm | -| 8 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm | -| 4 | ```screw(M4_cap_screw, 8)``` | Screw M4 cap x 8mm | -| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 8 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `psu(ATX500)` | PSU ATX500 | +| 1 | `psu(KY240W)` | PSU KY-240W-12-L | +| 1 | `psu(PD_150_12)` | PSU PD-150-12 | +| 1 | `psu(S_250_48)` | PSU S-250-48 | +| 1 | `psu(S_300_12)` | PSU S-300-12 | +| 4 | `screw(No632_pan_screw, 8)` | Screw 6-32 pan x 8mm | +| 4 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm | +| 8 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | +| 4 | `screw(M4_cap_screw, 8)` | Screw M4 cap x 8mm | +| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -2616,55 +2616,55 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers. ### Properties | Function | Description | |:--- |:--- | -| ```pulley_belt(type)``` | Belt type | -| ```pulley_bore(type)``` | Bore diameter for shaft | -| ```pulley_flange_dia(type)``` | Flange diameter | -| ```pulley_flange_thickness(type)``` | Flange thickness | -| ```pulley_hub_dia(type)``` | Hub diameter | -| ```pulley_hub_length(type)``` | Hub length | -| ```pulley_od(type)``` | Outer diameter | -| ```pulley_screw(type)``` | Grub screw type | -| ```pulley_screw_length(type)``` | Grup screw length | -| ```pulley_screw_z(type)``` | Grub screw position | -| ```pulley_screws(type)``` | Number of grub screws | -| ```pulley_teeth(type)``` | Number of teeth | -| ```pulley_type(type)``` | Part description | -| ```pulley_width(type)``` | Width of teeth / belt channel | +| `pulley_belt(type)` | Belt type | +| `pulley_bore(type)` | Bore diameter for shaft | +| `pulley_flange_dia(type)` | Flange diameter | +| `pulley_flange_thickness(type)` | Flange thickness | +| `pulley_hub_dia(type)` | Hub diameter | +| `pulley_hub_length(type)` | Hub length | +| `pulley_od(type)` | Outer diameter | +| `pulley_screw(type)` | Grub screw type | +| `pulley_screw_length(type)` | Grup screw length | +| `pulley_screw_z(type)` | Grub screw position | +| `pulley_screws(type)` | Number of grub screws | +| `pulley_teeth(type)` | Number of teeth | +| `pulley_type(type)` | Part description | +| `pulley_width(type)` | Width of teeth / belt channel | ### Functions | Function | Description | |:--- |:--- | -| ```pulley_extent(type)``` | Largest diameter | -| ```pulley_height(type)``` | Total height of pulley | -| ```pulley_ir(type)``` | Inside radius of the teeth | -| ```pulley_offset(type)``` | Offset of the belt path centre | -| ```pulley_pr(type)``` | Pitch radius | +| `pulley_extent(type)` | Largest diameter | +| `pulley_height(type)` | Total height of pulley | +| `pulley_ir(type)` | Inside radius of the teeth | +| `pulley_offset(type)` | Offset of the belt path centre | +| `pulley_pr(type)` | Pitch radius | ### Modules | Module | Description | |:--- |:--- | -| ```pulley(type)``` | Draw a pulley | -| ```pulley_assembly(type)``` | Draw a pulley with its grub screws in place | +| `pulley(type)` | Draw a pulley | +| `pulley_assembly(type)` | Draw a pulley with its grub screws in place | ![pulleys](tests/png/pulleys.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```pulley(GT2x16_toothed_idler)``` | Pulley GT2 idler 16 teeth | -| 1 | ```pulley(GT2x20_toothed_idler)``` | Pulley GT2 idler 20 teeth | -| 1 | ```pulley(GT2x20_plain_idler)``` | Pulley GT2 idler smooth 12mm | -| 1 | ```pulley(GT2x16_plain_idler)``` | Pulley GT2 idler smooth 9.63mm | -| 1 | ```pulley(GT2x16x7_plain_idler)``` | Pulley GT2 idler smooth 9.63mm | -| 1 | ```pulley(GT2x20ob_pulley)``` | Pulley GT2OB 20 teeth | -| 1 | ```pulley(GT2x12_pulley)``` | Pulley GT2RD 12 teeth | -| 1 | ```pulley(GT2x20um_pulley)``` | Pulley GT2UM 20 teeth | -| 1 | ```pulley(T2p5x16_pulley)``` | Pulley T2.5 16 teeth | -| 1 | ```pulley(T5x10_pulley)``` | Pulley T5 10 teeth | -| 1 | ```screw(M3_grub_screw, 3)``` | Screw M3 grub x 3mm | -| 2 | ```screw(M3_grub_screw, 4)``` | Screw M3 grub x 4mm | -| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm | -| 1 | ```screw(M4_grub_screw, 6)``` | Screw M4 grub x 6mm | +| 1 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth | +| 1 | `pulley(GT2x20_toothed_idler)` | Pulley GT2 idler 20 teeth | +| 1 | `pulley(GT2x20_plain_idler)` | Pulley GT2 idler smooth 12mm | +| 1 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm | +| 1 | `pulley(GT2x16x7_plain_idler)` | Pulley GT2 idler smooth 9.63mm | +| 1 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth | +| 1 | `pulley(GT2x12_pulley)` | Pulley GT2RD 12 teeth | +| 1 | `pulley(GT2x20um_pulley)` | Pulley GT2UM 20 teeth | +| 1 | `pulley(T2p5x16_pulley)` | Pulley T2.5 16 teeth | +| 1 | `pulley(T5x10_pulley)` | Pulley T5 10 teeth | +| 1 | `screw(M3_grub_screw, 3)` | Screw M3 grub x 3mm | +| 2 | `screw(M3_grub_screw, 4)` | Screw M3 grub x 4mm | +| 4 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm | +| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm | Top @@ -2684,71 +2684,71 @@ Linear rails with carriages. ### Properties | Function | Description | |:--- |:--- | -| ```carriage_block_length(type)``` | Length of the metal part | -| ```carriage_clearance(type)``` | Gap under the carriage | -| ```carriage_height(type)``` | Height of carriage | -| ```carriage_length(type)``` | Overall length | -| ```carriage_pitch_x(type)``` | Screw hole x pitch | -| ```carriage_pitch_y(type)``` | Screw hole y pitch | -| ```carriage_screw(type)``` | Carriage screw type | -| ```carriage_width(type)``` | Width of carriage | -| ```rail_bore(type)``` | Counter bore diameter for screw head | -| ```rail_bore_depth(type)``` | Counter bore depth | -| ```rail_carriage(type)``` | Carriage type | -| ```rail_end(type)``` | Minimum distance screw can be from the end | -| ```rail_end_screw(type)``` | Screw used for ends only (Countersink used for better location) | -| ```rail_height(type)``` | Height of rail section | -| ```rail_hole(type)``` | Screw hole diameter | -| ```rail_pitch(type)``` | Distance between screws | -| ```rail_screw(type)``` | Screw type | -| ```rail_width(type)``` | Width of rail section | +| `carriage_block_length(type)` | Length of the metal part | +| `carriage_clearance(type)` | Gap under the carriage | +| `carriage_height(type)` | Height of carriage | +| `carriage_length(type)` | Overall length | +| `carriage_pitch_x(type)` | Screw hole x pitch | +| `carriage_pitch_y(type)` | Screw hole y pitch | +| `carriage_screw(type)` | Carriage screw type | +| `carriage_width(type)` | Width of carriage | +| `rail_bore(type)` | Counter bore diameter for screw head | +| `rail_bore_depth(type)` | Counter bore depth | +| `rail_carriage(type)` | Carriage type | +| `rail_end(type)` | Minimum distance screw can be from the end | +| `rail_end_screw(type)` | Screw used for ends only (Countersink used for better location) | +| `rail_height(type)` | Height of rail section | +| `rail_hole(type)` | Screw hole diameter | +| `rail_pitch(type)` | Distance between screws | +| `rail_screw(type)` | Screw type | +| `rail_width(type)` | Width of rail section | ### Functions | Function | Description | |:--- |:--- | -| ```carriage_screw_depth(type)``` | Carriage thread depth | -| ```carriage_size(type)``` | Size of carriage | -| ```rail_holes(type, length)``` | Number of holes in a rail given its ```length``` | -| ```rail_screw_height(type, screw)``` | Position screw taking into account countersink into counterbored hole | -| ```rail_travel(type, length)``` | How far the carriage can travel | +| `carriage_screw_depth(type)` | Carriage thread depth | +| `carriage_size(type)` | Size of carriage | +| `rail_holes(type, length)` | Number of holes in a rail given its `length` | +| `rail_screw_height(type, screw)` | Position screw taking into account countersink into counterbored hole | +| `rail_travel(type, length)` | How far the carriage can travel | ### Modules | Module | Description | |:--- |:--- | -| ```carriage(type, rail, end_colour = grey(20)``` | Draw the specified carriage | -| ```carriage_hole_positions(type)``` | Position children over screw holes | -| ```rail(type, length)``` | Draw the specified rail | -| ```rail_assembly(type, length, pos, carriage_end_colour = grey(20)``` | Rail and carriage assembly | -| ```rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true)``` | Position children over screw holes | -| ```rail_screws(type, length, thickness, screws = 100)``` | Place screws in the rail | +| `carriage(type, rail, end_colour = grey(20)` | Draw the specified carriage | +| `carriage_hole_positions(type)` | Position children over screw holes | +| `rail(type, length)` | Draw the specified rail | +| `rail_assembly(type, length, pos, carriage_end_colour = grey(20)` | Rail and carriage assembly | +| `rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true)` | Position children over screw holes | +| `rail_screws(type, length, thickness, screws = 100)` | Place screws in the rail | ![rails](tests/png/rails.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```rail(MGN12, 200)``` | Linear rail MGN12 x 200mm | -| 1 | ```rail(MGN12H, 200)``` | Linear rail MGN12H x 200mm | -| 1 | ```rail(MGN15, 200)``` | Linear rail MGN15 x 200mm | -| 1 | ```rail(MGN5, 200)``` | Linear rail MGN5 x 200mm | -| 1 | ```rail(MGN7, 200)``` | Linear rail MGN7 x 200mm | -| 1 | ```rail(MGN9, 200)``` | Linear rail MGN9 x 200mm | -| 1 | ```rail(SSR15, 200)``` | Linear rail SSR15 x 200mm | -| 26 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | -| 31 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 4 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 11 | ```screw(M2_cap_screw, 10)``` | Screw M2 cap x 10mm | -| 15 | ```screw(M2_cs_cap_screw, 10)``` | Screw M2 cs cap x 10mm | -| 8 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm | -| 12 | ```screw(M3_cap_screw, 12)``` | Screw M3 cap x 12mm | -| 3 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm | -| 2 | ```screw(M3_cs_cap_screw, 12)``` | Screw M3 cs cap x 12mm | -| 6 | ```screw(M3_cs_cap_screw, 16)``` | Screw M3 cs cap x 16mm | -| 2 | ```screw(M4_cap_screw, 16)``` | Screw M4 cap x 16mm | -| 2 | ```screw(M4_cs_cap_screw, 20)``` | Screw M4 cs cap x 20mm | -| 26 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 31 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 1 | `rail(MGN12, 200)` | Linear rail MGN12 x 200mm | +| 1 | `rail(MGN12H, 200)` | Linear rail MGN12H x 200mm | +| 1 | `rail(MGN15, 200)` | Linear rail MGN15 x 200mm | +| 1 | `rail(MGN5, 200)` | Linear rail MGN5 x 200mm | +| 1 | `rail(MGN7, 200)` | Linear rail MGN7 x 200mm | +| 1 | `rail(MGN9, 200)` | Linear rail MGN9 x 200mm | +| 1 | `rail(SSR15, 200)` | Linear rail SSR15 x 200mm | +| 26 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | +| 31 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 4 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 11 | `screw(M2_cap_screw, 10)` | Screw M2 cap x 10mm | +| 15 | `screw(M2_cs_cap_screw, 10)` | Screw M2 cs cap x 10mm | +| 8 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | +| 12 | `screw(M3_cap_screw, 12)` | Screw M3 cap x 12mm | +| 3 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | +| 2 | `screw(M3_cs_cap_screw, 12)` | Screw M3 cs cap x 12mm | +| 6 | `screw(M3_cs_cap_screw, 16)` | Screw M3 cs cap x 16mm | +| 2 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | +| 2 | `screw(M4_cs_cap_screw, 20)` | Screw M4 cs cap x 20mm | +| 26 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 31 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -2768,39 +2768,39 @@ Ring terminals and earth assemblies for DiBond panels. ### Properties | Function | Description | |:--- |:--- | -| ```ringterm_crimp_length(type)``` | If non-zero the length of the crimp tube | -| ```ringterm_hole(type)``` | Wire hole diameter | -| ```ringterm_id(type)``` | Inside diameter | -| ```ringterm_length(type)``` | Length of the tail including the ring | -| ```ringterm_od(type)``` | Outside diameter | -| ```ringterm_screw(type)``` | Screw type | -| ```ringterm_thickness(type)``` | Metal thickness | -| ```ringterm_width(type)``` | Width of the tail | +| `ringterm_crimp_length(type)` | If non-zero the length of the crimp tube | +| `ringterm_hole(type)` | Wire hole diameter | +| `ringterm_id(type)` | Inside diameter | +| `ringterm_length(type)` | Length of the tail including the ring | +| `ringterm_od(type)` | Outside diameter | +| `ringterm_screw(type)` | Screw type | +| `ringterm_thickness(type)` | Metal thickness | +| `ringterm_width(type)` | Width of the tail | ### Functions | Function | Description | |:--- |:--- | -| ```ringterm_extent(type)``` | Space to leave | +| `ringterm_extent(type)` | Space to leave | ### Modules | Module | Description | |:--- |:--- | -| ```ring_terminal(type)``` | Draw specifeid ring terminal | -| ```ring_terminal_assembly(type, thickness, top = false)``` | Earthing assembly for DiBond twin skins | -| ```ring_terminal_hole(type, h = 0)``` | Drill hole for the screw | +| `ring_terminal(type)` | Draw specifeid ring terminal | +| `ring_terminal_assembly(type, thickness, top = false)` | Earthing assembly for DiBond twin skins | +| `ring_terminal_hole(type, h = 0)` | Drill hole for the screw | ![ring_terminals](tests/png/ring_terminals.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 3 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 1 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm | -| 1 | ```ring_terminal(M3_ringterm_cs)``` | Ring terminal 3mm | -| 1 | ```ring_terminal(M3_ringterm_crimp)``` | Ring terminal crimp 3mm | -| 1 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm | -| 2 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 6 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 3 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 1 | `ring_terminal(M3_ringterm)` | Ring terminal 3mm | +| 1 | `ring_terminal(M3_ringterm_cs)` | Ring terminal 3mm | +| 1 | `ring_terminal(M3_ringterm_crimp)` | Ring terminal crimp 3mm | +| 1 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | +| 2 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 6 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | Top @@ -2820,33 +2820,33 @@ Rocker switch. Also used for neon indicator in the same form factor. ### Properties | Function | Description | |:--- |:--- | -| ```rocker_bezel(type)``` | Bezel width | -| ```rocker_button(type)``` | How far the button extends from the bezel | -| ```rocker_depth(type)``` | Body depth | -| ```rocker_flange_h(type)``` | Flange height | -| ```rocker_flange_t(type)``` | Flange thickness | -| ```rocker_flange_w(type)``` | Flange width | -| ```rocker_height(type)``` | Body height | -| ```rocker_part(type)``` | Part description | -| ```rocker_pivot(type)``` | Pivot distance from the back of the flange | -| ```rocker_slot_h(type)``` | Panel slot height | -| ```rocker_slot_w(type)``` | Panel slot width | -| ```rocker_spades(type)``` | Spade types and positions | -| ```rocker_width(type)``` | Body width | +| `rocker_bezel(type)` | Bezel width | +| `rocker_button(type)` | How far the button extends from the bezel | +| `rocker_depth(type)` | Body depth | +| `rocker_flange_h(type)` | Flange height | +| `rocker_flange_t(type)` | Flange thickness | +| `rocker_flange_w(type)` | Flange width | +| `rocker_height(type)` | Body height | +| `rocker_part(type)` | Part description | +| `rocker_pivot(type)` | Pivot distance from the back of the flange | +| `rocker_slot_h(type)` | Panel slot height | +| `rocker_slot_w(type)` | Panel slot width | +| `rocker_spades(type)` | Spade types and positions | +| `rocker_width(type)` | Body width | ### Modules | Module | Description | |:--- |:--- | -| ```rocker(type, colour)``` | Draw the specified rocker switch | -| ```rocker_hole(type, h = 0)``` | Make a hole to accept a rocker switch, by default 2D, set h for 3D | +| `rocker(type, colour)` | Draw the specified rocker switch | +| `rocker_hole(type, h = 0)` | Make a hole to accept a rocker switch, by default 2D, set h for 3D | ![rockers](tests/png/rockers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```rocker(neon_indicator)``` | Neon Indicator H8630FBNAL | -| 2 | ```rocker(small_rocker)``` | Rocker Switch PRASA1-16F-BB0BW | +| 2 | `rocker(neon_indicator)` | Neon Indicator H8630FBNAL | +| 2 | `rocker(small_rocker)` | Rocker Switch PRASA1-16F-BB0BW | Top @@ -2866,36 +2866,36 @@ These items are sysmtrical, so by default the origin is in the centre but it can ### Modules | Module | Description | |:--- |:--- | -| ```leadscrew(d , l, lead, starts, center = true)``` | Draw a leadscrew with specified diameter, length, lead and number of starts | -| ```rod(d , l, center = true)``` | Draw a smooth rod with specified diameter and length | -| ```studding(d , l, center = true)``` | Draw a threaded rod with specified diameter and length | +| `leadscrew(d , l, lead, starts, center = true)` | Draw a leadscrew with specified diameter, length, lead and number of starts | +| `rod(d , l, center = true)` | Draw a smooth rod with specified diameter and length | +| `studding(d , l, center = true)` | Draw a threaded rod with specified diameter and length | ![rod](tests/png/rod.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```leadscrew(10, 80, 8, 4)``` | Leadscrew 10 x 80mm, 8mm lead, 4 starts | -| 1 | ```leadscrew(12, 80, 12, 4)``` | Leadscrew 12 x 80mm, 12mm lead, 4 starts | -| 1 | ```leadscrew(16, 80, 16, 4)``` | Leadscrew 16 x 80mm, 16mm lead, 4 starts | -| 1 | ```leadscrew(6, 80, 2, 1)``` | Leadscrew 6 x 80mm, 2mm lead, 1 starts | -| 1 | ```leadscrew(8, 80, 8, 4)``` | Leadscrew 8 x 80mm, 8mm lead, 4 starts | -| 1 | ```rod(10, 80)``` | Smooth rod 10mm x 80mm | -| 1 | ```rod(12, 80)``` | Smooth rod 12mm x 80mm | -| 1 | ```rod(16, 80)``` | Smooth rod 16mm x 80mm | -| 1 | ```rod(3, 80)``` | Smooth rod 3mm x 80mm | -| 1 | ```rod(4, 80)``` | Smooth rod 4mm x 80mm | -| 1 | ```rod(5, 80)``` | Smooth rod 5mm x 80mm | -| 1 | ```rod(6, 80)``` | Smooth rod 6mm x 80mm | -| 1 | ```rod(8, 80)``` | Smooth rod 8mm x 80mm | -| 1 | ```studding(10, 80)``` | Threaded rod M10 x 80mm | -| 1 | ```studding(12, 80)``` | Threaded rod M12 x 80mm | -| 1 | ```studding(16, 80)``` | Threaded rod M16 x 80mm | -| 1 | ```studding(3, 80)``` | Threaded rod M3 x 80mm | -| 1 | ```studding(4, 80)``` | Threaded rod M4 x 80mm | -| 1 | ```studding(5, 80)``` | Threaded rod M5 x 80mm | -| 1 | ```studding(6, 80)``` | Threaded rod M6 x 80mm | -| 1 | ```studding(8, 80)``` | Threaded rod M8 x 80mm | +| 1 | `leadscrew(10, 80, 8, 4)` | Leadscrew 10 x 80mm, 8mm lead, 4 starts | +| 1 | `leadscrew(12, 80, 12, 4)` | Leadscrew 12 x 80mm, 12mm lead, 4 starts | +| 1 | `leadscrew(16, 80, 16, 4)` | Leadscrew 16 x 80mm, 16mm lead, 4 starts | +| 1 | `leadscrew(6, 80, 2, 1)` | Leadscrew 6 x 80mm, 2mm lead, 1 starts | +| 1 | `leadscrew(8, 80, 8, 4)` | Leadscrew 8 x 80mm, 8mm lead, 4 starts | +| 1 | `rod(10, 80)` | Smooth rod 10mm x 80mm | +| 1 | `rod(12, 80)` | Smooth rod 12mm x 80mm | +| 1 | `rod(16, 80)` | Smooth rod 16mm x 80mm | +| 1 | `rod(3, 80)` | Smooth rod 3mm x 80mm | +| 1 | `rod(4, 80)` | Smooth rod 4mm x 80mm | +| 1 | `rod(5, 80)` | Smooth rod 5mm x 80mm | +| 1 | `rod(6, 80)` | Smooth rod 6mm x 80mm | +| 1 | `rod(8, 80)` | Smooth rod 8mm x 80mm | +| 1 | `studding(10, 80)` | Threaded rod M10 x 80mm | +| 1 | `studding(12, 80)` | Threaded rod M12 x 80mm | +| 1 | `studding(16, 80)` | Threaded rod M16 x 80mm | +| 1 | `studding(3, 80)` | Threaded rod M3 x 80mm | +| 1 | `studding(4, 80)` | Threaded rod M4 x 80mm | +| 1 | `studding(5, 80)` | Threaded rod M5 x 80mm | +| 1 | `studding(6, 80)` | Threaded rod M6 x 80mm | +| 1 | `studding(8, 80)` | Threaded rod M8 x 80mm | Top @@ -2905,7 +2905,7 @@ These items are sysmtrical, so by default the origin is in the centre but it can ## Screws Machine screws and wood screws with various head styles. -For an explanation of ```screw_polysink()``` see . +For an explanation of `screw_polysink()` see . [vitamins/screws.scad](vitamins/screws.scad) Object definitions. @@ -2917,72 +2917,72 @@ For an explanation of ```screw_polysink()``` see Top @@ -3068,14 +3068,14 @@ Sealing strip from B&Q used to seal around the door of 3D printers. ### Modules | Module | Description | |:--- |:--- | -| ```sealing_strip(length)``` | Draw specified length of sealing strip | +| `sealing_strip(length)` | Draw specified length of sealing strip | ![sealing_strip](tests/png/sealing_strip.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```sealing_strip(100)``` | Sealing strip 10mm x 4mm x 100mm | +| 1 | `sealing_strip(100)` | Sealing strip 10mm x 4mm x 100mm | Top @@ -3095,22 +3095,22 @@ Shaft couplings ### Properties | Function | Description | |:--- |:--- | -| ```sc_diameter(type)``` | Coupling outer diameter | -| ```sc_diameter1(type)``` | Diameter of smaller shaft | -| ```sc_diameter2(type)``` | Diameter of larger shaft | -| ```sc_length(type)``` | Coupling length | +| `sc_diameter(type)` | Coupling outer diameter | +| `sc_diameter1(type)` | Diameter of smaller shaft | +| `sc_diameter2(type)` | Diameter of larger shaft | +| `sc_length(type)` | Coupling length | ### Modules | Module | Description | |:--- |:--- | -| ```shaft_coupling(type, colour = "silver")``` | Draw the shaft coupling | +| `shaft_coupling(type, colour = "silver")` | Draw the shaft coupling | ![shaft_couplings](tests/png/shaft_couplings.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```shaft_coupling(SC_5x8_rigid)``` | Shaft coupling SC_5x8_rigid | +| 1 | `shaft_coupling(SC_5x8_rigid)` | Shaft coupling SC_5x8_rigid | Top @@ -3144,52 +3144,52 @@ When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify th ### Properties | Function | Description | |:--- |:--- | -| ```sheet_colour(type)``` | Colour | -| ```sheet_colour2(type)``` | Second colour for a woven sheet | -| ```sheet_is_soft(type)``` | Is soft enough for wood screws | -| ```sheet_thickness(type)``` | Thickness | -| ```sheet_warp(type)``` | Wovern sheet warp | -| ```sheet_weft(type)``` | Wovern sheet weft | +| `sheet_colour(type)` | Colour | +| `sheet_colour2(type)` | Second colour for a woven sheet | +| `sheet_is_soft(type)` | Is soft enough for wood screws | +| `sheet_thickness(type)` | Thickness | +| `sheet_warp(type)` | Wovern sheet warp | +| `sheet_weft(type)` | Wovern sheet weft | ### Functions | Function | Description | |:--- |:--- | -| ```sheet_is_woven(type)``` | Is a woven sheet, eg carbon fiber | +| `sheet_is_woven(type)` | Is a woven sheet, eg carbon fiber | ### Modules | Module | Description | |:--- |:--- | -| ```render_2D_sheet(type, colour = false, colour2 = false, w = undef, d = undef)``` | Extrude a 2D sheet template and give it the correct colour | -| ```render_sheet(type, colour = false, colour2 = false, w = undef, d = undef)``` | Render a sheet in the correct colour after holes have been subtracted | -| ```sheet(type, w, d, corners = [0, 0, 0, 0])``` | Draw specified sheet | -| ```sheet_2D(type, w, d, corners = [0, 0, 0, 0])``` | 2D sheet template with specified size and optionally rounded corners | +| `render_2D_sheet(type, colour = false, colour2 = false, w = undef, d = undef)` | Extrude a 2D sheet template and give it the correct colour | +| `render_sheet(type, colour = false, colour2 = false, w = undef, d = undef)` | Render a sheet in the correct colour after holes have been subtracted | +| `sheet(type, w, d, corners = [0, 0, 0, 0])` | Draw specified sheet | +| `sheet_2D(type, w, d, corners = [0, 0, 0, 0])` | 2D sheet template with specified size and optionally rounded corners | ![sheets](tests/png/sheets.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```sheet(FoilTape, 30, 30, 2)``` | Aluminium foil tape 30mm x 30mm x 0.05mm | -| 1 | ```sheet(AL6, 30, 30, 2)``` | Aluminium tooling plate 30mm x 30mm x 6mm | -| 1 | ```sheet(AL8, 30, 30, 2)``` | Aluminium tooling plate 30mm x 30mm x 8mm | -| 1 | ```sheet(Cardboard, 30, 30, 2)``` | Corrugated cardboard 30mm x 30mm x 5mm | -| 1 | ```sheet(Foam20, 30, 30, 2)``` | Foam sponge 30mm x 30mm x 20mm | -| 1 | ```sheet(DiBond, 30, 30, 2)``` | Sheet DiBond 30mm x 30mm x 3mm | -| 1 | ```sheet(DiBond6, 30, 30, 2)``` | Sheet DiBond 30mm x 30mm x 6mm | -| 1 | ```sheet(MDF10, 30, 30, 2)``` | Sheet MDF 30mm x 30mm x 10mm | -| 1 | ```sheet(MDF12, 30, 30, 2)``` | Sheet MDF 30mm x 30mm x 12mm | -| 1 | ```sheet(MDF19, 30, 30, 2)``` | Sheet MDF 30mm x 30mm x 19mm | -| 1 | ```sheet(MDF6, 30, 30, 2)``` | Sheet MDF 30mm x 30mm x 6mm | -| 1 | ```sheet(PMMA10, 30, 30, 2)``` | Sheet acrylic 30mm x 30mm x 10mm | -| 1 | ```sheet(PMMA2, 30, 30, 2)``` | Sheet acrylic 30mm x 30mm x 2mm | -| 1 | ```sheet(PMMA3, 30, 30, 2)``` | Sheet acrylic 30mm x 30mm x 3mm | -| 1 | ```sheet(PMMA6, 30, 30, 2)``` | Sheet acrylic 30mm x 30mm x 6mm | -| 1 | ```sheet(PMMA8, 30, 30, 2)``` | Sheet acrylic 30mm x 30mm x 8mm | -| 1 | ```sheet(CF1, 30, 30, 2)``` | Sheet carbon fiber 30mm x 30mm x 1mm | -| 1 | ```sheet(CF2, 30, 30, 2)``` | Sheet carbon fiber 30mm x 30mm x 2mm | -| 1 | ```sheet(CF3, 30, 30, 2)``` | Sheet carbon fiber 30mm x 30mm x 3mm | -| 1 | ```sheet(glass2, 30, 30, 2)``` | Sheet glass 30mm x 30mm x 2mm | -| 1 | ```sheet(Steel06, 30, 30, 2)``` | Sheet mild steel 30mm x 30mm x 0.6mm | +| 1 | `sheet(FoilTape, 30, 30, 2)` | Aluminium foil tape 30mm x 30mm x 0.05mm | +| 1 | `sheet(AL6, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 6mm | +| 1 | `sheet(AL8, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 8mm | +| 1 | `sheet(Cardboard, 30, 30, 2)` | Corrugated cardboard 30mm x 30mm x 5mm | +| 1 | `sheet(Foam20, 30, 30, 2)` | Foam sponge 30mm x 30mm x 20mm | +| 1 | `sheet(DiBond, 30, 30, 2)` | Sheet DiBond 30mm x 30mm x 3mm | +| 1 | `sheet(DiBond6, 30, 30, 2)` | Sheet DiBond 30mm x 30mm x 6mm | +| 1 | `sheet(MDF10, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 10mm | +| 1 | `sheet(MDF12, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 12mm | +| 1 | `sheet(MDF19, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 19mm | +| 1 | `sheet(MDF6, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 6mm | +| 1 | `sheet(PMMA10, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 10mm | +| 1 | `sheet(PMMA2, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 2mm | +| 1 | `sheet(PMMA3, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 3mm | +| 1 | `sheet(PMMA6, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 6mm | +| 1 | `sheet(PMMA8, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 8mm | +| 1 | `sheet(CF1, 30, 30, 2)` | Sheet carbon fiber 30mm x 30mm x 1mm | +| 1 | `sheet(CF2, 30, 30, 2)` | Sheet carbon fiber 30mm x 30mm x 2mm | +| 1 | `sheet(CF3, 30, 30, 2)` | Sheet carbon fiber 30mm x 30mm x 3mm | +| 1 | `sheet(glass2, 30, 30, 2)` | Sheet glass 30mm x 30mm x 2mm | +| 1 | `sheet(Steel06, 30, 30, 2)` | Sheet mild steel 30mm x 30mm x 0.6mm | Top @@ -3209,43 +3209,43 @@ SK shaft support brackets ### Properties | Function | Description | |:--- |:--- | -| ```sk_base_height(type)``` | Height of base containing the screws | -| ```sk_diameter(type)``` | Rod hole diameter | -| ```sk_hole_offset(type)``` | Rod hole offset | -| ```sk_screw_separation(type)``` | Separation of screws in the base | +| `sk_base_height(type)` | Height of base containing the screws | +| `sk_diameter(type)` | Rod hole diameter | +| `sk_hole_offset(type)` | Rod hole offset | +| `sk_screw_separation(type)` | Separation of screws in the base | ### Functions | Function | Description | |:--- |:--- | -| ```sk_size(type)``` | Size of bracket | +| `sk_size(type)` | Size of bracket | ### Modules | Module | Description | |:--- |:--- | -| ```sk_bracket(type)``` | SK shaft support bracket | -| ```sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef, max_screw_depth = 6)``` | Assembly with fasteners in place | -| ```sk_bracket_hole_positions(type)``` | Place children at hole positions | +| `sk_bracket(type)` | SK shaft support bracket | +| `sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef, max_screw_depth = 6)` | Assembly with fasteners in place | +| `sk_bracket_hole_positions(type)` | Place children at hole positions | ![sk_brackets](tests/png/sk_brackets.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```extrusion(E2020, 20)``` | Extrusion E2020 x 20mm | -| 2 | ```extrusion(E3030, 20)``` | Extrusion E3030 x 20mm | -| 2 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer | -| 2 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T | -| 2 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T | -| 2 | ```nut(M5_nut, nyloc = undef)``` | Nut M5 x 4mm | -| 1 | ```sk_bracket(SK10)``` | SK10 shaft support bracket | -| 1 | ```sk_bracket(SK12)``` | SK12 shaft support bracket | -| 1 | ```sk_bracket(SK16)``` | SK16 shaft support bracket | -| 1 | ```sk_bracket(SK8)``` | SK8 shaft support bracket | -| 2 | ```screw(M4_cap_screw, 12)``` | Screw M4 cap x 12mm | -| 2 | ```screw(M4_dome_screw, 12)``` | Screw M4 dome x 12mm | -| 4 | ```screw(M5_cap_screw, 16)``` | Screw M5 cap x 16mm | -| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 6 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm | +| 2 | `extrusion(E2020, 20)` | Extrusion E2020 x 20mm | +| 2 | `extrusion(E3030, 20)` | Extrusion E3030 x 20mm | +| 2 | `sliding_t_nut(M4_hammer_nut)` | Nut M4 hammer | +| 2 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T | +| 2 | `sliding_t_nut(M5_sliding_t_nut)` | Nut M5 sliding T | +| 2 | `nut(M5_nut, nyloc = undef)` | Nut M5 x 4mm | +| 1 | `sk_bracket(SK10)` | SK10 shaft support bracket | +| 1 | `sk_bracket(SK12)` | SK12 shaft support bracket | +| 1 | `sk_bracket(SK16)` | SK16 shaft support bracket | +| 1 | `sk_bracket(SK8)` | SK8 shaft support bracket | +| 2 | `screw(M4_cap_screw, 12)` | Screw M4 cap x 12mm | +| 2 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm | +| 4 | `screw(M5_cap_screw, 16)` | Screw M5 cap x 16mm | +| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 6 | `washer(M5_washer)` | Washer M5 x 10mm x 1mm | Top @@ -3265,35 +3265,35 @@ Surface mount components for PCBs. ### Properties | Function | Description | |:--- |:--- | -| ```smd_led_lens(type)``` | Lens length width and height | -| ```smd_led_size(type)``` | Body length, width and height | -| ```smd_res_end_cap(type)``` | End cap width | -| ```smd_res_power(type)``` | Power rating in Watts | -| ```smd_res_size(type)``` | Body length, width and height | +| `smd_led_lens(type)` | Lens length width and height | +| `smd_led_size(type)` | Body length, width and height | +| `smd_res_end_cap(type)` | End cap width | +| `smd_res_power(type)` | Power rating in Watts | +| `smd_res_size(type)` | Body length, width and height | ### Functions | Function | Description | |:--- |:--- | -| ```smd_100th(x)``` | Convert dimension to 1/100" notation | -| ```smd_led_height(type)``` | Total height | -| ```smd_size(size)``` | Convert size to 1/100" notation | +| `smd_100th(x)` | Convert dimension to 1/100" notation | +| `smd_led_height(type)` | Total height | +| `smd_size(size)` | Convert size to 1/100" notation | ### Modules | Module | Description | |:--- |:--- | -| ```smd_led(type, colour, cutout)``` | Draw an SMD LED with specified ```colour``` | -| ```smd_resistor(type, value)``` | Draw an SMD resistor with specified value | +| `smd_led(type, colour, cutout)` | Draw an SMD LED with specified `colour` | +| `smd_resistor(type, value)` | Draw an SMD resistor with specified value | ![smds](tests/png/smds.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```smd_led(LED0603, green)``` | SMD LED 0603 green | -| 1 | ```smd_led(LED0805, blue)``` | SMD LED 0805 blue | -| 1 | ```smd_resistor(RES0603, 1R0)``` | SMD resistor 0603 1R0 0.1W | -| 1 | ```smd_resistor(RES0805, 10M)``` | SMD resistor 0805 10M 0.125W | -| 1 | ```smd_resistor(RES1206, 100K)``` | SMD resistor 1206 100K 0.25W | +| 1 | `smd_led(LED0603, green)` | SMD LED 0603 green | +| 1 | `smd_led(LED0805, blue)` | SMD LED 0805 blue | +| 1 | `smd_resistor(RES0603, 1R0)` | SMD resistor 0603 1R0 0.1W | +| 1 | `smd_resistor(RES0805, 10M)` | SMD resistor 0805 10M 0.125W | +| 1 | `smd_resistor(RES1206, 100K)` | SMD resistor 1206 100K 0.25W | Top @@ -3313,16 +3313,16 @@ Spade terminals used as parts of electrical components. ### Properties | Function | Description | |:--- |:--- | -| ```spade_hole(type)``` | Hole diameter | -| ```spade_l(type)``` | Length of the narrow part | -| ```spade_shank(type)``` | Shank width | -| ```spade_t(type)``` | Thickness | -| ```spade_w(type)``` | Width | +| `spade_hole(type)` | Hole diameter | +| `spade_l(type)` | Length of the narrow part | +| `spade_shank(type)` | Shank width | +| `spade_t(type)` | Thickness | +| `spade_w(type)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```spade(type, height = 14)``` | Draw a spade of the specified type and total length. The shank length is adjusted to make the length. | +| `spade(type, height = 14)` | Draw a spade of the specified type and total length. The shank length is adjusted to make the length. | ![spades](tests/png/spades.png) @@ -3344,35 +3344,35 @@ Filament spool models ### Properties | Function | Description | |:--- |:--- | -| ```spool_depth(type)``` | Internal depth | -| ```spool_diameter(type)``` | Outside diameter | -| ```spool_hub_bore(type)``` | Bore through the hub | -| ```spool_hub_diameter(type)``` | Diameter of the thicker hub | -| ```spool_hub_taper(type)``` | Diameter at which it tapers down to rim thickness | -| ```spool_hub_thickness(type)``` | Thickness at the hub | -| ```spool_rim_thickness(type)``` | Thickness at the outside rim | -| ```spool_width(type)``` | Internal width | +| `spool_depth(type)` | Internal depth | +| `spool_diameter(type)` | Outside diameter | +| `spool_hub_bore(type)` | Bore through the hub | +| `spool_hub_diameter(type)` | Diameter of the thicker hub | +| `spool_hub_taper(type)` | Diameter at which it tapers down to rim thickness | +| `spool_hub_thickness(type)` | Thickness at the hub | +| `spool_rim_thickness(type)` | Thickness at the outside rim | +| `spool_width(type)` | Internal width | ### Functions | Function | Description | |:--- |:--- | -| ```spool_height(type)``` | Outside width | -| ```spool_pitch(type)``` | Spacing of the rims | +| `spool_height(type)` | Outside width | +| `spool_pitch(type)` | Spacing of the rims | ### Modules | Module | Description | |:--- |:--- | -| ```spool(type, filament_depth = 0, filament_colour = "white", filament_d = 3)``` | Draw specified spool with optional filament | +| `spool(type, filament_depth = 0, filament_colour = "white", filament_d = 3)` | Draw specified spool with optional filament | ![spools](tests/png/spools.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```spool(spool_200x55)``` | Filament spool 200 x 55 | -| 1 | ```spool(spool_200x60)``` | Filament spool 200 x 60 | -| 1 | ```spool(spool_300x85)``` | Filament spool 300 x 85 | -| 1 | ```spool(spool_300x88)``` | Filament spool 300 x 88 | +| 1 | `spool(spool_200x55)` | Filament spool 200 x 55 | +| 1 | `spool(spool_200x60)` | Filament spool 200 x 60 | +| 1 | `spool(spool_300x85)` | Filament spool 300 x 85 | +| 1 | `spool(spool_300x88)` | Filament spool 300 x 88 | Top @@ -3394,33 +3394,33 @@ By default springs have their origin at the bottom but can be centered. ### Properties | Function | Description | |:--- |:--- | -| ```spring_closed(type)``` | Are the ends closed | -| ```spring_colour(type)``` | The colour | -| ```spring_gauge(type)``` | Wire gauge | -| ```spring_ground(type)``` | Are the ends ground flat | -| ```spring_length(type)``` | Uncompressed length | -| ```spring_mesh(type)``` | Optional pre-computed mesh | -| ```spring_od(type)``` | Outside diameter | -| ```spring_od2(type)``` | Second diameter for spiral springs | -| ```spring_turns(type)``` | Number of turns | +| `spring_closed(type)` | Are the ends closed | +| `spring_colour(type)` | The colour | +| `spring_gauge(type)` | Wire gauge | +| `spring_ground(type)` | Are the ends ground flat | +| `spring_length(type)` | Uncompressed length | +| `spring_mesh(type)` | Optional pre-computed mesh | +| `spring_od(type)` | Outside diameter | +| `spring_od2(type)` | Second diameter for spiral springs | +| `spring_turns(type)` | Number of turns | ### Functions | Function | Description | |:--- |:--- | -| ```comp_spring(type, l = 0)``` | Calculate the mesh for spring | +| `comp_spring(type, l = 0)` | Calculate the mesh for spring | ### Modules | Module | Description | |:--- |:--- | -| ```comp_spring(type, l = 0, center = false)``` | Draw specified spring, l can be set to specify the compressed length. | +| `comp_spring(type, l = 0, center = false)` | Draw specified spring, l can be set to specify the compressed length. | ![springs](tests/png/springs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```comp_spring(batt_spring)``` | Spring 5 - 6mm spiral OD, 0.5mm gauge x 8mm long, closed end | -| 1 | ```comp_spring(peg_spring)``` | Spring 6.4mm OD, 0.9mm gauge x 15.5mm long, closed end | +| 1 | `comp_spring(batt_spring)` | Spring 5 - 6mm spiral OD, 0.5mm gauge x 8mm long, closed end | +| 1 | `comp_spring(peg_spring)` | Spring 6.4mm OD, 0.9mm gauge x 15.5mm long, closed end | Top @@ -3440,32 +3440,32 @@ Solid state relays. ### Properties | Function | Description | |:--- |:--- | -| ```ssr_base_t(type)``` | Thickness of metal base | -| ```ssr_height(type)``` | Height | -| ```ssr_hole_d(type)``` | Screw hole diameter | -| ```ssr_hole_pitch(type)``` | Difference between screw centres | -| ```ssr_length(type)``` | Length | -| ```ssr_part(type)``` | Description | -| ```ssr_slot_w(type)``` | Width of the screw slot in the body | -| ```ssr_width(type)``` | Width | +| `ssr_base_t(type)` | Thickness of metal base | +| `ssr_height(type)` | Height | +| `ssr_hole_d(type)` | Screw hole diameter | +| `ssr_hole_pitch(type)` | Difference between screw centres | +| `ssr_length(type)` | Length | +| `ssr_part(type)` | Description | +| `ssr_slot_w(type)` | Width of the screw slot in the body | +| `ssr_width(type)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```ssr(type)``` | Draw specified SSR | -| ```ssr_assembly(type, screw, thickness)``` | Assembly with fasteners in place | -| ```ssr_hole_positions(type)``` | Place children at the screw positions | +| `ssr(type)` | Draw specified SSR | +| `ssr_assembly(type, screw, thickness)` | Assembly with fasteners in place | +| `ssr_hole_positions(type)` | Place children at the screw positions | ![ssrs](tests/png/ssrs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 4 | ```screw(M4_cap_screw, 16)``` | Screw M4 cap x 16mm | -| 1 | ```ssr(SSR25DA)``` | Solid state relay Fotek 25A | -| 1 | ```ssr(SSR10DA)``` | Solid state relay Robodigg 10A | -| 8 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | +| 4 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 4 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | +| 1 | `ssr(SSR25DA)` | Solid state relay Fotek 25A | +| 1 | `ssr(SSR10DA)` | Solid state relay Robodigg 10A | +| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | Top @@ -3485,46 +3485,46 @@ NEMA stepper motor model. ### Properties | Function | Description | |:--- |:--- | -| ```NEMA_body_radius(type)``` | Body radius | -| ```NEMA_boss_height(type)``` | Boss height | -| ```NEMA_boss_radius(type)``` | Boss around the spindle radius | -| ```NEMA_cap_heights(type)``` | Height of the end cap at the corner and the side | -| ```NEMA_hole_pitch(type)``` | Screw hole pitch | -| ```NEMA_length(type)``` | Body length | -| ```NEMA_radius(type)``` | End cap radius | -| ```NEMA_shaft_dia(type)``` | Shaft diameter | -| ```NEMA_shaft_length(type)``` | Shaft length above the face, if a list then a leadscrew: length, lead, starts | -| ```NEMA_width(type)``` | Width of the square face | +| `NEMA_body_radius(type)` | Body radius | +| `NEMA_boss_height(type)` | Boss height | +| `NEMA_boss_radius(type)` | Boss around the spindle radius | +| `NEMA_cap_heights(type)` | Height of the end cap at the corner and the side | +| `NEMA_hole_pitch(type)` | Screw hole pitch | +| `NEMA_length(type)` | Body length | +| `NEMA_radius(type)` | End cap radius | +| `NEMA_shaft_dia(type)` | Shaft diameter | +| `NEMA_shaft_length(type)` | Shaft length above the face, if a list then a leadscrew: length, lead, starts | +| `NEMA_width(type)` | Width of the square face | ### Functions | Function | Description | |:--- |:--- | -| ```NEMA_big_hole(type)``` | Clearance hole for the big boss | -| ```NEMA_holes(type)``` | Screw positions for for loop | +| `NEMA_big_hole(type)` | Clearance hole for the big boss | +| `NEMA_holes(type)` | Screw positions for for loop | ### Modules | Module | Description | |:--- |:--- | -| ```NEMA(type, shaft_angle = 0, jst_connector = false)``` | Draw specified NEMA stepper motor | -| ```NEMA_outline(type)``` | 2D outline | -| ```NEMA_screw_positions(type, n = 4)``` | Positions children at the screw holes | -| ```NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef)``` | Place screws and optional earth tag | +| `NEMA(type, shaft_angle = 0, jst_connector = false)` | Draw specified NEMA stepper motor | +| `NEMA_outline(type)` | 2D outline | +| `NEMA_screw_positions(type, n = 4)` | Positions children at the screw holes | +| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef)` | Place screws and optional earth tag | ![stepper_motors](tests/png/stepper_motors.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm | -| 15 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm | -| 1 | ```NEMA(NEMA14)``` | Stepper motor NEMA14 x 36mm | -| 1 | ```NEMA(NEMA16)``` | Stepper motor NEMA16 x 19.2mm | -| 1 | ```NEMA(NEMA17S)``` | Stepper motor NEMA17 x 34mm | -| 1 | ```NEMA(NEMA17M)``` | Stepper motor NEMA17 x 40mm | -| 1 | ```NEMA(NEMA17)``` | Stepper motor NEMA17 x 47mm | -| 1 | ```NEMA(NEMA23)``` | Stepper motor NEMA22 x 51.2mm | -| 11 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 15 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 4 | `ring_terminal(M3_ringterm)` | Ring terminal 3mm | +| 15 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | +| 1 | `NEMA(NEMA14)` | Stepper motor NEMA14 x 36mm | +| 1 | `NEMA(NEMA16)` | Stepper motor NEMA16 x 19.2mm | +| 1 | `NEMA(NEMA17S)` | Stepper motor NEMA17 x 34mm | +| 1 | `NEMA(NEMA17M)` | Stepper motor NEMA17 x 40mm | +| 1 | `NEMA(NEMA17)` | Stepper motor NEMA17 x 47mm | +| 1 | `NEMA(NEMA23)` | Stepper motor NEMA22 x 51.2mm | +| 11 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 15 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | Top @@ -3548,32 +3548,32 @@ Should be reasonably accurate if not close to fully open. ### Properties | Function | Description | |:--- |:--- | -| ```sclip_arm_length(type)``` | Length of arms | -| ```sclip_arm_width(type)``` | Width of spring arms | -| ```sclip_height(type)``` | External height | -| ```sclip_hinge_offset(type)``` | Offset of hinge | -| ```sclip_hook(type)``` | hook, length, width | -| ```sclip_length(type)``` | Total external length | -| ```sclip_max_gap(type)``` | Maximum opening | -| ```sclip_radius(type)``` | Bend radius | -| ```sclip_spigot(type)``` | Spigot length, width, height | -| ```sclip_thickness(type)``` | Thickness of the metal | -| ```sclip_width(type)``` | Width | +| `sclip_arm_length(type)` | Length of arms | +| `sclip_arm_width(type)` | Width of spring arms | +| `sclip_height(type)` | External height | +| `sclip_hinge_offset(type)` | Offset of hinge | +| `sclip_hook(type)` | hook, length, width | +| `sclip_length(type)` | Total external length | +| `sclip_max_gap(type)` | Maximum opening | +| `sclip_radius(type)` | Bend radius | +| `sclip_spigot(type)` | Spigot length, width, height | +| `sclip_thickness(type)` | Thickness of the metal | +| `sclip_width(type)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```swiss_clip(type, open = 0.9)``` | Draw a Swiss clip open by specified amount | -| ```swiss_clip_hole(type, open, h = 0)``` | Drill hole for spigot | +| `swiss_clip(type, open = 0.9)` | Draw a Swiss clip open by specified amount | +| `swiss_clip_hole(type, open, h = 0)` | Drill hole for spigot | ![swiss_clips](tests/png/swiss_clips.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```sheet(AL6, 40, 20, 1)``` | Aluminium tooling plate 40mm x 20mm x 6mm | -| 1 | ```sheet(glass2, 40, 20, 1)``` | Sheet glass 40mm x 20mm x 2mm | -| 2 | ```swiss_clip(UKPFS1008_10)``` | Swiss picture clip UKPFS1008_10 11mm | +| 1 | `sheet(AL6, 40, 20, 1)` | Aluminium tooling plate 40mm x 20mm x 6mm | +| 1 | `sheet(glass2, 40, 20, 1)` | Sheet glass 40mm x 20mm x 2mm | +| 2 | `swiss_clip(UKPFS1008_10)` | Swiss picture clip UKPFS1008_10 11mm | Top @@ -3593,52 +3593,52 @@ Toggle switches ### Properties | Function | Description | |:--- |:--- | -| ```toggle_angle(type)``` | Angle of the paddle | -| ```toggle_collar_d(type)``` | Collar diameter | -| ```toggle_collar_t(type)``` | Collar thickness | -| ```toggle_colour(type)``` | Body colour | -| ```toggle_depth(type)``` | Body depth | -| ```toggle_height(type)``` | Body height | -| ```toggle_id(type)``` | Barrel inside diameter | -| ```toggle_inset(type)``` | How far the metal is inset into the body | -| ```toggle_nut(type)``` | Nut type | -| ```toggle_od(type)``` | Barrel outside diameter | -| ```toggle_paddle_d1(type)``` | Diameter at the top of the paddle | -| ```toggle_paddle_l(type)``` | Length of the paddle | -| ```toggle_paddle_w(type)``` | Width at the top for non-spherical end | -| ```toggle_part(type)``` | Part description | -| ```toggle_pin_hp(type)``` | Pin x pitch | -| ```toggle_pin_l(type)``` | Pin length | -| ```toggle_pin_t(type)``` | Pin thickness | -| ```toggle_pin_vp(type)``` | Pin y pitch | -| ```toggle_pin_w(type)``` | Pin width | -| ```toggle_pins(type)``` | Number of pins | -| ```toggle_pivot(type)``` | Z offset of the pivot point above the top of the body | -| ```toggle_thickness(type)``` | Metal thickness | -| ```toggle_thread(type)``` | Length of threaded barrel | -| ```toggle_washer(type)``` | Washer type | -| ```toggle_width(type)``` | Body width | +| `toggle_angle(type)` | Angle of the paddle | +| `toggle_collar_d(type)` | Collar diameter | +| `toggle_collar_t(type)` | Collar thickness | +| `toggle_colour(type)` | Body colour | +| `toggle_depth(type)` | Body depth | +| `toggle_height(type)` | Body height | +| `toggle_id(type)` | Barrel inside diameter | +| `toggle_inset(type)` | How far the metal is inset into the body | +| `toggle_nut(type)` | Nut type | +| `toggle_od(type)` | Barrel outside diameter | +| `toggle_paddle_d1(type)` | Diameter at the top of the paddle | +| `toggle_paddle_l(type)` | Length of the paddle | +| `toggle_paddle_w(type)` | Width at the top for non-spherical end | +| `toggle_part(type)` | Part description | +| `toggle_pin_hp(type)` | Pin x pitch | +| `toggle_pin_l(type)` | Pin length | +| `toggle_pin_t(type)` | Pin thickness | +| `toggle_pin_vp(type)` | Pin y pitch | +| `toggle_pin_w(type)` | Pin width | +| `toggle_pins(type)` | Number of pins | +| `toggle_pivot(type)` | Z offset of the pivot point above the top of the body | +| `toggle_thickness(type)` | Metal thickness | +| `toggle_thread(type)` | Length of threaded barrel | +| `toggle_washer(type)` | Washer type | +| `toggle_width(type)` | Body width | ### Functions | Function | Description | |:--- |:--- | -| ```toggle_hole_radius(type)``` | Radius of the panel hole | +| `toggle_hole_radius(type)` | Radius of the panel hole | ### Modules | Module | Description | |:--- |:--- | -| ```toggle(type, thickness)``` | Draw specified toggle switch with the nuts and washers positioned for the specified panel thickness | -| ```toggle_hole(type, h = 100)``` | Drill the hole in a panel | +| `toggle(type, thickness)` | Draw specified toggle switch with the nuts and washers positioned for the specified panel thickness | +| `toggle_hole(type, h = 100)` | Drill the hole in a panel | ![toggles](tests/png/toggles.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```toggle(AP5236, 3)``` | Toggle switch AP5236 | -| 1 | ```toggle(CK7101, 3)``` | Toggle switch CK7101 | -| 1 | ```toggle(CK7105, 3)``` | Toggle switch CK7105 | -| 1 | ```toggle(MS332F, 3)``` | Toggle switch MS332F | +| 1 | `toggle(AP5236, 3)` | Toggle switch AP5236 | +| 1 | `toggle(CK7101, 3)` | Toggle switch CK7101 | +| 1 | `toggle(CK7105, 3)` | Toggle switch CK7105 | +| 1 | `toggle(MS332F, 3)` | Toggle switch MS332F | Top @@ -3658,36 +3658,36 @@ Iron core transformers. The grey shaded area is the keep out region where the te ### Properties | Function | Description | |:--- |:--- | -| ```tx_bobbin_height(type)``` | Bobbin height | -| ```tx_bobbin_offset(type)``` | Vertical offset of the bobbin from the centre of the laminations | -| ```tx_bobbin_radius(type)``` | Bobbin corner radius | -| ```tx_bobbin_width(type)``` | Bobbin width | -| ```tx_depth(type)``` | Bounding depth of the bobbin | -| ```tx_foot_depth(type)``` | Depth of the foot | -| ```tx_foot_thickness(type)``` | Thickness of the foot | -| ```tx_foot_width(type)``` | Width of the foot | -| ```tx_height(type)``` | Bounding height of the transformer | -| ```tx_lamination_depth(type)``` | Lamination depth | -| ```tx_lamination_height(type)``` | Lamination height | -| ```tx_part(type)``` | Part description | -| ```tx_screw(type)``` | Screw type | -| ```tx_width(type)``` | Bounding width of the core | -| ```tx_x_pitch(type)``` | Screw hole x pitch | -| ```tx_y_pitch(type)``` | Screw hole y pitch when four screws | +| `tx_bobbin_height(type)` | Bobbin height | +| `tx_bobbin_offset(type)` | Vertical offset of the bobbin from the centre of the laminations | +| `tx_bobbin_radius(type)` | Bobbin corner radius | +| `tx_bobbin_width(type)` | Bobbin width | +| `tx_depth(type)` | Bounding depth of the bobbin | +| `tx_foot_depth(type)` | Depth of the foot | +| `tx_foot_thickness(type)` | Thickness of the foot | +| `tx_foot_width(type)` | Width of the foot | +| `tx_height(type)` | Bounding height of the transformer | +| `tx_lamination_depth(type)` | Lamination depth | +| `tx_lamination_height(type)` | Lamination height | +| `tx_part(type)` | Part description | +| `tx_screw(type)` | Screw type | +| `tx_width(type)` | Bounding width of the core | +| `tx_x_pitch(type)` | Screw hole x pitch | +| `tx_y_pitch(type)` | Screw hole y pitch when four screws | ### Modules | Module | Description | |:--- |:--- | -| ```transformer(type)``` | Draw specified transformer | -| ```transformer_hole_positions(type)``` | Position children at the mounting hole positions | +| `transformer(type)` | Draw specified transformer | +| `transformer_hole_positions(type)` | Position children at the mounting hole positions | ![transformers](tests/png/transformers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```transformer(CCM300)``` | Transformer Carroll & Meynell CCM300/230 isolation | -| 1 | ```transformer(SMALLTX)``` | Transformer Small mains | +| 1 | `transformer(CCM300)` | Transformer Carroll & Meynell CCM300/230 isolation | +| 1 | `transformer(SMALLTX)` | Transformer Small mains | Top @@ -3707,40 +3707,40 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some ### Properties | Function | Description | |:--- |:--- | -| ```tubing_colour(type)``` | Colour | -| ```tubing_id(type)``` | Inside diameter | -| ```tubing_material(type)``` | Material description | -| ```tubing_od(type)``` | Outside diameter | +| `tubing_colour(type)` | Colour | +| `tubing_id(type)` | Inside diameter | +| `tubing_material(type)` | Material description | +| `tubing_od(type)` | Outside diameter | ### Functions | Function | Description | |:--- |:--- | -| ```tubing_or(type)``` | Outside radius | +| `tubing_or(type)` | Outside radius | ### Modules | Module | Description | |:--- |:--- | -| ```tubing(type, length = 15, forced_id = 0, center = true)``` | Draw specified tubing with optional forced internal diameter | +| `tubing(type, length = 15, forced_id = 0, center = true)` | Draw specified tubing with optional forced internal diameter | ![tubings](tests/png/tubings.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```tubing(CBNFIB10)``` | Carbon fiber OD 10mm ID 8mm x 15mm | -| 1 | ```tubing(HSHRNK16)``` | Heatshrink sleeving ID 1.6mm x 15mm | -| 1 | ```tubing(HSHRNK100)``` | Heatshrink sleeving ID 10mm x 15mm | -| 1 | ```tubing(HSHRNK24)``` | Heatshrink sleeving ID 2.4mm x 15mm | -| 1 | ```tubing(HSHRNK64)``` | Heatshrink sleeving ID 6.4mm x 15mm | -| 1 | ```tubing(NEOP85)``` | Neoprene tubing OD 8mm ID 5mm x 15mm | -| 1 | ```tubing(PTFE07)``` | PTFE sleeving OD 1.2mm ID 0.71mm x 15mm | -| 1 | ```tubing(PTFE20)``` | PTFE sleeving OD 2.6mm ID 2mm x 15mm | -| 1 | ```tubing(PTFE2_3)``` | PTFE tubing OD 3mm ID 2mm x 15mm | -| 1 | ```tubing(PF7)``` | PTFE tubing OD 4.6mm ID 3.84mm x 15mm | -| 1 | ```tubing(PTFE2_4)``` | PTFE tubing OD 4mm ID 2mm x 15mm | -| 1 | ```tubing(PTFE4_6)``` | PTFE tubing OD 6mm ID 4mm x 15mm | -| 1 | ```tubing(PVC64)``` | PVC aquarium tubing OD 6mm ID 4mm x 15mm | -| 1 | ```tubing(PVC85)``` | PVC aquarium tubing OD 8mm ID 5mm x 15mm | +| 1 | `tubing(CBNFIB10)` | Carbon fiber OD 10mm ID 8mm x 15mm | +| 1 | `tubing(HSHRNK16)` | Heatshrink sleeving ID 1.6mm x 15mm | +| 1 | `tubing(HSHRNK100)` | Heatshrink sleeving ID 10mm x 15mm | +| 1 | `tubing(HSHRNK24)` | Heatshrink sleeving ID 2.4mm x 15mm | +| 1 | `tubing(HSHRNK64)` | Heatshrink sleeving ID 6.4mm x 15mm | +| 1 | `tubing(NEOP85)` | Neoprene tubing OD 8mm ID 5mm x 15mm | +| 1 | `tubing(PTFE07)` | PTFE sleeving OD 1.2mm ID 0.71mm x 15mm | +| 1 | `tubing(PTFE20)` | PTFE sleeving OD 2.6mm ID 2mm x 15mm | +| 1 | `tubing(PTFE2_3)` | PTFE tubing OD 3mm ID 2mm x 15mm | +| 1 | `tubing(PF7)` | PTFE tubing OD 4.6mm ID 3.84mm x 15mm | +| 1 | `tubing(PTFE2_4)` | PTFE tubing OD 4mm ID 2mm x 15mm | +| 1 | `tubing(PTFE4_6)` | PTFE tubing OD 6mm ID 4mm x 15mm | +| 1 | `tubing(PVC64)` | PVC aquarium tubing OD 6mm ID 4mm x 15mm | +| 1 | `tubing(PVC85)` | PVC aquarium tubing OD 8mm ID 5mm x 15mm | Top @@ -3760,41 +3760,41 @@ Variable auto transformers. ### Properties | Function | Description | |:--- |:--- | -| ```variac_bulge_dia(type)``` | Bulge to opposite edge | -| ```variac_bulge_width(type)``` | Width of the bulge | -| ```variac_dial_big_hole(type)``` | Central dial hole diameter | -| ```variac_dial_dia(type)``` | Dial diameter | -| ```variac_dial_hole_pitch(type)``` | Screw pitch for the dial | -| ```variac_dial_hole_r(type)``` | Dial screw hole radius | -| ```variac_dial_thickness(type)``` | Dial thickness | -| ```variac_diameter(type)``` | Body diameter | -| ```variac_height(type)``` | Body height | -| ```variac_screw(type)``` | Screw type | -| ```variac_screw_pitch(type)``` | Pitch of screws | -| ```variac_screws(type)``` | Number of screws | -| ```variac_shaft_dia(type)``` | Shaft diameter | -| ```variac_shaft_length(type)``` | Shaft length | +| `variac_bulge_dia(type)` | Bulge to opposite edge | +| `variac_bulge_width(type)` | Width of the bulge | +| `variac_dial_big_hole(type)` | Central dial hole diameter | +| `variac_dial_dia(type)` | Dial diameter | +| `variac_dial_hole_pitch(type)` | Screw pitch for the dial | +| `variac_dial_hole_r(type)` | Dial screw hole radius | +| `variac_dial_thickness(type)` | Dial thickness | +| `variac_diameter(type)` | Body diameter | +| `variac_height(type)` | Body height | +| `variac_screw(type)` | Screw type | +| `variac_screw_pitch(type)` | Pitch of screws | +| `variac_screws(type)` | Number of screws | +| `variac_shaft_dia(type)` | Shaft diameter | +| `variac_shaft_length(type)` | Shaft length | ### Functions | Function | Description | |:--- |:--- | -| ```variac_radius(type)``` | Body radius | +| `variac_radius(type)` | Body radius | ### Modules | Module | Description | |:--- |:--- | -| ```variac(type, thickness = 3, dial = true)``` | Draw the specified variac with screws and possibly the dial when it is fixed and not rotating | -| ```variac_dial(type)``` | Draw the dial for the specified variac | -| ```variac_hole_positions(type, pitch = undef)``` | Position children at the screw positions | -| ```variac_holes(type, h = 100)``` | Drill panel holes for specified variac | +| `variac(type, thickness = 3, dial = true)` | Draw the specified variac with screws and possibly the dial when it is fixed and not rotating | +| `variac_dial(type)` | Draw the dial for the specified variac | +| `variac_hole_positions(type, pitch = undef)` | Position children at the screw positions | +| `variac_holes(type, h = 100)` | Drill panel holes for specified variac | ![variacs](tests/png/variacs.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```variac(DURATRAKV5HM, 3)``` | Variac DURATRAK V5HM | -| 1 | ```variac(RAVISTAT1F1, 3)``` | Variac RAVISTAT 1F-1 | +| 1 | `variac(DURATRAKV5HM, 3)` | Variac DURATRAK V5HM | +| 1 | `variac(RAVISTAT1F1, 3)` | Variac RAVISTAT 1F-1 | Top @@ -3812,48 +3812,48 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c ### Properties | Function | Description | |:--- |:--- | -| ```vero_assembly(type)``` | Name of the assembly | -| ```vero_breaks(type)``` | Breaks in the tracks | -| ```vero_components(type)``` | List of named components and their positions | -| ```vero_fr4(type)``` | True if FR4 rather than SRBP | -| ```vero_holes(type)``` | Number of holes in each strip | -| ```vero_joints(type)``` | List of solder joints | -| ```vero_mounting_holes(type)``` | Positions of the mounting holes | -| ```vero_no_track(type)``` | Missing tracks | -| ```vero_pitch(type)``` | Hole pitch | -| ```vero_screw(type)``` | Mounting screw type | -| ```vero_strips(type)``` | Number of strips | +| `vero_assembly(type)` | Name of the assembly | +| `vero_breaks(type)` | Breaks in the tracks | +| `vero_components(type)` | List of named components and their positions | +| `vero_fr4(type)` | True if FR4 rather than SRBP | +| `vero_holes(type)` | Number of holes in each strip | +| `vero_joints(type)` | List of solder joints | +| `vero_mounting_holes(type)` | Positions of the mounting holes | +| `vero_no_track(type)` | Missing tracks | +| `vero_pitch(type)` | Hole pitch | +| `vero_screw(type)` | Mounting screw type | +| `vero_strips(type)` | Number of strips | ### Functions | Function | Description | |:--- |:--- | -| ```vero_length(type)``` | Length of the board | -| ```vero_thickness(type)``` | Thickness of the substrate | -| ```vero_track_thickness(type)``` | Thickness of the tracks | -| ```vero_track_width(type)``` | The width of the tracks | -| ```vero_width(type)``` | Width of the board | +| `vero_length(type)` | Length of the board | +| `vero_thickness(type)` | Thickness of the substrate | +| `vero_track_thickness(type)` | Thickness of the tracks | +| `vero_track_width(type)` | The width of the tracks | +| `vero_width(type)` | Width of the board | ### Modules | Module | Description | |:--- |:--- | -| ```vero_cutouts(type, angle = undef)``` | Make cutouts to clear components | -| ```vero_grid_pos(type, x, y)``` | Convert grid position to offset from the centre | -| ```vero_mounting_hole_positions(type)``` | Positions children at the mounting holes | -| ```vero_mounting_holes(type, h = 100)``` | Drill mounting holes in a panel | -| ```veroboard(type)``` | Draw specified veroboard with missing tracks and track breaks | -| ```veroboard_assembly(type, height, thickness, flip = false)``` | Draw the assembly with components and fasteners in place | +| `vero_cutouts(type, angle = undef)` | Make cutouts to clear components | +| `vero_grid_pos(type, x, y)` | Convert grid position to offset from the centre | +| `vero_mounting_hole_positions(type)` | Positions children at the mounting holes | +| `vero_mounting_holes(type, h = 100)` | Drill mounting holes in a panel | +| `veroboard(type)` | Draw specified veroboard with missing tracks and track breaks | +| `veroboard_assembly(type, height, thickness, flip = false)` | Draw the assembly with components and fasteners in place | ![veroboard](tests/png/veroboard.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```idc_transition(2p54header, 10)``` | IDC transition header 10 x 2 | -| 4 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 4 | ```screw(M3_dome_screw, 25)``` | Screw M3 dome x 25mm | -| 2 | ```green_terminal(gt_2p54, 10)``` | Terminal block 10 way 0.1" | -| 2 | ```veroboard(z_vb)``` | Veroboard 5 holes x 22strips | -| 8 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 2 | `idc_transition(2p54header, 10)` | IDC transition header 10 x 2 | +| 4 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 4 | `screw(M3_dome_screw, 25)` | Screw M3 dome x 25mm | +| 2 | `green_terminal(gt_2p54, 10)` | Terminal block 10 way 0.1" | +| 2 | `veroboard(z_vb)` | Veroboard 5 holes x 22strips | +| 8 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | ### Printed | Qty | Filename | @@ -3885,67 +3885,67 @@ If a washer is given a child, usually a screw or a nut, then it is placed on its ### Properties | Function | Description | |:--- |:--- | -| ```penny_washer(type)``` | Corresponding penny washer | -| ```spring_washer_diameter(type)``` | Spring washer size | -| ```spring_washer_thickness(type)``` | Spring washer thickness | -| ```star_washer_diameter(type)``` | Star version size | -| ```washer_diameter(type)``` | External diameter | -| ```washer_size(type)``` | Noiminal size | -| ```washer_soft(type)``` | True if rubber | -| ```washer_thickness(type)``` | Thickness | +| `penny_washer(type)` | Corresponding penny washer | +| `spring_washer_diameter(type)` | Spring washer size | +| `spring_washer_thickness(type)` | Spring washer thickness | +| `star_washer_diameter(type)` | Star version size | +| `washer_diameter(type)` | External diameter | +| `washer_size(type)` | Noiminal size | +| `washer_soft(type)` | True if rubber | +| `washer_thickness(type)` | Thickness | ### Functions | Function | Description | |:--- |:--- | -| ```washer_colour(type)``` | Washer colour | -| ```washer_id(type)``` | Inside diameter | -| ```washer_radius(type)``` | Outside radius | +| `washer_colour(type)` | Washer colour | +| `washer_id(type)` | Inside diameter | +| `washer_radius(type)` | Outside radius | ### Modules | Module | Description | |:--- |:--- | -| ```penny_washer(type)``` | Draw penny version of specified plain washer | -| ```printed_washer(type, name = false)``` | Create printed washer | -| ```spring_washer(type)``` | Draw spring version of washer | -| ```star_washer(type)``` | Draw star version of washer | -| ```washer(type)``` | Draw specified washer | +| `penny_washer(type)` | Draw penny version of specified plain washer | +| `printed_washer(type, name = false)` | Create printed washer | +| `spring_washer(type)` | Draw spring version of washer | +| `star_washer(type)` | Draw star version of washer | +| `washer(type)` | Draw specified washer | ![washers](tests/png/washers.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 1 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm | -| 1 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 1 | ```washer(M3p5_washer)``` | Washer M3.5 x 8mm x 0.5mm | -| 1 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 1 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm | -| 1 | ```washer(M6_washer)``` | Washer M6 x 12.5mm x 1.5mm | -| 1 | ```washer(M8_washer)``` | Washer M8 x 17mm x 1.6mm | -| 1 | ```washer(M3_penny_washer)``` | Washer penny M3 x 12mm x 0.8mm | -| 1 | ```washer(M4_penny_washer)``` | Washer penny M4 x 14mm x 0.8mm | -| 1 | ```washer(M5_penny_washer)``` | Washer penny M5 x 20mm x 1.4mm | -| 1 | ```washer(M6_penny_washer)``` | Washer penny M6 x 26mm x 1.5mm | -| 1 | ```washer(M8_penny_washer)``` | Washer penny M8 x 30mm x 1.5mm | -| 1 | ```washer(M3_rubber_washer)``` | Washer rubber M3 x 10mm x 1.5mm | -| 1 | ```spring_washer(M2_washer)``` | Washer spring M2 x 0.5mm | -| 1 | ```spring_washer(M2p5_washer)``` | Washer spring M2.5 x 0.6mm | -| 1 | ```spring_washer(M3_washer)``` | Washer spring M3 x 1mm | -| 1 | ```spring_washer(M3p5_washer)``` | Washer spring M3.5 x 1mm | -| 1 | ```spring_washer(M4_washer)``` | Washer spring M4 x 1.2mm | -| 1 | ```spring_washer(M5_washer)``` | Washer spring M5 x 1.6mm | -| 1 | ```spring_washer(M6_washer)``` | Washer spring M6 x 1.6mm | -| 1 | ```spring_washer(M8_washer)``` | Washer spring M8 x 2mm | -| 1 | ```star_washer(M2_washer)``` | Washer star M2 x 0.3mm | -| 1 | ```star_washer(M2p5_washer)``` | Washer star M2.5 x 0.5mm | -| 1 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | -| 1 | ```star_washer(M3_rubber_washer)``` | Washer star M3 x 1.5mm | -| 1 | ```star_washer(M3p5_washer)``` | Washer star M3.5 x 0.5mm | -| 1 | ```star_washer(M4_washer)``` | Washer star M4 x 0.8mm | -| 1 | ```star_washer(M5_washer)``` | Washer star M5 x 1mm | -| 1 | ```star_washer(M6_washer)``` | Washer star M6 x 1.5mm | -| 1 | ```star_washer(M8_washer)``` | Washer star M8 x 1.6mm | +| 1 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 1 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | +| 1 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 1 | `washer(M3p5_washer)` | Washer M3.5 x 8mm x 0.5mm | +| 1 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 1 | `washer(M5_washer)` | Washer M5 x 10mm x 1mm | +| 1 | `washer(M6_washer)` | Washer M6 x 12.5mm x 1.5mm | +| 1 | `washer(M8_washer)` | Washer M8 x 17mm x 1.6mm | +| 1 | `washer(M3_penny_washer)` | Washer penny M3 x 12mm x 0.8mm | +| 1 | `washer(M4_penny_washer)` | Washer penny M4 x 14mm x 0.8mm | +| 1 | `washer(M5_penny_washer)` | Washer penny M5 x 20mm x 1.4mm | +| 1 | `washer(M6_penny_washer)` | Washer penny M6 x 26mm x 1.5mm | +| 1 | `washer(M8_penny_washer)` | Washer penny M8 x 30mm x 1.5mm | +| 1 | `washer(M3_rubber_washer)` | Washer rubber M3 x 10mm x 1.5mm | +| 1 | `spring_washer(M2_washer)` | Washer spring M2 x 0.5mm | +| 1 | `spring_washer(M2p5_washer)` | Washer spring M2.5 x 0.6mm | +| 1 | `spring_washer(M3_washer)` | Washer spring M3 x 1mm | +| 1 | `spring_washer(M3p5_washer)` | Washer spring M3.5 x 1mm | +| 1 | `spring_washer(M4_washer)` | Washer spring M4 x 1.2mm | +| 1 | `spring_washer(M5_washer)` | Washer spring M5 x 1.6mm | +| 1 | `spring_washer(M6_washer)` | Washer spring M6 x 1.6mm | +| 1 | `spring_washer(M8_washer)` | Washer spring M8 x 2mm | +| 1 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm | +| 1 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm | +| 1 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | +| 1 | `star_washer(M3_rubber_washer)` | Washer star M3 x 1.5mm | +| 1 | `star_washer(M3p5_washer)` | Washer star M3.5 x 0.5mm | +| 1 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm | +| 1 | `star_washer(M5_washer)` | Washer star M5 x 1mm | +| 1 | `star_washer(M6_washer)` | Washer star M6 x 1.5mm | +| 1 | `star_washer(M8_washer)` | Washer star M8 x 1.6mm | ### Printed | Qty | Filename | @@ -3975,22 +3975,22 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c ### Functions | Function | Description | |:--- |:--- | -| ```cable_bundle(cable)``` | Arrangement of a bundle in a flat cable clip | -| ```cable_height(cable)``` | Height in flat clip | -| ```cable_radius(cable)``` | Radius of a bundle of wires, see . | -| ```cable_width(cable)``` | Width in flat clip | -| ```cable_wire_size(cable)``` | Size of each wire in a bundle | -| ```cable_wires(cable)``` | Number of wires in a bindle | -| ```wire_hole_radius(cable)``` | Radius of a hole to accept a bundle of wires | +| `cable_bundle(cable)` | Arrangement of a bundle in a flat cable clip | +| `cable_height(cable)` | Height in flat clip | +| `cable_radius(cable)` | Radius of a bundle of wires, see . | +| `cable_width(cable)` | Width in flat clip | +| `cable_wire_size(cable)` | Size of each wire in a bundle | +| `cable_wires(cable)` | Number of wires in a bindle | +| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires | ### Modules | Module | Description | |:--- |:--- | -| ```cable_tie(cable_r, thickness)``` | A ziptie threaded around cable radius ```cable_r``` and through a panel with specified ```thickness```. | -| ```cable_tie_holes(cable_r, h = 100)``` | Holes to thread a ziptie through a panel to make a cable tie. | -| ```mouse_hole(cable, h = 100, teardrop = false)``` | A mouse hole to allow a panel to go over a wire bundle. | -| ```ribbon_cable(ways, length)``` | Add ribbon cable to the BOM | -| ```wire(colour, strands, length, strand = 0.2)``` | Add stranded wire to the BOM | +| `cable_tie(cable_r, thickness)` | A ziptie threaded around cable radius `cable_r` and through a panel with specified `thickness`. | +| `cable_tie_holes(cable_r, h = 100)` | Holes to thread a ziptie through a panel to make a cable tie. | +| `mouse_hole(cable, h = 100, teardrop = false)` | A mouse hole to allow a panel to go over a wire bundle. | +| `ribbon_cable(ways, length)` | Add ribbon cable to the BOM | +| `wire(colour, strands, length, strand = 0.2)` | Add stranded wire to the BOM | ![wire](tests/png/wire.png) @@ -4004,7 +4004,7 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c | 1 | | Wire orange 7/0.2mm strands, length 90mm | | 1 | | Wire red 7/0.2mm strands, length 90mm | | 1 | | Wire yellow 7/0.2mm strands, length 90mm | -| 1 | ```ziptie(small_ziptie, 2.1)``` | Ziptie 2.5mm x 100mm min length | +| 1 | `ziptie(small_ziptie, 2.1)` | Ziptie 2.5mm x 100mm min length | Top @@ -4024,25 +4024,25 @@ Cable zipties. ### Properties | Function | Description | |:--- |:--- | -| ```ziptie_colour(type)``` | Colour | -| ```ziptie_latch(type)``` | Latch dimensions | -| ```ziptie_tail(type)``` | The length without teeth | -| ```ziptie_thickness(type)``` | Thickness | -| ```ziptie_width(type)``` | Width | +| `ziptie_colour(type)` | Colour | +| `ziptie_latch(type)` | Latch dimensions | +| `ziptie_tail(type)` | The length without teeth | +| `ziptie_thickness(type)` | Thickness | +| `ziptie_width(type)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```ziptie(type, r, t = 0)``` | Draw specified ziptie wrapped around radius ```r``` and optionally through panel thickness ```t``` | +| `ziptie(type, r, t = 0)` | Draw specified ziptie wrapped around radius `r` and optionally through panel thickness `t` | ![zipties](tests/png/zipties.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```ziptie(small_ziptie, 5)``` | Ziptie 2.5mm x 100mm min length | -| 1 | ```ziptie(ziptie_3p6mm, 5)``` | Ziptie 3.6mm x 100mm min length | -| 1 | ```ziptie(ziptie_3mm, 5)``` | Ziptie 3mm x 100mm min length | +| 1 | `ziptie(small_ziptie, 5)` | Ziptie 2.5mm x 100mm min length | +| 1 | `ziptie(ziptie_3p6mm, 5)` | Ziptie 3.6mm x 100mm min length | +| 1 | `ziptie(ziptie_3mm, 5)` | Ziptie 3mm x 100mm min length | Top @@ -4071,69 +4071,69 @@ Normally the side sheets are the same type but they can be overridden individual ### Properties | Function | Description | |:--- |:--- | -| ```box_base_sheet(type)``` | Sheet type for the bottom | -| ```box_depth(type)``` | Internal depth | -| ```box_feet(type)``` | True to enable feet on the bottom bezel | -| ```box_height(type)``` | Internal height | -| ```box_screw(type)``` | Screw type to be used at the corners | -| ```box_sheets(type)``` | Sheet type used for the sides | -| ```box_shelf_screw(type)``` | Screw type to hold a shelf | -| ```box_top_sheet(type)``` | Sheet type for the top | -| ```box_wall(type)``` | Wall thickness of 3D parts | -| ```box_width(type)``` | Internal width | +| `box_base_sheet(type)` | Sheet type for the bottom | +| `box_depth(type)` | Internal depth | +| `box_feet(type)` | True to enable feet on the bottom bezel | +| `box_height(type)` | Internal height | +| `box_screw(type)` | Screw type to be used at the corners | +| `box_sheets(type)` | Sheet type used for the sides | +| `box_shelf_screw(type)` | Screw type to hold a shelf | +| `box_top_sheet(type)` | Sheet type for the top | +| `box_wall(type)` | Wall thickness of 3D parts | +| `box_width(type)` | Internal width | ### Functions | Function | Description | |:--- |:--- | -| ```box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw)``` | Construct a property list for a box. | -| ```box_bezel_height(type, bottom)``` | Bezel height for top or bottom | -| ```box_corner_gap(type)``` | Gap between box_sheets at the corners to connect inside and outside profiles | -| ```box_inset(type)``` | How much the bezel intrudes on the specified width and length, away from the corners | -| ```box_intrusion(type)``` | Corner profile intrusion | -| ```box_margin(type)``` | How much the bezel intrudes on the specified height | -| ```box_outset(type)``` | How much the bezel expands the specified internal size | +| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw)` | Construct a property list for a box. | +| `box_bezel_height(type, bottom)` | Bezel height for top or bottom | +| `box_corner_gap(type)` | Gap between box_sheets at the corners to connect inside and outside profiles | +| `box_inset(type)` | How much the bezel intrudes on the specified width and length, away from the corners | +| `box_intrusion(type)` | Corner profile intrusion | +| `box_margin(type)` | How much the bezel intrudes on the specified height | +| `box_outset(type)` | How much the bezel expands the specified internal size | ### Modules | Module | Description | |:--- |:--- | -| ```box_back(type)``` | Default back, can be overridden to customise | -| ```box_back_blank(type, sheet = false)``` | Generates a 2D template for the back sheet, `sheet` can be set to override the type | -| ```box_base(type)``` | Default base, can be overridden to customise | -| ```box_base_blank(type)``` | Generates a 2D template for the base sheet | -| ```box_bezel(type, bottom)``` | Generates top and bottom bezel STLs | -| ```box_bezel_section(type, bottom, rows, cols, x, y)``` | Generates interlocking sections of the bezel to allow it to be bigger than the printer | -| ```box_corner_profile(type)``` | Generates the corner profile STL for 3D printing. | -| ```box_corner_profile_2D(type)``` | The 2D shape of the corner profile. | -| ```box_corner_profile_section(type, section, sections)``` | Generates interlocking sections of the corner profile to allow it to be taller than the printer | -| ```box_corner_profile_sections(type, section, sections)``` | Generate four copies of a corner profile section | -| ```box_front(type)``` | Default front, can be overridden to customise | -| ```box_front_blank(type, sheet = false)``` | Generates a 2D template for the front sheet, `sheet` can be set to override the type | -| ```box_left(type)``` | Default left side, can be overridden to customise | -| ```box_left_blank(type, sheet = false)``` | Generates a 2D template for the left sheet, `sheet` can be set to override the type | -| ```box_right(type)``` | Default right side, can be overridden to customise | -| ```box_right_blank(type, sheet = false)``` | Generates a 2D template for the right sheet, `sheet` can be set to override the type | -| ```box_shelf_blank(type, sheet = false)``` | Generates a 2D template for a shelf sheet | -| ```box_shelf_bracket(type, screw_positions, wall = undef)``` | Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts | -| ```box_shelf_bracket_section(type, rows, cols, x, y)``` | Generates sections of the shelf bracket to allow it to be bigger than the printer | -| ```box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef)``` | Place children at the shelf screw positions | -| ```box_top(type)``` | Default top, can be overridden to customise | -| ```box_top_blank(type)``` | Generates a 2D template for the top sheet | -| ```grill(width, height, r = 1000, poly = false, h = 0)``` | A staggered array of 5mm holes to make grills in sheets. Can be constrained to be circular. Set `poly` `true` for printing, `false` for milling. | +| `box_back(type)` | Default back, can be overridden to customise | +| `box_back_blank(type, sheet = false)` | Generates a 2D template for the back sheet, `sheet` can be set to override the type | +| `box_base(type)` | Default base, can be overridden to customise | +| `box_base_blank(type)` | Generates a 2D template for the base sheet | +| `box_bezel(type, bottom)` | Generates top and bottom bezel STLs | +| `box_bezel_section(type, bottom, rows, cols, x, y)` | Generates interlocking sections of the bezel to allow it to be bigger than the printer | +| `box_corner_profile(type)` | Generates the corner profile STL for 3D printing. | +| `box_corner_profile_2D(type)` | The 2D shape of the corner profile. | +| `box_corner_profile_section(type, section, sections)` | Generates interlocking sections of the corner profile to allow it to be taller than the printer | +| `box_corner_profile_sections(type, section, sections)` | Generate four copies of a corner profile section | +| `box_front(type)` | Default front, can be overridden to customise | +| `box_front_blank(type, sheet = false)` | Generates a 2D template for the front sheet, `sheet` can be set to override the type | +| `box_left(type)` | Default left side, can be overridden to customise | +| `box_left_blank(type, sheet = false)` | Generates a 2D template for the left sheet, `sheet` can be set to override the type | +| `box_right(type)` | Default right side, can be overridden to customise | +| `box_right_blank(type, sheet = false)` | Generates a 2D template for the right sheet, `sheet` can be set to override the type | +| `box_shelf_blank(type, sheet = false)` | Generates a 2D template for a shelf sheet | +| `box_shelf_bracket(type, screw_positions, wall = undef)` | Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts | +| `box_shelf_bracket_section(type, rows, cols, x, y)` | Generates sections of the shelf bracket to allow it to be bigger than the printer | +| `box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef)` | Place children at the shelf screw positions | +| `box_top(type)` | Default top, can be overridden to customise | +| `box_top_blank(type)` | Generates a 2D template for the top sheet | +| `grill(width, height, r = 1000, poly = false, h = 0)` | A staggered array of 5mm holes to make grills in sheets. Can be constrained to be circular. Set `poly` `true` for printing, `false` for milling. | ![box](tests/png/box.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 8 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 4 | ```screw(M3_dome_screw, 16)``` | Screw M3 dome x 16mm | -| 4 | ```screw(M3_dome_screw, 20)``` | Screw M3 dome x 20mm | -| 2 | ```sheet(DiBond, 143, 63, 1)``` | Sheet DiBond 143mm x 63mm x 3mm | -| 1 | ```sheet(DiBond6, 150, 100, 2.9)``` | Sheet DiBond 150mm x 100mm x 6mm | -| 2 | ```sheet(DiBond, 93, 63, 1)``` | Sheet DiBond 93mm x 63mm x 3mm | -| 1 | ```sheet(PMMA3, 150, 100, 2.9)``` | Sheet acrylic 150mm x 100mm x 3mm | -| 8 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 8 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 8 | `insert(F1BM3)` | Heatfit insert M3 | +| 4 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm | +| 4 | `screw(M3_dome_screw, 20)` | Screw M3 dome x 20mm | +| 2 | `sheet(DiBond, 143, 63, 1)` | Sheet DiBond 143mm x 63mm x 3mm | +| 1 | `sheet(DiBond6, 150, 100, 2.9)` | Sheet DiBond 150mm x 100mm x 6mm | +| 2 | `sheet(DiBond, 93, 63, 1)` | Sheet DiBond 93mm x 63mm x 3mm | +| 1 | `sheet(PMMA3, 150, 100, 2.9)` | Sheet acrylic 150mm x 100mm x 3mm | +| 8 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 8 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -4166,7 +4166,7 @@ Normally the side sheets are the same type but they can be overridden individual A box made from CNC cut panels butted together using printed fixing blocks. Useful for making large boxes with minimal 3D printing. More blocks are added as the box gets bigger. -Needs to be ```include```d rather than ```use```d to allow the panel definitions to be overridden to add holes +Needs to be `include`d rather than `use`d to allow the panel definitions to be overridden to add holes and mounted components. A list specifies the internal dimensions, screw type, top, bottom and side sheet types and the block @@ -4186,59 +4186,59 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block). ### Properties | Function | Description | |:--- |:--- | -| ```bbox_base_sheet(type)``` | Sheet type for the base | -| ```bbox_depth(type)``` | Internal depth | -| ```bbox_height(type)``` | Internal height | -| ```bbox_name(type)``` | Optional name if there is more than one box in a project | -| ```bbox_screw(type)``` | Screw type for corner blocks | -| ```bbox_sheets(type)``` | Sheet type for the sides | -| ```bbox_skip_blocks(type)``` | List of fixing blocks to skip, used to allow a hinged panel for example | -| ```bbox_span(type)``` | Maximum span between fixing blocks | -| ```bbox_top_sheet(type)``` | Sheet type for the top | -| ```bbox_width(type)``` | Internal width | -| ```star_washers(type)``` | Set to false to remove star washers. | +| `bbox_base_sheet(type)` | Sheet type for the base | +| `bbox_depth(type)` | Internal depth | +| `bbox_height(type)` | Internal height | +| `bbox_name(type)` | Optional name if there is more than one box in a project | +| `bbox_screw(type)` | Screw type for corner blocks | +| `bbox_sheets(type)` | Sheet type for the sides | +| `bbox_skip_blocks(type)` | List of fixing blocks to skip, used to allow a hinged panel for example | +| `bbox_span(type)` | Maximum span between fixing blocks | +| `bbox_top_sheet(type)` | Sheet type for the top | +| `bbox_width(type)` | Internal width | +| `star_washers(type)` | Set to false to remove star washers. | ### Functions | Function | Description | |:--- |:--- | -| ```bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true)``` | Construct the property list for a butt_box | -| ```bbox_area(type)``` | Internal surdface area in m^2 | -| ```bbox_volume(type)``` | Internal volume in litres | +| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true)` | Construct the property list for a butt_box | +| `bbox_area(type)` | Internal surdface area in m^2 | +| `bbox_volume(type)` | Internal volume in litres | ### Modules | Module | Description | |:--- |:--- | -| ```_bbox_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true)``` | The box assembly, wrap with a local copy without parameters | -| ```bbox_back(type)``` | Default back, can be overridden to customise | -| ```bbox_back_blank(type, sheet = false)``` | 2D template for the back | -| ```bbox_base(type)``` | Default base, can be overridden to customise | -| ```bbox_base_blank(type)``` | 2D template for the base | -| ```bbox_front(type)``` | Default front, can be overridden to customise | -| ```bbox_front_blank(type, sheet = false, width = 0)``` | 2D template for the front | -| ```bbox_left(type)``` | Default left side, can be overridden to customise | -| ```bbox_left_blank(type, sheet = false)``` | 2D template for the left side | -| ```bbox_right(type)``` | Default right side, can be overridden to customise | -| ```bbox_right_blank(type, sheet = false)``` | 2D template for the right side | -| ```bbox_shelf_blank(type)``` | 2D template for a shelf | -| ```bbox_top(type)``` | Default top, can be overridden to customise | -| ```bbox_top_blank(type)``` | 2D template for the top | +| `_bbox_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true)` | The box assembly, wrap with a local copy without parameters | +| `bbox_back(type)` | Default back, can be overridden to customise | +| `bbox_back_blank(type, sheet = false)` | 2D template for the back | +| `bbox_base(type)` | Default base, can be overridden to customise | +| `bbox_base_blank(type)` | 2D template for the base | +| `bbox_front(type)` | Default front, can be overridden to customise | +| `bbox_front_blank(type, sheet = false, width = 0)` | 2D template for the front | +| `bbox_left(type)` | Default left side, can be overridden to customise | +| `bbox_left_blank(type, sheet = false)` | 2D template for the left side | +| `bbox_right(type)` | Default right side, can be overridden to customise | +| `bbox_right_blank(type, sheet = false)` | 2D template for the right side | +| `bbox_shelf_blank(type)` | 2D template for a shelf | +| `bbox_top(type)` | Default top, can be overridden to customise | +| `bbox_top_blank(type)` | 2D template for the top | ![butt_box](tests/png/butt_box.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 48 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 36 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 4 | ```screw(M3_dome_screw, 12)``` | Screw M3 dome x 12mm | -| 8 | ```screw(M3_dome_screw, 16)``` | Screw M3 dome x 16mm | -| 2 | ```sheet(DiBond, 303, 126)``` | Sheet DiBond 303mm x 126mm x 3mm | -| 1 | ```sheet(DiBond, 400, 126)``` | Sheet DiBond 400mm x 126mm x 3mm | -| 1 | ```sheet(DiBond6, 400, 300, 1)``` | Sheet DiBond 400mm x 300mm x 6mm | -| 1 | ```sheet(DiBond, 406, 129)``` | Sheet DiBond 406mm x 129mm x 3mm | -| 1 | ```sheet(PMMA3, 406, 303)``` | Sheet acrylic 406mm x 303mm x 3mm | -| 48 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 48 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 48 | `insert(F1BM3)` | Heatfit insert M3 | +| 36 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 4 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm | +| 8 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm | +| 2 | `sheet(DiBond, 303, 126)` | Sheet DiBond 303mm x 126mm x 3mm | +| 1 | `sheet(DiBond, 400, 126)` | Sheet DiBond 400mm x 126mm x 3mm | +| 1 | `sheet(DiBond6, 400, 300, 1)` | Sheet DiBond 400mm x 300mm x 6mm | +| 1 | `sheet(DiBond, 406, 129)` | Sheet DiBond 406mm x 129mm x 3mm | +| 1 | `sheet(PMMA3, 406, 303)` | Sheet acrylic 406mm x 303mm x 3mm | +| 48 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 48 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -4280,13 +4280,13 @@ of conductive panels, an extra layer of insulation. ### Modules | Module | Description | |:--- |:--- | -| ```mouse_grommet(r, thickness)``` | Make the STL for a mouse grommet | -| ```mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance)``` | Make a hole for a mouse grommet | -| ```ribbon_grommet(ways, thickness)``` | Generate the STL for a printed ribbon grommet | -| ```ribbon_grommet_hole(ways, h = 50, expand = true)``` | Generate a hole for a ribbon grommet | -| ```round_grommet_bottom(diameter, od = undef)``` | Generate the STL for a round grommet bottom half | -| ```round_grommet_hole(diameter, h = 100)``` | Make a hole for a round grommet | -| ```round_grommet_top(diameter, thickness, od = undef)``` | Generate the STL for a round grommet top half | +| `mouse_grommet(r, thickness)` | Make the STL for a mouse grommet | +| `mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance)` | Make a hole for a mouse grommet | +| `ribbon_grommet(ways, thickness)` | Generate the STL for a printed ribbon grommet | +| `ribbon_grommet_hole(ways, h = 50, expand = true)` | Generate a hole for a ribbon grommet | +| `round_grommet_bottom(diameter, od = undef)` | Generate the STL for a round grommet bottom half | +| `round_grommet_hole(diameter, h = 100)` | Make a hole for a round grommet | +| `round_grommet_top(diameter, thickness, od = undef)` | Generate the STL for a round grommet top half | ![cable_grommets](tests/png/cable_grommets.png) @@ -4314,35 +4314,35 @@ Housings for PCB cameras. ### Functions | Function | Description | |:--- |:--- | -| ```cam_front_size(cam)``` | Outside dimensions of the case | +| `cam_front_size(cam)` | Outside dimensions of the case | ### Modules | Module | Description | |:--- |:--- | -| ```camera_assembly(cam, angle = 0)``` | Camera case assembly | -| ```camera_back(cam)``` | Make the STL for a camera case back | -| ```camera_bracket(cam)``` | Make the STL for the camera bracket | -| ```camera_bracket_position(cam)``` | Position children at the bracket position | -| ```camera_bracket_screw_positions(cam)``` | Position children at the bracket screw positions | -| ```camera_front(cam, hinge = 0)``` | Make the STL for a camera case front | -| ```rpi_camera_focus_ring_stl()``` | Focus ring the glue onto RPI lens | +| `camera_assembly(cam, angle = 0)` | Camera case assembly | +| `camera_back(cam)` | Make the STL for a camera case back | +| `camera_bracket(cam)` | Make the STL for the camera bracket | +| `camera_bracket_position(cam)` | Position children at the bracket position | +| `camera_bracket_screw_positions(cam)` | Position children at the bracket screw positions | +| `camera_front(cam, hinge = 0)` | Make the STL for a camera case front | +| `rpi_camera_focus_ring_stl()` | Focus ring the glue onto RPI lens | ![camera_housing](tests/png/camera_housing.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 7 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | -| 10 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 1 | ```camera(rpi_camera_v1)``` | Raspberry Pi camera V1 | -| 1 | ```camera(rpi_camera_v2)``` | Raspberry Pi camera V2 | -| 1 | ```camera(rpi_camera)``` | Raspberry Pi focusable camera | -| 7 | ```screw(M2_cap_screw, 10)``` | Screw M2 cap x 10mm | -| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm | -| 4 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 2 | ```screw(M3_dome_screw, 12)``` | Screw M3 dome x 12mm | -| 7 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 16 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 7 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | +| 10 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 1 | `camera(rpi_camera_v1)` | Raspberry Pi camera V1 | +| 1 | `camera(rpi_camera_v2)` | Raspberry Pi camera V2 | +| 1 | `camera(rpi_camera)` | Raspberry Pi focusable camera | +| 7 | `screw(M2_cap_screw, 10)` | Screw M2 cap x 10mm | +| 4 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | +| 4 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 2 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm | +| 7 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 16 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | ### Printed | Qty | Filename | @@ -4380,14 +4380,14 @@ Adapts ESP12 modules and various small PCBs to 0.1" grid. See ## Fan_guard -Pintable fan finger guard to match the specified fan. To be ```include```d, not ```use```d. +Pintable fan finger guard to match the specified fan. To be `include`d, not `use`d. The ring spacing as well as the number of spokes can be specified, if zero a gasket is generated instead of a guard. @@ -4659,14 +4659,14 @@ The ring spacing as well as the number of spokes can be specified, if zero a gas ### Functions | Function | Description | |:--- |:--- | -| ```fan_guard_corner_r(type)``` | Corner radius of the guard | -| ```fan_guard_thickness()``` | Default thickness | -| ```fan_guard_width(type)``` | Width of the guard | +| `fan_guard_corner_r(type)` | Corner radius of the guard | +| `fan_guard_thickness()` | Default thickness | +| `fan_guard_width(type)` | Width of the guard | ### Modules | Module | Description | |:--- |:--- | -| ```fan_guard(type, name = false, thickness = fan_guard_thickness()``` | Generate the STL | +| `fan_guard(type, name = false, thickness = fan_guard_thickness()` | Generate the STL | ![fan_guard](tests/png/fan_guard.png) @@ -4696,10 +4696,10 @@ See [butt_box](#Butt_box) for an example of usage. Note that the block with its inserts is defined as a sub assembly, but its fasteners get added to the parent assembly. -Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting ```show_block``` to false. +Specific fasteners can be omitted by setting a side's thickness to 0 and the block omitted by setting `show_block` to false. This allows the block and one set of fasteners to be on one assembly and the other fasteners on the mating assemblies. -Star washers can be omitted by setting ```star_washers``` to false. +Star washers can be omitted by setting `star_washers` to false. [printed/fixing_block.scad](printed/fixing_block.scad) Implementation. @@ -4709,46 +4709,46 @@ Star washers can be omitted by setting ```star_washers``` to false. ### Functions | Function | Description | |:--- |:--- | -| ```fixing_block_depth(screw = def_screw)``` | Depth given screw size | -| ```fixing_block_h_hole(screw = def_screw)``` | Returns transform to position the horizontal screw | -| ```fixing_block_height(screw = def_screw)``` | Height given screw size, same as depth | -| ```fixing_block_holes(screw)``` | Returns a list of transforms to position all the screws | -| ```fixing_block_screw()``` | Default screw type | -| ```fixing_block_v_holes(screw = def_screw)``` | Returns a list of transforms to position the vertical screws | -| ```fixing_block_width(screw = def_screw)``` | Width given screw size | +| `fixing_block_depth(screw = def_screw)` | Depth given screw size | +| `fixing_block_h_hole(screw = def_screw)` | Returns transform to position the horizontal screw | +| `fixing_block_height(screw = def_screw)` | Height given screw size, same as depth | +| `fixing_block_holes(screw)` | Returns a list of transforms to position all the screws | +| `fixing_block_screw()` | Default screw type | +| `fixing_block_v_holes(screw = def_screw)` | Returns a list of transforms to position the vertical screws | +| `fixing_block_width(screw = def_screw)` | Width given screw size | ### Modules | Module | Description | |:--- |:--- | -| ```fastened_fixing_block_assembly(thickness, screw = def_screw, screw2 = undef, thickness2 = undef, show_block = true, star_washers = true)``` | Assembly with fasteners in place | -| ```fixing_block(screw = def_screw)``` | Generate the STL | -| ```fixing_block_assembly(screw = def_screw)``` | Printed part with the inserts inserted | -| ```fixing_block_h_hole(screw = def_screw)``` | Position children on the horizontal hole | -| ```fixing_block_h_hole_2D(screw = def_screw)``` | Position 2D child on the horizontal hole | -| ```fixing_block_holes(screw = def_screw)``` | Position children on all the holes | -| ```fixing_block_v_holes(screw = def_screw)``` | Position children on the vertical holes | +| `fastened_fixing_block_assembly(thickness, screw = def_screw, screw2 = undef, thickness2 = undef, show_block = true, star_washers = true)` | Assembly with fasteners in place | +| `fixing_block(screw = def_screw)` | Generate the STL | +| `fixing_block_assembly(screw = def_screw)` | Printed part with the inserts inserted | +| `fixing_block_h_hole(screw = def_screw)` | Position children on the horizontal hole | +| `fixing_block_h_hole_2D(screw = def_screw)` | Position 2D child on the horizontal hole | +| `fixing_block_holes(screw = def_screw)` | Position children on all the holes | +| `fixing_block_v_holes(screw = def_screw)` | Position children on the vertical holes | ![fixing_block](tests/png/fixing_block.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 3 | ```insert(F1BM2)``` | Heatfit insert M2 | -| 3 | ```insert(F1BM2p5)``` | Heatfit insert M2.5 | -| 3 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 3 | ```insert(F1BM4)``` | Heatfit insert M4 | -| 3 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm | -| 3 | ```screw(M2p5_pan_screw, 10)``` | Screw M2.5 pan x 10mm | -| 3 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 3 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm | -| 3 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 3 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm | -| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 3 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 3 | ```star_washer(M2_washer)``` | Washer star M2 x 0.3mm | -| 3 | ```star_washer(M2p5_washer)``` | Washer star M2.5 x 0.5mm | -| 3 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | -| 3 | ```star_washer(M4_washer)``` | Washer star M4 x 0.8mm | +| 3 | `insert(F1BM2)` | Heatfit insert M2 | +| 3 | `insert(F1BM2p5)` | Heatfit insert M2.5 | +| 3 | `insert(F1BM3)` | Heatfit insert M3 | +| 3 | `insert(F1BM4)` | Heatfit insert M4 | +| 3 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm | +| 3 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm | +| 3 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 3 | `screw(M4_dome_screw, 16)` | Screw M4 dome x 16mm | +| 3 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 3 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | +| 3 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 3 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 3 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm | +| 3 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm | +| 3 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | +| 3 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm | ### Printed | Qty | Filename | @@ -4779,8 +4779,8 @@ A margin between the screws and the knuckle edge can be enforced to allow the hi Opening the test in OpenSCAD with its customiser enabled allows these parameters to be played with. -Note setting ```thickness1``` or ```thickness2``` to zero in the ```hinge_fastened_assembly()``` removes the screws from one side or the other and -setting ```show_hinge``` to false removes the hinge. +Note setting `thickness1` or `thickness2` to zero in the `hinge_fastened_assembly()` removes the screws from one side or the other and +setting `show_hinge` to false removes the hinge. This allows the hinges and one set of screws to belong to one assembly and the other set of screws to another assembly. @@ -4791,29 +4791,29 @@ This allows the hinges and one set of screws to belong to one assembly and the o ### Properties | Function | Description | |:--- |:--- | -| ```hinge_clearance(type)``` | Clearance between knuckles | -| ```hinge_depth(type)``` | Depth of each leaf | -| ```hinge_knuckle_dia(type)``` | The knuckle diameter | -| ```hinge_knuckles(type)``` | How many knuckles | -| ```hinge_margin(type)``` | How far to keep the screws from the knuckes | -| ```hinge_pin_dia(type)``` | The pin diameter | -| ```hinge_screw(type)``` | Screw type to mount it | -| ```hinge_screws(type)``` | How many screws | -| ```hinge_thickness(type)``` | Thickness of the leaves | -| ```hinge_width(type)``` | Width | +| `hinge_clearance(type)` | Clearance between knuckles | +| `hinge_depth(type)` | Depth of each leaf | +| `hinge_knuckle_dia(type)` | The knuckle diameter | +| `hinge_knuckles(type)` | How many knuckles | +| `hinge_margin(type)` | How far to keep the screws from the knuckes | +| `hinge_pin_dia(type)` | The pin diameter | +| `hinge_screw(type)` | Screw type to mount it | +| `hinge_screws(type)` | How many screws | +| `hinge_thickness(type)` | Thickness of the leaves | +| `hinge_width(type)` | Width | ### Functions | Function | Description | |:--- |:--- | -| ```flat_hinge(name, size, pin_d, knuckle_d, knuckles, screw, screws, clearance, margin)``` | Construct the property list for a flat hinge. | +| `flat_hinge(name, size, pin_d, knuckle_d, knuckles, screw, screws, clearance, margin)` | Construct the property list for a flat hinge. | ### Modules | Module | Description | |:--- |:--- | -| ```hinge_both(type)``` | Both parts together for printing | -| ```hinge_fastened_assembly(type, thickness1, thickness2, angle, show_hinge = true)``` | Assembled hinge with its fasteners | -| ```hinge_male(type, female = false)``` | The half with the stationary pin | -| ```hinge_screw_positions(type)``` | Place children at the screw positions | +| `hinge_both(type)` | Both parts together for printing | +| `hinge_fastened_assembly(type, thickness1, thickness2, angle, show_hinge = true)` | Assembled hinge with its fasteners | +| `hinge_male(type, female = false)` | The half with the stationary pin | +| `hinge_screw_positions(type)` | Place children at the screw positions | ![flat_hinge](tests/png/flat_hinge.png) @@ -4822,10 +4822,10 @@ This allows the hinges and one set of screws to belong to one assembly and the o | ---:|:--- |:---| | 1 | | Hinge pin 20 x 2.85mm | | 1 | | Hinge pin 50 x 4mm | -| 14 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 4 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 10 | ```screw(M3_dome_screw, 12)``` | Screw M3 dome x 12mm | -| 28 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 14 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 4 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 10 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm | +| 28 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | ### Printed | Qty | Filename | @@ -4858,40 +4858,40 @@ inserts don't grip well in rubber. ### Properties | Function | Description | |:--- |:--- | -| ```foot_diameter(type = foot)``` | Outside maximum diameter | -| ```foot_height(type = foot)``` | Total height | -| ```foot_rad(type = foot)``` | Rounded corner radius | -| ```foot_screw(type = foot)``` | Screw type | -| ```foot_slant(type = foot)``` | Taper angle | -| ```foot_thickness(type = foot)``` | Thickness under the screw | +| `foot_diameter(type = foot)` | Outside maximum diameter | +| `foot_height(type = foot)` | Total height | +| `foot_rad(type = foot)` | Rounded corner radius | +| `foot_screw(type = foot)` | Screw type | +| `foot_slant(type = foot)` | Taper angle | +| `foot_thickness(type = foot)` | Thickness under the screw | ### Functions | Function | Description | |:--- |:--- | -| ```Foot(d, h, t, r, screw, slant = 10)``` | Construct a foot property list | -| ```insert_foot()``` | Default foot with insert | +| `Foot(d, h, t, r, screw, slant = 10)` | Construct a foot property list | +| `insert_foot()` | Default foot with insert | ### Modules | Module | Description | |:--- |:--- | -| ```fastened_insert_foot_assembly(t = 3, type = insert_foot)``` | Assembly with fasteners in place for specified sheet thickness | -| ```foot(type = foot)``` | Generate STL | -| ```foot_assembly(t = 0, type = foot, flip = false)``` | Assembly with fasteners in place for specified sheet thickness | -| ```insert_foot(type = insert_foot)``` | Generate STL for foot with insert | -| ```insert_foot_assembly(type = insert_foot)``` | Printed part with insert in place | +| `fastened_insert_foot_assembly(t = 3, type = insert_foot)` | Assembly with fasteners in place for specified sheet thickness | +| `foot(type = foot)` | Generate STL | +| `foot_assembly(t = 0, type = foot, flip = false)` | Assembly with fasteners in place for specified sheet thickness | +| `insert_foot(type = insert_foot)` | Generate STL for foot with insert | +| `insert_foot_assembly(type = insert_foot)` | Printed part with insert in place | ![foot](tests/png/foot.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 1 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | -| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm | -| 1 | ```screw(M4_cap_screw, 16)``` | Screw M4 cap x 16mm | -| 1 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 1 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 1 | `insert(F1BM3)` | Heatfit insert M3 | +| 1 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm | +| 1 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | +| 1 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 2 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 1 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -4920,29 +4920,29 @@ Printed handle that can be printed without needing support material due to its t ### Functions | Function | Description | |:--- |:--- | -| ```handle_height()``` | Total height | -| ```handle_length()``` | Outside length | -| ```handle_screw()``` | The screw type | -| ```handle_width()``` | The width, i.e. diameter | +| `handle_height()` | Total height | +| `handle_length()` | Outside length | +| `handle_screw()` | The screw type | +| `handle_width()` | The width, i.e. diameter | ### Modules | Module | Description | |:--- |:--- | -| ```handle_assembly()``` | Printed part with inserts in place | -| ```handle_fastened_assembly(thickness)``` | Assembly with fasteners in place | -| ```handle_holes(h = 100)``` | Drills holes for the screws | -| ```handle_screw_positions()``` | Position children at the screw positions | -| ```handle_stl()``` | generate the STL | +| `handle_assembly()` | Printed part with inserts in place | +| `handle_fastened_assembly(thickness)` | Assembly with fasteners in place | +| `handle_holes(h = 100)` | Drills holes for the screws | +| `handle_screw_positions()` | Position children at the screw positions | +| `handle_stl()` | generate the STL | ![handle](tests/png/handle.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```insert(F1BM4)``` | Heatfit insert M4 | -| 2 | ```screw(M4_cap_screw, 16)``` | Screw M4 cap x 16mm | -| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | -| 2 | ```star_washer(M4_washer)``` | Washer star M4 x 0.8mm | +| 2 | `insert(F1BM4)` | Heatfit insert M4 | +| 2 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | +| 2 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 2 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm | ### Printed | Qty | Filename | @@ -4971,31 +4971,31 @@ The stl must be given a parameterless wrapper in the project that uses it. ### Functions | Function | Description | |:--- |:--- | -| ```pcb_mount_length(pcb)``` | Outside length of the mount | -| ```pcb_mount_width(pcb)``` | Outside width of the mount | -| ```pillar_x_pitch(pcb)``` | x pitch of screw pillars | -| ```pillar_y_pitch(pcb)``` | y pitch of screw pillars | +| `pcb_mount_length(pcb)` | Outside length of the mount | +| `pcb_mount_width(pcb)` | Outside width of the mount | +| `pillar_x_pitch(pcb)` | x pitch of screw pillars | +| `pillar_y_pitch(pcb)` | y pitch of screw pillars | ### Modules | Module | Description | |:--- |:--- | -| ```pcb_mount(pcb, height = 5, washers = true)``` | Make the STL of a pcb mount for the specified PCB. | -| ```pcb_mount_assembly(pcb, thickness, height = 5)``` | A PCB mount assembly with fasteners | -| ```pcb_mount_holes(pcb, h = 0)``` | Drill holes for PCB mount | -| ```pcb_mount_screw_positions(pcb)``` | Positions of the screws and pillars | -| ```pcb_mount_washer_stl()``` | A plastic washer to clamp a PCB | +| `pcb_mount(pcb, height = 5, washers = true)` | Make the STL of a pcb mount for the specified PCB. | +| `pcb_mount_assembly(pcb, thickness, height = 5)` | A PCB mount assembly with fasteners | +| `pcb_mount_holes(pcb, h = 0)` | Drill holes for PCB mount | +| `pcb_mount_screw_positions(pcb)` | Positions of the screws and pillars | +| `pcb_mount_washer_stl()` | A plastic washer to clamp a PCB | ![pcb_mount](tests/png/pcb_mount.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 1 | ```pcb(PI_IO)``` | PI_IO V2 | -| 1 | ```pin_socket(2p54header, 13, 2)``` | Pin socket 13 x 2 | -| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm | -| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm | -| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 4 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 1 | `pcb(PI_IO)` | PI_IO V2 | +| 1 | `pin_socket(2p54header, 13, 2)` | Pin socket 13 x 2 | +| 4 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | +| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm | +| 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | ### Printed | Qty | Filename | @@ -5020,8 +5020,8 @@ Add solvent or glue to make a permanent fixture. ### Modules | Module | Description | |:--- |:--- | -| ```press_fit_peg(h, w = 5, horizontal = false)``` | Make a rounded chamfered peg for easy insertion | -| ```press_fit_socket(w = 5, h = 50, horizontal = false)``` | Make a square hole to accept a peg | +| `press_fit_peg(h, w = 5, horizontal = false)` | Make a rounded chamfered peg for easy insertion | +| `press_fit_socket(w = 5, h = 50, horizontal = false)` | Make a square hole to accept a peg | ![press_fit](tests/png/press_fit.png) @@ -5047,52 +5047,52 @@ It can also have printed feet on the base with the screws doubling up to hold th ### Properties | Function | Description | |:--- |:--- | -| ```pbox_base(type)``` | Base thickness, can be zero for no base | -| ```pbox_base_screw(type)``` | Screw type if no feet | -| ```pbox_depth(type)``` | Internal depth | -| ```pbox_foot(type)``` | Printed foot, can be false to suppress feet | -| ```pbox_height(type)``` | Internal height | -| ```pbox_name(type)``` | Name to allow more than one box in a project | -| ```pbox_radius(type)``` | Internal corner radius | -| ```pbox_ridges(type)``` | Ridge wavelength and amplitude | -| ```pbox_top(type)``` | Top thickness | -| ```pbox_wall(type)``` | Wall thickness | -| ```pbox_width(type)``` | Internal width | +| `pbox_base(type)` | Base thickness, can be zero for no base | +| `pbox_base_screw(type)` | Screw type if no feet | +| `pbox_depth(type)` | Internal depth | +| `pbox_foot(type)` | Printed foot, can be false to suppress feet | +| `pbox_height(type)` | Internal height | +| `pbox_name(type)` | Name to allow more than one box in a project | +| `pbox_radius(type)` | Internal corner radius | +| `pbox_ridges(type)` | Ridge wavelength and amplitude | +| `pbox_top(type)` | Top thickness | +| `pbox_wall(type)` | Wall thickness | +| `pbox_width(type)` | Internal width | ### Functions | Function | Description | |:--- |:--- | -| ```pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, ridges = [0, 0])``` | Construct a printed box property list | -| ```pbox_inclusion(type)``` | How far the ledge for the base extends inwards | -| ```pbox_insert(type)``` | The insert for the base screws | -| ```pbox_screw(type)``` | Foot screw if got feet else base_screw | -| ```pbox_screw_inset(type)``` | How far the base screws are inset | -| ```pbox_screw_length(type, panel_thickness = 0)``` | Length of the base screw | -| ```pbox_total_height(type)``` | Total height including base overlap | -| ```pbox_washer(type)``` | The washer for the base screws | +| `pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, ridges = [0, 0])` | Construct a printed box property list | +| `pbox_inclusion(type)` | How far the ledge for the base extends inwards | +| `pbox_insert(type)` | The insert for the base screws | +| `pbox_screw(type)` | Foot screw if got feet else base_screw | +| `pbox_screw_inset(type)` | How far the base screws are inset | +| `pbox_screw_length(type, panel_thickness = 0)` | Length of the base screw | +| `pbox_total_height(type)` | Total height including base overlap | +| `pbox_washer(type)` | The washer for the base screws | ### Modules | Module | Description | |:--- |:--- | -| ```pbox(type)``` | Generate the STL for the main case | -| ```pbox_base(type)``` | Generate the STL for the base | -| ```pbox_base_screws(type, thickness = 0)``` | Place the screws and feet | -| ```pbox_inserts(type)``` | Place the inserts for the base screws | -| ```pbox_outer_shape(type)``` | 2D outer shape of the box | -| ```pbox_screw_positions(type)``` | Place children at base screw positions | +| `pbox(type)` | Generate the STL for the main case | +| `pbox_base(type)` | Generate the STL for the base | +| `pbox_base_screws(type, thickness = 0)` | Place the screws and feet | +| `pbox_inserts(type)` | Place the inserts for the base screws | +| `pbox_outer_shape(type)` | 2D outer shape of the box | +| `pbox_screw_positions(type)` | Place children at base screw positions | ![printed_box](tests/png/printed_box.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```insert(F1BM2)``` | Heatfit insert M2 | -| 4 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 4 | ```screw(M2_cap_screw, 6)``` | Screw M2 cap x 6mm | -| 3 | ```screw(M3_pan_screw, 6)``` | Screw M3 pan x 6mm | -| 4 | ```screw(M3_pan_screw, 10)``` | Screw M3 pan x 10mm | -| 4 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 7 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | +| 4 | `insert(F1BM2)` | Heatfit insert M2 | +| 4 | `insert(F1BM3)` | Heatfit insert M3 | +| 4 | `screw(M2_cap_screw, 6)` | Screw M2 cap x 6mm | +| 3 | `screw(M3_pan_screw, 6)` | Screw M3 pan x 6mm | +| 4 | `screw(M3_pan_screw, 10)` | Screw M3 pan x 10mm | +| 4 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 7 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | ### Printed | Qty | Filename | @@ -5126,34 +5126,34 @@ The stl and assembly must be given a name and parameterless wrappers for the stl ### Functions | Function | Description | |:--- |:--- | -| ```psu_shroud_cable_pitch(cable_d)``` | Pitch between cable entries | -| ```psu_shroud_centre_y(type)``` | Shroud centre relative to PSU centre | -| ```psu_shroud_depth(type)``` | Outside depth of the shroud | -| ```psu_shroud_extent(type)``` | How far it extends beyond the PSU to clear the connections | -| ```psu_shroud_height(type)``` | Outside height | -| ```psu_shroud_screw(type)``` | Screw used to fasten | -| ```psu_shroud_width(type)``` | Outside width of the shroud | +| `psu_shroud_cable_pitch(cable_d)` | Pitch between cable entries | +| `psu_shroud_centre_y(type)` | Shroud centre relative to PSU centre | +| `psu_shroud_depth(type)` | Outside depth of the shroud | +| `psu_shroud_extent(type)` | How far it extends beyond the PSU to clear the connections | +| `psu_shroud_height(type)` | Outside height | +| `psu_shroud_screw(type)` | Screw used to fasten | +| `psu_shroud_width(type)` | Outside width of the shroud | ### Modules | Module | Description | |:--- |:--- | -| ```psu_shroud(type, cable_d, name, cables = 1)``` | Generate the STL file for a specified ssr and cable | -| ```psu_shroud_assembly(type, cable_d, name, cables = 1)``` | The printed parts with inserts fitted | -| ```psu_shroud_cable_positions(type, cable_d, cables = 1)``` | Place children at the cable tie positions | -| ```psu_shroud_fastened_assembly(type, cable_d, thickness, name, cables = 1)``` | Assembly with screws in place | -| ```psu_shroud_hole_positions(type)``` | Place children at the screw hole positions | -| ```psu_shroud_holes(type, cable_d, cables = 1)``` | Drill the screw and ziptie holes | +| `psu_shroud(type, cable_d, name, cables = 1)` | Generate the STL file for a specified ssr and cable | +| `psu_shroud_assembly(type, cable_d, name, cables = 1)` | The printed parts with inserts fitted | +| `psu_shroud_cable_positions(type, cable_d, cables = 1)` | Place children at the cable tie positions | +| `psu_shroud_fastened_assembly(type, cable_d, thickness, name, cables = 1)` | Assembly with screws in place | +| `psu_shroud_hole_positions(type)` | Place children at the screw hole positions | +| `psu_shroud_holes(type, cable_d, cables = 1)` | Drill the screw and ziptie holes | ![psu_shroud](tests/png/psu_shroud.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 6 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 6 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm | -| 6 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 6 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | -| 3 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length | +| 6 | `insert(F1BM3)` | Heatfit insert M3 | +| 6 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | +| 6 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 6 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | +| 3 | `ziptie(small_ziptie, 3)` | Ziptie 2.5mm x 100mm min length | ### Printed | Qty | Filename | @@ -5185,36 +5185,36 @@ Clamp for ribbon cable and polypropylene strip. ### Functions | Function | Description | |:--- |:--- | -| ```ribbon_clamp_height(screw = screw)``` | Height | -| ```ribbon_clamp_length(ways, screw = screw)``` | Length given ways | -| ```ribbon_clamp_width(screw = screw)``` | Width | +| `ribbon_clamp_height(screw = screw)` | Height | +| `ribbon_clamp_length(ways, screw = screw)` | Length given ways | +| `ribbon_clamp_width(screw = screw)` | Width | ### Modules | Module | Description | |:--- |:--- | -| ```ribbon_clamp(ways, screw = screw)``` | Generate STL for given number of ways | -| ```ribbon_clamp_assembly(ways, screw = screw)``` | Printed part with inserts in place | -| ```ribbon_clamp_fastened_assembly(ways, thickness, screw = screw)``` | Clamp with fasteners in place | -| ```ribbon_clamp_hole_positions(ways, screw = screw, side = undef)``` | Place children at hole positions | -| ```ribbon_clamp_holes(ways, h = 20, screw = screw)``` | Drill screw holes | +| `ribbon_clamp(ways, screw = screw)` | Generate STL for given number of ways | +| `ribbon_clamp_assembly(ways, screw = screw)` | Printed part with inserts in place | +| `ribbon_clamp_fastened_assembly(ways, thickness, screw = screw)` | Clamp with fasteners in place | +| `ribbon_clamp_hole_positions(ways, screw = screw, side = undef)` | Place children at hole positions | +| `ribbon_clamp_holes(ways, h = 20, screw = screw)` | Drill screw holes | ![ribbon_clamp](tests/png/ribbon_clamp.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```insert(F1BM2)``` | Heatfit insert M2 | -| 2 | ```insert(F1BM3)``` | Heatfit insert M3 | +| 2 | `insert(F1BM2)` | Heatfit insert M2 | +| 2 | `insert(F1BM3)` | Heatfit insert M3 | | 1 | | Ribbon cable 20 way 100mm | | 1 | | Ribbon cable 8 way 100mm | -| 2 | ```screw(M2_dome_screw, 8)``` | Screw M2 dome x 8mm | -| 2 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm | +| 2 | `screw(M2_dome_screw, 8)` | Screw M2 dome x 8mm | +| 2 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | | 1 | | Tape self amalgamating silicone 11 x 25mm | | 1 | | Tape self amalgamating silicone 26 x 25mm | -| 2 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | -| 2 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 2 | ```star_washer(M2_washer)``` | Washer star M2 x 0.3mm | -| 2 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 2 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | +| 2 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 2 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm | +| 2 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -5244,16 +5244,16 @@ Knob with embedded hex head screw. ### Modules | Module | Description | |:--- |:--- | -| ```screw_knob(screw)``` | Generate the STL for a knob to fit the specified hex screw | -| ```screw_knob_assembly(screw, length)``` | Assembly with the screw in place | +| `screw_knob(screw)` | Generate the STL for a knob to fit the specified hex screw | +| `screw_knob_assembly(screw, length)` | Assembly with the screw in place | ![screw_knob](tests/png/screw_knob.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```screw(M3_hex_screw, 16)``` | Screw M3 hex x 16mm | -| 1 | ```screw(M4_hex_screw, 16)``` | Screw M4 hex x 16mm | +| 1 | `screw(M3_hex_screw, 16)` | Screw M3 hex x 16mm | +| 1 | `screw(M4_hex_screw, 16)` | Screw M4 hex x 16mm | ### Printed | Qty | Filename | @@ -5283,28 +5283,28 @@ UK 13A socket and printed backbox with earth terminal for the panel it is mounte ### Functions | Function | Description | |:--- |:--- | -| ```socket_box_depth()``` | Outside depth of the backbox | +| `socket_box_depth()` | Outside depth of the backbox | ### Modules | Module | Description | |:--- |:--- | -| ```socket_box(type)``` | Generate STL of the backbox for the specified socket | -| ```socket_box_assembly(type)``` | The box with inserts fitted | -| ```socket_box_fastened_assembly(type, thickness)``` | The socket and backbox on each side of the specified panel thickness | +| `socket_box(type)` | Generate STL of the backbox for the specified socket | +| `socket_box_assembly(type)` | The box with inserts fitted | +| `socket_box_fastened_assembly(type, thickness)` | The socket and backbox on each side of the specified panel thickness | ![socket_box](tests/png/socket_box.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 1 | ```mains_socket(Contactum)``` | Mains socket 13A | -| 1 | ```mains_socket(MKLOGIC)``` | Mains socket 13A, switched | -| 2 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | -| 2 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm | -| 4 | ```screw(M3_cs_cap_screw, 20)``` | Screw M3 cs cap x 20mm | -| 2 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm | -| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 4 | `insert(F1BM3)` | Heatfit insert M3 | +| 1 | `mains_socket(Contactum)` | Mains socket 13A | +| 1 | `mains_socket(MKLOGIC)` | Mains socket 13A, switched | +| 2 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | +| 2 | `ring_terminal(M3_ringterm)` | Ring terminal 3mm | +| 4 | `screw(M3_cs_cap_screw, 20)` | Screw M3 cs cap x 20mm | +| 2 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | +| 4 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -5335,31 +5335,31 @@ The STL and assembly must be given a name and parameterless wrappers for the stl ### Functions | Function | Description | |:--- |:--- | -| ```ssr_shroud_cable_x(type, cable_d)``` | Position of cable entry holes | -| ```ssr_shroud_extent(type, cable_d)``` | How far it extends beyond the SSR | -| ```ssr_shroud_height(type)``` | Outside height | -| ```ssr_shroud_screw(type)``` | Screw used to fasten | -| ```ssr_shroud_width(type)``` | Outside width of shroud | +| `ssr_shroud_cable_x(type, cable_d)` | Position of cable entry holes | +| `ssr_shroud_extent(type, cable_d)` | How far it extends beyond the SSR | +| `ssr_shroud_height(type)` | Outside height | +| `ssr_shroud_screw(type)` | Screw used to fasten | +| `ssr_shroud_width(type)` | Outside width of shroud | ### Modules | Module | Description | |:--- |:--- | -| ```ssr_shroud(type, cable_d, name)``` | Generate the STL file for a specified ssr and cable | -| ```ssr_shroud_assembly(type, cable_d, name)``` | The printed parts with inserts fitted | -| ```ssr_shroud_fastened_assembly(type, cable_d, thickness, name)``` | Assembly with screws in place | -| ```ssr_shroud_hole_positions(type)``` | Place children at the screw hole positions | -| ```ssr_shroud_holes(type, cable_d)``` | Drill the screw and ziptie holes | +| `ssr_shroud(type, cable_d, name)` | Generate the STL file for a specified ssr and cable | +| `ssr_shroud_assembly(type, cable_d, name)` | The printed parts with inserts fitted | +| `ssr_shroud_fastened_assembly(type, cable_d, thickness, name)` | Assembly with screws in place | +| `ssr_shroud_hole_positions(type)` | Place children at the screw hole positions | +| `ssr_shroud_holes(type, cable_d)` | Drill the screw and ziptie holes | ![ssr_shroud](tests/png/ssr_shroud.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 4 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 4 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm | -| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | -| 4 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length | +| 4 | `insert(F1BM3)` | Heatfit insert M3 | +| 4 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | +| 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 4 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | +| 4 | `ziptie(small_ziptie, 3)` | Ziptie 2.5mm x 100mm min length | ### Printed | Qty | Filename | @@ -5390,38 +5390,38 @@ be fully customised by passing a list of properties. ### Properties | Function | Description | |:--- |:--- | -| ```strap_extension(type = strap)``` | How much length of the strap that can pull out | -| ```strap_panel(type = strap)``` | Panel thickness | -| ```strap_screw(type = strap)``` | Screw type | -| ```strap_thickness(type = strap)``` | Thickness of strap | -| ```strap_width(type = strap)``` | Width of strap | +| `strap_extension(type = strap)` | How much length of the strap that can pull out | +| `strap_panel(type = strap)` | Panel thickness | +| `strap_screw(type = strap)` | Screw type | +| `strap_thickness(type = strap)` | Thickness of strap | +| `strap_width(type = strap)` | Width of strap | ### Functions | Function | Description | |:--- |:--- | -| ```strap(width = 18, thickness = 2, screw = M3_pan_screw, panel_thickness = 3, extension = 25)``` | Construct a property list for a strap | -| ```strap_end_width(type = strap)``` | Width of the ends | -| ```strap_height(type)``` | Height of the ends | -| ```strap_insert(type)``` | The insert type | +| `strap(width = 18, thickness = 2, screw = M3_pan_screw, panel_thickness = 3, extension = 25)` | Construct a property list for a strap | +| `strap_end_width(type = strap)` | Width of the ends | +| `strap_height(type)` | Height of the ends | +| `strap_insert(type)` | The insert type | ### Modules | Module | Description | |:--- |:--- | -| ```strap(length, type = strap)``` | Generate the STL for the rubber strap | -| ```strap_assembly(length, type = strap)``` | Assembly with screws in place | -| ```strap_end(type = strap)``` | Generate the STL for end piece | -| ```strap_holes(length, type = strap, h = 100)``` | The panel cut outs | -| ```strap_screw_positions(length, type = strap)``` | Place children at the screw positions | +| `strap(length, type = strap)` | Generate the STL for the rubber strap | +| `strap_assembly(length, type = strap)` | Assembly with screws in place | +| `strap_end(type = strap)` | Generate the STL for end piece | +| `strap_holes(length, type = strap, h = 100)` | The panel cut outs | +| `strap_screw_positions(length, type = strap)` | Place children at the screw positions | ![strap_handle](tests/png/strap_handle.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 2 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 2 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm | -| 2 | ```washer(M3_penny_washer)``` | Washer penny M3 x 12mm x 0.8mm | -| 2 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 2 | `insert(F1BM3)` | Heatfit insert M3 | +| 2 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | +| 2 | `washer(M3_penny_washer)` | Washer penny M3 x 12mm x 0.8mm | +| 2 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -5450,8 +5450,8 @@ Annotation used in this documentation ### Modules | Module | Description | |:--- |:--- | -| ```arrow(length = 20)``` | Draw an arrow that faces downwards | -| ```label(str, scale = 0.25, valign = "baseline", halign = "left")``` | Draw text that always faces the camera | +| `arrow(length = 20)` | Draw an arrow that faces downwards | +| `label(str, scale = 0.25, valign = "baseline", halign = "left")` | Draw text that always faces the camera | ![annotation](tests/png/annotation.png) @@ -5471,12 +5471,12 @@ Bezier curves and function to get and adjust the length or minimum z point. ### Functions | Function | Description | |:--- |:--- | -| ```adjust_bezier_length(v, l, eps = 0.001, r1 = 1.0, r2 = 1.5, l1, l2)``` | Adjust Bezier control points ```v``` to get the required curve length ```l``` | -| ```adjust_bezier_z(v, z, eps = 0.001, r1 = 1, r2 = 1.5, z1, z2)``` | Adjust Bezier control points ```v``` to get the required minimum ```z``` | -| ```bezier(t, v)``` | Returns a point at distance ```t``` [0 - 1] along the curve with control points ```v``` | -| ```bezier_length(v, delta = 0.01, t = 0, length = 0)``` | Calculate the length of a Bezier curve from control points ```v``` | -| ```bezier_min_z(v, steps = 100, z = inf, i = 0)``` | Calculate the minimum z coordinate of a Bezier curve from control points ```v``` | -| ```bezier_path(v, steps = 100)``` | Returns a Bezier path from control points ```v``` with ```steps``` segments | +| `adjust_bezier_length(v, l, eps = 0.001, r1 = 1.0, r2 = 1.5, l1, l2)` | Adjust Bezier control points `v` to get the required curve length `l` | +| `adjust_bezier_z(v, z, eps = 0.001, r1 = 1, r2 = 1.5, z1, z2)` | Adjust Bezier control points `v` to get the required minimum `z` | +| `bezier(t, v)` | Returns a point at distance `t` [0 - 1] along the curve with control points `v` | +| `bezier_length(v, delta = 0.01, t = 0, length = 0)` | Calculate the length of a Bezier curve from control points `v` | +| `bezier_min_z(v, steps = 100, z = inf, i = 0)` | Calculate the minimum z coordinate of a Bezier curve from control points `v` | +| `bezier_path(v, steps = 100)` | Returns a Bezier path from control points `v` with `steps` segments | ![bezier](tests/png/bezier.png) @@ -5488,11 +5488,11 @@ Bezier curves and function to get and adjust the length or minimum z point. ## Catenary Catenary curve to model hanging wires, etc. -Although the equation of the curve is simply ```y = a cosh(x / a)``` there is no explicit formula to calculate the constant ```a``` or the range of ```x``` given the +Although the equation of the curve is simply `y = a cosh(x / a)` there is no explicit formula to calculate the constant `a` or the range of `x` given the length of the cable and the end point coordinates. See . The Newton-Raphson method is used to find -```a``` numerically, see . +`a` numerically, see . -The coordinates of the lowest point on the curve can be retrieved by calling ```catenary_points()``` with ```steps``` equal to zero. +The coordinates of the lowest point on the curve can be retrieved by calling `catenary_points()` with `steps` equal to zero. [utils/catenary.scad](utils/catenary.scad) Implementation. @@ -5502,11 +5502,11 @@ The coordinates of the lowest point on the curve can be retrieved by calling ``` ### Functions | Function | Description | |:--- |:--- | -| ```catenary(t, a)``` | Parametric catenary function linear along the length of the curve. | -| ```catenary_ds_by_da(d, a)``` | First derivative of the length with respect to ```a```. | -| ```catenary_find_a(d, l, a = 1, best_e = inf, best_a = 1)``` | Find the catenary constant ```a```, given half the horizontal span and the length. | -| ```catenary_points(l, x, y, steps = 100)``` | Returns a list of 2D points on the curve that goes from the origin to ```(x,y)``` and has length ```l```. | -| ```catenary_s(d, a)``` | Length of a symmetric catenary with width ```2d```. | +| `catenary(t, a)` | Parametric catenary function linear along the length of the curve. | +| `catenary_ds_by_da(d, a)` | First derivative of the length with respect to `a`. | +| `catenary_find_a(d, l, a = 1, best_e = inf, best_a = 1)` | Find the catenary constant `a`, given half the horizontal span and the length. | +| `catenary_points(l, x, y, steps = 100)` | Returns a list of 2D points on the curve that goes from the origin to `(x,y)` and has length `l`. | +| `catenary_s(d, a)` | Length of a symmetric catenary with width `2d`. | ![catenary](tests/png/catenary.png) @@ -5527,10 +5527,10 @@ a square cornered part fits in the hole then circles are placed in the corners m ### Modules | Module | Description | |:--- |:--- | -| ```dogbone_rectangle(size, r = cnc_bit_r, center = true, xy_center = true, x_offset, y_offset)``` | Rectangle with cylinders at the corners | -| ```dogbone_rectangle_x(size, r = cnc_bit_r, center = true, xy_center = true)``` | Rectangle with cylinders at the corners, offset in the x direction | -| ```dogbone_rectangle_y(size, r = cnc_bit_r, center = true, xy_center = true)``` | Rectangle with cylinders at the corners, offset in the y direction | -| ```dogbone_square(size, r = cnc_bit_r, center = true, x_offset, y_offset)``` | Square with circles at the corners, with optional offsets | +| `dogbone_rectangle(size, r = cnc_bit_r, center = true, xy_center = true, x_offset, y_offset)` | Rectangle with cylinders at the corners | +| `dogbone_rectangle_x(size, r = cnc_bit_r, center = true, xy_center = true)` | Rectangle with cylinders at the corners, offset in the x direction | +| `dogbone_rectangle_y(size, r = cnc_bit_r, center = true, xy_center = true)` | Rectangle with cylinders at the corners, offset in the y direction | +| `dogbone_square(size, r = cnc_bit_r, center = true, x_offset, y_offset)` | Square with circles at the corners, with optional offsets | ![dogbones](tests/png/dogbones.png) @@ -5550,7 +5550,7 @@ Rounded fillet for adding to corners. ### Modules | Module | Description | |:--- |:--- | -| ```fillet(r, h, center = false)``` | Fillet with specified radius and height | +| `fillet(r, h, center = false)` | Fillet with specified radius and height | ![fillet](tests/png/fillet.png) @@ -5566,17 +5566,17 @@ Formulas from and -```involute_gear_profile()``` returns a polygon that can have the bore and spokes, etc, subtracted from it before linear extruding it to 3D. -Helical gears can be made using ```twist``` and bevel gears using ```scale``` parameters of ```linear_extrude()```. +`involute_gear_profile()` returns a polygon that can have the bore and spokes, etc, subtracted from it before linear extruding it to 3D. +Helical gears can be made using `twist` and bevel gears using `scale` parameters of `linear_extrude()`. Gears with less than 19 teeth (when pressure angle is 20) are profile shifted to avoid undercutting the tooth root. 7 teeth is considered the practical minimum. -The clearance between tip and root defaults to module / 6, but can be overridden by setting the ```clearance``` parameter. +The clearance between tip and root defaults to module / 6, but can be overridden by setting the `clearance` parameter. The origin of the rack is the left end of the pitch line and its width is below the pitch line. I.e. it does not include the addendum. -```involute_worm_profile()``` returns a tooth profile that can be passed to ```thread()``` to make worms. +`involute_worm_profile()` returns a tooth profile that can be passed to `thread()` to make worms. [utils/gears.scad](utils/gears.scad) Implementation. @@ -5586,18 +5586,18 @@ The origin of the rack is the left end of the pitch line and its width is below ### Functions | Function | Description | |:--- |:--- | -| ```centre_distance(m, z1, z2, pa = 20)``` | Calculate distance between centres taking profile shift into account | -| ```involute(r, u)``` | Involute of circle radius r at angle u in radians | -| ```involute_gear_od(m, z, pa = 20)``` | involute gear outside diameter given modulus, tooth count and pressure angle | -| ```involute_rack_tooth_profile(m, pa = 20, clearance = undef)``` | Calculate rack tooth profile given module and pressure angle | -| ```involute_worm_profile(m, pa = 20, clearance = undef)``` | Calculate worm profile suitable for passing to thread() | -| ```profile_shift(z, pa)``` | Calculate profile shift for small gears | +| `centre_distance(m, z1, z2, pa = 20)` | Calculate distance between centres taking profile shift into account | +| `involute(r, u)` | Involute of circle radius r at angle u in radians | +| `involute_gear_od(m, z, pa = 20)` | involute gear outside diameter given modulus, tooth count and pressure angle | +| `involute_rack_tooth_profile(m, pa = 20, clearance = undef)` | Calculate rack tooth profile given module and pressure angle | +| `involute_worm_profile(m, pa = 20, clearance = undef)` | Calculate worm profile suitable for passing to thread() | +| `profile_shift(z, pa)` | Calculate profile shift for small gears | ### Modules | Module | Description | |:--- |:--- | -| ```involute_gear_profile(m, z, pa = 20, clearance = undef, steps = 20)``` | Calculate gear profile given module, number of teeth and pressure angle | -| ```involute_rack_profile(m, z, w, pa = 20, clearance = undef)``` | Calculate rack profile given module, number of teeth and pressure angle | +| `involute_gear_profile(m, z, pa = 20, clearance = undef, steps = 20)` | Calculate gear profile given module, number of teeth and pressure angle | +| `involute_rack_profile(m, z, w, pa = 20, clearance = undef)` | Calculate rack profile given module, number of teeth and pressure angle | ![gears](tests/png/gears.png) @@ -5617,7 +5617,7 @@ Method to print holes in mid air. See -```horicylinder()``` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted. +`horicylinder()` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted. [utils/horiholes.scad](utils/horiholes.scad) Implementation. @@ -5639,14 +5639,14 @@ Utilities for depicting the staircase slicing of horizontal holes made with [`te ### Functions | Function | Description | |:--- |:--- | -| ```teardrop_minus_x(r, y, h)``` | Calculate the ordinate of a compensated teardrop given y and layer height. | -| ```teardrop_plus_x(r, y, h)``` | Calculate the ordinate of a compensated teardrop given y and layer height. | +| `teardrop_minus_x(r, y, h)` | Calculate the ordinate of a compensated teardrop given y and layer height. | +| `teardrop_plus_x(r, y, h)` | Calculate the ordinate of a compensated teardrop given y and layer height. | ### Modules | Module | Description | |:--- |:--- | -| ```horicylinder(r, z, h = 0, center = true)``` | For making horizontal cylinders that don't need support material and are correct dimensions | -| ```horihole(r, z, h = 0, center = true)``` | For making horizontal holes that don't need support material and are correct dimensions | +| `horicylinder(r, z, h = 0, center = true)` | For making horizontal cylinders that don't need support material and are correct dimensions | +| `horihole(r, z, h = 0, center = true)` | For making horizontal holes that don't need support material and are correct dimensions | ![horiholes](tests/png/horiholes.png) @@ -5666,12 +5666,12 @@ Layout objects in a line with equal gaps given a vector of their widths. ### Functions | Function | Description | |:--- |:--- | -| ```layout_offset(widths, i, gap = 2)``` | Calculate the offset for the ```i```th item | +| `layout_offset(widths, i, gap = 2)` | Calculate the offset for the `i`th item | ### Modules | Module | Description | |:--- |:--- | -| ```layout(widths, gap = 2, no_offset = false)``` | Layout children passing ```$i``` | +| `layout(widths, gap = 2, no_offset = false)` | Layout children passing `$i` | ![layout](tests/png/layout.png) @@ -5691,44 +5691,44 @@ Maths utilities for manipulating vectors and matrices. ### Functions | Function | Description | |:--- |:--- | -| ```angle_between(v1, v2)``` | Return the angle between two vectors | -| ```argcosh(x)``` | inverse hyperbolic cosine | -| ```argcoth(x)``` | inverse hyperbolic cotangent | -| ```argsinh(x)``` | inverse hyperbolic sine | -| ```argtanh(x)``` | inverse hyperbolic tangent | -| ```augment(m)``` | Augment a matrix by adding an identity matrix to the right | -| ```circle_intersect(c1, r1, c2, r2)``` | Calculate one point where two circles in the X-Z plane intersect, clockwise around c1 | -| ```cosh(x)``` | hyperbolic cosine | -| ```coth(x)``` | hyperbolic cotangent | -| ```degrees(radians)``` | Convert degrees to radians | -| ```euler(R)``` | Convert a rotation matrix to a Euler rotation vector. | -| ```identity(n, x = 1)``` | Construct an arbitrary size identity matrix | -| ```invert(m)``` | Invert a matrix | -| ```nearly_zero(x)``` | True if x is close to zero | -| ```radians(degrees)``` | Convert radians to degrees | -| ```reverse(v)``` | Reverse a vector | -| ```rot2_z(a)``` | Generate a 2x2 matrix to rotate around z | -| ```rot3_z(a)``` | Generate a 3x3 matrix to rotate around z | -| ```rotate(a, v)``` | Generate a 4x4 rotation matrix, ```a``` can be a vector of three angles or a single angle around ```z```, or around axis ```v``` | -| ```rowswap(m, i, j)``` | Swap two rows of a matrix | -| ```scale(v)``` | Generate a 4x4 matrix that scales by ```v```, which can be a vector of xyz factors or a scalar to scale all axes equally | -| ```sinh(x)``` | hyperbolic sine | -| ```solve(m, i = 0, j = 0)``` | Solve each row ensuring diagonal is not zero | -| ```solve_row(m, i)``` | Make diagonal one by dividing the row by it and subtract from other rows to make column zero | -| ```sqr(x)``` | Square x | -| ```tanh(x)``` | hyperbolic tangent | -| ```transform(v, m)``` | Apply 4x4 transform to a 3 vector by extending it and cropping it again | -| ```transform_points(path, m)``` | Apply transform to a path | -| ```translate(v)``` | Generate a 4x4 translation matrix, ```v``` can be ```[x, y]```, ```[x, y, z]``` or ```z``` | -| ```transpose(m)``` | Transpose an arbitrary size matrix | -| ```unit(v)``` | Convert ```v``` to a unit vector | -| ```vec3(v)``` | Return a 3 vector with the first three elements of ```v``` | -| ```vec4(v)``` | Return a 4 vector with the first three elements of ```v``` | +| `angle_between(v1, v2)` | Return the angle between two vectors | +| `argcosh(x)` | inverse hyperbolic cosine | +| `argcoth(x)` | inverse hyperbolic cotangent | +| `argsinh(x)` | inverse hyperbolic sine | +| `argtanh(x)` | inverse hyperbolic tangent | +| `augment(m)` | Augment a matrix by adding an identity matrix to the right | +| `circle_intersect(c1, r1, c2, r2)` | Calculate one point where two circles in the X-Z plane intersect, clockwise around c1 | +| `cosh(x)` | hyperbolic cosine | +| `coth(x)` | hyperbolic cotangent | +| `degrees(radians)` | Convert degrees to radians | +| `euler(R)` | Convert a rotation matrix to a Euler rotation vector. | +| `identity(n, x = 1)` | Construct an arbitrary size identity matrix | +| `invert(m)` | Invert a matrix | +| `nearly_zero(x)` | True if x is close to zero | +| `radians(degrees)` | Convert radians to degrees | +| `reverse(v)` | Reverse a vector | +| `rot2_z(a)` | Generate a 2x2 matrix to rotate around z | +| `rot3_z(a)` | Generate a 3x3 matrix to rotate around z | +| `rotate(a, v)` | Generate a 4x4 rotation matrix, `a` can be a vector of three angles or a single angle around `z`, or around axis `v` | +| `rowswap(m, i, j)` | Swap two rows of a matrix | +| `scale(v)` | Generate a 4x4 matrix that scales by `v`, which can be a vector of xyz factors or a scalar to scale all axes equally | +| `sinh(x)` | hyperbolic sine | +| `solve(m, i = 0, j = 0)` | Solve each row ensuring diagonal is not zero | +| `solve_row(m, i)` | Make diagonal one by dividing the row by it and subtract from other rows to make column zero | +| `sqr(x)` | Square x | +| `tanh(x)` | hyperbolic tangent | +| `transform(v, m)` | Apply 4x4 transform to a 3 vector by extending it and cropping it again | +| `transform_points(path, m)` | Apply transform to a path | +| `translate(v)` | Generate a 4x4 translation matrix, `v` can be `[x, y]`, `[x, y, z]` or `z` | +| `transpose(m)` | Transpose an arbitrary size matrix | +| `unit(v)` | Convert `v` to a unit vector | +| `vec3(v)` | Return a 3 vector with the first three elements of `v` | +| `vec4(v)` | Return a 4 vector with the first three elements of `v` | ### Modules | Module | Description | |:--- |:--- | -| ```position_children(list, t)``` | Position children if they are on the Z = 0 plane when transformed by t | +| `position_children(list, t)` | Position children if they are on the Z = 0 plane when transformed by t | ![maths](tests/png/maths.png) @@ -5752,7 +5752,7 @@ If `chamfer_base` is true then the bottom edge is made suitable for 3D printing ### Modules | Module | Description | |:--- |:--- | -| ```offset_3D(r, chamfer_base = false)``` | Offset 3D shape by specified radius ```r```, positive or negative. | +| `offset_3D(r, chamfer_base = false)` | Offset 3D shape by specified radius `r`, positive or negative. | ![offset](tests/png/offset.png) @@ -5772,7 +5772,7 @@ Square with one rounded corner. ### Modules | Module | Description | |:--- |:--- | -| ```quadrant(w, r, center = false)``` | Draw a square with one rounded corner, can be centered on the arc centre, when ```center``` is ```true```. | +| `quadrant(w, r, center = false)` | Draw a square with one rounded corner, can be centered on the arc centre, when `center` is `true`. | ![quadrant](tests/png/quadrant.png) @@ -5796,8 +5796,8 @@ the angle gets shallower than 45 degrees. ### Modules | Module | Description | |:--- |:--- | -| ```round(r, ir = undef, or = undef)``` | Round a 2D child, single radius or separate inside and outside radii | -| ```round_3D(r, ir = undef, or = undef, chamfer_base = false)``` | Round a 3D child single radius or separate inside and outside radii | +| `round(r, ir = undef, or = undef)` | Round a 2D child, single radius or separate inside and outside radii | +| `round_3D(r, ir = undef, or = undef, chamfer_base = false)` | Round a 3D child single radius or separate inside and outside radii | ![round](tests/png/round.png) @@ -5817,8 +5817,8 @@ Cylinder with a rounded end. ### Modules | Module | Description | |:--- |:--- | -| ```rounded_corner(r, h, r2, ir = 0)``` | 2D version | -| ```rounded_cylinder(r, h, r2, ir = 0, angle = 360)``` | Rounded cylinder given radius ```r```, height ```h```, optional internal radius ```ir``` and optional ```angle``` | +| `rounded_corner(r, h, r2, ir = 0)` | 2D version | +| `rounded_cylinder(r, h, r2, ir = 0, angle = 360)` | Rounded cylinder given radius `r`, height `h`, optional internal radius `ir` and optional `angle` | ![rounded_cylinder](tests/png/rounded_cylinder.png) @@ -5840,13 +5840,13 @@ Because the tangents need to be calculated to find the length these can be calcu ### Functions | Function | Description | |:--- |:--- | -| ```rounded_polygon_length(points, tangents)``` | Calculate the length given the point list and the list of tangents computed by ``` rounded_polygon_tangents``` | -| ```rounded_polygon_tangents(points)``` | Compute the straight sections needed to draw and to compute the lengths | +| `rounded_polygon_length(points, tangents)` | Calculate the length given the point list and the list of tangents computed by ` rounded_polygon_tangents` | +| `rounded_polygon_tangents(points)` | Compute the straight sections needed to draw and to compute the lengths | ### Modules | Module | Description | |:--- |:--- | -| ```rounded_polygon(points, _tangents = undef)``` | Draw the rounded polygon from the point list, can pass the tangent list to save it being calculated | +| `rounded_polygon(points, _tangents = undef)` | Draw the rounded polygon from the point list, can pass the tangent list to save it being calculated | ![rounded_polygon](tests/png/rounded_polygon.png) @@ -5866,7 +5866,7 @@ Draw a 3D right triangle with rounded edges. Intended to be embedded in other pa ### Modules | Module | Description | |:--- |:--- | -| ```rounded_right_triangle(x, y, z, fillet, center = true, offset = false)``` | Draw a 3D right triangle with rounded edges. | +| `rounded_right_triangle(x, y, z, fillet, center = true, offset = false)` | Draw a 3D right triangle with rounded edges. | ![rounded_right_triangle](tests/png/rounded_right_triangle.png) @@ -5886,7 +5886,7 @@ A sector of a circle between two angles. ### Modules | Module | Description | |:--- |:--- | -| ```sector(r, start_angle, end_angle)``` | Create specified sector given radius ```r```, ```start_angle``` and ```end_angle``` | +| `sector(r, start_angle, end_angle)` | Create specified sector given radius `r`, `start_angle` and `end_angle` | ![sector](tests/png/sector.png) @@ -5912,21 +5912,21 @@ An additional twist around the path can be specified. If the path is closed this ### Functions | Function | Description | |:--- |:--- | -| ```after(path1, path2)``` | Translate ```path2``` so its start meets the end of ```path1``` and then concatenate | -| ```arc_points(r, a = [90, 0, 180], al = 90)``` | Generate the points of a circular arc | -| ```before(path1, path2)``` | Translate ```path1``` so its end meets the start of ```path2``` and then concatenate | -| ```cap(facets, segment = 0, end)``` | Create the mesh for an end cap | -| ```circle_points(r = 1, z = 0, dir = -1)``` | Generate the points of a circle, setting z makes a single turn spiral | -| ```helical_twist_per_segment(r, pitch, sides)``` | Calculate the twist around Z that rotate_from_to() introduces | -| ```path_length(path, i = 0, length = 0)``` | Calculated the length along a path | -| ```rectangle_points(w, h)``` | Generate the points of a rectangle | -| ```skin_faces(points, npoints, facets, loop, offset = 0)``` | Create the mesh for the swept volume without end caps | -| ```sweep(path, profile, loop = false, twist = 0)``` | Generate the point list and face list of the swept volume | +| `after(path1, path2)` | Translate `path2` so its start meets the end of `path1` and then concatenate | +| `arc_points(r, a = [90, 0, 180], al = 90)` | Generate the points of a circular arc | +| `before(path1, path2)` | Translate `path1` so its end meets the start of `path2` and then concatenate | +| `cap(facets, segment = 0, end)` | Create the mesh for an end cap | +| `circle_points(r = 1, z = 0, dir = -1)` | Generate the points of a circle, setting z makes a single turn spiral | +| `helical_twist_per_segment(r, pitch, sides)` | Calculate the twist around Z that rotate_from_to() introduces | +| `path_length(path, i = 0, length = 0)` | Calculated the length along a path | +| `rectangle_points(w, h)` | Generate the points of a rectangle | +| `skin_faces(points, npoints, facets, loop, offset = 0)` | Create the mesh for the swept volume without end caps | +| `sweep(path, profile, loop = false, twist = 0)` | Generate the point list and face list of the swept volume | ### Modules | Module | Description | |:--- |:--- | -| ```sweep(path, profile, loop = false, twist = 0, convexity = 1)``` | Draw a polyhedron that is the swept volume | +| `sweep(path, profile, loop = false, twist = 0, convexity = 1)` | Draw a polyhedron that is the swept volume | ![sweep](tests/png/sweep.png) @@ -5938,7 +5938,7 @@ An additional twist around the path can be specified. If the path is closed this ## Thread Utilities for making threads with sweep. They can be used to model screws, nuts, studding, leadscrews, etc, and also to make printed threads. -The ends can be tapered, flat or chamfered by setting the ```top``` and ```bot``` parameters to -1 for tapered, 0 for a flat cut and positive to +The ends can be tapered, flat or chamfered by setting the `top` and `bot` parameters to -1 for tapered, 0 for a flat cut and positive to specify a chamfer angle. Threads are by default solid, so the male version is wrapped around a cylinder and the female inside a tube. This can be suppressed to just get the helix, for @@ -5950,8 +5950,8 @@ Threads with a typical 60 degree angle appear too bright with OpenSCAD's primiti a cylinder. To get around this a colour can be passed to thread that is used to colour the cylinder and then toned down to colour the helix. Making the ends requires a CGAL intersection, which make threads relatively slow. For this reason they are generally disabled when using the GUI but can -be enabled by setting ```$show_threads``` to ```true```. When the tests are run, by default, threads are enabled only for things that feature them like screws. -This behaviour can be changed by setting a ```NOPSCADLIB_SHOW_THREADS``` environment variable to ```false``` to disable all threads and ```true``` to enable all threads. +be enabled by setting `$show_threads` to `true`. When the tests are run, by default, threads are enabled only for things that feature them like screws. +This behaviour can be changed by setting a `NOPSCADLIB_SHOW_THREADS` environment variable to `false` to disable all threads and `true` to enable all threads. The same variable also affects the generation of assembly diagrams. Threads obey the $fn, $fa, $fs variables. @@ -5964,15 +5964,15 @@ Threads obey the $fn, $fa, $fs variables. ### Functions | Function | Description | |:--- |:--- | -| ```metric_coarse_pitch(d)``` | Convert metric diameter to pitch | -| ```thread_profile(h, crest, angle, overlap = 0.1)``` | Create thread profile path | +| `metric_coarse_pitch(d)` | Convert metric diameter to pitch | +| `thread_profile(h, crest, angle, overlap = 0.1)` | Create thread profile path | ### Modules | Module | Description | |:--- |:--- | -| ```female_metric_thread(d, pitch, length, center = true, top = -1, bot = -1, colour = undef)``` | Create female thread with metric profile | -| ```male_metric_thread(d, pitch, length, center = true, top = -1, bot = -1, solid = true, colour = undef)``` | Create male thread with metric profile | -| ```thread(dia, pitch, length, profile, center = true, top = -1, bot = -1, starts = 1, solid = true, female = false, colour = undef)``` | Create male or female thread, ends can be tapered, chamfered or square | +| `female_metric_thread(d, pitch, length, center = true, top = -1, bot = -1, colour = undef)` | Create female thread with metric profile | +| `male_metric_thread(d, pitch, length, center = true, top = -1, bot = -1, solid = true, colour = undef)` | Create male thread with metric profile | +| `thread(dia, pitch, length, profile, center = true, top = -1, bot = -1, starts = 1, solid = true, female = false, colour = undef)` | Create male or female thread, ends can be tapered, chamfered or square | ![thread](tests/png/thread.png) @@ -5992,9 +5992,9 @@ Simple tube or ring ### Modules | Module | Description | |:--- |:--- | -| ```ring(or, ir)``` | Create a ring with specified external and internal radii | -| ```tube(or, ir, h, center = true)``` | Create a tube with specified external and internal radii and height ```h``` | -| ```woven_tube(or, ir, h, center= true, colour = grey(30)``` | Create a woven tube with specified external and internal radii, height ```h```, colours, warp and weft | +| `ring(or, ir)` | Create a ring with specified external and internal radii | +| `tube(or, ir, h, center = true)` | Create a tube with specified external and internal radii and height `h` | +| `woven_tube(or, ir, h, center= true, colour = grey(30)` | Create a woven tube with specified external and internal radii, height `h`, colours, warp and weft | ![tube](tests/png/tube.png) @@ -6004,12 +6004,12 @@ Simple tube or ring --- ## BOM -Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. +Bill Of Materials generation via echo and the `bom.py` script. Also handles exploded assembly views and posing. Assembly instructions can precede the module definition that makes the assembly. Assembly views shown in the instructions can be large or small and this is deduced by looking at the size of the printed parts involved and if any routed parts are used. -This heuristic isn't always correct, so the default can be overridden by setting the ```big``` parameter of ```assembly``` to ```true``` or ```false```. +This heuristic isn't always correct, so the default can be overridden by setting the `big` parameter of `assembly` to `true` or `false`. The example below shows how to define a vitamin and incorporate it into an assembly with sub-assemblies and make an exploded view. The resulting flat BOM is shown but heirachical BOMs are also generated for real projects. @@ -6022,40 +6022,40 @@ The resulting flat BOM is shown but heirachical BOMs are also generated for real ### Functions | Function | Description | |:--- |:--- | -| ```arg(value, default, name = "")``` | Create string for arg if not default, helper for ```vitamin()``` | -| ```bom_mode(n = 1)``` | Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well | -| ```exploded()``` | Returns the value of ```$exploded``` if it is defined, else ```0``` | -| ```show_supports()``` | True if printed support material should be shown | -| ```value_string(value)``` | Convert ```value``` to a string or quote it if it is already a string | +| `arg(value, default, name = "")` | Create string for arg if not default, helper for `vitamin()` | +| `bom_mode(n = 1)` | Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well | +| `exploded()` | Returns the value of `$exploded` if it is defined, else `0` | +| `show_supports()` | True if printed support material should be shown | +| `value_string(value)` | Convert `value` to a string or quote it if it is already a string | ### Modules | Module | Description | |:--- |:--- | -| ```assembly(name, big = undef)``` | Name an assembly that will appear on the BOM, there needs to a module named ```_assembly``` to make it. ```big``` can force big or small assembly diagrams. | -| ```dxf(name)``` | Name a dxf that will appear on the BOM, there needs to a module named ```_dxf``` to make it | -| ```explode(d, explode_children = false, offset = [0,0,0])``` | Explode children by specified Z distance or vector ```d```, option to explode grand children | -| ```hidden()``` | Make item invisible, except on the BOM | -| ```no_explode()``` | Prevent children being exploded | -| ```no_pose()``` | Force children not to be posed even if parent is | -| ```not_on_bom(on = false)``` | Specify the following child parts are not on the BOM, for example when they are on a PCB that comes assembled | -| ```pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef)``` | Pose an STL or assembly for rendering to png by specifying rotation ```a``` and translation ```t```, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. | -| ```pose_hflip(exploded = undef)``` | Pose an STL or assembly for rendering to png by flipping around the Y axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. | -| ```pose_vflip(exploded = undef)``` | Pose an STL or assembly for rendering to png by flipping around the X axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. | -| ```stl(name)``` | Name an stl that will appear on the BOM, there needs to a module named ```_stl``` to make it | -| ```stl_colour(colour = pp1_colour, alpha = 1)``` | Colour an stl where it is placed in an assembly. ```alpha``` can be used to make it appear transparent. | -| ```vitamin(description)``` | Describe a vitamin for the BOM entry and precede it with a module call that creates it, eg. "wigit(42): Type 42 widget" | +| `assembly(name, big = undef)` | Name an assembly that will appear on the BOM, there needs to a module named `_assembly` to make it. `big` can force big or small assembly diagrams. | +| `dxf(name)` | Name a dxf that will appear on the BOM, there needs to a module named `_dxf` to make it | +| `explode(d, explode_children = false, offset = [0,0,0])` | Explode children by specified Z distance or vector `d`, option to explode grand children | +| `hidden()` | Make item invisible, except on the BOM | +| `no_explode()` | Prevent children being exploded | +| `no_pose()` | Force children not to be posed even if parent is | +| `not_on_bom(on = false)` | Specify the following child parts are not on the BOM, for example when they are on a PCB that comes assembled | +| `pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef)` | Pose an STL or assembly for rendering to png by specifying rotation `a` and translation `t`, `exploded = true for` just the exploded view or `false` for unexploded only. | +| `pose_hflip(exploded = undef)` | Pose an STL or assembly for rendering to png by flipping around the Y axis, `exploded = true for` just the exploded view or `false` for unexploded only. | +| `pose_vflip(exploded = undef)` | Pose an STL or assembly for rendering to png by flipping around the X axis, `exploded = true for` just the exploded view or `false` for unexploded only. | +| `stl(name)` | Name an stl that will appear on the BOM, there needs to a module named `_stl` to make it | +| `stl_colour(colour = pp1_colour, alpha = 1)` | Colour an stl where it is placed in an assembly. `alpha` can be used to make it appear transparent. | +| `vitamin(description)` | Describe a vitamin for the BOM entry and precede it with a module call that creates it, eg. "wigit(42): Type 42 widget" | ![bom](tests/png/bom.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```insert(F1BM3)``` | Heatfit insert M3 | -| 1 | ```widget(3)``` | Rivit like thing for 3mm sheets | -| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm | -| 1 | ```sheet(PMMA3, 20, 20, 1)``` | Sheet acrylic 20mm x 20mm x 3mm | -| 1 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | -| 1 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm | +| 1 | `insert(F1BM3)` | Heatfit insert M3 | +| 1 | `widget(3)` | Rivit like thing for 3mm sheets | +| 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm | +| 1 | `sheet(PMMA3, 20, 20, 1)` | Sheet acrylic 20mm x 20mm x 3mm | +| 1 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 1 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | ### Printed | Qty | Filename | @@ -6092,8 +6092,8 @@ Original version by Doug Moen on the OpenSCAD forum ### Modules | Module | Description | |:--- |:--- | -| ```box(xmin, ymin, zmin, xmax, ymax, zmax)``` | Construct a box given its bounds | -| ```clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf)``` | Clip child to specified boundaries | +| `box(xmin, ymin, zmin, xmax, ymax, zmax)` | Construct a box given its bounds | +| `clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf)` | Clip child to specified boundaries | ![clip](tests/png/clip.png) @@ -6113,34 +6113,34 @@ Global constants, functions and modules. This file is used directly or indirectl ### Functions | Function | Description | |:--- |:--- | -| ```Len(x)``` | Returns the length of a list or 0 if ```x``` is not a list | -| ```cm(x)``` | cm to mm conversion | -| ```echoit(x)``` | Echo expression and return it, useful for debugging | -| ```foot(x)``` | Foot to mm conversion | -| ```in(list, x)``` | Returns true if ```x``` is an element in the ```list``` | -| ```inch(x)``` | Inch to mm conversion (For fractional inches, 'inch(1 + 7/8)' will work as expected.) | -| ```limit(x, min, max)``` | Force x in range min <= x <= max | -| ```m(x)``` | m to mm conversion | -| ```mm(x)``` | Explicit mm specified | -| ```no_point(str)``` | Replace decimal point in string with 'p' | -| ```r2sides(r)``` | Replicates the OpenSCAD logic to calculate the number of sides from the radius | -| ```r2sides4n(r)``` | Round up the number of sides to a multiple of 4 to ensure points land on all axes | -| ```slice(list, start = 0, end = undef)``` | Slice a list or string with Python type semantics | -| ```sqr(x)``` | Returns the square of ```x``` | -| ```yard(x)``` | Yard to mm conversion | +| `Len(x)` | Returns the length of a list or 0 if `x` is not a list | +| `cm(x)` | cm to mm conversion | +| `echoit(x)` | Echo expression and return it, useful for debugging | +| `foot(x)` | Foot to mm conversion | +| `in(list, x)` | Returns true if `x` is an element in the `list` | +| `inch(x)` | Inch to mm conversion (For fractional inches, 'inch(1 + 7/8)' will work as expected.) | +| `limit(x, min, max)` | Force x in range min <= x <= max | +| `m(x)` | m to mm conversion | +| `mm(x)` | Explicit mm specified | +| `no_point(str)` | Replace decimal point in string with 'p' | +| `r2sides(r)` | Replicates the OpenSCAD logic to calculate the number of sides from the radius | +| `r2sides4n(r)` | Round up the number of sides to a multiple of 4 to ensure points land on all axes | +| `slice(list, start = 0, end = undef)` | Slice a list or string with Python type semantics | +| `sqr(x)` | Returns the square of `x` | +| `yard(x)` | Yard to mm conversion | ### Modules | Module | Description | |:--- |:--- | -| ```circle4n(r, d = undef)``` | Circle with multiple of 4 vertices | -| ```ellipse(xr, yr)``` | Draw an ellipse | -| ```extrude_if(h, center = true)``` | Extrudes 2D object to 3D when ```h``` is nonzero, otherwise leaves it 2D | -| ```hflip(flip=true)``` | Invert children by doing a 180° flip around the Y axis | -| ```render_if(render = true, convexity = 2)``` | Renders an object if ```render``` is true, otherwise leaves it unrendered | -| ```right_triangle(width, height, h, center = true)``` | A right angled triangle with the 90° corner at the origin. 3D when ```h``` is nonzero, otherwise 2D | -| ```semi_circle(r, d = undef)``` | A semi circle in the positive Y domain | -| ```translate_z(z)``` | Shortcut for Z only translations | -| ```vflip(flip=true)``` | Invert children by doing a 180° flip around the X axis | +| `circle4n(r, d = undef)` | Circle with multiple of 4 vertices | +| `ellipse(xr, yr)` | Draw an ellipse | +| `extrude_if(h, center = true)` | Extrudes 2D object to 3D when `h` is nonzero, otherwise leaves it 2D | +| `hflip(flip=true)` | Invert children by doing a 180° flip around the Y axis | +| `render_if(render = true, convexity = 2)` | Renders an object if `render` is true, otherwise leaves it unrendered | +| `right_triangle(width, height, h, center = true)` | A right angled triangle with the 90° corner at the origin. 3D when `h` is nonzero, otherwise 2D | +| `semi_circle(r, d = undef)` | A semi circle in the positive Y domain | +| `translate_z(z)` | Shortcut for Z only translations | +| `vflip(flip=true)` | Invert children by doing a 180° flip around the X axis | ![global](tests/png/global.png) @@ -6173,48 +6173,48 @@ leaving a scar on either surface. ### Functions | Function | Description | |:--- |:--- | -| ```corrected_diameter(d, n = 0)``` | Adjusted diameter to make flats lie on the circle | -| ```corrected_radius(r, n = 0)``` | Adjusted radius to make flats lie on the circle | -| ```sides(r)``` | Optimium number of sides for specified radius | +| `corrected_diameter(d, n = 0)` | Adjusted diameter to make flats lie on the circle | +| `corrected_radius(r, n = 0)` | Adjusted radius to make flats lie on the circle | +| `sides(r)` | Optimium number of sides for specified radius | ### Modules | Module | Description | |:--- |:--- | -| ```drill(r, h = 100, center = true)``` | Make a cylinder for drilling holes suitable for CNC routing, set h = 0 for circle | -| ```poly_circle(r, sides = 0)``` | Make a circle adjusted to print the correct size | -| ```poly_cylinder(r, h, center = false, sides = 0, chamfer = false, twist = 0)``` | Make a cylinder adjusted to print the correct size | -| ```poly_drill(r, h = 100, center = true)``` | Make a cylinder for drilling holes suitable for CNC routing if cnc_bit_r is non zero, otherwise a poly_cylinder. | -| ```poly_ring(or, ir, sides = 0)``` | Make a 2D ring adjusted to have the correct internal radius | -| ```poly_tube(or, ir, h, center = false)``` | Make a tube adjusted to have the correct internal radius | -| ```slot(r, l, h = 100)``` | Make a horizontal slot suitable for CNC routing, set h = 0 for 2D version | +| `drill(r, h = 100, center = true)` | Make a cylinder for drilling holes suitable for CNC routing, set h = 0 for circle | +| `poly_circle(r, sides = 0)` | Make a circle adjusted to print the correct size | +| `poly_cylinder(r, h, center = false, sides = 0, chamfer = false, twist = 0)` | Make a cylinder adjusted to print the correct size | +| `poly_drill(r, h = 100, center = true)` | Make a cylinder for drilling holes suitable for CNC routing if cnc_bit_r is non zero, otherwise a poly_cylinder. | +| `poly_ring(or, ir, sides = 0)` | Make a 2D ring adjusted to have the correct internal radius | +| `poly_tube(or, ir, h, center = false)` | Make a tube adjusted to have the correct internal radius | +| `slot(r, l, h = 100)` | Make a horizontal slot suitable for CNC routing, set h = 0 for 2D version | ![polyholes](tests/png/polyholes.png) ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```sheet(Steel06, 20, 20, 1)``` | Sheet mild steel 20mm x 20mm x 0.6mm | -| 1 | ```rod(1.5, 11)``` | Smooth rod 1.5mm x 11mm | -| 1 | ```rod(10.5, 47)``` | Smooth rod 10.5mm x 47mm | -| 1 | ```rod(10, 45)``` | Smooth rod 10mm x 45mm | -| 1 | ```rod(1, 9)``` | Smooth rod 1mm x 9mm | -| 1 | ```rod(2.5, 15)``` | Smooth rod 2.5mm x 15mm | -| 1 | ```rod(2, 13)``` | Smooth rod 2mm x 13mm | -| 1 | ```rod(3.5, 19)``` | Smooth rod 3.5mm x 19mm | -| 1 | ```rod(3, 17)``` | Smooth rod 3mm x 17mm | -| 4 | ```rod(3, 3)``` | Smooth rod 3mm x 3mm | -| 1 | ```rod(4.5, 23)``` | Smooth rod 4.5mm x 23mm | -| 1 | ```rod(4, 21)``` | Smooth rod 4mm x 21mm | -| 1 | ```rod(5.5, 27)``` | Smooth rod 5.5mm x 27mm | -| 1 | ```rod(5, 25)``` | Smooth rod 5mm x 25mm | -| 1 | ```rod(6.5, 31)``` | Smooth rod 6.5mm x 31mm | -| 1 | ```rod(6, 29)``` | Smooth rod 6mm x 29mm | -| 1 | ```rod(7.5, 35)``` | Smooth rod 7.5mm x 35mm | -| 1 | ```rod(7, 33)``` | Smooth rod 7mm x 33mm | -| 1 | ```rod(8.5, 39)``` | Smooth rod 8.5mm x 39mm | -| 1 | ```rod(8, 37)``` | Smooth rod 8mm x 37mm | -| 1 | ```rod(9.5, 43)``` | Smooth rod 9.5mm x 43mm | -| 1 | ```rod(9, 41)``` | Smooth rod 9mm x 41mm | +| 1 | `sheet(Steel06, 20, 20, 1)` | Sheet mild steel 20mm x 20mm x 0.6mm | +| 1 | `rod(1.5, 11)` | Smooth rod 1.5mm x 11mm | +| 1 | `rod(10.5, 47)` | Smooth rod 10.5mm x 47mm | +| 1 | `rod(10, 45)` | Smooth rod 10mm x 45mm | +| 1 | `rod(1, 9)` | Smooth rod 1mm x 9mm | +| 1 | `rod(2.5, 15)` | Smooth rod 2.5mm x 15mm | +| 1 | `rod(2, 13)` | Smooth rod 2mm x 13mm | +| 1 | `rod(3.5, 19)` | Smooth rod 3.5mm x 19mm | +| 1 | `rod(3, 17)` | Smooth rod 3mm x 17mm | +| 4 | `rod(3, 3)` | Smooth rod 3mm x 3mm | +| 1 | `rod(4.5, 23)` | Smooth rod 4.5mm x 23mm | +| 1 | `rod(4, 21)` | Smooth rod 4mm x 21mm | +| 1 | `rod(5.5, 27)` | Smooth rod 5.5mm x 27mm | +| 1 | `rod(5, 25)` | Smooth rod 5mm x 25mm | +| 1 | `rod(6.5, 31)` | Smooth rod 6.5mm x 31mm | +| 1 | `rod(6, 29)` | Smooth rod 6mm x 29mm | +| 1 | `rod(7.5, 35)` | Smooth rod 7.5mm x 35mm | +| 1 | `rod(7, 33)` | Smooth rod 7mm x 33mm | +| 1 | `rod(8.5, 39)` | Smooth rod 8.5mm x 39mm | +| 1 | `rod(8, 37)` | Smooth rod 8mm x 37mm | +| 1 | `rod(9.5, 43)` | Smooth rod 9.5mm x 43mm | +| 1 | `rod(9, 41)` | Smooth rod 9mm x 41mm | ### Printed | Qty | Filename | @@ -6237,10 +6237,10 @@ Rectangle with rounded corners. ### Modules | Module | Description | |:--- |:--- | -| ```rounded_rectangle(size, r, center = true, xy_center = true)``` | Like ```cube()``` but corners rounded in XY plane and separate centre options for xy and z. | -| ```rounded_rectangle_xz(size, r, center = true, xy_center = true)``` | Like ```cube()``` but corners rounded in XZ plane and separate centre options for xy and z. | -| ```rounded_rectangle_yz(size, r, center = true, xy_center = true)``` | Like ```cube()``` but corners rounded in YX plane and separate centre options for xy and z. | -| ```rounded_square(size, r, center = true)``` | Like ```square()``` but with with rounded corners | +| `rounded_rectangle(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. | +| `rounded_rectangle_xz(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z. | +| `rounded_rectangle_yz(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in YX plane and separate centre options for xy and z. | +| `rounded_square(size, r, center = true)` | Like `square()` but with with rounded corners | ![rounded_rectangle](tests/png/rounded_rectangle.png) @@ -6261,7 +6261,7 @@ This ensures `hull` and `minkowski` results have the correct dimensions when sph ### Modules | Module | Description | |:--- |:--- | -| ```sphere(r = 1, d = undef)``` | Override ```sphere``` so that has vertices on all three axes. Has the advantage of giving correct dimensions when hulled | +| `sphere(r = 1, d = undef)` | Override `sphere` so that has vertices on all three axes. Has the advantage of giving correct dimensions when hulled | ![sphere](tests/png/sphere.png) @@ -6285,12 +6285,12 @@ do not intrude into the circle. See . # -#! Generates all the files for a project by running ```bom.py```, ```stls.py```, ```dxfs.py```, ```render.py``` and ```views.py```. +#! Generates all the files for a project by running `bom.py`, `stls.py`, `dxfs.py`, `render.py` and `views.py`. import sys diff --git a/scripts/panels.py b/scripts/panels.py index e388687..1129f9f 100644 --- a/scripts/panels.py +++ b/scripts/panels.py @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License along with NopSCADlib. # If not, see . # -#! Panelises DXF files so they can be routed together by running scad files found in the ```panels``` directory. +#! Panelises DXF files so they can be routed together by running scad files found in the `panels` directory. from __future__ import print_function import sys diff --git a/scripts/platters.py b/scripts/platters.py index fdc7915..4ba36c6 100644 --- a/scripts/platters.py +++ b/scripts/platters.py @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License along with NopSCADlib. # If not, see . # -#! Generates build plates of STL files for efficient printing by running scad files found in the ```platters``` directory. +#! Generates build plates of STL files for efficient printing by running scad files found in the `platters` directory. from __future__ import print_function import sys diff --git a/scripts/readme.md b/scripts/readme.md index f4787a9..7595714 100644 --- a/scripts/readme.md +++ b/scripts/readme.md @@ -1,22 +1,24 @@ # Python scripts -These are located in the ```scripts``` subdirectory, which needs to be added to the program search path. +These are located in the `scripts` subdirectory, which needs to be added to the program search path. They should work with both Python 2 and Python 3. | Script | Function | |:---|:---| -| ```bom.py``` | Generates BOM files for the project. | -| ```c14n_stl.py``` | OpenSCAD produces randomly ordered STL files. This script re-orders them consistently so that GIT can tell if they have changed or not. | -| ```doc_scripts.py``` | Makes this document and doc/usage.md. | -| ```dxfs.py``` | Generates DXF files for all the routed parts listed on the BOM or a specified list. | -| ```gallery.py``` | Finds projects and adds them to the gallery. | -| ```make_all.py``` | Generates all the files for a project by running ```bom.py```, ```stls.py```, ```dxfs.py```, ```render.py``` and ```views.py```. | -| ```panels.py``` | Panelises DXF files so they can be routed together by running scad files found in the ```panels``` directory. | -| ```platters.py``` | Generates build plates of STL files for efficient printing by running scad files found in the ```platters``` directory. | -| ```render.py``` | Renders STL and DXF files to PNG for inclusion in the build instructions. | -| ```set_config.py``` | Sets the target configuration for multi-target projects that have variable configurations. | -| ```stls.py``` | Generates STL files for all the printed parts listed on the BOM or a specified list. | -| ```svgs.py``` | Generates SVG files for all the routed parts listed on the BOM or a specified list. | -| ```tests.py``` | Runs all the tests in the tests directory and makes the readme file with a catalog of the results. | -| ```views.py``` | Generates exploded and unexploded assembly views and scrapes build instructions to make readme.md, readme.html and printme.html files for the project. | +| `bom.py` | Generates BOM files for the project. | +| `c14n_stl.py` | OpenSCAD produces randomly ordered STL files. This script re-orders them consistently so that GIT can tell if they have changed or not. | +| `doc_scripts.py` | Makes this document and doc/usage.md. | +| `dxf.py` | | +| `dxf2pdf.py` | | +| `dxfs.py` | Generates DXF files for all the routed parts listed on the BOM or a specified list. | +| `gallery.py` | Finds projects and adds them to the gallery. | +| `make_all.py` | Generates all the files for a project by running `bom.py`, `stls.py`, `dxfs.py`, `render.py` and `views.py`. | +| `panels.py` | Panelises DXF files so they can be routed together by running scad files found in the `panels` directory. | +| `platters.py` | Generates build plates of STL files for efficient printing by running scad files found in the `platters` directory. | +| `render.py` | Renders STL and DXF files to PNG for inclusion in the build instructions. | +| `set_config.py` | Sets the target configuration for multi-target projects that have variable configurations. | +| `stls.py` | Generates STL files for all the printed parts listed on the BOM or a specified list. | +| `svgs.py` | Generates SVG files for all the routed parts listed on the BOM or a specified list. | +| `tests.py` | Runs all the tests in the tests directory and makes the readme file with a catalog of the results. | +| `views.py` | Generates exploded and unexploded assembly views and scrapes build instructions to make readme.md, readme.html and printme.html files for the project. | diff --git a/scripts/tests.py b/scripts/tests.py index 62286f0..964793a 100755 --- a/scripts/tests.py +++ b/scripts/tests.py @@ -219,7 +219,7 @@ def tests(tests): if things: body += ['### %s\n| %s | Description |\n|:--- |:--- |' % (thing.title(), heading)] for item in sorted(things): - body += ['| ```%s``` | %s |' % (item, things[item])] + body += ['| `%s` | %s |' % (item, things[item])] body += [''] body += ["![%s](%s)\n" %(base_name, png_name)] @@ -252,7 +252,7 @@ def tests(tests): desc = '' if thing == "vitamins": vit = item.split(':') - name = '```' + vit[0] + '```' if vit[0] else '' + name = '`' + vit[0] + '`' if vit[0] else '' while '[[' in name and ']]' in name: i = name.find('[[') j = name.find(']]') + 2 diff --git a/utils/bezier.scad b/utils/bezier.scad index 711f23a..8a5c2be 100644 --- a/utils/bezier.scad +++ b/utils/bezier.scad @@ -22,14 +22,14 @@ // include <../global_defs.scad> -function bezier(t, v) = //! Returns a point at distance ```t``` [0 - 1] along the curve with control points ```v``` +function bezier(t, v) = //! Returns a point at distance `t` [0 - 1] along the curve with control points `v` (len(v) > 2) ? bezier(t, [for (i = [0 : len(v) - 2]) v[i] * (1 - t) + v[i + 1] * (t)]) : v[0] * (1 - t) + v[1] * (t); -function bezier_path(v, steps = 100) = //! Returns a Bezier path from control points ```v``` with ```steps``` segments +function bezier_path(v, steps = 100) = //! Returns a Bezier path from control points `v` with `steps` segments [for(i = [0 : steps], t = i / steps) bezier(t, v)]; -function bezier_length(v, delta = 0.01, t = 0, length = 0) = //! Calculate the length of a Bezier curve from control points ```v``` +function bezier_length(v, delta = 0.01, t = 0, length = 0) = //! Calculate the length of a Bezier curve from control points `v` t > 1 ? length : bezier_length(v, delta, t + delta, length + norm(bezier(t, v) - bezier(t + delta, v))); @@ -37,7 +37,7 @@ function adjust_bezier(v, r) = let(extension = (v[1] - v[0]) * (r - 1)) [v[0], v[1] + extension, v[2] + extension, v[3]]; -function adjust_bezier_length(v, l, eps = 0.001, r1 = 1.0, r2 = 1.5, l1, l2) = //! Adjust Bezier control points ```v``` to get the required curve length ```l``` +function adjust_bezier_length(v, l, eps = 0.001, r1 = 1.0, r2 = 1.5, l1, l2) = //! Adjust Bezier control points `v` to get the required curve length `l` let(l1 = l1 != undef ? l1 : bezier_length(adjust_bezier(v, r1)), l2 = l2 != undef ? l2 : bezier_length(adjust_bezier(v, r2)) ) abs(l1 - l) < eps ? adjust_bezier(v, r1) @@ -45,10 +45,10 @@ function adjust_bezier_length(v, l, eps = 0.001, r1 = 1.0, r2 = 1.5, l1, l2) = / abs(r - r1) < abs(r - r2) ? adjust_bezier_length(v, l, eps, r, r1, undef, l1) : adjust_bezier_length(v, l, eps, r, r2, undef, l2); -function bezier_min_z(v, steps = 100, z = inf, i = 0) = //! Calculate the minimum z coordinate of a Bezier curve from control points ```v``` +function bezier_min_z(v, steps = 100, z = inf, i = 0) = //! Calculate the minimum z coordinate of a Bezier curve from control points `v` i <= steps ? bezier_min_z(v, steps, min(z, bezier(i / steps, v).z), i + 1) : z; -function adjust_bezier_z(v, z, eps = 0.001, r1 = 1, r2 = 1.5, z1, z2) = //! Adjust Bezier control points ```v``` to get the required minimum ```z``` +function adjust_bezier_z(v, z, eps = 0.001, r1 = 1, r2 = 1.5, z1, z2) = //! Adjust Bezier control points `v` to get the required minimum `z` let(z1 = z1 != undef ? z1 : bezier_min_z(adjust_bezier(v, r1)), z2 = z2 != undef ? z2 : bezier_min_z(adjust_bezier(v, r2)) ) abs(z1 - z) < eps ? adjust_bezier(v, r1) diff --git a/utils/catenary.scad b/utils/catenary.scad index fdac11b..a8fe21b 100644 --- a/utils/catenary.scad +++ b/utils/catenary.scad @@ -20,25 +20,25 @@ // //! Catenary curve to model hanging wires, etc. //! -//! Although the equation of the curve is simply ```y = a cosh(x / a)``` there is no explicit formula to calculate the constant ```a``` or the range of ```x``` given the +//! Although the equation of the curve is simply `y = a cosh(x / a)` there is no explicit formula to calculate the constant `a` or the range of `x` given the //! length of the cable and the end point coordinates. See . The Newton-Raphson method is used to find -//! ```a``` numerically, see . +//! `a` numerically, see . //! -//! The coordinates of the lowest point on the curve can be retrieved by calling ```catenary_points()``` with ```steps``` equal to zero. +//! The coordinates of the lowest point on the curve can be retrieved by calling `catenary_points()` with `steps` equal to zero. // include use function catenary(t, a) = let(u = argsinh(t)) a * [u, cosh(u)]; //! Parametric catenary function linear along the length of the curve. -function catenary_s(d, a) = 2 * a * sinh(d / a); //! Length of a symmetric catenary with width ```2d```. -function catenary_ds_by_da(d, a) = 2 * sinh(d / a) - 2 * d / a * cosh(d / a); //! First derivative of the length with respect to ```a```. +function catenary_s(d, a) = 2 * a * sinh(d / a); //! Length of a symmetric catenary with width `2d`. +function catenary_ds_by_da(d, a) = 2 * sinh(d / a) - 2 * d / a * cosh(d / a); //! First derivative of the length with respect to `a`. -function catenary_find_a(d, l, a = 1, best_e = inf, best_a = 1) = //! Find the catenary constant ```a```, given half the horizontal span and the length. +function catenary_find_a(d, l, a = 1, best_e = inf, best_a = 1) = //! Find the catenary constant `a`, given half the horizontal span and the length. assert(l > 2 * d, "Not long enough to span the gap") assert(d) let(error = abs(catenary_s(d, a) - l)) error >= best_e && error < 0.0001 ? best_a : catenary_find_a(d, l, max(a - (catenary_s(d, a) - l) / catenary_ds_by_da(d, a), d / argsinh(1e99)), error, a); -function catenary_points(l, x, y, steps = 100) = //! Returns a list of 2D points on the curve that goes from the origin to ```(x,y)``` and has length ```l```. +function catenary_points(l, x, y, steps = 100) = //! Returns a list of 2D points on the curve that goes from the origin to `(x,y)` and has length `l`. let( d = x / 2, a = catenary_find_a(d, sqrt(sqr(l) - sqr(y))), // Find a to get the correct length diff --git a/utils/core/bom.scad b/utils/core/bom.scad index b8e3ca4..203f415 100644 --- a/utils/core/bom.scad +++ b/utils/core/bom.scad @@ -18,24 +18,24 @@ // // -//! Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. +//! Bill Of Materials generation via echo and the `bom.py` script. Also handles exploded assembly views and posing. //! Assembly instructions can precede the module definition that makes the assembly. //! //! Assembly views shown in the instructions can be large or small and this is deduced by looking at the size of the printed parts involved and if any routed //! parts are used. -//! This heuristic isn't always correct, so the default can be overridden by setting the ```big``` parameter of ```assembly``` to ```true``` or ```false```. +//! This heuristic isn't always correct, so the default can be overridden by setting the `big` parameter of `assembly` to `true` or `false`. //! //! The example below shows how to define a vitamin and incorporate it into an assembly with sub-assemblies and make an exploded view. //! The resulting flat BOM is shown but heirachical BOMs are also generated for real projects. // function bom_mode(n = 1) = $_bom >= n && (is_undef($on_bom) || $on_bom); //! Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well -function exploded() = is_undef($exploded_parent) ? $exploded : 0; //! Returns the value of ```$exploded``` if it is defined, else ```0``` +function exploded() = is_undef($exploded_parent) ? $exploded : 0; //! Returns the value of `$exploded` if it is defined, else `0` function show_supports() = !$preview || exploded(); //! True if printed support material should be shown module no_explode() let($exploded_parent = true) children(); //! Prevent children being exploded module no_pose() let($posed = true) children(); //! Force children not to be posed even if parent is -module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children by specified Z distance or vector ```d```, option to explode grand children +module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children by specified Z distance or vector `d`, option to explode grand children v = is_list(d) ? d : [0, 0, d]; o = is_list(offset) ? offset : [0, 0, offset]; if($exploded && is_undef($exploded_parent) && norm(v)) { @@ -55,7 +55,7 @@ module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children(); } -module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef) //! Pose an STL or assembly for rendering to png by specifying rotation ```a``` and translation ```t```, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. +module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef) //! Pose an STL or assembly for rendering to png by specifying rotation `a` and translation `t`, `exploded = true for` just the exploded view or `false` for unexploded only. if(is_undef($pose) || !is_undef($posed) || (!is_undef(exploded) && exploded != !!exploded())) children(); else @@ -67,7 +67,7 @@ module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef) //! Pose an translate(-t) children(); -module pose_hflip(exploded = undef) //! Pose an STL or assembly for rendering to png by flipping around the Y axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. +module pose_hflip(exploded = undef) //! Pose an STL or assembly for rendering to png by flipping around the Y axis, `exploded = true for` just the exploded view or `false` for unexploded only. if(is_undef($pose) || !is_undef($posed) || (!is_undef(exploded) && exploded != !!exploded())) children(); else @@ -75,7 +75,7 @@ module pose_hflip(exploded = undef) //! Pose an STL or assembly for render hflip() children(); -module pose_vflip(exploded = undef) //! Pose an STL or assembly for rendering to png by flipping around the X axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. +module pose_vflip(exploded = undef) //! Pose an STL or assembly for rendering to png by flipping around the X axis, `exploded = true for` just the exploded view or `false` for unexploded only. if(is_undef($pose) || !is_undef($posed) || (!is_undef(exploded) && exploded != !!exploded())) children(); else @@ -84,7 +84,7 @@ module pose_vflip(exploded = undef) //! Pose an STL or assembly for render children(); -module assembly(name, big = undef) { //! Name an assembly that will appear on the BOM, there needs to a module named ```_assembly``` to make it. ```big``` can force big or small assembly diagrams. +module assembly(name, big = undef) { //! Name an assembly that will appear on the BOM, there needs to a module named `_assembly` to make it. `big` can force big or small assembly diagrams. if(bom_mode()) { args = is_undef(big) ? "" : str("(big=", big, ")"); echo(str("~", name, "_assembly", args, "{")); @@ -101,20 +101,20 @@ module assembly(name, big = undef) { //! Name an assembly that will appear on echo(str("~}", name, "_assembly")); } -module stl_colour(colour = pp1_colour, alpha = 1) { //! Colour an stl where it is placed in an assembly. ```alpha``` can be used to make it appear transparent. +module stl_colour(colour = pp1_colour, alpha = 1) { //! Colour an stl where it is placed in an assembly. `alpha` can be used to make it appear transparent. $stl_colour = colour; color(colour, alpha) children(); } -module stl(name) { //! Name an stl that will appear on the BOM, there needs to a module named ```_stl``` to make it +module stl(name) { //! Name an stl that will appear on the BOM, there needs to a module named `_stl` to make it if(bom_mode()) { colour = is_undef($stl_colour) ? pp1_colour : $stl_colour; echo(str("~", name, ".stl(colour='", colour, "')")); } } -module dxf(name) { //! Name a dxf that will appear on the BOM, there needs to a module named ```_dxf``` to make it +module dxf(name) { //! Name a dxf that will appear on the BOM, there needs to a module named `_dxf` to make it if(bom_mode()) { if(is_undef($dxf_colour)) echo(str("~", name, ".dxf")); @@ -123,9 +123,9 @@ module dxf(name) { //! Name a dxf that will appear on the B } } -function value_string(value) = is_string(value) ? str("\"", value, "\"") : str(value); //! Convert ```value``` to a string or quote it if it is already a string +function value_string(value) = is_string(value) ? str("\"", value, "\"") : str(value); //! Convert `value` to a string or quote it if it is already a string -function arg(value, default, name = "") = //! Create string for arg if not default, helper for ```vitamin()``` +function arg(value, default, name = "") = //! Create string for arg if not default, helper for `vitamin()` value == default ? "" : name ? str(", ", name, " = ", value_string(value)) : str(", ", value_string(value)); diff --git a/utils/core/global.scad b/utils/core/global.scad index 79f5283..b27582a 100644 --- a/utils/core/global.scad +++ b/utils/core/global.scad @@ -29,11 +29,11 @@ function mm(x) = x; function cm(x) = x * 10.0; //! cm to mm conversion function m(x) = x * 1000.0; //! m to mm conversion -function sqr(x) = x * x; //! Returns the square of ```x``` +function sqr(x) = x * x; //! Returns the square of `x` function echoit(x) = echo(x) x; //! Echo expression and return it, useful for debugging function no_point(str) = chr([for(c = str(str)) if(c == ".") ord("p") else ord(c)]);//! Replace decimal point in string with 'p' -function in(list, x) = !!len([for(v = list) if(v == x) true]); //! Returns true if ```x``` is an element in the ```list``` -function Len(x) = is_list(x) ? len(x) : 0; //! Returns the length of a list or 0 if ```x``` is not a list +function in(list, x) = !!len([for(v = list) if(v == x) true]); //! Returns true if `x` is an element in the `list` +function Len(x) = is_list(x) ? len(x) : 0; //! Returns the length of a list or 0 if `x` is not a list function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs), 5)); //! Replicates the OpenSCAD logic to calculate the number of sides from the radius function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes function limit(x, min, max) = max(min(x, max), min); //! Force x in range min <= x <= max @@ -52,14 +52,14 @@ function slice(list, start = 0, end = undef) = let( //! Slice a list or string w ) is_string(list) ? slice_str(list, start, end) : [for(i = [start : 1 : end - 1]) list[i]]; -module render_if(render = true, convexity = 2) //! Renders an object if ```render``` is true, otherwise leaves it unrendered +module render_if(render = true, convexity = 2) //! Renders an object if `render` is true, otherwise leaves it unrendered if (render) render(convexity = convexity) children(); else children(); -module extrude_if(h, center = true) //! Extrudes 2D object to 3D when ```h``` is nonzero, otherwise leaves it 2D +module extrude_if(h, center = true) //! Extrudes 2D object to 3D when `h` is nonzero, otherwise leaves it 2D if(h) linear_extrude(h, center = center, convexity = 2) // 3D children(); @@ -81,7 +81,7 @@ module semi_circle(r, d = undef) //! A semi circle in the pos square([2 * sq, sq]); } -module right_triangle(width, height, h, center = true) //! A right angled triangle with the 90° corner at the origin. 3D when ```h``` is nonzero, otherwise 2D +module right_triangle(width, height, h, center = true) //! A right angled triangle with the 90° corner at the origin. 3D when `h` is nonzero, otherwise 2D extrude_if(h, center = center) polygon(points = [[0,0], [width, 0], [0, height]]); diff --git a/utils/core/rounded_rectangle.scad b/utils/core/rounded_rectangle.scad index 295c4ab..ea7a231 100644 --- a/utils/core/rounded_rectangle.scad +++ b/utils/core/rounded_rectangle.scad @@ -20,29 +20,28 @@ // //! Rectangle with rounded corners. // -module rounded_square(size, r, center = true) //! Like ```square()``` but with with rounded corners +module rounded_square(size, r, center = true) //! Like `square()` but with with rounded corners { $fn = r2sides4n(r); offset(r) offset(-r) square(size, center = center); } -module rounded_rectangle(size, r, center = true, xy_center = true) //! Like ```cube()``` but corners rounded in XY plane and separate centre options for xy and z. +module rounded_rectangle(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. { linear_extrude(size.z, center = center) rounded_square([size.x, size.y], r, xy_center); } -module rounded_rectangle_xz(size, r, center = true, xy_center = true) //! Like ```cube()``` but corners rounded in XZ plane and separate centre options for xy and z. +module rounded_rectangle_xz(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z. { translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, center ? 0 : size.z / 2]) rotate([90, 0, 0]) rounded_rectangle([size.x, size.z, size.y], r, center = true, xy_center = true); } -module rounded_rectangle_yz(size, r, center = true, xy_center = true) //! Like ```cube()``` but corners rounded in YX plane and separate centre options for xy and z. +module rounded_rectangle_yz(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in YX plane and separate centre options for xy and z. { translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, center ? 0 : size.z / 2]) rotate([90, 0, 90]) rounded_rectangle([size.y, size.z, size.x], r, center = true, xy_center = true); } - diff --git a/utils/core/sphere.scad b/utils/core/sphere.scad index 31459c4..c9a9aaa 100644 --- a/utils/core/sphere.scad +++ b/utils/core/sphere.scad @@ -20,7 +20,7 @@ //! Redefines `sphere()` to always have a vertex on all six half axes I.e. vertices at the poles and the equator and `$fn` a multiple of four. //! This ensures `hull` and `minkowski` results have the correct dimensions when spheres are placed at the corners. -module sphere(r = 1, d = undef) { //! Override ```sphere``` so that has vertices on all three axes. Has the advantage of giving correct dimensions when hulled +module sphere(r = 1, d = undef) { //! Override `sphere` so that has vertices on all three axes. Has the advantage of giving correct dimensions when hulled R = is_undef(d) ? r : d / 2; rotate_extrude($fn = r2sides4n(R)) rotate(-90) diff --git a/utils/core/teardrops.scad b/utils/core/teardrops.scad index fec15ea..4403003 100644 --- a/utils/core/teardrops.scad +++ b/utils/core/teardrops.scad @@ -24,7 +24,7 @@ //! Using teardrop_plus() or setting the plus option on other modules will elongate the teardrop vertically by the layer height, so when sliced the staircase tips //! do not intrude into the circle. See // -module teardrop(h, r, center = true, truncate = true, chamfer = 0, plus = false) { //! For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging +module teardrop(h, r, center = true, truncate = true, chamfer = 0, plus = false) { //! For making horizontal holes that don't need support material, set `truncate = false` to make traditional RepRap teardrops that don't even need bridging module teardrop_2d(r, truncate) { er = layer_height / 2 - eps; // Extrustion edge radius R = plus ? r + er : r; // Corrected radius diff --git a/utils/gears.scad b/utils/gears.scad index c3e3328..19f153a 100644 --- a/utils/gears.scad +++ b/utils/gears.scad @@ -24,17 +24,17 @@ //! //! and //! -//! ```involute_gear_profile()``` returns a polygon that can have the bore and spokes, etc, subtracted from it before linear extruding it to 3D. -//! Helical gears can be made using ```twist``` and bevel gears using ```scale``` parameters of ```linear_extrude()```. +//! `involute_gear_profile()` returns a polygon that can have the bore and spokes, etc, subtracted from it before linear extruding it to 3D. +//! Helical gears can be made using `twist` and bevel gears using `scale` parameters of `linear_extrude()`. //! //! Gears with less than 19 teeth (when pressure angle is 20) are profile shifted to avoid undercutting the tooth root. 7 teeth is considered //! the practical minimum. //! -//! The clearance between tip and root defaults to module / 6, but can be overridden by setting the ```clearance``` parameter. +//! The clearance between tip and root defaults to module / 6, but can be overridden by setting the `clearance` parameter. //! //! The origin of the rack is the left end of the pitch line and its width is below the pitch line. I.e. it does not include the addendum. //! -//! ```involute_worm_profile()``` returns a tooth profile that can be passed to ```thread()``` to make worms. +//! `involute_worm_profile()` returns a tooth profile that can be passed to `thread()` to make worms. // include use diff --git a/utils/hanging_hole.scad b/utils/hanging_hole.scad index 564b9e8..f51a3d9 100644 --- a/utils/hanging_hole.scad +++ b/utils/hanging_hole.scad @@ -22,7 +22,7 @@ // include <../utils/core/core.scad> -module hanging_hole(z, ir, h = 100, h2 = 100) { //! Hole radius ```ir``` hanging at the specified ```z``` value above a void who's shape is given by a 2D child +module hanging_hole(z, ir, h = 100, h2 = 100) { //! Hole radius `ir` hanging at the specified `z` value above a void who's shape is given by a 2D child module polyhole(r, h, n = 8) { if(h > 0) rotate(180 / n) { diff --git a/utils/horiholes.scad b/utils/horiholes.scad index 394d869..0c066e3 100644 --- a/utils/horiholes.scad +++ b/utils/horiholes.scad @@ -20,7 +20,7 @@ // //! Utilities for depicting the staircase slicing of horizontal holes made with [`teardrop_plus()`](#teardrops), see //! -//! ```horicylinder()``` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted. +//! `horicylinder()` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted. // include <../utils/core/core.scad> diff --git a/utils/layout.scad b/utils/layout.scad index ffdb979..949e5d4 100644 --- a/utils/layout.scad +++ b/utils/layout.scad @@ -22,11 +22,11 @@ // include <../global_defs.scad> -function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the ```i```th item +function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the `i`th item i == 0 ? widths[0] / 2 : layout_offset(widths, i - 1, gap) + widths[i - 1] / 2 + gap + widths[i] / 2; -module layout(widths, gap = 2, no_offset = false) //! Layout children passing ```$i``` +module layout(widths, gap = 2, no_offset = false) //! Layout children passing `$i` translate([no_offset ? -widths[0] / 2 : 0, 0]) for($i = [0 : 1 : len(widths) - 1]) translate([layout_offset(widths, $i, gap), 0]) diff --git a/utils/maths.scad b/utils/maths.scad index 883e753..9683e50 100644 --- a/utils/maths.scad +++ b/utils/maths.scad @@ -33,7 +33,7 @@ function argcosh(x) = ln(x + sqrt(sqr(x) - 1)); //! inverse hyperbolic cosine function argtanh(x) = ln((1 + x) / (1 - x)) / 2;//! inverse hyperbolic tangent function argcoth(x) = ln((x + 1) / (x - 1)) / 2;//! inverse hyperbolic cotangent -function translate(v) = let(u = is_list(v) ? len(v) == 2 ? [v.x, v.y, 0] //! Generate a 4x4 translation matrix, ```v``` can be ```[x, y]```, ```[x, y, z]``` or ```z``` +function translate(v) = let(u = is_list(v) ? len(v) == 2 ? [v.x, v.y, 0] //! Generate a 4x4 translation matrix, `v` can be `[x, y]`, `[x, y, z]` or `z` : v : [0, 0, v]) [ [1, 0, 0, u.x], @@ -41,7 +41,7 @@ function translate(v) = let(u = is_list(v) ? len(v) == 2 ? [v.x, v.y, 0] //! Gen [0, 0, 1, u.z], [0, 0, 0, 1] ]; -function rotate(a, v) = //! Generate a 4x4 rotation matrix, ```a``` can be a vector of three angles or a single angle around ```z```, or around axis ```v``` +function rotate(a, v) = //! Generate a 4x4 rotation matrix, `a` can be a vector of three angles or a single angle around `z`, or around axis `v` is_undef(v) ? let(av = is_list(a) ? a : [0, 0, a], cx = cos(av[0]), cy = cos(av[1]), @@ -80,7 +80,7 @@ function rot2_z(a) = //! Generate a 2x2 matrix to rotate around z [ [ c, -s], [ s, c] ]; -function scale(v) = let(s = is_list(v) ? v : [v, v, v]) //! Generate a 4x4 matrix that scales by ```v```, which can be a vector of xyz factors or a scalar to scale all axes equally +function scale(v) = let(s = is_list(v) ? v : [v, v, v]) //! Generate a 4x4 matrix that scales by `v`, which can be a vector of xyz factors or a scalar to scale all axes equally [ [s.x, 0, 0, 0], [0, s.y, 0, 0], @@ -88,11 +88,11 @@ function scale(v) = let(s = is_list(v) ? v : [v, v, v]) //! Generate a 4x4 matr [0, 0, 0, 1] ]; -function vec3(v) = [v.x, v.y, v.z]; //! Return a 3 vector with the first three elements of ```v``` -function vec4(v) = [v.x, v.y, v.z, 1]; //! Return a 4 vector with the first three elements of ```v``` +function vec3(v) = [v.x, v.y, v.z]; //! Return a 3 vector with the first three elements of `v` +function vec4(v) = [v.x, v.y, v.z, 1]; //! Return a 4 vector with the first three elements of `v` function transform(v, m) = vec3(m * [v.x, v.y, v.z, 1]); //! Apply 4x4 transform to a 3 vector by extending it and cropping it again function transform_points(path, m) = [for(p = path) transform(p, m)]; //! Apply transform to a path -function unit(v) = let(n = norm(v)) n ? v / n : v; //! Convert ```v``` to a unit vector +function unit(v) = let(n = norm(v)) n ? v / n : v; //! Convert `v` to a unit vector function transpose(m) = [ for(j = [0 : len(m[0]) - 1]) [ for(i = [0 : len(m) - 1]) m[i][j] ] ]; //! Transpose an arbitrary size matrix diff --git a/utils/offset.scad b/utils/offset.scad index 755f11c..8c13d3f 100644 --- a/utils/offset.scad +++ b/utils/offset.scad @@ -24,7 +24,7 @@ //! If `chamfer_base` is true then the bottom edge is made suitable for 3D printing by chamfering when the angle gets shallower than 45 degrees. include <../utils/core/core.scad> -module offset_3D(r, chamfer_base = false) { //! Offset 3D shape by specified radius ```r```, positive or negative. +module offset_3D(r, chamfer_base = false) { //! Offset 3D shape by specified radius `r`, positive or negative. module ball(r) if(chamfer_base) rotate_extrude() diff --git a/utils/quadrant.scad b/utils/quadrant.scad index 8242044..2c334b3 100644 --- a/utils/quadrant.scad +++ b/utils/quadrant.scad @@ -22,7 +22,7 @@ // include <../utils/core/core.scad> -module quadrant(w, r, center = false) { //! Draw a square with one rounded corner, can be centered on the arc centre, when ```center``` is ```true```. +module quadrant(w, r, center = false) { //! Draw a square with one rounded corner, can be centered on the arc centre, when `center` is `true`. h = is_list(w) ? w.y : w; w = is_list(w) ? w.x : w; offset_w = center ? r - w : 0; diff --git a/utils/rounded_cylinder.scad b/utils/rounded_cylinder.scad index 680f47e..da1346e 100644 --- a/utils/rounded_cylinder.scad +++ b/utils/rounded_cylinder.scad @@ -40,7 +40,7 @@ module rounded_corner(r, h, r2, ir = 0) { //! 2D version } } -module rounded_cylinder(r, h, r2, ir = 0, angle = 360) //! Rounded cylinder given radius ```r```, height ```h```, optional internal radius ```ir``` and optional ```angle``` +module rounded_cylinder(r, h, r2, ir = 0, angle = 360) //! Rounded cylinder given radius `r`, height `h`, optional internal radius `ir` and optional `angle` { rotate_extrude(angle = angle) rounded_corner(r, h, r2, ir); diff --git a/utils/rounded_polygon.scad b/utils/rounded_polygon.scad index f69742b..8b4db06 100644 --- a/utils/rounded_polygon.scad +++ b/utils/rounded_polygon.scad @@ -48,7 +48,7 @@ function rounded_polygon_tangents(points) = //! Compute the straight sections ne function sumv(v, i = 0, sum = 0) = i == len(v) ? sum : sumv(v, i + 1, sum + v[i]); // the cross product of 2D vectors is the area of the parallelogram between them. We use the sign of this to decide if the angle is bigger than 180. -function rounded_polygon_length(points, tangents) = //! Calculate the length given the point list and the list of tangents computed by ``` rounded_polygon_tangents``` +function rounded_polygon_length(points, tangents) = //! Calculate the length given the point list and the list of tangents computed by ` rounded_polygon_tangents` let( len = len(points), indices = [0 : len - 1], diff --git a/utils/sector.scad b/utils/sector.scad index 3c9b88a..09b8848 100644 --- a/utils/sector.scad +++ b/utils/sector.scad @@ -22,7 +22,7 @@ // include <../utils/core/core.scad> -module sector(r, start_angle, end_angle) { //! Create specified sector given radius ```r```, ```start_angle``` and ```end_angle``` +module sector(r, start_angle, end_angle) { //! Create specified sector given radius `r`, `start_angle` and `end_angle` R = r * sqrt(2) + 1; if(end_angle > start_angle) diff --git a/utils/sweep.scad b/utils/sweep.scad index 8f84c3a..fcb96ad 100644 --- a/utils/sweep.scad +++ b/utils/sweep.scad @@ -172,10 +172,10 @@ function arc_points(r, a = [90, 0, 180], al = 90) = //! Generate the points of a let(sides = ceil(r2sides(r) * al / 360), tf = rotate(a)) [for(i = [0 : sides]) let(t = i * al / sides) transform([r * sin(t), r * cos(t), 0], tf)]; -function before(path1, path2) = //! Translate ```path1``` so its end meets the start of ```path2``` and then concatenate +function before(path1, path2) = //! Translate `path1` so its end meets the start of `path2` and then concatenate let(end = len(path1) - 1, offset = path2[0] - path1[end]) concat([for(i = [0 : end - 1]) path1[i] + offset], path2); -function after(path1, path2) = //! Translate ```path2``` so its start meets the end of ```path1``` and then concatenate +function after(path1, path2) = //! Translate `path2` so its start meets the end of `path1` and then concatenate let(end1 = len(path1) - 1, end2 = len(path2) - 1, offset = path1[end1] - path2[0]) concat(path1, [for(i = [1 : end2]) path2[i] + offset]); diff --git a/utils/thread.scad b/utils/thread.scad index 35e153c..4c42cb7 100644 --- a/utils/thread.scad +++ b/utils/thread.scad @@ -20,7 +20,7 @@ // //! Utilities for making threads with sweep. They can be used to model screws, nuts, studding, leadscrews, etc, and also to make printed threads. //! -//! The ends can be tapered, flat or chamfered by setting the ```top``` and ```bot``` parameters to -1 for tapered, 0 for a flat cut and positive to +//! The ends can be tapered, flat or chamfered by setting the `top` and `bot` parameters to -1 for tapered, 0 for a flat cut and positive to //! specify a chamfer angle. //! //! Threads are by default solid, so the male version is wrapped around a cylinder and the female inside a tube. This can be suppressed to just get the helix, for @@ -32,8 +32,8 @@ //! a cylinder. To get around this a colour can be passed to thread that is used to colour the cylinder and then toned down to colour the helix. //! //! Making the ends requires a CGAL intersection, which make threads relatively slow. For this reason they are generally disabled when using the GUI but can -//! be enabled by setting ```$show_threads``` to ```true```. When the tests are run, by default, threads are enabled only for things that feature them like screws. -//! This behaviour can be changed by setting a ```NOPSCADLIB_SHOW_THREADS``` environment variable to ```false``` to disable all threads and ```true``` to enable all threads. +//! be enabled by setting `$show_threads` to `true`. When the tests are run, by default, threads are enabled only for things that feature them like screws. +//! This behaviour can be changed by setting a `NOPSCADLIB_SHOW_THREADS` environment variable to `false` to disable all threads and `true` to enable all threads. //! The same variable also affects the generation of assembly diagrams. //! //! Threads obey the $fn, $fa, $fs variables. diff --git a/utils/tube.scad b/utils/tube.scad index 012a2e0..98417a9 100644 --- a/utils/tube.scad +++ b/utils/tube.scad @@ -28,11 +28,11 @@ module ring(or, ir) //! Create a ring with specified external and internal radii circle4n(ir); } -module tube(or, ir, h, center = true) //! Create a tube with specified external and internal radii and height ```h``` +module tube(or, ir, h, center = true) //! Create a tube with specified external and internal radii and height `h` linear_extrude(h, center = center, convexity = 5) ring(or, ir); -module woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2, weft) {//! Create a woven tube with specified external and internal radii, height ```h```, colours, warp and weft +module woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2, weft) {//! Create a woven tube with specified external and internal radii, height `h`, colours, warp and weft colour2 = colour2 ? colour2 : colour * 0.8; weft = weft ? weft : warp; warp_count = max(floor(PI * or / warp), 0.5); @@ -68,4 +68,3 @@ module woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2, } } } - diff --git a/vitamins/axial.scad b/vitamins/axial.scad index bb3e325..43c7b6b 100644 --- a/vitamins/axial.scad +++ b/vitamins/axial.scad @@ -74,7 +74,7 @@ module orientate_axial(length, height, pitch, wire_d) { // Orient horizontal or } } -module ax_res(type, value, tol = 5, pitch = 0) { //! Through hole axial resistor. If ```pitch``` is zero the minimum is used. If below the minimum the resistor is placed vertical. +module ax_res(type, value, tol = 5, pitch = 0) { //! Through hole axial resistor. If `pitch` is zero the minimum is used. If below the minimum the resistor is placed vertical. vitamin(str("ax_res(", type[0], ", ", value, arg(tol, 5, "tol"), "): Resistor ", value, " Ohms ", tol, "% ",ax_res_wattage(type), "W")); wire_d = ax_res_wire(type); diff --git a/vitamins/belt.scad b/vitamins/belt.scad index d996bb1..90a9f67 100644 --- a/vitamins/belt.scad +++ b/vitamins/belt.scad @@ -24,7 +24,7 @@ //! To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius. //! //! By default the path is a closed loop but a gap length and position can be specified to make open loops. -//! To draw the gap its XY position is specified by ```gap_pos```. ```gap_pos.z``` can be used to specify a rotation if the gap is not at the bottom of the loop. +//! To draw the gap its XY position is specified by `gap_pos`. `gap_pos.z` can be used to specify a rotation if the gap is not at the bottom of the loop. //! //! Individual teeth are not drawn, instead they are represented by a lighter colour. // diff --git a/vitamins/component.scad b/vitamins/component.scad index b5372d9..876e9f9 100644 --- a/vitamins/component.scad +++ b/vitamins/component.scad @@ -209,7 +209,7 @@ module al_clad_resistor_assembly(type, value, sleeved = true) { //* Draw alumini function TO220_thickness() = 1.5; //! Thickness of the tab of a TO220 -module TO220(description, leads = 3, lead_length = 16) { //! Draw a TO220 package, use ```description``` to describe what it is +module TO220(description, leads = 3, lead_length = 16) { //! Draw a TO220 package, use `description` to describe what it is width = 10.2; inset = 1.5; hole = 3.3; diff --git a/vitamins/fan.scad b/vitamins/fan.scad index 0d4e901..a8fa237 100644 --- a/vitamins/fan.scad +++ b/vitamins/fan.scad @@ -122,7 +122,7 @@ module fan_hole_positions(type, z = undef) { //! Position children at the screw children(); } -module fan_holes(type, poly = false, screws = true, h = 100) { //! Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. +module fan_holes(type, poly = false, screws = true, h = 100) { //! Make all the holes for the fan, or just the aperture if `screws` is false. Set `poly` true for poly_holes. hole_pitch = fan_hole_pitch(type); screw = fan_screw(type); diff --git a/vitamins/insert.scad b/vitamins/insert.scad index 492b67e..593bf87 100644 --- a/vitamins/insert.scad +++ b/vitamins/insert.scad @@ -89,7 +89,7 @@ module insert(type) { //! Draw specified insert } } -module insert_hole(type, counterbore = 0, horizontal = false) { //! Make a hole to take an insert, ```counterbore``` is the extra length for the screw +module insert_hole(type, counterbore = 0, horizontal = false) { //! Make a hole to take an insert, `counterbore` is the extra length for the screw h = insert_hole_length(type); render(convexity = 2) diff --git a/vitamins/light_strip.scad b/vitamins/light_strip.scad index 2021f8e..6b2086d 100644 --- a/vitamins/light_strip.scad +++ b/vitamins/light_strip.scad @@ -21,7 +21,7 @@ //! LED strip lights that can be cut to size. //! //! The definitions are for the full length but they can be cut to size by specifying how many segments, -//! which can by calcuated using ```light_strip_segments(type, max_length)```. +//! which can by calcuated using `light_strip_segments(type, max_length)`. //! //! The `light_strip_clip()` module makes a clip to go around the light that can be incorporated into a printed bracket to hold it. // diff --git a/vitamins/microview.scad b/vitamins/microview.scad index bb1c294..124fea6 100644 --- a/vitamins/microview.scad +++ b/vitamins/microview.scad @@ -20,7 +20,7 @@ // //! Microview OLED display with on board AVR by geekammo / Sparkfun. //! -//! ```microview()``` generates the model. ```microview(true)``` makes an object to cut out a panel aperture for it. +//! `microview()` generates the model. `microview(true)` makes an object to cut out a panel aperture for it. //! //! Uses STL files copyright geekammo and licenced with MIT license, see [microview/LICENSE.txt](vitamins/microview/LICENSE.txt). // diff --git a/vitamins/o_ring.scad b/vitamins/o_ring.scad index c02606a..d5eb9b7 100644 --- a/vitamins/o_ring.scad +++ b/vitamins/o_ring.scad @@ -20,12 +20,12 @@ // //! Nitrile rubber O-rings. //! -//! Just a black torus specified by internal diameter, ```id``` and ```minor_d``` plus a BOM entry. -//! Can be shown stretched by specifying the ```actual_id```. +//! Just a black torus specified by internal diameter, `id` and `minor_d` plus a BOM entry. +//! Can be shown stretched by specifying the `actual_id`. // include <../utils/core/core.scad> -module O_ring(id, minor_d, actual_id = 0) { //! Draw O-ring with specified internal diameter and minor diameter. ```actual_id``` can be used to stretch it around something. +module O_ring(id, minor_d, actual_id = 0) { //! Draw O-ring with specified internal diameter and minor diameter. `actual_id` can be used to stretch it around something. vitamin(str("O_ring(", id, ", ", minor_d, "): O-ring nitrile ", id, "mm x ", minor_d, "mm")); D = actual_id > id ? actual_id : id; // allow it to be stretched diff --git a/vitamins/rail.scad b/vitamins/rail.scad index d09049e..07c7d6b 100644 --- a/vitamins/rail.scad +++ b/vitamins/rail.scad @@ -47,7 +47,7 @@ function carriage_pitch_y(type) = type[6]; //! Screw hole y pitch function carriage_screw(type) = type[7]; //! Carriage screw type function carriage_screw_depth(type) = 2 * screw_radius(carriage_screw(type)); //! Carriage thread depth -function rail_holes(type, length) = //! Number of holes in a rail given its ```length``` +function rail_holes(type, length) = //! Number of holes in a rail given its `length` floor((length - 2 * rail_end(type)) / rail_pitch(type)) + 1; module rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true) { //! Position children over screw holes diff --git a/vitamins/screw.scad b/vitamins/screw.scad index 990538b..1d34934 100644 --- a/vitamins/screw.scad +++ b/vitamins/screw.scad @@ -20,7 +20,7 @@ // //! Machine screws and wood screws with various head styles. //! -//! For an explanation of ```screw_polysink()``` see . +//! For an explanation of `screw_polysink()` see . // include <../utils/core/core.scad> diff --git a/vitamins/scs_bearing_block.scad b/vitamins/scs_bearing_block.scad index ee17e91..8b1593c 100644 --- a/vitamins/scs_bearing_block.scad +++ b/vitamins/scs_bearing_block.scad @@ -63,7 +63,7 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block bearing = scs_bearing(type); clip = scs_circlip(type); - module right_trapezoid(base, top, height, h = 0, center = true) {//! A right angled trapezoid with the 90° corner at the origin. 3D when ```h``` is nonzero, otherwise 2D + module right_trapezoid(base, top, height, h = 0, center = true) {//! A right angled trapezoid with the 90° corner at the origin. 3D when `h` is nonzero, otherwise 2D extrude_if(h, center = center) polygon(points = [ [0,0], [base, 0], [top, height], [0, height] ]); } diff --git a/vitamins/smd.scad b/vitamins/smd.scad index fcb71a5..3cfd334 100644 --- a/vitamins/smd.scad +++ b/vitamins/smd.scad @@ -36,7 +36,7 @@ function smd_100th(x) = //! Convert dimension to 1/100" notation function smd_size(size) = //! Convert size to 1/100" notation str(smd_100th(size.x), smd_100th(size.y)); -module smd_led(type, colour, cutout) { //! Draw an SMD LED with specified ```colour``` +module smd_led(type, colour, cutout) { //! Draw an SMD LED with specified `colour` size = smd_led_size(type); vitamin(str("smd_led(", type[0], ", ", colour, "): SMD LED ", smd_size(size), " ", colour)); diff --git a/vitamins/wire.scad b/vitamins/wire.scad index ebac9fa..65294a8 100644 --- a/vitamins/wire.scad +++ b/vitamins/wire.scad @@ -68,7 +68,7 @@ module cable_tie_holes(cable_r, h = 100) { //! Holes to thread a ziptie through drill(r, 0); } -module cable_tie(cable_r, thickness) { //! A ziptie threaded around cable radius ```cable_r``` and through a panel with specified ```thickness```. +module cable_tie(cable_r, thickness) { //! A ziptie threaded around cable radius `cable_r` and through a panel with specified `thickness`. translate_z(cable_r) rotate([-90, 0, 90]) ziptie(small_ziptie, cable_r, thickness); diff --git a/vitamins/ziptie.scad b/vitamins/ziptie.scad index 9d9cc69..3f5a77b 100644 --- a/vitamins/ziptie.scad +++ b/vitamins/ziptie.scad @@ -30,7 +30,7 @@ function ziptie_latch(type) = type[3]; //! Latch dimensions function ziptie_colour(type) = type[4]; //! Colour function ziptie_tail(type) = type[5]; //! The length without teeth -module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius ```r``` and optionally through panel thickness ```t``` +module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius `r` and optionally through panel thickness `t` { latch = ziptie_latch(type); lx = latch.x / 2;