mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-07 04:11:50 +03:00
update libslic3r
This commit is contained in:
@@ -386,8 +386,8 @@ bool TriangleMesh::is_splittable() const
|
||||
{
|
||||
return its_is_splittable(this->its);
|
||||
}
|
||||
|
||||
std::vector<TriangleMesh> TriangleMesh::split() const
|
||||
const float MIN_MESH_VOLUME = 1e-2f;
|
||||
std::vector<TriangleMesh> TriangleMesh::split(float scale_det) const
|
||||
{
|
||||
std::vector<indexed_triangle_set> itss = its_split(this->its);
|
||||
std::vector<TriangleMesh> out;
|
||||
@@ -395,7 +395,7 @@ std::vector<TriangleMesh> TriangleMesh::split() const
|
||||
for (indexed_triangle_set &m : itss) {
|
||||
// The TriangleMesh constructor shall fill in the mesh statistics including volume.
|
||||
TriangleMesh temp_triangle_mesh(std::move(m));
|
||||
if (abs(temp_triangle_mesh.volume()< 0.01)) {//0.01mm^3
|
||||
if (abs(temp_triangle_mesh.volume() * scale_det) < MIN_MESH_VOLUME) {
|
||||
continue;
|
||||
}
|
||||
if (temp_triangle_mesh.volume() < 0) {// Some source mesh parts may be incorrectly oriented. Correct them.
|
||||
@@ -406,7 +406,8 @@ std::vector<TriangleMesh> TriangleMesh::split() const
|
||||
return out;
|
||||
}
|
||||
|
||||
std::vector<TriangleMesh> TriangleMesh::split_and_save_relationship(std::vector<std::unordered_map<int, int>> &result) const {
|
||||
std::vector<TriangleMesh> TriangleMesh::split_and_save_relationship(std::vector<std::unordered_map<int, int>> &result, float scale_det) const
|
||||
{
|
||||
auto itss_and_ships = its_split_and_save_relationship<>(this->its);
|
||||
std::vector<TriangleMesh> out;
|
||||
out.reserve(itss_and_ships.itses.size());
|
||||
@@ -415,7 +416,7 @@ std::vector<TriangleMesh> TriangleMesh::split_and_save_relationship(std::vector<
|
||||
for (indexed_triangle_set &m : itss_and_ships.itses) {
|
||||
// The TriangleMesh constructor shall fill in the mesh statistics including volume.
|
||||
TriangleMesh temp_triangle_mesh(std::move(m));
|
||||
if (abs(temp_triangle_mesh.volume() < 0.01)) { // 0.01mm^3
|
||||
if (abs(temp_triangle_mesh.volume() * scale_det) < MIN_MESH_VOLUME) {
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user