Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
util.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <boost/log/trivial.hpp>
#include "stl.h"
+ Include dependency graph for util.cpp:

Go to the source code of this file.

Functions

void stl_verify_neighbors (stl_file *stl)
 
void stl_translate (stl_file *stl, float x, float y, float z)
 
void stl_translate_relative (stl_file *stl, float x, float y, float z)
 
void stl_scale_versor (stl_file *stl, const stl_vertex &versor)
 
static void calculate_normals (stl_file *stl)
 
static void rotate_point_2d (float &x, float &y, const double c, const double s)
 
void stl_rotate_x (stl_file *stl, float angle)
 
void stl_rotate_y (stl_file *stl, float angle)
 
void stl_rotate_z (stl_file *stl, float angle)
 
void its_rotate_x (indexed_triangle_set &its, float angle)
 
void its_rotate_y (indexed_triangle_set &its, float angle)
 
void its_rotate_z (indexed_triangle_set &its, float angle)
 
void stl_get_size (stl_file *stl)
 
void stl_mirror_xy (stl_file *stl)
 
void stl_mirror_yz (stl_file *stl)
 
void stl_mirror_xz (stl_file *stl)
 
static float get_area (stl_facet *facet)
 
static float get_volume (stl_file *stl)
 
void stl_calculate_volume (stl_file *stl)
 
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)
 

Function Documentation

◆ calculate_normals()

static void calculate_normals ( stl_file stl)
static
109{
111 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
112 stl_calculate_normal(normal, &stl->facet_start[i]);
113 stl_normalize_vector(normal);
114 stl->facet_start[i].normal = normal;
115 }
116}
Vec< 3, T > normal(const std::array< Vec< 3, T >, 3 > &tri)
Definition Rotfinder.cpp:43
void stl_calculate_normal(stl_normal &normal, stl_facet *facet)
Definition stl.h:318
void stl_normalize_vector(stl_normal &normal)
Definition stl.h:321
std::vector< stl_facet > facet_start
Definition stl.h:150
stl_stats stats
Definition stl.h:153
uint32_t number_of_facets
Definition stl.h:95
unsigned __int32 uint32_t
Definition unistd.h:79

References stl_file::facet_start, stl_stats::number_of_facets, stl_file::stats, stl_calculate_normal(), and stl_normalize_vector().

Referenced by stl_rotate_x(), stl_rotate_y(), and stl_rotate_z().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_area()

static float get_area ( stl_facet facet)
static
249{
250 /* cast to double before calculating cross product because large coordinates
251 can result in overflowing product
252 (bad area is responsible for bad volume and bad facets reversal) */
253 double cross[3][3];
254 for (int i = 0; i < 3; i++) {
255 cross[i][0]=(((double)facet->vertex[i](1) * (double)facet->vertex[(i + 1) % 3](2)) -
256 ((double)facet->vertex[i](2) * (double)facet->vertex[(i + 1) % 3](1)));
257 cross[i][1]=(((double)facet->vertex[i](2) * (double)facet->vertex[(i + 1) % 3](0)) -
258 ((double)facet->vertex[i](0) * (double)facet->vertex[(i + 1) % 3](2)));
259 cross[i][2]=(((double)facet->vertex[i](0) * (double)facet->vertex[(i + 1) % 3](1)) -
260 ((double)facet->vertex[i](1) * (double)facet->vertex[(i + 1) % 3](0)));
261 }
262
264 sum(0) = cross[0][0] + cross[1][0] + cross[2][0];
265 sum(1) = cross[0][1] + cross[1][1] + cross[2][1];
266 sum(2) = cross[0][2] + cross[1][2] + cross[2][2];
267
268 // This should already be done. But just in case, let's do it again.
269 //FIXME this is questionable. the "sum" normal should be accurate, while the normal "n" may be calculated with a low accuracy.
270 stl_normal n;
271 stl_calculate_normal(n, facet);
273 return 0.5f * n.dot(sum);
274}
IGL_INLINE void sum(const Eigen::SparseMatrix< T > &X, const int dim, Eigen::SparseVector< T > &S)
Definition sum.cpp:12
IGL_INLINE void cross(const double *a, const double *b, double *out)
Definition cross.cpp:11
stl_vertex vertex[3]
Definition stl.h:50

