-
Notifications
You must be signed in to change notification settings - Fork 31
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
Entity Labels are not unique / Entities cannot be indentified #10
Comments
Hi, |
The building has a coffee table that has a inner glass and outer wood surface. And in the GLTF file every mesh has the same entity label (see below) which is a problem because we are not able to match it to the entity labels from the surface styles.
|
Thanks...
If you are far ahead of me a PR is welcome, otherwise I'll have a look.
Best,
Claudio
…On Tue, 3 Nov 2020 at 16:39, RespectableRuessel ***@***.***> wrote:
I think the Builder.cs#352 and Builder.cs#375 lines are on the right track.
foreach (var shapeInstance in shapeInstances.OrderBy(x => x.IfcProductLabel))
if (productLabel != shapeInstance.IfcProductLabel)
Check the product label.
A. If its the same product label (because its ordered) add the mesh to the
group.
B. If the product label does not match create a new group and add the mesh
to it.
A and B are not in there because in the source int productLabel = 0; is
never changed. So the actual comparison is
if (productLabel != shapeInstance.IfcProductLabel)
which is always true.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJY7MNZJHDYZEUKPUNNRETSOAPZZANCNFSM4TIXDYQQ>
.
|
I'll see if I can fix it. I'm sure these lines (productLabel) are not correct, but I'm not sure if this will fix the problem. |
It matters that the code can be synced to the json metadata export.
If you are in doubt I'll give it a go.
…On Tue, 3 Nov 2020 at 16:49, RespectableRuessel ***@***.***> wrote:
I'll see if I can fix it. I'm sure these lines (productLabel) are not
correct, but I'm not sure if this will fix the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJY7MN545TUDEVUH6FLGN3SOARAFANCNFSM4TIXDYQQ>
.
|
I have tested the changes and it looks like the hierarchy is now correct (single parent, one entity label) but the mesh names are now duplicates and I'm not able to get the entity labels for the child elements. Here is what I've done: |
@CBenghi tried a few more solutions but none worked. Would it be possible for you to look at the EntityLabel issue? |
It might take a few days..
Deadline for me on the 3rd December.
Will look into it after that.
A reminder would be appreciated then... I'll have a few things piling up.
thanks,
Claudio
…On Mon, 23 Nov 2020 at 21:45, RespectableRuessel ***@***.***> wrote:
@CBenghiI tried a few more solutions but none worked. Would it be possible
for you to look at the EntityLabel issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJY7MPI7KCBOASTRPL7VSLSRLCVZANCNFSM4TIXDYQQ>
.
|
Will do. Big thanks! |
Reminder ⏰ if you have some time. |
Hello @RespectableRuessel,
In the duplex that I get after conversion there are 215 meshes and they all have different instance names. |
Sry for the late response. Also the mesh instances cannot be identified separately because they all belong to the same parent which only has one GUID. The goal is to identify every mesh by the entity label. That allows us to texturize every mesh based on the material for that specific mesh. The table for example has a glass surface and a wooden frame. But at the moment we are only able to identify the table because its the only element with a GUID / entity label. Thanks again for looking into my problem. |
Ahh sry I found the misunderstanding:
The xBimGltf converter should instead write out several meshes with the entity labels as names instead of one mesh with several primitives. That would allow referencing the unique parts of the table, for example. |
I get it now. I would welcome a PR that implemented this via a configurable flag in the exporter, as I see many scenarios where breaking the sub-meshes might not be beneficial for rendering performance. Thanks, |
Can you point me to the things that I need to resolve the shape instance into the right entity? |
Sorry, I don't understand what you meant here. |
Was a bad explanation by me, what I meant is the following: |
Closed because of #17 |
Hi @CBenghi ,
my team is using the GLTF converter to load IFC models into Unity3d.
While working on the implementation we noticed that there can be duplicate entity labels or that some entity labels belong to the parent and not to the actual entity.
I looked at the GLTF JSON data and noticed that the issue lies in the xBimGltf converter.
The name is always the same with the same entity label (#5984) only with different mesh ids.

In unity the mesh id gets added to the entity label because otherwise the name is not unique.
Our problem is that we need the actual entity ids to match them with existing IFC data.
For example we have a table with different mesh components that have different surface styles but due to the converter issue we get the same entity id for every mesh and therefore cannot match the surface styles to the entity label.
While looking at your code I also noticed some strange lines like
in Builder.cs#375 because you never change the
productLabel
after initializing it to zero in Builder.cs#348.Is it possible to fix these issues?
I would be willing to fix parts of it myself, if you can tell me where exactly our issue is located.
Thanks for reading.
The text was updated successfully, but these errors were encountered: