Skip to content

OBJ file fails to load #510

@HuguesDelorme

Description

@HuguesDelorme

Description

The attached OBJ file fails to load in DRAW test harness:
test.obj.zip

The attached OBJ file was exported from Wings3D and only contains f elements of the format f <index>// [...] where <index> is the vertex index and the two slashes indicate absence of any UV of normal data. There is no normal index specified anywhere.

Expected Behavior

OBJ file loaded correctly, without any warning in DRAWEXE command interpreter.
With FreeCad:
Image

Actual Behavior

The OBJ file fails to load(empty 3D view) and many warnings are reported:

...
Warning: invalid OBJ syntax at line 23523: Normal index is specified but no Normals nodes are defined
Warning: invalid OBJ syntax at line 23524: Normal index is specified but no Normals nodes are defined
Warning: invalid OBJ syntax at line 23525: Normal index is specified but no Normals nodes are defined
Warning: invalid OBJ syntax at line 23526: Normal index is specified but no Normals nodes are defined
Warning: invalid OBJ syntax at line 23527: Normal index is specified but no Normals nodes are defined
Mesh C:/PathToFile/test.obj
[0 nodes] [0 2d elements]

Sample Code or DRAW Tcl Script

pload ALL
vinit
ReadObj Doc C:/PathToFile/test.obj
XDisplay -dispMode 1 Doc
vfit

Operating System

Windows

Compiler

MSVC

Bitness

64-bit

OCCT Version

7.8

Additional Files

No response

Metadata

Metadata

Assignees

Labels

0. NewThe issue was created, but not updated by maintainer. Waiting for updates labels and categories1. Data ExchangeImport/Export or iterating of the CAD data2. BugSomething isn't working

Type

No type

Projects

Status

Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions