mirror of https://github.com/CGAL/cgal
change behavior when soup is not orientable in the demo.
This commit is contained in:
parent
c5174f693c
commit
86ca13a388
|
|
@ -133,7 +133,7 @@ class Io_3mf_plugin:
|
|||
names.clear();
|
||||
all_colors.clear();
|
||||
int nb_meshes =
|
||||
CGAL::read_soups_from_3mf(fileinfo.filePath().toUtf8().toStdString(),
|
||||
CGAL::read_triangle_soups_from_3mf(fileinfo.filePath().toUtf8().toStdString(),
|
||||
all_points, all_polygons, all_colors, names);
|
||||
if(nb_meshes <0 )
|
||||
{
|
||||
|
|
@ -151,10 +151,8 @@ class Io_3mf_plugin:
|
|||
ok = PMP::orient_polygon_soup(points, triangles);
|
||||
if(!ok)
|
||||
{
|
||||
std::cerr<<"Object is not orientable. Skipped."<<std::endl;
|
||||
std::cerr<<"Object was not directly orientable, some vertices have been duplicated."<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
SMesh mesh;
|
||||
PMP::polygon_soup_to_polygon_mesh(points, triangles, mesh);
|
||||
CGAL::Color first = colors.front();
|
||||
|
|
@ -187,7 +185,6 @@ class Io_3mf_plugin:
|
|||
if(add_to_scene)
|
||||
CGAL::Three::Three::scene()->addItem(sm_item);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@
|
|||
//
|
||||
// Author(s) : Maxime Gimeno
|
||||
|
||||
#ifndef WRITE_3MF_H
|
||||
#define WRITE_3MF_H
|
||||
#ifndef CGAL_IO_WRITE_3MF_H
|
||||
#define CGAL_IO_WRITE_3MF_H
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <CGAL/IO/Color.h>
|
||||
|
||||
#include "Model/COM/NMR_DLLInterfaces.h"
|
||||
#include <Model/COM/NMR_DLLInterfaces.h>
|
||||
|
||||
namespace CGAL{
|
||||
namespace tmf_internal{
|
||||
|
|
@ -465,4 +465,4 @@ bool write_triangle_meshes_to_3mf(const std::string& file_name,
|
|||
return write_triangle_soups_to_3mf(file_name, all_points, all_polygons, names);
|
||||
}
|
||||
}//end CGAL
|
||||
#endif // WRITE_3MF_H
|
||||
#endif // CGAL_IO_WRITE_3MF_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue