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.

how to deal with flat panels

david_lang457david_lang457 Member Posts: 71 ✭✭
I tend to do a lot of plywood designs, so I end up with a bunch of rectangles (or rectangles with some pieces missing) of just a few different thicknesses.

Has anyone created tools that can take the 3d parts and easily do things like the following:

1. in a BOM list the dimensions of the parts
2. create an assembly where the parts are all laid flat
3. assemble the flat parts in the assembly into sheets (ideally with a configurable kerf between them) This is a similar problem to nesting parts, but easier in that everything can be considered a rectangle
4. and even more ideally, make it so that all kerfs cut all the way across the configured sheet size
«1

Comments

  • MichaelPascoeMichaelPascoe Member Posts: 1,681 PRO
    Try Auto Layout for nesting within a part studio, you could then insert it into an assembly if you need to. Not sure about the best auto cutlist/BOM.

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    I would rather not have things nested in the part studio (I want to edit things in place in the parts studio and have the nesting, etc happen elsewhere if possible
  • S1monS1mon Member Posts: 2,289 PRO
    @david_lang457
    In case this isn't obvious, keep in mind that Michael said "a" part studio not "the" part studio. The nesting doesn't have to happen in the same studio that was used to create the parts. You can have as many part studios in a document as you want, or you can have them in a separate document - depending on how you want to manage versions and branching.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    edited January 2022
    I have a featurescript that you can use to determine stock sizes
    FS: Stock Size | BOM (onshape.com)

    Here are some example parts with a BOM
    You can see you can specify units, and mix units if needed
    For plywood, you would want to specify "BAR" as the material type to get fractional Inch values.



    Normal use will be as simple and selecting the parts and let it autodetect.
    I use one feature per part style


  • david_lang457david_lang457 Member Posts: 71 ✭✭
    @john_mcclary thanks, that seems to address one of my issues

    @S1mon is there a way to have the same part in multiple parts studios?

     I want it so that when I make a change in one place, the changes show up wherever I am laying the parts flat to nest them. I thought that meant that I would have to do the nesting in an assembly

    I've done this manually, but it is a royal pain to rotate lots of parts, set all the tangent constraints to get things flat (and deal with the cases where onshape decides to do something odd and I have to change the tangent direction) , then arrange and set constraints to align them (which still doesn't allow me to take into account the kerf for cutting)
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    I am being blind here, I'm not figuring out how to use the stock size fs.

    I loaded it into one doc and used it, seems to make no difference (if I create an assembly and load insert things, I see debug data that looks like it's doing the right thing, but I'm not seeing how to add it to the table
    https://cad.onshape.com/documents/9d12db31b4a3ab160749d9db/w/803db6308d778ef4cdab0766/e/93fc9bd5f43ebc4806057704

    I then tried cloning the example, and that doesn't seem to be working for me either I get 'property not found' column in the BOM with no data
    https://cad.onshape.com/documents/f4a4130ff2031c1446b05699/w/569342730494bbce0c5f3964/e/c539f924adec0c8a09be513f

    Is this possibly a feature only available to paid users?
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    Only paid users can create custom bom properties and link a fs to them. 

    I just noticed you are free user. 

    Ether way, you need to copy the fs document and modify the setproperty() function to point to a property to store the data. 
    Line 418 of the code. 

    Being a free user you may have to store the data in an un used property, perhaps title1 or something. 

    https://cad.onshape.com/FsDoc/library.html#setProperty-Context-map
  • tim_hess427tim_hess427 Member Posts: 648 ✭✭✭✭
    @david_lang457 - to get a part into more than one part studio, look at the "derive" feature. By design, the derived part won't automatically update when a change is made in the original studio, but you can tell it to update to the latest version in a couple of clicks. 

    Also, if you're trying to do the nesting in an assembly, use the "Fixed" mate and just add an offset for whatever you want your kerf to be (you can add these offsets to any mate, actually). These will be a lot more stable when you make design adjustments as compared to tangent mate. 
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    Derive will automatically update, in-context is the one that needs to be manually updated 
  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 129 PRO
    edited January 2022
    A bit of clarification, technically both @john_mcclary and @tim_hess427 are right about derive's behaviour.

    When deriving a part from one part studio to another within the same document, the part will automatically update when a change is made to the original part. 

    When deriving a part from one part studio to another in different documents, the part will be under the command of the original document's version control. Any changes made to that part in the original document will not persist unless a version of the original document is made, and the linked document is updated in the external document. 
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    Is there a recommended script available for nesting?

  • S1monS1mon Member Posts: 2,289 PRO
    Is there a recommended script available for nesting?


    Second comment in this thread...

    Try Auto Layout for nesting within a part studio, you could then insert it into an assembly if you need to. Not sure about the best auto cutlist/BOM.

  • edward_petrilloedward_petrillo Member Posts: 78 EDU
    @john_mcclary said:
    Ether way, you need to copy the fs document and modify the setproperty() function to point to a property to store the data. 
    Line 418 of the code. 


    setProperty(context, {

                            "entities" : part,

                            "propertyType" : PropertyType.CUSTOM,

                            "customPropertyId" : customPropertyId,

                            "value" : propertyValue

                        });

    Might you go a step further and post a reply with a revision of the code section that would populate the property "Title1"  to copy and paste?  Much appreciated!



  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    @edward_petrillo

    here is a short clip of all the steps necessary.

    copy the document
    find row 418
    delete 419 also since it's irrelevant unless you are setting a custom property
    then delete up to the period '.' re-type the period and let autocomplete show you all of the available properties to save to.
    then commit.


    if you have the ability to set a custom property, do this instead

    go to your company settings
    find your custom property, or  make one. find the 'copy ID' button to copy it
    copy the document
    find row 419
    replace the customPropertyId with your ID, but put it in quotation marks, since it's a string.
    commit.

  • edward_petrilloedward_petrillo Member Posts: 78 EDU
    @john_mcclary:  Fantastic!!  Thanks for the coaching.  I'm applying the FS to assemblies mainly built from t-slot extrusion, flat plates and an assortment of other extruded aluminum shapes.  So far I've been able to get good dimensions for all types.  "Custom profile" is a neat trick!  This feature will see lots of use.  
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    It definitely saves me many hours per project. Especially with sheetmetal. 
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    I've made progress, I cloned the stock size demo made the edits above and have it working (I put the stock size in title3)

    Then I went to my other document and installed the featurescript from my working demo clone and it's not working in the new doc

    So I went to the clone of the stock size demo, where it's working. I created a derived parts studio from my other project (a simple box with edging) added auto layout and stock size, then created an assembly from that parts studio and edited the BOM table to show title3, and stock size is not working there (same doc, just another tab, this time working with derived parts)

    https://cad.onshape.com/documents/f4a4130ff2031c1446b05699/w/569342730494bbce0c5f3964/e/8d0c400648004191d71c8ed6
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    aaaaand, went to a different doc and it just worked... :-/
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    Is it still not working on the other doc? 
  • david_lang457david_lang457 Member Posts: 71 ✭✭
    nope, the first two docs don't work, but a third does work.
    1. a simple box doc (link in the first post where I said it wasn't working)
    2. the clone of the stock size demo where I added a derived part studio from the doc above (but does work on the demo tab), link a couple posts up 
  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 129 PRO
    That is a very well "crafted" video  ;)
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    edited January 2022
    hey, I was on an expensive food buff leveling up my crafters. :)
    Who says you can't multi-task playing video games and troubleshoot documents?
  • andy_colbornandy_colborn Member Posts: 8 PRO
    @john_mcclary

    My god this tool is fantastic! Totally solves the problem we've been knocking our head against for a couple weeks. 

    One thing I was hoping to was to be able to do was recognize if something was built with the frame tool and map the cut list description to the stocksize parameter along with the length. i.e. 2" PVC Pipe x 108-1/2" rather than the default description

    It looks like your tool is built to do that but using the old beam feature but not yet the new frame tool.



    I imported in what I think is the right library to be able to use the data from the frame tool but couldn't figure out where your code was calling info from the old beam tool. 



    Sorry to impose on your kindness, I'm super new to onshape and even newer to trying to figure out featurescripts.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    Most of the automated stock recognition was done by @MBartlett21

    I'm not sure how he did what he did either  :D
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,033 EDU
    @john_mcclary

    Actually, I don't think I ended up completing it to work with Neil's feature. The import is there, but there is no references to it.
    mb - draughtsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • andy_colbornandy_colborn Member Posts: 8 PRO
    Gotcha. Thanks guys, might end up taking a clumsy crack at it.
  • JPMJPM Member, csevp Posts: 9 PRO
    @john_mcclary
    @MBartlett21

    I was able to get this fantastic feature script running, but I might be missing something. How do I get it to recognize threaded rod, structural shapes, Unistrut ect...? I only see options for Auto, Bar, Round, Pipe, Sheet Metal, Custom.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,883 PRO
    edited August 2023
    For thoes we were buggy when trying to recognize rectangle tube and unistrut. So for all other materials we use the custom

    Then you have to enter a string to represent the profile size, then the feature just appends the length. 

    So for unistrut it would be

    Custom
    "P1000PG" 

    Then the output will be
    P1000PG x 120"

    Or for a 1-1/2" x 2" x 1/8" angle iron

    "1-1/2\" x 2\" x 1/8\""

    Will output
    1-1/2" x 2" x 1/8" x 120"

    You can also put a variable in the custom as long as it still formats like above. 

    So measure the profile and set them as variables and do

    Custom
    D1~"\" x "~D2~" \" x "~D3~"\" w/t"

    Output example 
    3" x 3" x .125" w/t x 120"
  • JPMJPM Member, csevp Posts: 9 PRO
    Okay, that explains it. I think for now, I'll leave the property field editable in the workspace so we can manually enter any custom sizes as we go.

    Thanks!

Sign In or Register to comment.