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.

Weldments in Onshape

NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
edited October 2016 in FeatureScript
Hi Everyone, 

I've created a new custom feature called Beams that allows you to build structural steel frames. It creates and trims extruded profiles using sketch lines and arcs. Before you ask, the cutlist capability has not been implemented yet, but you can add your own profiles by importing a DXF (or creating a sketch) in a Part Studio and using the Beam Profile Generator script to populate the LookUpTable in the Beam Profiles tab.

Please try it out and let me know what you think!    onshape.com/featurescript


Director, Technical Services, EMEAI

Comments

  • jackson_kingjackson_king OS Professional Posts: 80 PRO
    Sweet!! I'll give it a try
  • pavel_dergachevpavel_dergachev Member, Developers Posts: 4 EDU
    Excellent! )))
  • david_watkinsdavid_watkins Member Posts: 15 PRO
    Is there anymore info on how to use the Beam Profile Generator script? Each time I try to use it on a sketch nothing seems to happen and I don't get how it should work. 
  • caseymatalonecaseymatalone Member Posts: 2
    Is it possible to get a explanation of how to generate profiles with the Beam Profile Generator script? Just a simple explanation will do. Thank you!
  • chris_8chris_8 OS Professional Posts: 101 PRO
    edited October 2016
    Is it possible to get a explanation of how to generate profiles with the Beam Profile Generator script? Just a simple explanation will do. Thank you!
    edited:

    I thought I had some help for this, but then I realized I was totally lost in between the Be Beam FS and BP Beam Profile Generator, and so... delete delete delete :)
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    edited October 2016
    @david_watkins @caseymatalone @chris_8     

    Yes sorry, the help PDF is a little vague. 

    Create a sketch or import a DXF into a temporary Part Studio, locating it relative to the origin - the origin is where the profile will be initially located. Make sure the origin is at an endpoint or midpoint or absolute center of the profile, and only one of the nine permissible location points.

    Run the Beam Profile Generator script and select one of the outer edges of your sketch, make sure you have the correct units selected. Use the flip arrow to make sure that all your profiles are ordered in the same direction (counter-clockwise preferred).

    Open the FeatureScript notices pane using the  button and copy and paste the results into the Beam Profile tab. If you are creating a whole new category of profiles, just copy the format from one of the ones already there. 

    I will over time populate this table myself to give more profiles choices, so if you have a list of profiles to add, and preferably also have the DXF files, please let me know. It's a fairly arduous task at present - if only @dave_cowden would give me a copy of his DXF script ;)

    Director, Technical Services, EMEAI
  • dave_cowdendave_cowden Member, Developers Posts: 465 ✭✭✭
    @NeilCooke

    Lets work something out-- could we collaborate to build an Onshape app for this? My code is not FS, so it wouldnt be directly helpful to integrate into your code. BUT-- i think we could work out an appstore app where I could integrate the script with your code to create a complete solution.

    If you'll start a thread lets brainstorm it. 
  • dave_cowdendave_cowden Member, Developers Posts: 465 ✭✭✭
    @NeilCook, another idea: can we figure out how to integrate your weldments feature with my existing Ansi steel sections feature:

    https://cad.onshape.com/documents/b66d1ff63684957c167272d8/w/2ac42f22fbfa9366e2f4df35/e/9e194e5d0b05d54162ff3ef0

    I could probably change my feature to create only a profile, which could be a first step input to your weldments ?




  • MaruMaru OS Professional Posts: 18 PRO
    @NeilCooke

    Excellent work on this Neil, been wanting this feature for a few projects that come up.  Potentially a real time saver.  I did try to create a new profile using your instructions above, but ran into perhaps an edge case or perhaps I'm missing something.  Creating a simple rectangle doesn't produce the geometry (gives an error) and creating one with arc's creates the geometry but leaves out the arcs.  I haven't done much FeatureScript coding, so can try to debug as well but thought I'd post as you may have a solution faster than I.  I assume it's something to do with the sequencing of the points/geometry that is skipping entities in these cases...

    Rectangle:

                    "sequence" : "LALALALA",
                            "entries" : {
                                    "2x4" : { "points" : [1, -2, 1, 2, -1, 2, -1, -2, 1, -2] },
                            }


    Rectangle with arcs:                        

                            "sequence" : "LALALALA",
                            "entries" : {
                                    "2x4" : { "points" : [1, -1.75, 1, 1.75, 0.92678, 1.92678, 0.75, 2, -0.75, 2, -0.92678, 1.92678, -1, 1.75, -1, -1.75, -0.92678, -1.92678, -0.75, -2, 0.75, -2, 0.92678, -1.92678, 1, -1.75] },
                            }
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    For a rectangle the sequence should be LLLL and for a rectangle with arcs LALALALA

    The Beam Profile Generator should produce the correct result. I will run a webinar on this in the next week or two. 


    Director, Technical Services, EMEAI
  • MaruMaru OS Professional Posts: 18 PRO
    edited October 2016
    NeilCooke said:
    For a rectangle the sequence should be LLLL and for a rectangle with arcs LALALALA

    The Beam Profile Generator should produce the correct result. I will run a webinar on this in the next week or two. 


    Correct, I just miscopied my code there.  The original version I used was correct and had a sequence of "LLLL".  I generated these with the Beam Profile Generator.

    Just re-tried the code, and seems ok now so perhaps there was a version issue there.  Thanks for the reply, I'll watch out for your webinar!

  • matthew_burridgematthew_burridge Member Posts: 1
    This should overcome one of the (unfortunately) many hurdles for us moving from Solidworks. Really interested to see a webinar on it
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    Finally got a slot in the webinar schedule - 1pm EST on November 9th. I will cover in detail how to use this feature and also how to create your own profiles. Please register here: https://www.onshape.com/weldments-in-onshape-11-9
    Director, Technical Services, EMEAI
  • Ben_Ben_ OS Professional, Mentor, Developers Posts: 282 PRO
    NICE!!! Now get me some sheet metal and I can ditch my other CAD system...
  • Ken_6Ken_6 Member Posts: 2
    When you say, "paste into the Beam Profile Tab" what and where is that exactly? Can't for the life of me find it!
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    @Ken_6 you need to make your own copy of the beam document if you want to create your own profiles. I'll explain all in the webinar. 
    Director, Technical Services, EMEAI
  • doug_scottdoug_scott Member Posts: 9 ✭✭
    My aim is to add a flat steel section 32 x 5 mm, I have followed your webinar, when I edit your Cross Frame I can change from tube to flat.
    But when I edit the  sketch by adding a line, then select it with beam feature fat is not on the list, what have I missed?    
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    Hi @doug_scott - sounds like you might be mixing the beam feature linked from another document and a local beam feature? If you can see the "Be" icon, that means you linked it from another doc, most likely the one from the FS website. If you are editing the Beam Profile tab in the open doc and then testing it locally, you must use the "local" or active FS icon. Hope that makes sense.



    Director, Technical Services, EMEAI
  • doug_scottdoug_scott Member Posts: 9 ✭✭
    Thanks Neil, I have tested it using the local FS icon and it works.
  • jonathon_duerigjonathon_duerig Member, Developers Posts: 6 PRO
    @NeilCooke Is there a timeline on when the video of the webinar on this is going to be released? Since it was last week, I expected it to be available for viewing by now.

    Also, it might be a big improvement to let people just select sketches for their custom profiles rather than requiring them to be added to the standard profile table in code. I've got a working example of this here:

    https://cad.onshape.com/documents/8501f548e87acaf94ae44d67/w/ba54d8fe0cfe8cf85f0c3d7f/e/9c0e39199380f4fb6e2e5076

    Another useful feature would be to add more options for butt ends. For example, when two beams meat at a non-right angle, I often want just one beam to be cut at an angle while the other beam would have a square end.

    -Jonathon Duerig

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    A link should have been mailed out, if not I'll chase it up, but here it is anyway: 
     


    The point about adding them the profile table is so they can be reused with minimal effort. Selecting a profile each time would require creating it for each beam feature.
    Director, Technical Services, EMEAI
  • edward_petrilloedward_petrillo Member Posts: 44 EDU
    @NeilCooke, I cannot create a custom profile.  I made a copy of the Beams document and moved the Beam Feature, Beam Profiles, and Beam Profile Generator tabs to my own document. and followed the process you outlined The attached screenshots show the result.  Please help.



  • jonathon_duerigjonathon_duerig Member, Developers Posts: 6 PRO
    Building up and re-using a library of beam types is very useful. However, I think that there may be a more flexible way of doing this that will remove the need for error-prone copy/pasting and confusing custom variants of the Beam feature.

    (a) Create a Beam Profile Generator feature similar to yours. Let the user specify a category name and select multiple sketches. It will then generate a map using the names of the sketches as keys and your arc/line data structure as values. The entire map will be added to a custom variable via get/setVariable called "BeamLibraryData" or somesuch. The BeamLibraryData is a map where the keys are category names and the values are maps of sketch names to arc/line data structures.

    (b) Create a Beam Library Feature template. A Beam Library statically imports a part studio tab in the document it lives in. It should be renamed by the library creator and pointed at a part studio that has at least one Beam Profile Generator feature in it. It fetches that BeamLibraryData data structure from that tab and whenever it is included in a part studio, it adds all those keys to the BeamLibraryData variable in the current part studio

    (c) Retain the Beam feature as you have it. If it is used in a part studio without a BeamLibraryData variable, then the dropdown category boxes show the default 'standard library'. If the part studio has a BeamLibraryData, then those keys will be added to and/or overwrite the 'standard library' keys.

    Now there are three different ways to use this, all without copying raw code around:

    - A user can include the Beam feature by itself and just start working with standard profiles.
    - A user can include a Beam Library feature somebody else has created. For example, I might create a Beam Library for the various V-Slot extrusions from OpenBuilds. After including the proper Beam Library feature in their part studio, all further Beam features would automatically have an extra selection category corresponding to the items the Beam Library adds to the special BeamLibraryData variable.
    - A user can include a Beam Profile Generator in their part studio. This would let them select a sketch in the part studio to use as a one-off profile for beam features. Then when they use a Beam feature, that part would be included in the dropdown list like any other.

    The main disadvantage of this is that since there doesn't seem to be a direct way for features to pass raw data on, this would use get/setVariable which means that it would be possible for the user to interfere with it if they re-use the same name.

    Anyhow, let me know if you think this overall architecture would be an improvement. If so, the main thing to do firs twould be to run a few tests to make sure that the parameters can be driven by dynamic getVariable calls and the like.

    -D

  • edward_petrilloedward_petrillo Member Posts: 44 EDU
    I've spent several hours trying to generate and use a custom beam profile.  I don't know FeatureScript syntax, so I have to settle for trying to discern patterns in the three FS tabs in the original document to figure out where to paste the code generated by the Beam profile generator.  Pasting the code alone is not sufficient to achieve success- there are apparently other changes that need to be made in the Beam Feature and/or Beam Profile scripts to make them work.  The failure of the "Timber" addition in the webinar is ample evidence of this problem.
    The custom profile capability should not have been disclosed to the OS community at large without a bulletproof, well-documented process for making it work.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,752
    Hi @edward_petrillo - the sole reason the timber example failed in the webinar (which was requested on the fly by someone watching) was that I did not create the sketch on the top plane which is a prerequisite. I know I have not made any documentation on how to do this, the webinar was meant to address that. If you want to send me your profiles I will help you build them. 
    Director, Technical Services, EMEAI
  • edward_petrilloedward_petrillo Member Posts: 44 EDU
    edited November 2016
    Thanks for your reply and offer, I've gotten valuable help from @jonathon_duerig  and I have a couple of new profiles working.  The custom feature would be dynamite if all you had to do was reference a new sketch to get a profile.  If the process were that easy, there would be no need for an ever-growing library of shapes- just generate the profile when the need arises. 
  • fastwayjimfastwayjim Member, OS Professional, Mentor Posts: 219 PRO
    @NeilCooke - This is fantastic! I will be trying this out ASAP!
Sign In or Register to comment.