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.

Adaptive Finger Joints for Streamlined Design of Laser-Cut Structures

lemon1324lemon1324 Member, Developers Posts: 225 EDU
The worst part about designing laser-cut structures in SolidWorks is CADing all of the finger joints between components; even if you use a boolean for half, you need to CAD or pattern one side, and neither is all that nice.

Since I dabble in programming (and wanted an excuse to script something), I took a hack at making a feature to do this automatically, check it out here:
https://cad.onshape.com/documents/576e081de4b0cc2e7f46a8bc/v/08d3dbb92435ba9c7f208b8f/e/40ff5a6e1b07d8361b4747d0


The feature takes as input any number of tab parts that are orthogonal to a single base part.  The size and spacing of the pins are set with minimum and maximum pin widths, with the option to set gap widths that are smaller than the pin widths.  From the chosen target number of pins, the feature picks the closest number of pins that satisfies the constraints on pin widths. And voila, 11 parts joined in a single feature!

Depending on how much time I have I may try to do a shape-sensitive auto-layout and/or kerf compensation tool next.

(also apologies for the code being somewhat of a mess, I just threw stuff together until it worked)
Arul Suresh
PhD, Mechanical Engineering, Stanford University
ldt.png 127.5K
Tagged:

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    As a software engineer, I really appreciate the multiple test cases you built for this feature -- I think that's very much the right approach to feature design.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    Hi @lemon1324. Awesome feature, this is what I need as I am regularly working with laser cut plate's that clip together.

    Made a quick video for you of my second use, with some improvement idea's see here 

    Love to see you keep improving this

    Bruce

    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    @brucebartlett, thanks for the feedback.

    I made a design choice when writing the feature to give priority to the constraints on pin size, rather than the number; I should've named that "preferred number of pins" instead.  This is so that if I use a single feature to connect 10 parts of widely varying sizes to a single base part, the finger sizes still make sense; this is demonstrated in the "Adaptive Pins" tab in the document.

    I also always set up my laser cut parts to have a pin on either end of the part; that is, pin-gap-pin to get a minimum of two rather than gap-pin-gap and a minimum of one, as you did with the second part.

    You can force the preferred number of pins by adjusting the minimum pin width to be very small and the maximum pin width to be very large, so the constraints are always satisfied. With this version of the feature you can get pins not at the edge by flipping which of the pair is the base part, though then it can only operate on two parts at a time.

    I can work on adding options for inverting the sense of the pins (so that, for instance, asking for two pins can give you pin-gap-pin or gap-pin-gap-pin-gap depending on the setting) as well as edge offsets. Corner overcuts and extra offset are good ideas; I'm not sure if it makes more sense to include those directly or as separate features, but I'll give it a go. I am a full-time student though, so no guarantees on how quickly any of this will get implemented.



    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • jonathon_duerigjonathon_duerig Member, Developers Posts: 6 PRO
    FYI, I have built custom features for both dogbones and corner overcuts. See here:

    https://forum.onshape.com/discussion/4150/dogbone-and-corner-overcut-features-for-cnc-router-design

    Feel free to integrate any of that code into your tab/slot feature if you want. The vector math is pretty straightforward.

    Alternatively, people who want could use your tab/slot feature and then add corner overcuts or dogbones to all of the tabs at the same time with mine.

    -D

  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    edited July 2016
    Here's V2.0: https://cad.onshape.com/documents/576e081de4b0cc2e7f46a8bc/v/f5b685783be1771be221efec/e/d09d8d59a03ae246e692cf28

    Incorporated corner overcuts, additional stock clearance, and edge offsets, as well as the option to toggle pin sense.  Thanks for the pointer @jonathon_duerig, adapted parts of your code for the overcuts -- I figured it's cleaner this way than asking a user to manually process what could be many edges.

    @brucebartlett, is this closer to the feature set you wanted?

    Single Joint:


    Toggling Pin Sense:


    Corner Overcuts and Stock Clearance:


    As before, adaptive pin sizing:


    And also, automatic joints for multiple parts:


    Related to this last feature, (and even when regenerating Part Studios with many single joints) I find that while much faster than manually adding everything, Onshape tends to bog down.  Is there a FeatureScript tool to help figure out what is taking the processing time and how to optimize code?  There's a couple places where there's multiple ways to get the geometry I want, and as everything is (as it should be) an abstraction layer away from me, I can't know which is more efficient.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    Unfortunately, we don't yet have a good way of profiling features.  We are working on it...
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • michael3424michael3424 Member Posts: 692 ✭✭✭✭
    @lemon1324 - I'm planning on doing some laser cutting work in a few months and this looks like a terrific feature for much of what I'll be doing.  Thanks for the effort and making it public.

  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    Great tool, Thanks

    Here's a video of me using it on a real project. https://goo.gl/tMyDrE

    Bruce
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    edited July 2016
    The reason the base tab gets offset as well is so that I can handle cases where the tab enters the middle of the base part:

    That being said, now that I think about it, it's not obvious that even in this case you'd want all four surfaces to have an allowance offset.
    I can go in and make the initial offsets only along the dimension of the joint, with the parallel base and tab surfaces as options without making the interface too complicated, I think.

    On that note, future versions will call that offset option "Add allowance" to make it clearer.

    If you want a single tab in the middle with different edge size tabs, you can get that by using edge offset along with choosing 1 tab and flipping pin sense:

    If you want to control the number or edge offset of tabs, it's much easier to do that without adaptive pins; the adaptive pins are primarily there to enable automatic joint generation for a full laser-cut assembly, like the "Lighthouse" demo part studio in that document, which uses a single Laser Joint feature for generating the joints:

    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • vnksvnks Member Posts: 1
    What would it take to add some joints from http://www.flexiblestream.org/project/50-digital-wood-joints ? I'd love to just design some simple furniture in OnShape and go straight from CAD to a CNC router. 
  • DodaschDodasch Member Posts: 5 ✭✭
    How can i combine two pices with this feature who overlap like a X, that i can lasercut the two parts and stack them together.
    I want to make a typecase.
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    @Dodasch
    Sorry, haven't checked the forums in a while.  If you want that type of overlap joint, check out the Lap Joint feature from the Onshape Featurescript page.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • gustavo_olivatogustavo_olivato Member Posts: 1

    It is a brilliant job. Excellent solution with a lot of features and simple to use.

  • romeograhamromeograham Member, csevp Posts: 682 PRO
    edited January 2020
    @lemon1324
    This is a great FeatureScript. The title says Deprecated - is there a new FeatureScript somewhere where development continues?

    [edit]: ah, I see. Here's the latest non-deprecated version, with a great help page and everything: https://cad.onshape.com/documents/578830e4e4b0e65410f9c34e/v/a5c24a6977214781eaf042fa/e/7af109b2f1cead90850525ae


    Thanks!
    Romeo
Sign In or Register to comment.