-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a simple wall with property set and quantity information | IfcOpenShell Academy #4
Comments
Original comment by Omar zerhouni on 2021-01-04 08:12:44 Hi, I am following the recipe, but getting an error in create_ifclocalplacement part. Traceback (most recent call last): File "C:/Users/TOSHIBA/AppData/Roaming/JetBrains/PyCharmCE2020.2/scratches/TestZone.py", line 103, in
File "C:/Users/TOSHIBA/AppData/Roaming/JetBrains/PyCharmCE2020.2/scratches/TestZone.py", line 25, in create_ifclocalplacement
File "C:/Users/TOSHIBA/AppData/Roaming/JetBrains/PyCharmCE2020.2/scratches/TestZone.py", line 17, in create_ifcaxis2placement
File "C:\ProgramData\Anaconda3\envs\EnvPy36\lib\site-packages\ifcopenshell\file.py", line 83, in create_entity
File "C:\ProgramData\Anaconda3\envs\EnvPy36\lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 1478, in add
TypeError: in method 'file_add', argument 2 of type 'IfcUtil::IfcBaseClass *' Is the recipe still operating with the new updates ? |
Original comment by Mohammad Najjar on 2021-07-01 16:40:19 This looks very interesting. I don't know how far this can go! Will we be able to create a bim creation tool starting from here? obviously we can create levels, wall, windows and maybe slabs. So it worth trying. |
Original comment by thomas on 2021-08-07 12:49:18 Be sure to have a look at https://blenderbim.org/ |
When I run the file, I get this error at this line -
How do I get rid of this error? |
Change Since this tutorial has been written there is also |
Hi @aothms, Thank you for your insights. |
There is also ifcopenshell.geom.serialize() and ifcopenshell.geom.tesselate() that work based on the input of a Open Cascade shape. If you're reading mesh data from OBJ it's indeed more efficient to bypass opencascade and write as a IFC faceset directly as suggested by @Moult |
Thank you so much for your help. I created an IFC wall file following this tutorial using my own inputs, I am getting the .IFC file and the python is also not showing errors. However, I am unable to open the ifc file. I have uploaded the python files I have used and a visual explanation of what I have done in the readme file. Please let me know of what mistake I am doing when you're free. |
@keshavanarayan you don't actually assign the wall to the building storey (IfcRelContainedInSpatialStructure) some viewers only show elements that are part of the spatial structure. |
Hi @aothms, Thank you so much. :) |
Hi @aothms, I tried to create a custom wall mesh inspired by the obj2ifc.py file. On running the file I get this error as shown below. I have put my python file in this github repo for your reference. https://github.com/keshavanarayan/ifcwall-test/tree/main
|
If Try:
|
Hi, Thanks for this nice tutorial to teach IFC. I'm single to have a such segfault? See https://github.com/EstebanDugueperoux2/ifc-test to reproduce. Regards. |
@EstebanDugueperoux2 I can't reproduce that. Can you try with the latest version here IfcOpenBot/IfcOpenShell@07ee62e#comments Otherwise open a bug at https://github.com/IfcOpenShell/IfcOpenShell/issues |
Hi @aothms, The reason why I ask this is to create walls in any orinetation in plan and it does not make sense to hard code coordinates in the python file. Or editing the ifcaxis2placement should give the desirable outcome? I think more explanation is needed for the ifcaxis2placement function in ifcopenshell. Can the tutorial for this also be added to this simple wall? I hope that this will be useful for others as well. |
Yes, an IfcRectangleProfileDef could also have been used in this case. If you look at the coords, you see {0 ; 5.0} for X and {-0.1 ; 0.1} for Y. This is the idiomatic way to build a wall prism in IFC, the local direction should follow X.
There are various placements involved. The IfcExtrudedAreaSolid has a placement itself and also the IfcWall.ObjectPlacement is a recursive placement. Both affect the eventual world coordinates of the polyline points.
Exactly. But these days there have also been massive efforts on a high level API that does make more sense. See https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py |
Hi @aothms , Thank you so much for the detailed answer. How do I add color to this wall based on a material? Thank you so much. |
@keshavanarayan have a look at this API call: Essentially you'd be building this structure:
|
Hii, there, |
Does someone know where the ifcfile.createIfcBuilding() method comes from? I cannot find it |
@tomito6 |
Have you read https://blenderbim.org/docs-python/ifcopenshell-python/geometry_creation.html#mesh-representations ? Notice how the lists are nested. |
@yashreadytobox does the sample code work for you in the docs? If so, it must be an issue with your code. At a glance I don't see any errors in your code but you have debug print statements and can you check data types (e.g the error message seems to expect a sequence of ints presumably for the triangle indices). |
This suggests that you are not passing in the |
That's odd. I don't have an explanation for this. The error happens during shutdown of the interpreter, somehow the cleanup order is affected that instances are still being deleted, but the ifcopenshell_wrapper module itself is already being destructed. The error seems to be relatively harmless because it only happens at the finalization time.
line 4826 is in the generated swig code:
The NoneType object is not callable, probably refers to I'm glad you found a workaround. If you manage to discover more information regarding this then let us know. |
#Creating a simple wall with property set and quantity information | IfcOpenShell Academy
url
The text was updated successfully, but these errors were encountered: