Devesh36/facet-four
FACET Four: a USB-C macro controller with four angled keys, a volume encoder, blue LEDs, an OLED and a fitted enclosure. Includes assembled, exploded and routed PCB views. Hardware prototype; firmware required.
- Version
- 0.1.3
- License
- unset
- Stars
- 0
assembly.circuit.tsx
PCB
Schematic
import {assembly,jscad} from 'tscircuit'
import {renderToJscadPlan} from 'jscad-fiber/headless'
import type {ReactNode} from 'react'
import Board from './index.circuit'
import * as M from './mechanics'
const cad=(node:ReactNode,z=0)=>({jscad:renderToJscadPlan(<jscad.translate offset={[0,0,z]}>{node}</jscad.translate>)})
export function FacetAssembly({exploded=false}:{exploded?:boolean}){
const lift=exploded?26:0
return <assembly.device name="FACET Four • USB macro controller">
<Board/>
<assembly.printedpart name="BASE" material="petg" jscad={<jscad.translate offset={[0,0,exploded?-25:0]}><M.Shell/></jscad.translate>}/>
<assembly.printedpart name="FACEPLATE" material="petg" jscad={<jscad.translate offset={[0,0,lift]}><M.Lid/></jscad.translate>}/>
{[0,1,2,3].map(i=><assembly.printedpart key={i} name={`KEYCAP_${i+1}`} material="petg" jscad={<jscad.translate offset={[0,0,lift+ (exploded?10:0)]}><M.KeyCap index={i}/></jscad.translate>}/>)}
<assembly.printedpart name="KNOB" material="petg" jscad={<jscad.translate offset={[0,0,lift]}><M.Knob/></jscad.translate>}/>
<assembly.part name="LED_LIGHT_PIPES" cadModel={cad(<M.Lenses/>,lift)}/>
<assembly.part name="OLED_MODULE" displayName="Waveshare 0.91inch OLED • dimensional assembly model" cadModel={cad(<M.OledBoard/>,exploded?12:0)}/>
<assembly.part name="OLED_GLASS" cadModel={cad(<M.OledGlass/>,exploded?12:0)}/>
<assembly.part name="DISPLAY_PREVIEW" displayName="Illustrative display graphics • firmware required" cadModel={cad(<M.ScreenPixels/>,exploded?12:0)}/>
<assembly.part name="DISPLAY_SUPPORTS" cadModel={cad(<M.DisplaySupports/>)}/>
<assembly.part name="BLUE_WORDMARK" cadModel={cad(<M.Brand/>,lift)}/>
<assembly.part name="SCREWS" displayName="M2 × 14 prototype fasteners" cadModel={cad(<M.Screws/>,lift)}/>
<assembly.part name="RP2040_MODULE_ENVELOPE" displayName="RP2040-Zero dimensional PCB envelope; imported footprint has no supplier CAD" cadModel={cad(<M.ModuleBoard/>)}/>
<assembly.part name="USB_CONNECTOR_ENVELOPE" displayName="Dimensional USB-C opening reference" cadModel={cad(<M.UsbShell/>)}/>
{!exploded&&<assembly.part name="OLED_HARNESS" displayName="Four soldered wires: 3V3 / GND / SDA / SCL" cadModel={cad(<M.Harness/>)}/>}
</assembly.device>
}
export default function EnclosedFacet(){return <FacetAssembly/>}