Repository navigation
Closed
Description
Importing a XGL file, which contains meshes (<MESH>) without geometry produces the following error: <meshref> index out of range. I know that meshes without geometry doesn't make much sense, but Autodesk Inventor sometimes produces such files. Maybe it would be better to ignore empty meshes instead of throwing an error.
Minimal example (example.xgl):
<?xml``version="1.0"?>
<WORLD>
<DATA ORG="streamline.autodesk.com">
<STR NAME="units">cm</STR>
</DATA>
<BACKGROUND>
<BACKCOLOR>0.643,0.643,0.643</BACKCOLOR>
</BACKGROUND>
<LIGHTING>
<DIRECTIONALLIGHT>
<DIFFUSE>0.500,0.500,0.500</DIFFUSE>
<SPECULAR>0.500,0.500,0.500</SPECULAR>
<DIRECTION>0.305,-0.719,-0.624</DIRECTION>
</DIRECTIONALLIGHT>
<DIRECTIONALLIGHT>
<DIFFUSE>0.353,0.359,0.402</DIFFUSE>
<SPECULAR>0.353,0.359,0.402</SPECULAR>
<DIRECTION>-0.482,0.643,0.595</DIRECTION>
</DIRECTIONALLIGHT>
<AMBIENT>0.591,0.594,0.611</AMBIENT>
</LIGHTING>
<MESH ID="0">
<MAT ID="1">
<DIFF>0.813,0.814,0.816</DIFF>
<AMB>0.813,0.814,0.816</AMB>
<EMISS>0.000,0.000,0.000</EMISS>
<SPEC>0.183,0.183,0.184</SPEC>
<ALPHA>1.000</ALPHA>
<SHINE>100000.000</SHINE>
</MAT>
<MAT ID="70001">
<DIFF>0.996,0.997,1.000</DIFF>
<AMB>0.996,0.997,1.000</AMB>
<EMISS>0.000,0.000,0.000</EMISS>
<SPEC>0.000,0.000,0.000</SPEC>
<ALPHA>1.000</ALPHA>
<SHINE>0.000</SHINE>
</MAT>
</MESH>
<OBJECT PATHID="1">
<TRANSFORM>
<FORWARD>0.000000,0.000000,1.000000</FORWARD>
<UP>0.000000,1.000000,0.000000</UP>
<POSITION>0.000000,0.000000,0.000000</POSITION>
</TRANSFORM>
<MESHREF>0</MESHREF>
</OBJECT>
</WORLD>
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fields✅ Done
Activity