libslic3r
Library for generating gcode from 3d models
|
#include <TriangleMesh.hpp>
Public Member Functions | |
TriangleMesh () | |
template<typename Vertex_Cont , typename Facet_Cont > | |
TriangleMesh (const Vertex_Cont &vertices, const Facet_Cont &facets) | |
TriangleMesh (const TriangleMesh &other) | |
TriangleMesh & | operator= (const TriangleMesh &other) |
copy assignment More... | |
TriangleMesh & | operator= (TriangleMesh &&other) |
Move assignment. More... | |
TriangleMesh (TriangleMesh &&other) | |
void | swap (TriangleMesh &other) |
~TriangleMesh () | |
void | ReadSTLFile (const std::string &input_file) |
void | write_ascii (const std::string &output_file) |
void | write_binary (const std::string &output_file) |
void | repair () |
void | check_topology () |
float | volume () |
bool | is_manifold () const |
void | WriteOBJFile (const std::string &output_file) |
void | scale (float factor) |
void | scale (const Pointf3 &versor) |
void | translate (float x, float y, float z) |
Translate the mesh to a new location. More... | |
void | translate (Pointf3 vec) |
Translate the mesh to a new location. More... | |
void | rotate (float angle, const Axis &axis) |
void | rotate_x (float angle) |
void | rotate_y (float angle) |
void | rotate_z (float angle) |
void | mirror (const Axis &axis) |
void | mirror_x () |
void | mirror_y () |
void | mirror_z () |
void | align_to_origin () |
void | center_around_origin () |
void | rotate (double angle, const Point ¢er) |
Rotate angle around a specified point. More... | |
void | rotate (double angle, Point *center) |
TriangleMeshPtrs | split () const |
TriangleMeshPtrs | cut_by_grid (const Pointf &grid) const |
void | merge (const TriangleMesh &mesh) |
ExPolygons | horizontal_projection () const |
Polygon | convex_hull () |
BoundingBoxf3 | bounding_box () const |
void | reset_repair_stats () |
bool | needed_repair () const |
size_t | facets_count () const |
void | extrude_tin (float offset) |
void | require_shared_vertices () |
void | reverse_normals () |
Pointf3s | vertices () |
Return a copy of the vertex array defining this mesh. More... | |
Point3s | facets () |
Return a copy of the facet array defining this mesh. More... | |
Pointf3s | normals () const |
Return a copy of the normals array defining this mesh. More... | |
Pointf3 | size () const |
Return the size of the mesh in coordinates. More... | |
Pointf3 | center () const |
Return the center of the related bounding box. More... | |
std::vector< ExPolygons > | slice (const std::vector< double > &z) |
Slice this mesh at the provided Z levels and return the vector. More... | |
mesh_stats | stats () const |
Contains general statistics from underlying mesh structure. More... | |
BoundingBoxf3 | bb3 () const |
void | cut (Axis axis, double z, TriangleMesh *upper, TriangleMesh *lower) |
Perform a cut of the mesh and put the output in upper and lower. More... | |
Static Public Member Functions | |
static TriangleMesh | make_cube (double x, double y, double z) |
Generate a mesh representing a cube with dimensions (x, y, z), with one corner at (0,0,0). More... | |
static TriangleMesh | make_cylinder (double r, double h, double fa=(2 *PI/360)) |
static TriangleMesh | make_sphere (double rho, double fa=(2 *PI/360)) |
Public Attributes | |
stl_file | stl |
bool | repaired |
Whether or not this mesh has been repaired. More... | |
Friends | |
class | TriangleMeshSlicer< X > |
class | TriangleMeshSlicer< Y > |
class | TriangleMeshSlicer< Z > |
Slic3r::TriangleMesh::TriangleMesh | ( | ) |
|
inline |
Slic3r::TriangleMesh::TriangleMesh | ( | const TriangleMesh & | other | ) |
Slic3r::TriangleMesh::TriangleMesh | ( | TriangleMesh && | other | ) |
Slic3r::TriangleMesh::~TriangleMesh | ( | ) |
void Slic3r::TriangleMesh::align_to_origin | ( | ) |
BoundingBoxf3 Slic3r::TriangleMesh::bb3 | ( | ) | const |
BoundingBoxf3 Slic3r::TriangleMesh::bounding_box | ( | ) | const |
Pointf3 Slic3r::TriangleMesh::center | ( | ) | const |
Return the center of the related bounding box.
void Slic3r::TriangleMesh::center_around_origin | ( | ) |
void Slic3r::TriangleMesh::check_topology | ( | ) |
Polygon Slic3r::TriangleMesh::convex_hull | ( | ) |
void Slic3r::TriangleMesh::cut | ( | Axis | axis, |
double | z, | ||
TriangleMesh * | upper, | ||
TriangleMesh * | lower | ||
) |
Perform a cut of the mesh and put the output in upper and lower.
TriangleMeshPtrs Slic3r::TriangleMesh::cut_by_grid | ( | const Pointf & | grid | ) | const |
void Slic3r::TriangleMesh::extrude_tin | ( | float | offset | ) |
Point3s Slic3r::TriangleMesh::facets | ( | ) |
Return a copy of the facet array defining this mesh.
size_t Slic3r::TriangleMesh::facets_count | ( | ) | const |
ExPolygons Slic3r::TriangleMesh::horizontal_projection | ( | ) | const |
bool Slic3r::TriangleMesh::is_manifold | ( | ) | const |
|
static |
Generate a mesh representing a cube with dimensions (x, y, z), with one corner at (0,0,0).
|
static |
Generate a mesh representing a cylinder of radius r and height h, with the base at (0,0,0). param[in] r Radius param[in] h Height param[in] fa Facet angle. A smaller angle produces more facets. Default value is 2pi / 360.
|
static |
Generate a mesh representing a sphere of radius rho, centered about (0,0,0). param[in] rho Distance from center to the shell of the sphere. param[in] fa Facet angle. A smaller angle produces more facets. Default value is 2pi / 360.
void Slic3r::TriangleMesh::merge | ( | const TriangleMesh & | mesh | ) |
void Slic3r::TriangleMesh::mirror | ( | const Axis & | axis | ) |
void Slic3r::TriangleMesh::mirror_x | ( | ) |
void Slic3r::TriangleMesh::mirror_y | ( | ) |
void Slic3r::TriangleMesh::mirror_z | ( | ) |
bool Slic3r::TriangleMesh::needed_repair | ( | ) | const |
Pointf3s Slic3r::TriangleMesh::normals | ( | ) | const |
Return a copy of the normals array defining this mesh.
TriangleMesh & Slic3r::TriangleMesh::operator= | ( | const TriangleMesh & | other | ) |
copy assignment
TriangleMesh & Slic3r::TriangleMesh::operator= | ( | TriangleMesh && | other | ) |
Move assignment.
void Slic3r::TriangleMesh::ReadSTLFile | ( | const std::string & | input_file | ) |
void Slic3r::TriangleMesh::repair | ( | ) |
void Slic3r::TriangleMesh::require_shared_vertices | ( | ) |
void Slic3r::TriangleMesh::reset_repair_stats | ( | ) |
void Slic3r::TriangleMesh::reverse_normals | ( | ) |
void Slic3r::TriangleMesh::rotate | ( | float | angle, |
const Axis & | axis | ||
) |
void Slic3r::TriangleMesh::rotate | ( | double | angle, |
const Point & | center | ||
) |
Rotate angle around a specified point.
void Slic3r::TriangleMesh::rotate | ( | double | angle, |
Point * | center | ||
) |
void Slic3r::TriangleMesh::rotate_x | ( | float | angle | ) |
void Slic3r::TriangleMesh::rotate_y | ( | float | angle | ) |
void Slic3r::TriangleMesh::rotate_z | ( | float | angle | ) |
void Slic3r::TriangleMesh::scale | ( | float | factor | ) |
void Slic3r::TriangleMesh::scale | ( | const Pointf3 & | versor | ) |
Pointf3 Slic3r::TriangleMesh::size | ( | ) | const |
Return the size of the mesh in coordinates.
std::vector< ExPolygons > Slic3r::TriangleMesh::slice | ( | const std::vector< double > & | z | ) |
Slice this mesh at the provided Z levels and return the vector.
TriangleMeshPtrs Slic3r::TriangleMesh::split | ( | ) | const |
mesh_stats Slic3r::TriangleMesh::stats | ( | ) | const |
Contains general statistics from underlying mesh structure.
void Slic3r::TriangleMesh::swap | ( | TriangleMesh & | other | ) |
void Slic3r::TriangleMesh::translate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Translate the mesh to a new location.
void Slic3r::TriangleMesh::translate | ( | Pointf3 | vec | ) |
Translate the mesh to a new location.
Pointf3s Slic3r::TriangleMesh::vertices | ( | ) |
Return a copy of the vertex array defining this mesh.
float Slic3r::TriangleMesh::volume | ( | ) |
void Slic3r::TriangleMesh::write_ascii | ( | const std::string & | output_file | ) |
void Slic3r::TriangleMesh::write_binary | ( | const std::string & | output_file | ) |
void Slic3r::TriangleMesh::WriteOBJFile | ( | const std::string & | output_file | ) |
|
friend |
|
friend |
|
friend |
bool Slic3r::TriangleMesh::repaired |
Whether or not this mesh has been repaired.
stl_file Slic3r::TriangleMesh::stl |