Hi,
In the CAD files to glb conversion, is there any relationship between ProductOccurrences and the number of meshes created under the group named Productoccurrences in the glb?
I roughly counted the number of TopoBrepData, Connex, Shell and it was not enough and the number of Faces was too much. I was wondering which datastructure the mesh units in the glb correspond to in Hoops Exchange.
Hello @dongho.shin,
When exporting to GLB format, the number of A3DRiBrepModelData is the same as the number of meshes. For example, if there are two A3DRiBrepModelData under ProductOccurrences, you will see two after exporting to GLB. Attached image for reference.
Hello @Man , Thanks for reply always
Can I share you step files and converted glbs as well?(pls let me know how to share)
your screenshot uses
it is not matched A3DRiBrepModelData at Gun.step
Part1-body.2 already not matched A3DRiBrepModel ↔ mesh
GAS.stp, pistol.stp as you say it matched with primitive ↔ BrepModelData
but some step file has not matched
Hello @dongho.shin,
After checking with the engineering team. The A3DRiBrepModelData is divided into various meshes, as HOOPS Exchange need to create a mesh per color / graphical properties. Please refer to the attached image, which corresponds to the “40x40x10 DC Fan.STEP”.
Hi @Man Thanks for Detailed screenshot
In Documentation m_puiStyleIndexesSize 1 means one graphics associated with the face.
then data that means m_puiStyleIndexes[0] right?
number in data(0, 4, 1, 2, 65535 in example fan) means some kind of Id? or count of something?
styleIndexes data works like id
When I collect the numbers in the data of the RiBrepModel’s styleIndexes under ProductOccurrences and add them together, I get the converted mesh numbers for ProductOccurrences.
Finally I would try find connection
ex) DC Fan case(number is not accurate just for explaining what I try to do)
RiBrepModelData(40x40x10 PC Fan)
→ Edge or face Index 0 ~ 10 <= Tess3DFaceData (index 0 ~3) that binds primitive 0
→ Edge or face Index 11 ~ 23 <= Tess3DFaceData (index 4 ~ 11) that binds primitive 1
…
→ -> Edge or face Index 111 ~ 115 <= Tess3DFaceData (index 18 ~ 19) that binds primitive 4
m_puiStyleIndexesSize 1 means one graphics associated with the face.
then data that means m_puiStyleIndexes[0] right?
Yes, that is correct.
number in data(0, 4, 1, 2, 65535 in example fan) means some kind of Id? or count of something?
These are the style index numbers of the A3DGraphStyleData, where data = 0 represents the first A3DGraphStyleData. And data = 65535 represents A3D_DEFAULT_STYLE_INDEX
Finally I would try find connection
ex) DC Fan case(number is not accurate just for explaining what I try to do)
RiBrepModelData(40x40x10 PC Fan)
→ Edge or face Index 0 ~ 10 <= Tess3DFaceData (index 0 ~3) that binds primitive 0
→ Edge or face Index 11 ~ 23 <= Tess3DFaceData (index 4 ~ 11) that binds primitive 1
…
→ → Edge or face Index 111 ~ 115 <= Tess3DFaceData (index 18 ~ 19) that binds primitive 4
I don’t understand the connection you mentioned. But what I mean is that A3DTessFaceData with the same m_puiStyleIndexes are grouped into one mesh when exported to GLB format.
Thanks for Details @Man
Is A3DTessFaceData a one-to-one correspondence with A3DTopoFaceData(A3DTopoBrepDataGetFaces from A3DTopoBrepData from A3DRiBrepModelData.m_pBrepData) with guaranteed index order?
this correspondence means connection that i mentioned. and why i posted this question
Is A3DTessFaceData a one-to-one correspondence with A3DTopoFaceData (A3DTopoBrepDataGetFaces from A3DTopoBrepData from A3DRiBrepModelData.m_pBrepData ) with guaranteed index order?
Yes, they are in the same order and number of faces.
Additionally, note that GLTF only contains tessellation data. Please let me know if you need further clarification. Thank you.