OpenFL: an API for the Form 1 / 1+

At the Symposium on Computational Fabrication, @BenFrantzDale and I gave a talk about hacking stereolithography and using the Form 1/1+ as a research platform (slides here). This talk coincided with a public release of OpenFL, an API for the Form 1 and 1+.

We’ve been flying under the radar so far, but wanted to bring it to the attention of the forums – I’m sure that plenty of you have Form 1/1+ printers and a desire to push the limits of stereolithography.

OpenFL includes a special build of PreForm that allows you to customize material files. Check out the example file here to see all of the options that you can modify.

In addition, the OpenFL API includes a pair of Python packages to

  • Interact with your printer automatically and programmatically
  • Examine, modify, and make custom slice files

These APIs have grown out of in-house software, and we’re excited to be releasing them to the public. We can’t wait to see what you do with OpenFL and your Form 1/1+s!


Examples

In one test, we customized slices to add a pause + rise halfway through a print. This lets us insert a carbon fiber sheet into a printed part, giving it better material properties.

In general, the printer is useful as a high-precision UV source. With UV-sensitive paper, you can turn the 3D printer into a 2D printer:

With presensitized PCBs, you can use this as the first stage in a PCB etching pipeline:

Finally, you can turn the printer into a strange MIDI instrument.


Since this is a research platform, it is not supported through our usual ticket system. For now, post issues in this thread (we’ll make a separate subforum if there’s enough interest), raise them on Github, or send an email to openfl@formlabs.com.

15 Likes

This is really cool, as someone who does 3D printing and composites, strengthening layers during a print with fabric reinforcement is something that never occurred to me are there any more details on how the CFRP sample was done? How did you get the carbon to stay in place upside down?

Page 20 of the slides shows how I did it. Basically I had the printer stop at a given layer, lift up, and wait for button press. When it got to that layer, I soaked the weave in resin in the tank and stuck it up to the part with surface tension (overhanging the edge of the part). It stuck on there long enough to get back down into the tank and get lazed back on. After washing the part in IPA, I trimmed the uncured weave with scissors. We included examples.insert_material_swaps.insert_pause_before which finds the right place in the layer to drive up the build platform.

Sadly, carbon fiber being black, it didn’t bond as well as glass fiber (or possibly kevlar) probably would have (since with glass, the laser light would go through the glass and so bond both sides of the glass to the part). Still, the CF looked beautiful and was markedly stronger than clear resin. There are a lot of cool trick that could be done in this space.

1 Like

The tweaking of the settings does look good especially for the tinkerer’s that blend different resins.
I noticed there are settings for laser power, how much control do you have on the laser intensity since it’s LED based? Do LED’s have much latitude? I was under the impression the exposure was primarily controlled by speed.

1 Like

You have a lot of control over the LED. LEDs are analog devices and so long as your control system is decent, you can control a wide range of brightness out of them. In the case of the Form 1+, it’s a 16-bit number (0–65535). For the one on my desk, the range of valid non-zero powers is between 21845 and 47661. So in theory that’s over 25,000 distinct brightness values. Temperature and other factors will affect the power that comes out of it, so you don’t have that much precision, but you won’t have any issues with quantization error.

Speed is limited by galvo performance, and there’s an upper bound on laser brightness, so we modulate both to balance print time and performance. But you can play with both and see what you get!

I never realized you had that much control on led’s. Are these features being released to the public?
Understandably Formabs seems to be resistant to opening up tweaking of the machines to the public. I assume loss in resin sales, technical problems with PDMS wear, print quality etc.
Ideally an advanced user options could allow users make their own blends of resin.

For Form 1/1+, this is public. It requires a special version of PreForm, linked from the above links. As you point out, there are business reasons to not make this a standard feature. In particular, we put a lot of work into our material settings and we want to be sure our customers have as much printing success as possible. But we also recognize that there are a lot of interesting things people who know what they are getting into could do. Hence, OpenFL.

1 Like

I would contend that there are equally valid, if farther fetched, business reasons to support more openness.
Halfway between the technical and the business reasons, I would point out that short series of pieces for which injection molding is desperately anti-economical, can be made using a resin with the right volume pricing. Currently that means 3rd party resin. How is that good for Form Labs? Because Form Labs would sell more machines.
Now it all boils down to wether Form Labs prefers to make a business out of the machines themselves, or out of the consumables as is the norm since the first mainstream inkjet printers. I know I prefer excellent machines and fairly priced consumables rather than crappy machines and pricey consumables.

1 Like

