Skip to content

Update KCL docs #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/pages/docs/kcl-samples/ball-bearing/main.kcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ insideWall = extrude(insideWallSketch, length = overallThickness)
// Create the sketch of one of the balls
ballsSketch = startSketchOn(XY)
|> startProfile(at = [shaftDia / 2 + wallThickness, 0.001])
|> arc(angleStart = 180, angleEnd = 0, radius = sphereDia / 2)
|> arc(angleStart = 180deg, angleEnd = 0, radius = sphereDia / 2)
|> close()

// Revolve the ball to make a sphere and pattern around the inside wall
Expand All @@ -44,17 +44,17 @@ balls = revolve(ballsSketch, axis = X)
chainSketch = startSketchOn(XY)
|> startProfile(at = [
shaftDia / 2 + wallThickness + sphereDia / 2 - (chainWidth / 2),
0.125 * sin(60)
0.125 * sin(60deg)
])
|> arc(angleStart = 120, angleEnd = 60, radius = sphereDia / 2)
|> arc(angleStart = 120deg, angleEnd = 60deg, radius = sphereDia / 2)
|> line(end = [0, chainThickness])
|> line(end = [-chainWidth, 0])
|> close()

// Revolve the chain sketch
chainHead = revolve(chainSketch, axis = X)
|> patternCircular3d(
arcDegrees = 360,
arcDegrees = 360deg,
axis = [0, 0, 1],
center = [0, 0, 0],
instances = nBalls,
Expand All @@ -72,9 +72,9 @@ linkSketch = startSketchOn(XZ)
)

// Revolve the link sketch
linkRevolve = revolve(linkSketch, axis = Y, angle = 360 / nBalls)
linkRevolve = revolve(linkSketch, axis = Y, angle = 360deg / nBalls)
|> patternCircular3d(
arcDegrees = 360,
arcDegrees = 360deg,
axis = [0, 0, 1],
center = [0, 0, 0],
instances = nBalls,
Expand Down
18 changes: 9 additions & 9 deletions content/pages/docs/kcl-samples/brake-rotor/main.kcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ nVentBosses = 36

// Drilling parameters.
dDrillDia = 6
aBase = 90
aSweep = 30
aBase = 90deg
aSweep = 30deg
nArcs = 12

// Bell parameters.
aDraftBell = 5
aDraftBell = 5deg
tBell = 5 // Wall thickness.
hBellAboveDiscFace = 40
hBellSubflush = 4
Expand Down Expand Up @@ -98,7 +98,7 @@ planeVent = offsetPlane(XY, offset = tDiscHalf)
sketchVent = startSketchOn(planeVent)
profileVent = startProfile(sketchVent, at = [-wVent, dDisc / 2])
|> angledLine(angle = 0, length = wVent, tag = $rectangleSegmentA001)
|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = hFrictionSurface, tag = $seg02)
|> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = hFrictionSurface, tag = $seg02)
|> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg03)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
|> close()
Expand All @@ -118,7 +118,7 @@ ventSet = patternCircular3d(
instances = nVentBosses,
axis = [0, 0, 1],
center = [0, 0, tDiscHalf],
arcDegrees = 360,
arcDegrees = 360deg,
rotateDuplicates = true,
)

Expand All @@ -134,8 +134,8 @@ discOutboard = createDiscHalf(
// Now create bell.
rCenter = dDisc / 2 - hFrictionSurface - wUndercut
rBore = dBore / 2
lDraftExterior = hBellAboveDiscFace / tan(90 - aDraftBell)
lDraftInterior = (hBellAboveDiscFace - tBell) / tan(90 - aDraftBell)
lDraftExterior = hBellAboveDiscFace / tan(90deg - aDraftBell)
lDraftInterior = (hBellAboveDiscFace - tBell) / tan(90deg - aDraftBell)

// Inner and outer radius of outboard face of disc bell.
rOuter = rCenter - lDraftExterior - rBore
Expand All @@ -149,7 +149,7 @@ bodyDiscBell = startProfile(
tDiscHalf * 2 + tVent
],
)
|> arc(angleStart = -180, angleEnd = 0, radius = wUndercut / 2)
|> arc(angleStart = -180deg, angleEnd = 0, radius = wUndercut / 2)
|> line(end = [lDraftExterior, hBellAboveDiscFace])
|> xLine(length = rOuter, tag = $seg04)
|> yLine(length = -tBell)
Expand All @@ -166,7 +166,7 @@ profileStud = circle(sketchLugs, center = [0, dPitchCircle / 2], radius = dStudD
|> patternCircular2d(
instances = nStuds,
center = [0, 0],
arcDegrees = 360,
arcDegrees = 360deg,
rotateDuplicates = true,
)

Expand Down
Loading