References stl_calculate_normal(), stl_normalize_vector(), and stl_facet::vertex.

Referenced by get_volume().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_volume()

static float get_volume ( stl_file stl)
static
277{
278 // Choose a point, any point as the reference.
279 stl_vertex p0 = stl->facet_start[0].vertex[0];
280 float volume = 0.f;
281 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
282 // Do dot product to get distance from point to plane.
283 float height = stl->facet_start[i].normal.dot(stl->facet_start[i].vertex[0] - p0);
284 float area = get_area(&stl->facet_start[i]);
285 volume += (area * height) / 3.0f;
286 }
287 return volume;
288}
coord_t height(const BoundingBox &box)
Definition Arrange.cpp:540
IGL_INLINE void volume(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< Derivedvol > &vol)
Definition volume.cpp:15
Unit area(const Cntr &poly, const PathTag &)
Definition geometry_traits.hpp:971
static float get_area(stl_facet *facet)
Definition util.cpp:248

References stl_file::facet_start, get_area(), stl_stats::number_of_facets, and stl_file::stats.

Referenced by stl_calculate_volume().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ its_rotate_x()

void its_rotate_x ( indexed_triangle_set its,
float  angle 
)
163{
164 double radian_angle = (angle / 180.0) * M_PI;
165 double c = cos(radian_angle);
166 double s = sin(radian_angle);
167 for (stl_vertex &v : its.vertices)
168 rotate_point_2d(v(1), v(2), c, s);
169}
EIGEN_DEVICE_FUNC const CosReturnType cos() const
Definition ArrayCwiseUnaryOps.h:202
EIGEN_DEVICE_FUNC const SinReturnType sin() const
Definition ArrayCwiseUnaryOps.h:220
#define M_PI
Definition ExtrusionSimulator.cpp:20
double angle(const Eigen::MatrixBase< Derived > &v1, const Eigen::MatrixBase< Derived2 > &v2)
Definition Point.hpp:112
static void rotate_point_2d(float &x, float &y, const double c, const double s)
Definition util.cpp:118

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:

◆ its_rotate_y()

void its_rotate_y ( indexed_triangle_set its,
float  angle 
)
172{
173 double radian_angle = (angle / 180.0) * M_PI;
174 double c = cos(radian_angle);
175 double s = sin(radian_angle);
176 for (stl_vertex& v : its.vertices)
177 rotate_point_2d(v(2), v(0), c, s);
178}

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:

◆ its_rotate_z()

void its_rotate_z ( indexed_triangle_set its,
float  angle 
)
181{
182 double radian_angle = (angle / 180.0) * M_PI;
183 double c = cos(radian_angle);
184 double s = sin(radian_angle);
185 for (stl_vertex& v : its.vertices)
186 rotate_point_2d(v(0), v(1), c, s);
187}

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:

◆ rotate_point_2d()

static void rotate_point_2d ( float &  x,
float &  y,
const double  c,
const double  s 
)
inlinestatic
119{
120 double xold = x;
121 double yold = y;
122 x = float(c * xold - s * yold);
123 y = float(s * xold + c * yold);
124}
const Scalar & y
Definition MathFunctions.h:552
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297

Referenced by its_rotate_x(), its_rotate_y(), its_rotate_z(), stl_rotate_x(), stl_rotate_y(), and stl_rotate_z().

+ Here is the caller graph for this function:

◆ stl_calculate_volume()

void stl_calculate_volume ( stl_file stl)
291{
292 stl->stats.volume = get_volume(stl);
293 if (stl->stats.volume < 0.0) {
295 stl->stats.volume = -stl->stats.volume;
296 }
297}
void stl_reverse_all_facets(stl_file *stl)
Definition normals.cpp:230
float volume
Definition stl.h:103
static float get_volume(stl_file *stl)
Definition util.cpp:276

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:

