Profile Section Libraries for Structural Engineering and beyond!

1356

Comments

  • edited September 2021

    @Coen said:
    I was hobbying this saturday and tried to make some profile generator. It was more out of research and interest instead of a serious attempt.
    It's no way near as advanced as your IFC profile tool. @Jesusbill
    This was my attempt, I got a HEA profile table from internet and formatted it to CSV
    It's not very elegant yet as I don't know how to make a fillet radius along the edges the flanges of the profile.

    This is my result:
    ...

    Some question which might be oblivious for most people around (I am a FreeCAD guy).

    How do I execute this code in Blender?

  • @bernd
    Click on the script tab.

    Then open the python file.

  • @bernd said:
    @Jesusbill and @jchkoch
    Would it help if we would sparate the data key from the BOLTS yaml files. Thus we would have one structure file and for each class a file which only contains the pure data from data key. https://github.com/boltsparts/BOLTS/blob/72676c7d413e444/data/profile_i.blt#L60-L83

    profile_i.blt

    would split into:

    profile_i__struct.blt
    profile_i_ibeam_hea.blt
    profile_i_ibeam_heaa.blt
    profile_i_ibeam_heb.blt
    ...
    I like this idea because it would simplify reading the date by a human and tracking changes in the data would be much simpler. Changes in the data should happen only in rare cases wheras changes in the yaml class structure could happen.

    i definitely think that would help!

  • @bernd said:
    I had a look at https://github.com/Jesusbill/BOLTS/blob/43d382a1c450/misc/export_data.py and https://github.com/jchkoch/BOLTS/blob/5b615689d313/misc/calc_structural_properties.py

    Mhh they both just use the data of BOLTS but do not use the BOLTS API to access the data. I must admit doing this is not straight forward ATM. I started to make improvements in this regard.

    maybe I missed but if @bernd you would point me to the right direction, i'd be more than happy to re-write my script to utilize the BOLTS API to access the data.

  • Hi guys, sorry for the late answers but here I am.
    @bernd

    May be we could add something to be able to convert the csv data into the yaml data?
    Would it help if we would sparate the data key from the BOLTS yaml files. Thus we would have one structure file and for each class a file which only contains the pure data from data key

    I am in favor of splitting the data into csv tables for each family and to yaml metadata files. But I would not favor damping all these into a data folder, I think we need at least a profiles folder inside data to group these.

    I like this idea because it would simplify reading the date by a human and tracking changes in the data would be much simpler. Changes in the data should happen only in rare cases wheras changes in the yaml class structure could happen.

    Would be good to layout the possible cases; why data could change (correction, ammendment, etc) and how to handle each case. As I wrote in a previous comment I do fancy the idea of a unique identifier for each profile and a status property that would allow to know the state in each version of the library. I just throw it out there right now, it is sth to discuss maybe in the future.

    BTW: Before I came to BOLTS I did not know YAML either. Since than I use it everywhere in favour of xml, csv and whatever. Since it is so easy to read and write by Python and can be edited.

    For the same reasons I am a big fan of json format, which interestingly is a superset of yaml. My vote is for json, which I think it is easier to edit and looks like a python dictionary, but I can live with yaml as well :)

    I have never created widgets for Blender thus ATM I have no idea if it would be possible to reuse the PySide code to create a gui for Blender.

    Blender has its own api for gui so it is not possible to reuse that code, it can give a direction though. But I feel the simplest way for now is to go with the Ifc Project Libraries

    @jchkoch

    I took another look at your csv files for the section properties in the BOLTS repo and I think somehing must have slightly gone wrong as all of the profiles within each "table" (i.e. HEA, HEB, HEM, IPE, etc.) only seem to have the properties for the largest profile per table.

    Yikes!! What the heck did I do?!? You are too kind ... I wouldn't call it "slightly gone wrong" at all :D :D

    To recalculate myself I used the sectionproperties python package to compute the structural section properties

    That's very nice to see, it could potentially be used for arbitrary sections, I will give it a try one of these days

    So for now I wrote the data results as csv files

    Looks good but I think we need better names for the columns and we need to agree which properties to include.

    @Coen

    That is absolutely awesome!!!

    Thanks!

    It's no way near as advanced as your IFC profile tool.

    Well it's mostly work done by @Moult honestly :)

    So, how do we proceed right now, should we try to arrange a call in the next days and decide the next steps?
    Or do we continue discussing here? Or open an issue in GitHub?
    My intention would be for the coming weeks to enrich existing profiles and add at least some of the US profiles (W, HSS, C) and create the Ifc Project Libraries from there.
    Also, I would like to add other types, mostly materials (concrete, timber, steel) and eventually material-layer-sets for Cross-Laminated-Timber panels (I am sure @jchkoch can appreciate as well ;)), etc. I do have tables for all these where we could start off.

    theoryshaw
  • @Jesusbill said:

    I took another look at your csv files for the section properties in the BOLTS repo and I think somehing must have slightly gone wrong as all of the profiles within each "table" (i.e. HEA, HEB, HEM, IPE, etc.) only seem to have the properties for the largest profile per table.

    Yikes!! What the heck did I do?!? You are too kind ... I wouldn't call it "slightly gone wrong" at all :D :D

    that is probably my Canadian upbringing (being polite) :)

    To recalculate myself I used the sectionproperties python package to compute the structural section properties

    That's very nice to see, it could potentially be used for arbitrary sections, I will give it a try one of these days

    So for now I wrote the data results as csv files

    Looks good but I think we need better names for the columns and we need to agree which properties to include.

    yes, i took my lead from the section-properties python package as to names for the columns aka which properties to include as I generally like the approach to generalize the names of the properties to be useful regardless of the material used. But I am definitely open to other schemes.

    So, how do we proceed right now, should we try to arrange a call in the next days and decide the next steps?
    Or do we continue discussing here? Or open an issue in GitHub?

    @Jesusbill @bernd @coen i think a call would be definitely be helpful to help decide next steps. I'm generally available in the evenings (European time) as I work full-time as a structural engineer.

    My intention would be for the coming weeks to enrich existing profiles and add at least some of the US profiles (W, HSS, C) and create the Ifc Project Libraries from there.
    Also, I would like to add other types, mostly materials (concrete, timber, steel) and eventually material-layer-sets for Cross-Laminated-Timber panels (I am sure @jchkoch can appreciate as well ;)), etc. I do have tables for all these where we could start off.

    my intention is generally to help where i can while learning how better to navigate in blender and blenderbim ... i'm still very new to it :) ...

    Jesusbill
  • edited September 2021

    For the same reasons I am a big fan of json format, which interestingly is a superset of yaml. My vote is for json, which I think it is easier to edit and looks like a python dictionary, but I can live with yaml as well :)

    just to add my two cents, adding structural properties to the tables (depending on how many of course) increases the amount of data that needs to be stored and from my perspective makes it more complex to read / write into python to compute the structural properties (perhaps I'm just not aware how to properly serialize the data with compression maybe???); on the otherhand as it is a database that we are creating it really only needs to be computed "once" or when revisions are required (i.e. due to changes in fabrication methods/tolerances) so maybe tishe extra complexity is not a issue. that being said i'm open to either option.

  • @jchkoch

    i think a call would be definitely be helpful to help decide next steps. I'm generally available in the evenings (European time)

    I think we are all in European time, I am mostly available throughout the day

    Regarding the data formats I feel csv is the easiest to deal with for tabulated data, even for contributions from people that may not be comfortable with executing code, but for metadata I reckon a dictionary-type format is much better.

  • edited September 2021

    @Jesusbill said:
    @jchkoch

    i think a call would be definitely be helpful to help decide next steps. I'm generally available in the evenings (European time)

    I think we are all in European time, I am mostly available throughout the day

    We definitely should to this. I work as full time structural engineer too. Since there is a new baby around outside European working there is rare time range for a call (Accept you guys would like to call in the middle of the night when all the others are asleep :-)). Thus European working time perfectly fits for me if I do not have any meetings.
    cheers bernd

  • I had a closer look. I did not use the API myself either. I have just used BOLTS for years and added profile sections. Since the original author has left the project and I continued to use BOLTS I started to fix any upcoming bug and eventually I was the maintainer ...

    May be one important information! From readme ...
    _ This repository contains all the tools and data that are required to build the different distributions and the website. You only need to get the content of this repository if you want to contribute content to BOLTS or want to develop the tools that are used to manage it.

    If you just want to use BOLTS, then you should get the BOLTS distribution for the CAD tool of your choice ... _

    ATM there are distributions for FreeCAD, OpenSCAD and there is a alfa version for Nemetschek Allplan which is used only by me.
    Installing for FreeCAD is very easy. Just use the AddOn manager of FreeCAD. This is called BOLTSFC. That is the reason for having two repos on github.
    If FreeCAD is installed a distribution can be directly created out of BOLTS code and started with FreeCAD (it even starts FreeCAD with the code from BOLTS regardless even if BOLTSFC is installed). Very handy on one side development can be made, but FreeCAD can be started and used with the release of BOLTSFC too.

    It is not intended to initialize a repo directly out of BOLTS code. It might be possible, but I have never tried.
    Once BOLTSFC is intalled browsing the repo by Python is straight forward pythonic ... I did some helper methods here ...
    https://github.com/boltsparts/BOLTSFC/blob/9897c083b54fc5/BOLTS/init.py#L260-L350

    I have played with BOLTSFC a bit more today ...

    # ************************************************************************************************
    import BOLTS as boltsfc
    rep = boltsfc.repo
    
    # each *.blt file in data directory is a collection
    # a collections consists of classes
    # class and collection names are uniqe in the whole repo
    
    # two possibilities
    # ONE:
    # use iterators from freecad.py in bolttools
    # iterators are not generic, they are implemented in freecad and openscad)
    last_coll = None
    for cl, coll in rep.iterclasses(["class", "collection"]):
        if coll != last_coll:
            last_coll = coll
            print(coll.id)
            print("    - ", cl.id)
        else:
            print("    - ", cl.id)
    
    for it in rep.iterclasses():
        cl = it[0]
        print("{}:\n    - {}\n    - {}\n    - {}\n".format(cl.id, cl.url, cl.source, sorted(cl.parameters.parameters)))
    
    
    # TWO:
    # iterate over the attributes from the repo
    sorted(list(rep.__dict__.keys()))
    for collname, cl in rep.collections.items():
        print(collname)
    
    for clname in sorted(list(rep.names.keys())):
        print(clname)
    
    
    # ************************************************************************************************
    import BOLTS as boltsfc
    rep = boltsfc.repo
    
    # some attributes of repo
    sorted(list(rep.collections.keys()))
    sorted(list(rep.classes.keys()))
    sorted(list(rep.bodies.keys()))
    sorted(list(rep.names.keys()))
    sorted(list(rep.collection_names.__dict__.keys()))
    
    
    # iterators
    for it in rep.iterclasses():
        print(sorted(list(it[0].__dict__.keys())))
    
    for it in rep.iterclasses():
        print(sorted(list(it[0].parameters.__dict__.keys())))
    
    for it in rep.iterclasses():
        print(it[0].id)
    
    for cl in sorted([class_id[0].id for class_id in rep.iterclasses()]):
        cl
    
    for it in rep.iterclasses():
        print(it[0].id)
    
    for it in rep.iterclasses(["class"]):
        print(it[0].id)
    
    for cl, coll in rep.iterclasses(["class", "collection"]):
        print(coll.id, " --> ", cl.id)
    
    for name in rep.iternames():
        print(sorted(list(name[0].__dict__.keys())))
    
    for name in rep.iternames():
        print(name[0].name.__dict__.keys())
    
    for name in rep.iternames():
        print(name[0].name.nice)
    
    
    paullee
  • There might be a distribution needed in pure Python which does not create any geometry, but just has the API and is able to browse the repo.
    Than browsing the repo would be possible even without any CAD.
    Since all bits are there it should not be to much afford to create such distribution.

  • @Jesusbill said:
    My intention would be for the coming weeks to enrich existing profiles and add at least some of the US profiles (W, HSS, C) and create the Ifc Project Libraries from there.
    Also, I would like to add other types, mostly materials (concrete, timber, steel) and eventually material-layer-sets for Cross-Laminated-Timber panels (I am sure @jchkoch can appreciate as well ;)), etc. I do have tables for all these where we could start off.

    Any library is as good as the data it has, regardless how good the API around is. Thus as more data as better.

    Jesusbill
  • edited September 2021

    just a simple example to access the data from BOLTSFC ... in FreeCAD Python console

    import BOLTS as bolts
    cl = bolts.repo.classes["ibeam_hea"]
    cl.parameters.tables[0].columns
    for k, v in cl.parameters.tables[0].data.items():
        print("{}: {}".format(k, v))
    
    
    Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
    [GCC 8.3.0] on linux
    Type 'help', 'copyright', 'credits' or 'license' for more information.
    >>> Gui.runCommand('Std_Workbench',36)
    >>> Gui.runCommand('Std_ViewStatusBar',1)
    >>> import BOLTS as bolts
    >>> cl = bolts.repo.classes["ibeam_hea"]
    >>> cl.parameters.tables[0].columns
    ['h', 'b', 'tw', 'tf', 'r']
    >>> for k, v in cl.parameters.tables[0].data.items():
    ...     print("{}: {}".format(k, v))
    ... 
    HEA100: [96.0, 100.0, 5.0, 8.0, 12.0]
    HEA120: [114.0, 120.0, 5.0, 8.0, 12.0]
    HEA140: [133.0, 140.0, 5.5, 8.5, 12.0]
    HEA160: [152.0, 160.0, 6.0, 9.0, 15.0]
    HEA180: [171.0, 180.0, 6.0, 9.5, 15.0]
    HEA200: [190.0, 200.0, 6.5, 10.0, 18.0]
    HEA220: [210.0, 220.0, 7.0, 11.0, 18.0]
    HEA240: [230.0, 240.0, 7.5, 12.0, 21.0]
    HEA260: [250.0, 260.0, 7.5, 12.5, 24.0]
    HEA280: [270.0, 280.0, 8.0, 13.0, 24.0]
    HEA300: [290.0, 300.0, 8.5, 14.0, 27.0]
    HEA320: [310.0, 300.0, 9.0, 15.5, 27.0]
    HEA340: [330.0, 300.0, 9.5, 16.5, 27.0]
    HEA360: [350.0, 300.0, 10.0, 17.5, 27.0]
    HEA400: [390.0, 300.0, 11.0, 19.0, 27.0]
    HEA450: [440.0, 300.0, 11.5, 21.0, 27.0]
    HEA500: [490.0, 300.0, 12.0, 23.0, 27.0]
    HEA550: [540.0, 300.0, 12.5, 24.0, 27.0]
    HEA600: [590.0, 300.0, 13.0, 25.0, 27.0]
    HEA650: [640.0, 300.0, 13.5, 26.0, 27.0]
    HEA700: [690.0, 300.0, 14.5, 27.0, 27.0]
    HEA800: [790.0, 300.0, 15.0, 28.0, 30.0]
    HEA900: [890.0, 300.0, 16.0, 30.0, 30.0]
    HEA1000: [990.0, 300.0, 16.5, 31.0, 30.0]
    >>> 
    
  • edited September 2021

    it is far late in European working time ... ;-) good night guys

  • edited September 2021

    @bernd said:
    There might be a distribution needed in pure Python which does not create any geometry, but just has the API and is able to browse the repo.
    Than browsing the repo would be possible even without any CAD.
    Since all bits are there it should not be to much afford to create such distribution.

    I did not know it is that easy ...

    branch:
    https://github.com/berndhahnebach/BOLTS/tree/pythonpackage

    related code changes:
    https://github.com/berndhahnebach/BOLTS/commit/acfd973e998249

    print some section data
    https://github.com/berndhahnebach/BOLTS/blob/acfd973e998249/backends/pythonpackage/init.py#L127-L150

    in BOLTS code path in a bash in Debian Buster (should work in windows similar)

    python3 bolts.py export pythonpackage
    python3
    
    

    than in python shell

    bolts_code_path = "/home/hugo/Documents/dev/bolts/"
    import sys
    from os.path import join
    sys.path.append(join(bolts_code_path, "BOLTS", "output", "pythonpackage", "development"))
    import boltspy as bolts
    cl = bolts.repo.classes["ibeam_hea"]
    cl.parameters.tables[0].columns
    for k, v in cl.parameters.tables[0].data.items():
        print("{}: {}".format(k, v))
    
    

    will output for me

    hugo@Ahorn:~/Documents/dev/bolts/BOLTS$ python3 bolts.py export pythonpackage
    Skip vacuum due to license issues
    hugo@Ahorn:~/Documents/dev/bolts/BOLTS$ python3
    Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    >>> 
    >>> bolts_code_path = "/home/hugo/Documents/dev/bolts/"
    >>> import sys
    >>> from os.path import join
    >>> sys.path.append(join(bolts_code_path, "BOLTS", "output", "pythonpackage", "development"))
    >>> import boltspy as bolts
    >>> 
    >>> cl = bolts.repo.classes["ibeam_hea"]
    >>> cl.parameters.tables[0].columns
    ['h', 'b', 'tw', 'tf', 'r']
    >>> for k, v in cl.parameters.tables[0].data.items():
    ...     print("{}: {}".format(k, v))
    ... 
    HEA100: [96.0, 100.0, 5.0, 8.0, 12.0]
    HEA120: [114.0, 120.0, 5.0, 8.0, 12.0]
    HEA140: [133.0, 140.0, 5.5, 8.5, 12.0]
    HEA160: [152.0, 160.0, 6.0, 9.0, 15.0]
    HEA180: [171.0, 180.0, 6.0, 9.5, 15.0]
    HEA200: [190.0, 200.0, 6.5, 10.0, 18.0]
    HEA220: [210.0, 220.0, 7.0, 11.0, 18.0]
    HEA240: [230.0, 240.0, 7.5, 12.0, 21.0]
    HEA260: [250.0, 260.0, 7.5, 12.5, 24.0]
    HEA280: [270.0, 280.0, 8.0, 13.0, 24.0]
    HEA300: [290.0, 300.0, 8.5, 14.0, 27.0]
    HEA320: [310.0, 300.0, 9.0, 15.5, 27.0]
    HEA340: [330.0, 300.0, 9.5, 16.5, 27.0]
    HEA360: [350.0, 300.0, 10.0, 17.5, 27.0]
    HEA400: [390.0, 300.0, 11.0, 19.0, 27.0]
    HEA450: [440.0, 300.0, 11.5, 21.0, 27.0]
    HEA500: [490.0, 300.0, 12.0, 23.0, 27.0]
    HEA550: [540.0, 300.0, 12.5, 24.0, 27.0]
    HEA600: [590.0, 300.0, 13.0, 25.0, 27.0]
    HEA650: [640.0, 300.0, 13.5, 26.0, 27.0]
    HEA700: [690.0, 300.0, 14.5, 27.0, 27.0]
    HEA800: [790.0, 300.0, 15.0, 28.0, 30.0]
    HEA900: [890.0, 300.0, 16.0, 30.0, 30.0]
    HEA1000: [990.0, 300.0, 16.5, 31.0, 30.0]
    >>> 
    
    

    hope you guys like it.

  • @bernd @jchkoch @Coen and any other interested to join.
    What do you think about today or tomorrow at 16:00 CET or at 17:00 CET?

  • @bernd for the python api I would favor a get function that can fetch a dictionary for each family with the unique profile name (or a uuid if we decide to use one) as keys and another dictionary as values which contains the key/value properties, sth like:
    {"HEA100": {"b": 10.0, "h": 20.0}, "HEA200": {"b": 20.0, "h": 40.0}, (...)}
    But we can concentrate first in the data creation and we will figure out this part

  • edited September 2021

    @Jesusbill said:
    @bernd for the python api I would favor a get function that can fetch a dictionary for each family with the unique profile name (or a uuid if we decide to use one) as keys and another dictionary as values which contains the key/value properties, sth like:
    {"HEA100": {"b": 10.0, "h": 20.0}, "HEA200": {"b": 20.0, "h": 40.0}, (...)}
    But we can concentrate first in the data creation and we will figure out this part

    API is very cumbersome for me too, ATM. Thus we surely should extend it, to make it more straight forward to use. This should not be difficault.

  • Friday 16:00 (Berlin, Zürich, Rom) sounds great to me.

    Jesusbill
  • @Jesusbill said:
    @bernd @jchkoch @Coen and any other interested to join.
    What do you think about today or tomorrow at 16:00 CET or at 17:00 CET?
    @bernd said:
    Friday 16:00 (Berlin, Zürich, Rom) sounds great to me.

    I think Friday will work for me too.

  • How do we call?

  • @bernd said:
    How do we call?

    let's use the jit.si platform, just go to this link https://meet.jit.si/openbim

  • merged python package into master https://github.com/boltsparts/BOLTS/commit/7a6da87128d9e7c thus deleted the branch on my BOLTS repo. Some code examples could be found here: https://github.com/boltsparts/BOLTS/blob/09baaffa664ac7803342b591c2bd81e5e5dd54ed/backends/pythonpackage/init.py#L99-L215

    see you later on ...

  • I will be 5 to 10 minutes late probably , sorry but a meeting is currently overshooting

  • @Jesusbill said:
    I will be 5 to 10 minutes late probably , sorry but a meeting is currently overshooting

    ok lets start 16:15

  • edited September 2021

    @bernd said:
    merged python package into master https://github.com/boltsparts/BOLTS/commit/7a6da87128d9e7c thus deleted the branch on my BOLTS repo. Some code examples could be found here: https://github.com/boltsparts/BOLTS/blob/09baaffa664ac7803342b591c2bd81e5e5dd54ed/backends/pythonpackage/init.py#L99-L215

    once again some movement to avoid duplicate code in BOLTS FreeCAD distribution and BOLTS PythonPackage distribution. code examples are now here ... https://github.com/boltsparts/BOLTS/blob/master/backends/common/repo_tools.py#L139-L253

    jchkoch
  • next from my point will be the separation of geometry data in separate yaml files and start normalization of bolts yaml files
    cheers bernd

    jchkochJesusbill
  • in the regard of the table types. There is not code class ATM. There is a list with the allowed types. Some checks are done ... see
    https://github.com/boltsparts/BOLTS/blob/19edff73f7c82e/bolttools/common.py#L84-L87

Sign In or Register to comment.