opensourceBIM / GltfSerializers

BIMserver that converts a model to binary glTF
17 stars 10 forks source link

Maintain Node names in GLTF Serializer 2 export #6

Open fral8 opened 5 years ago

fral8 commented 5 years ago

Good evening,

I'm working on BIMServer Version: BIMserver 1.5.120

My project Structure is:

Basically I want to download only "SubProject1" using "GLTF Serializer 2" maintaining the name of all nodes.

image

As you can see in the figure I have my node structure (For example the first node that I want to maintain is Muro di base: mattonelle: 3176...) that I need for my successive analysis.

In download phase I submit the payload as:

{

  "token": ""some_data,
  "request": {
    "interface": "ServiceInterface", 
    "method": "download", 
    "parameters": {
      "roids": revisions_array,
      "query": {"includeAllFields":True},
      "serializerOid": ser_OID,
      "sync": "false"
    }
  }
}

Setting query field as the previous code, it doesn't work and all the nodes have name: "Node0", "Node1", ..... How I can perform it?

Regards, F.

rubendel commented 5 years ago

I fail to see why the project structure is relevant for this issue, maybe I am missing something? You should pass only the roid of the last revision of the specific subproject to the download call.

glTF2 is meant to be used for asset transfer, where assets are defined as geometry and everything required to render it. It is not meant to transfer the semantics of a model (like the name of an object).

So if you want to do analytics, I'd go for a different kind of format (like IFC).

fral8 commented 5 years ago

Hello,

The project structure is important because I've seen that selecting the whole project-->Query-->AllObjects-->Pressing download Button and serializer as JSON, in the output I'm able to see some names of nodes. image

As you can see, I'm able to found some index (0,1,2...) that correspond to object in which is reported the name that I'm searching.

This method could be used to link GLTF Nodes to their original names? If yes, How can I obtain data for a single SUbProject?? (Not selecting the whole project but just one subproject) Anyway, if the previous way is not the correct one, I could modify some scripts in order to maintain nodes name? If yes, which ones? Or can I save them in a different file, for example a json as showed in the example below?

{
    "Node0":"Muro di Mattonelle...."
}

The use of GLTF in my project is mandatory, so I have to find a valid solution for the mentioned project.

Very thanks for your support,

Sicerely, F

dradix commented 5 years ago

Hello @fral8 Good afternoon, have you find any solution to link GLTF nodes to the original names?