Error while loading the vrml file.

I’m working with a VRML model and ran into an import issue using Open Cascade 7.7.

My VRML file contains data like this:

```
MaterialBinding {
value PER_FACE_INDEXED
}
Material {
ambientColor [
0.752941 0.752941 0.752941
]
diffuseColor [
0.752941 0.752941 0.752941
]
emissiveColor [
0.158118 0.158118 0.158118
]
specularColor [
0.662588 0.662588 0.662588
]
shininess [
0.210000
]
transparency [
0.000000
]
}
```

The first issue is that when reading the `ambientColor` node, the parser only recognizes the opening line (`ambientColor [`) but does not capture the values on the following lines until the closing bracket. I’ve made some changes in the source code to work around this, but parsing still fails because Open Cascade 7.7 does not support the `ambientColor` node at all.

My questions are:

1. Which VRML nodes are unsupported in Open Cascade 7.7?
2. Are these nodes supported in newer versions, such as 7.9?

Any guidance or documentation references would be greatly appreciated.

Dmitrii Pasukhin's picture

OCCT version 7.8 and 7.9 have support for ambientColor node.

Patch: 0033426 https://github.com/Open-Cascade-SAS/OCCT/commit/06f2625c35e9a8897ad49898...

Best regards, Dmitrii.

rahulmulik9's picture

Thank you.
Also, in some cases, I observed that the buffer reads only the line "ambientColor [", "materialIndex ["
If the array values are written on the next line, they are not recognized, and the parser throws a VrmlData_VrmlFormatError.
I have attached reference image

Attachments: 
Dmitrii Pasukhin's picture

In case of problems - it is better to share the file samples to reproduce from our side.

Best regards, Dmitrii.

rahulmulik9's picture

I have upgraded to version 7.9.1
but While importing vrml files
code break when reading "materialIndex"

rahulmulik9's picture

Here are the model which have issues

Attachments: 
rahulmulik9's picture

Any update on this

Dmitrii Pasukhin's picture

Bug reports which shared only on the forum is low priority and can be not fixed because they were forgotten.

Please report the bug in GitHub issues: https://github.com/Open-Cascade-SAS/OCCT/issues/new/choose

Best regards, Dmitrii.

rahulmulik9's picture

Okay. I will report the bug on GitHub

rahulmulik9's picture

Could you please let me know which VRML node types are supported in Open Cascade 7.9, and which VRML versions (e.g., 1.0 or 2.0) are compatible?