KCL (KITTYCAD LANGUAGE)SOURCE
✓ executed/*
Generated by Text-to-CAD:
A T-shaped cross-section bracket: a 80mm-wide horizontal top bar and a 40mm-tall vertical stem, all 6mm thick and 20mm deep (into the page).
*/
@settings(defaultLengthUnit = mm)
// Parameters
flangeWidth = 80
stemHeight = 40
thickness = 6
depth = 20
// Derived
halfFlange = flangeWidth / 2
halfStem = thickness / 2
overallHeight = stemHeight + thickness
// T-profile outline
tSketch = startSketchOn(XY)
tProfile = startProfile(tSketch, at = [-halfFlange, overallHeight])
|> xLine(length = flangeWidth) // top edge of flange
|> yLine(length = -thickness) // down to flange underside (top of stem)
|> xLine(endAbsolute = halfStem) // move to stem right edge
|> yLine(length = -stemHeight) // down stem
|> xLine(endAbsolute = -halfStem) // across stem bottom
|> yLine(length = stemHeight) // up stem
|> xLine(endAbsolute = -halfFlange) // to flange left underside
|> yLine(length = thickness) // up to start
|> close()
// Extrude to create bracket
extrude(tProfile, length = depth)