Files
modeling-app/public/kcl-samples/car-wheel-assembly/car-tire.kcl
Josh Gomez 656eb0abec Update all KCL-Samples to be more ME friendly (#6132)
* 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>
2025-04-04 11:03:13 -07:00

46 lines
1.5 KiB
Plaintext

// Tire
// A tire is a critical component of a vehicle that provides the necessary traction and grip between the car and the road. It supports the vehicle's weight and absorbs shocks from road irregularities.
// Set units
@settings(defaultLengthUnit = in)
// Import parameters
import tireInnerDiameter, tireOuterDiameter, tireDepth, bendRadius, tireTreadWidth, tireTreadDepth, tireTreadOffset from "parameters.kcl"
// Create the sketch of the tire
tireSketch = startSketchOn(XY)
|> startProfileAt([tireInnerDiameter / 2, tireDepth / 2], %)
|> line(
endAbsolute = [
tireOuterDiameter / 2 - bendRadius,
tireDepth / 2
],
tag = $edge1,
)
|> tangentialArc({ offset = -90, radius = bendRadius }, %)
|> line(endAbsolute = [
tireOuterDiameter / 2,
tireDepth / 2 - tireTreadOffset
])
|> line(end = [-tireTreadDepth, 0])
|> line(end = [0, -tireTreadWidth])
|> line(end = [tireTreadDepth, 0])
|> line(endAbsolute = [
tireOuterDiameter / 2,
-tireDepth / 2 + tireTreadOffset + tireTreadWidth
])
|> line(end = [-tireTreadDepth, 0])
|> line(end = [0, -tireTreadWidth])
|> line(end = [tireTreadDepth, 0])
|> line(endAbsolute = [
tireOuterDiameter / 2,
-tireDepth / 2 + bendRadius
])
|> tangentialArc({ offset = -90, radius = bendRadius }, %)
|> line(endAbsolute = [tireInnerDiameter / 2, -tireDepth / 2], tag = $edge2)
|> close()
// Revolve the sketch to create the tire
revolve(tireSketch, axis = Y)
|> appearance(color = "#0f0f0f", roughness = 80)