import { Canvas, useLoader, useFrame } from '@react-three/fiber' import { Suspense } from 'react' import { Html, Stats } from '@react-three/drei' import CadPackage, { CadPackageType, } from 'src/components/CadPackage/CadPackage' import { navigate, routes, Link } from '@redwoodjs/router' import { useInView } from 'react-intersection-observer' import Svg, { SvgNames } from 'src/components/Svg/Svg' import Gravatar from 'src/components/Gravatar/Gravatar' import ProjectsCell from 'src/components/ProjectsCell' import OutBound from 'src/components/OutBound/OutBound' import { DynamicProjectButton } from 'src/components/NavPlusButton/NavPlusButton' import FatalErrorBoundary from 'src/components/FatalErrorBoundary/FatalErrorBoundary' // dynamic import to enable pre-render iof the homepage const AssetWithGooey = React.lazy( () => import('src/components/Hero/AssetWithGooey') ) const cqCode = `module beam(r1, r2, shr, msr){ /* The walking beam acts as a class I lever transferring the * movement from the pitmans arms to the horse head. */ H = 12; // Height W = 10; // Width e = 10; // Total added extension difference(){ union(){ translate([(r2-r1)/2,0,H/2]) // Walking beam body cube([r1+r2+e, W, H], center = true); rotate([90, 0, 0]) // Fulcrum or pivoting point cylinder(r = 2*msr, h = W, center = true); } rotate([90,0,0]) // Pivoting point hole cylinder(r = msr, h = W+1, center = true); translate([r2,0,H/2]) // Equalizer mounting screw hole cylinder(r = shr, h = H+1, center = true); `.split('\n') const scadCode = `hingeHalfExtrudeLength=hingeLength/2-clearance/2; mountingHoleMoveIncrement=(hingeLength-2*mountingHoleEdgeOffset)/ (mountingHoleCount-1); module costomizerEnd() {} $fn=30; tiny=0.005; // modules module hingeBaseProfile() { translate([pivotRadius,0,0]){ square([baseWidth,baseThickness]); } } module hingeBodyHalf() { difference() { union() { linear_extrude(hingeHalfExtrudeLength){ offset(1)offset(-2)offset(1){ translate([0,pivotRadius,0]){ circle(pivotRadius); } square([pivotRadius,pivotRadius]); hingeBaseProfile(); } } linear_extrude(hingeLength){ offset(1)offset(-1)hingeBaseProfile(); } } plateHoles(); } }`.split('\n') export const Hero = () => { return (
{cqCode.map((line, index) => (
{index + 1}
{line}
))}
{scadCode.map((line, index) => (
{index + 1}
{line}
))}
We want you to learn Code-CAD today so it can change the way you work tomorrow. Our community is writing tutorials to make this powerful paradigm more accessible to people new to code and CAD.
CadHub is the place you can try out Code-CAD packages to find the one that's right for you. Our dedicated community is making CAD easy to learn on the web. Try one of our three integrations today and keep an eye out for more.
{desc}
CadHub is a social platform. You can ask users how they designed a part, fork their work to put your own spin on it, and find inspiration in abundance.
{desc}
Built by{' '}