jes notes Index Gallery . Shaft passers Snap issues

2024-10-08

Last modified: 2024-10-14 14:02:13

< 2024-10-07 2024-10-11 >

Time tracker

I'm going to make the backend for this and make it actually usable, maybe deploy it to dojo.

The backend is just a Go program that saves/restores a JSON blob.

Great success, done.

Sovereign Scales

I actually don't fancy working in the garage today after all, too cold and wet outside.

But let's try and make the gcode, and perhaps I'll be able to run it on Friday.

I think for gcode files that require manual editing I'll try to make shell scripts to turn the FreeCAD output into what I want, and where that's not possible I'll have the shell script tell me what edits need to be made, so that I have half a chance of iterating on this without having to rediscover everything every time.

I have a gcode-cat script that strips out trailing M2 or % from individual files, and writes a trailing M2 for the concatenated output.

Some ideas to make sure I always use the right files:

It is annoying that toggling visibility of a Job doesn't toggle visibility of the toolpaths/model inside it.

Job checklist:

top-1

Origin:

From memory the tall parallels end up 3.5mm below the top of the vice jaws.

surface-top: I think manually write a toolpath into a "header" file that surfaces off the top at Z=0. We can then reuse this as a separate job run before top-2 so that we manually get the height correct.

top-profile: Make a profile in FreeCAD that does a profile of the part down to Z=-3.5 or whatever, and makes the coin pockets. This one we'll leave intact.

rectangle: Make a profile in FreeCAD that does a profile of the 15mm width, from Z=-3.5 down to Z=-11, or something that will definitely get cleared up by top-2. This should be a rectangle leaving 0.5mm extra on the bottom part's counterweight, except put the fillets on the edge of the top's counterweight.

counterweight: Then make a second profile in FreeCAD that does a profile of the bottom few mm of the counterweight only, down to Z=-16 or whatever, deep enough that it will clear the entire material so that we can use it for centering top-2, and then edit it by hand (?) to make it not cut through the middle of the part.

Then gcode-cat the four of them to get top-1.nc.

We can detect the path in counterweight.nc that would cut through the middle of the part, it's the one where we move in a straight line from a positive Y coordinate to a negative one. Then we also want to delete the arc paths immediately before and after it, and replace them with a hop up in Z, then move to the end of the final arc path, then hop back down in Z.

Maybe get Cursor to write a script to do that? It wrote counterweight-fix. Got it wrong on the first try but easy enough to fix. This is so good.

The script is behaving strangely, and I noticed that the toolpath actually doesn't fit the shape very well! https://forum.freecad.org/viewtopic.php?style=4&t=36204 this page suggests there is a config setting to control the toolpath accuracy. But it is currently 0.01 mm and can't be set any finer than that.

In this path:

The curve around the sharp corner should transition to a short straight line segment, it shouldn't just be curves connected together!

Maybe this will do:

And here's the full top-1.nc:

And with a representation of the vice jaws, it looks like we clear them OK:

Good.

top-2

Origin:

This is the same as top-1, but without rectangle.nc? And remember the machined edge of this part's counterweight still leaves 0.5mm of material.

Plan

Would be good to hook up the CNC PC to the NAS so that I don't have to use the USB stick method.

Todo gcode for:

Paul suggested putting serial numbers on, that's a fun idea. I wonder how I can avoid having to do gcodetools once for every unique serial number?

Moodboard

Emma has been talking about making moodboards recently, and now that I know how to make web apps super fast using AI, let's see if I can make a moodboard tool in 45 mins before bed?

Meh, this is not working very well. Cursor seems to have got itself confused as to whether we are serving the frontend and the backend from one project or from two different projects, and I'm not really any less confused than it is.

I think I need to figure out how it is meant to work first and be a bit more intentional about what I get Cursor to do.

So far with my JavaScript stuff I have been having Cursor help me build a static site for the frontend, and I've been writing the backend in Go, so in that case obviously the backend has to be different from the frontend, but I thought with NodeJS you could have a single project that serves both the frontend and the backend, more like when you're doing Mojolicious, you just have some "routes" that implement the API and some that serve web pages.

ChatGPT says you can use Express or SvelteKit to do what I want.

Let's try SvelteKit.

Still can't get it to work. I think Cursor struggles with Svelte a lot more than React, particularly when I try to get it to use https://skeleton.dev/

I'll have to come back to this another day.

< 2024-10-07 2024-10-11 >