![]() |
Prusa Slicer 2.6.0
|
#include <stdio.h>#include <stdint.h>#include <stddef.h>#include <vector>#include <Eigen/Geometry>
Include dependency graph for stl.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | stl_facet |
| struct | stl_neighbors |
| struct | stl_stats |
| struct | stl_file |
| struct | indexed_triangle_set |
Macros | |
| #define | LABEL_SIZE 80 |
| #define | NUM_FACET_SIZE 4 |
| #define | HEADER_SIZE 84 |
| #define | STL_MIN_FILE_SIZE 284 |
| #define | ASCII_LINES_PER_FACET 7 |
| #define | SIZEOF_STL_FACET 50 |
Typedefs | |
| typedef Eigen::Matrix< float, 3, 1, Eigen::DontAlign > | stl_vertex |
| typedef Eigen::Matrix< float, 3, 1, Eigen::DontAlign > | stl_normal |
| typedef Eigen::Matrix< int, 3, 1, Eigen::DontAlign > | stl_triangle_vertex_indices |
| typedef Eigen::Matrix< float, 3, 1, Eigen::DontAlign > | obj_color |
Enumerations | |
| enum | stl_type { binary , ascii , inmemory } |
| #define ASCII_LINES_PER_FACET 7 |
| #define HEADER_SIZE 84 |
| #define LABEL_SIZE 80 |
| #define NUM_FACET_SIZE 4 |
| #define SIZEOF_STL_FACET 50 |
| #define STL_MIN_FILE_SIZE 284 |
| typedef Eigen::Matrix<float, 3, 1, Eigen::DontAlign> obj_color |
| typedef Eigen::Matrix<float, 3, 1, Eigen::DontAlign> stl_normal |
| typedef Eigen::Matrix<int, 3, 1, Eigen::DontAlign> stl_triangle_vertex_indices |
| typedef Eigen::Matrix<float, 3, 1, Eigen::DontAlign> stl_vertex |
| enum stl_type |
| void its_rotate_x | ( | indexed_triangle_set & | its, |
| float | angle | ||
| ) |
References cos(), M_PI, rotate_point_2d(), sin(), and indexed_triangle_set::vertices.
Referenced by Slic3r::TriangleMesh::rotate().
Here is the call graph for this function:
Here is the caller graph for this function:| void its_rotate_y | ( | indexed_triangle_set & | its, |
| float | angle | ||
| ) |
References cos(), M_PI, rotate_point_2d(), sin(), and indexed_triangle_set::vertices.
Referenced by Slic3r::TriangleMesh::rotate().
Here is the call graph for this function:
Here is the caller graph for this function:| void its_rotate_z | ( | indexed_triangle_set & | its, |
| float | angle | ||
| ) |
References cos(), M_PI, rotate_point_2d(), sin(), and indexed_triangle_set::vertices.
Referenced by Slic3r::TriangleMesh::rotate(), and Slic3r::TriangleMesh::rotate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References indexed_triangle_set::indices, and indexed_triangle_set::vertices.
|
inline |
References indexed_triangle_set::indices, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::matrix(), and indexed_triangle_set::vertices.
Here is the call graph for this function:
|
inline |
References indexed_triangle_set::vertices.
Referenced by Slic3r::SeamPlacerImpl::compute_global_occlusion(), priv::create_emboss_projection(), Slic3r::csgmesh_merge_positive_parts(), priv::cut_surface(), Slic3r::SeamPlacerImpl::gather_enforcers_blockers(), Slic3r::csg::get_cgalmesh(), Slic3r::GUI::GLGizmoCut3D::is_outside_of_cut_contour(), Slic3r::PrintObject::prepare_adaptive_infill_data(), Slic3r::TriangleMesh::rotate(), Slic3r::slice_volumes(), Slic3r::TriangleMesh::transform(), and Slic3r::TriangleMesh::transform().
Here is the caller graph for this function:
|
inline |
References indexed_triangle_set::vertices.
Referenced by Slic3r::GUI::GLGizmoBase::Grabber::render().
Here is the caller graph for this function:| bool its_write_obj | ( | const indexed_triangle_set & | its, |
| const char * | file | ||
| ) |
References error, indexed_triangle_set::indices, and indexed_triangle_set::vertices.
Referenced by Slic3r::its_store_triangle_to_obj(), Slic3r::its_store_triangles_to_obj(), Slic3r::mmu_segmentation_top_and_bottom_layers(), and Slic3r::TriangleMesh::WriteOBJFile().
Here is the caller graph for this function:| bool its_write_obj | ( | const indexed_triangle_set & | its, |
| const std::vector< obj_color > & | color, | ||
| const char * | file | ||
| ) |
write idexed triangle set into obj file with color
| its | input model |
| color | color of stored model |
| file | define place to store |
References error, indexed_triangle_set::indices, and indexed_triangle_set::vertices.
| bool its_write_off | ( | const indexed_triangle_set & | its, |
| const char * | file | ||
| ) |
References error, indexed_triangle_set::indices, and indexed_triangle_set::vertices.
| bool its_write_vrml | ( | const indexed_triangle_set & | its, |
| const char * | file | ||
| ) |
References error, indexed_triangle_set::indices, and indexed_triangle_set::vertices.
References stl_file::facet_start, stl_stats::facets_added, stl_file::neighbors_start, stl_stats::number_of_facets, and stl_file::stats.
Referenced by stl_fill_holes().
Here is the caller graph for this function:References stl_file::facet_start, stl_file::neighbors_start, stl_stats::number_of_facets, and stl_file::stats.
Referenced by stl_open().
Here is the caller graph for this function:
|
inline |
References stl_facet::vertex.
Referenced by calculate_normals(), check_normal_vector(), get_area(), and stl_reverse_all_facets().
Here is the caller graph for this function:References get_volume(), stl_file::stats, stl_reverse_all_facets(), and stl_stats::volume.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References stl_stats::connected_edges, stl_stats::connected_facets_1_edge, stl_stats::connected_facets_2_edge, stl_stats::connected_facets_3_edge, stl_stats::degenerate_facets, HashEdge::facet_number, stl_file::facet_start, stl_stats::facets_removed, HashTableEdges::insert_edge_exact(), HashEdge::load_exact(), stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, stl_facet::vertex, and HashEdge::which_edge.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References stl_stats::connected_facets_1_edge, stl_stats::connected_facets_2_edge, stl_stats::connected_facets_3_edge, HashEdge::facet_number, stl_file::facet_start, HashTableEdges::insert_edge_nearby(), HashEdge::load_nearby(), stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, stl_facet::vertex, and HashEdge::which_edge.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References cwiseAbs(), stl_stats::max, stl_stats::min, stl_stats::shortest_edge, stl_file::stats, and stl_facet::vertex.
Referenced by stl_read().
Here is the call graph for this function:
Here is the caller graph for this function:References HashEdge::facet_number, stl_file::facet_start, HashTableEdges::insert_edge_exact(), HashEdge::load_exact(), stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, stl_add_facet(), stl_facet::vertex, and HashEdge::which_edge.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References check_normal_vector(), head(), stl_file::neighbors_start, stl_stats::number_of_facets, stl_stats::number_of_parts, reverse_facet(), stl_file::stats, and tail().
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References check_normal_vector(), stl_stats::number_of_facets, and stl_file::stats.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:| void stl_generate_shared_vertices | ( | stl_file * | stl, |
| indexed_triangle_set & | its | ||
| ) |
References stl_file::facet_start, indexed_triangle_set::indices, stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, and indexed_triangle_set::vertices.
Referenced by Slic3r::TriangleMesh::ReadSTLFile().
Here is the caller graph for this function:References stl_stats::bounding_diameter, stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, stl_stats::size, stl_file::stats, and stl_facet::vertex.
Referenced by stl_rotate_x(), stl_rotate_y(), stl_rotate_z(), stl_transform(), and stl_transform().
Here is the caller graph for this function:References stl_file::facet_start, stl_stats::facets_reversed, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, stl_file::stats, and stl_reverse_all_facets().
Here is the call graph for this function:References stl_file::facet_start, stl_stats::facets_reversed, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, stl_file::stats, and stl_reverse_all_facets().
Here is the call graph for this function:References stl_file::facet_start, stl_stats::facets_reversed, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, stl_file::stats, and stl_reverse_all_facets().
Here is the call graph for this function:
|
inline |
Referenced by calculate_normals(), check_normal_vector(), get_area(), and stl_reverse_all_facets().
Here is the caller graph for this function:References stl_file::clear(), stl_allocate(), stl_open_count_facets(), and stl_read().
Referenced by Slic3r::TriangleMesh::ReadSTLFile().
Here is the call graph for this function:
Here is the caller graph for this function:| bool stl_print_neighbors | ( | stl_file * | stl, |
| char * | file | ||
| ) |
References error, stl_file::neighbors_start, stl_stats::number_of_facets, and stl_file::stats.
References stl_file::facet_start, stl_file::neighbors_start, stl_stats::number_of_facets, and stl_file::stats.
References stl_stats::connected_facets_1_edge, stl_stats::connected_facets_2_edge, stl_stats::connected_facets_3_edge, stl_file::facet_start, stl_stats::facets_removed, stl_neighbors::neighbor, stl_file::neighbors_start, stl_neighbors::num_neighbors(), stl_stats::number_of_facets, stl_file::stats, stl_validate(), and stl_neighbors::which_vertex_not.
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:| void stl_repair | ( | stl_file * | stl, |
| bool | fixall_flag, | ||
| bool | exact_flag, | ||
| bool | tolerance_flag, | ||
| float | tolerance, | ||
| bool | increment_flag, | ||
| float | increment, | ||
| bool | nearby_flag, | ||
| int | iterations, | ||
| bool | remove_unconnected_flag, | ||
| bool | fill_holes_flag, | ||
| bool | normal_directions_flag, | ||
| bool | normal_values_flag, | ||
| bool | reverse_all_flag, | ||
| bool | verbose_flag | ||
| ) |
References stl_stats::bounding_diameter, stl_stats::connected_facets_1_edge, stl_stats::connected_facets_2_edge, stl_stats::connected_facets_3_edge, stl_stats::edges_fixed, stl_stats::facets_w_1_bad_edge, stl_stats::facets_w_2_bad_edge, stl_stats::facets_w_3_bad_edge, stl_stats::number_of_facets, stl_stats::shortest_edge, stl_file::stats, stl_calculate_volume(), stl_check_facets_exact(), stl_check_facets_nearby(), stl_fill_holes(), stl_fix_normal_directions(), stl_fix_normal_values(), stl_remove_unconnected_facets(), stl_reverse_all_facets(), and stl_verify_neighbors().
Here is the call graph for this function:References stl_file::facet_start, stl_stats::number_of_facets, reverse_facet(), stl_file::stats, stl_calculate_normal(), and stl_normalize_vector().
Referenced by stl_calculate_volume(), stl_mirror_xy(), stl_mirror_xz(), stl_mirror_yz(), and stl_repair().
Here is the call graph for this function:
Here is the caller graph for this function:References calculate_normals(), cos(), stl_file::facet_start, M_PI, stl_stats::number_of_facets, rotate_point_2d(), sin(), stl_file::stats, and stl_get_size().
Here is the call graph for this function:References calculate_normals(), cos(), stl_file::facet_start, M_PI, stl_stats::number_of_facets, rotate_point_2d(), sin(), stl_file::stats, and stl_get_size().
Here is the call graph for this function:References calculate_normals(), cos(), stl_file::facet_start, M_PI, stl_stats::number_of_facets, rotate_point_2d(), sin(), stl_file::stats, and stl_get_size().
Here is the call graph for this function:References stl_scale_versor().
Here is the call graph for this function:| void stl_scale_versor | ( | stl_file * | stl, |
| const stl_vertex & | versor | ||
| ) |
References stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, stl_stats::size, stl_file::stats, and stl_stats::volume.
Referenced by stl_scale().
Here is the caller graph for this function:References stl_stats::backwards_edges, binary, stl_stats::connected_facets_1_edge, stl_stats::connected_facets_2_edge, stl_stats::connected_facets_3_edge, stl_stats::degenerate_facets, stl_stats::edges_fixed, stl_stats::facets_added, stl_stats::facets_removed, stl_stats::facets_reversed, stl_stats::facets_w_1_bad_edge, stl_stats::facets_w_2_bad_edge, stl_stats::facets_w_3_bad_edge, stl_stats::header, stl_stats::max, stl_stats::min, stl_stats::normals_fixed, stl_stats::number_of_facets, stl_stats::number_of_parts, stl_stats::original_num_facets, stl_file::stats, stl_stats::type, VERSION, and stl_stats::volume.
|
inline |
References stl_file::facet_start, stl_facet::normal, stl_stats::number_of_facets, stl_file::stats, stl_get_size(), and stl_facet::vertex.
Here is the call graph for this function:
|
inline |
References stl_file::facet_start, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::matrix(), stl_facet::normal, stl_stats::number_of_facets, stl_file::stats, stl_get_size(), and stl_facet::vertex.
Here is the call graph for this function:References stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, and stl_file::stats.
References stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, and stl_file::stats.
References stl_validate().
Here is the call graph for this function:| bool stl_validate | ( | const stl_file * | stl, |
| const indexed_triangle_set & | its | ||
| ) |
References stl_file::facet_start, indexed_triangle_set::indices, stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, indexed_triangle_set::vertices, and stl_neighbors::which_vertex_not.
Referenced by stl_remove_unconnected_facets(), stl_validate(), and Slic3r::trianglemesh_repair_on_import().
Here is the caller graph for this function:References stl_stats::backwards_edges, stl_file::facet_start, stl_file::neighbors_start, stl_stats::number_of_facets, stl_file::stats, and stl_write_facet().
Referenced by stl_repair(), and Slic3r::trianglemesh_repair_on_import().
Here is the call graph for this function:
Here is the caller graph for this function:References error, stl_file::facet_start, stl_stats::number_of_facets, and stl_file::stats.
References error, stl_file::facet_start, LABEL_SIZE, stl_stats::number_of_facets, SEEK_SET, SIZEOF_STL_FACET, and stl_file::stats.
References error, stl_file::facet_start, stl_stats::number_of_facets, and stl_file::stats.
References stl_write_vertex().
Referenced by stl_verify_neighbors().
Here is the call graph for this function:
Here is the caller graph for this function:References stl_file::neighbors_start.
| bool stl_write_quad_object | ( | stl_file * | stl, |
| char * | file | ||
| ) |
References error, stl_file::facet_start, stl_file::neighbors_start, stl_stats::number_of_facets, and stl_file::stats.
References stl_file::facet_start.
Referenced by stl_write_facet().
Here is the caller graph for this function: