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.

Update to Beams Custom Feature

NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
edited June 2020 in FeatureScript
A new version of the Beams Custom Feature is now available which includes:
  1. Cutlists
  2. Feature for tagging imported profiles
  3. Complete 80/20 library
Let's go into these in more detail.

Cutlists:

Click the Custom Tables tab on the right side of the screen to show the cutlist:



  • The cutlist details the profile type and size, length, and quantity for each beam. 
  • The table can be sorted by any column.
  • Data can be exported to a spreadsheet using the "3 dot" menu in the top right corner of the table.
  • Data cannot be populated into a Drawing at this time.
  • All beams of the same profile and length are listed together as one item regardless of any end conditions (such as angles) applied.
  • Beams that include arcs show lengths as approximate/idealized (highlighted in red in the table) due to the calculation of compression/extension of material around bends.
  • Beams that are merged (for example, to make pipes as in the example above) show lengths as approximate in case they include arcs.
  • Straight (not arced) beams may be modified outside of the Beam feature (such as Move Face, Transform (not Scale), Mirror, Pattern, Cut into smaller pieces) and the cutlist will update accordingly.
  • The option for adding the length to a part name has been removed because of any conflicts due to manual modification of geometry (detailed above).
  • The cutlist works with Closed Composite Parts (see "Table" example in the doc).

Tag Profile:

You can now tag sketches of custom profiles so that the name and type of profile is automatically populated into the cutlist and part properties. Add the Tag Profile feature to your toolbar - one Tag Profile feature is required for every profile, but if you are using configurations to drive the size of the profile, you can also configure the values in the Tag Profile feature to update the profile description. See "Custom Profile" and "Custom Frame" in the doc.

80/20 Library:

Finally got around to adding in all the other types and sizes!

Please:
  • Avoid making a copy of this Document, otherwise any future changes will not update automatically. Add it to your toolbar.
  • If you update an older Document, there is always the possibility that the Beams feature may not update as expected. If this should happen, revert back to a previous version.
  • Report any problems or cutlist inaccuracies on the forum or send me a private message.
https://cad.onshape.com/documents/e15c2c668d138f01242d0c80/v/8cf7a3ad38c0e66c3916a0c6/e/bd6831589391741e327fec75
Senior Director, Technical Services, EMEAI