◆ stl_get_size()

void stl_get_size ( stl_file stl)
190{
191 if (stl->stats.number_of_facets == 0)
192 return;
193 stl->stats.min = stl->facet_start[0].vertex[0];
194 stl->stats.max = stl->stats.min;
195 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
196 const stl_facet &face = stl->facet_start[i];
197 for (int j = 0; j < 3; ++ j) {
198 stl->stats.min = stl->stats.min.cwiseMin(face.vertex[j]);
199 stl->stats.max = stl->stats.max.cwiseMax(face.vertex[j]);
200 }
201 }
202 stl->stats.size = stl->stats.max - stl->stats.min;
203 stl->stats.bounding_diameter = stl->stats.size.norm();
204}
Definition stl.h:48
stl_vertex size
Definition stl.h:99
float bounding_diameter
Definition stl.h:100
stl_vertex max
Definition stl.h:97
stl_vertex min
Definition stl.h:98

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:

◆ stl_mirror_xy()

void stl_mirror_xy ( stl_file stl)
207{
208 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
209 for (int j = 0; j < 3; ++ j)
210 stl->facet_start[i].vertex[j](2) *= -1.0;
211 float temp_size = stl->stats.min(2);
212 stl->stats.min(2) = stl->stats.max(2);
213 stl->stats.max(2) = temp_size;
214 stl->stats.min(2) *= -1.0;
215 stl->stats.max(2) *= -1.0;
217 stl->stats.facets_reversed -= stl->stats.number_of_facets; /* for not altering stats */
218}
int facets_reversed
Definition stl.h:126

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:

◆ stl_mirror_xz()

void stl_mirror_xz ( stl_file stl)
235{
236 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
237 for (int j = 0; j < 3; ++ j)
238 stl->facet_start[i].vertex[j](1) *= -1.0;
239 float temp_size = stl->stats.min(1);
240 stl->stats.min(1) = stl->stats.max(1);
241 stl->stats.max(1) = temp_size;
242 stl->stats.min(1) *= -1.0;
243 stl->stats.max(1) *= -1.0;
245 stl->stats.facets_reversed -= stl->stats.number_of_facets; // for not altering stats
246}

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:

◆ stl_mirror_yz()

void stl_mirror_yz ( stl_file stl)
221{
222 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
223 for (int j = 0; j < 3; j++)
224 stl->facet_start[i].vertex[j](0) *= -1.0;
225 float temp_size = stl->stats.min(0);
226 stl->stats.min(0) = stl->stats.max(0);
227 stl->stats.max(0) = temp_size;
228 stl->stats.min(0) *= -1.0;
229 stl->stats.max(0) *= -1.0;
231 stl->stats.facets_reversed -= stl->stats.number_of_facets; /* for not altering stats */
232}

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:

