We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When importing a .obj file, only the first line element of a polyline is imported, the other line elements are ignored. The line header l denotes a polyline, see https://en.wikipedia.org/wiki/Wavefront_.obj_file#Line_elements. For example,
.obj
l
l 1 2 3 4
is equivalent to
l 1 2 l 2 3 l 3 4
The lines (2, 3) and (3, 4) of l 1 2 3 4 are ignored.
The parsing code is in wrap/io_trimesh/import_obj.h:
wrap/io_trimesh/import_obj.h
[...] else if ( header.compare("l")==0 ) { loadingStr = "Edge Loading"; if (numTokens < 3) { result = E_LESS_THAN_3_VERT_IN_FACE; // TODO add proper/handling error code continue; } ObjEdge e = { (atoi(tokens[1].c_str()) - 1), (atoi(tokens[2].c_str()) - 1) }; ev.push_back(e); numEdges++; } [...]
I suggest adding a loop to get the other line elements:
[...] else if ( header.compare("l")==0 ) { loadingStr = "Edge Loading"; if (numTokens < 3) { result = E_LESS_THAN_3_VERT_IN_FACE; // TODO add proper/handling error code continue; } for (int i = 2; i < numTokens; i++) { ObjEdge e = { (atoi(tokens[i -1].c_str()) - 1), (atoi(tokens[i].c_str()) - 1) }; ev.push_back(e); numEdges++; } } [...]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When importing a
.obj
file, only the first line element of a polyline is imported, the other line elements are ignored.The line header
l
denotes a polyline, see https://en.wikipedia.org/wiki/Wavefront_.obj_file#Line_elements.For example,
is equivalent to
The lines (2, 3) and (3, 4) of
l 1 2 3 4
are ignored.The parsing code is in
wrap/io_trimesh/import_obj.h
:I suggest adding a loop to get the other line elements:
The text was updated successfully, but these errors were encountered: