Open a7u7a opened 6 years ago
I realized I was using the wrong version of swift when attempting swift build
, now using with Swift 4.1.2 I get:
/Users/user/Documents/pcb2photon: error: manifest parse error(s):
<unknown>:0: error: Swift does not support the SDK 'MacOSX10.12.sdk'
This is probably a very newbie question, this is my first time using swift and really want to try your code for building PCBs. Thanks!
Hello, If you are running from macOS try to run like this first:
swift build
swift package generate-xcodeproj
then you should be able to run it from XCode if that is what you are looking for.
If you just want to create the executable and run it then you have to run the executable created after building it with swift build
.
Give it a go and tell me if you still have issues.
Thanks for your comment.
I dont mind building from xcode or directly from Swift.
However, when I do swift build
I get:
/Users/User/Documents/pcb2photon: error: manifest parse error(s):
<unknown>:0: error: Swift does not support the SDK 'MacOSX10.12.sdk'
can't get past that :(
That is very strange indeed. Can you tell me what version of macOS and XCode you are using?
I'm using osx 10.11.6 (El Capitan) and xcode 8.2.1 hope this helps!
Just curious, did you manually install/compile swift?
I downloaded the latest release from https://swift.org/download/#releases. So maybe I can't build it because I am using Xcode 8.2.1 and swift 4 requires Xcode 9.4.1? That would require me to upgrade to OSX 10.13.2 or later.. Am I right?
Unfortunately, it might be so. I will look into how much effort it would be to make it swift 3 compatible but I make no promises.
I was able to upgrade to latest OSX and Xcode and could build. Even made my first DIY 2 layer PCB. Took some trial and error because I had to figure a suitable reference point and orientation to make the layers match. Still have some alignment issues but nothing too bad. Just for the record I tried making a PCB with the machine before running into your code. For this I had to go through a bunch of programs(EAGLE, Illustrator, Rhino3D and finally Anycubic's software) in order to turn the 2D vector PCB data into a 3D solid. Came out fine but the whole process took me a like 4 hours just to put the files in the machine. This is so much better. Thank you.
Those are great news! It is very rewarding to get this feedback. I think you will be pleased with the future functionality to use gerber files. Maybe you have a suggestion to mitigate the alignment issues.
Yes! gerber files would be great because I still have to use Illustrator to export the file aligned correctly. I will quickly summarize my experience so far:
In order to find absolute dimensions with respect to a reference point I had to put a blank PCB on top of the screen, fixed with tape to the sides and square against the two allen bolts that are used as a fence for the vat and just light up the whole screen with a grid. Developed it and measured the relative distance to the edges using some digital calipers.
I found that (at least on) my machine the edges of the screen are masked 2.3mm to the sides and 1mm to front and back. So anything you put too close to the edges will be masked out.
I have tried two different brands of blank, presensitized PCBs and both work fine with 240s of exposure.(MG chemicals 689 single sided and some other offbrand)
In the future I would like to have a custom framing square cut from acrylic sheet for easier alignment.
Resolution is great and text comes out good at 2.2 mm height, could probably be made smaller but have not tried yet.
Personally I cant find a use for moving the platform up and down all the time. It would be a lot faster if the image just appeared on the screen. I thing this probably not doable without altering the Photon's firmware, though.
This is all work in progress so dont take my measurements too seriously!
Those measurements would be very useful since I don't own a photon to test myself. Especially the border between the actual area of exposure and the effective area of exposure. Currently, the 1440x2560px are defined for an area of 68.04x120.96mm. I actually have no idea what movements the printer is doing all the time, I might be able to stop them.
Yes, I started with 68.04x120.96mm at first but my 5mm grid was not matching. My current measurements say it is actually 116.56x66 mm but that might vary from machine to machine. We will be using the machine for PCB stuff for the next couple of weeks so I can hopefully provide better measurements that you can use.
That difference is severe! Especially for 3D prints that suffer from shrinkage... If you have the opportunity to re-check it would be great.
@Hallulla
Masking is a known "issue" on the photon, if you look closely at the anouced specs here and here it's smaller than the LCD image size.
The way we are doing it in Photon File Validator is warn the user if the file has details in the known safe margins.
The pixel resolution of the machine is 47u and that means that that is the modular unit of the machine 0.047mm so it would be great to have pixel alignment and dimension fitting to that unit.
My idea for the registration is to make a template from the alan screws that ppl can cut out and make notches in the PCB so that you can use the screws to align front and back. if you do make the acrylic please share it here or in the Photonsters organization on github ;)
As for not moving the platform you can use the config.gcode file to stop the peeling action like I do for the resin exposure range project. Basically have 2 Gcodes, one that put it into PCB mode and the other that returns the machine to it's original settings.
You can check the project here
@Hallulla can you post some of your results for me to share on the fb photon owner group?
On mac, both
$ swift build
and building from xcode fail. On xcode I am using swift 4.1.2 toolchainError from
$ swift build
:and error from xcode: