Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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
NeilCooke
Moderator, Onshape Employees Posts: 5,681
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
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
Senior Director, Technical Services, EMEAI
11
Comments
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
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
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.
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 ?
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:
Rectangle with arcs:
"sequence" : "LALALALA",
The Beam Profile Generator should produce the correct result. I will run a webinar on this in the next week or two.
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!
LearnOnshape facebook group
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?
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
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.
(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
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.
Linked[in]