I haven't posted project updates in a while, because I can't use my CNC without noise cancelling box anymore. And this box is still waiting to be built.
v0.4 is released and available on github and from ppa.
I somewhat messed up versioning. This release actually was intended to be 0.3, but I released v0.3.1 (which had to be v0.2.1) and decided that I cant release 0.3 after 0.3.1. So, here it is.
Python setuptools are now adopted
Tempel started to convert BCAM to Python3 (Thanks alot!)
Save files are reworked to save space and save/load time
Yep, let me show some kind of "hack" for drilling PCBs.
Here is a screenshot of some kicad project, we are going to work with:
Lets suppose that we drill file in excellon format and CNC machine expecting G-Code input. There is pcb2gcode project, that can help you, but it is somewhat complex to use. If you are familiar with it, then probably the way im going to describe is not for you, otherwise, follow my steps.
First lets export our project to excellon format:
Now we have a text file with drill coordinates (and instrument list, which is not very useful so far, because hobbyist machines dont usually let you use several instruments).
We want to import that file to LibreCAD, but the format of this file is not directly supported by librecad, so we want to convert it to something usable. With this one-liner we can do that:
grep ^X$1 | sed -e "s/X//" | sed -e "s/Y/, /" | awk '{printf "%s, %s, 0.0, t\n",NR,$0}' > $1.ascii
Save it as drl2ascii.sh and call like that:
bash drl2ascii.sh my_drl_file.drl
It will output stripped coordinates with some extra data needed for appropriate import by librecad:
Lets import it in LibreCAD (go to File->Import->Read ASCII points)
Press Accept and check that points are placed correctly:
Adjust position:
Now when the points are properly placed, we can save the project to dxf and import it into BCAM:
Set material thickness prior to assigning drills to points (drill depth is set to material thickness initially) and set desired tool properties (all of these are on the right panel):
Select all the points and click drill:
Now go to File->Export and save the result to .ngc file. This G-Code can be fed to your machine:)
Aside from pocketing, scrolling with shift/ctrl was added for convenience, python logging module was finally integrated and of course a bunch of bugs was fixed. So hopefully 0.2 made BCAM better =)
The pictures are from pocketing test with Shapeoko.
The source DXF (in LibreCAD) looks like that:
Same drawing in BCAM, with pocketing applied (no finishing step, thats why border is not perfect):
Ive added new pocketing code, which works much better than old code, but this code came with a price: it works slow.
Current version is not optimized at all, so I might gain some performance by staring at the code, but for now, I will have to move pocketing to separate thread or process and will add progress bar to show how far BCAM is on the way to complete pocketing path. I really-really dont want to do that because I hate slow programs, but thats the only idea I have for pocketing now. Maybe my algo is just too shitty and I will rewrite it into something better one day, who knows!
Aside from that Ive added push buttons to settings tab. Not a big deal, but it only had spinners there before, also, BCAM now starts maximized, because im tired of clicking maximize button.
The next week will be devoted to finishing of pocketing:
I will have to add progress bar, move calculation to separate thread/process and review and fix the G-Code for pocketing. After that I think it will be worth a release. But not packaged yet, just the code. The next 0.3 release will be devoted to adding python setuptools, maybe deb packaging and all that side-stuff.
Cool! Would like to see your project on here as soon as you start it. Im planning direct excellon import in the next version to remove all that mumbo-jumbo with format converting, so that might be helpful!
Sounds useful i will be posting the project ones some parts start to arrive from China. i have put a link on my hackerspaces facebook group. has we have been talking about CnC a lot over the last few months.
Awesome! Could you maybe put a link on your facebook to your hackaday profile or maybe post it here or via private message. I like working on BCAM, and I need feedback. Because the only tester so far is me myself, I dont know what is needed more by hackers.
Very Cool i have just started planing a CNC build for just for pcb makeing.