◆ stl_repair()

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 
)
315{
316 if (exact_flag || fixall_flag || nearby_flag || remove_unconnected_flag || fill_holes_flag || normal_directions_flag) {
317 if (verbose_flag)
318 printf("Checking exact...\n");
319 exact_flag = true;
324 }
325
326 if (nearby_flag || fixall_flag) {
327 if (! tolerance_flag)
328 tolerance = stl->stats.shortest_edge;
329 if (! increment_flag)
330 increment = stl->stats.bounding_diameter / 10000.0;
331 }
332
334 int last_edges_fixed = 0;
335 for (int i = 0; i < iterations; ++ i) {
337 if (verbose_flag)
338 printf("Checking nearby. Tolerance= %f Iteration=%d of %d...", tolerance, i + 1, iterations);
339 stl_check_facets_nearby(stl, tolerance);
340 if (verbose_flag)
341 printf(" Fixed %d edges.\n", stl->stats.edges_fixed - last_edges_fixed);
342 last_edges_fixed = stl->stats.edges_fixed;
343 tolerance += increment;
344 } else {
345 if (verbose_flag)
346 printf("All facets connected. No further nearby check necessary.\n");
347 break;
348 }
349 }
350 } else if (verbose_flag)
351 printf("All facets connected. No nearby check necessary.\n");
352
353 if (remove_unconnected_flag || fixall_flag || fill_holes_flag) {
355 if (verbose_flag)
356 printf("Removing unconnected facets...\n");
358 } else if (verbose_flag)
359 printf("No unconnected need to be removed.\n");
360 }
361
362 if (fill_holes_flag || fixall_flag) {
364 if (verbose_flag)
365 printf("Filling holes...\n");
366 stl_fill_holes(stl);
367 } else if (verbose_flag)
368 printf("No holes need to be filled.\n");
369 }
370
371 if (reverse_all_flag) {
372 if (verbose_flag)
373 printf("Reversing all facets...\n");
375 }
376
377 if (normal_directions_flag || fixall_flag) {
378 if (verbose_flag)
379 printf("Checking normal directions...\n");
381 }
382
383 if (normal_values_flag || fixall_flag) {
384 if (verbose_flag)
385 printf("Checking normal values...\n");
387 }
388
389 // Always calculate the volume. It shouldn't take too long.
390 if (verbose_flag)
391 printf("Calculating volume...\n");
393
394 if (exact_flag) {
395 if (verbose_flag)
396 printf("Verifying neighbors...\n");
398 }
399}
void stl_check_facets_nearby(stl_file *stl, float tolerance)
Definition connect.cpp:481
void stl_fill_holes(stl_file *stl)
Definition connect.cpp:652
void stl_remove_unconnected_facets(stl_file *stl)
Definition connect.cpp:508
void stl_check_facets_exact(stl_file *stl)
Definition connect.cpp:432
void stl_fix_normal_values(stl_file *stl)
Definition normals.cpp:224
void stl_fix_normal_directions(stl_file *stl)
Definition normals.cpp:115
int connected_facets_1_edge
Definition stl.h:108
int facets_w_3_bad_edge
Definition stl.h:114
int facets_w_2_bad_edge
Definition stl.h:113
int facets_w_1_bad_edge
Definition stl.h:112
float shortest_edge
Definition stl.h:101
int edges_fixed
Definition stl.h:118
int connected_facets_2_edge
Definition stl.h:109
int connected_facets_3_edge
Definition stl.h:110
void stl_verify_neighbors(stl_file *stl)
Definition util.cpp:32
void stl_calculate_volume(stl_file *stl)
Definition util.cpp:290

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:

◆ stl_rotate_x()

void stl_rotate_x ( stl_file stl,
float  angle 
)
127{
128 double radian_angle = (angle / 180.0) * M_PI;
129 double c = cos(radian_angle);
130 double s = sin(radian_angle);
131 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
132 for (int j = 0; j < 3; ++ j)
133 rotate_point_2d(stl->facet_start[i].vertex[j](1), stl->facet_start[i].vertex[j](2), c, s);
134 stl_get_size(stl);
136}
static void calculate_normals(stl_file *stl)
Definition util.cpp:108
void stl_get_size(stl_file *stl)
Definition util.cpp:189

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:

◆ stl_rotate_y()

void stl_rotate_y ( stl_file stl,
float  angle 
)
139{
140 double radian_angle = (angle / 180.0) * M_PI;
141 double c = cos(radian_angle);
142 double s = sin(radian_angle);
143 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
144 for (int j = 0; j < 3; ++ j)
145 rotate_point_2d(stl->facet_start[i].vertex[j](2), stl->facet_start[i].vertex[j](0), c, s);
146 stl_get_size(stl);
148}

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:

◆ stl_rotate_z()

