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.

Auto Layout Feature

2»

Comments

  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 863 ✭✭✭✭✭
    It could be the same repository. I already have more than 140 repositories ;-)
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 863 ✭✭✭✭✭
    edited June 2019
    @MBartlett21I have just add a PR to add a new FS "Set color" that let you set the color RAL from a list and other options ;-)

    See https://forum.onshape.com/discussion/11786/new-fs-set-color-also-ral-color/p1?new=1
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    @emagdalenaC2i @MBartlett21 Currently this uses a rectangular bin-packing algorithm, which has a few established heuristics, and runs pretty quickly.
    Adding smarter nesting requires computation of more complicated representations of the part outline, which is as far as I can tell harder to do with FeatureScript - the best way to go would likely be a port of this algorithm: https://github.com/Jack000/SVGnest to an API-based app.  I'm fairly certain that any more-intelligent nesting algorithm wouldn't run in an acceptable time as a FeatureScript.

    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Trevor_JonesTrevor_Jones Member Posts: 4
    edited July 2019
    Pockets are facing down when nesting. I'd like to make a modification to the script which includes upward-facing pockets as a parameter for part orientation. Anyone have ideas as to the guiding factors behind this new addition? I'm new to coding.
    https://cad.onshape.com/documents/e93dd3392eec43195d591a42/w/64c8672743aee6964cc558b2/e/849a3498fd1fdae38783be30

  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    @Trevor_Jones that's actually on my list of improvements to make.  My approach was going to be a selection box to select faces that must be oriented upwards. If you want to take a stab at it, that would require adding a parameter, and then changing the logic that reorients the parts initially.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Bryan_JuarezBryan_Juarez Member Posts: 1 PRO
    lemon1324 said:
    @Trevor_Jones that's actually on my list of improvements to make.  My approach was going to be a selection box to select faces that must be oriented upwards. If you want to take a stab at it, that would require adding a parameter, and then changing the logic that reorients the parts initially.
    @lemon1324  Could you share any other feature/improvement to approach combinations?  I found a 2.2 version to be a huge help and am wondering if there is a changelog or repo somewhere to follow along with feature updates?  
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Could you share any other feature/improvement to approach combinations?
    I'm not sure exactly what you mean here. In terms of the features I've written, they're pretty feature-complete for what I need them to be, and no one seems to have additional requirements that I think would be in scope.

    I've been busy with grad school recently, so no further updates have actually happened.  Since the documents themselves are the repo, I've been leaving change notes in the properties of each version, as well as at the top of the FeatureScript code.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • kody_moehrkody_moehr Member Posts: 1
    Can anyone offer assistance  on this question? How do I take all the parts in an assembly and put them on the same cutout sheet in this auto layout tool? 
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Can anyone offer assistance  on this question? How do I take all the parts in an assembly and put them on the same cutout sheet in this auto layout tool? 
    FeatureScripts only work in part studios; to layout all components from an assembly, create an in-context part studio, and use a copy in place transform on all of the context items to turn your assembly into a part studio. You can then use the latest version of the feature to lay out your parts: https://cad.onshape.com/documents/576e01dbe4b0cc2e7f46a55d/v/d1b14165899c059cabacdf50/e/887d6e2324589bfd2058c3e1
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Pockets are facing down when nesting. I'd like to make a modification to the script which includes upward-facing pockets as a parameter for part orientation [...]
    I just implemented this, find it here: https://forum.onshape.com/discussion/13562/auto-layout-updated-to-v3-1-oriented-parts#latest
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • jeremy_stevenson916jeremy_stevenson916 Member Posts: 2
    @lemon1324 and @marena_richardson

    Great job - I love this feature script! THANK YOU for your contribution.

    This saved me hours of clicking in assembly mode. And, if I change my design, hours more again.

    Onshape should pick this up and make it a supported feature with a more efficient and (yes, computationally intense layout algorithm). You'll see below how much time I saved, and that likely you could stack everything into 5 sheets instead of the 6 required.






  • John_McCormickJohn_McCormick Member Posts: 9
    Is there any chance of an option to define grain direction on the parts?  Then have the FS layout the parts accordingly?  This might not produce an ideal nesting situation but the final product will look better.  Not being a programmer myself, I depend on all y'alls to get the job done.
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Grain direction is on my list of improvements to make, but no guarantees on when I'll have time to implement it.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • david_lang457david_lang457 Member Posts: 87 ✭✭✭
    note the v 3.1 linked above, there is discussion happening there as well.
  • elton_huangelton_huang Member Posts: 3 EDU
    Great feature that I've been looking for. Thanks for sharing. But I just have one question which may seem obvious somehow that I just didn't get: how do you export that auto layout into DXF for laser cuts? Thanks.
  • david_lang457david_lang457 Member Posts: 87 ✭✭✭
    I have a configuration ('flat') that when unchecked disables the auto layout so I can see things either way, and then I create a drawing with a custom page size large enough to hold everything and insert the part studio with the flat configuration, then export the part studio to DXF or PDF as needed
  • jens_bodaljens_bodal Member Posts: 5
    Is there an automated way to use AutoLayout feature to generate a cut list or overview with dimensions? Best I’ve found so far is to generate a drawing from the generated layout and then add dimensions there. 
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    @jens_bodal there should be a way to do that with Custom Tables, I believe - what information would you want if that were added?
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • james_mcjamesjames_mcjames Member Posts: 2
    For the cut list table it would be great to show the part name, length, and width. A table format like this would allow for exporting to third party material optimizers.

    However, if there was also some way to add the layout to a drawing it could be really helpful to map out all the different parts. In my case, I have a cabinet that I'd like to cut out of a couple sheets of plywood. To do that I need to know exactly where on the sheet to make each cut.

    Thanks for your work on this FeatureScript!



  • levi_rugheimerlevi_rugheimer Member Posts: 2 PRO
    Hello, I'm attempting to use this tool for the first time, and I can't get it to finish the layout with these parts. The reason it isn't working is because it says active sheet medal models are not allowed. However, I am not using a sheet metal model for these parts. Every component is built from extrusions. Can somebody assist me?

    https://cad.onshape.com/documents/31e5ffe7cd8ed3aeb13ac26b/w/237a80a95a86a8c57a5f7248/e/9c736bc64acdb3e7f043419b?renderMode=0&uiState=667a2e14b7bbe013d94cc6d3
Sign In or Register to comment.