mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-12-28 02:58:29 +00:00
Dependency Warning Updates
This commit is contained in:
parent
7c6b1da237
commit
e4bf4e85fd
9 changed files with 35 additions and 3 deletions
|
|
@ -5,6 +5,10 @@
|
|||
// include <BOSL2/std.scad>
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_AFFINE = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: affine.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
|
||||
// Section: Affine2d 3x3 Transformation Matrices
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
// FileFootnotes: STD=Included in std.scad
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_ATTACHMENTS = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: attachments.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
// Default values for attachment code.
|
||||
$tags=undef; // for backward compatibility
|
||||
$tag = "";
|
||||
|
|
@ -3452,7 +3456,7 @@ function _find_anchor(anchor, geom)=
|
|||
vec2 = anch==CENTER? UP : rot(from=UP, to=axis, p=vec),
|
||||
// Set spin for top/bottom to be clockwise
|
||||
spin = anch.z!=0 && (!approx(anch.x,0) || !approx(anch.y,0)) ? _compute_spin(vec2,rot(from=UP,to=axis,p=point3d(tangent)*anch.z))
|
||||
: anch.z==0 && norm(anch)>EPSILON ? _compute_spin(vec2, (approx(vec2,DOWN) || approx(vec2,UP))?BACK:UP)
|
||||
: anch.z==0 && norm(anch)>_EPSILON ? _compute_spin(vec2, (approx(vec2,DOWN) || approx(vec2,UP))?BACK:UP)
|
||||
: oang
|
||||
) [anchor, pos2, vec2, spin]
|
||||
) : type == "point"? (
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
// FileSummary: Models for standard ball bearing cartridges.
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_BALL_BEARINGS = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: ball_bearings.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
// Section: Ball Bearing Models
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@
|
|||
// FileFootnotes: STD=Included in std.scad
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_BEZIERS = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: beziers.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
|
||||
// Terminology:
|
||||
// Path = A series of points joined by straight line segements.
|
||||
// Bezier Curve = A polynomial curve defined by a list of control points. The curve starts at the first control point and ends at the last one. The other control points define the shape of the curve and they are often *NOT* on the curve
|
||||
|
|
@ -1376,8 +1381,8 @@ function bezier_vnf_degenerate_patch(patch, splinesteps=16, reverse=false, retur
|
|||
assert(is_bezier_patch(patch), "\nInput is not a Bezier patch.")
|
||||
assert(is_int(splinesteps) && splinesteps>0, "\nsplinesteps must be a positive integer.")
|
||||
let(
|
||||
row_degen = [for(row=patch) all_equal(row,eps=EPSILON)],
|
||||
col_degen = [for(col=transpose(patch)) all_equal(col,eps=EPSILON)],
|
||||
row_degen = [for(row=patch) all_equal(row,eps=_EPSILON)],
|
||||
col_degen = [for(col=transpose(patch)) all_equal(col,eps=_EPSILON)],
|
||||
top_degen = row_degen[0],
|
||||
bot_degen = last(row_degen),
|
||||
left_degen = col_degen[0],
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
_BOSL2_BOSL1COMPAT = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: bosl2compat.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
module translate_copies(a=[[0,0,0]]) move_copies(a) children();
|
||||
|
||||
module xspread(spacing, n, l, sp) xcopies(spacing=spacing, n=n, l=l, sp=sp) children();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
_BOSL2_BOTTLECAPS = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: bottlecaps.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
|
||||
include <threading.scad>
|
||||
include <structs.scad>
|
||||
include <rounding.scad>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
/// use <BOSL2/builtins.scad>
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_BUILTINS = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: builtins.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
/// Section: Builtin Functions
|
||||
|
||||
/// Section: Builtin Modules
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
// FileFootnotes: STD=Included in std.scad
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
_BOSL2_COLOR = is_undef(_BOSL2_STD) && (is_undef(BOSL2_NO_STD_WARNING) || !BOSL2_NO_STD_WARNING) ?
|
||||
echo("Warning: color.scad included without std.scad; dependencies may be missing\nSet BOSL2_NO_STD_WARNING = true to mute this warning.") true : true;
|
||||
|
||||
|
||||
use <builtins.scad>
|
||||
|
||||
|
|
|
|||
1
std.scad
1
std.scad
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
assert(version_num()>=20190500, "BOSL2 requires OpenSCAD version 2019.05 or later.");
|
||||
|
||||
_BOSL2_STD = true;
|
||||
|
||||
include <version.scad>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue