Skip to content
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

update onboarding KCL #2820

Merged
merged 2 commits into from
Jun 26, 2024
Merged
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
8 changes: 4 additions & 4 deletions src/lib/exampleKcl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
const sigmaAllow = 35000 // psi
const width = 6 // inch
const p = 300 // Force on shelf - lbs
const L = 12 // inches
const M = L * p / 2 // Moment experienced at fixed end of bracket
const FOS = 2 // Factor of safety of 2 to be conservative
const shelfLength = 12 // inches
const moment = shelfLength * p / 2 // Moment experienced at fixed end of bracket
const factorOfSafety = 2 // Factor of safety of 2 to be conservative

// Calculate the thickness off the bending stress and factor of safety
const thickness = sqrt(6 * M * FOS / (width * sigmaAllow))
const thickness = sqrt(6 * moment * factorOfSafety / (width * sigmaAllow))

// 0.25 inch fillet radius
const filletR = 0.25
Expand Down Expand Up @@ -48,7 +48,7 @@
const lines = example.split('\n')
const lineNumber = lines.findIndex((l) => l.includes(searchText)) + 1
if (lineNumber === 0) {
throw new Error(

Check warning on line 51 in src/lib/exampleKcl.ts

View workflow job for this annotation

GitHub Actions / build-test-apps (macos-14)

Return an error instead of throwing, so error type-checking is better

Check warning on line 51 in src/lib/exampleKcl.ts

View workflow job for this annotation

GitHub Actions / build-test-apps (ubuntu-latest)

Return an error instead of throwing, so error type-checking is better

Check warning on line 51 in src/lib/exampleKcl.ts

View workflow job for this annotation

GitHub Actions / build-test-apps (windows-latest)

Return an error instead of throwing, so error type-checking is better

Check warning on line 51 in src/lib/exampleKcl.ts

View workflow job for this annotation

GitHub Actions / playwright-ubuntu

Return an error instead of throwing, so error type-checking is better

Check warning on line 51 in src/lib/exampleKcl.ts

View workflow job for this annotation

GitHub Actions / playwright-macos

Return an error instead of throwing, so error type-checking is better
`Could not find the line with search text "${searchText}" in the example code. Was it removed?`
)
}
Expand Down
Loading