From 57e375ee9f2906cf606a28b4b8c281b5f2da10fa Mon Sep 17 00:00:00 2001 From: jgomez720 <114548659+jgomez720@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:13:06 -0700 Subject: [PATCH] Update repetitions to instances --- ball-bearing/ball-bearing.kcl | 24 +++---- bracket/bracket.kcl | 12 ++-- brake-caliper/brake-caliper.kcl | 16 ++--- car-wheel-assembly/car-wheel-assembly.kcl | 72 +++++++++---------- car-wheel/car-wheel.kcl | 6 +- flange-with-patterns/flange-with-patterns.kcl | 24 +++---- .../focusrite-scarlett-mounting-bracket.kcl | 4 +- french-press/french-press.kcl | 8 +-- gear-rack/gear-rack.kcl | 12 ++-- gear/gear.kcl | 6 +- hex-nut/hex-nut.kcl | 6 +- lego/lego.kcl | 8 +-- lug-nut/lug-nut.kcl | 10 +-- multi-axis-robot/multi-axis-robot.kcl | 12 ++-- pipe-flange-assembly/pipe-flange-assembly.kcl | 12 ++-- poopy-shoe/poopy-shoe.kcl | 14 ++-- .../router-template-slate.kcl | 22 +++--- sheet-metal-bracket/sheet-metal-bracket.kcl | 16 ++--- .../socket-head-cap-screw.kcl | 18 ++--- tire/tire.kcl | 14 ++-- wheel-rotor/wheel-rotor.kcl | 16 ++--- 21 files changed, 166 insertions(+), 166 deletions(-) diff --git a/ball-bearing/ball-bearing.kcl b/ball-bearing/ball-bearing.kcl index 2d2a721..87bde44 100644 --- a/ball-bearing/ball-bearing.kcl +++ b/ball-bearing/ball-bearing.kcl @@ -2,16 +2,16 @@ // A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads. // Define constants like ball diameter, inside diamter, overhange length, and thickness -outsideDiameter = 1.625 // inches -sphereDia = 0.25 // inches -shaftDia = 0.75 // inches -overallThickness = 0.313 // inches -wallThickness = 0.100 // inches -overHangLength = .3 // inches +outsideDiameter = 1.625 +sphereDia = 0.25 +shaftDia = 0.75 +overallThickness = 0.313 +wallThickness = 0.100 +overHangLength = .3 nBalls = 10 -chainWidth = sphereDia/2 // inches -chainThickness = sphereDia/8 // inches -linkDiameter = sphereDia/4 // inches +chainWidth = sphereDia/2 +chainThickness = sphereDia/8 +linkDiameter = sphereDia/4 customPlane = { plane: { @@ -54,7 +54,7 @@ balls = revolve({ arcDegrees: 360, axis: [0, 0, 1], center: [0, 0, 0], - repetitions: nBalls-1, + repetitions: nBalls, rotateDuplicates: true }, %) @@ -78,7 +78,7 @@ chainHead = revolve({ arcDegrees: 360, axis: [0, 0, 1], center: [0, 0, 0], - repetitions: nBalls-1, + repetitions: nBalls, rotateDuplicates: true, }, %) @@ -98,7 +98,7 @@ linkRevolve = revolve({ arcDegrees: 360, axis: [0, 0, 1], center: [0, 0, 0], - repetitions: nBalls-1, + repetitions: nBalls, rotateDuplicates: true, }, %) diff --git a/bracket/bracket.kcl b/bracket/bracket.kcl index a8d7e91..babb20e 100644 --- a/bracket/bracket.kcl +++ b/bracket/bracket.kcl @@ -3,17 +3,17 @@ // Define constants sigmaAllow = 35000 // psi (6061-T6 aluminum) -width = 6 // inch +width = 6 p = 300 // Force on shelf - lbs factorOfSafety = 1.2 // FOS of 1.2 -shelfMountL = 5 // inches -wallMountL = 2 // inches +shelfMountL = 5 +wallMountL = 2 shelfDepth = 12 // Shelf is 12 inches in depth from the wall moment = shelfDepth * p // assume the force is applied at the end of the shelf to be conservative (lb-in) -filletRadius = .375 // inches -extFilletRadius = .25 // inches -mountingHoleDiameter = 0.5 // inches +filletRadius = .375 +extFilletRadius = .25 +mountingHoleDiameter = 0.5 // Calculate required thickness of bracket thickness = sqrt(moment * factorOfSafety * 6 / (sigmaAllow * width)) // this is the calculation of two brackets holding up the shelf (inches) diff --git a/brake-caliper/brake-caliper.kcl b/brake-caliper/brake-caliper.kcl index fd06a16..3a109c9 100644 --- a/brake-caliper/brake-caliper.kcl +++ b/brake-caliper/brake-caliper.kcl @@ -2,14 +2,14 @@ // Brake calipers are used to squeeze the brake pads against the rotor, causing larger and larger amounts of friction depending on how hard the brakes are pressed. // Define constants -rotorDiameter = 12 // inches -rotorInnerDiameterThickness = 12.6 // mm -rotorTotalThickness = 25.4 // mm -caliperTolerance = 5 // mm -caliperPadLength = 40 // mm -caliperThickness = 10 // mm -caliperOuterEdgeRadius = 10 // mm -caliperInnerEdgeRadius = 3 // mm +rotorDiameter = 12 +rotorInnerDiameterThickness = 12.6 +rotorTotalThickness = 25.4 +caliperTolerance = 5 +caliperPadLength = 40 +caliperThickness = 10 +caliperOuterEdgeRadius = 10 +caliperInnerEdgeRadius = 3 // Create the plane for the brake caliper. This is so it can match up with the rotor model. brakeCaliperPlane = { diff --git a/car-wheel-assembly/car-wheel-assembly.kcl b/car-wheel-assembly/car-wheel-assembly.kcl index 774bb77..8c6cb2d 100644 --- a/car-wheel-assembly/car-wheel-assembly.kcl +++ b/car-wheel-assembly/car-wheel-assembly.kcl @@ -7,11 +7,11 @@ // Define constants lugCount = 5 -lugSpacing = 114.3 // mm -offset = -35 // mm -backSpacing = 6.38 // inches -wheelWidth = 9.5 // inches -wheelDiameter = 19 // inches +lugSpacing = 114.3 +offset = -35 +backSpacing = 6.38 +wheelWidth = 9.5 +wheelDiameter = 19 // Create the circular pattern for the lug holes @@ -20,7 +20,7 @@ circles = startSketchOn('XZ') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true }, %) @@ -65,7 +65,7 @@ sketch005 = startSketchOn(sketch002, 'END') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true }, %) @@ -162,7 +162,7 @@ sketch009 = extrude(20, sketch007) |> patternCircular3d({ axis: [0, 1, 0], center: [0, -2000, 0], - repetitions: 5, + instances: 6, arcDegrees: 360, rotateDuplicates: true }, %) @@ -171,7 +171,7 @@ sketch0010 = extrude(-20, sketch008) |> patternCircular3d({ axis: [0, 1, 0], center: [0, -2000, 0], - repetitions: 5, + instances: 6, arcDegrees: 360, rotateDuplicates: true }, %) @@ -206,18 +206,18 @@ sketch0011 = startSketchOn('XY') |> revolve({ axis: 'y' }, %) -rotorDiameter = 12 // inches -rotorInnerDiameter = 6 // inches -rotorSinglePlateThickness = 6.3 // mm -rotorInnerDiameterThickness = 12.6 // mm -lugHolePatternDia = 3 // inches -yAxisOffset = 10 // mm -rotorTotalThickness = 25.4 // mm -spacerPatternDiameter = 11 // inches -spacerDiameter = 6.3 // mm +rotorDiameter = 12 +rotorInnerDiameter = 6 +rotorSinglePlateThickness = 6.3 +rotorInnerDiameterThickness = 12.6 +lugHolePatternDia = 3 +yAxisOffset = 10 +rotorTotalThickness = 25.4 +spacerPatternDiameter = 11 +spacerDiameter = 6.3 spacerLength = rotorTotalThickness - 2*rotorSinglePlateThickness spacerCount = 16 -wheeldiameter = 19 // inches +wheeldiameter = 19 rotorPlane = { plane: { @@ -233,7 +233,7 @@ fn lugPattern = (plane) => { |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true, }, %) return lugHolePattern @@ -271,7 +271,7 @@ spacerSketch = startSketchOn(rotorSecondaryPlatePlane) |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: spacerCount, + instances: spacerCount + 1, rotateDuplicates: true, }, %) @@ -282,8 +282,8 @@ spacers = extrude(-spacerLength, spacerSketch) // Define constants -lugDiameter = 24 // mm -lugHeadLength = lugDiameter * .5 // mm +lugDiameter = 24 +lugHeadLength = lugDiameter * .5 lugThreadDiameter = lugDiameter/2 * .85 //mm lugLength = 30 //mm lugThreadDepth = lugLength - 12.7 //mm @@ -329,7 +329,7 @@ lug(customPlane, lugLength, lugDiameter) arcDegrees: 360, axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 4, + instances: 5, rotateDuplicates: false, }, %) @@ -338,13 +338,13 @@ lug(customPlane, lugLength, lugDiameter) // Define constants -tireInnerDiameter = 19 * 25.4 // mm -tireOuterDiameter = 26 * 25.4 // mm -tireDepth = 280 // mm -bendRadius = 40 // mm -tireTreadWidth = 10 // mm -tireTreadDepth = 10 // mm -tireTreadOffset = 80 // mm +tireInnerDiameter = 19 * 25.4 +tireOuterDiameter = 26 * 25.4 +tireDepth = 280 +bendRadius = 40 +tireTreadWidth = 10 +tireTreadDepth = 10 +tireTreadOffset = 80 // Create the sketch of the tire tireSketch = startSketchOn("XY") @@ -376,11 +376,11 @@ tire = revolve({ axis: "Y" }, tireSketch) // Brake calipers are used to squeeze the brake pads against the rotor, causing larger and larger amounts of friction depending on how hard the brakes are pressed. // Define constants -caliperTolerance = 5 // mm -caliperPadLength = 40 // mm -caliperThickness = 10 // mm -caliperOuterEdgeRadius = 10 // mm -caliperInnerEdgeRadius = 3 // mm +caliperTolerance = 5 +caliperPadLength = 40 +caliperThickness = 10 +caliperOuterEdgeRadius = 10 +caliperInnerEdgeRadius = 3 // Create the plane for the brake caliper. This is so it can match up with the rotor model. brakeCaliperPlane = { diff --git a/car-wheel/car-wheel.kcl b/car-wheel/car-wheel.kcl index 616a10a..1ae84dd 100644 --- a/car-wheel/car-wheel.kcl +++ b/car-wheel/car-wheel.kcl @@ -48,7 +48,7 @@ lugClearance = startSketchOn(lugExtrusion, 'END') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true }, %) |> extrude(-wheelWidth / 10, %) @@ -62,7 +62,7 @@ lugHoles = startSketchOn(lugBase, 'END') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true }, %) |> extrude(-wheelWidth / 20, %) @@ -146,7 +146,7 @@ fn spoke = (spokeGap, spokeAngle, spokeThickness) => { |> patternCircular3d({ axis: [0, 1, 0], center: [0, -2000, 0], - repetitions: 5, + instances: 6, arcDegrees: 360, rotateDuplicates: true }, %) diff --git a/flange-with-patterns/flange-with-patterns.kcl b/flange-with-patterns/flange-with-patterns.kcl index c91f869..9cd622c 100644 --- a/flange-with-patterns/flange-with-patterns.kcl +++ b/flange-with-patterns/flange-with-patterns.kcl @@ -2,17 +2,17 @@ // A flange is a flat rim, collar, or rib, typically forged or cast, that is used to strengthen an object, guide it, or attach it to another object. Flanges are known for their use in various applications, including piping, plumbing, and mechanical engineering, among others. // Define constants -mountingHoleDia = .625 // inches -baseDia = 4.625 // inches -pipeDia = 1.25 // inches -thickness = .625 // inches -totalThickness = 0.813 // inches -topTotalDiameter = 2.313 // inches -bottomThickness = 0.06 // inches -bottomTotalDiameter = 2.5 // inches -mountingHolePlacementDiameter = 3.5 // inches -baseThickness = .625 // inches -topTotalThickness = totalThickness - (bottomThickness+baseThickness) // inches +mountingHoleDia = .625 +baseDia = 4.625 +pipeDia = 1.25 +thickness = .625 +totalThickness = 0.813 +topTotalDiameter = 2.313 +bottomThickness = 0.06 +bottomTotalDiameter = 2.5 +mountingHolePlacementDiameter = 3.5 +baseThickness = .625 +topTotalThickness = totalThickness - (bottomThickness+baseThickness) holeLocator = baseDia - 8 nHoles = 4 @@ -25,7 +25,7 @@ circles = startSketchOn('XY') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: nHoles - 1, + instances: nHoles, rotateDuplicates: true }, %) diff --git a/focusrite-scarlett-mounting-bracket/focusrite-scarlett-mounting-bracket.kcl b/focusrite-scarlett-mounting-bracket/focusrite-scarlett-mounting-bracket.kcl index eabb444..e9c24ab 100644 --- a/focusrite-scarlett-mounting-bracket/focusrite-scarlett-mounting-bracket.kcl +++ b/focusrite-scarlett-mounting-bracket/focusrite-scarlett-mounting-bracket.kcl @@ -96,7 +96,7 @@ tabsR = startSketchOn(tabPlane) }, %) |> patternLinear3d({ axis: [0, -1, 0], - repetitions: 1, + instances: 2, distance: length + 2 * thk - (tabLength * 4 / 3) }, %) @@ -123,7 +123,7 @@ tabsL = startSketchOn(tabPlane) }, %) |> patternLinear3d({ axis: [0, -1, 0], - repetitions: 1, + instances: 2, distance: length + 2 * thk - (tabLength * 4 / 3) }, %) diff --git a/french-press/french-press.kcl b/french-press/french-press.kcl index d83ba8d..c07cb19 100644 --- a/french-press/french-press.kcl +++ b/french-press/french-press.kcl @@ -86,7 +86,7 @@ sketch002 = startSketchOn(plane001) |> patternCircular3d({ axis: [0, 0, 1], center: [0, 0, 0], - repetitions: 3, + instances: 4, arcDegrees: 360, rotateDuplicates: true }, %) @@ -112,7 +112,7 @@ sketch004 = startSketchOn(extrude001, 'END') |> close(%) |> patternCircular2d({ center: [0, 0], - repetitions: 2, + instances: 3, arcDegrees: 360, rotateDuplicates: true }, %) @@ -162,7 +162,7 @@ sketch008 = startSketchOn(extrude003, 'END') |> circle({ center: [1.4, 0], radius: .3 }, %) |> patternCircular2d({ center: [0, 0], - repetitions: 7, + instances: 8, arcDegrees: 360, rotateDuplicates: true }, %) @@ -174,7 +174,7 @@ sketch009 = startSketchOn(extrude003, 'END') |> circle({ center: [0.6, 0], radius: .2 }, %) |> patternCircular2d({ center: [0, 0], - repetitions: 3, + instances: 4, arcDegrees: 360, rotateDuplicates: true }, %) diff --git a/gear-rack/gear-rack.kcl b/gear-rack/gear-rack.kcl index 9b2ac34..fb4791d 100644 --- a/gear-rack/gear-rack.kcl +++ b/gear-rack/gear-rack.kcl @@ -2,11 +2,11 @@ // A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate. // Define constants -length = 100 // mm -pitchHeight = 11.5 // mm -width = 5 // mm -height = 12 // mm -minHeight = 10.875 // mm +length = 100 +pitchHeight = 11.5 +width = 5 +height = 12 +minHeight = 10.875 // Create the body of the rack rackBody = startSketchOn('XY') @@ -38,7 +38,7 @@ teeth = tooth() |> patternLinear3d({ axis: [10, 0, 0], distance: 1.570796, - repetitions: 62 + instances: 63 }, %) // Sketch and extrude the first end cap. This is a partial tooth diff --git a/gear/gear.kcl b/gear/gear.kcl index 6cb0066..475631c 100644 --- a/gear/gear.kcl +++ b/gear/gear.kcl @@ -3,9 +3,9 @@ // Define constants -gearRadius = 2 // inches +gearRadius = 2 nTeeth = 8 -width = 2 // inches +width = 2 // Create a function for sketch of a single tooth @@ -59,7 +59,7 @@ teeth = tooth() arcDegrees: 360, axis: [0, 0, 1], center: [0, 0, 0], - repetitions: nTeeth - 1, + : nTeeth, rotateDuplicates: true }, %) diff --git a/hex-nut/hex-nut.kcl b/hex-nut/hex-nut.kcl index c9974ba..4d55eeb 100644 --- a/hex-nut/hex-nut.kcl +++ b/hex-nut/hex-nut.kcl @@ -3,9 +3,9 @@ // Define constants (5/16" - 24 thread size) -wallToWallLength = 0.5 // inches -thickness = 0.266 // inches -diameter = 0.3125 // inches +wallToWallLength = 0.5 +thickness = 0.266 +diameter = 0.3125 // Define a function for the hex nut diff --git a/lego/lego.kcl b/lego/lego.kcl index d355ac9..45422f9 100644 --- a/lego/lego.kcl +++ b/lego/lego.kcl @@ -75,12 +75,12 @@ peg = startSketchOn(s, 'end') }, %) |> patternLinear2d({ axis: [1, 0], - repetitions: wbumps - 1, + instances: wbumps, distance: pitch }, %) |> patternLinear2d({ axis: [0, 1], - repetitions: lbumps - 1, + instances: lbumps, distance: pitch }, %) |> extrude(bumpHeight, %) @@ -96,12 +96,12 @@ tubePattern = startSketchOn(tubeFace) }, %) |> patternLinear2d({ axis: [1, 0], - repetitions: wbumps - 2, + instances: wbumps, distance: pitch }, %) |> patternLinear2d({ axis: [0, 1], - repetitions: lbumps - 2, + instances: lbumps, distance: pitch }, %) |> extrude(-bumpHeight, %) diff --git a/lug-nut/lug-nut.kcl b/lug-nut/lug-nut.kcl index c45f95d..4444dfb 100644 --- a/lug-nut/lug-nut.kcl +++ b/lug-nut/lug-nut.kcl @@ -5,11 +5,11 @@ // Define constants -lugDiameter = 24 // mm -lugHeadLength = lugDiameter * .5 // mm -lugThreadDiameter = lugDiameter/2 * .85 //mm -lugLength = 30 //mm -lugThreadDepth = lugLength - 12.7 //mm +lugDiameter = 24 +lugHeadLength = lugDiameter * .5 +lugThreadDiameter = lugDiameter/2 * .85 +lugLength = 30 +lugThreadDepth = lugLength - 12.7 customPlane = { plane: { diff --git a/multi-axis-robot/multi-axis-robot.kcl b/multi-axis-robot/multi-axis-robot.kcl index cbb085c..e06c3ec 100644 --- a/multi-axis-robot/multi-axis-robot.kcl +++ b/multi-axis-robot/multi-axis-robot.kcl @@ -61,7 +61,7 @@ sketch4A = startSketchOn(extrude001, 'END') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: 3, + instances: 4, rotateDuplicates: true }, %) @@ -78,7 +78,7 @@ sketch4B = startSketchOn(extrude001, 'END') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: 3, + instances: 4, rotateDuplicates: true }, %) @@ -157,7 +157,7 @@ sketch008 = startSketchOn(extrude007, 'END') 1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))), 8 ], - repetitions: 3, + instances: 4, arcDegrees: 360, rotateDuplicates: true }, %) @@ -253,7 +253,7 @@ sketch014 = startSketchOn(extrude012, 'END') |> circle({ center: [-1.75, 6.75], radius: 0.2 }, %) |> patternCircular2d({ center: [-1.75, 8], - repetitions: 7, + instances: 8, arcDegrees: 360, rotateDuplicates: true }, %) @@ -273,7 +273,7 @@ sketch015 = startSketchOn(extrude013, 'END') -1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))), 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) ], - repetitions: 3, + instances: 4, arcDegrees: 360, rotateDuplicates: true }, %) @@ -350,7 +350,7 @@ sketch019 = startSketchOn(extrude018, 'END') 1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)), 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) ], - repetitions: 7, + instances: 8, arcDegrees: 360, rotateDuplicates: true }, %) diff --git a/pipe-flange-assembly/pipe-flange-assembly.kcl b/pipe-flange-assembly/pipe-flange-assembly.kcl index f91af5f..14fe627 100644 --- a/pipe-flange-assembly/pipe-flange-assembly.kcl +++ b/pipe-flange-assembly/pipe-flange-assembly.kcl @@ -159,7 +159,7 @@ mountingHolePattern = startSketchOn('XZ') |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: 6, + instances: 7, rotateDuplicates: true }, %) @@ -213,7 +213,7 @@ washer(workingPlane, [screwStart[2], screwStart[0]], 0.0625, screwDia + tol, 0.6 |> patternCircular3d({ axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 6, + instances: 7, arcDegrees: 360, rotateDuplicates: true }, %) @@ -227,7 +227,7 @@ capScrew([ |> patternCircular3d({ axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 6, + instances: 7, arcDegrees: 360, rotateDuplicates: true }, %) @@ -238,7 +238,7 @@ screwBody = extrude(-screwLength, screwBodySketch) |> patternCircular3d({ axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 6, + instances: 7, arcDegrees: 360, rotateDuplicates: true }, %) @@ -262,7 +262,7 @@ washer(backSideWasherPlane, [screwStart[2], screwStart[0]], 0.0625, screwDia + t |> patternCircular3d({ axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 6, + instances: 8, arcDegrees: 360, rotateDuplicates: true }, %) @@ -276,7 +276,7 @@ hexNut([ |> patternCircular3d({ axis: [0, 1, 0], center: [0, 0, 0], - repetitions: 6, + instances: 7, arcDegrees: 360, rotateDuplicates: true }, %) diff --git a/poopy-shoe/poopy-shoe.kcl b/poopy-shoe/poopy-shoe.kcl index c58d5e8..369f6c2 100644 --- a/poopy-shoe/poopy-shoe.kcl +++ b/poopy-shoe/poopy-shoe.kcl @@ -1,13 +1,13 @@ // Poopy Shoe // poop shute for bambu labs printer - optimized for printing. -wallThickness = 0.125 // inches -wallsWidth = 3 // inches -height = 5.125 // inches -filletRadius = 0.050 // inches -backLength = 6 // inches -exitHeight = 1 // inches -frontLength = 7 // inches +wallThickness = 0.125 +wallsWidth = 3 +height = 5.125 +filletRadius = 0.050 +backLength = 6 +exitHeight = 1 +frontLength = 7 sketch001 = startSketchOn("-YZ") |> startProfileAt([wallsWidth / 2, 0], %) diff --git a/router-template-slate/router-template-slate.kcl b/router-template-slate/router-template-slate.kcl index 63c7932..540c4ba 100644 --- a/router-template-slate/router-template-slate.kcl +++ b/router-template-slate/router-template-slate.kcl @@ -2,17 +2,17 @@ // A guide for routing a slate for a cross bar. // Define constants -routerDiameter = 12.7 // mm -mmInInch = 25.4 // mm -templateDiameter = mmInInch * 11 / 16 // mm -templateGap = ((templateDiameter - routerDiameter) / 2) -0.5 // mm -slateWidthHalf = 41.5 / 2 // mm -minClampingDistance = 50 + 30 // mm -templateThickness = 10 // mm -radius = 10 // mm -depth = 30 // mm -length001 = slateWidthHalf - radius // mm -length002 = depth + minClampingDistance // mm +routerDiameter = 12.7 +mmInInch = 25.4 +templateDiameter = mmInInch * 11 / 16 +templateGap = ((templateDiameter - routerDiameter) / 2) -0.5 +slateWidthHalf = 41.5 / 2 +minClampingDistance = 50 + 30 +templateThickness = 10 +radius = 10 +depth = 30 +length001 = slateWidthHalf - radius +length002 = depth + minClampingDistance // Create the first sketch sketch001 = startSketchOn('XZ') diff --git a/sheet-metal-bracket/sheet-metal-bracket.kcl b/sheet-metal-bracket/sheet-metal-bracket.kcl index da0712a..4e26c21 100644 --- a/sheet-metal-bracket/sheet-metal-bracket.kcl +++ b/sheet-metal-bracket/sheet-metal-bracket.kcl @@ -3,14 +3,14 @@ // Define constants such as sheet metal thickness, bend radius, flange length, bolt diameter size, etc. -thickness = 0.090 // inches -bendRad = 0.08 // inches -outsideBendRad = bendRad + thickness // inches -flangeLength = 0.5 // inches -hatHeight = 3 // inches -hatWidth = 5 // inches -boltSize = 0.25 // inches -flangeWidth = 1.5 // inches +thickness = 0.090 +bendRad = 0.08 +outsideBendRad = bendRad + thickness +flangeLength = 0.5 +hatHeight = 3 +hatWidth = 5 +boltSize = 0.25 +flangeWidth = 1.5 // Sketch and extrude the base shape and fillet the inside and outside edges. diff --git a/socket-head-cap-screw/socket-head-cap-screw.kcl b/socket-head-cap-screw/socket-head-cap-screw.kcl index 50d3f12..76ddbf9 100644 --- a/socket-head-cap-screw/socket-head-cap-screw.kcl +++ b/socket-head-cap-screw/socket-head-cap-screw.kcl @@ -3,17 +3,17 @@ // Define constants -screwLength = 1.000 // inch -screwDiameter = .190 // inch -headDiameter = .313 // inch -headLength = screwDiameter // inch -hexWallToWall = 5 / 32 // inch +screwLength = 1.000 +screwDiameter = .190 +headDiameter = .313 +headLength = screwDiameter +hexWallToWall = 5 / 32 capRatio = screwDiameter / headDiameter hexRatio = hexWallToWall / headDiameter -hexWallLength = hexWallToWall / 2 * 1 / cos(toRadians(30)) // inch -hexStartingAngle = 210 // first angle of hex pattern (degrees) -hexInteriorAngle = 120 // degrees -hexChangeAngle = 180 - hexInteriorAngle // degrees +hexWallLength = hexWallToWall / 2 * 1 / cos(toRadians(30)) +hexStartingAngle = 210 // first angle of hex pattern +hexInteriorAngle = 120 +hexChangeAngle = 180 - hexInteriorAngle // Write a function that defines the Socket Head Cap Screw diff --git a/tire/tire.kcl b/tire/tire.kcl index 011e226..c27b19b 100644 --- a/tire/tire.kcl +++ b/tire/tire.kcl @@ -3,13 +3,13 @@ // Define constants -tireInnerDiameter = 482.6 // mm (19 in) -tireOuterDiameter = 660.4 // mm (26 in) -tireDepth = 280 // mm -bendRadius = 40 // mm -tireTreadWidth = 10 // mm -tireTreadDepth = 10 // mm -tireTreadOffset = 80 // mm +tireInnerDiameter = 482.6 +tireOuterDiameter = 660.4 +tireDepth = 280 +bendRadius = 40 +tireTreadWidth = 10 +tireTreadDepth = 10 +tireTreadOffset = 80 // Create the sketch of the tire tireSketch = startSketchOn("XY") diff --git a/wheel-rotor/wheel-rotor.kcl b/wheel-rotor/wheel-rotor.kcl index c047062..ed452fc 100644 --- a/wheel-rotor/wheel-rotor.kcl +++ b/wheel-rotor/wheel-rotor.kcl @@ -37,7 +37,7 @@ fn lugPattern = (plane) => { |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: lugCount - 1, + instances: lugCount, rotateDuplicates: true }, %) return lugHolePattern @@ -89,7 +89,7 @@ spacerSketch = startSketchOn(rotorSecondaryPlatePlane) |> patternCircular2d({ arcDegrees: 360, center: [0, 0], - repetitions: spacerCount, + instances: spacerCount, rotateDuplicates: true }, %) @@ -104,7 +104,7 @@ rotorSlottedSketch = startSketchOn(rotor, 'START') |> close(%) |> patternCircular2d({ center: [0, 0], - repetitions: drillAndSlotCount - 1, + instances: drillAndSlotCount, arcDegrees: 360, rotateDuplicates: true }, %) @@ -115,12 +115,12 @@ rotorDrilledSketch = startSketchOn(rotor, 'START') |> circle({ center: [1.34, 3.23], radius: 0.12 }, %) |> patternLinear2d({ axis: [-0.02, 0.04], - repetitions: 2, + instances: 3, distance: 1.1 }, %) |> patternCircular2d({ center: [0, 0], - repetitions: drillAndSlotCount - 1, + instances: drillAndSlotCount, arcDegrees: 360, rotateDuplicates: true }, %) @@ -136,7 +136,7 @@ secondRotorSlottedSketch = startSketchOn(secondRotor, 'END') |> close(%) |> patternCircular2d({ center: [0, 0], - repetitions: drillAndSlotCount - 1, + instances: drillAndSlotCount, arcDegrees: 360, rotateDuplicates: true }, %) @@ -147,12 +147,12 @@ secondRotorDrilledSketch = startSketchOn(secondRotor, 'START') |> circle({ center: [1.34, 3.23], radius: 0.12 }, %) |> patternLinear2d({ axis: [-0.02, 0.04], - repetitions: 2, + instances: 3, distance: 1.1 }, %) |> patternCircular2d({ center: [0, 0], - repetitions: drillAndSlotCount - 1, + instances: drillAndSlotCount, arcDegrees: 360, rotateDuplicates: true }, %)