OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
TriangleMesh.cpp File Reference
#include "BoundingBox.hpp"
#include "TriangleMesh.hpp"
#include "Polygon.hpp"
#include "TriangleMeshSlicer.hpp"
#include "MeshSplitImpl.hpp"
#include "ClipperUtils.hpp"
#include "Geometry.hpp"
#include "Geometry/ConvexHull.hpp"
#include "Point.hpp"
#include "Execution/ExecutionTBB.hpp"
#include "Execution/ExecutionSeq.hpp"
#include "Utils.hpp"
#include "libslic3r.h"
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <numeric>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include <Eigen/Geometry>
#include <libqhull_r/libqhull_r.h>
#include <cstdio>
#include <cstring>
#include <libqhullcpp/Qhull.h>
#include <libqhullcpp/QhullFacetList.h>
#include <libqhullcpp/QhullVertex.h>
#include <libqhullcpp/QhullPoint.h>
#include <libqhullcpp/QhullVertexSet.h>
#include <cmath>
#include <deque>
#include <queue>
#include <map>
#include <math.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <type_traits>
#include <boost/log/trivial.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/predef/other/endian.h>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <assert.h>
#include "ExtrusionEntity.hpp"
Include dependency graph for TriangleMesh.cpp:

Go to the source code of this file.

Classes

struct  Slic3r::EdgeToFace

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Functions

static void Slic3r::update_bounding_box (const indexed_triangle_set &its, TriangleMeshStats &out)
static void Slic3r::fill_initial_stats (const indexed_triangle_set &its, TriangleMeshStats &out)
static void Slic3r::trianglemesh_repair_on_import (stl_file &stl)
template<typename FaceFilter, typename ThrowOnCancelCallback>
static std::vector< EdgeToFace > Slic3r::create_edge_map (const indexed_triangle_set &its, FaceFilter face_filter, ThrowOnCancelCallback throw_on_cancel)
template<typename FaceFilter, typename ThrowOnCancelCallback>
static std::vector< Vec3i32 > Slic3r::its_face_edge_ids_impl (const indexed_triangle_set &its, FaceFilter face_filter, ThrowOnCancelCallback throw_on_cancel)
std::vector< Vec3i32 > Slic3r::its_face_edge_ids (const indexed_triangle_set &its)
std::vector< Vec3i32 > Slic3r::its_face_edge_ids (const indexed_triangle_set &its, std::function< void()> throw_on_cancel_callback)
std::vector< Vec3i32 > Slic3r::its_face_edge_ids (const indexed_triangle_set &its, const std::vector< bool > &face_mask)
std::vector< Vec3i32 > Slic3r::its_face_edge_ids (const indexed_triangle_set &its, std::vector< Vec3i32 > &face_neighbors, bool assign_unbound_edges, int *num_edges)
int Slic3r::its_merge_vertices (indexed_triangle_set &its, bool shrink_to_fit)
void Slic3r::its_flip_triangles (indexed_triangle_set &its)
int Slic3r::its_remove_degenerate_faces (indexed_triangle_set &its, bool shrink_to_fit)
int Slic3r::its_compactify_vertices (indexed_triangle_set &its, bool shrink_to_fit)
bool Slic3r::its_store_triangle (const indexed_triangle_set &its, const char *obj_filename, size_t triangle_index)
bool Slic3r::its_store_triangles (const indexed_triangle_set &its, const char *obj_filename, const std::vector< size_t > &triangles)
void Slic3r::its_shrink_to_fit (indexed_triangle_set &its)
template<typename TransformVertex>
void Slic3r::its_collect_mesh_projection_points_above (const indexed_triangle_set &its, const TransformVertex &transform_fn, const float z, Points &all_pts)
void Slic3r::its_collect_mesh_projection_points_above (const indexed_triangle_set &its, const Matrix3f &m, const float z, Points &all_pts)
void Slic3r::its_collect_mesh_projection_points_above (const indexed_triangle_set &its, const Transform3f &t, const float z, Points &all_pts)
template<typename TransformVertex>
Polygon Slic3r::its_convex_hull_2d_above (const indexed_triangle_set &its, const TransformVertex &transform_fn, const float z)
Polygon Slic3r::its_convex_hull_2d_above (const indexed_triangle_set &its, const Matrix3f &m, const float z)
Polygon Slic3r::its_convex_hull_2d_above (const indexed_triangle_set &its, const Transform3f &t, const float z)
indexed_triangle_set Slic3r::its_make_cube (double xd, double yd, double zd)
indexed_triangle_set Slic3r::its_make_prism (float width, float length, float height)
indexed_triangle_set Slic3r::its_make_cylinder (double r, double h, double fa)
indexed_triangle_set Slic3r::its_make_frustum (double r, double h, double fa)
indexed_triangle_set Slic3r::its_make_torus (double r, double h, double fa)
indexed_triangle_set Slic3r::its_make_cone (double r, double h, double fa)
indexed_triangle_set Slic3r::its_make_pyramid (float base, float height)
indexed_triangle_set Slic3r::its_make_sphere (double radius, double fa)
indexed_triangle_set Slic3r::its_make_frustum_dowel (double radius, double h, int sectorCount)
indexed_triangle_set Slic3r::its_make_snap (double r, double h, float space_proportion, float bulge_proportion)
indexed_triangle_set Slic3r::its_convex_hull (const std::vector< Vec3f > &pts)
void Slic3r::its_reverse_all_facets (indexed_triangle_set &its)
void Slic3r::its_merge (indexed_triangle_set &A, const indexed_triangle_set &B)
void Slic3r::its_merge (indexed_triangle_set &A, const std::vector< Vec3f > &triangles)
void Slic3r::its_merge (indexed_triangle_set &A, const Pointf3s &triangles)
float Slic3r::its_volume (const indexed_triangle_set &its)
MassProperties Slic3r::its_mass_properties (const indexed_triangle_set &its)
float Slic3r::its_average_edge_length (const indexed_triangle_set &its)
std::vector< indexed_triangle_set > Slic3r::its_split (const indexed_triangle_set &its)
size_t Slic3r::its_number_of_patches (const indexed_triangle_set &its)
size_t Slic3r::its_number_of_patches (const indexed_triangle_set &its, const std::vector< Vec3i32 > &face_neighbors)
bool Slic3r::its_is_splittable (const indexed_triangle_set &its)
bool Slic3r::its_is_splittable (const indexed_triangle_set &its, const std::vector< Vec3i32 > &face_neighbors)
size_t Slic3r::its_num_open_edges (const std::vector< Vec3i32 > &face_neighbors)
size_t Slic3r::its_num_open_edges (const indexed_triangle_set &its)
std::vector< Vec3i32 > Slic3r::its_face_neighbors (const indexed_triangle_set &its)
std::vector< Vec3i32 > Slic3r::its_face_neighbors_par (const indexed_triangle_set &its)
std::vector< Vec3f > Slic3r::its_face_normals (const indexed_triangle_set &its)
std::vector< Vec3f > Slic3r::its_smooth_corner_normals (const indexed_triangle_set &its, double threshold_degrees)
static void Slic3r::big_endian_reverse_quads (char *buf, size_t cnt)
bool Slic3r::its_write_stl_ascii (const char *file, const char *label, const std::vector< stl_triangle_vertex_indices > &indices, const std::vector< stl_vertex > &vertices)
bool Slic3r::its_write_stl_binary (const char *file, const char *label, const std::vector< stl_triangle_vertex_indices > &indices, const std::vector< stl_vertex > &vertices)