Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Options

Current State of Laser Cutting Workflow?

Michael_1Michael_1 Member Posts: 5
I use Onshape primarily to make semi-complicated laser-cut assemblies, doing final layout in Inkscape. Up until now I had been using the right-click -> export to DXF workflow, but it is really tedious. I often have 4 or more of the same part, so while my assembly reflects that I have to manually do the bookkeeping and duplicate the parts in Inkscape (along with doing the general layout).

On top of that, I often hit some sort of bug where a subset of the features in the DXF are in the wrong spot in Inkscape - I'm not sure whose end that's on, but I can generally either fix it by hand or alter the part in some way to get the DXF to generate correctly (usually this happens when the face is generated by a sketch with multiple faces, and properly marking edges as "construction" fixes it). Again, with lots of parts this can be a pain.

In my mind it seems like it should be possible to do this all automatically - take an assembly, find all parts with a given thickness (I put it in a variable at the beginning of all my Part Studios) and then lay them out. How great would that be! I tried the Kiri:Moto slicer, but unfortunately not only did I still have to do manual layout and part selection, but the files it exported subtlety distorted my measurements, wasting an $80 laser cutting job :( I should have double checked the measurements, of course.

Anyway, does anybody have any solution to this? I looked at FeatureScript, but it didn't look like I had access to the dxf export functionality. Maybe the proper third-party API would be able to do this?

Thanks!

Comments

  • Options
    Michael_1Michael_1 Member Posts: 5
    Alternately, if somebody could confirm that it's possible to do this in FeatureScript or the API I would certainly consider building such a laser-cutting export system :)
  • Options
    lemon1324lemon1324 Member, Developers Posts: 223 EDU
    There's an FS project that does that in a non-shape sensitive way here: https://forum.onshape.com/discussion/3910/auto-layout-feature
    Once that lays out the parts you can then sketch on that surface and convert all edges, then right-click/DXF export the sketch.

    Note that since they're doing a rectangular binary tree search, it will in general be a very inefficient layout for non-rectangular parts; currently I just clone all my parts into an extra part studio and transform them by hand before doing the convert to sketch/single export option.

    You may also be interested in a suite of laser-cut design tools I've been working on in FS, including Laser Joint, T-Slot Joint, and Kerf Compensation.  A shape-sensitive auto-layout tool with a better heuristic is on my list of projects to do as I get time.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Options
    Michael_1Michael_1 Member Posts: 5
    That FS is great! I'm having some trouble using "Use" to project everything to a sketch, but I'm sure I'll figure something out. Too bad it doesn't work on assemblies :\

    Your T-Slot tool is great - I'll likely be using that in the future!
  • Options
    Michael_1Michael_1 Member Posts: 5
    Honestly, I think the ideal solution would be to export an .STL or other format and then process it externally - fortunately there seems to be a nice STL library in python, as well as an svg library. Just identify the vertices corresponding to one half of the part (using an ultra-fine resolution) and then build up your SVG with those vertices. If one cares about performance one could handle curves properly (Parasolid format?). Then you have the entirety of the python ecosystem to write the layout code, i.e. using some of the numpy / sci-kit optimization libraries.

    I'll take a stab at it this evening - if I get something I'll post a github link.

     
  • Options
    Michael_1Michael_1 Member Posts: 5
    I've got a starting point up now:

    https://github.com/mharradon/stl2svg

    It turns curves into many small line segments - I'm not sure how laser cutters will handle that, but otherwise it works as long as the part's thinnest dimension is the thickness of the panel and it's aligned with the coordinate axes. I'll be fixing that and adding layout so it exports all the parts to a single file (though Onshape only exports a single copy of the part from assemblies - maybe exporting as a single file keeps track of duplicate parts).
  • Options
    lemon1324lemon1324 Member, Developers Posts: 223 EDU
    I should have said, I'll be doing it as an exercise, just to see how FS deals with it; open-source SVG nesting already exists here in JavaScript form: http://svgnest.com/
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Options
    frank_kroondijkfrank_kroondijk Member Posts: 3
    I'm using slic3r.org (free) to convert stl to svg (slice to svg option). Then have to check in illustrator if dimensions are correct and adjust line colors. Not ideal, but it works.
  • Options
    frank_kroondijkfrank_kroondijk Member Posts: 3
    As I saw my students left in frustration (and myself as well), I developed an online tool for converting a zip from Onshape to SVG. The workflow also includes svgnest.com. So in a few simpel steps you can start lasercutting. Its still in beta, so if you find any issues, please let me know. http://stltosvg.com/  https://youtu.be/07kMsC9Rvmc
  • Options
    ben_bragginsben_braggins Member Posts: 1
    Thats wonderful!
Sign In or Register to comment.