Activity for IfcOpenShell

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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.

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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.

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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.

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    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.

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    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...

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    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.

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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.

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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.

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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.

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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...

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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...

  • Peter Thompson Peter Thompson modified a comment on discussion Open Discussion

    @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...

  • Peter Thompson Peter Thompson posted a comment on discussion Open Discussion

    @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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    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...

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    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...

  • Mykhailo Mykhailo posted a comment on discussion Development

    Thank you for your help!

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Development

    Have a look at ifcpatch with the ExtractElements recipe. https://docs.ifcopenshell.org/autoapi/ifcpatch/recipes/ExtractElements/index.html#module-ifcpatch.recipes.ExtractElements

  • Mykhailo Mykhailo posted a comment on discussion Development

    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...

  • schmobi schmobi posted a comment on discussion Help

    Thank you very much!

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    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).

  • schmobi schmobi posted a comment on discussion Help

    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!

  • Lev Lev posted a comment on discussion Open Discussion

    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.

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    https://github.com/IfcOpenShell/IfcOpenShell/issues/4287#issuecomment-1925241676

  • Lev Lev posted a comment on discussion Open Discussion

    Seems like latest version of IfcOpenShell does not work for Blender 4.0

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    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.

  • schmobi schmobi posted a comment on discussion Help

    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!

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    https://github.com/IfcOpenShell/IfcOpenShell/discussions/4341#discussioncomment-8529993

  • gual gual posted a comment on discussion Open Discussion

    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?

  • Franciane Pereira Franciane Pereira modified a comment on discussion Development

    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.

  • Franciane Pereira Franciane Pereira posted a comment on discussion Development

    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.

  • jack austin jack austin modified a comment on discussion Help

    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.

  • jack austin jack austin posted a comment on discussion Help

    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.

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    Material is not a Property Set, but an Association. for rel in inst.HasAssociations: if rel.is_a('IfcRelAssociatesMaterial'): rel.RelatingMaterial

  • Simon Wiertz Simon Wiertz posted a comment on discussion Open Discussion

    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.

  • Simon Wiertz Simon Wiertz posted a comment on discussion Open Discussion

    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.

  • warpino warpino posted a comment on discussion Help

    Thanks a lot, can you tell me how should I rewrite my code then?

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    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

  • warpino warpino posted a comment on discussion Help

    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...

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    I think what you're looking for is IfcExtendedMaterialProperties in IFC2X3.

  • warpino warpino posted a comment on discussion Help

    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...

  • Daniel Peel Daniel Peel posted a comment on discussion Open Discussion

    Thanks Thomas - apologies, i should have looked at the schemas - a simple change to IFC4X3 fixes my problem.

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    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

  • Daniel Peel Daniel Peel posted a comment on discussion Open Discussion

    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>...

  • Daniel Peel Daniel Peel posted a comment on discussion Help

    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.

  • Daniel Peel Daniel Peel posted a comment on discussion Help

    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",...

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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)...

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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)...

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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,...

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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)...

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    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?

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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?

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    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?

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    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?

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    Yes, but that's on failing to install mathutils, apparently nobody seemed to bother to fix that https://github.com/IfcOpenShell/IfcOpenShell/actions/runs/6150871394/job/16689762612#step:6:158 All help welcome :)

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    Thank you so much. Although I've seen your push hasn't passed the tests in github.

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    You're right should be fixed as of https://github.com/IfcOpenShell/IfcOpenShell/commit/7541293a3c06fff31b9ebf8502bdb49f9ee04bd1

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    I updated my IfcConvert from 0.5 to 0.7 and now it is no longer case-insensitive although the doc says otherwise (https://blenderbim.org/docs-python/ifcconvert/usage.html). You can see what I mean with this example: /IfcConvert /mnt/c/Users/…/ifc.ifc /mnt/c/Users/…/obj.obj --include entities IFCSLAB IfcOpenShell IFC2X3 IfcConvert 0.5.0-dev Scanning file... Done scanning file Creating geometry... Done creating geometry (30 objects) Conversion took 0 second ./IfcConvert /mnt/c/…/ifc.ifc /mnt/c/Users/…/...

  • Miquel Sala Miquel Sala modified a comment on discussion Help

    I updated my IfcConvert from 0.5 to 0.7 and now it is no longer case-insensitive although the doc says otherwise (https://blenderbim.org/docs-python/ifcconvert/usage.html). You can see what I mean with this example: /IfcConvert /mnt/c/Users/…/ifc.ifc /mnt/c/Users/…/obj.obj --include entities IFCSLAB IfcOpenShell IFC2X3 IfcConvert 0.5.0-dev Scanning file... Done scanning file Creating geometry... Done creating geometry (30 objects) Conversion took 0 second ./IfcConvert /mnt/c/…/ifc.ifc /mnt/c/Users/…/...

  • Miquel Sala Miquel Sala posted a comment on discussion Help

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;}...

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    All help is welcome on this front :)

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    Thanks a lot, this is excellent!

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    Have a look at https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py and https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcpatch/ifcpatch/recipes/ExtractElements.py

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    I was wondering, did anyone already write a script for splitting an IFC by IfcStorey and for saving it into multiple single storey files? This would be super-useful. I thought I might try my luck before I start writing the script from scratch and ask. Thanks!

  • Ayoub El Hassnaoui Ayoub El Hassnaoui posted a comment on discussion Open Discussion

    Are there new achievements related to this topic? I'm also dealing with the conversion using ifcOpenShell in Python and can't really get any further

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    I have got the iterator to work with this code: def get_bounding_box(ifc_file, ifc_entity_type): bounding_boxes = [] settings = ifcopenshell.geom.settings() settings.set(settings.USE_WORLD_COORDS, True) geom_iterator = iterator(settings, ifc_file, include=ifc_file.by_type(ifc_entity_type)) while geom_iterator.next(): shape = geom_iterator.get() entity = ifc_file[shape.guid] min_coords = [float('inf'), float('inf'), float('inf')] max_coords = [float('-inf'), float('-inf'), float('-inf')] for i in...

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    Many thanks for the hint - I can imagine this could make a huge difference. I still didn't get my code to work with ifcopenshell.geom.iterate(), but if I find a solution I will post it in here.

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    Instead of ifcopenshell.geom.create_shape() you better use ifcopenshell.geom.iterate(). That way there is a global context to share and cache shared representation of various elements, which sounds like in your case it could speed up the runtime quite dramatically. Other than that, IFC allows for some pretty computationally expensive geometric forms.

  • PeterPetersen PeterPetersen modified a comment on discussion Open Discussion

    That's excellent - I managed to extract my XYZ dimensions to a dataframe with the code below. It works great with small amount of objects but when I try to extract all bounding box data from a large file (hospital project, only 50 MB, but a very big building with lots of parts) it takes good half an hour - is this normal or did I mess something with that code? `def process_ifc_element(element): try: settings = ifcopenshell.geom.settings() representation = element.Representation.Representations[0]...

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    That's excellent - I managed to extract my XYZ dimensions to a dataframe with the code below. It works great with small amount of objects but when I try to extract all bounding box data from a large file (hospital project, only 50 MB, but a very big building with lots of parts) it takes good half an hour - is this normal or did I mess something with that code? `def process_ifc_element(element): try: settings = ifcopenshell.geom.settings() representation = element.Representation.Representations[0]...

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    See https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/util/shape.py#L155

  • PeterPetersen PeterPetersen posted a comment on discussion Open Discussion

    Is there a way to calculate the bounding box of an object in IFC without pythonocc-core? By calculating boundig box I mean calculating and not just extracting the data from the IfcBoundingBox (which in case of the files I am parsing does not exist). Ideally if there was a function in IfcOpenShell already - this would be amazing!

  • Daniel Peel Daniel Peel posted a comment on discussion Help

    Many thanks @aothms!

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Help

    See below. You have to actually pass the schema identifier to the file being created. import ifcopenshell from ifcopenshell.api import run # Create a blank model model = ifcopenshell.file(schema="IFC4x3") # Create Spatial Structure project = run("root.create_entity", model, ifc_class="IfcProject", name="Spatial Structure Trial") site = run("root.create_entity", model, ifc_class="ifcSite", name="TrialSite") facility = run("root.create_entity", model, ifc_class="ifcMarineFacility", name="OpenPort")...

  • Daniel Peel Daniel Peel posted a comment on discussion Help

    Im trying to construct a simple spatial structure with IfcOpenShell as a demonstration of the new spatial elements in Ifc4.3 but i cant get it to work (Im a Python / IfcOpenShell novice). Ive re-purposed some code from various examples but i cant get it to work wiht IfcMarineFacility, only with IfcBuilding. Is there something simple that im doing wrong? When i view the .ifc file it seems to have set the schema to Ifc4 (rather than 4.3)? Any guidance would be much appreciated. Dan

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    Currently no such thing exist. Help is always welcome :) https://github.com/IfcOpenShell/IfcOpenShell/issues/203

  • Aurélie Jeunejean Aurélie Jeunejean posted a comment on discussion Open Discussion

    Hi, where can I find the XSD of the XML generated by IfcConvert?

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    It appears you are correct that the deletion of those two files only happens when the serializer object is being destructed https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/serializers/GltfSerializer.cpp#L60-L61 This can be accomplished with del sr in Python, although strictly speaking you never actually know in Python when the object actually gets freed. You might have to add import gc; gc.collect(). The actual result file is a member object of the class https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/serializers/GltfSerializer.cpp#L52...

  • Thomas Krijnen Thomas Krijnen posted a comment on discussion Open Discussion

    Because you've added: with_progress=True You get return a pair of progress as integer and the currently processed elem. So either change to with_progress=False or to for progress, elem in ifcopenshell.geom.iterate(

  • Vidyaranya Malladi Vidyaranya Malladi modified a comment on discussion Open Discussion

    Alternatively, I am trying to convert using ifcopenshell-python, but it seems to fail with errors. Here is the code. fn = ifcopenshell.open(ifc_file) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = ifcopenshell.geom.settings( APPLY_DEFAULT_MATERIALS=True ) settings.set(settings.USE_ELEMENT_GUIDS, True) sr = ifcopenshell.geom.serializers.gltf(glb_file_name, settings) sr.writeHeader() for elem in ifcopenshell.geom.iterate(...

  • Vidyaranya Malladi Vidyaranya Malladi posted a comment on discussion Open Discussion

    Alternatively, I am trying to convert using ifcopenshell-python, but it seems to fail with errors. Here is the code. fn = ifcopenshell.open(ifc_file) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = ifcopenshell.geom.settings( APPLY_DEFAULT_MATERIALS=True ) settings.set(settings.USE_ELEMENT_GUIDS, True) sr = ifcopenshell.geom.serializers.gltf(glb_file_name, settings) sr.writeHeader() for elem in ifcopenshell.geom.iterate(...

  • Vidyaranya Malladi Vidyaranya Malladi posted a comment on discussion Open Discussion

    @aothms, Thank you for your reply, I checked as you suggesed, I noticed only \n characters in the file.

  • Francesco Peverini Francesco Peverini modified a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. Is there another function to call to "close" the serialized file? f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings()...

  • Francesco Peverini Francesco Peverini modified a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. Is there another function to call to "close" the serialized file? ~~~f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings()...

  • Francesco Peverini Francesco Peverini modified a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. Is there another function to call to "close" the serialized file? ~~~ f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings()...

  • Francesco Peverini Francesco Peverini modified a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. Is there another function to call to "close" the serialized file? f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings()...

  • Francesco Peverini Francesco Peverini posted a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings() settings = ifcopenshell.geom.settings(APPLY_DEFAULT_MATERIALS=True)...

  • Francesco Peverini Francesco Peverini modified a comment on discussion Open Discussion

  • Francesco Peverini Francesco Peverini posted a comment on discussion Open Discussion

    I managed to convert the ifc file into a glb file. I used this code, but i have a problem. After i call .finalize() I have to open the glb file and then upload on CMIS but the file isn't already "finished", in my folder there are vertices and indices tmp files yet. f = ifcopenshell.open(filename) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = geom.settings() settings = ifcopenshell.geom.settings(APPLY_DEFAULT_MATERIALS=True)...

1 >