Comments

  • AlexDAlexD Member Posts: 16 PRO
    Thank you Neil, adding Cut list is a cool improvement toward better use of Beams.
  • Henk_de_VlaamHenk_de_Vlaam Member, Developers Posts: 240 ✭✭✭
    edited June 2020
    @NeilCooke,

    I have some simple custom beam profiles that are configuration driven.

     

    I like to use the sketch/config dimensions in the Cutlist column Profile. (The height of the sketch above is equal to the config value ‘Korte (vier)kant’ from ‘Sketch - Vierkant’.)

    In this case: the config variables ‘Korte (vier)kant’ en ‘Lange kant’ as (in this case) ‘2 x 4’.

     

    I do not succeed to  select the config variables to use them in the Profile field.

    As a test I made the text config variable ‘D’ and tried to use that instead of the mm variables. Also without success.

     

    How can I use config values instead of filling in Profile by hand?

    Or also less specific: can you explain more in detail how to make use of configs in a Cutlist?


    Henk de Vlaam (NL)
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    Hi @Henk_de_Vlaam - using config variables would not work since the profile sizes are text and there is no way to convert values to text (you can, but they are always converted to meters). So this is how I am expecting it to work:


    Senior Director, Technical Services, EMEAI
  • Henk_de_VlaamHenk_de_Vlaam Member, Developers Posts: 240 ✭✭✭
    edited June 2020
    Hi @NeilCooke,

    A while after submitting my question and suspecting that Profile could not be filled per config variable, I thought that a configuration list could provide the solution, just like your suggestion.

    Thank you.
    Henk de Vlaam (NL)
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    @NeilCooke

    Would you be able to use my remapVariables function that I use to fill the profile name?
    export function remapVariables(context is Context, text is string) returns string
    {
        // An optimisation if there is no variable references
        if (replace(text, "#", "") == text)
            return text;
    
        var variables is map = getAllVariables(context);
        variables[" "] = ""; // Replace "# " with ""
        var out is string = "";
        const chars is array = splitIntoCharacters(text);
        const charsSize is number = @size(chars);
        for (var i = 0; i < charsSize; i += 1)
        {
            const char is string = chars[i];
            if (char == "#")
            {
                if (i < charsSize - 1 && chars[i + 1] == "#")
                {
                    out ~= "#";
                    i += 1;
                    continue;
                }
                const varName = getVarName(chars, i + 1);
                if (varName != undefined && variables[varName] != undefined)
                {
                    out ~= toString(variables[varName]);
                    i += length(varName);
                }
                else
                    out ~= char;
            }
            else
                out ~= char;
        }
        return out;
    }
    
    function getVarName(chars is array, i is number)
    {
        var out is string = "";
        for ( ; i < @size(chars) && nonSpecial[chars[i]] == true; i += 1)
            out ~= chars[i];
        if (out == "" && i < @size(chars) && chars[i] == " ")
            return " ";
        return out == "" ? undefined : out;
    }
    
    const nonSpecial = function()
        {
            const chars is array = splitIntoCharacters("1234567890_qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM");
            var out is map = {};
            for (var char in chars)
                out[char] = true;
            return out;
        }();

    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Matt_BancroftMatt_Bancroft Member, Channel partner Posts: 6 EDU
    Thanks Neil - the Cutlist really adds value to this already capable feature. Like it.
  • CBowersCBowers Member Posts: 50 PRO

    I'm getting a really tiny gap when trimming profiles. I don't remember this happening on anything else I've done. Did something change?


  • CBowersCBowers Member Posts: 50 PRO

    I see it at the top of the code now. Offset tolerance is set to 0.02mm. Is it not possible to make it 0?

  • gerhald_freriksgerhald_freriks Member Posts: 1
    Hello,

    what is the best way to update the ISO Library. with for example 20x20x2 square tube instead of using the custom profiles ?

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    CBowers said:

    I see it at the top of the code now. Offset tolerance is set to 0.02mm. Is it not possible to make it 0?

    Anything less and Parasolid often fails to trim the beams. Are you using the official latest version (not your own copy)? I'm sure I fixed this after adding cutlists (by offsetting it back 0.02mm after trimming).
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    Hello,

    what is the best way to update the ISO Library. with for example 20x20x2 square tube instead of using the custom profiles ?

    Instructions are here: https://forum.onshape.com/discussion/6326/creating-beam-profiles/p1

    To do this you will have to make a copy of the doc first.
    Senior Director, Technical Services, EMEAI
  • CBowersCBowers Member Posts: 50 PRO
    NeilCooke said:
    CBowers said:

    I see it at the top of the code now. Offset tolerance is set to 0.02mm. Is it not possible to make it 0?

    Anything less and Parasolid often fails to trim the beams. Are you using the official latest version (not your own copy)? I'm sure I fixed this after adding cutlists (by offsetting it back 0.02mm after trimming).

    I am using the official version. Just never noticed the gap before I guess. The gap doesn't seem to be present when the trimmed members are perpendicular to one another. No big deal.
  • BenTaylorBenTaylor Member Posts: 44 PRO
    NeilCooke said:
    CBowers said:

    I see it at the top of the code now. Offset tolerance is set to 0.02mm. Is it not possible to make it 0?

    Anything less and Parasolid often fails to trim the beams. Are you using the official latest version (not your own copy)? I'm sure I fixed this after adding cutlists (by offsetting it back 0.02mm after trimming).
    @NeilCooke I'm seeing the same problem where it doesn't offset the beam back when I trim to parts. It gives me good results when I trim to planar faces, though. I'm using the latest official version (V18), and I've tested it both custom and standard profiles with no difference. Here's an example part studio. 
    Ben Taylor
    Lead Mechanical Engineer @ Healing Innovations
    Onshape Ambassador
  • Ambrose_McCullaghAmbrose_McCullagh Member Posts: 2
    Hi,

    Is there any way to set the decimals displayed by length property. I'd like to be able to round to the nearest mm, I've tried changing the workspace units precision but it didn't seem to affect the beam part names. It would be good to be able to change the cutlist length decimal display as well.



    Thanks,

    Ambrose
Sign In or Register to comment.