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: 762 ✭✭✭✭✭
    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: 762 ✭✭✭✭✭
    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: 216 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: 216 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: 216 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: 216 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: 216 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: 216 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: 39 ✭✭
    note the v 3.1 linked above, there is discussion happening there as well.
Sign In or Register to comment.