Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] scan_OFF result operator(): input error: file format is not in OFF.

Subject: CGAL users discussion list

List archive

[cgal-discuss] scan_OFF result operator(): input error: file format is not in OFF.


Chronological Thread 
  • From: sergio <>
  • To:
  • Subject: [cgal-discuss] scan_OFF result operator(): input error: file format is not in OFF.
  • Date: Tue, 29 May 2018 01:56:38 -0700 (MST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:Id9aYxw/Jey0wc7XCy+O+j09IxM/srCxBDY+r6Qd1OoRIJqq85mqBkHD//Il1AaPAd2Araocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HdbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHmiCkJKT03/nzYhcNsg6xWuw6hqh5jz4LIfI2ZKORyc6XAdt0aX2pBWcNRWjRaAoyidYsPAOsBPeFFpIT6uVsBtwexBQiqBOPgxD9IgWX23aoh3uQuFAHJxg0gH9YUvHvIq9X1Mb4fXOaox6fGyjXDaulZ2Tb76IXQdBAuu+qDUql0ccXP00UgCwTFjlCWpIf4PD2VzvwAv3Wa4uZ+T+6jlW4qpg9rrjSyyMohhJPFi4ALxl3C6C532pw6JceiR05+edOkEIVftyWdN4ZuRMMvTHtkuCAgxbIdopG7eDYFxI47yB7YbvyLa4mI4hT9W+aNOTp0mXNodKylixqs8UWtxPfwWtS63VtEtCZIkMfAumgI1xPJ68iHTvV9/l2m2TaKzw3T9PtLLlw1lardJJ4hzLkwloAUsUnYES/2nV/5jK6Sdkk+5ueo7OHnbq38ppCAL490lh3+MqM2l8OjDuQ3KAwOU3GG9uS9z73s4VD5QK5RjvAtianYsJXaJdwBqaKjAg9V1Jwj6xelADu83tQYhypPEFUQcx2Oi83lOkrFPevjJfa5mVWl1jlxlN7cObi0GZjXIXnE2OP/dL187UFSzxA05d9a7pNQTLoGJaSgCQfKqNXEA0phYESPyOH9BYAlj9JMaSe0GqacdZjqnxqN7+MrLfOLYdZM6jn4IvkhofXpiC1iwANPTeySxZISLUuAMLF+OUzAOCjjh94AFSEBuQ9sFLW32m3HaiZaYjOJZ4x55jw/D9v7X4GfAIakiraF0WGwGZgEP20=

I'm implementing algorithms to detect(Only detection of error, not
correction) if mesh has errors like self-intersection, wrong oriented
normals, etc.
Using scan_OFF with a *.off file it always has result "operator(): input
error: file format is not in OFF."
Why

// kernel
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

// polyhedron
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;

int main(int argc, char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "tetrahedron-piramide.off";
std::ifstream input(filename);

Mesh mesh;
if (!input || !(input >> mesh) || !CGAL::is_triangle_mesh(mesh))
{
std::cerr << "Not a valid input file." << std::endl;
return 1;
}

Polyhedron M; // a typical definition of a Polyhedron (see other
examples)
scan_OFF(input, M, true); // read OFF file in verbose
mode
assert(input); // input fails iff mesh is not
manifold
return 0;
}

This is a simple mesh and I think it does not have errors. Added file
tetrahedron-piramide.off
<http://cgal-discuss.949826.n4.nabble.com/file/t375958/tetrahedron-piramide.off>

.

Thanks in advance



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



Archive powered by MHonArc 2.6.18.

Top of Page