imrishabh18/nema-23-stepper-controller
A tscircuit package created by imrishabh18.
- Version
- 1.3.13
- License
- unset
- Stars
- 1
rear-outline.ts
/** NEMA23 rear-adapter profile, with the arc-point technique used by
* techmannih/nema34-mounted-stepper-controller. Dimensions come from the
* STEPPERONLINE ST-M10 rear adapter; exact motor rear fit remains unconfirmed.
* Unlike scaling the NEMA34 outline, this uses the NEMA23 reference geometry.
*/
const arc = (x: number, y: number, r: number, a: number, b: number) =>
Array.from({length: 32}, (_, i) => {
const t = (a + (b-a)*(i+1)/32)*Math.PI/180
return {x: x+r*Math.cos(t), y: y+r*Math.sin(t)}
})
export const rearOutline = [
{x:-16.5,y:28},{x:16.5,y:28},...arc(16.5,25.5,2.5,90,0),
{x:19,y:24},...arc(24,24,5,180,270),{x:25.5,y:19},...arc(25.5,16.5,2.5,90,0),
{x:28,y:-16.5},...arc(25.5,-16.5,2.5,0,-90),{x:24,y:-19},...arc(24,-24,5,90,180),
{x:19,y:-25.5},...arc(16.5,-25.5,2.5,0,-90),{x:-16.5,y:-28},...arc(-16.5,-25.5,2.5,-90,-180),
{x:-19,y:-24},...arc(-24,-24,5,0,90),{x:-25.5,y:-19},...arc(-25.5,-16.5,2.5,-90,-180),
{x:-28,y:16.5},...arc(-25.5,16.5,2.5,180,90),{x:-24,y:19},...arc(-24,24,5,-90,0),
{x:-19,y:25.5},...arc(-16.5,25.5,2.5,180,90),{x:-16.5,y:28},
]
export const rearMount = {width:56,height:56,mountPitchX:50,mountPitchY:32,holeDiameter:4,motorGap:8}