little tool to extract the grid from an ifc file ?
Hi everyone,
I'm looking for a simple little tool to extract the grid from an ifc file. I don't know how to program and I don't use python and ifcopenshell. I tried to create a batch file, but it fails to give me the expected result. Does anyone know a little tool to extract grid values ?
BR
David
Tagged:
Comments
haven't vetted it yet, but might work...
https://chatgpt.com/share/7c5e931e-fb1c-47f1-b467-f7f23f796c3b
Thank you @theoryshaw for your answer.
I tried with ChatGPT to create the batch file ... but it doesn't work yet. I can't work with paid programs, but I will see if IFC explorer could do the job. More complicated for me to play with BlenderBim and IFCOpenShell because I can't install it on my machine. Maybe I'll try if I have some time on my personal machine.
So, If you have another idea (or if someone has already made the Batch file...) don't hesitate ;)
thanks again
David
hi @Dav_id
what is the information you need to extract from grids?
for simple query you can use Spreadsheet Import/Export too
to do it with command line maybe you can use the same query in IFC2CSV, but need to test it
Hi @steverugi
I would like to recover the positions (with IFCCARTESIANPOINT).
ex.
X 0 1500 3000 4500
Y 0 6000 12000
Z 0 200 3200 6200
to find the spacings (from 0.00)
X 0 31500
Y 0 26000
and possibly recover the labels directly (with IFCGRIDAXIS)
I did some tests yesterday with ChatGPT, but there is always a moment when it no longer works.
Do you have an idea?
X 0 31500
Y 0 26000
Z 0 200 3200 6200
and for the label
X A B C D
Y 1 2 3
Z 0.00 +200 +3200 +6200
at the end, i would like to have
David
Hi @Dav_id
does my previous post take you somewhere closer?
it would be helpful if you could put the desired information in a tabular format (spreadsheet-like)
try this please
to get this
Hi @steverugi .
No, as i told to @theoryshaw i can't use BlenderBim ... it's not for my personal usage. I need a simple file (simple like a *.bat) so that my collegues can quickly create their grids (based on the IFC files they received)
BR
David
OK, I now understand
you send an .ifc file with gridlines in it and you want to share that info with your colleagues, is the output above OK? can you snapshot a table ?
If I may ask: where are your colleagues going to create the grid, Autocad?
Hi,No, it's for TEKLA.
Here's the workflow
1. they receive an ifc
2. the ifc is sent in the little tool that I am looking for, just to retrieve the values that I gave earlier in this forum.
3. they retrieve the values to copy them into TEKLA.
D
Maybe you can have something working using IfcCSV with the query generating the table above (AxisTag| x1|y1| x2|y2)
put it into a function with .ifc filename as parameter, and create a .py executable in a .BAT file
a bit above my skills atm but should be possible with a little effort, let's see if anybody else comes to the rescue here..
Something like this?...
from chatgpt: https://chatgpt.com/share/7c5e931e-fb1c-47f1-b467-f7f23f796c3b
thank you for trying to help me but as I can't install blender or ifcopenshell... and my colleagues won't be able to either... I'm going to continue looking for a small program or continue my tests to create a batch.
BR
David
Yesterday I was there... I will continue trying later
what did you use to produce that table?
btw you can use google colab to install ifcopenshell..
Can they/you install anything? or are you looking for a web-based program?
I use a simple .bat file to create a .csv file
It's complicated to ask to install a program for such a simple need. I really prefer the simplicity of a .bat file so I don't have to ask for installation.
do you know a web-based tool?
I think I'll ask tekla to do something
BR
David
hi @Dav_id
I'd like to have a look at it if you don't mind, could you share it? I don't know much about .bat files apart from simple things
thanks
yes, it's a really simple batch file ... juste drag/drop the IFC on the .bat ... really easy to use and without any installation.
here's the code
David
That batch script won't give you the correct values depending on all sorts of factors, like whether or not the grid has a non-zero placement, a rotation, georeferencing, etc. Coordinates are relative to other coordinates so you need to do matrix math. This is where libraries like IfcOpenShell come in.
You don't need admin rights to install either Blender, the BlenderBIM Add-on, Python, or IfcOpenShell. They are all portable (Blender has a zip file, or if you don't want Blender, you can use a portable Python) and you can accompany it with a small Python script that they can drag and drop files onto.
As Moult says, trying to use batch to work with IFC is cursed to say the least. However , if, like me, you like to do things in ways which make very little logical sense and probably don't work in large numbers of use cases - then you can try to use the following batch script.
Big disclaimer that all I tested this on was an IFC from Tekla which contained nothing but an IFCGRID. I have absolutely no idea if it will work for IFCs that are made outside of Tekla, or IFCs with more than a single Grid in them, or on Grids which have been transformed/rotated etc etc.
I really only made this just to see what I could hack together using batch. I am not an expert in batch scripting - in fact I'm very amateur - but this was a fun hack together that taught me some more batch scripting tricks.
Use this entirely at your own risk.
Hi Dion, thank you very much for your feedback and congratulations on everything you do. I have followed your progress from afar since you started BlenderBim... but I lack time to delve (for the moment) into the subjects that speak more to programmers than to me (ifcopenshell...). For the script, as I told you, I am not a coder at all and I am therefore forced to limit myself to asking chatgpt for help to create a simple batch (...) but I keep in mind the possibility to create a script without my colleagues having to do any installations.
For the rest, don't worry, I am well aware of the differences and constraints linked to the positioning of the ifc. I know that there are limits and that we will therefore not spontaneously obtain the same thing with an ifc Tekla as with an ifc revit or archicad...
like @CSN we work with TEKLA, a large quantity of IFCs come from TEKLA (and among these many are in Millimeters and positioned at the origin... because many of them are not produced with the aim of a BIM construction site). So I was looking for a very small and easy solution to help my colleagues create their grid while saving time... and if they have to modify it by hand afterwards, it doesn't matter... modifying the grid n It's not complicated.
@CSN, I tested your batch on the test that I had done (also a simple grid to start with of course) and the result worked as you can imagine :) being consistent with what we need in TEKLA (the GRD file being very simple) ... the approach to an XML file would be much more complex ... I will see that (or not) much later if the desire comes :) ... for information, I tested with another larger project... it didn't work any better than mine ;)...
Thank you all and if by chance someone finds a small program to facilitate the recovery of values, don't hesitate! :) !
BR
David