2025-04-01 23:54:26 -07:00
|
|
|
import { bracketThicknessCalculationLine } from '@src/lib/exampleKcl'
|
|
|
|
|
import { isDesktop } from '@src/lib/isDesktop'
|
|
|
|
|
import { Themes, getSystemTheme } from '@src/lib/theme'
|
2025-04-24 13:32:49 -05:00
|
|
|
import { useSettings } from '@src/lib/singletons'
|
2025-04-01 23:54:26 -07:00
|
|
|
import { OnboardingButtons, useDemoCode } from '@src/routes/Onboarding/utils'
|
2025-05-02 15:54:49 -04:00
|
|
|
import { ONBOARDING_SUBPATHS } from '@src/lib/onboardingPaths'
|
2023-09-15 22:37:40 -04:00
|
|
|
|
2024-06-20 21:39:01 -04:00
|
|
|
export default function OnboardingParametricModeling() {
|
|
|
|
|
useDemoCode()
|
2023-09-15 22:37:40 -04:00
|
|
|
const {
|
2025-02-21 13:47:36 -05:00
|
|
|
app: {
|
|
|
|
|
theme: { current: theme },
|
2023-09-15 22:37:40 -04:00
|
|
|
},
|
2025-02-21 13:47:36 -05:00
|
|
|
} = useSettings()
|
2023-09-18 16:13:04 -04:00
|
|
|
const getImageTheme = () =>
|
|
|
|
|
theme === Themes.Light ||
|
|
|
|
|
(theme === Themes.System && getSystemTheme() === Themes.Light)
|
|
|
|
|
? '-dark'
|
|
|
|
|
: ''
|
2023-09-15 22:37:40 -04:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
|
|
|
|
<div
|
|
|
|
|
className={
|
2025-02-07 11:30:36 -05:00
|
|
|
'relative pointer-events-auto z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-[75vh] flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded'
|
2023-09-15 22:37:40 -04:00
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<section className="flex-1 overflow-y-auto mb-6">
|
2024-03-08 17:59:14 -05:00
|
|
|
<h2 className="text-3xl font-bold">Parametric modeling with kcl</h2>
|
2023-09-15 22:37:40 -04:00
|
|
|
<p className="my-4">
|
2024-03-08 17:59:14 -05:00
|
|
|
This example script shows how a code representation of your design
|
|
|
|
|
makes easy work of tedious tasks in traditional CAD software, such
|
|
|
|
|
as calculating a safety factor.
|
2023-09-15 22:37:40 -04:00
|
|
|
</p>
|
2024-03-08 17:59:14 -05:00
|
|
|
|
|
|
|
|
<p className="my-4">
|
|
|
|
|
We've received this sketch from a designer highlighting an{' '}
|
2024-06-20 21:39:01 -04:00
|
|
|
<em>
|
|
|
|
|
<strong>aluminum bracket</strong>
|
|
|
|
|
</em>{' '}
|
|
|
|
|
they need for this shelf:
|
2024-03-08 17:59:14 -05:00
|
|
|
</p>
|
|
|
|
|
<figure className="my-4 w-2/3 mx-auto">
|
2023-09-15 22:37:40 -04:00
|
|
|
<img
|
2024-09-13 08:24:31 -07:00
|
|
|
src={`${
|
|
|
|
|
isDesktop() ? '.' : ''
|
|
|
|
|
}/onboarding-bracket${getImageTheme()}.png`}
|
2023-09-15 22:37:40 -04:00
|
|
|
alt="Bracket"
|
|
|
|
|
/>
|
|
|
|
|
<figcaption className="text-small italic text-center">
|
|
|
|
|
A simplified shelf bracket
|
|
|
|
|
</figcaption>
|
|
|
|
|
</figure>
|
|
|
|
|
<p className="my-4">
|
|
|
|
|
We are able to easily calculate the thickness of the material based
|
2024-03-08 17:59:14 -05:00
|
|
|
on the width of the bracket to meet a set safety factor on{' '}
|
2024-06-20 21:39:01 -04:00
|
|
|
<em>
|
|
|
|
|
<strong>line {bracketThicknessCalculationLine}</strong>
|
2024-03-29 12:56:32 -04:00
|
|
|
</em>
|
|
|
|
|
.
|
2023-09-15 22:37:40 -04:00
|
|
|
</p>
|
2024-04-29 10:44:00 -07:00
|
|
|
<figure className="my-4 w-2/3 mx-auto">
|
|
|
|
|
<img
|
2024-09-13 08:24:31 -07:00
|
|
|
src={`${
|
|
|
|
|
isDesktop() ? '.' : ''
|
|
|
|
|
}/onboarding-bracket-dimensions${getImageTheme()}.png`}
|
2024-04-29 10:44:00 -07:00
|
|
|
alt="Bracket Dimensions"
|
|
|
|
|
/>
|
|
|
|
|
<figcaption className="text-small italic text-center">
|
|
|
|
|
Bracket Dimensions
|
|
|
|
|
</figcaption>
|
|
|
|
|
</figure>
|
2023-09-15 22:37:40 -04:00
|
|
|
</section>
|
2025-05-02 15:54:49 -04:00
|
|
|
<OnboardingButtons
|
|
|
|
|
currentSlug={ONBOARDING_SUBPATHS.PARAMETRIC_MODELING}
|
|
|
|
|
/>
|
2023-09-15 22:37:40 -04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|