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.

50 Digital Joints FeatureScript - I want feedback!

Aaron_HooverAaron_Hoover Member Posts: 35 EDU
First off, big thanks to everyone who has helped me bumble my way through learning FeatureScript so far: @ilya_baran, @lemon1324, @lana, @Jake_Rosenfeld, @mbartlett21, @lana, @kevin_o_toole_1, @NeilCooke (and anyone else I may have missed). This has been a really fun project to cut my teeth on so far.

I've completed a *very* alpha version of 6 of the "50 Digital Joints," namely the "Frame Corner Joints." And, I'd love to get feedback from anyone and everyone both on their behavior/usability as well my approach to implementation. You can find the FeatureScript here: https://cad.onshape.com/documents/23dc8ff499026deeed6aa19e/w/0031df2b6d633ae1a21ed033/e/ecf25bb128148651d6f2a998

Here are some up front assumptions/requirements I make in the code:
  1. Both sides of the joint are rectangular solids of the same thickness that intersect or overlap
  2. The normal of the largest face is assumed the machining axis for the 2.5D joints (I suppose I could ask the user to select these faces, but I wanted to minimize required user input.)
Here are some limitations/areas of improvement:
  1. Though sane intersections should be machinable (ie. radiused interior corners), it's currently possible to create intersections that generate sharp interior corners
  2. Parts with non-rectangular faces will produce "unexpected" results
  3. There is effectively zero exception handling implemented at the moment
  4. The "Jigsaw Miter" is currently limited to 90 degree joints (I couldn't settle on a good way to implement it for other angles)

I know for a fact that there are a lot of ways to get these joints to behave unexpectedly/nonsensically. My goals with this first pass were 1) to begin to learn FeatureScript and 2) to produce useful output assuming the user does something reasonable. Nevertheless, if you find unexpected behavior for what you think are reasonable inputs, I want to hear about it. 

After I tidy up and do some minor refactoring on the Frame Corner Joints, I think I'll move on to the Board Corner Joints (joining flat sheets at 90 degrees), but if anyone has suggestions for other joints (from the library) to implement, I'm all ears. 

Finally, I have solid models for the 50 joints in folders organized they way they are in the original collection. Is there any way to make an entire folder public so that I could share the imported models with the community without having to click each individual file?

Comments

  • lemon1324lemon1324 Member, Developers Posts: 223 EDU
    edited December 2018
    @lana was so helpful as to be mentioned twice!
    I'll take a look when I get some more time to mess around; I've got a deadline coming soon.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,034 EDU
    Could you make the document public, so we can test out the FS?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Aaron_HooverAaron_Hoover Member Posts: 35 EDU
    @mbartlett21 - Done! 
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    Hi Aaron,

    This is looking really good!
    A few suggestions off the top of my head:
    1. I'd use multiple feature studios and import them to keep code in more maintainable chunks.  Having all 50 joints in one tab is going to be hard to use.
    2. When you create construction planes as part of your feature that is not part of the final output, it's best to delete them before the feature completes.
    3. Maybe an offset option (positive and negative)?
    4. The evaluateQuery loop in cutHalfLap looks like dead code.

    Keep going!

    Thanks,

    Ilya


    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • Aaron_HooverAaron_Hoover Member Posts: 35 EDU
    @ilya_baran,
    1. I'd use multiple feature studios and import them to keep code in more maintainable chunks.  Having all 50 joints in one tab is going to be hard to use.
    - I was thinking about that too. I'm thinking of breaking out the generically useful functions into a "utils" FeatureScript like the Laser Joint Utils and then organizing the individual joints based on the classes in the original CD. So, for example, there are four subclasses of frame joints in the original organization: "Cross Joints," "Corner Joints," "Lengthening Joints," and "Stop Lap Joints." I imagine having a feature script for each of these subclasses and allowing the user to select the particular type of stop lap joint, for example, from the drop-down.
    2. When you create construction planes as part of your feature that is not part of the final output, it's best to delete them before the feature completes..
    - Noted
    3. Maybe an offset option (positive and negative)?
    - Can you say more about what you mean here? Offset in which direction?

    4. The evaluateQuery loop in cutHalfLap looks like dead code.
    - Thanks for catching that! 


  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    Your division into feature studios sounds like what I was thinking.

    In terms of offset, I mean that right now, the joint surfaces touch exactly.  I think it would be useful to have the option of offsetting the joint surfaces away from each other, to allow for a fit tolerance, or, in the opposite direction, to overlap each other a little, for example to compensate for kerf when used as a laser cutting template.  See for example allowance in the laser joint feature: https://cad.onshape.com/documents/578830e4e4b0e65410f9c34e/w/d04a088a0a8ab8361a2aa65c/e/dfd5effddfd7f2ecce4b0246
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • Aaron_HooverAaron_Hoover Member Posts: 35 EDU

    In terms of offset, I mean that right now, the joint surfaces touch exactly.  I think it would be useful to have the option of offsetting the joint surfaces away from each other, to allow for a fit tolerance, or, in the opposite direction, to overlap each other a little, for example to compensate for kerf when used as a laser cutting template.  See for example allowance in the laser joint feature: https://cad.onshape.com/documents/578830e4e4b0e65410f9c34e/w/d04a088a0a8ab8361a2aa65c/e/dfd5effddfd7f2ecce4b0246
    This is interesting. I think I need think more about how much manufacturing method-specific information to embed into the FeatureScript. Tool radius seems necessary given its impact on the appearance of the joint. However, for fit tolerances, machinists will typically assume the CAD representation is true and play their tricks in the CAM. One example is oversizing the tool (without changing the actual tool out) for a roughing pass or even just to slightly offset the machined surface.

     I guess I'd love to hear other folks who are fabricating digital joinery's opinion on issue as well. 
  • lemon1324lemon1324 Member, Developers Posts: 223 EDU
    edited December 2018
    The primary reason I included the allowance options in the Laser Joint feature is because on most laser cutters (at least, of the non-industrial laser cutters that hobbyists/students typically have access to), there isn't a CAM software that easily allows you to adjust tolerances; whatever your model is, the laser centerline follows that edge.

    You could make an argument for the feature itself generating nominal geometry and then doing the offsetting separately in Onshape as a specific "prepare for laser" feature, which is why I wrote the Kerf Compensation feature-it just offsets all cut edges of a planar part by half the kerf.

    The Laser Joint allowance options are if you specifically want to adjust the fit of the joint in a non-uniform way.  Honestly, I almost never use it myself; just seemed like it needed to be there to allow for complete control of the joint from the feature.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Aaron_HooverAaron_Hoover Member Posts: 35 EDU
    @lemon1324, yes, that's my thinking as well. CNC routing and machining, in general, with their dependence on separate CAM software are definitely different processes from laser cutting with hobbyist and educational grade systems. 
  • joe_dunnejoe_dunne Onshape Employees, Developers, csevp Posts: 198
    I light if this topic. I thought this video would be well recieved...https://www.youtube.com/watch?v=7ENSUWefCSg

    Joe Dunne / Onshape, Inc.
Sign In or Register to comment.