it is far late in European working time ... ;-) good night guys
it is far late in European working time ... ;-) good night guys
@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
@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.
I got rid of duplicate code for BOLTS pythonpackage
@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
@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
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
This thread has been very active, unfortunately I can't really contribute here since I'm working on my blender and python skills, but I wanted to leave this idea here for you guys to consider.
When you are talking about the weight of steel sections there is a difference in between the theoretical weight and the commercial weight because of the tolerances in the hot rolling process.
You might want to include that commercial weight as well in the data of the property set.
(This difference has been a source of discussion in some of the projects I have seen over the past years.)
depends. Where are you based? If the sections you use from your country are not included xou could provide the data in a structured data format. This is easy and a value contribution allredy.
I'm based in Belgium.
I have a file somewhere with both weights in it for the steel sections that are commonly used here. (HEA, HEB, HEM, IPE, IPN, UPE , UPN)
For the square (SHS), rectangular (RHS) & circular (CHS) sections, cold-formed (CF) or hot-formed (HF), I have some data but it's incomplete since the lists of available sections differs from supplier to supplier.
I will post what I have in a couple of days, I'm a bit of grid right now.
splitted and normalized data file. As an example I did it for L-profiles, Z-profiles an I-profiles.
see data directory https://github.com/boltsparts/BOLTS/tree/master/data
finished section profile normalization. I will leave waschers and hex etc. ATM.
Who ever on this world has profile section data which is not in BOLTS help to improve it to be the most complete profile library
interesting read in the regard of BOLTS interna. ... https://www.bolts-library.org/en/docs/0.3/specification.html
@bernd trying to read the new blt
files I get the following message
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!include'
Do you use any special library to link the yaml file?
Also, I see that the "IPN" file is not formatted as the other files, it has quotes for the keys, and the columns are not aligned. How did you do this alignment?
@bernd let's say that I manage to enrich the table data in the yaml file, when I attempt to write it back I always get sth that looks much worse from what you have there. How can I write back the enriched dictionary in the yaml file in the format you did?
I use this command
with open("path_to_ibeam_hea.yaml", "w") as f:
yaml.dump(profile_data, f, default_flow_style=False)
Both False or True for default_flow_style produce different results from what you have
Honestly, I see quite a bit of friction for anyone that wants to contribute
@Jesusbill said:
@bernd trying to read the new
blt
files I get the following message
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!include'
Do you use any special library to link the yaml file?
You try to read the blt files with yaml an not with BOLTS API ;-)
Yes I hat to tweak YAML. YAML out of the box does not support YAML in YAML. See commit https://github.com/boltsparts/BOLTS/commit/d3aa3706fd235c942a144be1867ac594a0926be9 See this link https://github.com/boltsparts/BOLTS/commit/d3aa3706fd235c942a144be1867ac594a0926be9#diff-9bbdb1d7d220fdea66d052c915f916bf6aa3bf24fc0c2889e11496dc9b8e15bdR30
Login or Register to reply.