mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-02 15:52:47 +02:00
Renamed exterior fillets to rounding
This commit is contained in:
14
wiring.scad
14
wiring.scad
@@ -95,20 +95,20 @@ function hex_offsets(n, d, lev=0, arr=[]) =
|
||||
// Module: wiring()
|
||||
// Description:
|
||||
// Returns a 3D object representing a bundle of wires that follow a given path,
|
||||
// with the corners filleted to a given radius. There are 17 base wire colors.
|
||||
// with the corners rounded to a given radius. There are 17 base wire colors.
|
||||
// If you have more than 17 wires, colors will get re-used.
|
||||
// Usage:
|
||||
// wiring(path, wires, [wirediam], [fillet], [wirenum], [bezsteps]);
|
||||
// wiring(path, wires, [wirediam], [rounding], [wirenum], [bezsteps]);
|
||||
// Arguments:
|
||||
// path = The 3D polyline path that the wire bundle should follow.
|
||||
// wires = The number of wires in the wiring bundle.
|
||||
// wirediam = The diameter of each wire in the bundle.
|
||||
// fillet = The radius that the path corners will be filleted to.
|
||||
// rounding = The radius that the path corners will be rounded to.
|
||||
// wirenum = The first wire's offset into the color table.
|
||||
// bezsteps = The corner fillets in the path will be converted into this number of segments.
|
||||
// bezsteps = The corner roundings in the path will be converted into this number of segments.
|
||||
// Example:
|
||||
// wiring([[50,0,-50], [50,50,-50], [0,50,-50], [0,0,-50], [0,0,0]], fillet=10, wires=13);
|
||||
module wiring(path, wires, wirediam=2, fillet=10, wirenum=0, bezsteps=12) {
|
||||
// wiring([[50,0,-50], [50,50,-50], [0,50,-50], [0,0,-50], [0,0,0]], rounding=10, wires=13);
|
||||
module wiring(path, wires, wirediam=2, rounding=10, wirenum=0, bezsteps=12) {
|
||||
colors = [
|
||||
[0.2, 0.2, 0.2], [1.0, 0.2, 0.2], [0.0, 0.8, 0.0], [1.0, 1.0, 0.2],
|
||||
[0.3, 0.3, 1.0], [1.0, 1.0, 1.0], [0.7, 0.5, 0.0], [0.5, 0.5, 0.5],
|
||||
@@ -117,7 +117,7 @@ module wiring(path, wires, wirediam=2, fillet=10, wirenum=0, bezsteps=12) {
|
||||
[0.6, 0.6, 1.0],
|
||||
];
|
||||
offsets = hex_offsets(wires, wirediam);
|
||||
bezpath = fillet_path(path, fillet);
|
||||
bezpath = fillet_path(path, rounding);
|
||||
poly = simplify3d_path(path3d(bezier_polyline(bezpath, bezsteps)));
|
||||
n = max(segs(wirediam), 8);
|
||||
r = wirediam/2;
|
||||
|
Reference in New Issue
Block a user