This is both awesome and depressing at the same time. I have been asking for this since the questionnaire sent out to Kickstarter backers of the original Form 1 before it even started shipping and on the Kickstarter forums. I have also if you look through my history had terrible luck getting machines with some real problems, but I’ve stuck by you guys believing that most of the machines you make where better than the ones I ended up getting and upgrading as time went on hoping you had fixed some problems and a new machine would be in better working order. The last round of this was me selling a freshly recalibrated and repaired Form 1+ and cashing in the Kickstarter backer coupon to get a shiny new Form 2. This resulted in me, for the first time since I received my Kickstarter Form 1, having a dependable Formlabs printer without any major flaws, even though it’s still not aligned as well as I would like. Now my request has started to be met but the only correctly working Formlabs printer I’ve owned out of the many I’ve been through is excluded :(. Well it’s good to hear it’s out there and hopefully you guys will extend some of the features to include the Form 2’s as they are awesome machines and more flexibility would be awesome. Just the ability to play with the laser power would let me test some of my ideas for better utilizing your resins for certain purposes. The more you opened it up the more I and others could do. I hope this community has enough tweakers to utilize this and they develop new methods and techniques that in turn help others in the community and your company, and I also hope you add support for the Form 2 so I can take a crack at doing my part to contributing. Thanks a lot for opening things up some, hopefully this continues to grow.

3 Likes

I welcome this. I have a Form 1+ and I will play even more with all this tweaks now. Great job, keep doing a good work.

1 Like

Wow I just read through the slides. I REALLY want to play with this now. Between the Materials files and the flp files that give a huge amount of control over the process. I was wondering a few things.

  1. Can I install this side by side with my standard Preform with out problems even though I can’t use it since I have a Form 2? If so I could at least work on playing with the features pre-print and possibly enlist a Form 1+ owner to test some of my ideas.

  2. Can a user of this set of tools use their own tool to generate custom flp files from scratch and feed them to the printer, thus skipping the need to create a 3D model and feeding that into preform to process. I assume from the single line lithopane that you must be able to as that that seems the only way to get a slice with the custom single line path, unless you read in a different flp from the scripting interface you show and discard all of the contents and replace them which would seem ridiculous.

  3. Is there a good method for processing 3D models with Preform and then dumping them to flp files without printing them? This would allow third parties to create tools for interactively visualizing, editing, analyzing and processing the instructions themselfs independent of the printing pipeline before later sending them off to the printer to be printed. This could be great for additional analysis, like checking for unsupported minima, and unvented cavities that would cause blowouts, and possibly correcting them, and for hollowing prints at the slice level instead of manipulating the model. Not to mention allowing portions of the print to be over or under cured to change material properties and further account for warping. The possibilities are huge.

  4. Am I correct that the flp files would also allow me to edit the overcure amount and the number of overcured layers on a print? This could be really useful when doing prints straight to the platform to minimize the 5mm of bloat down to just what is necessary to get the print to adhere. One could also create a material file to account for overcure bloat by adjusting the OutterBoundaryOffset to account for the thicker line width. Then run a model through Preform twice, once on the correct material and once on the material that corrects for overcure, then splice the overcured layers from the overcure corrected material flp to the non-overcured layers from the normal flp to get an flp with geometry correction for the overcured portion of the print. If tweaked correctly the primary difference in quality for the overcured section would only be detail loss not bloat.

  5. At some point in the process of going from 3D to flp I assume there is an intermediate step of 2D slices independent of control instructions and not processed into laser paths. Is it possible this could eventually lead to that step in the printing pipeline also being opened up to the public? Once again the possibilities with this are huge. However I think the above rants cover a lot of the obvious cases for the utility of this phase as well.

I assume and hope the answers to all of the above questions are yes but anxiously await the official response, and hope you will perhaps also respond with some indication of whether we can hope to see this come to the Form 2.

  1. Can I install this side by side with my standard Preform with out problems even though I can’t use it since I have a Form 2? If so I could at least work on playing with the features pre-print and possibly enlist a Form 1+ owner to test some of my ideas.

Yes, just install both the normal and OpenFL editions of Preform – they should be fine existing side by side.

2 . Can a user of this set of tools use their own tool to generate custom flp files from scratch and feed them to the printer, thus skipping the need to create a 3D model and feeding that into preform to process.

Yep! Think of FLP files as a Form 1-specific version of gcode. The stipple2flp example creates an FLP file from scratch (loading in a CSV file of stipple locations and radii).

3 . Is there a good method for processing 3D models with Preform and then dumping them to flp files without printing them?

Unfortunately, the custom Preform release doesn’t include virtual printing. If you have a printer, you can upload the files from Preform (without starting the print) then download them using readBlock.

I agree that this isn’t convenient (especially if you don’t have a printer handy). Since the roadmap for OpenFL is going to be heavily influenced by suggestions from the public, I’ll keep virtual printing in mind as a potential feature.

4 . Am I correct that the flp files would also allow me to edit the overcure amount and the number of overcured layers on a print?

You could certainly write a post-processing step that adjusts laser power and shuffles paths around.

Like I said above, think of FLPs as gcode – it’s very low-level descriptions of what the machine should be doing, so you’ll have to build up higher-level abstractions. One of example is insert_pause_before, which finds a point mid-peel and adds a platform raise and pause.

5 . At some point in the process of going from 3D to flp I assume there is an intermediate step of 2D slices independent of control instructions and not processed into laser paths. Is it possible this could eventually lead to that step in the printing pipeline also being opened up to the public?

This is less likely. Our slicer and path planning is pretty deep in the guts of Preform and would be tricky to isolate; there may also be Business Reasons ™ to keep Preform’s secret sauce proprietary.

However, I’d love to see a pipeline that uses a different slicer plus OpenFL to convert to FLPs, and that definitely seems feasible. Keep in mind, calibration is different from printer to printer. OpenFL exposes Printer.mm_to_galvo, which converts from real-space units to calibrated galvo coordinates.

I can completely understand wanting to keep the path planning private, as that’s definitely not a straightforward translation, however I was specifically referring to just the slicer step, which is literally a direct translation of the model to 2D shapes representing the layer. This unlike the path planning only has one correct solution which a variety of tools have already successfully accomplished so you aren’t really exposing anything that hasn’t already been accomplished by free tools. However it would provide a very valuable step to interface with the tool. However what you guys have done so far is good so I don’t want to come off like I’m complaining.

Any comment on this possibly working on the Form 2 in the future?

Well that doesn’t help me I upgraded to a Form 2 so I’m not cool enough for that option. :frowning:

Forgot to mention earlier. Count me in the list of those eagerly awaiting OpenFL for the Form 2. Great stuff.

1 Like

You could set the material file to print with a single outline, spacing the fill by 200 mm from the outline and not insetting that one outline. That would give you flp files that contain only the slice-plane–model intersection. But you can do that with a third-party slicer as well…

I appreciate that as a very creative solution to dumping the outline, however it only covers part of the equation. I am just as interested in going from pre-existing sliced outlines into preform to then have preform perform it’s magic and build the paths and print. So following are a coulee workflows to illustrate use cases.

A user opens a large solid model in PreForm, and then they orient and position the model, then they generate supports. For the next step they export the sliced model (specifically the slice-plane/model intersection) they then run this through a third party tool which will analyze the slices. First it will report any unsupported minima as a double check that the model is sufficiently supported, if it isn’t the user can go to Preform and add supports as necesarry then re-export. Once the model is sufficiently supported the tool will modify the exported slices to hollow out the model and add a minimal drain hole at the lowest point and internal supports where necesarry. These modified slices are then imported back into Preform to have flp’s generated and sent to the printer to print. I recognize that this can all be achieved in the 3D space but much of it is significantly easier both algorithmically and computationally in discrete 2D slices. And I know other slicers can calculate perimeters, however they can’t do it after Preform has added position, orientation, and supports unless you provide some way to export at that stage in the process. Also the real utility of this would be the ability to import perimeters and have Preform generate flp’s and print.

Another usefull tool for opening the Preform print pipeline would be an interface for exporting and importing support points.

I do recognize both of these requests are really more about opening the Preform platform than access to the Form1 / Form1+ printer itself, however they would provide a lot of utility to users.

Once again I’ll ask if there is any intention to bring this to the Form 2?

The focus of OpenFL is to provide tools to drive a simple SLA system. We included PreForm changes to allow some features we expect to be be popular for resin development, but the focus is really on a simple SLA API and as a result we have no immediate plans to bring this sort of functionality to the Form 2. We will certainly keep it in mind as we see what people do with OpenFL, of course.

Well that really sucks for me and anyone else who has traded up to the newer model. Despite the fact I know it’s not what you guys intended it still kind of feels like I was penalized for continualy supporting you guys.

I noticed on your GitHub you had some reference to pin outs used for bi-directional serial communications. Some additional questions from a novice:

  1. I didn’t find the explanation in the document to revealing, could you explain it to me in a little more detail what we can do with that serial line?
  2. Can we tap the serial line to examine communication on those pins?
  3. Are there similar pins on the board that could be tapped for direct access using OpenFL?
  4. For that matter, are there any open pin out diagrams for the Form 1+ control boards?

Thanks for getting to my questions!

Joseph