Thank you Thomas for replying so quickly, I'm fine when generating mapping and serializer, but the link is wrong when generating the kernel
When compiling ifcgemo, there are frequent linking errors What are the errors?
And I set option(BUILD_SHARED_LIBS "Build IfcParse and IfcGeom as shared libs (SO/DLL)." NO)
Hi, I'm encountering some issues while compiling a dynamic link library (DLL). When compiling ifcgemo, there are frequent linking errors, but ifcparse compiles normally. I'd like to know how to resolve this. I've referred to solutions on GitHub https://github.com/IfcOpenShell/IfcOpenShell/issues/1029 and https://github.com/IfcOpenShell/IfcOpenShell/issues/3785, and here's my CMake configuration, I only need 2x3 and 4x3 , and I set lib .Should I set up anything else? And I have set the build type...
See https://github.com/IfcOpenShell/IfcOpenShell/discussions/6782#discussioncomment-13386978
Hello everyone, I'm reaching out because the script I wrote to validate IFC files against IDS requirements is performing quite slowly. Even with relatively small IFC files (around 20 MB), the validation process can take up to 20 minutes. The function that required most of the processing time is: specs.validate(model) Below is my code for reference: import sys import os import glob import time import ifcopenshell import ifctester from ifctester import ids, reporter def main(): if len(sys.argv) !=...
Thank you Thomas for your quick response and for getting up so early to work. I now understand that although it looks 3D, it actually only takes coordinates on the xoy plane.
A profile in IFC is actually always 2d. This is not very apparent in the schema because the cartesian point can be 2d or 3d. But this is enforced in WR1 https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcArbitraryClosedProfileDef.htm#8.15.3.1.4-Formal-propositions If you run python -m ifcopenshell.validate (install the ifcopenshell python module) on your file it will check the where rules for you.
Hello Thomas, I have a new question while learning about squeezing. I currently have an inclined two-dimensional plane, and I want to get a shape that is stretched along the normal of that plane. However, it seems to project onto the xoy plane first and then become inclined, which is not what I expected. Taking the code below as an example, it generates an inclined square, but if stretched along the normal, it should generate a rectangle with one side length of sqr(2) * 1000. //A slanted three-dimensional...
Thank you, Thomas. I understand my mistake now. I should not use the position of the shape to substitute for the position of the object. Rotating the shape's coordinates will affect the actual coordinates. I appreciate your efforts.
You have a couple more parameters in addExtrudedPolyline. Use the extrusion placement to rotate and supply a direction to extrude not along local Z (see image). Also, the following is not allowed per rule PlacementForShapeRepresentation so use the object position to move the roof in the correct position. https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcProduct.htm 0,//file.addLocalPlacement(0, 0, 0, 0, x, y, z), file.addExtrudedPolyline(item.m_points, 100),
Hello, Thomas. I had some problems creating pitched roofs, and when I spliced together multiple pitched roofs, I found that their z-axis were messy. Here's my code. I'm trying to convert a custom model to ifc format. The parameters in the code are all taken from the model. Is it because there are no intersection points between them after the normals are set?
Okay, thank you for your reply, Thomas. I wonder if there are any other ways to create an equal-thickness arc wall knowing the center, radius and thickness, as well as the radian
OKļ¼Thank you Thomas
The major problem with IFC is that the schema is very extensive and support for the less mainstream entities can vary greatly between implementations. I would recommend against trying to get centerline profiles to work. Rather, use a composite curve with the explicit segments. Personally I also think that center line profiledef is not specified precisely enough for implementations to handle it correctly. I also don't think its useful enough because in case of wall joins you would still either need...
Hello, I'm encountering some issues when trying to create an equal-thickness arc wall. In the IfcCenterLineProfileDef I expected, the two arcs are not parallel but intersecting. I'm wondering if there's something wrong with my usage method. Here is my code. Thank you for your help. IfcSchema::IfcTrimmedCurve create_arc(IfcHierarchyHelper<ifcschema>& file, double radius, double start_angle, double end_angle) { // center point IfcSchema::IfcCartesianPoint</ifcschema> center = file.addDoublet<ifcschema::ifccartesianpoint>(0,...
Thanks! Does that mean different model may vary where the information is saved and the same code may not be useful among different models?
Thanks! Does that mean different model may vary where the information is saved and the same code may not be useful among different models?
Additional meta-data can be supplied in property sets, have a look at ifcopenshell.util.element.get_psets() but it depends on the model. Computation using your own code can be more robust, consistent and according to the norms and computation method of choice.
I used the ifcopenshell.geom.create_shape function to get mesh and vertices from elements to retrieve the dimension information from elements in IFC. But I am wonderting if I can directly check the dimension information such as length, width and height from IFC?
Hi Thomas, thanks for looking at it and we're eager to test the update. Jos
Excellent, many thanks Thomas!
Hi, thanks for reporting. There are some self-intersection in the profile (see attachment). That should generally be handled, but some bits and pieces were still missing in the transition from v0.7 to v0.8. I'll commit some code changes this evening to get things to convert properly again. Thomas
I know this does not really count as documentation, but Bonsai makes quite some use of it and if you search by the operator names you might be able to mentally reconstruct some of its usage patterns. All help welcome in augmenting documentation :) Might have more luck posting issues at https://github.com/IfcOpenShell/IfcOpenShell/issues src\bonsai\bonsai\bim\module\bcf\operator.py: 54,5: bl_label = "New BCF Project" 69,5: bl_label = "Load BCF Project" 118,5: bl_label = "Unload BCF Project" 128,5:...
I am trying to write a BCF with IfcOpenShell. Is there some sample documentation / code snippet how to do this? On the https://docs.ifcopenshell.org/bcf.html there is only info about loading BCFs... Thanks for help!
Looks like I tried to kill fly with a hammer, the solution was super easy - just use: import ifcopenshell.util.shape verts = shape.geometry.verts
We're having issues with converting our IFC files with custom profiles to step files. It containes a profile with a complex cross section and multiple cutouts. The profile gets converted correctly, but multiple cutouts are missing. Below are the error messages I'm getting. IfcOpenShell IfcConvert 0.8.0 (OCC 7.5.3) Scanning file... Done scanning file Parsing input file took 0 seconds Creating geometry... Done creating geometry (39 objects) Log: [Error] [2024-12-02 10:29:17] {1i2daenw1BV8ttDwXIddhc}...
Hi, I am attempting to extract all vertices from an IFC file and quickly obtain the total volume of the building using SciPy. Unfortunately I am struggling to get all the verts. The issue is, I have to be able to work with all sorts of possible IFC files, some will contain composite parts, some will have profiles and so on. What I cannot manage is to get verts from Profiles. Below is my current code: import ifcopenshell import ifcopenshell.geom import numpy as np from OCC.Core.TopExp import TopExp_Explorer...
Hi, this is not really a question regarding ifcopenshell, but more pythonocc. Maybe isolate the inputs of your boolean op and ask the question https://github.com/tpaviot/pythonocc-core/issues or https://dev.opencascade.org/forums It might help to explicitly calculate in 2d. If this is the vertical face and a horizontal line. Reduce the face to a 2d line segment. Calculate the intersection yourself or use one of the occt apis.
I want to use ifc to complete the path evacuation work. I have completed the extraction of the door center and the room center. Now I want to confirm which lines should be saved by checking whether the line connecting the door center and the room center intersects with the wall, because if the line intersects with the wall, then this path is actually impassable. I use BRepAlgoAPI_Common(edge, face) for intersection judgment, but the shapeType of the intersection result is 0. I don't know what went...
I want to use ifc to complete the path evacuation work. I have completed the extraction of the door center and the room center. Now I want to confirm which lines should be saved by checking whether the line connecting the door center and the room center intersects with the wall, because if the line intersects with the wall, then this path is actually impassable. I use BRepAlgoAPI_Common(edge, face) for intersection judgment, but the shapeType of the intersection result is 0. I don't know what went...
I've tried using an older version of IfcConvert: commit reference, and the output was as expected. I noticed that the issue seems to occur only when using the -j parameter for multicore processing (in this old version). Without this parameter, everything works fine. It seems like a recent update might have introduced this problem.
I've tried using an older version of IfcConvert: commit reference With this version, the output is as expected, so it seems like a recent update might have caused the issue.
I've tried using an older version of IfcConvert: commit reference With this version, the output is as expected, so it seems like a recent update might have caused the issue.
I've tried using an older version of IfcConvert: (https://github.com/IfcOpenBot/IfcOpenShell/commit/f0e03c79df4fe2ee4d4a778bc0402258871426b9#commitcomment-127480286) With this version, the output is as expected, so it seems like a recent update might have caused the issue.
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: And hereās what the resulting OBJ looks like: As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing this issue. Is there something I'm...
Hi everyone, I'm currently facing an issue while trying to convert an IFC file to an OBJ file using IfcConvert. I'm running the following command with the latest version of IfcConvert: IfcConvert.exe path/to/ifc.ifc path/to/obj.obj --y-up However, the output is not as expected. Hereās what the original IFC looks like: [Insert IFC image] And hereās what the resulting OBJ looks like: [Insert OBJ image] As you can see, some columns and beams are missing in the OBJ file. I'm not sure what might be causing...
Finally, I was able to solve the issue by using IfcOpenShell to center the model before performing the IFC conversion. However, I still believe there might be an issue with the --building-local-placement and --center-model parameters that should be investigated. For anyone facing a similar problem, here's the code I used: import ifcopenshell model = ifcopenshell.open('path/to/file/input.ifc') site = model.by_type('IfcSite')[0] placement = site.ObjectPlacement.RelativePlacement placement.Location.Coordinates...
Thank you for your input regarding the large offsets in the coordinates of the .obj file. You were correct in identifying that the issue was related to the IFC being geolocated. By relocating the model back to the origin, the problem was resolved. However, I was only able to achieve this by using Revit and saving a copy of the IFC centered at (0, 0, 0) without geolocation. Using the parameters --building-local-placement or --center-model as you suggested did not yield the expected results. The generated...
I think what might be happening is that there is a large offset somewhere so the coordinates in the .obj are large / far away from origin. This causes issues in software that uses less precision. You might want to try running ifcconvert with --building-local-placment to ignore transformations in the spatial hierarchy from building and upwards where usually such large offsets are introduced.
@aothms - I know this is an old post, but your post specified #define SCHEMA_VERSIONS=(2x3)(4) which includes a typo I think. There should be no '=', so if it's changed to #define SCHEMA_VERSIONS (2x3)(4)" that seems to work. Thanks for the excellent library.
@aothms - I know this is an old post, but your post specified define SCHEMA_VERSIONS=(2x3)(4) which includes a typo I think. There should be no '=', so if it's changed to define SCHEMA_VERSIONS (2x3)(4) that seems to work. Thanks for the excellent library.
@aothms - I know this is an old post, but your post specified define SCHEMA_VERSIONS=(2x3)(4) which includes a typo I think. There should be no '=', so if it's changed to define SCHEMA_VERSIONS (2x3)(4) that seems to work. Thanks for the excellent library.
@aothms - I know this is an old post, but I have the same issue trying to build C++ code, just using the IfcOpenShell/src/Examples/IfcParseExamples.cpp file. Lan Yan seemed to only resolve things by installing an old version, but I want to try to support IFC 4x3, so am assuming that I need the latest code (cloned a couple of weeks ago). I tried adding define SCHEMA_VERSIONS = (2x3)(4)(4x3_ADD2) immediately before ifndef SCHEMA_SEQ as you suggested, with no success. I'm new to the codebases, and I...
@aothms - I know this is an old post, but I have the same issue trying to build C++ code, just using the IfcOpenShell/src/Examples/IfcParseExamples.cpp file. Lan Yan seemed to only resolve things by installing an old version, but I want to try to support IFC 4x3, so am assuming that I need the latest code (cloned a couple of weeks ago). I tried adding define SCHEMA_VERSIONS = (2x3)(4)(4x3_ADD2) immediately before ifndef SCHEMA_SEQ as you suggested, with no success. I'm new to the codebases, and I...
@aothms - I know this is an old post, but I have the same issue trying to build C++ code, just using the IfcOpenShell/src/Examples/IfcParseExamples.cpp file. Lan Yan seemed to only resolve things by installing an old version, but I want to try to support IFC 4x3, so am assuming that I need the latest code (cloned a couple of weeks ago). I tried adding define SCHEMA_VERSIONS = (2x3)(4)(4x3_ADD2) immediately before ifndef SCHEMA_SEQ as you suggested, with no success. I'm new to the codebases, and I...
@aothms - I know this is an old post, but I have the same issue trying to build C++ code, just using the IfcOpenShell/src/Examples/IfcParseExamples.cpp file. Lan Yan seemed to only resolve things by installing an old version, but I want to try to support IFC 4x3, so am assuming that I need the latest code (cloned a couple of weeks ago). I tried adding define SCHEMA_VERSIONS = (2x3)(4)(4x3_ADD2) immediately before ifndef SCHEMA_SEQ as you suggested, with no success. I'm new to the codebases, and I...
I am currently facing an issue while attempting to convert an IFC file to a mesh and subsequently to a point cloud. Despite following the conversion process using IfcConvert to generate a .obj mesh file, I am encountering unexpected results. The ifc I'm trying to convert looks like this [IFC.png]: Initially, the conversion from IFC to .obj using IfcConvert appears correct, as indicated by the attached photo [mesh1.png]: However, upon inspecting the mesh using MeshLab instead of CloudCompare, discrepancies...
I am currently facing an issue while attempting to convert an IFC file to a mesh and subsequently to a point cloud. Despite following the conversion process using IfcConvert to generate a .obj mesh file, I am encountering unexpected results. The ifc I'm trying to convert looks like this: [cid:9e606e94-b97f-437f-a182-97c35e6a7f4a] Initially, the conversion from IFC to .obj using IfcConvert appears correct, as indicated by the attached photo: [cid:df87f4d0-b77a-4b10-a0da-8cd640cae289] However, upon...
I am currently facing an issue while attempting to convert an IFC file to a mesh and subsequently to a point cloud. Despite following the conversion process using IfcConvert to generate a .obj mesh file, I am encountering unexpected results. The ifc I'm trying to convert looks like this: [cid:9e606e94-b97f-437f-a182-97c35e6a7f4a] Initially, the conversion from IFC to .obj using IfcConvert appears correct, as indicated by the attached photo: [cid:df87f4d0-b77a-4b10-a0da-8cd640cae289] However, upon...
Thank you for your help!
Have a look at ifcpatch with the ExtractElements recipe. https://docs.ifcopenshell.org/autoapi/ifcpatch/recipes/ExtractElements/index.html#module-ifcpatch.recipes.ExtractElements
How can I split an ifc file, for example, that consists of six walls into six ifc files? I tried to do it as follows: for i in range(len(assembly_walls)): element_id = assembly_walls[i].id() model = ifcopenshell.file(schema=ifc_object.schema) model.add(ifc_object.by_type('IfcElementAssembly')[i]) model.write(output_file_path). However, I was getting only this part: ISO-10303-21; HEADER; FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); FILE_NAME('','2024-04-29T19:34:38',(),(),'IfcOpenShell...
Thank you very much!
load specific elements by their GUID into the iterator? I saw, one could filter elements like 'IFCWALL' etc., but by guid..? include= excepts either a list of strings in which case it is assumed to be entity types. You can also pass a list of ifcopenshell.entity_instance (that you obtained with file.by_guid).
Hm, I couldnt find how DISABLE_TRIANGULATION gives me IfcGeom::BRepElement. Using get_native() in the iterator works! Is it possible to just load specific elements by their GUID into the iterator? I saw, one could filter elements like 'IFCWALL' etc., but by guid..? I am sorry, just starting off with IfcOpenShell, still need to wrap my head around some things. Great to hear, that the ray intersections might be updated, looking forward to that!
That's an OPEN/SAVE entire IFC project, not import/export. In Blender 3.5 I was able to import IFC object exported from ArchiCAD (not entire project, but selected object) and insert it to the already opened IFC project at a correct place represented in the ArchiCAD. Now I have to open single exported object in a new Blender instance and copy/paste it into the working Blender project.
https://github.com/IfcOpenShell/IfcOpenShell/issues/4287#issuecomment-1925241676
Seems like latest version of IfcOpenShell does not work for Blender 4.0
The setting you're looking for is DISABLE_TRIANGULATION. If you use ifcopenshell.geom.iterator you can also call get_native() regardless of the setting. Btw. we're working on a much more powerful tree implementations. https://github.com/IfcOpenShell/IfcOpenShell/pull/4374 that will eventually also greatly speed up ray intersections. Currently ray intersections are still a bit brute force on the tree. Nothing concrete to show yet, but in a couple of weeks something might be ready.
I want to select elements by a ray. Now loading the whole IFC file in my geometry tree is overkill, I just need two elements by guid. tree.add_element() needs an IfcGeom::BRepElement. How can i create such an element from my shape? I see that using USE_PYTHON_OPENCASCADE and USE_BREP_DATA gives me brep_data and a TopoDS_Compound. I also tried using the iterator, but dont know, how two only add two elements instead of the whole file. Thank you!
https://github.com/IfcOpenShell/IfcOpenShell/discussions/4341#discussioncomment-8529993
In the last version of IFC ( IFC 4.3.2.0 (IFC4X3_ADD2) ) IfcBridgePart inherit from IfcFaciltyPart but in IfcOpenshell it is not possible to define IfcBridgePart for this IFC version. Is it a know issue? When this entity will be define?
Hi, I can't select the base face of an IfcSpace. And I would like to take the edges of this specific face and get the length data for each of them. Could anyone help? I'm using "shape.geometry.faces" to get the faces.
Hi, I can't select the base face of an IfcSpace. And I would like to take the edges of this specific face and get the length data for each of them. Could anyone help? I'm using "shape.geometry.faces" to get the faces.
Hi, just wondering if anyone knows of a free and easy to use online file converter for photographs? They were taken with a nikon camera and are .nef files which I would like to convert to .jpeg. I am using the latest Mint edition which allows me to view them, but I need to convert them for other family members. Thank you.
Hi, just wondering if anyone knows of a free and easy to use file converter for photographs? They were taken with a nikon camera and are .nef files which I would like to convert to .jpeg. I am using the latest Mint edition which allows me to view them, but I need to convert them for other family members. Thank you.
Material is not a Property Set, but an Association. for rel in inst.HasAssociations: if rel.is_a('IfcRelAssociatesMaterial'): rel.RelatingMaterial
Hi, I try to get materials of elements but unfortunately no RelatingMaterials are defined in the Psets. In Blender, however, the material is clearly defined. It appears to be inherited. Is there a way to query the "IFC Object Material" directly as it appears in Blender? Thanks for your help.
Hi, I try to get materials of elements but unfortunately no RelatingMaterials are defined in the Psets. In Blender, however, the material is clearly defined. It appears to be inherited. Is there a way to query the "IFC Object Material" directly as it appears in Blender? Thanks for your help.
Thanks a lot, can you tell me how should I rewrite my code then?
The attribute order is different: ENTITY IfcExtendedMaterialProperties; ENTITY IfcMaterialProperties; Material : IfcMaterial; ENTITY IfcExtendedMaterialProperties; ExtendedProperties : SET [1:?] OF IfcProperty; Description : OPTIONAL IfcText; Name : IfcLabel; END_ENTITY; https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcmaterialpropertyresource/lexical/ifcextendedmaterialproperties.htm
Thanks @aothms but: import ifcopenshell from ifcopenshell.api import run model = ifcopenshell.file(schema='IFC2X3') concrete = ifcopenshell.api.run("material.add_material", model, name="CON01") properties = [model.createIfcPropertySingleValue("ThermalConductivity", "ThermalConductivity", model.create_entity("IfcThermalConductivityMeasure", 3.5), None)] model.createIfcExtendedMaterialProperties('Pset_MaterialConcrete', 'Optional description', properties, concrete) the last command still yields the...
I think what you're looking for is IfcExtendedMaterialProperties in IFC2X3.
Hi all, I managed to add properties to a material in a newly created model using the IFC4 schema, following the example provided here: https://sourceforge.net/p/ifcopenshell/discussion/1782717/thread/c969379de9/ I understand the same does not apply to IFC2X3. In fact, when I try the same procedure, the same command: model.createIfcMaterialProperties('Pset_MaterialConcrete', 'Optional description', properties, concrete) yields: TypeError: in method 'entity_instance_setArgumentAsEntityInstance', argument...
Thanks Thomas - apologies, i should have looked at the schemas - a simple change to IFC4X3 fixes my problem.
There exist three pset templates ./src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC2X3.ifc ./src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4X3.ifc ./src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4_ADD2.ifc I thought that with the latest schema handling changes IFC4X3 will be used for all revisions of IFC4X3 including _TC1. This might be a fairly recent change. Could you update and if issue persists report at https://github.com/IfcOpenShell/IfcOpenShell/issues
Does anyone know if there is some reason pset.add_pset doesnt work with the IFC4X3_TC1 schema? Im trying to create a pset: InstallOccur = ifcopenshell.api.run("pset.add_pset", model, product=pile, name="Pset_InstallationOccurrence") ifcopenshell.api.run("pset.edit_pset", model, pset=InstallOccur, properties={"InstallationDate": "someDate"}) But i get this error: Traceback (most recent call last): File "C:\Users\304398\PycharmProjects\IfcOpenShellTest\ContractMontioringIfcDemo.py", line 44, in <module>...
I found the answer to my own question - thought i would post here in case it helps other newbies. If you look at easch of the modules in the library it gives a really good description of how they work. In some instances this is much easier to follow than trying to find instructions or examples on line. In this case root.create.entity will only add predefinedType and name.
I want to create some piles in an ifc file (which i am creating without any geometry just to demonstrate something). I thought i could add properties just by giving them the attribute name from the ifc schema. This works for 'predefined type' in the example below: pile = run("root.create_entity", model, ifc_class="IfcPile", predefined_type="DRIVEN") run("spatial.assign_container", model, relating_structure=facility6, product=pile) But it doesnt work for say 'tag' in hte example below: pile = run("root.create_entity",...
Following further investigation the issue seems to be somewhat more complex. For some strange reason IfcWalls and IfcDoors (rotated from XY axes) are calculated correctly, whereas IfcSlabs, Beams etc. are calculated wrong when using exactly the same formula. Would be greatful for any hints! Below the code I am using: def get_bbox_local(file, entity): settings = ifcopenshell.geom.settings() elements = file.by_type(entity) for element in elements: shape = ifcopenshell.geom.create_shape(settings, element)...
Following further investigation the issue seems to be somewhat more complex. For some strange reason IfcWalls and IfcDoors (rotated from XY axes) are calculated correctly, whereas IfcSlabs, Beams etc. are calculated wrong when using exactly the same formula. Would be greatful for any hints! Below the code I am using: def get_bbox_local(file, entity): settings = ifcopenshell.geom.settings() elements = file.by_type(entity) for element in elements: shape = ifcopenshell.geom.create_shape(settings, element)...
Following further investigation the issue seems to be somewhat more complex. For some strange reason IfcWalls and IfcDoors (rotated from XY axes) are calculated correctly, whereas IfcSlabs, Beams etc. are calculated wrong when using exactly the same formula. Would be greatful for any hints! Below the code I am using: ~~~ def get_bbox_local(file, entity): settings = ifcopenshell.geom.settings() elements = file.by_type(entity) for element in elements: shape = ifcopenshell.geom.create_shape(settings,...
Following further investigation the issue seems to be somewhat more complex. For some strange reason IfcWalls and IfcDoors (rotated from XY axes) are calculated correctly, whereas IfcSlabs, Beams etc. are calculated wrong when using exactly the same formula. Would be greatful for any hints! Below the code I am using: `def get_bbox_local(file, entity): settings = ifcopenshell.geom.settings() elements = file.by_type(entity) for element in elements: shape = ifcopenshell.geom.create_shape(settings, element)...
Following further investigation the issue seems to be related to IfcBeams only in the test project where I first noticed incorrect dims. It looks like this might be related to calculating bbox for extruded profiles. Did anyone come across similar problems?
I have just realised that the getbbox function gets me the bounding box according to global coordinates. This means that when I use it to calculate size of objects that are rotated from XYZ axes I get incorrect results. Is there any way to use this on the local coordinates? E.g. is there an equivalent of vertices = getvertices(geometry) getting the vertices as per local object's coordinates?
I have just realised that the getbbox function gets me the bounding box according to global coordinates. This means that when I use it to calculate size of objects that are rotated from XYZ axes I get incorrect results. Is there any way to use this on the local coordinates? E.g. is there an equivalent of vertices = getvertices(geometry) getting the vertices as per local object's coordinates?
I have just realised that the getbbox function gets me the bounding box according to global coordinates. This means that when I use it to calculate size of objects that are rotated from XYZ axes I get incorrect results. Is there any way to use this on the local coordinates? E.g. is there an equivalent of vertices = getvertices(geometry) getting the vertices as per local object's coordinates?