Fixes for docs generation.

This commit is contained in:
Revar Desmera 2019-04-23 13:02:52 -07:00
parent 5a16152416
commit 7115dcaeed
3 changed files with 13 additions and 3 deletions

View file

@ -193,6 +193,8 @@ function standard_anchors() = [
// s = Length of the arrows. // s = Length of the arrows.
// color = Color of the arrow. // color = Color of the arrow.
// flag = If true, draw the orientation flag on the arrowhead. // flag = If true, draw the orientation flag on the arrowhead.
// Example:
// anchor_arrow(s=20);
module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tags="anchor-arrow") { module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tags="anchor-arrow") {
$fn=12; $fn=12;
recolor("gray") spheroid(d=s/6) recolor("gray") spheroid(d=s/6)
@ -213,7 +215,7 @@ module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tags="anchor-arrow"
// Description: // Description:
// Makes the children transparent gray, while showing any // Makes the children transparent gray, while showing any
// anchor arrows that may exist. // anchor arrows that may exist.
// Example: // Example(FlatSpin):
// transparent() cube(50, center=true) show_anchors(); // transparent() cube(50, center=true) show_anchors();
module transparent(opacity=0.2) { module transparent(opacity=0.2) {
show("anchor-arrow") children() show_anchors(); show("anchor-arrow") children() show_anchors();
@ -224,6 +226,12 @@ module transparent(opacity=0.2) {
// Module: show_anchors() // Module: show_anchors()
// Description: // Description:
// Show all standard anchors for the parent object. // Show all standard anchors for the parent object.
// Arguments:
// s = Length of anchor arrows.
// std = If true (default), show standard anchors.
// custom = If true (default), show custom anchors.
// Example(FlatSpin):
// cube(50, center=true) show_anchors();
module show_anchors(s=10, std=true, custom=true) { module show_anchors(s=10, std=true, custom=true) {
if (std) { if (std) {
for (anchor=standard_anchors()) { for (anchor=standard_anchors()) {
@ -257,6 +265,8 @@ module show_anchors(s=10, std=true, custom=true) {
// Displays X,Y,Z axis arrows in red, green, and blue respectively. // Displays X,Y,Z axis arrows in red, green, and blue respectively.
// Arguments: // Arguments:
// s = Length of the arrows. // s = Length of the arrows.
// Examples:
// frame_ref(25);
module frame_ref(s=15) { module frame_ref(s=15) {
noop() { noop() {
attach(RIGHT) anchor_arrow(s=s, color="red", flag=false); attach(RIGHT) anchor_arrow(s=s, color="red", flag=false);

View file

@ -98,7 +98,7 @@ class ImageProcessing(object):
scriptfile = "tmp_{0}.scad".format(imgfile.replace(".", "_")) scriptfile = "tmp_{0}.scad".format(imgfile.replace(".", "_"))
stdlibs = ["constants.scad", "math.scad", "transforms.scad", "shapes.scad", "debug.scad"] stdlibs = ["std.scad", "debug.scad"]
script = "" script = ""
for lib in stdlibs: for lib in stdlibs:
script += "include <BOSL2/%s>\n" % lib script += "include <BOSL2/%s>\n" % lib

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
PREVIEW_LIBS="constants compat transforms shapes masks paths beziers math metric_screws threading involute_gears sliders joiners linear_bearings nema_steppers wiring triangulation quaternions phillips_drive torx_drive debug" PREVIEW_LIBS="constants compat attachments math arrays vectors matrices coords geometry triangulation quaternions convex_hull transforms primitives shapes masks paths beziers metric_screws threading involute_gears sliders joiners linear_bearings nema_steppers wiring phillips_drive torx_drive debug"
dir="$(basename $PWD)" dir="$(basename $PWD)"
if [ "$dir" = "BOSL2" ]; then if [ "$dir" = "BOSL2" ]; then