freebsd-ports/cad/meshdev/files/patch-src_Mesh.cpp
Pietro Cerutti 18c9d923c2 - New port: cad/meshdev
MeshDev is a mesh comparison software. It accepts two meshes as input and
  computes the geometrical deviation between the two meshes.
  It return numerical values and can optionaly generate visual results (with a
  pseudo-colored mesh corresponding to the measured deviation) in OpenInventor
  format.

  This port features a patch (by myself) to read binary and ASCII STL files.
  This feature was removed in the transition from version 0.4 -> 0.5.

  Distfiles are unfetchable from sourceforce. For this reason, they're hosted
  on our infrastructure.

  WWW: http://meshdev.sourceforge.net/
2012-02-06 15:57:20 +00:00

34 lines
683 B
C++

--- src/Mesh.cpp.orig 2012-02-06 16:12:15.000000000 +0100
+++ src/Mesh.cpp 2012-02-06 16:14:59.000000000 +0100
@@ -18,6 +18,7 @@
#include "Mesh.h"
#include "FileVrml1.h"
#include "FileVrml2.h"
+#include "FileSTL.h"
#include <fstream>
#include <iostream>
@@ -173,6 +174,12 @@
{
file_format = INVENTOR_FILE;
}
+ // STL extension
+ else if( extension == "STL" || extension == "stl" )
+ {
+ file_format = STL_FILE;
+ }
+
// Other extension
else
{
@@ -194,6 +201,10 @@
case VRML_2_FILE :
return ReadVrml2( *this, file_name );
+ // STL file
+ case STL_FILE:
+ return ReadSTL( *this, file_name );
+
// Other file
default :
// Unknown file format