Closed xeolabs closed 5 months ago
Ok, removed name attribute for sub-items. Only IfcElement derived nodes have a name attribute in latest version 3.2
I'm still getting the name on the root node
- see "Z_UP" on the root in the snippet below
"nodes": [
{
"mesh": 0
},
{
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.12535130977630804,
2.517587661743163,
-0.47145077586174,
1.0
],
"mesh": 1
},
{
"mesh": 2
},
{
"name": "0RDVTmkVv60xF$yp_gU2jx",
"children": [
0,
1,
2
]
},
{
"mesh": 3
},
{
"name": "1$tmFYRHz19vYLD1Ei_BQt",
"children": [
4
]
},
{
"name": "2$GsIqF25CuxDwFY5eDaza",
"children": [
3,
5
]
},
{
"name": "2HFT1tPaLB7PX1UrR6FImw",
"children": [
6
]
},
{
"name": "0oh7FXRJLF8u5Kh$VQeOvS",
"children": [
7
]
},
{
"name": "3YCEIliHvChPu6tL0DJsgj",
"children": [
8
]
},
{
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
-1.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0
],
"name": "Z_UP",
"children": [
9
]
}
],
"scene": 0,
"scenes": [
{
"nodes": [
10
]
}
],
"Z_UP" should be removed too? I thought that one remains
If you were to always have a name on the root node, to indicate something like "Z_UP" or "Y_UP", then I could make convert2xkt
always expect that root name as a special case.
Are we using that root name as such a special case? I lose track..
I don't really need it. I can just remove it, better not to have too many special cases in the code :)
Yip go for it. IMO if we need to know the coordinate frame (Z/Y up) then it should be in the metadata anyway.
Ok, I removed the name "Z_UP" with latest release
When
convert2xkt
parses thescene
hierarchy within the glTF, at eachnode
, it expects aname
attribute only if thatnode
represents an IFC element.ifc2gltf
3.0 appears to be putting aname
on everynode
in the hierarchy. This confusesconvert2xkt
, which creates within the XKT a single object for the rootnode
.For example, in the "wefly" IFC model (attached to this issue),
ifc2gltf
creates a hierarchy like below (some elements removed for clarity).We have a root
node
with name "Z_UP" andconvert2xkt
only creates a single object for that, which gets the all the geometries belonging to the meshes belonging to all it's childnodes
.Can we make it so that only those
nodes
that correspond to IFC elements get aname
?