@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).
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.
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
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.
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.
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 :) ...
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.
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.
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)
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.
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))
@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.
@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
@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.
@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.
Comments
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.

i definitely think that would help!
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.
@bernd would this https://github.com/boltsparts/BOLTS/blob/master/bolttools/blt.py be the backend BOLTS API?
Hi guys, sorry for the late answers but here I am.
@bernd
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 aprofiles
folder insidedata
to group these.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.For the same reasons I am a big fan of
json
format, which interestingly is a superset ofyaml
. 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 :)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
Yikes!! What the heck did I do?!? You are too kind ... I wouldn't call it "slightly gone wrong" at all :D :D
That's very nice to see, it could potentially be used for arbitrary sections, I will give it a try one of these days
Looks good but I think we need better names for the columns and we need to agree which properties to include.
@Coen
Thanks!
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.
that is probably my Canadian upbringing (being polite) :)
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.
@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 is generally to help where i can while learning how better to navigate in blender and blenderbim ... i'm still very new to it :) ...
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 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.
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 ...
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.
Any library is as good as the data it has, regardless how good the API around is. Thus as more data as better.
just a simple example to access the data from BOLTSFC ... in FreeCAD Python console
it is far late in European working time ... ;-) good night guys
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)
than in python shell
will output for me
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
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.
I got rid of duplicate code for BOLTS pythonpackage
https://github.com/berndhahnebach/BOLTS/compare/071c6ab4a4f308783d88a6e5e8c966b37fb23785...ced0c1bf693892467f0ae6baf3dfe506c8d69406
I think Friday will work for me too.
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
ok lets start 16:15
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
next from my point will be the separation of geometry data in separate yaml files and start normalization of bolts yaml files
cheers bernd
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