update samples

This commit is contained in:
Kurt Hutten Irev-Dev
2024-09-09 13:23:34 +10:00
parent 59284ffa50
commit 57a460f57a
14 changed files with 60 additions and 47 deletions

View File

@ -1,3 +1,3 @@
const cylinder = startSketchOn('XY')
|> circle([0,0], 22, %)
|> circle({ center: [0, 0], radius: 22 }, %)
|> extrude(14, %)

View File

@ -61,8 +61,8 @@ const case = startSketchOn('XY')
fn m25Screw = (x, y, height) => {
const screw = startSketchOn("XY")
|> startProfileAt([0, 0], %)
|> circle([x, y], 2.5, %)
|> hole(circle([x, y], 1.25, %), %)
|> circle({ center: [x, y], radius: 2.5 }, %)
|> hole(circle({ center: [x, y], radius: 1.25 }, %), %)
|> extrude(height, %)
return screw
}

View File

@ -1,6 +1,7 @@
// 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
// define constants in mm
const radius = 6.0
const width = 144.0
@ -79,10 +80,13 @@ const tabsR = startSketchOn(tabPlane)
|> line([0, -tabLength / 3 * 2], %, $edge12)
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|> close(%, $edge14)
|> hole(circle([
width / 2 + thk + tabWidth / 2,
length / 2 + thk - (tabLength / (3 / 2))
], holeDiam / 2, %), %)
|> hole(circle({
center: [
width / 2 + thk + tabWidth / 2,
length / 2 + thk - (tabLength / (3 / 2))
],
radius: holeDiam / 2
}, %), %)
|> extrude(-tabThk, %)
|> fillet({
radius: holeDiam / 2,
@ -104,10 +108,13 @@ const tabsL = startSketchOn(tabPlane)
|> line([0, -tabLength / 3 * 2], %, $edge22)
|> line([tabWidth, -tabLength / 3], %, $edge23)
|> close(%, $edge24)
|> hole(circle([
-width / 2 - thk - (tabWidth / 2),
length / 2 + thk - (tabLength / (3 / 2))
], holeDiam / 2, %), %)
|> hole(circle({
center: [
-width / 2 - thk - (tabWidth / 2),
length / 2 + thk - (tabLength / (3 / 2))
],
radius: holeDiam / 2
}, %), %)
|> extrude(-tabThk, %)
|> fillet({
radius: holeDiam / 2,

View File

@ -80,10 +80,13 @@ const tabsR = startSketchOn(tabPlane)
|> line([0, -tabLength / 3 * 2], %, $edge12)
|> line([-tabWidth, -tabLength / 3], %, $edge13)
|> close(%, $edge14)
|> hole(circle([
width / 2 + thk + tabWidth / 2,
length / 2 + thk - (tabLength / (3 / 2))
], holeDiam / 2, %), %)
|> hole(circle({
center: [
width / 2 + thk + tabWidth / 2,
length / 2 + thk - (tabLength / (3 / 2))
],
radius: holeDiam / 2
}, %), %)
|> extrude(-tabThk, %)
|> fillet({
radius: holeDiam / 2,
@ -105,10 +108,13 @@ const tabsL = startSketchOn(tabPlane)
|> line([0, -tabLength / 3 * 2], %, $edge22)
|> line([tabWidth, -tabLength / 3], %, $edge23)
|> close(%, $edge24)
|> hole(circle([
-width / 2 - thk - (tabWidth / 2),
length / 2 + thk - (tabLength / (3 / 2))
], holeDiam / 2, %), %)
|> hole(circle({
center: [
-width / 2 - thk - (tabWidth / 2),
length / 2 + thk - (tabLength / (3 / 2))
],
radius: holeDiam / 2
}, %), %)
|> extrude(-tabThk, %)
|> fillet({
radius: holeDiam / 2,

View File

@ -1,4 +1,4 @@
const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> circle({ center: [5, 5], radius: 10 }, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0, ccw: true}, %)

View File

@ -1,4 +1,4 @@
const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> circle({ center: [5, 5], radius: 10 }, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0}, %)

View File

@ -1,4 +1,4 @@
const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> circle({ center: [5, 5], radius: 10 }, %)
|> extrude(-10, %)
|> helix({revolutions: 16, angle_start: 0}, %)

View File

@ -1,4 +1,4 @@
const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> circle({ center: [5, 5], radius: 10 }, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0, length: 3}, %)

View File

@ -39,10 +39,10 @@ const shellExtrude = startSketchOn(s, "start")
|> extrude(-(height - t), %)
const peg = startSketchOn(s, "end")
|> circle([
|> circle({ center: [
-(total_width / 2 - wSegments),
-(total_length / 2 - lSegments)
], bumpDiam / 2, %)
], radius: bumpDiam / 2 }, %)
|> patternLinear2d({
axis: [1, 0],
repetitions: 5,

View File

@ -14,7 +14,7 @@ fn transform = (replicaId) => {
// Each layer is just a pretty thin cylinder with a fillet.
fn layer = () => {
return startSketchOn("XY") // or some other plane idk
|> circle([0, 0], 1, %, $tag1)
|> circle({ center: [0, 0], radius: 1 }, %, $tag1)
|> extrude(h, %)
// |> fillet({
// radius: h / 2.01,

View File

@ -30,22 +30,22 @@ fn caster = (originStart) => {
|> xLine(-3.543, %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
|> hole(circle([
|> hole(circle({ center: [
(3.543 - 2.756) / 2,
(3.543 - 2.756) / 2
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4}, %), %)
|> hole(circle({ center: [
(3.543 - 2.756) / 2 + 2.756,
(3.543 - 2.756) / 2
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4 }, %), %)
|> hole(circle({ center: [
(3.543 - 2.756) / 2,
(3.543 - 2.756) / 2 + 2.756
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4 }, %), %)
|> hole(circle({ center: [
(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, %)
const sketch002c = startSketchOn(sketch001c, 'START')
@ -71,7 +71,7 @@ fn caster = (originStart) => {
}
}
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)
return examplec
}

View File

@ -28,22 +28,22 @@ fn caster = (originStart) => {
|> xLine(-3.543, %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
|> hole(circle([
|> hole(circle({ center: [
(3.543 - 2.756) / 2,
(3.543 - 2.756) / 2
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4 }, %), %)
|> hole(circle({ center: [
(3.543 - 2.756) / 2 + 2.756,
(3.543 - 2.756) / 2
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4 }, %), %)
|> hole(circle({ center: [
(3.543 - 2.756) / 2,
(3.543 - 2.756) / 2 + 2.756
], 8.8 / 2 / 25.4, %), %)
|> hole(circle([
], radius: 8.8 / 2 / 25.4 }, %), %)
|> hole(circle({ center: [
(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, %)
const sketch002c = startSketchOn(sketch001c, 'START')
@ -69,7 +69,7 @@ fn caster = (originStart) => {
}
}
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)
return examplec
}

View File

@ -12,5 +12,5 @@ const part001 = cube([0,0], 20)
|> extrude(20, %)
const part002 = startSketchOn(part001, "end")
|> circle([0, 0], 5, %, $myCircle)
|> circle({ center: [0, 0], radisu: 5 }, %, $myCircle)
|> extrude(5, %)

View File

@ -62,10 +62,10 @@ fn tr = (i) => {
// Create the pegs on the top of the base
const totalBumps = (wbumps * lbumps)-1
const peg = startSketchOn(s, 'end')
|> circle([
|> circle({ center: [
-(pitch*(wbumps-1)/2),
-(pitch*(lbumps-1)/2)
], bumpDiam / 2, %)
], radius: bumpDiam / 2 }, %)
|> patternLinear2d({
axis: [1, 0],
repetitions: wbumps-1,