void stl_rotate_z ( stl_file stl,
float  angle 
)
151{
152 double radian_angle = (angle / 180.0) * M_PI;
153 double c = cos(radian_angle);
154 double s = sin(radian_angle);
155 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
156 for (int j = 0; j < 3; ++ j)
157 rotate_point_2d(stl->facet_start[i].vertex[j](0), stl->facet_start[i].vertex[j](1), c, s);
158 stl_get_size(stl);
160}

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:

◆ stl_scale_versor()

void stl_scale_versor ( stl_file stl,
const stl_vertex versor 
)
92{
93 // Scale extents.
94 auto s = versor.array();
95 stl->stats.min.array() *= s;
96 stl->stats.max.array() *= s;
97 // Scale size.
98 stl->stats.size.array() *= s;
99 // Scale volume.
100 if (stl->stats.volume > 0.0)
101 stl->stats.volume *= versor(0) * versor(1) * versor(2);
102 // Scale the mesh.
103 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
104 for (int j = 0; j < 3; ++ j)
105 stl->facet_start[i].vertex[j].array() *= s;
106}

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:

◆ stl_translate()

void stl_translate ( stl_file stl,
float  x,
float  y,
float  z 
)
70{
71 stl_vertex new_min(x, y, z);
72 stl_vertex shift = new_min - stl->stats.min;
73 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
74 for (int j = 0; j < 3; ++ j)
75 stl->facet_start[i].vertex[j] += shift;
76 stl->stats.min = new_min;
77 stl->stats.max += shift;
78}

References stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, and stl_file::stats.

◆ stl_translate_relative()

void stl_translate_relative ( stl_file stl,
float  x,
float  y,
float  z 
)
82{
83 stl_vertex shift(x, y, z);
84 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i)
85 for (int j = 0; j < 3; ++ j)
86 stl->facet_start[i].vertex[j] += shift;
87 stl->stats.min += shift;
88 stl->stats.max += shift;
89}

References stl_file::facet_start, stl_stats::max, stl_stats::min, stl_stats::number_of_facets, and stl_file::stats.

◆ stl_verify_neighbors()

void stl_verify_neighbors ( stl_file stl)
33{
34 stl->stats.backwards_edges = 0;
35
36 for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
37 for (int j = 0; j < 3; ++ j) {
38 struct stl_edge {
39 stl_vertex p1;
40 stl_vertex p2;
41 int facet_number;
42 };
43 stl_edge edge_a;
44 edge_a.p1 = stl->facet_start[i].vertex[j];
45 edge_a.p2 = stl->facet_start[i].vertex[(j + 1) % 3];
46 int neighbor = stl->neighbors_start[i].neighbor[j];
47 if (neighbor == -1)
48 continue; // this edge has no neighbor... Continue.
49 int vnot = stl->neighbors_start[i].which_vertex_not[j];
50 stl_edge edge_b;
51 if (vnot < 3) {
52 edge_b.p1 = stl->facet_start[neighbor].vertex[(vnot + 2) % 3];
53 edge_b.p2 = stl->facet_start[neighbor].vertex[(vnot + 1) % 3];
54 } else {
55 stl->stats.backwards_edges += 1;
56 edge_b.p1 = stl->facet_start[neighbor].vertex[(vnot + 1) % 3];
57 edge_b.p2 = stl->facet_start[neighbor].vertex[(vnot + 2) % 3];
58 }
59 if (edge_a.p1 != edge_b.p1 || edge_a.p2 != edge_b.p2) {
60 // These edges should match but they don't. Print results.
61 BOOST_LOG_TRIVIAL(info) << "edge " << j << " of facet " << i << " doesn't match edge " << (vnot + 1) << " of facet " << neighbor;
62 stl_write_facet(stl, (char*)"first facet", i);
63 stl_write_facet(stl, (char*)"second facet", neighbor);
64 }
65 }
66 }
67}
void stl_write_facet(stl_file *stl, char *label, int facet)
Definition stl_io.cpp:173
std::vector< stl_neighbors > neighbors_start
Definition stl.h:151
int backwards_edges
Definition stl.h:128

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: