Skip to content
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

There is an issue with the downloaded IFC file #1317

Open
jingyangking opened this issue Apr 15, 2024 · 4 comments
Open

There is an issue with the downloaded IFC file #1317

jingyangking opened this issue Apr 15, 2024 · 4 comments

Comments

@jingyangking
Copy link

I would like to ask why the IFC component downloaded from bimserver cannot be opened. Regardless of which version it is, it seems that Revit, ifcplusplus, and Blender cannot be opened after trying, or they are left blank when opened. What is the reason for this? Just like in the picture below, it cannot be opened
image

@hlg
Copy link
Member

hlg commented Jun 27, 2024

Please post the query as source code, not hidden in a screenshot. As far as I can see, your query does not contain any geometry, just the list of building elements. You can have a look into the IFC file to confirm. There are ready-made includes, so that you don't have to write the whole query for the geometry yourself. Try the query below and replace ifc4-stdlibwith ifc2x3tc1-stdlib for IFC2X3 projects.

{
  "type": {
    "name": "IfcStair",
    "includeAllSubTypes": true
  },
  "includes": [
    "ifc4-stdlib:Representation",
    "ifc4-stdlib:ObjectPlacement"
  ]
}

@ayacoub1
Copy link

ayacoub1 commented Aug 25, 2024

I'm currently new to BIMserver and I'm working on creating a Python tool to upload and download IFC files into BIMserver. I've noticed that the downloaded file is empty and the size doesn't match the uploaded one. This issue occurs in both scenarios, using the code and the bimviews interface.

here is the query i am using

{
  "type": {
    "name": "IfcProduct",
    "includeAllSubTypes": true
  }
}

Here are a few questions I have:

  • Where can I learn more about query language?
  • Is there a straightforward way to navigate through projects and download the files I uploaded? How can I retrieve all the file names and IDs using the API?
  • Is there a community link where I can post any issues I encounter?

@zaqifathis
Copy link
Collaborator

Hi @ayacoub1 ,

The query example you provided will not result in a valid IFC file. To be valid, it should always include at least one IfcOwnerHistory and one IfcProject object. For example:

{
"type": {
"name": "IfcProduct",
"includeAllSubTypes": true
},
"includes": [
    "ifc4-stdlib:ContainedInStructure",
    "ifc4-stdlib:OwnerHistory",
    "ifc4-stdlib:Representation",
    "ifc4-stdlib:ObjectPlacement"
  ]
}

You can also check the documentation regarding the query format here

@hlg
Copy link
Member

hlg commented Oct 11, 2024

I am adding some points to Zaqi's previous answer.

Strictly speaking, an IfcProject is not necessary for a valid IFC file, but if there are geometric representations in the file, then they need mandatory representation context where, for example, units are defined. The most common way of providing such context is through an IfcProject, but the include ifc4-stdlib:Representation will take care for the representation and including the context (without a project).

Some software will thus assume a project to be defined and start their interpretation of the file from that entry point, hence show nothing if there is no project. The project is also the root of the hierarchical spatial structure, storeys etc. It is included via the ifc4-stdlib:ContainedInStructure include above.

Owner history is a mandatory attribute for products in IFC2x3, but optional in IFC4. I believe that most software would still process the data when it is missing, even in IFC2x3. The include ifc4-stdlib:OwnerHistory takes care for that. If mandatory, this is for every entity of type IfcRoot - one "owner history" will not be enough.

As said before, if you use IFC2x3 replace ifc4 with ifc2x3tc1, the names of the includes are largely the same. You can also check the sample queries in BIMvie.ws. You may have noticed that writing queries requries in-depth knowledge of the IFC schema. You find the respective documentation at technical.buildingsmart.org.

Your other, general questions are not related to the original issue on the queries. For the API, please consult the wiki. For example, the AdminInterface provides methods to retrieve information about the projects and revisions, but also create new ones and download/upload data.

As for forums and other places for more general discussions and exchange, we currently do not have a dedicated place, but acknowledge the need for it, because this issue tracker is actually for bugs and implementation issues with the BIMserver core, not for questions on its usage, IFC details or general BIM, which come up all too often. We are discussing where to route such questions and requests in the future. There are already some places that are currently used: For specific questions on how to implement clients or plugins for BIMserver and details about its API, you can use Stackoverflow. If there are more BIMserver questions on Stackoverflow, we could renew the tag request. Other software like Xbim also has Stackoverflow tags. There are also (but very few) BIMserver discussions in the OSArch community and there is even a BIMserver tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants