mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 00:09:41 +00:00
add structs.scad to std.scad; fix various it's typos in docs
This commit is contained in:
parent
c3ca921f28
commit
3aff85aedc
7 changed files with 11 additions and 8 deletions
|
@ -35,6 +35,7 @@ PrioritizeFiles:
|
||||||
skin.scad
|
skin.scad
|
||||||
vnf.scad
|
vnf.scad
|
||||||
beziers.scad
|
beziers.scad
|
||||||
|
nurbs.scad
|
||||||
rounding.scad
|
rounding.scad
|
||||||
turtle3d.scad
|
turtle3d.scad
|
||||||
math.scad
|
math.scad
|
||||||
|
|
|
@ -50,8 +50,8 @@ module ball_bearing(trade_size, id, od, width, shield=true, flange=false, fd, fw
|
||||||
ball_bearing_info(trade_size);
|
ball_bearing_info(trade_size);
|
||||||
check = assert(all_defined(select(info, 0,4)), "Bad Input");
|
check = assert(all_defined(select(info, 0,4)), "Bad Input");
|
||||||
if(flange){
|
if(flange){
|
||||||
assert(!is_undef(fd), "If flange is set you must specify it's diameter");
|
assert(!is_undef(fd), "If flange is set you must specify its diameter");
|
||||||
assert(!is_undef(fw), "If flange is set you must specify it's width");
|
assert(!is_undef(fw), "If flange is set you must specify its width");
|
||||||
}
|
}
|
||||||
id = info[0];
|
id = info[0];
|
||||||
od = info[1];
|
od = info[1];
|
||||||
|
|
|
@ -465,7 +465,7 @@ function _inherit_gear_thickness(thickness,dflt=10) =
|
||||||
// It is possible to design the worm to follow the curved shape of its mated gear, resulting
|
// It is possible to design the worm to follow the curved shape of its mated gear, resulting
|
||||||
// in an enveloping (also called "globoid") worm. This type of worm makes better contact with
|
// in an enveloping (also called "globoid") worm. This type of worm makes better contact with
|
||||||
// the worm gear, but is less often used due to manufacturing complexity and consequent expense.
|
// the worm gear, but is less often used due to manufacturing complexity and consequent expense.
|
||||||
// Figure(3D,Big,NoAxes,VPT=[0,0,0],VPR=[192,0,180],VPD=172.84): A cylindrical worm appears on the left in green. Note it's straight sides. The enveloping (globoid) worm gears appears on the right in green. Note that its sides curve so several teeth can mate with the worm gear, and it requires a complex tooth form
|
// Figure(3D,Big,NoAxes,VPT=[0,0,0],VPR=[192,0,180],VPD=172.84): A cylindrical worm appears on the left in green. Note its straight sides. The enveloping (globoid) worm gears appears on the right in green. Note that its sides curve so several teeth can mate with the worm gear, and it requires a complex tooth form
|
||||||
// tilt=20;
|
// tilt=20;
|
||||||
// starts=1;
|
// starts=1;
|
||||||
// ps=0;
|
// ps=0;
|
||||||
|
|
|
@ -1249,7 +1249,7 @@ function _stroke_end(width,left, right, spec) =
|
||||||
function _path_line_intersection(path, line, ind=0) =
|
function _path_line_intersection(path, line, ind=0) =
|
||||||
ind==len(path)-1 ? undef :
|
ind==len(path)-1 ? undef :
|
||||||
let(intersect=line_intersection(line, select(path,ind,ind+1),LINE,SEGMENT))
|
let(intersect=line_intersection(line, select(path,ind,ind+1),LINE,SEGMENT))
|
||||||
// If it intersects the segment excluding it's final point, then we're done
|
// If it intersects the segment excluding its final point, then we're done
|
||||||
// The final point is treated as part of the next segment
|
// The final point is treated as part of the next segment
|
||||||
is_def(intersect) && intersect != path[ind+1]?
|
is_def(intersect) && intersect != path[ind+1]?
|
||||||
[intersect, ind+1] :
|
[intersect, ind+1] :
|
||||||
|
@ -2210,10 +2210,11 @@ module rounded_prism(bottom, top, joint_bot=0, joint_top=0, joint_sides=0, k_bot
|
||||||
dummy1 = assert(in_list(atype, ["intersect","hull","surf_intersect","surf_hull","prismoid"]),
|
dummy1 = assert(in_list(atype, ["intersect","hull","surf_intersect","surf_hull","prismoid"]),
|
||||||
"Anchor type must be one of: \"hull\", \"intersect\", \"surf_hull\", \"surf_intersect\" or \"prismoid\"")
|
"Anchor type must be one of: \"hull\", \"intersect\", \"surf_hull\", \"surf_intersect\" or \"prismoid\"")
|
||||||
assert(atype!="prismoid" || len(bottom)==4, "Anchor type \"prismoid\" requires that len(bottom)=4");
|
assert(atype!="prismoid" || len(bottom)==4, "Anchor type \"prismoid\" requires that len(bottom)=4");
|
||||||
|
|
||||||
result = rounded_prism(bottom=bottom, top=top, joint_bot=joint_bot, joint_top=joint_top, joint_sides=joint_sides,
|
result = rounded_prism(bottom=bottom, top=top, joint_bot=joint_bot, joint_top=joint_top, joint_sides=joint_sides,
|
||||||
k_bot=k_bot, k_top=k_top, k_sides=k_sides, k=k, splinesteps=splinesteps, h=h, length=length, height=height, l=l,
|
k_bot=k_bot, k_top=k_top, k_sides=k_sides, k=k, splinesteps=splinesteps, h=h, length=length, height=height, l=l,
|
||||||
debug=debug, _full_info=true);
|
debug=debug, _full_info=true);
|
||||||
|
height = one_defined([l,h,height,length], "l,h,height,length", dflt=u_add(bottom_height,top_height));
|
||||||
top = is_undef(top) ? path3d(bottom,height/2) :
|
top = is_undef(top) ? path3d(bottom,height/2) :
|
||||||
len(top[0])==2 ? path3d(top,height/2) :
|
len(top[0])==2 ? path3d(top,height/2) :
|
||||||
top;
|
top;
|
||||||
|
@ -2792,7 +2793,7 @@ Access to the derivative smoothing parameter?
|
||||||
// prism axis with the auxiliary object. Note that this means that if `aux_T` is a rotation it will change the joiner prism root, because
|
// prism axis with the auxiliary object. Note that this means that if `aux_T` is a rotation it will change the joiner prism root, because
|
||||||
// the rotated prism axis will intersect the base in a different location. If you do not give an auxiliary object then you must give
|
// the rotated prism axis will intersect the base in a different location. If you do not give an auxiliary object then you must give
|
||||||
// the length/height parameter to specify the prism length. This gives the length of the prism measured from the root to the end point.
|
// the length/height parameter to specify the prism length. This gives the length of the prism measured from the root to the end point.
|
||||||
// Note that the joint with a curved base may significantly extend the length of the joiner prism: it's total length will often be larger than
|
// Note that the joint with a curved base may significantly extend the length of the joiner prism: its total length will often be larger than
|
||||||
// the length you request.
|
// the length you request.
|
||||||
// .
|
// .
|
||||||
// For the cylinder and spherical objects you may wish to joint a prism to the concave surface. You can do this by setting a negative
|
// For the cylinder and spherical objects you may wish to joint a prism to the concave surface. You can do this by setting a negative
|
||||||
|
|
1
std.scad
1
std.scad
|
@ -37,6 +37,7 @@ include <skin.scad>
|
||||||
include <vnf.scad>
|
include <vnf.scad>
|
||||||
include <utility.scad>
|
include <utility.scad>
|
||||||
include <partitions.scad>
|
include <partitions.scad>
|
||||||
|
include <structs.scad>
|
||||||
|
|
||||||
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
// by key.
|
// by key.
|
||||||
// Includes:
|
// Includes:
|
||||||
// include <BOSL2/std.scad>
|
// include <BOSL2/std.scad>
|
||||||
// include <BOSL2/structs.scad>
|
|
||||||
// FileGroup: Data Management
|
// FileGroup: Data Management
|
||||||
// FileSummary: Structure/Dictionary Manipulation
|
// FileSummary: Structure/Dictionary Manipulation
|
||||||
|
// FileFootnotes: STD=Included in std.scad
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,7 @@ function _turtle3d_command_len(commands, index) =
|
||||||
in_list(commands[index],["repeat","arctodir","arcrot"]) ? 3 : // Repeat, arctodir and arcrot commands require 2 args
|
in_list(commands[index],["repeat","arctodir","arcrot"]) ? 3 : // Repeat, arctodir and arcrot commands require 2 args
|
||||||
// For these, the first arg is required, second arg is present if it is not a string or list
|
// For these, the first arg is required, second arg is present if it is not a string or list
|
||||||
in_list(commands[index], one_or_two_arg) && len(commands)>index+2 && !is_string(commands[index+2]) && !is_list(commands[index+2]) ? 3 :
|
in_list(commands[index], one_or_two_arg) && len(commands)>index+2 && !is_string(commands[index+2]) && !is_list(commands[index+2]) ? 3 :
|
||||||
is_string(commands[index+1]) || is_list(commands[index])? 1 : // If 2nd item is a string it's must be a new command;
|
is_string(commands[index+1]) || is_list(commands[index])? 1 : // If 2nd item is a string it must be a new command;
|
||||||
// If first item is a list it's a compound command
|
// If first item is a list it's a compound command
|
||||||
2; // Otherwise we have command and arg
|
2; // Otherwise we have command and arg
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue