update samples
This commit is contained in:
@ -1,3 +1,3 @@
|
|||||||
const cylinder = startSketchOn('XY')
|
const cylinder = startSketchOn('XY')
|
||||||
|> circle([0,0], 22, %)
|
|> circle({ center: [0, 0], radius: 22 }, %)
|
||||||
|> extrude(14, %)
|
|> extrude(14, %)
|
||||||
|
|||||||
@ -61,8 +61,8 @@ const case = startSketchOn('XY')
|
|||||||
fn m25Screw = (x, y, height) => {
|
fn m25Screw = (x, y, height) => {
|
||||||
const screw = startSketchOn("XY")
|
const screw = startSketchOn("XY")
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> circle([x, y], 2.5, %)
|
|> circle({ center: [x, y], radius: 2.5 }, %)
|
||||||
|> hole(circle([x, y], 1.25, %), %)
|
|> hole(circle({ center: [x, y], radius: 1.25 }, %), %)
|
||||||
|> extrude(height, %)
|
|> extrude(height, %)
|
||||||
return screw
|
return screw
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// A mounting bracket for the Focusrite Scarlett Solo audio interface
|
// A mounting bracket for the Focusrite Scarlett Solo audio interface
|
||||||
// This is a bracket that holds an audio device underneath a desk or shelf. The audio device has dimensions of 144mm wide, 80mm length and 45mm depth with fillets of 6mm. This mounting bracket is designed to be 3D printed with PLA material
|
// This is a bracket that holds an audio device underneath a desk or shelf. The audio device has dimensions of 144mm wide, 80mm length and 45mm depth with fillets of 6mm. This mounting bracket is designed to be 3D printed with PLA material
|
||||||
|
|
||||||
|
|
||||||
// define constants in mm
|
// define constants in mm
|
||||||
const radius = 6.0
|
const radius = 6.0
|
||||||
const width = 144.0
|
const width = 144.0
|
||||||
@ -79,10 +80,13 @@ const tabsR = startSketchOn(tabPlane)
|
|||||||
|> line([0, -tabLength / 3 * 2], %, $edge12)
|
|> line([0, -tabLength / 3 * 2], %, $edge12)
|
||||||
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|
||||||
|> close(%, $edge14)
|
|> close(%, $edge14)
|
||||||
|> hole(circle([
|
|> hole(circle({
|
||||||
|
center: [
|
||||||
width / 2 + thk + tabWidth / 2,
|
width / 2 + thk + tabWidth / 2,
|
||||||
length / 2 + thk - (tabLength / (3 / 2))
|
length / 2 + thk - (tabLength / (3 / 2))
|
||||||
], holeDiam / 2, %), %)
|
],
|
||||||
|
radius: holeDiam / 2
|
||||||
|
}, %), %)
|
||||||
|> extrude(-tabThk, %)
|
|> extrude(-tabThk, %)
|
||||||
|> fillet({
|
|> fillet({
|
||||||
radius: holeDiam / 2,
|
radius: holeDiam / 2,
|
||||||
@ -104,10 +108,13 @@ const tabsL = startSketchOn(tabPlane)
|
|||||||
|> line([0, -tabLength / 3 * 2], %, $edge22)
|
|> line([0, -tabLength / 3 * 2], %, $edge22)
|
||||||
|> line([tabWidth, -tabLength / 3], %, $edge23)
|
|> line([tabWidth, -tabLength / 3], %, $edge23)
|
||||||
|> close(%, $edge24)
|
|> close(%, $edge24)
|
||||||
|> hole(circle([
|
|> hole(circle({
|
||||||
|
center: [
|
||||||
-width / 2 - thk - (tabWidth / 2),
|
-width / 2 - thk - (tabWidth / 2),
|
||||||
length / 2 + thk - (tabLength / (3 / 2))
|
length / 2 + thk - (tabLength / (3 / 2))
|
||||||
], holeDiam / 2, %), %)
|
],
|
||||||
|
radius: holeDiam / 2
|
||||||
|
}, %), %)
|
||||||
|> extrude(-tabThk, %)
|
|> extrude(-tabThk, %)
|
||||||
|> fillet({
|
|> fillet({
|
||||||
radius: holeDiam / 2,
|
radius: holeDiam / 2,
|
||||||
|
|||||||
@ -80,10 +80,13 @@ const tabsR = startSketchOn(tabPlane)
|
|||||||
|> line([0, -tabLength / 3 * 2], %, $edge12)
|
|> line([0, -tabLength / 3 * 2], %, $edge12)
|
||||||
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|
||||||
|> close(%, $edge14)
|
|> close(%, $edge14)
|
||||||
|> hole(circle([
|
|> hole(circle({
|
||||||
|
center: [
|
||||||
width / 2 + thk + tabWidth / 2,
|
width / 2 + thk + tabWidth / 2,
|
||||||
length / 2 + thk - (tabLength / (3 / 2))
|
length / 2 + thk - (tabLength / (3 / 2))
|
||||||
], holeDiam / 2, %), %)
|
],
|
||||||
|
radius: holeDiam / 2
|
||||||
|
}, %), %)
|
||||||
|> extrude(-tabThk, %)
|
|> extrude(-tabThk, %)
|
||||||
|> fillet({
|
|> fillet({
|
||||||
radius: holeDiam / 2,
|
radius: holeDiam / 2,
|
||||||
@ -105,10 +108,13 @@ const tabsL = startSketchOn(tabPlane)
|
|||||||
|> line([0, -tabLength / 3 * 2], %, $edge22)
|
|> line([0, -tabLength / 3 * 2], %, $edge22)
|
||||||
|> line([tabWidth, -tabLength / 3], %, $edge23)
|
|> line([tabWidth, -tabLength / 3], %, $edge23)
|
||||||
|> close(%, $edge24)
|
|> close(%, $edge24)
|
||||||
|> hole(circle([
|
|> hole(circle({
|
||||||
|
center: [
|
||||||
-width / 2 - thk - (tabWidth / 2),
|
-width / 2 - thk - (tabWidth / 2),
|
||||||
length / 2 + thk - (tabLength / (3 / 2))
|
length / 2 + thk - (tabLength / (3 / 2))
|
||||||
], holeDiam / 2, %), %)
|
],
|
||||||
|
radius: holeDiam / 2
|
||||||
|
}, %), %)
|
||||||
|> extrude(-tabThk, %)
|
|> extrude(-tabThk, %)
|
||||||
|> fillet({
|
|> fillet({
|
||||||
radius: holeDiam / 2,
|
radius: holeDiam / 2,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const part001 = startSketchOn('XY')
|
const part001 = startSketchOn('XY')
|
||||||
|> circle([5, 5], 10, %)
|
|> circle({ center: [5, 5], radius: 10 }, %)
|
||||||
|> extrude(10, %)
|
|> extrude(10, %)
|
||||||
|> helix({revolutions: 16, angle_start: 0, ccw: true}, %)
|
|> helix({revolutions: 16, angle_start: 0, ccw: true}, %)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const part001 = startSketchOn('XY')
|
const part001 = startSketchOn('XY')
|
||||||
|> circle([5, 5], 10, %)
|
|> circle({ center: [5, 5], radius: 10 }, %)
|
||||||
|> extrude(10, %)
|
|> extrude(10, %)
|
||||||
|> helix({revolutions: 16, angle_start: 0}, %)
|
|> helix({revolutions: 16, angle_start: 0}, %)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const part001 = startSketchOn('XY')
|
const part001 = startSketchOn('XY')
|
||||||
|> circle([5, 5], 10, %)
|
|> circle({ center: [5, 5], radius: 10 }, %)
|
||||||
|> extrude(-10, %)
|
|> extrude(-10, %)
|
||||||
|> helix({revolutions: 16, angle_start: 0}, %)
|
|> helix({revolutions: 16, angle_start: 0}, %)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const part001 = startSketchOn('XY')
|
const part001 = startSketchOn('XY')
|
||||||
|> circle([5, 5], 10, %)
|
|> circle({ center: [5, 5], radius: 10 }, %)
|
||||||
|> extrude(10, %)
|
|> extrude(10, %)
|
||||||
|> helix({revolutions: 16, angle_start: 0, length: 3}, %)
|
|> helix({revolutions: 16, angle_start: 0, length: 3}, %)
|
||||||
|
|||||||
@ -39,10 +39,10 @@ const shellExtrude = startSketchOn(s, "start")
|
|||||||
|> extrude(-(height - t), %)
|
|> extrude(-(height - t), %)
|
||||||
|
|
||||||
const peg = startSketchOn(s, "end")
|
const peg = startSketchOn(s, "end")
|
||||||
|> circle([
|
|> circle({ center: [
|
||||||
-(total_width / 2 - wSegments),
|
-(total_width / 2 - wSegments),
|
||||||
-(total_length / 2 - lSegments)
|
-(total_length / 2 - lSegments)
|
||||||
], bumpDiam / 2, %)
|
], radius: bumpDiam / 2 }, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d({
|
||||||
axis: [1, 0],
|
axis: [1, 0],
|
||||||
repetitions: 5,
|
repetitions: 5,
|
||||||
|
|||||||
@ -14,7 +14,7 @@ fn transform = (replicaId) => {
|
|||||||
// Each layer is just a pretty thin cylinder with a fillet.
|
// Each layer is just a pretty thin cylinder with a fillet.
|
||||||
fn layer = () => {
|
fn layer = () => {
|
||||||
return startSketchOn("XY") // or some other plane idk
|
return startSketchOn("XY") // or some other plane idk
|
||||||
|> circle([0, 0], 1, %, $tag1)
|
|> circle({ center: [0, 0], radius: 1 }, %, $tag1)
|
||||||
|> extrude(h, %)
|
|> extrude(h, %)
|
||||||
// |> fillet({
|
// |> fillet({
|
||||||
// radius: h / 2.01,
|
// radius: h / 2.01,
|
||||||
|
|||||||
@ -30,22 +30,22 @@ fn caster = (originStart) => {
|
|||||||
|> xLine(-3.543, %)
|
|> xLine(-3.543, %)
|
||||||
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2,
|
(3.543 - 2.756) / 2,
|
||||||
(3.543 - 2.756) / 2
|
(3.543 - 2.756) / 2
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4}, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2 + 2.756,
|
(3.543 - 2.756) / 2 + 2.756,
|
||||||
(3.543 - 2.756) / 2
|
(3.543 - 2.756) / 2
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2,
|
(3.543 - 2.756) / 2,
|
||||||
(3.543 - 2.756) / 2 + 2.756
|
(3.543 - 2.756) / 2 + 2.756
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2 + 2.756,
|
(3.543 - 2.756) / 2 + 2.756,
|
||||||
(3.543 - 2.756) / 2 + 2.756
|
(3.543 - 2.756) / 2 + 2.756
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> extrude(-.25, %)
|
|> extrude(-.25, %)
|
||||||
|
|
||||||
const sketch002c = startSketchOn(sketch001c, 'START')
|
const sketch002c = startSketchOn(sketch001c, 'START')
|
||||||
@ -71,7 +71,7 @@ fn caster = (originStart) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const sketch003c = startSketchOn(plane002c)
|
const sketch003c = startSketchOn(plane002c)
|
||||||
|> circle([0, 1.2], 2.48 / 2, %)
|
|> circle({ center: [0, 1.2], radius 2.48 / 2 }, %)
|
||||||
const examplec = extrude(-1 - (3 / 16), sketch003c)
|
const examplec = extrude(-1 - (3 / 16), sketch003c)
|
||||||
return examplec
|
return examplec
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,22 +28,22 @@ fn caster = (originStart) => {
|
|||||||
|> xLine(-3.543, %)
|
|> xLine(-3.543, %)
|
||||||
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2,
|
(3.543 - 2.756) / 2,
|
||||||
(3.543 - 2.756) / 2
|
(3.543 - 2.756) / 2
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2 + 2.756,
|
(3.543 - 2.756) / 2 + 2.756,
|
||||||
(3.543 - 2.756) / 2
|
(3.543 - 2.756) / 2
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2,
|
(3.543 - 2.756) / 2,
|
||||||
(3.543 - 2.756) / 2 + 2.756
|
(3.543 - 2.756) / 2 + 2.756
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> hole(circle([
|
|> hole(circle({ center: [
|
||||||
(3.543 - 2.756) / 2 + 2.756,
|
(3.543 - 2.756) / 2 + 2.756,
|
||||||
(3.543 - 2.756) / 2 + 2.756
|
(3.543 - 2.756) / 2 + 2.756
|
||||||
], 8.8 / 2 / 25.4, %), %)
|
], radius: 8.8 / 2 / 25.4 }, %), %)
|
||||||
|> extrude(-.25, %)
|
|> extrude(-.25, %)
|
||||||
|
|
||||||
const sketch002c = startSketchOn(sketch001c, 'START')
|
const sketch002c = startSketchOn(sketch001c, 'START')
|
||||||
@ -69,7 +69,7 @@ fn caster = (originStart) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const sketch003c = startSketchOn(plane002c)
|
const sketch003c = startSketchOn(plane002c)
|
||||||
|> circle([0, 1.2], 2.48 / 2, %)
|
|> circle({ center: [0, 1.2], radisu: 2.48 / 2 }, %)
|
||||||
const examplec = extrude(-1 - (3 / 16), sketch003c)
|
const examplec = extrude(-1 - (3 / 16), sketch003c)
|
||||||
return examplec
|
return examplec
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,5 +12,5 @@ const part001 = cube([0,0], 20)
|
|||||||
|> extrude(20, %)
|
|> extrude(20, %)
|
||||||
|
|
||||||
const part002 = startSketchOn(part001, "end")
|
const part002 = startSketchOn(part001, "end")
|
||||||
|> circle([0, 0], 5, %, $myCircle)
|
|> circle({ center: [0, 0], radisu: 5 }, %, $myCircle)
|
||||||
|> extrude(5, %)
|
|> extrude(5, %)
|
||||||
|
|||||||
@ -62,10 +62,10 @@ fn tr = (i) => {
|
|||||||
// Create the pegs on the top of the base
|
// Create the pegs on the top of the base
|
||||||
const totalBumps = (wbumps * lbumps)-1
|
const totalBumps = (wbumps * lbumps)-1
|
||||||
const peg = startSketchOn(s, 'end')
|
const peg = startSketchOn(s, 'end')
|
||||||
|> circle([
|
|> circle({ center: [
|
||||||
-(pitch*(wbumps-1)/2),
|
-(pitch*(wbumps-1)/2),
|
||||||
-(pitch*(lbumps-1)/2)
|
-(pitch*(lbumps-1)/2)
|
||||||
], bumpDiam / 2, %)
|
], radius: bumpDiam / 2 }, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d({
|
||||||
axis: [1, 0],
|
axis: [1, 0],
|
||||||
repetitions: wbumps-1,
|
repetitions: wbumps-1,
|
||||||
|
|||||||
Reference in New Issue
Block a user