* update all kcl-samples * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Update kcl-samples simulation test output --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
// Lug Nut
|
|
// lug Nuts are essential components used to create secure connections, whether for electrical purposes, like terminating wires or grounding, or for mechanical purposes, such as providing mounting points or reinforcing structural joints.
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = in)
|
|
|
|
// Import parameters
|
|
import lugDiameter, lugHeadLength, lugThreadDiameter, lugLength, lugThreadDepth, lugSpacing from "parameters.kcl"
|
|
|
|
customPlane = {
|
|
plane = {
|
|
origin = {
|
|
x = lugSpacing / 2,
|
|
y = -30 * mm(),
|
|
z = 0
|
|
},
|
|
xAxis = { x = 1, y = 0, z = 0 },
|
|
yAxis = { x = 0, y = -1, z = 0 },
|
|
zAxis = { x = 0, y = 0, z = 1 }
|
|
}
|
|
}
|
|
|
|
fn lug(plane, length, diameter) {
|
|
lugSketch = startSketchOn(customPlane)
|
|
|> startProfileAt([0 + diameter / 2, 0], %)
|
|
|> angledLineOfYLength({ angle = 70, length = lugHeadLength }, %)
|
|
|> xLine(endAbsolute = lugDiameter / 2)
|
|
|> yLine(endAbsolute = lugLength)
|
|
|> tangentialArc({ offset = 90, radius = 3 * mm() }, %)
|
|
|> xLine(endAbsolute = 0 + .001, tag = $c1)
|
|
|> yLine(endAbsolute = lugThreadDepth)
|
|
|> xLine(endAbsolute = lugThreadDiameter)
|
|
|> yLine(endAbsolute = 0)
|
|
|> close()
|
|
|> revolve(axis = Y)
|
|
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
|
|
return lugSketch
|
|
}
|
|
|
|
lug(customPlane, lugLength, lugDiameter)
|