int main()
{
//通过IP端口创建协议
auto protocol=techlego::create_binary_protocol(L"localhost",5252);
//通过协议创建客户端
auto client=techlego::h_scan3d_client::make_shared(protocol);
std::filesystem::path current_path=std::filesystem::current_path();
std::wstring path=current_path.wstring();
//获取当前目录下test.asc(点云文件)全目录
path+=L"\\test.asc";
//载入点云文件
bool operation_status=client->load_feature_align_data_from_file(path.c_str(),false);
//若点云数据在内存中,可用load_feature_align_data_from_memory进行加载
if(!operation_status)
return-1;
//将载入的点云转移到扫描组
client->moving_data_to_scan_group(false);
//处理点云,准备导出网格
client->process_data();
//创建用于保存网格数据的结构
auto mesh=techlego::h_mesh::make_unique();
path=current_path.wstring();
//获取输出目录
path+=L"\\result.ply";
//输出网格
client->export_mesh_file2(path.c_str(),*mesh);
return 0;
}