* Teaching t2c how to counterbore, countersink, and counterdrill * Delete public/kcl-samples/parametric-bearing-pillow-block directory * Update mounting-wire.kcl * new artifiacts Signed-off-by: Jess Frazelle <github@jessfraz.com> * Update kcl-samples simulation test output * Update kcl-samples simulation test output * updates 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> --------- 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>
90 lines
2.6 KiB
Plaintext
90 lines
2.6 KiB
Plaintext
// Fan
|
|
// Spinning axial fan that moves airflow
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = mm)
|
|
|
|
// Import parameters
|
|
import * from "parameters.kcl"
|
|
|
|
// Model the center of the fan
|
|
fanCenter = startSketchOn(XY)
|
|
|> startProfile(at = [fanHeight, 0])
|
|
|> yLine(endAbsolute = -15 + 1.5)
|
|
|> tangentialArc(radius = 1.5, angle = -90)
|
|
|> xLine(endAbsolute = 4.5)
|
|
|> yLine(endAbsolute = -13)
|
|
|> xLine(endAbsolute = profileStartX(%) - 5)
|
|
|> tangentialArc(radius = 1, angle = 90)
|
|
|> yLine(endAbsolute = -1)
|
|
|> xLine(length = 2)
|
|
|> yLine(length = -0.15)
|
|
|> line(endAbsolute = [
|
|
profileStartX(%) - 1.4,
|
|
profileStartY(%) - 1
|
|
])
|
|
|> yLine(endAbsolute = profileStartY(%))
|
|
|> xLine(endAbsolute = profileStartX(%))
|
|
|> close()
|
|
|> revolve(axis = {
|
|
direction = [1.0, 0.0],
|
|
origin = [0.0, 0.0]
|
|
})
|
|
|
|
// Create a function for a lofted fan blade cross section that rotates about the center hub of the fan
|
|
fn fanBlade(offsetHeight, startAngle) {
|
|
fanBlade = startSketchOn(offsetPlane(YZ, offset = offsetHeight))
|
|
|> startProfile(at = [
|
|
15 * cos(startAngle),
|
|
15 * sin(startAngle)
|
|
])
|
|
|> arc(angleStart = startAngle, angleEnd = startAngle + 14, radius = 15)
|
|
|> arc(
|
|
endAbsolute = [
|
|
fanSize * 22 / 50 * cos(startAngle - 20),
|
|
fanSize * 22 / 50 * sin(startAngle - 20)
|
|
],
|
|
interiorAbsolute = [
|
|
fanSize * 11 / 50 * cos(startAngle + 3),
|
|
fanSize * 11 / 50 * sin(startAngle + 3)
|
|
],
|
|
)
|
|
|> arc(
|
|
endAbsolute = [
|
|
fanSize * 22 / 50 * cos(startAngle - 24),
|
|
fanSize * 22 / 50 * sin(startAngle - 24)
|
|
],
|
|
interiorAbsolute = [
|
|
fanSize * 22 / 50 * cos(startAngle - 22),
|
|
fanSize * 22 / 50 * sin(startAngle - 22)
|
|
],
|
|
)
|
|
|> arc(
|
|
endAbsolute = [profileStartX(%), profileStartY(%)],
|
|
interiorAbsolute = [
|
|
fanSize * 11 / 50 * cos(startAngle - 5),
|
|
fanSize * 11 / 50 * sin(startAngle - 5)
|
|
],
|
|
)
|
|
|> close()
|
|
return fanBlade
|
|
}
|
|
|
|
// Loft the fan blade cross sections into a single blade, then pattern them about the fan center
|
|
crossSections = [
|
|
fanBlade(offsetHeight = 4.5, startAngle = 50),
|
|
fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30),
|
|
fanBlade(offsetHeight = fanHeight - 2, startAngle = 0)
|
|
]
|
|
bladeLoft = loft(crossSections)
|
|
|> patternCircular3d(
|
|
instances = 9,
|
|
axis = [1, 0, 0],
|
|
center = [0, 0, 0],
|
|
arcDegrees = 360,
|
|
rotateDuplicates = true,
|
|
)
|
|
|
|
[fanCenter, bladeLoft]
|
|
|> appearance(color = "#110803")
|