#include <iostream>
#include <string>
#include <vtkSmartPointer.h>
#include <vtkPolyData.h>
#include <vtkPolyDataWriter.h>
#include <vtkSTLReader.h>
#include <vtkCleanPolyData.h>
#include <vtkDecimatePro.h>
#include <vtkTriangleFilter.h>
#include<vtkZLibDataCompressor.h>
#include <vtkSTLWriter.h>
using namespace std;
// 函数声明
void write_binary_stl_file(const string& input_filename, const string& output_filename, double target_reduction);
int main(int argc, char* argv[])
{
string input_filename = "C:/Users/Administrator/Downloads/short.stl";
string output_filename = "C:/Users/Administrator/Downloads/short_1.stl";
double target_reduction = 0.995;
write_binary_stl_file(input_filename, output_filename, target_reduction);
return EXIT_SUCCESS;
}
void write_binary_stl_file(const string& input_filename, const string& output_filename, double
STL 文件的压缩(500MB-1MB)
最新推荐文章于 2023-12-15 23:11:31 发布